1
- // Copyright 2020 Google LLC
1
+ // Copyright 2021 Google LLC
2
2
//
3
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
4
// you may not use this file except in compliance with the License.
@@ -27,9 +27,24 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/gaming/v1;gamin
27
27
option java_multiple_files = true ;
28
28
option java_package = "com.google.cloud.gaming.v1" ;
29
29
30
+ // A view for GameServerCluster objects.
31
+ enum GameServerClusterView {
32
+ // The default / unset value.
33
+ // The API will default to the BASIC view.
34
+ GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED = 0 ;
35
+
36
+ // Include basic information of a GameServerCluster resource and omit
37
+ // `cluster_state`. This is the default value (for ListGameServerClusters,
38
+ // GetGameServerCluster and PreviewCreateGameServerCluster).
39
+ BASIC = 1 ;
40
+
41
+ // Include everything.
42
+ FULL = 2 ;
43
+ }
44
+
30
45
// Request message for GameServerClustersService.ListGameServerClusters.
31
46
message ListGameServerClustersRequest {
32
- // Required. The parent resource name. Uses the form:
47
+ // Required. The parent resource name, in the following form:
33
48
// "projects/{project}/locations/{location}/realms/{realm}".
34
49
string parent = 1 [
35
50
(google.api.field_behavior ) = REQUIRED ,
@@ -38,7 +53,7 @@ message ListGameServerClustersRequest {
38
53
}
39
54
];
40
55
41
- // Optional. The maximum number of items to return. If unspecified, the server
56
+ // Optional. The maximum number of items to return. If unspecified, the server
42
57
// will pick an appropriate default. The server may return fewer items than
43
58
// requested. A caller should only rely on response's
44
59
// [next_page_token][google.cloud.gaming.v1.ListGameServerClustersResponse.next_page_token] to
@@ -54,6 +69,14 @@ message ListGameServerClustersRequest {
54
69
// Optional. Specifies the ordering of results following syntax at
55
70
// https://cloud.google.com/apis/design/design_patterns#sorting_order.
56
71
string order_by = 5 [(google.api.field_behavior ) = OPTIONAL ];
72
+
73
+ // Optional. View for the returned GameServerCluster objects. When `FULL` is
74
+ // specified, the `cluster_state` field is also returned in the
75
+ // GameServerCluster object, which includes the state of the referenced
76
+ // Kubernetes cluster such as versions and provider info. The default/unset
77
+ // value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does
78
+ // not return the `cluster_state` field.
79
+ GameServerClusterView view = 6 [(google.api.field_behavior ) = OPTIONAL ];
57
80
}
58
81
59
82
// Response message for GameServerClustersService.ListGameServerClusters.
@@ -71,20 +94,27 @@ message ListGameServerClustersResponse {
71
94
72
95
// Request message for GameServerClustersService.GetGameServerCluster.
73
96
message GetGameServerClusterRequest {
74
- // Required. The name of the game server cluster to retrieve. Uses the form:
75
- //
97
+ // Required. The name of the game server cluster to retrieve, in the following form:
76
98
// `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`.
77
99
string name = 1 [
78
100
(google.api.field_behavior ) = REQUIRED ,
79
101
(google.api.resource_reference ) = {
80
102
type : "gameservices.googleapis.com/GameServerCluster"
81
103
}
82
104
];
105
+
106
+ // Optional. View for the returned GameServerCluster objects. When `FULL` is
107
+ // specified, the `cluster_state` field is also returned in the
108
+ // GameServerCluster object, which includes the state of the referenced
109
+ // Kubernetes cluster such as versions and provider info. The default/unset
110
+ // value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does
111
+ // not return the `cluster_state` field.
112
+ GameServerClusterView view = 6 [(google.api.field_behavior ) = OPTIONAL ];
83
113
}
84
114
85
115
// Request message for GameServerClustersService.CreateGameServerCluster.
86
116
message CreateGameServerClusterRequest {
87
- // Required. The parent resource name. Uses the form:
117
+ // Required. The parent resource name, in the following form:
88
118
// `projects/{project}/locations/{location}/realms/{realm-id}`.
89
119
string parent = 1 [
90
120
(google.api.field_behavior ) = REQUIRED ,
@@ -102,7 +132,7 @@ message CreateGameServerClusterRequest {
102
132
103
133
// Request message for GameServerClustersService.PreviewCreateGameServerCluster.
104
134
message PreviewCreateGameServerClusterRequest {
105
- // Required. The parent resource name. Uses the form:
135
+ // Required. The parent resource name, in the following form:
106
136
// `projects/{project}/locations/{location}/realms/{realm}`.
107
137
string parent = 1 [
108
138
(google.api.field_behavior ) = REQUIRED ,
@@ -119,6 +149,13 @@ message PreviewCreateGameServerClusterRequest {
119
149
120
150
// Optional. The target timestamp to compute the preview.
121
151
google.protobuf.Timestamp preview_time = 4 [(google.api.field_behavior ) = OPTIONAL ];
152
+
153
+ // Optional. This field is deprecated, preview will always return
154
+ // KubernetesClusterState.
155
+ GameServerClusterView view = 6 [
156
+ deprecated = true ,
157
+ (google.api.field_behavior ) = OPTIONAL
158
+ ];
122
159
}
123
160
124
161
// Response message for
@@ -129,11 +166,15 @@ message PreviewCreateGameServerClusterResponse {
129
166
130
167
// The target state.
131
168
TargetState target_state = 3 ;
169
+
170
+ // Output only. The state of the Kubernetes cluster in preview, this will be available if
171
+ // 'view' is set to `FULL` in the relevant List/Get/Preview request.
172
+ KubernetesClusterState cluster_state = 4 [(google.api.field_behavior ) = OUTPUT_ONLY ];
132
173
}
133
174
134
175
// Request message for GameServerClustersService.DeleteGameServerCluster.
135
176
message DeleteGameServerClusterRequest {
136
- // Required. The name of the game server cluster to delete. Uses the form:
177
+ // Required. The name of the game server cluster to delete, in the following form:
137
178
// `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
138
179
string name = 1 [
139
180
(google.api.field_behavior ) = REQUIRED ,
@@ -145,7 +186,7 @@ message DeleteGameServerClusterRequest {
145
186
146
187
// Request message for GameServerClustersService.PreviewDeleteGameServerCluster.
147
188
message PreviewDeleteGameServerClusterRequest {
148
- // Required. The name of the game server cluster to delete. Uses the form:
189
+ // Required. The name of the game server cluster to delete, in the following form:
149
190
// `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
150
191
string name = 1 [
151
192
(google.api.field_behavior ) = REQUIRED ,
@@ -176,10 +217,7 @@ message UpdateGameServerClusterRequest {
176
217
177
218
// Required. Mask of fields to update. At least one path must be supplied in
178
219
// this field. For the `FieldMask` definition, see
179
- //
180
- // https:
181
- // //developers.google.com/protocol-buffers
182
- // // /docs/reference/google.protobuf#fieldmask
220
+ // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
183
221
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior ) = REQUIRED ];
184
222
}
185
223
@@ -191,10 +229,7 @@ message PreviewUpdateGameServerClusterRequest {
191
229
192
230
// Required. Mask of fields to update. At least one path must be supplied in
193
231
// this field. For the `FieldMask` definition, see
194
- //
195
- // https:
196
- // //developers.google.com/protocol-buffers
197
- // // /docs/reference/google.protobuf#fieldmask
232
+ // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
198
233
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior ) = REQUIRED ];
199
234
200
235
// Optional. The target timestamp to compute the preview.
@@ -244,11 +279,9 @@ message GameServerCluster {
244
279
pattern : "projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}"
245
280
};
246
281
247
- // Required. The resource name of the game server cluster. Uses the form:
248
- //
282
+ // Required. The resource name of the game server cluster, in the following form:
249
283
// `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`.
250
284
// For example,
251
- //
252
285
// `projects/my-project/locations/{location}/realms/zanzibar/gameServerClusters/my-onprem-cluster`.
253
286
string name = 1 [(google.api.field_behavior ) = REQUIRED ];
254
287
@@ -271,4 +304,69 @@ message GameServerCluster {
271
304
272
305
// Human readable description of the cluster.
273
306
string description = 7 ;
307
+
308
+ // Output only. The state of the Kubernetes cluster, this will be available if
309
+ // 'view' is set to `FULL` in the relevant List/Get/Preview request.
310
+ KubernetesClusterState cluster_state = 11 [(google.api.field_behavior ) = OUTPUT_ONLY ];
311
+ }
312
+
313
+ // The state of the Kubernetes cluster.
314
+ message KubernetesClusterState {
315
+ // The state of the installed versions of Agones/Kubernetes. See also
316
+ // https://cloud.google.com/game-servers/docs/versions-and-upgrades.
317
+ enum InstallationState {
318
+ // The default value. This value is used if the state is omitted.
319
+ INSTALLATION_STATE_UNSPECIFIED = 0 ;
320
+
321
+ // The combination of Agones and Kubernetes versions is supported by Google
322
+ // Cloud Game Servers.
323
+ AGONES_KUBERNETES_VERSION_SUPPORTED = 1 ;
324
+
325
+ // The installed version of Agones is not supported by Google Cloud Game
326
+ // Servers.
327
+ AGONES_VERSION_UNSUPPORTED = 2 ;
328
+
329
+ // The installed version of Agones is supported by Google Cloud Game
330
+ // Servers, but the installed version of Kubernetes is not recommended or
331
+ // supported by the version of Agones.
332
+ AGONES_KUBERNETES_VERSION_UNSUPPORTED = 3 ;
333
+
334
+ // The installed version of Agones is not recognized because the Agones
335
+ // controller's image name does not have a version string reported as
336
+ // {major}.{minor}(.{patch}).
337
+ AGONES_VERSION_UNRECOGNIZED = 4 ;
338
+
339
+ // The server version of Kubernetes cluster is not recognized because the
340
+ // API server didn't return parsable version info on path/version.
341
+ KUBERNETES_VERSION_UNRECOGNIZED = 5 ;
342
+
343
+ // Failed to read or verify the version of Agones or Kubernetes. See
344
+ // version_installed_error_message for details.
345
+ VERSION_VERIFICATION_FAILED = 6 ;
346
+
347
+ // Agones is not installed.
348
+ AGONES_NOT_INSTALLED = 7 ;
349
+ }
350
+
351
+ // Output only. The version of Agones currently installed in the registered Kubernetes
352
+ // cluster.
353
+ string agones_version_installed = 1 [(google.api.field_behavior ) = OUTPUT_ONLY ];
354
+
355
+ // Output only. The version of Kubernetes that is currently used in the registered
356
+ // Kubernetes cluster (as detected by the Cloud Game Servers service).
357
+ string kubernetes_version_installed = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
358
+
359
+ // Output only. The state for the installed versions of Agones/Kubernetes.
360
+ InstallationState installation_state = 3 [(google.api.field_behavior ) = OUTPUT_ONLY ];
361
+
362
+ // Output only. The detailed error message for the installed versions of Agones/Kubernetes.
363
+ string version_installed_error_message = 4 [(google.api.field_behavior ) = OUTPUT_ONLY ];
364
+
365
+ // Output only. The cloud provider type reported by the first node's providerID in the list
366
+ // of nodes on the Kubernetes endpoint. On Kubernetes platforms that support
367
+ // zero-node clusters (like GKE-on-GCP), the provider type will be empty.
368
+ string provider = 5 [(google.api.field_behavior ) = OUTPUT_ONLY ];
369
+
370
+ // Output only. The version of Agones that is targeted to be installed in the cluster.
371
+ string agones_version_targeted = 6 [(google.api.field_behavior ) = OUTPUT_ONLY ];
274
372
}
0 commit comments