realms.proto 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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/field_mask.proto";
  20. import "google/protobuf/timestamp.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 RealmsService.ListRealms.
  25. message ListRealmsRequest {
  26. // Required. The parent resource name, in the following form:
  27. // `projects/{project}/locations/{location}`.
  28. string parent = 1 [
  29. (google.api.field_behavior) = REQUIRED,
  30. (google.api.resource_reference) = {
  31. child_type: "gameservices.googleapis.com/Realm"
  32. }
  33. ];
  34. // Optional. The maximum number of items to return. If unspecified, server
  35. // will pick an appropriate default. Server may return fewer items than
  36. // requested. A caller should only rely on response's
  37. // [next_page_token][google.cloud.gaming.v1.ListRealmsResponse.next_page_token] to
  38. // determine if there are more realms left to be queried.
  39. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  40. // Optional. The next_page_token value returned from a previous List request,
  41. // 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 RealmsService.ListRealms.
  50. message ListRealmsResponse {
  51. // The list of realms.
  52. repeated Realm realms = 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 = 3;
  58. }
  59. // Request message for RealmsService.GetRealm.
  60. message GetRealmRequest {
  61. // Required. The name of the realm to retrieve, in the following form:
  62. // `projects/{project}/locations/{location}/realms/{realm}`.
  63. string name = 1 [
  64. (google.api.field_behavior) = REQUIRED,
  65. (google.api.resource_reference) = {
  66. type: "gameservices.googleapis.com/Realm"
  67. }
  68. ];
  69. }
  70. // Request message for RealmsService.CreateRealm.
  71. message CreateRealmRequest {
  72. // Required. The parent resource name, in the following form:
  73. // `projects/{project}/locations/{location}`.
  74. string parent = 1 [
  75. (google.api.field_behavior) = REQUIRED,
  76. (google.api.resource_reference) = {
  77. child_type: "gameservices.googleapis.com/Realm"
  78. }
  79. ];
  80. // Required. The ID of the realm resource to be created.
  81. string realm_id = 2 [(google.api.field_behavior) = REQUIRED];
  82. // Required. The realm resource to be created.
  83. Realm realm = 3 [(google.api.field_behavior) = REQUIRED];
  84. }
  85. // Request message for RealmsService.DeleteRealm.
  86. message DeleteRealmRequest {
  87. // Required. The name of the realm to delete, in the following form:
  88. // `projects/{project}/locations/{location}/realms/{realm}`.
  89. string name = 1 [
  90. (google.api.field_behavior) = REQUIRED,
  91. (google.api.resource_reference) = {
  92. type: "gameservices.googleapis.com/Realm"
  93. }
  94. ];
  95. }
  96. // Request message for RealmsService.UpdateRealm.
  97. message UpdateRealmRequest {
  98. // Required. The realm to be updated.
  99. // Only fields specified in update_mask are updated.
  100. Realm realm = 1 [(google.api.field_behavior) = REQUIRED];
  101. // Required. The update mask applies to the resource. For the `FieldMask`
  102. // definition, see
  103. // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  104. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  105. }
  106. // Request message for RealmsService.PreviewRealmUpdate.
  107. message PreviewRealmUpdateRequest {
  108. // Required. The realm to be updated.
  109. // Only fields specified in update_mask are updated.
  110. Realm realm = 1 [(google.api.field_behavior) = REQUIRED];
  111. // Required. The update mask applies to the resource. For the `FieldMask`
  112. // definition, see
  113. // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  114. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  115. // Optional. The target timestamp to compute the preview.
  116. google.protobuf.Timestamp preview_time = 3 [(google.api.field_behavior) = OPTIONAL];
  117. }
  118. // Response message for RealmsService.PreviewRealmUpdate.
  119. message PreviewRealmUpdateResponse {
  120. // ETag of the realm.
  121. string etag = 2;
  122. // The target state.
  123. TargetState target_state = 3;
  124. }
  125. // A realm resource.
  126. message Realm {
  127. option (google.api.resource) = {
  128. type: "gameservices.googleapis.com/Realm"
  129. pattern: "projects/{project}/locations/{location}/realms/{realm}"
  130. };
  131. // The resource name of the realm, in the following form:
  132. // `projects/{project}/locations/{location}/realms/{realm}`. For
  133. // example, `projects/my-project/locations/{location}/realms/my-realm`.
  134. string name = 1;
  135. // Output only. The creation time.
  136. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  137. // Output only. The last-modified time.
  138. google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  139. // The labels associated with this realm. Each label is a key-value pair.
  140. map<string, string> labels = 4;
  141. // Required. Time zone where all policies targeting this realm are evaluated. The value
  142. // of this field must be from the IANA time zone database:
  143. // https://www.iana.org/time-zones.
  144. string time_zone = 6 [(google.api.field_behavior) = REQUIRED];
  145. // ETag of the resource.
  146. string etag = 7;
  147. // Human readable description of the realm.
  148. string description = 8;
  149. }