game_server_configs.proto 6.6 KB

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