#[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,
#[prost(string, repeated, tag = "8")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, message", tag = "9")]
pub operation_status: ::std::collections::HashMap<
::prost::alloc::string::String,
OperationStatus,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationStatus {
#[prost(bool, tag = "1")]
pub done: bool,
#[prost(enumeration = "operation_status::ErrorCode", tag = "2")]
pub error_code: i32,
#[prost(string, tag = "3")]
pub error_message: ::prost::alloc::string::String,
}
pub mod operation_status {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ErrorCode {
Unspecified = 0,
InternalError = 1,
PermissionDenied = 2,
ClusterConnection = 3,
}
impl ErrorCode {
pub fn as_str_name(&self) -> &'static str {
match self {
ErrorCode::Unspecified => "ERROR_CODE_UNSPECIFIED",
ErrorCode::InternalError => "INTERNAL_ERROR",
ErrorCode::PermissionDenied => "PERMISSION_DENIED",
ErrorCode::ClusterConnection => "CLUSTER_CONNECTION",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ERROR_CODE_UNSPECIFIED" => Some(Self::Unspecified),
"INTERNAL_ERROR" => Some(Self::InternalError),
"PERMISSION_DENIED" => Some(Self::PermissionDenied),
"CLUSTER_CONNECTION" => Some(Self::ClusterConnection),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LabelSelector {
#[prost(map = "string, string", tag = "1")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RealmSelector {
#[prost(string, repeated, tag = "1")]
pub realms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Schedule {
#[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>,
#[prost(message, optional, tag = "3")]
pub cron_job_duration: ::core::option::Option<::prost_types::Duration>,
#[prost(string, tag = "4")]
pub cron_spec: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpecSource {
#[prost(string, tag = "1")]
pub game_server_config_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetDetails {
#[prost(string, tag = "1")]
pub game_server_cluster_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub game_server_deployment_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub fleet_details: ::prost::alloc::vec::Vec<target_details::TargetFleetDetails>,
}
pub mod target_details {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetFleetDetails {
#[prost(message, optional, tag = "1")]
pub fleet: ::core::option::Option<target_fleet_details::TargetFleet>,
#[prost(message, optional, tag = "2")]
pub autoscaler: ::core::option::Option<
target_fleet_details::TargetFleetAutoscaler,
>,
}
pub mod target_fleet_details {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetFleet {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub spec_source: ::core::option::Option<super::super::SpecSource>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetFleetAutoscaler {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub spec_source: ::core::option::Option<super::super::SpecSource>,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetState {
#[prost(message, repeated, tag = "1")]
pub details: ::prost::alloc::vec::Vec<TargetDetails>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeployedFleetDetails {
#[prost(message, optional, tag = "1")]
pub deployed_fleet: ::core::option::Option<deployed_fleet_details::DeployedFleet>,
#[prost(message, optional, tag = "2")]
pub deployed_autoscaler: ::core::option::Option<
deployed_fleet_details::DeployedFleetAutoscaler,
>,
}
pub mod deployed_fleet_details {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeployedFleet {
#[prost(string, tag = "1")]
pub fleet: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub fleet_spec: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub spec_source: ::core::option::Option<super::SpecSource>,
#[prost(message, optional, tag = "5")]
pub status: ::core::option::Option<deployed_fleet::DeployedFleetStatus>,
}
pub mod deployed_fleet {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeployedFleetStatus {
#[prost(int64, tag = "1")]
pub ready_replicas: i64,
#[prost(int64, tag = "2")]
pub allocated_replicas: i64,
#[prost(int64, tag = "3")]
pub reserved_replicas: i64,
#[prost(int64, tag = "4")]
pub replicas: i64,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeployedFleetAutoscaler {
#[prost(string, tag = "1")]
pub autoscaler: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub spec_source: ::core::option::Option<super::SpecSource>,
#[prost(string, tag = "3")]
pub fleet_autoscaler_spec: ::prost::alloc::string::String,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListGameServerClustersRequest {
#[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,
#[prost(enumeration = "GameServerClusterView", tag = "6")]
pub view: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListGameServerClustersResponse {
#[prost(message, repeated, tag = "1")]
pub game_server_clusters: ::prost::alloc::vec::Vec<GameServerCluster>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "4")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGameServerClusterRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "GameServerClusterView", tag = "6")]
pub view: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateGameServerClusterRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub game_server_cluster_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub game_server_cluster: ::core::option::Option<GameServerCluster>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreviewCreateGameServerClusterRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub game_server_cluster_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub game_server_cluster: ::core::option::Option<GameServerCluster>,
#[prost(message, optional, tag = "4")]
pub preview_time: ::core::option::Option<::prost_types::Timestamp>,
#[deprecated]
#[prost(enumeration = "GameServerClusterView", tag = "6")]
pub view: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreviewCreateGameServerClusterResponse {
#[prost(string, tag = "2")]
pub etag: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub target_state: ::core::option::Option<TargetState>,
#[prost(message, optional, tag = "4")]
pub cluster_state: ::core::option::Option<KubernetesClusterState>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteGameServerClusterRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreviewDeleteGameServerClusterRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub preview_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreviewDeleteGameServerClusterResponse {
#[prost(string, tag = "2")]
pub etag: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub target_state: ::core::option::Option<TargetState>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateGameServerClusterRequest {
#[prost(message, optional, tag = "1")]
pub game_server_cluster: ::core::option::Option<GameServerCluster>,
#[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 PreviewUpdateGameServerClusterRequest {
#[prost(message, optional, tag = "1")]
pub game_server_cluster: ::core::option::Option<GameServerCluster>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(message, optional, tag = "3")]
pub preview_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreviewUpdateGameServerClusterResponse {
#[prost(string, tag = "2")]
pub etag: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub target_state: ::core::option::Option<TargetState>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GameServerClusterConnectionInfo {
#[prost(string, tag = "5")]
pub namespace: ::prost::alloc::string::String,
#[prost(oneof = "game_server_cluster_connection_info::ClusterReference", tags = "7")]
pub cluster_reference: ::core::option::Option<
game_server_cluster_connection_info::ClusterReference,
>,
}
pub mod game_server_cluster_connection_info {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ClusterReference {
#[prost(message, tag = "7")]
GkeClusterReference(super::GkeClusterReference),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GkeClusterReference {
#[prost(string, tag = "1")]
pub cluster: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GameServerCluster {
#[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 = "5")]
pub connection_info: ::core::option::Option<GameServerClusterConnectionInfo>,
#[prost(string, tag = "6")]
pub etag: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub description: ::prost::alloc::string::String,
#[prost(message, optional, tag = "11")]
pub cluster_state: ::core::option::Option<KubernetesClusterState>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KubernetesClusterState {
#[prost(string, tag = "1")]
pub agones_version_installed: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub kubernetes_version_installed: ::prost::alloc::string::String,
#[prost(enumeration = "kubernetes_cluster_state::InstallationState", tag = "3")]
pub installation_state: i32,
#[prost(string, tag = "4")]
pub version_installed_error_message: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub provider: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub agones_version_targeted: ::prost::alloc::string::String,
}
pub mod kubernetes_cluster_state {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum InstallationState {
Unspecified = 0,
AgonesKubernetesVersionSupported = 1,
AgonesVersionUnsupported = 2,
AgonesKubernetesVersionUnsupported = 3,
AgonesVersionUnrecognized = 4,
KubernetesVersionUnrecognized = 5,
VersionVerificationFailed = 6,
AgonesNotInstalled = 7,
}
impl InstallationState {
pub fn as_str_name(&self) -> &'static str {
match self {
InstallationState::Unspecified => "INSTALLATION_STATE_UNSPECIFIED",
InstallationState::AgonesKubernetesVersionSupported => {
"AGONES_KUBERNETES_VERSION_SUPPORTED"
}
InstallationState::AgonesVersionUnsupported => {
"AGONES_VERSION_UNSUPPORTED"
}
InstallationState::AgonesKubernetesVersionUnsupported => {
"AGONES_KUBERNETES_VERSION_UNSUPPORTED"
}
InstallationState::AgonesVersionUnrecognized => {
"AGONES_VERSION_UNRECOGNIZED"
}
InstallationState::KubernetesVersionUnrecognized => {
"KUBERNETES_VERSION_UNRECOGNIZED"
}
InstallationState::VersionVerificationFailed => {
"VERSION_VERIFICATION_FAILED"
}
InstallationState::AgonesNotInstalled => "AGONES_NOT_INSTALLED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INSTALLATION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"AGONES_KUBERNETES_VERSION_SUPPORTED" => {
Some(Self::AgonesKubernetesVersionSupported)
}
"AGONES_VERSION_UNSUPPORTED" => Some(Self::AgonesVersionUnsupported),
"AGONES_KUBERNETES_VERSION_UNSUPPORTED" => {
Some(Self::AgonesKubernetesVersionUnsupported)
}
"AGONES_VERSION_UNRECOGNIZED" => Some(Self::AgonesVersionUnrecognized),
"KUBERNETES_VERSION_UNRECOGNIZED" => {
Some(Self::KubernetesVersionUnrecognized)
}
"VERSION_VERIFICATION_FAILED" => Some(Self::VersionVerificationFailed),
"AGONES_NOT_INSTALLED" => Some(Self::AgonesNotInstalled),
_ => None,
}
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum GameServerClusterView {
Unspecified = 0,
Basic = 1,
Full = 2,
}
impl GameServerClusterView {
pub fn as_str_name(&self) -> &'static str {
match self {
GameServerClusterView::Unspecified => "GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED",
GameServerClusterView::Basic => "BASIC",
GameServerClusterView::Full => "FULL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED" => Some(Self::Unspecified),
"BASIC" => Some(Self::Basic),
"FULL" => Some(Self::Full),
_ => None,
}
}
}
pub mod game_server_clusters_service_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 GameServerClustersServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl GameServerClustersServiceClient<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> GameServerClustersServiceClient<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,
) -> GameServerClustersServiceClient<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,
{
GameServerClustersServiceClient::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_game_server_clusters(
&mut self,
request: impl tonic::IntoRequest<super::ListGameServerClustersRequest>,
) -> Result<
tonic::Response<super::ListGameServerClustersResponse>,
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.gaming.v1.GameServerClustersService/ListGameServerClusters",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_game_server_cluster(
&mut self,
request: impl tonic::IntoRequest<super::GetGameServerClusterRequest>,
) -> Result<tonic::Response<super::GameServerCluster>, 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.gaming.v1.GameServerClustersService/GetGameServerCluster",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_game_server_cluster(
&mut self,
request: impl tonic::IntoRequest<super::CreateGameServerClusterRequest>,
) -> 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.gaming.v1.GameServerClustersService/CreateGameServerCluster",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn preview_create_game_server_cluster(
&mut self,
request: impl tonic::IntoRequest<
super::PreviewCreateGameServerClusterRequest,
>,
) -> Result<
tonic::Response<super::PreviewCreateGameServerClusterResponse>,
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.gaming.v1.GameServerClustersService/PreviewCreateGameServerCluster",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete_game_server_cluster(
&mut self,
request: impl tonic::IntoRequest<super::DeleteGameServerClusterRequest>,
) -> 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.gaming.v1.GameServerClustersService/DeleteGameServerCluster",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn preview_delete_game_server_cluster(
&mut self,
request: impl tonic::IntoRequest<
super::PreviewDeleteGameServerClusterRequest,
>,
) -> Result<
tonic::Response<super::PreviewDeleteGameServerClusterResponse>,
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.gaming.v1.GameServerClustersService/PreviewDeleteGameServerCluster",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn update_game_server_cluster(
&mut self,
request: impl tonic::IntoRequest<super::UpdateGameServerClusterRequest>,
) -> 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.gaming.v1.GameServerClustersService/UpdateGameServerCluster",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn preview_update_game_server_cluster(
&mut self,
request: impl tonic::IntoRequest<
super::PreviewUpdateGameServerClusterRequest,
>,
) -> Result<
tonic::Response<super::PreviewUpdateGameServerClusterResponse>,
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.gaming.v1.GameServerClustersService/PreviewUpdateGameServerCluster",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListGameServerConfigsRequest {
#[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 ListGameServerConfigsResponse {
#[prost(message, repeated, tag = "1")]
pub game_server_configs: ::prost::alloc::vec::Vec<GameServerConfig>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "4")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGameServerConfigRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateGameServerConfigRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub config_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub game_server_config: ::core::option::Option<GameServerConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteGameServerConfigRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScalingConfig {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub fleet_autoscaler_spec: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub selectors: ::prost::alloc::vec::Vec<LabelSelector>,
#[prost(message, repeated, tag = "5")]
pub schedules: ::prost::alloc::vec::Vec<Schedule>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FleetConfig {
#[prost(string, tag = "1")]
pub fleet_spec: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GameServerConfig {
#[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, repeated, tag = "5")]
pub fleet_configs: ::prost::alloc::vec::Vec<FleetConfig>,
#[prost(message, repeated, tag = "6")]
pub scaling_configs: ::prost::alloc::vec::Vec<ScalingConfig>,
#[prost(string, tag = "7")]
pub description: ::prost::alloc::string::String,
}
pub mod game_server_configs_service_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 GameServerConfigsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl GameServerConfigsServiceClient<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> GameServerConfigsServiceClient<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,
) -> GameServerConfigsServiceClient<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,
{
GameServerConfigsServiceClient::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_game_server_configs(
&mut self,
request: impl tonic::IntoRequest<super::ListGameServerConfigsRequest>,
) -> Result<
tonic::Response<super::ListGameServerConfigsResponse>,
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.gaming.v1.GameServerConfigsService/ListGameServerConfigs",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_game_server_config(
&mut self,
request: impl tonic::IntoRequest<super::GetGameServerConfigRequest>,
) -> Result<tonic::Response<super::GameServerConfig>, 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.gaming.v1.GameServerConfigsService/GetGameServerConfig",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_game_server_config(
&mut self,
request: impl tonic::IntoRequest<super::CreateGameServerConfigRequest>,
) -> 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.gaming.v1.GameServerConfigsService/CreateGameServerConfig",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete_game_server_config(
&mut self,
request: impl tonic::IntoRequest<super::DeleteGameServerConfigRequest>,
) -> 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.gaming.v1.GameServerConfigsService/DeleteGameServerConfig",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListGameServerDeploymentsRequest {
#[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 ListGameServerDeploymentsResponse {
#[prost(message, repeated, tag = "1")]
pub game_server_deployments: ::prost::alloc::vec::Vec<GameServerDeployment>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "4")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGameServerDeploymentRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGameServerDeploymentRolloutRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateGameServerDeploymentRequest {
#[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 game_server_deployment: ::core::option::Option<GameServerDeployment>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteGameServerDeploymentRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateGameServerDeploymentRequest {
#[prost(message, optional, tag = "1")]
pub game_server_deployment: ::core::option::Option<GameServerDeployment>,
#[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 UpdateGameServerDeploymentRolloutRequest {
#[prost(message, optional, tag = "1")]
pub rollout: ::core::option::Option<GameServerDeploymentRollout>,
#[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 FetchDeploymentStateRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchDeploymentStateResponse {
#[prost(message, repeated, tag = "1")]
pub cluster_state: ::prost::alloc::vec::Vec<
fetch_deployment_state_response::DeployedClusterState,
>,
#[prost(string, repeated, tag = "2")]
pub unavailable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
pub mod fetch_deployment_state_response {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeployedClusterState {
#[prost(string, tag = "1")]
pub cluster: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub fleet_details: ::prost::alloc::vec::Vec<super::DeployedFleetDetails>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GameServerDeployment {
#[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 = "7")]
pub etag: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub description: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GameServerConfigOverride {
#[prost(oneof = "game_server_config_override::Selector", tags = "1")]
pub selector: ::core::option::Option<game_server_config_override::Selector>,
#[prost(oneof = "game_server_config_override::Change", tags = "100")]
pub change: ::core::option::Option<game_server_config_override::Change>,
}
pub mod game_server_config_override {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Selector {
#[prost(message, tag = "1")]
RealmsSelector(super::RealmSelector),
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Change {
#[prost(string, tag = "100")]
ConfigVersion(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GameServerDeploymentRollout {
#[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(string, tag = "4")]
pub default_game_server_config: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "5")]
pub game_server_config_overrides: ::prost::alloc::vec::Vec<GameServerConfigOverride>,
#[prost(string, tag = "6")]
pub etag: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreviewGameServerDeploymentRolloutRequest {
#[prost(message, optional, tag = "1")]
pub rollout: ::core::option::Option<GameServerDeploymentRollout>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(message, optional, tag = "3")]
pub preview_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreviewGameServerDeploymentRolloutResponse {
#[prost(string, repeated, tag = "2")]
pub unavailable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "3")]
pub etag: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub target_state: ::core::option::Option<TargetState>,
}
pub mod game_server_deployments_service_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 GameServerDeploymentsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl GameServerDeploymentsServiceClient<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> GameServerDeploymentsServiceClient<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,
) -> GameServerDeploymentsServiceClient<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,
{
GameServerDeploymentsServiceClient::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_game_server_deployments(
&mut self,
request: impl tonic::IntoRequest<super::ListGameServerDeploymentsRequest>,
) -> Result<
tonic::Response<super::ListGameServerDeploymentsResponse>,
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.gaming.v1.GameServerDeploymentsService/ListGameServerDeployments",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_game_server_deployment(
&mut self,
request: impl tonic::IntoRequest<super::GetGameServerDeploymentRequest>,
) -> Result<tonic::Response<super::GameServerDeployment>, 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.gaming.v1.GameServerDeploymentsService/GetGameServerDeployment",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_game_server_deployment(
&mut self,
request: impl tonic::IntoRequest<super::CreateGameServerDeploymentRequest>,
) -> 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.gaming.v1.GameServerDeploymentsService/CreateGameServerDeployment",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete_game_server_deployment(
&mut self,
request: impl tonic::IntoRequest<super::DeleteGameServerDeploymentRequest>,
) -> 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.gaming.v1.GameServerDeploymentsService/DeleteGameServerDeployment",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn update_game_server_deployment(
&mut self,
request: impl tonic::IntoRequest<super::UpdateGameServerDeploymentRequest>,
) -> 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.gaming.v1.GameServerDeploymentsService/UpdateGameServerDeployment",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_game_server_deployment_rollout(
&mut self,
request: impl tonic::IntoRequest<
super::GetGameServerDeploymentRolloutRequest,
>,
) -> Result<tonic::Response<super::GameServerDeploymentRollout>, 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.gaming.v1.GameServerDeploymentsService/GetGameServerDeploymentRollout",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn update_game_server_deployment_rollout(
&mut self,
request: impl tonic::IntoRequest<
super::UpdateGameServerDeploymentRolloutRequest,
>,
) -> 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.gaming.v1.GameServerDeploymentsService/UpdateGameServerDeploymentRollout",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn preview_game_server_deployment_rollout(
&mut self,
request: impl tonic::IntoRequest<
super::PreviewGameServerDeploymentRolloutRequest,
>,
) -> Result<
tonic::Response<super::PreviewGameServerDeploymentRolloutResponse>,
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.gaming.v1.GameServerDeploymentsService/PreviewGameServerDeploymentRollout",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn fetch_deployment_state(
&mut self,
request: impl tonic::IntoRequest<super::FetchDeploymentStateRequest>,
) -> Result<
tonic::Response<super::FetchDeploymentStateResponse>,
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.gaming.v1.GameServerDeploymentsService/FetchDeploymentState",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRealmsRequest {
#[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 ListRealmsResponse {
#[prost(message, repeated, tag = "1")]
pub realms: ::prost::alloc::vec::Vec<Realm>,
#[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 GetRealmRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateRealmRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub realm_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub realm: ::core::option::Option<Realm>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRealmRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateRealmRequest {
#[prost(message, optional, tag = "1")]
pub realm: ::core::option::Option<Realm>,
#[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 PreviewRealmUpdateRequest {
#[prost(message, optional, tag = "1")]
pub realm: ::core::option::Option<Realm>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(message, optional, tag = "3")]
pub preview_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreviewRealmUpdateResponse {
#[prost(string, tag = "2")]
pub etag: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub target_state: ::core::option::Option<TargetState>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Realm {
#[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 = "6")]
pub time_zone: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub etag: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub description: ::prost::alloc::string::String,
}
pub mod realms_service_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 RealmsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl RealmsServiceClient<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> RealmsServiceClient<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,
) -> RealmsServiceClient<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,
{
RealmsServiceClient::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_realms(
&mut self,
request: impl tonic::IntoRequest<super::ListRealmsRequest>,
) -> Result<tonic::Response<super::ListRealmsResponse>, 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.gaming.v1.RealmsService/ListRealms",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_realm(
&mut self,
request: impl tonic::IntoRequest<super::GetRealmRequest>,
) -> Result<tonic::Response<super::Realm>, 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.gaming.v1.RealmsService/GetRealm",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_realm(
&mut self,
request: impl tonic::IntoRequest<super::CreateRealmRequest>,
) -> 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.gaming.v1.RealmsService/CreateRealm",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete_realm(
&mut self,
request: impl tonic::IntoRequest<super::DeleteRealmRequest>,
) -> 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.gaming.v1.RealmsService/DeleteRealm",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn update_realm(
&mut self,
request: impl tonic::IntoRequest<super::UpdateRealmRequest>,
) -> 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.gaming.v1.RealmsService/UpdateRealm",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn preview_realm_update(
&mut self,
request: impl tonic::IntoRequest<super::PreviewRealmUpdateRequest>,
) -> Result<tonic::Response<super::PreviewRealmUpdateResponse>, 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.gaming.v1.RealmsService/PreviewRealmUpdate",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}