#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAuthorizationRequest {
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Authorization {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub service_account_email: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub oauth_client_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDeploymentRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub deployment_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub deployment: ::core::option::Option<Deployment>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplaceDeploymentRequest {
#[prost(message, optional, tag = "2")]
pub deployment: ::core::option::Option<Deployment>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDeploymentRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDeploymentsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDeploymentsResponse {
#[prost(message, repeated, tag = "1")]
pub deployments: ::prost::alloc::vec::Vec<Deployment>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDeploymentRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub etag: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstallDeploymentRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UninstallDeploymentRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetInstallStatusRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstallStatus {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub installed: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Deployment {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub oauth_scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub add_ons: ::core::option::Option<AddOns>,
#[prost(string, tag = "5")]
pub etag: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddOns {
#[prost(message, optional, tag = "1")]
pub common: ::core::option::Option<
super::super::super::apps::script::r#type::CommonAddOnManifest,
>,
#[prost(message, optional, tag = "2")]
pub gmail: ::core::option::Option<
super::super::super::apps::script::r#type::gmail::GmailAddOnManifest,
>,
#[prost(message, optional, tag = "5")]
pub drive: ::core::option::Option<
super::super::super::apps::script::r#type::drive::DriveAddOnManifest,
>,
#[prost(message, optional, tag = "6")]
pub calendar: ::core::option::Option<
super::super::super::apps::script::r#type::calendar::CalendarAddOnManifest,
>,
#[prost(message, optional, tag = "7")]
pub docs: ::core::option::Option<
super::super::super::apps::script::r#type::docs::DocsAddOnManifest,
>,
#[prost(message, optional, tag = "8")]
pub sheets: ::core::option::Option<
super::super::super::apps::script::r#type::sheets::SheetsAddOnManifest,
>,
#[prost(message, optional, tag = "10")]
pub slides: ::core::option::Option<
super::super::super::apps::script::r#type::slides::SlidesAddOnManifest,
>,
#[prost(message, optional, tag = "15")]
pub http_options: ::core::option::Option<
super::super::super::apps::script::r#type::HttpOptions,
>,
}
pub mod g_suite_add_ons_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct GSuiteAddOnsClient<T> {
inner: tonic::client::Grpc<T>,
}
impl GSuiteAddOnsClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> GSuiteAddOnsClient<T>
where
T: tonic::client::GrpcService<tonic::body::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 {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> GSuiteAddOnsClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
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,
{
GSuiteAddOnsClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
pub async fn get_authorization(
&mut self,
request: impl tonic::IntoRequest<super::GetAuthorizationRequest>,
) -> Result<tonic::Response<super::Authorization>, 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.cloud.gsuiteaddons.v1.GSuiteAddOns/GetAuthorization",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_deployment(
&mut self,
request: impl tonic::IntoRequest<super::CreateDeploymentRequest>,
) -> Result<tonic::Response<super::Deployment>, 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.cloud.gsuiteaddons.v1.GSuiteAddOns/CreateDeployment",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn replace_deployment(
&mut self,
request: impl tonic::IntoRequest<super::ReplaceDeploymentRequest>,
) -> Result<tonic::Response<super::Deployment>, 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.cloud.gsuiteaddons.v1.GSuiteAddOns/ReplaceDeployment",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_deployment(
&mut self,
request: impl tonic::IntoRequest<super::GetDeploymentRequest>,
) -> Result<tonic::Response<super::Deployment>, 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.cloud.gsuiteaddons.v1.GSuiteAddOns/GetDeployment",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn list_deployments(
&mut self,
request: impl tonic::IntoRequest<super::ListDeploymentsRequest>,
) -> Result<tonic::Response<super::ListDeploymentsResponse>, 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.cloud.gsuiteaddons.v1.GSuiteAddOns/ListDeployments",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete_deployment(
&mut self,
request: impl tonic::IntoRequest<super::DeleteDeploymentRequest>,
) -> Result<tonic::Response<()>, 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.cloud.gsuiteaddons.v1.GSuiteAddOns/DeleteDeployment",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn install_deployment(
&mut self,
request: impl tonic::IntoRequest<super::InstallDeploymentRequest>,
) -> Result<tonic::Response<()>, 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.cloud.gsuiteaddons.v1.GSuiteAddOns/InstallDeployment",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn uninstall_deployment(
&mut self,
request: impl tonic::IntoRequest<super::UninstallDeploymentRequest>,
) -> Result<tonic::Response<()>, 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.cloud.gsuiteaddons.v1.GSuiteAddOns/UninstallDeployment",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_install_status(
&mut self,
request: impl tonic::IntoRequest<super::GetInstallStatusRequest>,
) -> Result<tonic::Response<super::InstallStatus>, 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.cloud.gsuiteaddons.v1.GSuiteAddOns/GetInstallStatus",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}