#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSupportAccountRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSupportAccountsRequest {
#[prost(string, tag = "1")]
pub filter: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[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 ListSupportAccountsResponse {
#[prost(message, repeated, tag = "1")]
pub accounts: ::prost::alloc::vec::Vec<super::common::SupportAccount>,
#[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 GetCaseRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCasesRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
#[prost(int64, tag = "3")]
pub page_size: i64,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCasesResponse {
#[prost(message, repeated, tag = "1")]
pub cases: ::prost::alloc::vec::Vec<super::common::Case>,
#[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 ListCommentsRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCommentsResponse {
#[prost(message, repeated, tag = "1")]
pub comments: ::prost::alloc::vec::Vec<super::common::Comment>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCaseRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub case: ::core::option::Option<super::common::Case>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCaseRequest {
#[prost(message, optional, tag = "1")]
pub case: ::core::option::Option<super::common::Case>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCommentRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub comment: ::core::option::Option<super::common::Comment>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIssueTaxonomyRequest {}
pub mod cloud_support_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 CloudSupportClient<T> {
inner: tonic::client::Grpc<T>,
}
impl CloudSupportClient<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> CloudSupportClient<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,
) -> CloudSupportClient<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,
{
CloudSupportClient::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_support_account(
&mut self,
request: impl tonic::IntoRequest<super::GetSupportAccountRequest>,
) -> Result<
tonic::Response<super::super::common::SupportAccount>,
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.support.v1alpha1.CloudSupport/GetSupportAccount",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn list_support_accounts(
&mut self,
request: impl tonic::IntoRequest<super::ListSupportAccountsRequest>,
) -> Result<tonic::Response<super::ListSupportAccountsResponse>, 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.support.v1alpha1.CloudSupport/ListSupportAccounts",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_case(
&mut self,
request: impl tonic::IntoRequest<super::GetCaseRequest>,
) -> Result<tonic::Response<super::super::common::Case>, 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.support.v1alpha1.CloudSupport/GetCase",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn list_cases(
&mut self,
request: impl tonic::IntoRequest<super::ListCasesRequest>,
) -> Result<tonic::Response<super::ListCasesResponse>, 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.support.v1alpha1.CloudSupport/ListCases",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn list_comments(
&mut self,
request: impl tonic::IntoRequest<super::ListCommentsRequest>,
) -> Result<tonic::Response<super::ListCommentsResponse>, 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.support.v1alpha1.CloudSupport/ListComments",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_case(
&mut self,
request: impl tonic::IntoRequest<super::CreateCaseRequest>,
) -> Result<tonic::Response<super::super::common::Case>, 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.support.v1alpha1.CloudSupport/CreateCase",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn update_case(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCaseRequest>,
) -> Result<tonic::Response<super::super::common::Case>, 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.support.v1alpha1.CloudSupport/UpdateCase",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_comment(
&mut self,
request: impl tonic::IntoRequest<super::CreateCommentRequest>,
) -> Result<tonic::Response<super::super::common::Comment>, 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.support.v1alpha1.CloudSupport/CreateComment",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_issue_taxonomy(
&mut self,
request: impl tonic::IntoRequest<super::GetIssueTaxonomyRequest>,
) -> Result<
tonic::Response<super::super::common::IssueTaxonomy>,
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.support.v1alpha1.CloudSupport/GetIssueTaxonomy",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}