Gets the operations.ApiKeyOps instance for the current request.
428173
def _get_api_key_ops():
    """"""
    auth_header = request.authorization
    if not auth_header:
        logging.debug('API request lacks authorization header')
        abort(flask.Response(
            'API key required', 401,
            {'WWW-Authenticate': 'Basic realm="API key required"'}))

    return operations.ApiKeyOps(auth_header.username, auth_header.password)
910483
def get(self, sid):
        
        return KeyContext(self._version, account_sid=self._solution['account_sid'], sid=sid, )
1050365
function httpRequest(operation) {
  var self = this
  return function(req, resp) {
    var $done = function(err, code, msg) {
      if (!msg && !_.isNumber(code)) {
        msg = code||''      // `code` is optional
        code = undefined
      }

      code = code || (!!err ? 500 : 200)
      resp.writeHead(code)
      resp.end(!!err ? ''+err : (''+msg || ''))
    }

    if (!~ self._allowedJobTypes.indexOf(req.params.jobType))
      return $done('Not a valid job type', 400);

    return OPS[operation](req, resp, $done)
  }
}
1201325
public Builder getRequest(final RequestTypeEnum requestType, final RestOperationTypeEnum restOperation) {
		return getRequest(requestType, restOperation, null);
	}
762778
def get_available_operations(custom_headers:nil)
      response = get_available_operations_async(custom_headers:custom_headers).value!
      response.body unless response.nil?
    end
1369183
@GET
  @Path("/{id}/$someCustomOperation")
  public Response someCustomOperationUsingGet(@PathParam("id") String id, String resource) throws Exception {
    return customOperation(resource, RequestTypeEnum.GET, id, "$someCustomOperation", 
            RestOperationTypeEnum.EXTENDED_OPERATION_INSTANCE);
  }
966165
def get(key, opts = {})
      response = api_execute(key_endpoint + key, :get, params: opts)
      Response.from_http_response(response)
    end
1222557
def getOperation(self, ps, action):
        '''
        '''
        opName = self.getOperationName(ps, action)
        return getattr(self, opName)
1135707
public java.util.List<String> getOperations() {
        if (operations == null) {
            operations = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return operations;
    }
1147874
def get(self, sid):
        
        return KeyContext(self._version, fleet_sid=self._solution['fleet_sid'], sid=sid, )
314767
public static Map<Method, OperationId> getMethodMap(Class<?> serviceInterface) {
    if (!serviceInterface.isInterface()) {
      Map<Method, OperationId> operations = new HashMap<>();
      for (Class<?> iface : serviceInterface.getInterfaces()) {
        operations.putAll(findMethods(iface));
      }
      return operations;
    }
    return findMethods(serviceInterface);
  }
253367
public Map<String, MBeanOperationInfo> getOperationMetadata() {

        MBeanOperationInfo[] operations = mBeanInfo.getOperations();

        Map<String, MBeanOperationInfo> operationMap = new TreeMap<String, MBeanOperationInfo>();
        for (MBeanOperationInfo operation: operations) {
            operationMap.put(operation.getName(), operation);
        }
        return operationMap;
    }
537327
def _get_action_from_method_and_request_uri(self, method, request_uri):
        

        # service response class should have 'SERVICE_NAME' class member,
        # if you want to get action from method and url
        if not hasattr(self, 'SERVICE_NAME'):
            return None
        service = self.SERVICE_NAME
        conn = boto3.client(service, region_name=self.region)

        # make cache if it does not exist yet
        if not hasattr(self, 'method_urls'):
            self.method_urls = defaultdict(lambda: defaultdict(str))
            op_names = conn._service_model.operation_names
            for op_name in op_names:
                op_model = conn._service_model.operation_model(op_name)
                _method = op_model.http['method']
                uri_regexp = self.uri_to_regexp(op_model.http['requestUri'])
                self.method_urls[_method][uri_regexp] = op_model.name
        regexp_and_names = self.method_urls[method]
        for regexp, name in regexp_and_names.items():
            match = re.match(regexp, request_uri)
            self.uri_match = match
            if match:
                return name
        return None
598208
def get_operations(self,
                       indices: Sequence[LogicalIndex],
                       qubits: Sequence[ops.Qid]
                       ) -> ops.OP_TREE:
        """"""
1354780
def get_instance(self, payload):
        
        return NewKeyInstance(self._version, payload, account_sid=self._solution['account_sid'], )
262102
def get_function_in_responses(service, operation, protocol):
    
    client = boto3.client(service)

    aws_operation_name = to_upper_camel_case(operation)
    op_model = client._service_model.operation_model(aws_operation_name)
    if not hasattr(op_model.output_shape, 'members'):
        outputs = {}
    else:
        outputs = op_model.output_shape.members
    inputs = op_model.input_shape.members
    input_names = [to_snake_case(_) for _ in inputs.keys() if _ not in INPUT_IGNORED_IN_BACKEND]
    output_names = [to_snake_case(_) for _ in outputs.keys() if _ not in OUTPUT_IGNORED_IN_BACKEND]
    body = '\ndef {}(self):\n'.format(operation)

    for input_name, input_type in inputs.items():
        type_name = input_type.type_name
        if type_name == 'integer':
            arg_line_tmpl = '    {} = self._get_int_param("{}")\n'
        elif type_name == 'list':
            arg_line_tmpl = '    {} = self._get_list_prefix("{}.member")\n'
        else:
            arg_line_tmpl = '    {} = self._get_param("{}")\n'
        body += arg_line_tmpl.format(to_snake_case(input_name), input_name)
    if output_names:
        body += '    {} = self.{}_backend.{}(\n'.format(', '.join(output_names), get_escaped_service(service), operation)
    else:
        body += '    self.{}_backend.{}(\n'.format(get_escaped_service(service), operation)
    for input_name in input_names:
        body += '        {}={},\n'.format(input_name, input_name)

    body += '    )\n'
    if protocol == 'query':
        body += '    template = self.response_template({}_TEMPLATE)\n'.format(operation.upper())
        body += '    return template.render({})\n'.format(
            ', '.join(['{}={}'.format(_, _) for _ in output_names])
        )
    elif protocol in ['json', 'rest-json']:
        body += '    # TODO: adjust response\n'
        body += '    return json.dumps(dict({}))\n'.format(', '.join(['{}={}'.format(to_lower_camel_case(_), _) for _ in output_names]))
    return body
565546
function(operation, thisp) {
		this._suspended = true;
		var res = operation.call(thisp);
		this._suspended = false;
		return res;
	}