realms.proto 6.5 KB

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