#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Cluster {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "11")]
pub fleet: ::core::option::Option<Fleet>,
#[prost(message, optional, tag = "7")]
pub networking: ::core::option::Option<ClusterNetworking>,
#[prost(message, optional, tag = "9")]
pub authorization: ::core::option::Option<Authorization>,
#[prost(int32, tag = "8")]
pub default_max_pods_per_node: i32,
#[prost(string, tag = "6")]
pub endpoint: ::prost::alloc::string::String,
#[prost(string, tag = "10")]
pub cluster_ca_certificate: ::prost::alloc::string::String,
#[prost(message, optional, tag = "12")]
pub maintenance_policy: ::core::option::Option<MaintenancePolicy>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterNetworking {
#[prost(string, repeated, tag = "1")]
pub cluster_ipv4_cidr_blocks: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(string, repeated, tag = "2")]
pub services_ipv4_cidr_blocks: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Fleet {
#[prost(string, tag = "1")]
pub project: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub membership: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterUser {
#[prost(string, tag = "1")]
pub username: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Authorization {
#[prost(message, optional, tag = "1")]
pub admin_users: ::core::option::Option<ClusterUser>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodePool {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, tag = "8")]
pub node_location: ::prost::alloc::string::String,
#[prost(int32, tag = "6")]
pub node_count: i32,
#[prost(string, tag = "7")]
pub machine_filter: ::prost::alloc::string::String,
#[prost(message, optional, tag = "9")]
pub local_disk_encryption: ::core::option::Option<node_pool::LocalDiskEncryption>,
}
pub mod node_pool {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocalDiskEncryption {
#[prost(string, tag = "1")]
pub kms_key: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub kms_key_active_version: ::prost::alloc::string::String,
#[prost(enumeration = "super::KmsKeyState", tag = "3")]
pub kms_key_state: i32,
#[prost(message, optional, tag = "4")]
pub kms_status: ::core::option::Option<super::super::super::super::rpc::Status>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Machine {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, tag = "5")]
pub hosted_node: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub zone: ::prost::alloc::string::String,
#[prost(bool, tag = "8")]
pub disabled: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VpnConnection {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, tag = "5")]
pub nat_gateway_ip: ::prost::alloc::string::String,
#[deprecated]
#[prost(enumeration = "vpn_connection::BgpRoutingMode", tag = "6")]
pub bgp_routing_mode: i32,
#[prost(string, tag = "7")]
pub cluster: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub vpc: ::prost::alloc::string::String,
#[prost(message, optional, tag = "11")]
pub vpc_project: ::core::option::Option<vpn_connection::VpcProject>,
#[prost(bool, tag = "9")]
pub enable_high_availability: bool,
#[prost(message, optional, tag = "10")]
pub details: ::core::option::Option<vpn_connection::Details>,
}
pub mod vpn_connection {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VpcProject {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub service_account: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Details {
#[prost(enumeration = "details::State", tag = "1")]
pub state: i32,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub cloud_router: ::core::option::Option<details::CloudRouter>,
#[prost(message, repeated, tag = "4")]
pub cloud_vpns: ::prost::alloc::vec::Vec<details::CloudVpn>,
}
pub mod details {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudRouter {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudVpn {
#[prost(string, tag = "1")]
pub gateway: ::prost::alloc::string::String,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Connected = 1,
Connecting = 2,
Error = 3,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Connected => "STATE_CONNECTED",
State::Connecting => "STATE_CONNECTING",
State::Error => "STATE_ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"STATE_CONNECTED" => Some(Self::Connected),
"STATE_CONNECTING" => Some(Self::Connecting),
"STATE_ERROR" => Some(Self::Error),
_ => None,
}
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum BgpRoutingMode {
Unspecified = 0,
Regional = 1,
Global = 2,
}
impl BgpRoutingMode {
pub fn as_str_name(&self) -> &'static str {
match self {
BgpRoutingMode::Unspecified => "BGP_ROUTING_MODE_UNSPECIFIED",
BgpRoutingMode::Regional => "REGIONAL",
BgpRoutingMode::Global => "GLOBAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BGP_ROUTING_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"REGIONAL" => Some(Self::Regional),
"GLOBAL" => Some(Self::Global),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocationMetadata {
#[prost(map = "string, message", tag = "1")]
pub available_zones: ::std::collections::HashMap<
::prost::alloc::string::String,
ZoneMetadata,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ZoneMetadata {
#[prost(message, repeated, tag = "1")]
pub quota: ::prost::alloc::vec::Vec<Quota>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Quota {
#[prost(string, tag = "1")]
pub metric: ::prost::alloc::string::String,
#[prost(double, tag = "2")]
pub limit: f64,
#[prost(double, tag = "3")]
pub usage: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenancePolicy {
#[prost(message, optional, tag = "1")]
pub window: ::core::option::Option<MaintenanceWindow>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenanceWindow {
#[prost(message, optional, tag = "1")]
pub recurring_window: ::core::option::Option<RecurringTimeWindow>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecurringTimeWindow {
#[prost(message, optional, tag = "1")]
pub window: ::core::option::Option<TimeWindow>,
#[prost(string, tag = "2")]
pub recurrence: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeWindow {
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum KmsKeyState {
Unspecified = 0,
KeyAvailable = 1,
KeyUnavailable = 2,
}
impl KmsKeyState {
pub fn as_str_name(&self) -> &'static str {
match self {
KmsKeyState::Unspecified => "KMS_KEY_STATE_UNSPECIFIED",
KmsKeyState::KeyAvailable => "KMS_KEY_STATE_KEY_AVAILABLE",
KmsKeyState::KeyUnavailable => "KMS_KEY_STATE_KEY_UNAVAILABLE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"KMS_KEY_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"KMS_KEY_STATE_KEY_AVAILABLE" => Some(Self::KeyAvailable),
"KMS_KEY_STATE_KEY_UNAVAILABLE" => Some(Self::KeyUnavailable),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "3")]
pub target: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub verb: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub status_message: ::prost::alloc::string::String,
#[prost(bool, tag = "6")]
pub requested_cancellation: bool,
#[prost(string, tag = "7")]
pub api_version: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClustersRequest {
#[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,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClustersResponse {
#[prost(message, repeated, tag = "1")]
pub clusters: ::prost::alloc::vec::Vec<Cluster>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetClusterRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateClusterRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub cluster: ::core::option::Option<Cluster>,
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterRequest {
#[prost(message, optional, tag = "1")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(message, optional, tag = "2")]
pub cluster: ::core::option::Option<Cluster>,
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateAccessTokenRequest {
#[prost(string, tag = "1")]
pub cluster: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateAccessTokenResponse {
#[prost(string, tag = "1")]
pub access_token: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNodePoolsRequest {
#[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,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNodePoolsResponse {
#[prost(message, repeated, tag = "1")]
pub node_pools: ::prost::alloc::vec::Vec<NodePool>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNodePoolRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateNodePoolRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub node_pool_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub node_pool: ::core::option::Option<NodePool>,
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateNodePoolRequest {
#[prost(message, optional, tag = "1")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(message, optional, tag = "2")]
pub node_pool: ::core::option::Option<NodePool>,
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteNodePoolRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMachinesRequest {
#[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,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMachinesResponse {
#[prost(message, repeated, tag = "1")]
pub machines: ::prost::alloc::vec::Vec<Machine>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMachineRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListVpnConnectionsRequest {
#[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,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListVpnConnectionsResponse {
#[prost(message, repeated, tag = "1")]
pub vpn_connections: ::prost::alloc::vec::Vec<VpnConnection>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVpnConnectionRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateVpnConnectionRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub vpn_connection_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub vpn_connection: ::core::option::Option<VpnConnection>,
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteVpnConnectionRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
pub mod edge_container_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 EdgeContainerClient<T> {
inner: tonic::client::Grpc<T>,
}
impl EdgeContainerClient<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> EdgeContainerClient<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,
) -> EdgeContainerClient<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,
{
EdgeContainerClient::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 list_clusters(
&mut self,
request: impl tonic::IntoRequest<super::ListClustersRequest>,
) -> Result<tonic::Response<super::ListClustersResponse>, 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.edgecontainer.v1.EdgeContainer/ListClusters",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_cluster(
&mut self,
request: impl tonic::IntoRequest<super::GetClusterRequest>,
) -> Result<tonic::Response<super::Cluster>, 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.edgecontainer.v1.EdgeContainer/GetCluster",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_cluster(
&mut self,
request: impl tonic::IntoRequest<super::CreateClusterRequest>,
) -> 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.cloud.edgecontainer.v1.EdgeContainer/CreateCluster",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn update_cluster(
&mut self,
request: impl tonic::IntoRequest<super::UpdateClusterRequest>,
) -> 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.cloud.edgecontainer.v1.EdgeContainer/UpdateCluster",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete_cluster(
&mut self,
request: impl tonic::IntoRequest<super::DeleteClusterRequest>,
) -> 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.cloud.edgecontainer.v1.EdgeContainer/DeleteCluster",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn generate_access_token(
&mut self,
request: impl tonic::IntoRequest<super::GenerateAccessTokenRequest>,
) -> Result<tonic::Response<super::GenerateAccessTokenResponse>, 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.edgecontainer.v1.EdgeContainer/GenerateAccessToken",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn list_node_pools(
&mut self,
request: impl tonic::IntoRequest<super::ListNodePoolsRequest>,
) -> Result<tonic::Response<super::ListNodePoolsResponse>, 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.edgecontainer.v1.EdgeContainer/ListNodePools",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_node_pool(
&mut self,
request: impl tonic::IntoRequest<super::GetNodePoolRequest>,
) -> Result<tonic::Response<super::NodePool>, 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.edgecontainer.v1.EdgeContainer/GetNodePool",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_node_pool(
&mut self,
request: impl tonic::IntoRequest<super::CreateNodePoolRequest>,
) -> 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.cloud.edgecontainer.v1.EdgeContainer/CreateNodePool",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn update_node_pool(
&mut self,
request: impl tonic::IntoRequest<super::UpdateNodePoolRequest>,
) -> 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.cloud.edgecontainer.v1.EdgeContainer/UpdateNodePool",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete_node_pool(
&mut self,
request: impl tonic::IntoRequest<super::DeleteNodePoolRequest>,
) -> 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.cloud.edgecontainer.v1.EdgeContainer/DeleteNodePool",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn list_machines(
&mut self,
request: impl tonic::IntoRequest<super::ListMachinesRequest>,
) -> Result<tonic::Response<super::ListMachinesResponse>, 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.edgecontainer.v1.EdgeContainer/ListMachines",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_machine(
&mut self,
request: impl tonic::IntoRequest<super::GetMachineRequest>,
) -> Result<tonic::Response<super::Machine>, 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.edgecontainer.v1.EdgeContainer/GetMachine",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn list_vpn_connections(
&mut self,
request: impl tonic::IntoRequest<super::ListVpnConnectionsRequest>,
) -> Result<tonic::Response<super::ListVpnConnectionsResponse>, 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.edgecontainer.v1.EdgeContainer/ListVpnConnections",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_vpn_connection(
&mut self,
request: impl tonic::IntoRequest<super::GetVpnConnectionRequest>,
) -> Result<tonic::Response<super::VpnConnection>, 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.edgecontainer.v1.EdgeContainer/GetVpnConnection",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_vpn_connection(
&mut self,
request: impl tonic::IntoRequest<super::CreateVpnConnectionRequest>,
) -> 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.cloud.edgecontainer.v1.EdgeContainer/CreateVpnConnection",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete_vpn_connection(
&mut self,
request: impl tonic::IntoRequest<super::DeleteVpnConnectionRequest>,
) -> 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.cloud.edgecontainer.v1.EdgeContainer/DeleteVpnConnection",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}