Struct google_api_proto::google::api::serviceusage::v1beta1::service_usage_client::ServiceUsageClient
source · pub struct ServiceUsageClient<T> { /* private fields */ }
Expand description
Implementations§
source§impl<T> ServiceUsageClient<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> ServiceUsageClient<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,
) -> ServiceUsageClient<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 enable_service(
&mut self,
request: impl IntoRequest<EnableServiceRequest>,
) -> Result<Response<Operation>, Status>
pub async fn enable_service( &mut self, request: impl IntoRequest<EnableServiceRequest>, ) -> Result<Response<Operation>, Status>
Enables a service so that it can be used with a project.
Operation response type: google.protobuf.Empty
sourcepub async fn disable_service(
&mut self,
request: impl IntoRequest<DisableServiceRequest>,
) -> Result<Response<Operation>, Status>
pub async fn disable_service( &mut self, request: impl IntoRequest<DisableServiceRequest>, ) -> Result<Response<Operation>, Status>
Disables a service so that it can no longer be used with a project. This prevents unintended usage that may cause unexpected billing charges or security leaks.
It is not valid to call the disable method on a service that is not
currently enabled. Callers will receive a FAILED_PRECONDITION
status if
the target service is not currently enabled.
Operation response type: google.protobuf.Empty
sourcepub async fn get_service(
&mut self,
request: impl IntoRequest<GetServiceRequest>,
) -> Result<Response<Service>, Status>
pub async fn get_service( &mut self, request: impl IntoRequest<GetServiceRequest>, ) -> Result<Response<Service>, Status>
Returns the service configuration and enabled state for a given service.
sourcepub async fn list_services(
&mut self,
request: impl IntoRequest<ListServicesRequest>,
) -> Result<Response<ListServicesResponse>, Status>
pub async fn list_services( &mut self, request: impl IntoRequest<ListServicesRequest>, ) -> Result<Response<ListServicesResponse>, Status>
Lists all services available to the specified project, and the current
state of those services with respect to the project. The list includes
all public services, all services for which the calling user has the
servicemanagement.services.bind
permission, and all services that have
already been enabled on the project. The list can be filtered to
only include services in a specific state, for example to only include
services enabled on the project.
sourcepub async fn batch_enable_services(
&mut self,
request: impl IntoRequest<BatchEnableServicesRequest>,
) -> Result<Response<Operation>, Status>
pub async fn batch_enable_services( &mut self, request: impl IntoRequest<BatchEnableServicesRequest>, ) -> Result<Response<Operation>, Status>
Enables multiple services on a project. The operation is atomic: if enabling any service fails, then the entire batch fails, and no state changes occur.
Operation response type: google.protobuf.Empty
sourcepub async fn list_consumer_quota_metrics(
&mut self,
request: impl IntoRequest<ListConsumerQuotaMetricsRequest>,
) -> Result<Response<ListConsumerQuotaMetricsResponse>, Status>
pub async fn list_consumer_quota_metrics( &mut self, request: impl IntoRequest<ListConsumerQuotaMetricsRequest>, ) -> Result<Response<ListConsumerQuotaMetricsResponse>, Status>
Retrieves a summary of all quota information visible to the service consumer, organized by service metric. Each metric includes information about all of its defined limits. Each limit includes the limit configuration (quota unit, preciseness, default value), the current effective limit value, and all of the overrides applied to the limit.
sourcepub async fn get_consumer_quota_metric(
&mut self,
request: impl IntoRequest<GetConsumerQuotaMetricRequest>,
) -> Result<Response<ConsumerQuotaMetric>, Status>
pub async fn get_consumer_quota_metric( &mut self, request: impl IntoRequest<GetConsumerQuotaMetricRequest>, ) -> Result<Response<ConsumerQuotaMetric>, Status>
Retrieves a summary of quota information for a specific quota metric
sourcepub async fn get_consumer_quota_limit(
&mut self,
request: impl IntoRequest<GetConsumerQuotaLimitRequest>,
) -> Result<Response<ConsumerQuotaLimit>, Status>
pub async fn get_consumer_quota_limit( &mut self, request: impl IntoRequest<GetConsumerQuotaLimitRequest>, ) -> Result<Response<ConsumerQuotaLimit>, Status>
Retrieves a summary of quota information for a specific quota limit.
sourcepub async fn create_admin_override(
&mut self,
request: impl IntoRequest<CreateAdminOverrideRequest>,
) -> Result<Response<Operation>, Status>
pub async fn create_admin_override( &mut self, request: impl IntoRequest<CreateAdminOverrideRequest>, ) -> Result<Response<Operation>, Status>
Creates an admin override. An admin override is applied by an administrator of a parent folder or parent organization of the consumer receiving the override. An admin override is intended to limit the amount of quota the consumer can use out of the total quota pool allocated to all children of the folder or organization.
sourcepub async fn update_admin_override(
&mut self,
request: impl IntoRequest<UpdateAdminOverrideRequest>,
) -> Result<Response<Operation>, Status>
pub async fn update_admin_override( &mut self, request: impl IntoRequest<UpdateAdminOverrideRequest>, ) -> Result<Response<Operation>, Status>
Updates an admin override.
sourcepub async fn delete_admin_override(
&mut self,
request: impl IntoRequest<DeleteAdminOverrideRequest>,
) -> Result<Response<Operation>, Status>
pub async fn delete_admin_override( &mut self, request: impl IntoRequest<DeleteAdminOverrideRequest>, ) -> Result<Response<Operation>, Status>
Deletes an admin override.
sourcepub async fn list_admin_overrides(
&mut self,
request: impl IntoRequest<ListAdminOverridesRequest>,
) -> Result<Response<ListAdminOverridesResponse>, Status>
pub async fn list_admin_overrides( &mut self, request: impl IntoRequest<ListAdminOverridesRequest>, ) -> Result<Response<ListAdminOverridesResponse>, Status>
Lists all admin overrides on this limit.
sourcepub async fn import_admin_overrides(
&mut self,
request: impl IntoRequest<ImportAdminOverridesRequest>,
) -> Result<Response<Operation>, Status>
pub async fn import_admin_overrides( &mut self, request: impl IntoRequest<ImportAdminOverridesRequest>, ) -> Result<Response<Operation>, Status>
Creates or updates multiple admin overrides atomically, all on the same consumer, but on many different metrics or limits. The name field in the quota override message should not be set.
sourcepub async fn create_consumer_override(
&mut self,
request: impl IntoRequest<CreateConsumerOverrideRequest>,
) -> Result<Response<Operation>, Status>
pub async fn create_consumer_override( &mut self, request: impl IntoRequest<CreateConsumerOverrideRequest>, ) -> Result<Response<Operation>, Status>
Creates a consumer override. A consumer override is applied to the consumer on its own authority to limit its own quota usage. Consumer overrides cannot be used to grant more quota than would be allowed by admin overrides, producer overrides, or the default limit of the service.
sourcepub async fn update_consumer_override(
&mut self,
request: impl IntoRequest<UpdateConsumerOverrideRequest>,
) -> Result<Response<Operation>, Status>
pub async fn update_consumer_override( &mut self, request: impl IntoRequest<UpdateConsumerOverrideRequest>, ) -> Result<Response<Operation>, Status>
Updates a consumer override.
sourcepub async fn delete_consumer_override(
&mut self,
request: impl IntoRequest<DeleteConsumerOverrideRequest>,
) -> Result<Response<Operation>, Status>
pub async fn delete_consumer_override( &mut self, request: impl IntoRequest<DeleteConsumerOverrideRequest>, ) -> Result<Response<Operation>, Status>
Deletes a consumer override.
sourcepub async fn list_consumer_overrides(
&mut self,
request: impl IntoRequest<ListConsumerOverridesRequest>,
) -> Result<Response<ListConsumerOverridesResponse>, Status>
pub async fn list_consumer_overrides( &mut self, request: impl IntoRequest<ListConsumerOverridesRequest>, ) -> Result<Response<ListConsumerOverridesResponse>, Status>
Lists all consumer overrides on this limit.
sourcepub async fn import_consumer_overrides(
&mut self,
request: impl IntoRequest<ImportConsumerOverridesRequest>,
) -> Result<Response<Operation>, Status>
pub async fn import_consumer_overrides( &mut self, request: impl IntoRequest<ImportConsumerOverridesRequest>, ) -> Result<Response<Operation>, Status>
Creates or updates multiple consumer overrides atomically, all on the same consumer, but on many different metrics or limits. The name field in the quota override message should not be set.
sourcepub async fn generate_service_identity(
&mut self,
request: impl IntoRequest<GenerateServiceIdentityRequest>,
) -> Result<Response<Operation>, Status>
pub async fn generate_service_identity( &mut self, request: impl IntoRequest<GenerateServiceIdentityRequest>, ) -> Result<Response<Operation>, Status>
Generates service identity for service.
Trait Implementations§
source§impl<T: Clone> Clone for ServiceUsageClient<T>
impl<T: Clone> Clone for ServiceUsageClient<T>
source§fn clone(&self) -> ServiceUsageClient<T>
fn clone(&self) -> ServiceUsageClient<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 ServiceUsageClient<T>
impl<T> RefUnwindSafe for ServiceUsageClient<T>where
T: RefUnwindSafe,
impl<T> Send for ServiceUsageClient<T>where
T: Send,
impl<T> Sync for ServiceUsageClient<T>where
T: Sync,
impl<T> Unpin for ServiceUsageClient<T>where
T: Unpin,
impl<T> UnwindSafe for ServiceUsageClient<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