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
15syntax = "proto3";
16
17package google.cloud.gaming.v1beta;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/cloud/gaming/v1beta/common.proto";
22import "google/protobuf/field_mask.proto";
23import "google/protobuf/timestamp.proto";
24
25option go_package = "cloud.google.com/go/gaming/apiv1beta/gamingpb;gamingpb";
26
27option java_multiple_files = true;
28option java_package = "com.google.cloud.gaming.v1beta";
29option php_namespace = "Google\\Cloud\\Gaming\\V1beta";
30
31// Request message for RealmsService.ListRealms.
32message ListRealmsRequest {
33  // Required. The parent resource name. Uses the form:
34  // `projects/{project}/locations/{location}`.
35  string parent = 1 [
36    (google.api.field_behavior) = REQUIRED,
37    (google.api.resource_reference) = {
38      child_type: "gameservices.googleapis.com/Realm"
39    }
40  ];
41
42  // Optional. The maximum number of items to return.  If unspecified, server
43  // will pick an appropriate default. Server may return fewer items than
44  // requested. A caller should only rely on response's
45  // [next_page_token][google.cloud.gaming.v1beta.ListRealmsResponse.next_page_token]
46  // to determine if there are more realms left to be queried.
47  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
48
49  // Optional. The next_page_token value returned from a previous List request,
50  // if any.
51  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
52
53  // Optional. The filter to apply to list results.
54  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
55
56  // Optional. Specifies the ordering of results following syntax at
57  // https://cloud.google.com/apis/design/design_patterns#sorting_order.
58  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
59}
60
61// Response message for RealmsService.ListRealms.
62message ListRealmsResponse {
63  // The list of realms.
64  repeated Realm realms = 1;
65
66  // Token to retrieve the next page of results, or empty if there are no more
67  // results in the list.
68  string next_page_token = 2;
69
70  // List of locations that could not be reached.
71  repeated string unreachable = 3;
72}
73
74// Request message for RealmsService.GetRealm.
75message GetRealmRequest {
76  // Required. The name of the realm to retrieve. Uses the form:
77  // `projects/{project}/locations/{location}/realms/{realm}`.
78  string name = 1 [
79    (google.api.field_behavior) = REQUIRED,
80    (google.api.resource_reference) = {
81      type: "gameservices.googleapis.com/Realm"
82    }
83  ];
84}
85
86// Request message for RealmsService.CreateRealm.
87message CreateRealmRequest {
88  // Required. The parent resource name. Uses the form:
89  // `projects/{project}/locations/{location}`.
90  string parent = 1 [
91    (google.api.field_behavior) = REQUIRED,
92    (google.api.resource_reference) = {
93      child_type: "gameservices.googleapis.com/Realm"
94    }
95  ];
96
97  // Required. The ID of the realm resource to be created.
98  string realm_id = 2 [(google.api.field_behavior) = REQUIRED];
99
100  // Required. The realm resource to be created.
101  Realm realm = 3 [(google.api.field_behavior) = REQUIRED];
102}
103
104// Request message for RealmsService.DeleteRealm.
105message DeleteRealmRequest {
106  // Required. The name of the realm to delete. Uses the form:
107  // `projects/{project}/locations/{location}/realms/{realm}`.
108  string name = 1 [
109    (google.api.field_behavior) = REQUIRED,
110    (google.api.resource_reference) = {
111      type: "gameservices.googleapis.com/Realm"
112    }
113  ];
114}
115
116// Request message for RealmsService.UpdateRealm.
117message UpdateRealmRequest {
118  // Required. The realm to be updated.
119  // Only fields specified in update_mask are updated.
120  Realm realm = 1 [(google.api.field_behavior) = REQUIRED];
121
122  // Required. The update mask applies to the resource. For the `FieldMask`
123  // definition, see
124  //
125  // https:
126  // //developers.google.com/protocol-buffers
127  // // /docs/reference/google.protobuf#fieldmask
128  google.protobuf.FieldMask update_mask = 2
129      [(google.api.field_behavior) = REQUIRED];
130}
131
132// Request message for RealmsService.PreviewRealmUpdate.
133message PreviewRealmUpdateRequest {
134  // Required. The realm to be updated.
135  // Only fields specified in update_mask are updated.
136  Realm realm = 1 [(google.api.field_behavior) = REQUIRED];
137
138  // Required. The update mask applies to the resource. For the `FieldMask`
139  // definition, see
140  //
141  // https:
142  // //developers.google.com/protocol-buffers
143  // // /docs/reference/google.protobuf#fieldmask
144  google.protobuf.FieldMask update_mask = 2
145      [(google.api.field_behavior) = REQUIRED];
146
147  // Optional. The target timestamp to compute the preview.
148  google.protobuf.Timestamp preview_time = 3
149      [(google.api.field_behavior) = OPTIONAL];
150}
151
152// Response message for RealmsService.PreviewRealmUpdate.
153message PreviewRealmUpdateResponse {
154  // ETag of the realm.
155  string etag = 2;
156
157  // The target state.
158  TargetState target_state = 3;
159}
160
161// A realm resource.
162message Realm {
163  option (google.api.resource) = {
164    type: "gameservices.googleapis.com/Realm"
165    pattern: "projects/{project}/locations/{location}/realms/{realm}"
166  };
167
168  // The resource name of the realm. Uses the form:
169  // `projects/{project}/locations/{location}/realms/{realm}`. For
170  // example, `projects/my-project/locations/{location}/realms/my-realm`.
171  string name = 1;
172
173  // Output only. The creation time.
174  google.protobuf.Timestamp create_time = 2
175      [(google.api.field_behavior) = OUTPUT_ONLY];
176
177  // Output only. The last-modified time.
178  google.protobuf.Timestamp update_time = 3
179      [(google.api.field_behavior) = OUTPUT_ONLY];
180
181  // The labels associated with this realm. Each label is a key-value pair.
182  map<string, string> labels = 4;
183
184  // Required. Time zone where all policies targeting this realm are evaluated.
185  // The value of this field must be from the IANA time zone database:
186  // https://www.iana.org/time-zones.
187  string time_zone = 6 [(google.api.field_behavior) = REQUIRED];
188
189  // ETag of the resource.
190  string etag = 7;
191
192  // Human readable description of the realm.
193  string description = 8;
194}
195