game_server_deployments.proto 11 KB

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