Struct google_api_proto::google::storagetransfer::v1::storage_transfer_service_client::StorageTransferServiceClient
source · pub struct StorageTransferServiceClient<T> { /* private fields */ }
Expand description
Storage Transfer Service and its protos. Transfers data between between Google Cloud Storage buckets or from a data source external to Google to a Cloud Storage bucket.
Implementations§
source§impl<T> StorageTransferServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> StorageTransferServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F
) -> StorageTransferServiceClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn get_google_service_account(
&mut self,
request: impl IntoRequest<GetGoogleServiceAccountRequest>
) -> Result<Response<GoogleServiceAccount>, Status>
pub async fn get_google_service_account( &mut self, request: impl IntoRequest<GetGoogleServiceAccountRequest> ) -> Result<Response<GoogleServiceAccount>, Status>
Returns the Google service account that is used by Storage Transfer Service to access buckets in the project where transfers run or in other projects. Each Google service account is associated with one Google Cloud project. Users should add this service account to the Google Cloud Storage bucket ACLs to grant access to Storage Transfer Service. This service account is created and owned by Storage Transfer Service and can only be used by Storage Transfer Service.
sourcepub async fn create_transfer_job(
&mut self,
request: impl IntoRequest<CreateTransferJobRequest>
) -> Result<Response<TransferJob>, Status>
pub async fn create_transfer_job( &mut self, request: impl IntoRequest<CreateTransferJobRequest> ) -> Result<Response<TransferJob>, Status>
Creates a transfer job that runs periodically.
sourcepub async fn update_transfer_job(
&mut self,
request: impl IntoRequest<UpdateTransferJobRequest>
) -> Result<Response<TransferJob>, Status>
pub async fn update_transfer_job( &mut self, request: impl IntoRequest<UpdateTransferJobRequest> ) -> Result<Response<TransferJob>, Status>
Updates a transfer job. Updating a job’s transfer spec does not affect transfer operations that are running already.
Note: The job’s [status][google.storagetransfer.v1.TransferJob.status] field can be modified using this RPC (for example, to set a job’s status to [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED], [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], or [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED]).
sourcepub async fn get_transfer_job(
&mut self,
request: impl IntoRequest<GetTransferJobRequest>
) -> Result<Response<TransferJob>, Status>
pub async fn get_transfer_job( &mut self, request: impl IntoRequest<GetTransferJobRequest> ) -> Result<Response<TransferJob>, Status>
Gets a transfer job.
sourcepub async fn list_transfer_jobs(
&mut self,
request: impl IntoRequest<ListTransferJobsRequest>
) -> Result<Response<ListTransferJobsResponse>, Status>
pub async fn list_transfer_jobs( &mut self, request: impl IntoRequest<ListTransferJobsRequest> ) -> Result<Response<ListTransferJobsResponse>, Status>
Lists transfer jobs.
sourcepub async fn pause_transfer_operation(
&mut self,
request: impl IntoRequest<PauseTransferOperationRequest>
) -> Result<Response<()>, Status>
pub async fn pause_transfer_operation( &mut self, request: impl IntoRequest<PauseTransferOperationRequest> ) -> Result<Response<()>, Status>
Pauses a transfer operation.
sourcepub async fn resume_transfer_operation(
&mut self,
request: impl IntoRequest<ResumeTransferOperationRequest>
) -> Result<Response<()>, Status>
pub async fn resume_transfer_operation( &mut self, request: impl IntoRequest<ResumeTransferOperationRequest> ) -> Result<Response<()>, Status>
Resumes a transfer operation that is paused.
sourcepub async fn run_transfer_job(
&mut self,
request: impl IntoRequest<RunTransferJobRequest>
) -> Result<Response<Operation>, Status>
pub async fn run_transfer_job( &mut self, request: impl IntoRequest<RunTransferJobRequest> ) -> Result<Response<Operation>, Status>
Starts a new operation for the specified transfer job.
A TransferJob
has a maximum of one active TransferOperation
. If this
method is called while a TransferOperation
is active, an error is
returned.
sourcepub async fn delete_transfer_job(
&mut self,
request: impl IntoRequest<DeleteTransferJobRequest>
) -> Result<Response<()>, Status>
pub async fn delete_transfer_job( &mut self, request: impl IntoRequest<DeleteTransferJobRequest> ) -> Result<Response<()>, Status>
Deletes a transfer job. Deleting a transfer job sets its status to [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED].
sourcepub async fn create_agent_pool(
&mut self,
request: impl IntoRequest<CreateAgentPoolRequest>
) -> Result<Response<AgentPool>, Status>
pub async fn create_agent_pool( &mut self, request: impl IntoRequest<CreateAgentPoolRequest> ) -> Result<Response<AgentPool>, Status>
Creates an agent pool resource.
sourcepub async fn update_agent_pool(
&mut self,
request: impl IntoRequest<UpdateAgentPoolRequest>
) -> Result<Response<AgentPool>, Status>
pub async fn update_agent_pool( &mut self, request: impl IntoRequest<UpdateAgentPoolRequest> ) -> Result<Response<AgentPool>, Status>
Updates an existing agent pool resource.
sourcepub async fn get_agent_pool(
&mut self,
request: impl IntoRequest<GetAgentPoolRequest>
) -> Result<Response<AgentPool>, Status>
pub async fn get_agent_pool( &mut self, request: impl IntoRequest<GetAgentPoolRequest> ) -> Result<Response<AgentPool>, Status>
Gets an agent pool.
sourcepub async fn list_agent_pools(
&mut self,
request: impl IntoRequest<ListAgentPoolsRequest>
) -> Result<Response<ListAgentPoolsResponse>, Status>
pub async fn list_agent_pools( &mut self, request: impl IntoRequest<ListAgentPoolsRequest> ) -> Result<Response<ListAgentPoolsResponse>, Status>
Lists agent pools.
sourcepub async fn delete_agent_pool(
&mut self,
request: impl IntoRequest<DeleteAgentPoolRequest>
) -> Result<Response<()>, Status>
pub async fn delete_agent_pool( &mut self, request: impl IntoRequest<DeleteAgentPoolRequest> ) -> Result<Response<()>, Status>
Deletes an agent pool.
Trait Implementations§
source§impl<T: Clone> Clone for StorageTransferServiceClient<T>
impl<T: Clone> Clone for StorageTransferServiceClient<T>
source§fn clone(&self) -> StorageTransferServiceClient<T>
fn clone(&self) -> StorageTransferServiceClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> !Freeze for StorageTransferServiceClient<T>
impl<T> RefUnwindSafe for StorageTransferServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for StorageTransferServiceClient<T>where
T: Send,
impl<T> Sync for StorageTransferServiceClient<T>where
T: Sync,
impl<T> Unpin for StorageTransferServiceClient<T>where
T: Unpin,
impl<T> UnwindSafe for StorageTransferServiceClient<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request