game_server_deployments.proto 11 KB

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