game_server_clusters.proto 10 KB

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