game_server_deployments.proto 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. // Copyright 2021 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. option go_package = "google.golang.org/genproto/googleapis/cloud/gaming/v1;gaming";
  22. option java_multiple_files = true;
  23. option java_package = "com.google.cloud.gaming.v1";
  24. // Request message for GameServerDeploymentsService.ListGameServerDeployments.
  25. message ListGameServerDeploymentsRequest {
  26. // Required. The parent resource name, in the following form:
  27. // `projects/{project}/locations/{location}`.
  28. string parent = 1 [
  29. (google.api.field_behavior) = REQUIRED,
  30. (google.api.resource_reference) = {
  31. child_type: "gameservices.googleapis.com/GameServerDeployment"
  32. }
  33. ];
  34. // Optional. The maximum number of items to return. If unspecified, the server
  35. // will pick an appropriate default. The server may return fewer items than
  36. // requested. A caller should only rely on response's
  37. // [next_page_token][google.cloud.gaming.v1.ListGameServerDeploymentsResponse.next_page_token] to
  38. // determine if there are more GameServerDeployments left to be queried.
  39. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  40. // Optional. The next_page_token value returned from a previous List request,
  41. // 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 GameServerDeploymentsService.ListGameServerDeployments.
  50. message ListGameServerDeploymentsResponse {
  51. // The list of game server deployments.
  52. repeated GameServerDeployment game_server_deployments = 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 GameServerDeploymentsService.GetGameServerDeployment.
  60. message GetGameServerDeploymentRequest {
  61. // Required. The name of the game server delpoyment to retrieve, in the following form:
  62. // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
  63. string name = 1 [
  64. (google.api.field_behavior) = REQUIRED,
  65. (google.api.resource_reference) = {
  66. type: "gameservices.googleapis.com/GameServerDeployment"
  67. }
  68. ];
  69. }
  70. // Request message for
  71. // GameServerDeploymentsService.GetGameServerDeploymentRollout.
  72. message GetGameServerDeploymentRolloutRequest {
  73. // Required. The name of the game server delpoyment to retrieve, in the following form:
  74. // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`.
  75. string name = 1 [
  76. (google.api.field_behavior) = REQUIRED,
  77. (google.api.resource_reference) = {
  78. type: "gameservices.googleapis.com/GameServerDeployment"
  79. }
  80. ];
  81. }
  82. // Request message for GameServerDeploymentsService.CreateGameServerDeployment.
  83. message CreateGameServerDeploymentRequest {
  84. // Required. The parent resource name, in the following form:
  85. // `projects/{project}/locations/{location}`.
  86. string parent = 1 [
  87. (google.api.field_behavior) = REQUIRED,
  88. (google.api.resource_reference) = {
  89. child_type: "gameservices.googleapis.com/GameServerDeployment"
  90. }
  91. ];
  92. // Required. The ID of the game server delpoyment resource to be created.
  93. string deployment_id = 2 [(google.api.field_behavior) = REQUIRED];
  94. // Required. The game server delpoyment resource to be created.
  95. GameServerDeployment game_server_deployment = 3 [(google.api.field_behavior) = REQUIRED];
  96. }
  97. // Request message for GameServerDeploymentsService.DeleteGameServerDeployment.
  98. message DeleteGameServerDeploymentRequest {
  99. // Required. The name of the game server delpoyment to delete, in the following form:
  100. // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
  101. string name = 1 [
  102. (google.api.field_behavior) = REQUIRED,
  103. (google.api.resource_reference) = {
  104. type: "gameservices.googleapis.com/GameServerDeployment"
  105. }
  106. ];
  107. }
  108. // Request message for GameServerDeploymentsService.UpdateGameServerDeployment.
  109. // Only allows updates for labels.
  110. message UpdateGameServerDeploymentRequest {
  111. // Required. The game server delpoyment to be updated.
  112. // Only fields specified in update_mask are updated.
  113. GameServerDeployment game_server_deployment = 1 [(google.api.field_behavior) = REQUIRED];
  114. // Required. Mask of fields to update. At least one path must be supplied in
  115. // this field. For the `FieldMask` definition, see
  116. // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  117. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  118. }
  119. // Request message for
  120. // GameServerDeploymentsService.UpdateGameServerRolloutDeployment.
  121. message UpdateGameServerDeploymentRolloutRequest {
  122. // Required. The game server delpoyment rollout to be updated.
  123. // Only fields specified in update_mask are updated.
  124. GameServerDeploymentRollout rollout = 1 [(google.api.field_behavior) = REQUIRED];
  125. // Required. Mask of fields to update. At least one path must be supplied in
  126. // this field. For the `FieldMask` definition, see
  127. // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  128. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  129. }
  130. // Request message for GameServerDeploymentsService.FetchDeploymentState.
  131. message FetchDeploymentStateRequest {
  132. // Required. The name of the game server delpoyment, in the following form:
  133. // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
  134. string name = 1 [(google.api.field_behavior) = REQUIRED];
  135. }
  136. // Response message for GameServerDeploymentsService.FetchDeploymentState.
  137. message FetchDeploymentStateResponse {
  138. // The game server cluster changes made by the game server deployment.
  139. message DeployedClusterState {
  140. // The name of the cluster.
  141. string cluster = 1;
  142. // The details about the Agones fleets and autoscalers created in the
  143. // game server cluster.
  144. repeated DeployedFleetDetails fleet_details = 2;
  145. }
  146. // The state of the game server deployment in each game server cluster.
  147. repeated DeployedClusterState cluster_state = 1;
  148. // List of locations that could not be reached.
  149. repeated string unavailable = 2;
  150. }
  151. // A game server deployment resource.
  152. message GameServerDeployment {
  153. option (google.api.resource) = {
  154. type: "gameservices.googleapis.com/GameServerDeployment"
  155. pattern: "projects/{project}/locations/{location}/gameServerDeployments/{deployment}"
  156. };
  157. // The resource name of the game server deployment, in the following form:
  158. // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
  159. // For example,
  160. // `projects/my-project/locations/global/gameServerDeployments/my-deployment`.
  161. string name = 1;
  162. // Output only. The creation time.
  163. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  164. // Output only. The last-modified time.
  165. google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  166. // The labels associated with this game server deployment. Each label is a
  167. // key-value pair.
  168. map<string, string> labels = 4;
  169. // ETag of the resource.
  170. string etag = 7;
  171. // Human readable description of the game server delpoyment.
  172. string description = 8;
  173. }
  174. // A game server config override.
  175. message GameServerConfigOverride {
  176. // Selector chooses the game server config targets.
  177. oneof selector {
  178. // Selector for choosing applicable realms.
  179. RealmSelector realms_selector = 1;
  180. }
  181. // Selects the game server config and how it should be applied.
  182. oneof change {
  183. // The game server config for this override.
  184. string config_version = 100;
  185. }
  186. }
  187. // The game server deployment rollout which represents the desired rollout
  188. // state.
  189. message GameServerDeploymentRollout {
  190. option (google.api.resource) = {
  191. type: "gameservices.googleapis.com/GameServerDeploymentRollout"
  192. pattern: "projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout"
  193. };
  194. // The resource name of the game server deployment rollout, in the following
  195. // form:
  196. // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`.
  197. // For example,
  198. // `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`.
  199. string name = 1;
  200. // Output only. The creation time.
  201. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  202. // Output only. The last-modified time.
  203. google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  204. // The default game server config is applied to all realms unless overridden
  205. // in the rollout. For example,
  206. // `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`.
  207. string default_game_server_config = 4;
  208. // Contains the game server config rollout overrides. Overrides are processed
  209. // in the order they are listed. Once a match is found for a realm, the rest
  210. // of the list is not processed.
  211. repeated GameServerConfigOverride game_server_config_overrides = 5;
  212. // ETag of the resource.
  213. string etag = 6;
  214. }
  215. // Request message for PreviewGameServerDeploymentRollout.
  216. message PreviewGameServerDeploymentRolloutRequest {
  217. // Required. The game server deployment rollout to be updated.
  218. // Only fields specified in update_mask are updated.
  219. GameServerDeploymentRollout rollout = 1 [(google.api.field_behavior) = REQUIRED];
  220. // Optional. Mask of fields to update. At least one path must be supplied in
  221. // this field. For the `FieldMask` definition, see
  222. // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  223. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL];
  224. // Optional. The target timestamp to compute the preview. Defaults to the immediately
  225. // after the proposed rollout completes.
  226. google.protobuf.Timestamp preview_time = 3 [(google.api.field_behavior) = OPTIONAL];
  227. }
  228. // Response message for PreviewGameServerDeploymentRollout.
  229. // This has details about the Agones fleet and autoscaler to be actuated.
  230. message PreviewGameServerDeploymentRolloutResponse {
  231. // Locations that could not be reached on this request.
  232. repeated string unavailable = 2;
  233. // ETag of the game server deployment.
  234. string etag = 3;
  235. // The target state.
  236. TargetState target_state = 4;
  237. }