-
Notifications
You must be signed in to change notification settings - Fork 22
/
data.proto
270 lines (210 loc) · 8.86 KB
/
data.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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
// Copyright 2022 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
//
// https://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.events.cloud.memcache.v1;
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/type/dayofweek.proto";
import "google/type/timeofday.proto";
option csharp_namespace = "Google.Events.Protobuf.Cloud.Memcache.V1";
option php_namespace = "Google\\Events\\Cloud\\Memcache\\V1";
option ruby_package = "Google::Events::Cloud::Memcache::V1";
// A Memorystore for Memcached instance
message Instance {
// Configuration for a Memcached Node.
message NodeConfig {
// Required. Number of cpus per Memcached node.
int32 cpu_count = 1;
// Required. Memory size in MiB for each Memcached node.
int32 memory_size_mb = 2;
}
message Node {
// Different states of a Memcached node.
enum State {
// Node state is not set.
STATE_UNSPECIFIED = 0;
// Node is being created.
CREATING = 1;
// Node has been created and ready to be used.
READY = 2;
// Node is being deleted.
DELETING = 3;
// Node is being updated.
UPDATING = 4;
}
// Output only. Identifier of the Memcached node. The node id does not
// include project or location like the Memcached instance name.
string node_id = 1;
// Output only. Location (GCP Zone) for the Memcached node.
string zone = 2;
// Output only. Current state of the Memcached node.
State state = 3;
// Output only. Hostname or IP address of the Memcached node used by the
// clients to connect to the Memcached server on this node.
string host = 4;
// Output only. The port number of the Memcached server on this node.
int32 port = 5;
// User defined parameters currently applied to the node.
MemcacheParameters parameters = 6;
}
message InstanceMessage {
enum Code {
// Message Code not set.
CODE_UNSPECIFIED = 0;
// Memcached nodes are distributed unevenly.
ZONE_DISTRIBUTION_UNBALANCED = 1;
}
// A code that correspond to one type of user-facing message.
Code code = 1;
// Message on memcached instance which will be exposed to users.
string message = 2;
}
// Different states of a Memcached instance.
enum State {
// State not set.
STATE_UNSPECIFIED = 0;
// Memcached instance is being created.
CREATING = 1;
// Memcached instance has been created and ready to be used.
READY = 2;
// Memcached instance is updating configuration such as maintenance policy
// and schedule.
UPDATING = 3;
// Memcached instance is being deleted.
DELETING = 4;
// Memcached instance is going through maintenance, e.g. data plane rollout.
PERFORMING_MAINTENANCE = 5;
}
// Required. Unique name of the resource in this scope including project and
// location using the form:
// `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
//
// Note: Memcached instances are managed and addressed at the regional level
// so `location_id` here refers to a Google Cloud region; however, users may
// choose which zones Memcached nodes should be provisioned in within an
// instance. Refer to [zones][google.cloud.memcache.v1.Instance.zones] field
// for more details.
string name = 1;
// User provided name for the instance, which is only used for display
// purposes. Cannot be more than 80 characters.
string display_name = 2;
// Resource labels to represent user-provided metadata.
// Refer to cloud documentation on labels for more details.
// https://cloud.google.com/compute/docs/labeling-resources
map<string, string> labels = 3;
// The full name of the Google Compute Engine
// [network](/compute/docs/networks-and-firewalls#networks) to which the
// instance is connected. If left unspecified, the `default` network
// will be used.
string authorized_network = 4;
// Zones in which Memcached nodes should be provisioned.
// Memcached nodes will be equally distributed across these zones. If not
// provided, the service will by default create nodes in all zones in the
// region for the instance.
repeated string zones = 5;
// Required. Number of nodes in the Memcached instance.
int32 node_count = 6;
// Required. Configuration for Memcached nodes.
NodeConfig node_config = 7;
// The major version of Memcached software.
// If not provided, latest supported version will be used. Currently the
// latest supported major version is `MEMCACHE_1_5`.
// The minor version will be automatically determined by our system based on
// the latest supported minor version.
MemcacheVersion memcache_version = 9;
// User defined parameters to apply to the memcached process
// on each node.
MemcacheParameters parameters = 11;
// Output only. List of Memcached nodes.
// Refer to [Node][google.cloud.memcache.v1.Instance.Node] message for more
// details.
repeated Node memcache_nodes = 12;
// Output only. The time the instance was created.
google.protobuf.Timestamp create_time = 13;
// Output only. The time the instance was updated.
google.protobuf.Timestamp update_time = 14;
// Output only. The state of this Memcached instance.
State state = 15;
// Output only. The full version of memcached server running on this instance.
// System automatically determines the full memcached version for an instance
// based on the input MemcacheVersion.
// The full version format will be "memcached-1.5.16".
string memcache_full_version = 18;
// List of messages that describe the current state of the Memcached instance.
repeated InstanceMessage instance_messages = 19;
// Output only. Endpoint for the Discovery API.
string discovery_endpoint = 20;
// The maintenance policy for the instance. If not provided,
// the maintenance event will be performed based on Memorystore
// internal rollout schedule.
MaintenancePolicy maintenance_policy = 21;
// Output only. Published maintenance schedule.
MaintenanceSchedule maintenance_schedule = 22;
}
// Maintenance policy per instance.
message MaintenancePolicy {
// Output only. The time when the policy was created.
google.protobuf.Timestamp create_time = 1;
// Output only. The time when the policy was updated.
google.protobuf.Timestamp update_time = 2;
// Description of what this policy is for. Create/Update methods
// return INVALID_ARGUMENT if the length is greater than 512.
string description = 3;
// Required. Maintenance window that is applied to resources covered by this
// policy. Minimum 1. For the current version, the maximum number of
// weekly_maintenance_windows is expected to be one.
repeated WeeklyMaintenanceWindow weekly_maintenance_window = 4;
}
// Time window specified for weekly operations.
message WeeklyMaintenanceWindow {
// Required. Allows to define schedule that runs specified day of the week.
google.type.DayOfWeek day = 1;
// Required. Start time of the window in UTC.
google.type.TimeOfDay start_time = 2;
// Required. Duration of the time window.
google.protobuf.Duration duration = 3;
}
// Upcoming maintenance schedule.
message MaintenanceSchedule {
// Output only. The start time of any upcoming scheduled maintenance for this
// instance.
google.protobuf.Timestamp start_time = 1;
// Output only. The end time of any upcoming scheduled maintenance for this
// instance.
google.protobuf.Timestamp end_time = 2;
// Output only. The deadline that the maintenance schedule start time can not
// go beyond, including reschedule.
google.protobuf.Timestamp schedule_deadline_time = 4;
}
message MemcacheParameters {
// Output only. The unique ID associated with this set of parameters. Users
// can use this id to determine if the parameters associated with the instance
// differ from the parameters associated with the nodes. A discrepancy between
// parameter ids can inform users that they may need to take action to apply
// parameters on nodes.
string id = 1;
// User defined set of parameters to use in the memcached process.
map<string, string> params = 3;
}
// Memcached versions supported by our service.
enum MemcacheVersion {
MEMCACHE_VERSION_UNSPECIFIED = 0;
// Memcached 1.5 version.
MEMCACHE_1_5 = 1;
}
// The data within all Instance events.
message InstanceEventData {
// Optional. The Instance event payload. Unset for deletion events.
optional Instance payload = 1;
}