This repository has been archived by the owner on Sep 27, 2023. It is now read-only.
/
common.proto
243 lines (191 loc) · 8.29 KB
/
common.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.cloud.gaming.v1beta;
import "google/api/field_behavior.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/gaming/v1beta;gaming";
option java_multiple_files = true;
option java_package = "com.google.cloud.gaming.v1beta";
// Represents the metadata of the long-running operation.
message OperationMetadata {
// Output only. The time the operation was created.
google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The time the operation finished running.
google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Server-defined resource path for the target of the operation.
string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Name of the verb executed by the operation.
string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Human-readable status of the operation, if any.
string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Identifies whether the user has requested cancellation
// of the operation. Operations that have successfully been cancelled
// have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
// corresponding to `Code.CANCELLED`.
bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. API version used to start the operation.
string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. List of Locations that could not be reached.
repeated string unreachable = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Operation status for Game Services API operations. Operation status is in
// the form of key-value pairs where keys are resource IDs and the values show
// the status of the operation. In case of failures, the value includes an
// error code and error message.
map<string, OperationStatus> operation_status = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
}
message OperationStatus {
enum ErrorCode {
ERROR_CODE_UNSPECIFIED = 0;
INTERNAL_ERROR = 1;
PERMISSION_DENIED = 2;
CLUSTER_CONNECTION = 3;
}
// Output only. Whether the operation is done or still in progress.
bool done = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// The error code in case of failures.
ErrorCode error_code = 2;
// The human-readable error message.
string error_message = 3;
}
// The label selector, used to group labels on the resources.
message LabelSelector {
// Resource labels for this selector.
map<string, string> labels = 1;
}
// The realm selector, used to match realm resources.
message RealmSelector {
// List of realms to match.
repeated string realms = 1;
}
// The schedule of a recurring or one time event. The event's time span is
// specified by start_time and end_time. If the scheduled event's timespan is
// larger than the cron_spec + cron_job_duration, the event will be recurring.
// If only cron_spec + cron_job_duration are specified, the event is effective
// starting at the local time specified by cron_spec, and is recurring.
//
// ```
// start_time|-------[cron job]-------[cron job]-------[cron job]---|end_time
// cron job: cron spec start time + duration
// ```
message Schedule {
// The start time of the event.
google.protobuf.Timestamp start_time = 1;
// The end time of the event.
google.protobuf.Timestamp end_time = 2;
// The duration for the cron job event. The duration of the event is effective
// after the cron job's start time.
google.protobuf.Duration cron_job_duration = 3;
// The cron definition of the scheduled event. See
// https://en.wikipedia.org/wiki/Cron. Cron spec specifies the local time as
// defined by the realm.
string cron_spec = 4;
}
// Encapsulates Agones fleet spec and Agones autoscaler spec sources.
message SpecSource {
// The game server config resource. Uses the form:
//
// `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}/configs/{config_id}`.
string game_server_config_name = 1;
// The name of the Agones leet config or Agones scaling config used to derive
// the Agones fleet or Agones autoscaler spec.
string name = 2;
}
// Details about the Agones resources.
message TargetDetails {
// Details of the target Agones fleet.
message TargetFleetDetails {
// Target Agones fleet specification.
message TargetFleet {
// The name of the Agones fleet.
string name = 1;
// Encapsulates the source of the Agones fleet spec.
// The Agones fleet spec source.
SpecSource spec_source = 2;
}
// Target Agones autoscaler policy reference.
message TargetFleetAutoscaler {
// The name of the Agones autoscaler.
string name = 1;
// Encapsulates the source of the Agones fleet spec.
// Details about the Agones autoscaler spec.
SpecSource spec_source = 2;
}
// Reference to target Agones fleet.
TargetFleet fleet = 1;
// Reference to target Agones fleet autoscaling policy.
TargetFleetAutoscaler autoscaler = 2;
}
// The game server cluster name. Uses the form:
//
// `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`.
string game_server_cluster_name = 1;
// The game server deployment name. Uses the form:
//
// `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}`.
string game_server_deployment_name = 2;
// Agones fleet details for game server clusters and game server deployments.
repeated TargetFleetDetails fleet_details = 3;
}
// Encapsulates the Target state.
message TargetState {
// Details about Agones fleets.
repeated TargetDetails details = 1;
}
// Details of the deployed Agones fleet.
message DeployedFleetDetails {
// Agones fleet specification and details.
message DeployedFleet {
// DeployedFleetStatus has details about the Agones fleets such as how many
// are running, how many allocated, and so on.
message DeployedFleetStatus {
// The number of GameServer replicas in the READY state in this fleet.
int64 ready_replicas = 1;
// The number of GameServer replicas in the ALLOCATED state in this fleet.
int64 allocated_replicas = 2;
// The number of GameServer replicas in the RESERVED state in this fleet.
// Reserved instances won't be deleted on scale down, but won't cause
// an autoscaler to scale up.
int64 reserved_replicas = 3;
// The total number of current GameServer replicas in this fleet.
int64 replicas = 4;
}
// The name of the Agones fleet.
string fleet = 1;
// The fleet spec retrieved from the Agones fleet.
string fleet_spec = 2;
// The source spec that is used to create the Agones fleet.
// The GameServerConfig resource may no longer exist in the system.
SpecSource spec_source = 3;
// The current status of the Agones fleet.
// Includes count of game servers in various states.
DeployedFleetStatus status = 5;
}
// Details about the Agones autoscaler.
message DeployedFleetAutoscaler {
// The name of the Agones autoscaler.
string autoscaler = 1;
// The source spec that is used to create the autoscaler.
// The GameServerConfig resource may no longer exist in the system.
SpecSource spec_source = 4;
// The autoscaler spec retrieved from Agones.
string fleet_autoscaler_spec = 3;
}
// Information about the Agones fleet.
DeployedFleet deployed_fleet = 1;
// Information about the Agones autoscaler for that fleet.
DeployedFleetAutoscaler deployed_autoscaler = 2;
}