#[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>,
}
#[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,
}
}
#[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>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RealmSelector {
#[prost(string, repeated, tag = "1")]
pub realms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[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,
}
#[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,
}
#[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 {
#[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 {
#[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>,
}
#[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>,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetState {
#[prost(message, repeated, tag = "1")]
pub details: ::prost::alloc::vec::Vec<TargetDetails>,
}
#[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 {
#[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 {
#[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,
}
}
#[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,
}
}
#[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,
}
#[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>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGameServerClusterRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[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>,
}
#[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>,
}
#[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>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteGameServerClusterRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[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>,
}
#[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>,
}
#[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>,
}
#[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>,
}
#[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>,
}
#[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 {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ClusterReference {
#[prost(message, tag = "7")]
GkeClusterReference(super::GkeClusterReference),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GkeClusterReference {
#[prost(string, tag = "1")]
pub cluster: ::prost::alloc::string::String,
}
#[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,
}
#[doc = r" Generated client implementations."]
pub mod game_server_clusters_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " The game server cluster maps to Kubernetes clusters running Agones and is"]
#[doc = " used to manage fleets within clusters."]
#[derive(Debug, Clone)]
pub struct GameServerClustersServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> GameServerClustersServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> GameServerClustersServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
GameServerClustersServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Lists game server clusters in a given project and location."]
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.v1beta.GameServerClustersService/ListGameServerClusters",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets details of a single game server cluster."]
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.v1beta.GameServerClustersService/GetGameServerCluster",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a new game server cluster in a given project and location."]
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.v1beta.GameServerClustersService/CreateGameServerCluster",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Previews creation of a new game server cluster in a given project and"]
#[doc = " location."]
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.v1beta.GameServerClustersService/PreviewCreateGameServerCluster") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes a single game server cluster."]
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.v1beta.GameServerClustersService/DeleteGameServerCluster",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Previews deletion of a single game server cluster."]
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.v1beta.GameServerClustersService/PreviewDeleteGameServerCluster") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Patches a single game server cluster."]
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.v1beta.GameServerClustersService/UpdateGameServerCluster",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Previews updating a GameServerCluster."]
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.v1beta.GameServerClustersService/PreviewUpdateGameServerCluster") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[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,
}
#[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>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGameServerConfigRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[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>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteGameServerConfigRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[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>,
}
#[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,
}
#[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,
}
#[doc = r" Generated client implementations."]
pub mod game_server_configs_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " The game server config configures the game servers in an Agones fleet."]
#[derive(Debug, Clone)]
pub struct GameServerConfigsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> GameServerConfigsServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> GameServerConfigsServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
GameServerConfigsServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Lists game server configs in a given project, location, and game server"]
#[doc = " deployment."]
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.v1beta.GameServerConfigsService/ListGameServerConfigs",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets details of a single game server config."]
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.v1beta.GameServerConfigsService/GetGameServerConfig",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a new game server config in a given project, location, and game"]
#[doc = " server deployment. Game server configs are immutable, and are not applied"]
#[doc = " until referenced in the game server deployment rollout resource."]
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.v1beta.GameServerConfigsService/CreateGameServerConfig",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes a single game server config. The deletion will fail if the game"]
#[doc = " server config is referenced in a game server deployment rollout."]
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.v1beta.GameServerConfigsService/DeleteGameServerConfig",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[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,
}
#[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>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGameServerDeploymentRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGameServerDeploymentRolloutRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[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>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteGameServerDeploymentRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[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>,
}
#[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>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchDeploymentStateRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[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 {
#[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>,
}
}
#[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,
}
#[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 {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Selector {
#[prost(message, tag = "1")]
RealmsSelector(super::RealmSelector),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Change {
#[prost(string, tag = "100")]
ConfigVersion(::prost::alloc::string::String),
}
}
#[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,
}
#[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>,
}
#[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>,
}
#[doc = r" Generated client implementations."]
pub mod game_server_deployments_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " The game server deployment is used to control the deployment of Agones"]
#[doc = " fleets."]
#[derive(Debug, Clone)]
pub struct GameServerDeploymentsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> GameServerDeploymentsServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> GameServerDeploymentsServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
GameServerDeploymentsServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Lists game server deployments in a given project and location."]
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.v1beta.GameServerDeploymentsService/ListGameServerDeployments") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets details of a single game server deployment."]
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.v1beta.GameServerDeploymentsService/GetGameServerDeployment",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a new game server deployment in a given project and location."]
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.v1beta.GameServerDeploymentsService/CreateGameServerDeployment") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes a single game server deployment."]
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.v1beta.GameServerDeploymentsService/DeleteGameServerDeployment") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Patches a game server deployment."]
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.v1beta.GameServerDeploymentsService/UpdateGameServerDeployment") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets details a single game server deployment rollout."]
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.v1beta.GameServerDeploymentsService/GetGameServerDeploymentRollout") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Patches a single game server deployment rollout."]
#[doc = " The method will not return an error if the update does not affect any"]
#[doc = " existing realms. For example - if the default_game_server_config is changed"]
#[doc = " but all existing realms use the override, that is valid. Similarly, if a"]
#[doc = " non existing realm is explicitly called out in game_server_config_overrides"]
#[doc = " field, that will also not result in an error."]
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.v1beta.GameServerDeploymentsService/UpdateGameServerDeploymentRollout") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Previews the game server deployment rollout. This API does not mutate the"]
#[doc = " rollout resource."]
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.v1beta.GameServerDeploymentsService/PreviewGameServerDeploymentRollout") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Retrieves information about the current state of the game server"]
#[doc = " deployment. Gathers all the Agones fleets and Agones autoscalers,"]
#[doc = " including fleets running an older version of the game server deployment."]
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.v1beta.GameServerDeploymentsService/FetchDeploymentState",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[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,
}
#[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>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRealmRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[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>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRealmRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[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>,
}
#[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>,
}
#[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>,
}
#[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,
}
#[doc = r" Generated client implementations."]
pub mod realms_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " A realm is a grouping of game server clusters that are considered"]
#[doc = " interchangeable."]
#[derive(Debug, Clone)]
pub struct RealmsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> RealmsServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> RealmsServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
RealmsServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Lists realms in a given project and location."]
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.v1beta.RealmsService/ListRealms",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets details of a single realm."]
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.v1beta.RealmsService/GetRealm",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a new realm in a given project and location."]
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.v1beta.RealmsService/CreateRealm",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes a single realm."]
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.v1beta.RealmsService/DeleteRealm",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Patches a single realm."]
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.v1beta.RealmsService/UpdateRealm",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Previews patches to a single realm."]
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.v1beta.RealmsService/PreviewRealmUpdate",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}