game_server_clusters.proto 10 KB

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