realms.proto 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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 RealmsService.ListRealms.
  27. message ListRealmsRequest {
  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/Realm"
  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.ListRealmsResponse.next_page_token]
  40. // to determine if there are more realms 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 RealmsService.ListRealms.
  52. message ListRealmsResponse {
  53. // The list of realms.
  54. repeated Realm realms = 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 = 3;
  60. }
  61. // Request message for RealmsService.GetRealm.
  62. message GetRealmRequest {
  63. // Required. The name of the realm to retrieve. Uses the form:
  64. // `projects/{project}/locations/{location}/realms/{realm}`.
  65. string name = 1 [
  66. (google.api.field_behavior) = REQUIRED,
  67. (google.api.resource_reference) = {
  68. type: "gameservices.googleapis.com/Realm"
  69. }
  70. ];
  71. }
  72. // Request message for RealmsService.CreateRealm.
  73. message CreateRealmRequest {
  74. // Required. The parent resource name. Uses the form:
  75. // `projects/{project}/locations/{location}`.
  76. string parent = 1 [
  77. (google.api.field_behavior) = REQUIRED,
  78. (google.api.resource_reference) = {
  79. child_type: "gameservices.googleapis.com/Realm"
  80. }
  81. ];
  82. // Required. The ID of the realm resource to be created.
  83. string realm_id = 2 [(google.api.field_behavior) = REQUIRED];
  84. // Required. The realm resource to be created.
  85. Realm realm = 3 [(google.api.field_behavior) = REQUIRED];
  86. }
  87. // Request message for RealmsService.DeleteRealm.
  88. message DeleteRealmRequest {
  89. // Required. The name of the realm to delete. Uses the form:
  90. // `projects/{project}/locations/{location}/realms/{realm}`.
  91. string name = 1 [
  92. (google.api.field_behavior) = REQUIRED,
  93. (google.api.resource_reference) = {
  94. type: "gameservices.googleapis.com/Realm"
  95. }
  96. ];
  97. }
  98. // Request message for RealmsService.UpdateRealm.
  99. message UpdateRealmRequest {
  100. // Required. The realm to be updated.
  101. // Only fields specified in update_mask are updated.
  102. Realm realm = 1 [(google.api.field_behavior) = REQUIRED];
  103. // Required. The update mask applies to the resource. For the `FieldMask`
  104. // definition, see
  105. //
  106. // https:
  107. // //developers.google.com/protocol-buffers
  108. // // /docs/reference/google.protobuf#fieldmask
  109. google.protobuf.FieldMask update_mask = 2
  110. [(google.api.field_behavior) = REQUIRED];
  111. }
  112. // Request message for RealmsService.PreviewRealmUpdate.
  113. message PreviewRealmUpdateRequest {
  114. // Required. The realm to be updated.
  115. // Only fields specified in update_mask are updated.
  116. Realm realm = 1 [(google.api.field_behavior) = REQUIRED];
  117. // Required. The update mask applies to the resource. For the `FieldMask`
  118. // definition, see
  119. //
  120. // https:
  121. // //developers.google.com/protocol-buffers
  122. // // /docs/reference/google.protobuf#fieldmask
  123. google.protobuf.FieldMask update_mask = 2
  124. [(google.api.field_behavior) = REQUIRED];
  125. // Optional. The target timestamp to compute the preview.
  126. google.protobuf.Timestamp preview_time = 3
  127. [(google.api.field_behavior) = OPTIONAL];
  128. }
  129. // Response message for RealmsService.PreviewRealmUpdate.
  130. message PreviewRealmUpdateResponse {
  131. // ETag of the realm.
  132. string etag = 2;
  133. // The target state.
  134. TargetState target_state = 3;
  135. }
  136. // A realm resource.
  137. message Realm {
  138. option (google.api.resource) = {
  139. type: "gameservices.googleapis.com/Realm"
  140. pattern: "projects/{project}/locations/{location}/realms/{realm}"
  141. };
  142. // The resource name of the realm. Uses the form:
  143. // `projects/{project}/locations/{location}/realms/{realm}`. For
  144. // example, `projects/my-project/locations/{location}/realms/my-realm`.
  145. string name = 1;
  146. // Output only. The creation time.
  147. google.protobuf.Timestamp create_time = 2
  148. [(google.api.field_behavior) = OUTPUT_ONLY];
  149. // Output only. The last-modified time.
  150. google.protobuf.Timestamp update_time = 3
  151. [(google.api.field_behavior) = OUTPUT_ONLY];
  152. // The labels associated with this realm. Each label is a key-value pair.
  153. map<string, string> labels = 4;
  154. // Required. Time zone where all policies targeting this realm are evaluated.
  155. // The value of this field must be from the IANA time zone database:
  156. // https://www.iana.org/time-zones.
  157. string time_zone = 6 [(google.api.field_behavior) = REQUIRED];
  158. // ETag of the resource.
  159. string etag = 7;
  160. // Human readable description of the realm.
  161. string description = 8;
  162. }