def list_transfer_operations(self, filter):
        """
        Gets an transfer operation in Google Storage Transfer Service.

        :param filter: (Required) A request filter, as described in
            https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs/list#body.QUERY_PARAMETERS.filter
            With one additional improvement:

            * project_id is optional if you have a project id defined
              in the connection
              See: :ref:`howto/connection:gcp`

        :type filter: dict
        :return: transfer operation
        :rtype: list[dict]
        """
        conn = self.get_conn()

        filter = self._inject_project_id(filter, FILTER, FILTER_PROJECT_ID)

        operations = []

        request = conn.transferOperations().list(name=TRANSFER_OPERATIONS, filter=json.dumps(filter))

        while request is not None:
            response = request.execute(num_retries=self.num_retries)
            if OPERATIONS in response:
                operations.extend(response[OPERATIONS])

            request = conn.transferOperations().list_next(
                previous_request=request, previous_response=response
            )

        return operations
def list_transfer_operations(self, filter):
        """
        Gets an transfer operation in Google Storage Transfer Service.

        :param filter: (Required) A request filter, as described in
            https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs/list#body.QUERY_PARAMETERS.filter
            With one additional improvement:

            * project_id is optional if you have a project id defined
              in the connection
              See: :ref:`howto/connection:gcp`

        :type filter: dict
        :return: transfer operation
        :rtype: list[dict]
        """
        conn = self.get_conn()

        filter = self._inject_project_id(filter, FILTER, FILTER_PROJECT_ID)

        operations = []

        request = conn.transferOperations().list(name=TRANSFER_OPERATIONS, filter=json.dumps(filter))

        while request is not None:
            response = request.execute(num_retries=self.num_retries)
            if OPERATIONS in response:
                operations.extend(response[OPERATIONS])

            request = conn.transferOperations().list_next(
                previous_request=request, previous_response=response
            )

        return operations
def list_transfer_operations ( self , filter ) : conn = self . get_conn ( ) filter = self . _inject_project_id ( filter , FILTER , FILTER_PROJECT_ID ) operations = [ ] request = conn . transferOperations ( ) . list ( name = TRANSFER_OPERATIONS , filter = json . dumps ( filter ) ) while request is not None : response = request . execute ( num_retries = self . num_retries ) if OPERATIONS in response : operations . extend ( response [ OPERATIONS ] ) request = conn . transferOperations ( ) . list_next ( previous_request = request , previous_response = response ) return operations
Gets an transfer operation in Google Storage Transfer Service.

        :param filter: (Required) A request filter, as described in
            https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs/list#body.QUERY_PARAMETERS.filter
            With one additional improvement:

            * project_id is optional if you have a project id defined
              in the connection
              See: :ref:`howto/connection:gcp`

        :type filter: dict
        :return: transfer operation
        :rtype: list[dict]
Gets an transfer operation in Google Storage Transfer Service .