game_server_clusters.proto 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. // Copyright 2020 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.gaming.v1beta;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/cloud/gaming/v1beta/common.proto";
  19. import "google/protobuf/field_mask.proto";
  20. import "google/protobuf/timestamp.proto";
  21. option go_package = "google.golang.org/genproto/googleapis/cloud/gaming/v1beta;gaming";
  22. option java_multiple_files = true;
  23. option java_package = "com.google.cloud.gaming.v1beta";
  24. option php_namespace = "Google\\Cloud\\Gaming\\V1beta";
  25. // Request message for GameServerClustersService.ListGameServerClusters.
  26. message ListGameServerClustersRequest {
  27. // Required. The parent resource name. Uses the form:
  28. // "projects/{project}/locations/{location}/realms/{realm}".
  29. string parent = 1 [
  30. (google.api.field_behavior) = REQUIRED,
  31. (google.api.resource_reference) = {
  32. child_type: "gameservices.googleapis.com/GameServerCluster"
  33. }
  34. ];
  35. // Optional. The maximum number of items to return. If unspecified, the
  36. // server will pick an appropriate default. The server may return fewer items
  37. // than requested. A caller should only rely on response's
  38. // [next_page_token][google.cloud.gaming.v1beta.ListGameServerClustersResponse.next_page_token]
  39. // to determine if there are more GameServerClusters left to be queried.
  40. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  41. // Optional. The next_page_token value returned from a previous List request,
  42. // if any.
  43. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  44. // Optional. The filter to apply to list results.
  45. string filter = 4 [(google.api.field_behavior) = OPTIONAL];
  46. // Optional. Specifies the ordering of results following syntax at
  47. // https://cloud.google.com/apis/design/design_patterns#sorting_order.
  48. string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
  49. }
  50. // Response message for GameServerClustersService.ListGameServerClusters.
  51. message ListGameServerClustersResponse {
  52. // The list of game server clusters.
  53. repeated GameServerCluster game_server_clusters = 1;
  54. // Token to retrieve the next page of results, or empty if there are no more
  55. // results in the list.
  56. string next_page_token = 2;
  57. // List of locations that could not be reached.
  58. repeated string unreachable = 4;
  59. }
  60. // Request message for GameServerClustersService.GetGameServerCluster.
  61. message GetGameServerClusterRequest {
  62. // Required. The name of the game server cluster to retrieve. Uses the form:
  63. //
  64. // `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`.
  65. string name = 1 [
  66. (google.api.field_behavior) = REQUIRED,
  67. (google.api.resource_reference) = {
  68. type: "gameservices.googleapis.com/GameServerCluster"
  69. }
  70. ];
  71. }
  72. // Request message for GameServerClustersService.CreateGameServerCluster.
  73. message CreateGameServerClusterRequest {
  74. // Required. The parent resource name. Uses the form:
  75. // `projects/{project}/locations/{location}/realms/{realm-id}`.
  76. string parent = 1 [
  77. (google.api.field_behavior) = REQUIRED,
  78. (google.api.resource_reference) = {
  79. child_type: "gameservices.googleapis.com/GameServerCluster"
  80. }
  81. ];
  82. // Required. The ID of the game server cluster resource to be created.
  83. string game_server_cluster_id = 2 [(google.api.field_behavior) = REQUIRED];
  84. // Required. The game server cluster resource to be created.
  85. GameServerCluster game_server_cluster = 3
  86. [(google.api.field_behavior) = REQUIRED];
  87. }
  88. // Request message for GameServerClustersService.PreviewCreateGameServerCluster.
  89. message PreviewCreateGameServerClusterRequest {
  90. // Required. The parent resource name. Uses the form:
  91. // `projects/{project}/locations/{location}/realms/{realm}`.
  92. string parent = 1 [
  93. (google.api.field_behavior) = REQUIRED,
  94. (google.api.resource_reference) = {
  95. child_type: "gameservices.googleapis.com/GameServerCluster"
  96. }
  97. ];
  98. // Required. The ID of the game server cluster resource to be created.
  99. string game_server_cluster_id = 2 [(google.api.field_behavior) = REQUIRED];
  100. // Required. The game server cluster resource to be created.
  101. GameServerCluster game_server_cluster = 3
  102. [(google.api.field_behavior) = REQUIRED];
  103. // Optional. The target timestamp to compute the preview.
  104. google.protobuf.Timestamp preview_time = 4
  105. [(google.api.field_behavior) = OPTIONAL];
  106. }
  107. // Response message for
  108. // GameServerClustersService.PreviewCreateGameServerCluster.
  109. message PreviewCreateGameServerClusterResponse {
  110. // The ETag of the game server cluster.
  111. string etag = 2;
  112. // The target state.
  113. TargetState target_state = 3;
  114. }
  115. // Request message for GameServerClustersService.DeleteGameServerCluster.
  116. message DeleteGameServerClusterRequest {
  117. // Required. The name of the game server cluster to delete. Uses the form:
  118. // `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
  119. string name = 1 [
  120. (google.api.field_behavior) = REQUIRED,
  121. (google.api.resource_reference) = {
  122. type: "gameservices.googleapis.com/GameServerCluster"
  123. }
  124. ];
  125. }
  126. // Request message for GameServerClustersService.PreviewDeleteGameServerCluster.
  127. message PreviewDeleteGameServerClusterRequest {
  128. // Required. The name of the game server cluster to delete. Uses the form:
  129. // `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
  130. string name = 1 [
  131. (google.api.field_behavior) = REQUIRED,
  132. (google.api.resource_reference) = {
  133. type: "gameservices.googleapis.com/GameServerCluster"
  134. }
  135. ];
  136. // Optional. The target timestamp to compute the preview.
  137. google.protobuf.Timestamp preview_time = 2
  138. [(google.api.field_behavior) = OPTIONAL];
  139. }
  140. // Response message for
  141. // GameServerClustersService.PreviewDeleteGameServerCluster.
  142. message PreviewDeleteGameServerClusterResponse {
  143. // The ETag of the game server cluster.
  144. string etag = 2;
  145. // The target state.
  146. TargetState target_state = 3;
  147. }
  148. // Request message for GameServerClustersService.UpdateGameServerCluster.
  149. message UpdateGameServerClusterRequest {
  150. // Required. The game server cluster to be updated.
  151. // Only fields specified in update_mask are updated.
  152. GameServerCluster game_server_cluster = 1
  153. [(google.api.field_behavior) = REQUIRED];
  154. // Required. Mask of fields to update. At least one path must be supplied in
  155. // this field. For the `FieldMask` definition, see
  156. //
  157. // https:
  158. // //developers.google.com/protocol-buffers
  159. // // /docs/reference/google.protobuf#fieldmask
  160. google.protobuf.FieldMask update_mask = 2
  161. [(google.api.field_behavior) = REQUIRED];
  162. }
  163. // Request message for GameServerClustersService.UpdateGameServerCluster.
  164. message PreviewUpdateGameServerClusterRequest {
  165. // Required. The game server cluster to be updated.
  166. // Only fields specified in update_mask are updated.
  167. GameServerCluster game_server_cluster = 1
  168. [(google.api.field_behavior) = REQUIRED];
  169. // Required. Mask of fields to update. At least one path must be supplied in
  170. // this field. For the `FieldMask` definition, see
  171. //
  172. // https:
  173. // //developers.google.com/protocol-buffers
  174. // // /docs/reference/google.protobuf#fieldmask
  175. google.protobuf.FieldMask update_mask = 2
  176. [(google.api.field_behavior) = REQUIRED];
  177. // Optional. The target timestamp to compute the preview.
  178. google.protobuf.Timestamp preview_time = 3
  179. [(google.api.field_behavior) = OPTIONAL];
  180. }
  181. // Response message for GameServerClustersService.PreviewUpdateGameServerCluster
  182. message PreviewUpdateGameServerClusterResponse {
  183. // The ETag of the game server cluster.
  184. string etag = 2;
  185. // The target state.
  186. TargetState target_state = 3;
  187. }
  188. // The game server cluster connection information.
  189. message GameServerClusterConnectionInfo {
  190. // The location of the Kubernetes cluster.
  191. oneof cluster_reference {
  192. // Reference to the GKE cluster where the game servers are installed.
  193. GkeClusterReference gke_cluster_reference = 7;
  194. }
  195. // Namespace designated on the game server cluster where the Agones game
  196. // server instances will be created. Existence of the namespace will be
  197. // validated during creation.
  198. string namespace = 5;
  199. }
  200. // A reference to a GKE cluster.
  201. message GkeClusterReference {
  202. // The full or partial name of a GKE cluster, using one of the following
  203. // forms:
  204. // * `projects/{project}/locations/{location}/clusters/{cluster}`
  205. // * `locations/{location}/clusters/{cluster}`
  206. // * `{cluster}`
  207. // If project and location are not specified, the project and location of the
  208. // GameServerCluster resource are used to generate the full name of the
  209. // GKE cluster.
  210. string cluster = 1;
  211. }
  212. // A game server cluster resource.
  213. message GameServerCluster {
  214. option (google.api.resource) = {
  215. type: "gameservices.googleapis.com/GameServerCluster"
  216. pattern: "projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}"
  217. };
  218. // Required. The resource name of the game server cluster. Uses the form:
  219. //
  220. // `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`.
  221. // For example,
  222. //
  223. // `projects/my-project/locations/{location}/realms/zanzibar/gameServerClusters/my-onprem-cluster`.
  224. string name = 1 [(google.api.field_behavior) = REQUIRED];
  225. // Output only. The creation time.
  226. google.protobuf.Timestamp create_time = 2
  227. [(google.api.field_behavior) = OUTPUT_ONLY];
  228. // Output only. The last-modified time.
  229. google.protobuf.Timestamp update_time = 3
  230. [(google.api.field_behavior) = OUTPUT_ONLY];
  231. // The labels associated with this game server cluster. Each label is a
  232. // key-value pair.
  233. map<string, string> labels = 4;
  234. // The game server cluster connection information. This information is used to
  235. // manage game server clusters.
  236. GameServerClusterConnectionInfo connection_info = 5;
  237. // ETag of the resource.
  238. string etag = 6;
  239. // Human readable description of the cluster.
  240. string description = 7;
  241. }