Get a commit request for a staged import.

        :param id: Staged import ID as an int.
        :return: :class:`imports.Request <imports.Request>` object
        :rtype: imports.Request
163994
def get_commit_request(self, id): # pylint: disable=invalid-name,redefined-builtin
        
        schema = RequestSchema()
        resp = self.service.get(self.base+str(id)+'/request/')
        return self.service.decode(schema, resp)
981111
def start(self, id):
        
        path = partial(_path, self.adapter)
        path = path(id)
        return self._put(path)
595223
def get(cls, id):
        '''
        
        '''
        client = cls._new_api_client()
        return client.make_request(cls, 'get', url_params={'id': id})
841837
def _get_one(self, id):
        
        try:
            return self._to_dict(models.User.objects.get(pk=id))
        except models.User.DoesNotExist:
            raise errors.NotFound()
175290
def start_import(self, version_id=None):
        
        if not version_id:
            version_id = self.version.id

        target_url = self._client.get_url('VERSION', 'POST', 'import', {'layer_id': self.id, 'version_id': version_id})
        r = self._client.request('POST', target_url, json={})
        return self._deserialize(r.json(), self._manager)
982698
def get(self, id): # pylint: disable=invalid-name,redefined-builtin
        
        schema = PackageSchema()
        resp = self.service.get_id(self.base, id)
        return self.service.decode(schema, resp)
42786
def get_project(self, project_id):
        ''''''
        project_response = self.get_request('projects/%s' % project_id)
        return Project(self, project_response['project'])
520154
def _commit(self):
        
        if self._id is None:
            mode = _datastore_pb2.CommitRequest.NON_TRANSACTIONAL
        else:
            mode = _datastore_pb2.CommitRequest.TRANSACTIONAL

        commit_response_pb = self._client._datastore_api.commit(
            self.project, mode, self._mutations, transaction=self._id
        )
        _, updated_keys = _parse_commit_response(commit_response_pb)
        # If the back-end returns without error, we are guaranteed that
        # ``commit`` will return keys that match (length and
        # order) directly ``_partial_key_entities``.
        for new_key_pb, entity in zip(updated_keys, self._partial_key_entities):
            new_id = new_key_pb.path[-1].id
            entity.key = entity.key.completed_key(new_id)
1140860
def get(self, id):
        
        url = self._url('%s' % (id))
        return self.client.get(url)
285942
def get_vip_request(self, vip_request_id):
        
        uri = 'api/v3/vip-request/%s/' % vip_request_id

        return super(ApiVipRequest, self).get(uri)
51937
def inject_request_ids_into_environment(func):
    """"""

    @wraps(func)
    def wrapper(event, context):
        # This might not always be an API Gateway event, so only log the
        # request ID, if it looks like to be coming from there.
        if 'requestContext' in event:
            os.environ[ENV_APIG_REQUEST_ID] = event['requestContext'].get(
                'requestId', 'N/A')
        os.environ[ENV_LAMBDA_REQUEST_ID] = context.aws_request_id
        return func(event, context)

    return wrapper
169707
def usable_id(cls, id):
        
        try:
            # id is maybe a sshkey name
            qry_id = cls.from_name(id)
            if not qry_id:
                qry_id = int(id)
        except DuplicateResults as exc:
            cls.error(exc.errors)
        except Exception:
            qry_id = None

        if not qry_id:
            msg = 'unknown identifier %s' % id
            cls.error(msg)

        return qry_id
600389
def get_component(id):
    
    components = cachet.Components(endpoint=ENDPOINT)
    component = json.loads(components.get(id=id))
    return component['data']
412497
def get_incident(self, id, **kwargs):
        "
        resp = self._get_object_by_name(self._INCIDENT_ENDPOINT_SUFFIX, id,
                                        **kwargs)
        return resp
233020
def get_authorization(self, id):
        
        assert isinstance(id, (int, long)), id
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            "/authorizations/" + str(id)
        )
        return github.Authorization.Authorization(self._requester, headers, data, completed=True)
892211
def get_requests_request_id(self, request_id):
        
        route_values = {}
        if request_id is not None:
            route_values['requestId'] = self._serialize.url('request_id', request_id, 'str')
        response = self._send(http_method='GET',
                              location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52',
                              version='5.0-preview.1',
                              route_values=route_values)
        return self._deserialize('Request', response)
1330316
public Object requestGet(final String id, Class type) throws SDKException {
    String url = this.pathUrl;
    if (id != null) {
      url += "/" + id;
      return requestGetWithStatus(url, null, type);
    } else {
      return requestGetAll(url, type, null);
    }
  }