game_server_deployments.proto 11 KB

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