game_server_configs.proto 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. // Copyright 2021 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. option go_package = "google.golang.org/genproto/googleapis/cloud/gaming/v1;gaming";
  21. option java_multiple_files = true;
  22. option java_package = "com.google.cloud.gaming.v1";
  23. // Request message for GameServerConfigsService.ListGameServerConfigs.
  24. message ListGameServerConfigsRequest {
  25. // Required. The parent resource name, in the following form:
  26. // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`.
  27. string parent = 1 [
  28. (google.api.field_behavior) = REQUIRED,
  29. (google.api.resource_reference) = {
  30. child_type: "gameservices.googleapis.com/GameServerConfig"
  31. }
  32. ];
  33. // Optional. The maximum number of items to return. If unspecified, server
  34. // will pick an appropriate default. Server may return fewer items than
  35. // requested. A caller should only rely on response's
  36. // [next_page_token][google.cloud.gaming.v1.ListGameServerConfigsResponse.next_page_token] to
  37. // determine if there are more GameServerConfigs left to be queried.
  38. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  39. // Optional. The next_page_token value returned from a previous list request, if any.
  40. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  41. // Optional. The filter to apply to list results.
  42. string filter = 4 [(google.api.field_behavior) = OPTIONAL];
  43. // Optional. Specifies the ordering of results following syntax at
  44. // https://cloud.google.com/apis/design/design_patterns#sorting_order.
  45. string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
  46. }
  47. // Response message for GameServerConfigsService.ListGameServerConfigs.
  48. message ListGameServerConfigsResponse {
  49. // The list of game server configs.
  50. repeated GameServerConfig game_server_configs = 1;
  51. // Token to retrieve the next page of results, or empty if there are no more
  52. // results in the list.
  53. string next_page_token = 2;
  54. // List of locations that could not be reached.
  55. repeated string unreachable = 4;
  56. }
  57. // Request message for GameServerConfigsService.GetGameServerConfig.
  58. message GetGameServerConfigRequest {
  59. // Required. The name of the game server config to retrieve, in the following form:
  60. // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
  61. string name = 1 [
  62. (google.api.field_behavior) = REQUIRED,
  63. (google.api.resource_reference) = {
  64. type: "gameservices.googleapis.com/GameServerConfig"
  65. }
  66. ];
  67. }
  68. // Request message for GameServerConfigsService.CreateGameServerConfig.
  69. message CreateGameServerConfigRequest {
  70. // Required. The parent resource name, in the following form:
  71. // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`.
  72. string parent = 1 [
  73. (google.api.field_behavior) = REQUIRED,
  74. (google.api.resource_reference) = {
  75. child_type: "gameservices.googleapis.com/GameServerConfig"
  76. }
  77. ];
  78. // Required. The ID of the game server config resource to be created.
  79. string config_id = 2 [(google.api.field_behavior) = REQUIRED];
  80. // Required. The game server config resource to be created.
  81. GameServerConfig game_server_config = 3 [(google.api.field_behavior) = REQUIRED];
  82. }
  83. // Request message for GameServerConfigsService.DeleteGameServerConfig.
  84. message DeleteGameServerConfigRequest {
  85. // Required. The name of the game server config to delete, in the following form:
  86. // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
  87. string name = 1 [
  88. (google.api.field_behavior) = REQUIRED,
  89. (google.api.resource_reference) = {
  90. type: "gameservices.googleapis.com/GameServerConfig"
  91. }
  92. ];
  93. }
  94. // Autoscaling config for an Agones fleet.
  95. message ScalingConfig {
  96. // Required. The name of the Scaling Config
  97. string name = 1 [(google.api.field_behavior) = REQUIRED];
  98. // Required. Agones fleet autoscaler spec. Example spec:
  99. // https://agones.dev/site/docs/reference/fleetautoscaler/
  100. string fleet_autoscaler_spec = 2 [(google.api.field_behavior) = REQUIRED];
  101. // Labels used to identify the game server clusters to which this Agones
  102. // scaling config applies. A game server cluster is subject to this Agones
  103. // scaling config if its labels match any of the selector entries.
  104. repeated LabelSelector selectors = 4;
  105. // The schedules to which this Scaling Config applies.
  106. repeated Schedule schedules = 5;
  107. }
  108. // Fleet configs for Agones.
  109. message FleetConfig {
  110. // Agones fleet spec. Example spec:
  111. // `https://agones.dev/site/docs/reference/fleet/`.
  112. string fleet_spec = 1;
  113. // The name of the FleetConfig.
  114. string name = 2;
  115. }
  116. // A game server config resource.
  117. message GameServerConfig {
  118. option (google.api.resource) = {
  119. type: "gameservices.googleapis.com/GameServerConfig"
  120. pattern: "projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}"
  121. };
  122. // The resource name of the game server config, in the following form:
  123. // `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
  124. // For example,
  125. // `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`.
  126. string name = 1;
  127. // Output only. The creation time.
  128. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  129. // Output only. The last-modified time.
  130. google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  131. // The labels associated with this game server config. Each label is a
  132. // key-value pair.
  133. map<string, string> labels = 4;
  134. // FleetConfig contains a list of Agones fleet specs. Only one FleetConfig
  135. // is allowed.
  136. repeated FleetConfig fleet_configs = 5;
  137. // The autoscaling settings.
  138. repeated ScalingConfig scaling_configs = 6;
  139. // The description of the game server config.
  140. string description = 7;
  141. }