game_server_configs.proto 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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/timestamp.proto";
  20. import "google/api/annotations.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 GameServerConfigsService.ListGameServerConfigs.
  25. message ListGameServerConfigsRequest {
  26. // Required. The parent resource name. Uses the form:
  27. //
  28. // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`.
  29. string parent = 1 [
  30. (google.api.field_behavior) = REQUIRED,
  31. (google.api.resource_reference) = {
  32. child_type: "gameservices.googleapis.com/GameServerConfig"
  33. }
  34. ];
  35. // Optional. The maximum number of items to return. If unspecified, server
  36. // will pick an appropriate default. Server may return fewer items than
  37. // requested. A caller should only rely on response's
  38. // [next_page_token][google.cloud.gaming.v1.ListGameServerConfigsResponse.next_page_token] to
  39. // determine if there are more GameServerConfigs 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 GameServerConfigsService.ListGameServerConfigs.
  50. message ListGameServerConfigsResponse {
  51. // The list of game server configs.
  52. repeated GameServerConfig game_server_configs = 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 GameServerConfigsService.GetGameServerConfig.
  60. message GetGameServerConfigRequest {
  61. // Required. The name of the game server config to retrieve. Uses the form:
  62. //
  63. // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
  64. string name = 1 [
  65. (google.api.field_behavior) = REQUIRED,
  66. (google.api.resource_reference) = {
  67. type: "gameservices.googleapis.com/GameServerConfig"
  68. }
  69. ];
  70. }
  71. // Request message for GameServerConfigsService.CreateGameServerConfig.
  72. message CreateGameServerConfigRequest {
  73. // Required. The parent resource name. Uses the form:
  74. //
  75. // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`.
  76. string parent = 1 [
  77. (google.api.field_behavior) = REQUIRED,
  78. (google.api.resource_reference) = {
  79. child_type: "gameservices.googleapis.com/GameServerConfig"
  80. }
  81. ];
  82. // Required. The ID of the game server config resource to be created.
  83. string config_id = 2 [(google.api.field_behavior) = REQUIRED];
  84. // Required. The game server config resource to be created.
  85. GameServerConfig game_server_config = 3 [(google.api.field_behavior) = REQUIRED];
  86. }
  87. // Request message for GameServerConfigsService.DeleteGameServerConfig.
  88. message DeleteGameServerConfigRequest {
  89. // Required. The name of the game server config to delete. Uses the form:
  90. //
  91. // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
  92. string name = 1 [
  93. (google.api.field_behavior) = REQUIRED,
  94. (google.api.resource_reference) = {
  95. type: "gameservices.googleapis.com/GameServerConfig"
  96. }
  97. ];
  98. }
  99. // Autoscaling config for an Agones fleet.
  100. message ScalingConfig {
  101. // Required. The name of the Scaling Config
  102. string name = 1 [(google.api.field_behavior) = REQUIRED];
  103. // Required. Agones fleet autoscaler spec. Example spec:
  104. // https://agones.dev/site/docs/reference/fleetautoscaler/
  105. string fleet_autoscaler_spec = 2 [(google.api.field_behavior) = REQUIRED];
  106. // Labels used to identify the game server clusters to which this Agones
  107. // scaling config applies. A game server cluster is subject to this Agones
  108. // scaling config if its labels match any of the selector entries.
  109. repeated LabelSelector selectors = 4;
  110. // The schedules to which this Scaling Config applies.
  111. repeated Schedule schedules = 5;
  112. }
  113. // Fleet configs for Agones.
  114. message FleetConfig {
  115. // Agones fleet spec. Example spec:
  116. // `https://agones.dev/site/docs/reference/fleet/`.
  117. string fleet_spec = 1;
  118. // The name of the FleetConfig.
  119. string name = 2;
  120. }
  121. // A game server config resource.
  122. message GameServerConfig {
  123. option (google.api.resource) = {
  124. type: "gameservices.googleapis.com/GameServerConfig"
  125. pattern: "projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}"
  126. };
  127. // The resource name of the game server config. Uses the form:
  128. //
  129. // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
  130. // For example,
  131. //
  132. // `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`.
  133. string name = 1;
  134. // Output only. The creation time.
  135. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  136. // Output only. The last-modified time.
  137. google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  138. // The labels associated with this game server config. Each label is a
  139. // key-value pair.
  140. map<string, string> labels = 4;
  141. // FleetConfig contains a list of Agones fleet specs. Only one FleetConfig
  142. // is allowed.
  143. repeated FleetConfig fleet_configs = 5;
  144. // The autoscaling settings.
  145. repeated ScalingConfig scaling_configs = 6;
  146. // The description of the game server config.
  147. string description = 7;
  148. }