#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ManagedService {
#[prost(string, tag = "2")]
pub service_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub producer_project_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
#[prost(string, repeated, tag = "1")]
pub resource_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "2")]
pub steps: ::prost::alloc::vec::Vec<operation_metadata::Step>,
#[prost(int32, tag = "3")]
pub progress_percentage: i32,
#[prost(message, optional, tag = "4")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
}
pub mod operation_metadata {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Step {
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(enumeration = "Status", tag = "4")]
pub status: i32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Status {
Unspecified = 0,
Done = 1,
NotStarted = 2,
InProgress = 3,
Failed = 4,
Cancelled = 5,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Diagnostic {
#[prost(string, tag = "1")]
pub location: ::prost::alloc::string::String,
#[prost(enumeration = "diagnostic::Kind", tag = "2")]
pub kind: i32,
#[prost(string, tag = "3")]
pub message: ::prost::alloc::string::String,
}
pub mod diagnostic {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Kind {
Warning = 0,
Error = 1,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigSource {
#[prost(string, tag = "5")]
pub id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub files: ::prost::alloc::vec::Vec<ConfigFile>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigFile {
#[prost(string, tag = "1")]
pub file_path: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "3")]
pub file_contents: ::prost::alloc::vec::Vec<u8>,
#[prost(enumeration = "config_file::FileType", tag = "4")]
pub file_type: i32,
}
pub mod config_file {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FileType {
Unspecified = 0,
ServiceConfigYaml = 1,
OpenApiJson = 2,
OpenApiYaml = 3,
FileDescriptorSetProto = 4,
ProtoFile = 6,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigRef {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChangeReport {
#[prost(message, repeated, tag = "1")]
pub config_changes: ::prost::alloc::vec::Vec<super::super::ConfigChange>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Rollout {
#[prost(string, tag = "1")]
pub rollout_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "3")]
pub created_by: ::prost::alloc::string::String,
#[prost(enumeration = "rollout::RolloutStatus", tag = "4")]
pub status: i32,
#[prost(string, tag = "8")]
pub service_name: ::prost::alloc::string::String,
#[prost(oneof = "rollout::Strategy", tags = "5, 200")]
pub strategy: ::core::option::Option<rollout::Strategy>,
}
pub mod rollout {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TrafficPercentStrategy {
#[prost(map = "string, double", tag = "1")]
pub percentages: ::std::collections::HashMap<::prost::alloc::string::String, f64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteServiceStrategy {}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RolloutStatus {
Unspecified = 0,
InProgress = 1,
Success = 2,
Cancelled = 3,
Failed = 4,
Pending = 5,
FailedRolledBack = 6,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Strategy {
#[prost(message, tag = "5")]
TrafficPercentStrategy(TrafficPercentStrategy),
#[prost(message, tag = "200")]
DeleteServiceStrategy(DeleteServiceStrategy),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListServicesRequest {
#[prost(string, tag = "1")]
pub producer_project_id: ::prost::alloc::string::String,
#[prost(int32, tag = "5")]
pub page_size: i32,
#[prost(string, tag = "6")]
pub page_token: ::prost::alloc::string::String,
#[deprecated]
#[prost(string, tag = "7")]
pub consumer_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListServicesResponse {
#[prost(message, repeated, tag = "1")]
pub services: ::prost::alloc::vec::Vec<ManagedService>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetServiceRequest {
#[prost(string, tag = "1")]
pub service_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateServiceRequest {
#[prost(message, optional, tag = "1")]
pub service: ::core::option::Option<ManagedService>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteServiceRequest {
#[prost(string, tag = "1")]
pub service_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UndeleteServiceRequest {
#[prost(string, tag = "1")]
pub service_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UndeleteServiceResponse {
#[prost(message, optional, tag = "1")]
pub service: ::core::option::Option<ManagedService>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetServiceConfigRequest {
#[prost(string, tag = "1")]
pub service_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub config_id: ::prost::alloc::string::String,
#[prost(enumeration = "get_service_config_request::ConfigView", tag = "3")]
pub view: i32,
}
pub mod get_service_config_request {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConfigView {
Basic = 0,
Full = 1,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListServiceConfigsRequest {
#[prost(string, tag = "1")]
pub service_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListServiceConfigsResponse {
#[prost(message, repeated, tag = "1")]
pub service_configs: ::prost::alloc::vec::Vec<super::super::Service>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateServiceConfigRequest {
#[prost(string, tag = "1")]
pub service_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub service_config: ::core::option::Option<super::super::Service>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitConfigSourceRequest {
#[prost(string, tag = "1")]
pub service_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub config_source: ::core::option::Option<ConfigSource>,
#[prost(bool, tag = "3")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitConfigSourceResponse {
#[prost(message, optional, tag = "1")]
pub service_config: ::core::option::Option<super::super::Service>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateServiceRolloutRequest {
#[prost(string, tag = "1")]
pub service_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub rollout: ::core::option::Option<Rollout>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListServiceRolloutsRequest {
#[prost(string, tag = "1")]
pub service_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub page_size: i32,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListServiceRolloutsResponse {
#[prost(message, repeated, tag = "1")]
pub rollouts: ::prost::alloc::vec::Vec<Rollout>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetServiceRolloutRequest {
#[prost(string, tag = "1")]
pub service_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub rollout_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnableServiceRequest {
#[prost(string, tag = "1")]
pub service_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub consumer_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnableServiceResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DisableServiceRequest {
#[prost(string, tag = "1")]
pub service_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub consumer_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DisableServiceResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateConfigReportRequest {
#[prost(message, optional, tag = "1")]
pub new_config: ::core::option::Option<::prost_types::Any>,
#[prost(message, optional, tag = "2")]
pub old_config: ::core::option::Option<::prost_types::Any>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateConfigReportResponse {
#[prost(string, tag = "1")]
pub service_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub change_reports: ::prost::alloc::vec::Vec<ChangeReport>,
#[prost(message, repeated, tag = "4")]
pub diagnostics: ::prost::alloc::vec::Vec<Diagnostic>,
}
#[doc = r" Generated client implementations."]
pub mod service_manager_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " [Google Service Management API](https://cloud.google.com/service-management/overview)"]
#[derive(Debug, Clone)]
pub struct ServiceManagerClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ServiceManagerClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ServiceManagerClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ServiceManagerClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Lists managed services."]
#[doc = ""]
#[doc = " Returns all public services. For authenticated users, also returns all"]
#[doc = " services the calling user has \"servicemanagement.services.get\" permission"]
#[doc = " for."]
#[doc = ""]
#[doc = " **BETA:** If the caller specifies the `consumer_id`, it returns only the"]
#[doc = " services enabled on the consumer. The `consumer_id` must have the format"]
#[doc = " of \"project:{PROJECT-ID}\"."]
pub async fn list_services(
&mut self,
request: impl tonic::IntoRequest<super::ListServicesRequest>,
) -> Result<tonic::Response<super::ListServicesResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.api.servicemanagement.v1.ServiceManager/ListServices",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets a managed service. Authentication is required unless the service is"]
#[doc = " public."]
pub async fn get_service(
&mut self,
request: impl tonic::IntoRequest<super::GetServiceRequest>,
) -> Result<tonic::Response<super::ManagedService>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.api.servicemanagement.v1.ServiceManager/GetService",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a new managed service."]
#[doc = " Please note one producer project can own no more than 20 services."]
#[doc = ""]
#[doc = " Operation<response: ManagedService>"]
pub async fn create_service(
&mut self,
request: impl tonic::IntoRequest<super::CreateServiceRequest>,
) -> Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.api.servicemanagement.v1.ServiceManager/CreateService",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes a managed service. This method will change the service to the"]
#[doc = " `Soft-Delete` state for 30 days. Within this period, service producers may"]
#[doc = " call [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore the service."]
#[doc = " After 30 days, the service will be permanently deleted."]
#[doc = ""]
#[doc = " Operation<response: google.protobuf.Empty>"]
pub async fn delete_service(
&mut self,
request: impl tonic::IntoRequest<super::DeleteServiceRequest>,
) -> Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.api.servicemanagement.v1.ServiceManager/DeleteService",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Revives a previously deleted managed service. The method restores the"]
#[doc = " service using the configuration at the time the service was deleted."]
#[doc = " The target service must exist and must have been deleted within the"]
#[doc = " last 30 days."]
#[doc = ""]
#[doc = " Operation<response: UndeleteServiceResponse>"]
pub async fn undelete_service(
&mut self,
request: impl tonic::IntoRequest<super::UndeleteServiceRequest>,
) -> Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.api.servicemanagement.v1.ServiceManager/UndeleteService",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Lists the history of the service configuration for a managed service,"]
#[doc = " from the newest to the oldest."]
pub async fn list_service_configs(
&mut self,
request: impl tonic::IntoRequest<super::ListServiceConfigsRequest>,
) -> Result<tonic::Response<super::ListServiceConfigsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.api.servicemanagement.v1.ServiceManager/ListServiceConfigs",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets a service configuration (version) for a managed service."]
pub async fn get_service_config(
&mut self,
request: impl tonic::IntoRequest<super::GetServiceConfigRequest>,
) -> Result<tonic::Response<super::super::super::Service>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.api.servicemanagement.v1.ServiceManager/GetServiceConfig",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a new service configuration (version) for a managed service."]
#[doc = " This method only stores the service configuration. To roll out the service"]
#[doc = " configuration to backend systems please call"]
#[doc = " [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]."]
#[doc = ""]
#[doc = " Only the 100 most recent service configurations and ones referenced by"]
#[doc = " existing rollouts are kept for each service. The rest will be deleted"]
#[doc = " eventually."]
pub async fn create_service_config(
&mut self,
request: impl tonic::IntoRequest<super::CreateServiceConfigRequest>,
) -> Result<tonic::Response<super::super::super::Service>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.api.servicemanagement.v1.ServiceManager/CreateServiceConfig",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a new service configuration (version) for a managed service based"]
#[doc = " on"]
#[doc = " user-supplied configuration source files (for example: OpenAPI"]
#[doc = " Specification). This method stores the source configurations as well as the"]
#[doc = " generated service configuration. To rollout the service configuration to"]
#[doc = " other services,"]
#[doc = " please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]."]
#[doc = ""]
#[doc = " Only the 100 most recent configuration sources and ones referenced by"]
#[doc = " existing service configurtions are kept for each service. The rest will be"]
#[doc = " deleted eventually."]
#[doc = ""]
#[doc = " Operation<response: SubmitConfigSourceResponse>"]
pub async fn submit_config_source(
&mut self,
request: impl tonic::IntoRequest<super::SubmitConfigSourceRequest>,
) -> Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.api.servicemanagement.v1.ServiceManager/SubmitConfigSource",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Lists the history of the service configuration rollouts for a managed"]
#[doc = " service, from the newest to the oldest."]
pub async fn list_service_rollouts(
&mut self,
request: impl tonic::IntoRequest<super::ListServiceRolloutsRequest>,
) -> Result<tonic::Response<super::ListServiceRolloutsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.api.servicemanagement.v1.ServiceManager/ListServiceRollouts",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout]."]
pub async fn get_service_rollout(
&mut self,
request: impl tonic::IntoRequest<super::GetServiceRolloutRequest>,
) -> Result<tonic::Response<super::Rollout>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.api.servicemanagement.v1.ServiceManager/GetServiceRollout",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a new service configuration rollout. Based on rollout, the"]
#[doc = " Google Service Management will roll out the service configurations to"]
#[doc = " different backend services. For example, the logging configuration will be"]
#[doc = " pushed to Google Cloud Logging."]
#[doc = ""]
#[doc = " Please note that any previous pending and running Rollouts and associated"]
#[doc = " Operations will be automatically cancelled so that the latest Rollout will"]
#[doc = " not be blocked by previous Rollouts."]
#[doc = ""]
#[doc = " Only the 100 most recent (in any state) and the last 10 successful (if not"]
#[doc = " already part of the set of 100 most recent) rollouts are kept for each"]
#[doc = " service. The rest will be deleted eventually."]
#[doc = ""]
#[doc = " Operation<response: Rollout>"]
pub async fn create_service_rollout(
&mut self,
request: impl tonic::IntoRequest<super::CreateServiceRolloutRequest>,
) -> Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.api.servicemanagement.v1.ServiceManager/CreateServiceRollout",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Generates and returns a report (errors, warnings and changes from"]
#[doc = " existing configurations) associated with"]
#[doc = " GenerateConfigReportRequest.new_value"]
#[doc = ""]
#[doc = " If GenerateConfigReportRequest.old_value is specified,"]
#[doc = " GenerateConfigReportRequest will contain a single ChangeReport based on the"]
#[doc = " comparison between GenerateConfigReportRequest.new_value and"]
#[doc = " GenerateConfigReportRequest.old_value."]
#[doc = " If GenerateConfigReportRequest.old_value is not specified, this method"]
#[doc = " will compare GenerateConfigReportRequest.new_value with the last pushed"]
#[doc = " service configuration."]
pub async fn generate_config_report(
&mut self,
request: impl tonic::IntoRequest<super::GenerateConfigReportRequest>,
) -> Result<tonic::Response<super::GenerateConfigReportResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.api.servicemanagement.v1.ServiceManager/GenerateConfigReport",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Enables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can be used"]
#[doc = " for the project. See"]
#[doc = " [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for"]
#[doc = " more information."]
#[doc = ""]
#[doc = " Operation<response: EnableServiceResponse>"]
pub async fn enable_service(
&mut self,
request: impl tonic::IntoRequest<super::EnableServiceRequest>,
) -> Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.api.servicemanagement.v1.ServiceManager/EnableService",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Disables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can no longer be"]
#[doc = " be used for the project. It prevents accidental usage that may cause"]
#[doc = " unexpected billing charges or security leaks."]
#[doc = ""]
#[doc = " Operation<response: DisableServiceResponse>"]
pub async fn disable_service(
&mut self,
request: impl tonic::IntoRequest<super::DisableServiceRequest>,
) -> Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.api.servicemanagement.v1.ServiceManager/DisableService",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}