google-cloud-maintenance-api-v1beta 0.a → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +154 -8
- data/lib/google/cloud/maintenance/api/v1beta/bindings_override.rb +104 -0
- data/lib/google/cloud/maintenance/api/v1beta/maintenance/client.rb +707 -0
- data/lib/google/cloud/maintenance/api/v1beta/maintenance/credentials.rb +49 -0
- data/lib/google/cloud/maintenance/api/v1beta/maintenance/paths.rb +71 -0
- data/lib/google/cloud/maintenance/api/v1beta/maintenance/rest/client.rb +668 -0
- data/lib/google/cloud/maintenance/api/v1beta/maintenance/rest/service_stub.rb +266 -0
- data/lib/google/cloud/maintenance/api/v1beta/maintenance/rest.rb +55 -0
- data/lib/google/cloud/maintenance/api/v1beta/maintenance.rb +57 -0
- data/lib/google/cloud/maintenance/api/v1beta/maintenance_service_pb.rb +66 -0
- data/lib/google/cloud/maintenance/api/v1beta/maintenance_service_services_pb.rb +51 -0
- data/lib/google/cloud/maintenance/api/v1beta/rest.rb +40 -0
- data/lib/google/cloud/maintenance/api/v1beta/version.rb +7 -2
- data/lib/google/cloud/maintenance/api/v1beta.rb +47 -0
- data/lib/google-cloud-maintenance-api-v1beta.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +473 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/field_info.rb +88 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +227 -0
- data/proto_docs/google/cloud/maintenance/api/v1beta/maintenance_service.rb +423 -0
- data/proto_docs/google/protobuf/any.rb +145 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- metadata +81 -9
@@ -0,0 +1,423 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Maintenance
|
23
|
+
module Api
|
24
|
+
module V1beta
|
25
|
+
# Request message for SummarizeMaintenances custom method.
|
26
|
+
# @!attribute [rw] parent
|
27
|
+
# @return [::String]
|
28
|
+
# Required. The parent of the resource maintenance.
|
29
|
+
# eg. `projects/123/locations/*`
|
30
|
+
# @!attribute [rw] page_size
|
31
|
+
# @return [::Integer]
|
32
|
+
# The maximum number of resource maintenances to send per page. The default
|
33
|
+
# page size is 20 and the maximum is 1000.
|
34
|
+
# @!attribute [rw] page_token
|
35
|
+
# @return [::String]
|
36
|
+
# The page token: If the next_page_token from a previous response
|
37
|
+
# is provided, this request will send the subsequent page.
|
38
|
+
# @!attribute [rw] filter
|
39
|
+
# @return [::String]
|
40
|
+
# Filter the list as specified in https://google.aip.dev/160.
|
41
|
+
# Supported fields include:
|
42
|
+
# - state
|
43
|
+
# - resource.location
|
44
|
+
# - resource.resourceName
|
45
|
+
# - resource.type
|
46
|
+
# - maintenance.maintenanceName
|
47
|
+
# - maintenanceStartTime
|
48
|
+
# - maintenanceCompleteTime
|
49
|
+
# Examples:
|
50
|
+
# - state="SCHEDULED"
|
51
|
+
# - resource.location="us-central1-c"
|
52
|
+
# - resource.resourceName=~"*/instance-20241212-211259"
|
53
|
+
# - maintenanceStartTime>"2000-10-11T20:44:51Z"
|
54
|
+
# - state="SCHEDULED" OR resource.type="compute.googleapis.com/Instance"
|
55
|
+
# - maintenance.maitenanceName="eb3b709c-9ca1-5472-9fb6-800a3849eda1" AND
|
56
|
+
# maintenanceCompleteTime>"2000-10-11T20:44:51Z"
|
57
|
+
# @!attribute [rw] order_by
|
58
|
+
# @return [::String]
|
59
|
+
# Order results as specified in https://google.aip.dev/132.
|
60
|
+
class SummarizeMaintenancesRequest
|
61
|
+
include ::Google::Protobuf::MessageExts
|
62
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
63
|
+
end
|
64
|
+
|
65
|
+
# Request message for SummarizeMaintenances custom method.
|
66
|
+
# @!attribute [rw] maintenances
|
67
|
+
# @return [::Array<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceSummary>]
|
68
|
+
# The resulting summaries.
|
69
|
+
# @!attribute [rw] next_page_token
|
70
|
+
# @return [::String]
|
71
|
+
# If present, the next page token can be provided to a subsequent
|
72
|
+
# SummarizeMaintenances call to list the next page.
|
73
|
+
# If empty, there are no more pages.
|
74
|
+
# @!attribute [rw] unreachable
|
75
|
+
# @return [::Array<::String>]
|
76
|
+
# Unordered list. Locations that could not be reached.
|
77
|
+
class SummarizeMaintenancesResponse
|
78
|
+
include ::Google::Protobuf::MessageExts
|
79
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
80
|
+
end
|
81
|
+
|
82
|
+
# MaintenanceSummary contains maintenance statistics calculated based on
|
83
|
+
# ResourceMaintenances within the scope: project and location.
|
84
|
+
# @!attribute [r] maintenance_name
|
85
|
+
# @return [::String]
|
86
|
+
# Output only. The name of the maintenance.
|
87
|
+
# @!attribute [r] title
|
88
|
+
# @return [::String]
|
89
|
+
# Output only. The title of the maintenance.
|
90
|
+
# @!attribute [r] description
|
91
|
+
# @return [::String]
|
92
|
+
# Output only. The description of the maintenance.
|
93
|
+
# @!attribute [r] category
|
94
|
+
# @return [::Google::Cloud::Maintenance::Api::V1beta::MaintenanceCategory]
|
95
|
+
# Output only. The category of the maintenance event.
|
96
|
+
# @!attribute [r] maintenance_scheduled_start_time
|
97
|
+
# @return [::Google::Protobuf::Timestamp]
|
98
|
+
# Output only. Scheduled start time of the maintenance. The maintenance will
|
99
|
+
# start at `maintenanceScheduledStartTime` or later, with best effort to
|
100
|
+
# finish before `maintenanceScheduledEndTime`.
|
101
|
+
# @!attribute [r] maintenance_scheduled_end_time
|
102
|
+
# @return [::Google::Protobuf::Timestamp]
|
103
|
+
# Output only. An estimated (best effort, not guaranteed) end time of the
|
104
|
+
# scheduled maintenance.
|
105
|
+
# @!attribute [r] maintenance_start_time
|
106
|
+
# @return [::Google::Protobuf::Timestamp]
|
107
|
+
# Output only. Actual date when the maintenance started. Field present only
|
108
|
+
# after the state changed to `RUNNING`.
|
109
|
+
# @!attribute [r] maintenance_end_time
|
110
|
+
# @return [::Google::Protobuf::Timestamp]
|
111
|
+
# Output only. Actual date when the maintenance successfully completed. Field
|
112
|
+
# present only after the state changed to `SUCCEEDED`.
|
113
|
+
# @!attribute [r] user_controllable
|
114
|
+
# @return [::Boolean]
|
115
|
+
# Output only. Indicates whether the user has some control over that
|
116
|
+
# maintenance, either proactively before maintenance was scheduled with
|
117
|
+
# maintenance policy or with reactive controls after it was scheduled (see
|
118
|
+
# controls field).
|
119
|
+
# @!attribute [r] controls
|
120
|
+
# @return [::Array<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceControl>]
|
121
|
+
# Output only. Control available for that Maintenance (might not be available
|
122
|
+
# for every resource that maintenance is applied to).
|
123
|
+
# @!attribute [r] stats
|
124
|
+
# @return [::Array<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceSummary::Stats>]
|
125
|
+
# Output only. Stats is a field of ResourceMaintenance used to aggregate the
|
126
|
+
# stats.
|
127
|
+
class MaintenanceSummary
|
128
|
+
include ::Google::Protobuf::MessageExts
|
129
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
130
|
+
|
131
|
+
# Stats indicates the type of aggregate and the corresponding aggregates.
|
132
|
+
# @!attribute [rw] group_by
|
133
|
+
# @return [::String]
|
134
|
+
# groupBy specifies the type of aggregate.
|
135
|
+
# For example a group_by might be `"state"`
|
136
|
+
# @!attribute [rw] aggregates
|
137
|
+
# @return [::Array<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceSummary::Aggregate>]
|
138
|
+
# Aggregates is a list <group, count> pairs. For example, if the
|
139
|
+
# group_by is `"state"` a possible tuple in the aggregates list could be
|
140
|
+
# "SCHEDULED" : `11`,
|
141
|
+
class Stats
|
142
|
+
include ::Google::Protobuf::MessageExts
|
143
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
144
|
+
end
|
145
|
+
|
146
|
+
# Aggregate is a <group, count> pair.
|
147
|
+
# @!attribute [rw] group
|
148
|
+
# @return [::String]
|
149
|
+
# Specifies what specific value of the group_by the count represents. For
|
150
|
+
# example if group_by is `"state"` its corresponding group could be
|
151
|
+
# `"SCHEDULED"`.
|
152
|
+
# @!attribute [rw] count
|
153
|
+
# @return [::Integer]
|
154
|
+
# The count of the group.
|
155
|
+
class Aggregate
|
156
|
+
include ::Google::Protobuf::MessageExts
|
157
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
# ResourceMaintenance is a resource that represents a maintenance operation
|
162
|
+
# on a resource.
|
163
|
+
# @!attribute [rw] name
|
164
|
+
# @return [::String]
|
165
|
+
# Identifier. The name of the resource_maintenance resource.
|
166
|
+
# Format:
|
167
|
+
# `"projects/{project}/locations/{location}/resourceMaintenance/{resource-maintenance-id}"`
|
168
|
+
# @!attribute [r] resource
|
169
|
+
# @return [::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance::Resource]
|
170
|
+
# Output only. The resource spec of the resource maintenance.
|
171
|
+
# @!attribute [r] maintenance
|
172
|
+
# @return [::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance::Maintenance]
|
173
|
+
# Output only. The details of the maintenance.
|
174
|
+
# @!attribute [r] state
|
175
|
+
# @return [::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance::State]
|
176
|
+
# Output only. The state of the resource maintenance.
|
177
|
+
# @!attribute [r] create_time
|
178
|
+
# @return [::Google::Protobuf::Timestamp]
|
179
|
+
# Output only. The create time of the resource maintenance.
|
180
|
+
# @!attribute [r] update_time
|
181
|
+
# @return [::Google::Protobuf::Timestamp]
|
182
|
+
# Output only. The update time of the resource maintenance.
|
183
|
+
# @!attribute [r] maintenance_start_time
|
184
|
+
# @return [::Google::Protobuf::Timestamp]
|
185
|
+
# Output only. The time when the resource maintenance has started.
|
186
|
+
# @!attribute [r] maintenance_end_time
|
187
|
+
# @return [::Google::Protobuf::Timestamp]
|
188
|
+
# Output only. The time when the resource maintenance has completed.
|
189
|
+
# @!attribute [r] maintenance_cancel_time
|
190
|
+
# @return [::Google::Protobuf::Timestamp]
|
191
|
+
# Output only. The time when the resource maintenance was cancelled.
|
192
|
+
# @!attribute [r] maintenance_scheduled_start_time
|
193
|
+
# @return [::Google::Protobuf::Timestamp]
|
194
|
+
# Output only. The time when the maintenance on the resource was scheduled to
|
195
|
+
# start.
|
196
|
+
# @!attribute [r] maintenance_scheduled_end_time
|
197
|
+
# @return [::Google::Protobuf::Timestamp]
|
198
|
+
# Output only. The time when the maintenance on the resource was scheduled to
|
199
|
+
# end.
|
200
|
+
# @!attribute [r] user_controllable
|
201
|
+
# @return [::Boolean]
|
202
|
+
# Output only. Indicates whether the user has some control over that
|
203
|
+
# maintenance, either
|
204
|
+
# proactively before maintenance was scheduled with maintenance policy or
|
205
|
+
# with reactive controls after it was scheduled (see controls field)
|
206
|
+
# @!attribute [r] controls
|
207
|
+
# @return [::Array<::Google::Cloud::Maintenance::Api::V1beta::MaintenanceControl>]
|
208
|
+
# Output only. The controls of the maintenance.
|
209
|
+
# @!attribute [rw] labels
|
210
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
211
|
+
# Optional. The labels on the resource, which can be used for categorization.
|
212
|
+
# similar to Kubernetes resource labels.
|
213
|
+
# @!attribute [rw] annotations
|
214
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
215
|
+
# Optional. Annotations is an unstructured key-value map stored with a
|
216
|
+
# resource that may be set by external tools to store and retrieve arbitrary
|
217
|
+
# metadata. They are not queryable and should be preserved when modifying
|
218
|
+
# objects.
|
219
|
+
#
|
220
|
+
# More info: https://kubernetes.io/docs/user-guide/annotations
|
221
|
+
# @!attribute [r] uid
|
222
|
+
# @return [::String]
|
223
|
+
# Output only. The unique identifier of the resource. UID is unique in the
|
224
|
+
# time and space for this resource within the scope of the service. It is
|
225
|
+
# typically generated by the server on successful creation of a resource
|
226
|
+
# and must not be changed. UID is used to uniquely identify resources
|
227
|
+
# with resource name reuses. This should be a UUID4.
|
228
|
+
# @!attribute [r] etag
|
229
|
+
# @return [::String]
|
230
|
+
# Output only. An opaque value that uniquely identifies a version or
|
231
|
+
# generation of a resource. It can be used to confirm that the client
|
232
|
+
# and server agree on the ordering of a resource being written.
|
233
|
+
class ResourceMaintenance
|
234
|
+
include ::Google::Protobuf::MessageExts
|
235
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
236
|
+
|
237
|
+
# Resource contains information about the resource affected by maintenance.
|
238
|
+
# @!attribute [r] resource_name
|
239
|
+
# @return [::String]
|
240
|
+
# Output only. Name is the reference to the consumer resource affected by
|
241
|
+
# the maintenance. Available values can be found here:
|
242
|
+
# https://cloud.google.com/asset-inventory/docs/asset-names
|
243
|
+
# @!attribute [r] location
|
244
|
+
# @return [::String]
|
245
|
+
# Output only. The location of the resource.
|
246
|
+
# Format:
|
247
|
+
# `us-central1`
|
248
|
+
# @!attribute [r] type
|
249
|
+
# @return [::String]
|
250
|
+
# Output only. The type of the resource.
|
251
|
+
# Available values can be found here:
|
252
|
+
# https://cloud.google.com/asset-inventory/docs/asset-types#supported_resource_types
|
253
|
+
# Please note that not all the resource types will have their maintenances
|
254
|
+
# reported.
|
255
|
+
class Resource
|
256
|
+
include ::Google::Protobuf::MessageExts
|
257
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
258
|
+
end
|
259
|
+
|
260
|
+
# Maintenance is the maintenance details of a resource's maintenance.
|
261
|
+
# @!attribute [rw] maintenance_name
|
262
|
+
# @return [::String]
|
263
|
+
# Maintenance is the name of the corresponding maintenance resource
|
264
|
+
# following the standard naming scheme: `"{maintenance-id}"`
|
265
|
+
# @!attribute [r] title
|
266
|
+
# @return [::String]
|
267
|
+
# Output only. The title of the maintenance.
|
268
|
+
# @!attribute [r] description
|
269
|
+
# @return [::String]
|
270
|
+
# Output only. The description of the maintenance.
|
271
|
+
# @!attribute [r] category
|
272
|
+
# @return [::Google::Cloud::Maintenance::Api::V1beta::MaintenanceCategory]
|
273
|
+
# Output only. The category of the maintenance.
|
274
|
+
class Maintenance
|
275
|
+
include ::Google::Protobuf::MessageExts
|
276
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
277
|
+
end
|
278
|
+
|
279
|
+
# @!attribute [rw] key
|
280
|
+
# @return [::String]
|
281
|
+
# @!attribute [rw] value
|
282
|
+
# @return [::String]
|
283
|
+
class LabelsEntry
|
284
|
+
include ::Google::Protobuf::MessageExts
|
285
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
286
|
+
end
|
287
|
+
|
288
|
+
# @!attribute [rw] key
|
289
|
+
# @return [::String]
|
290
|
+
# @!attribute [rw] value
|
291
|
+
# @return [::String]
|
292
|
+
class AnnotationsEntry
|
293
|
+
include ::Google::Protobuf::MessageExts
|
294
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
295
|
+
end
|
296
|
+
|
297
|
+
# State is the state of a resource maintenance.
|
298
|
+
module State
|
299
|
+
# Unspecified state.
|
300
|
+
STATE_UNSPECIFIED = 0
|
301
|
+
|
302
|
+
# Scheduled for a particular window. For disruptive maintenance it should
|
303
|
+
# respect maintenance policy, i.e. its available windows, exclusions and
|
304
|
+
# notification period.
|
305
|
+
SCHEDULED = 1
|
306
|
+
|
307
|
+
# Maintenance is ongoing.
|
308
|
+
RUNNING = 2
|
309
|
+
|
310
|
+
# No longer planned, typically when other maintenance (e.g. upgrade to
|
311
|
+
# newer version) already happened, or the user skipped the maintenance.
|
312
|
+
CANCELLED = 3
|
313
|
+
|
314
|
+
# Successfully completed.
|
315
|
+
SUCCEEDED = 4
|
316
|
+
end
|
317
|
+
end
|
318
|
+
|
319
|
+
# The control of the maintenance.
|
320
|
+
# @!attribute [rw] control
|
321
|
+
# @return [::Google::Cloud::Maintenance::Api::V1beta::MaintenanceControl::Control]
|
322
|
+
# The control of the resource maintenance.
|
323
|
+
# @!attribute [rw] is_custom
|
324
|
+
# @return [::Boolean]
|
325
|
+
# Indicates whether the control is available only in Service Producer API
|
326
|
+
# (not through Unified Maintenance).
|
327
|
+
# @!attribute [rw] documentation
|
328
|
+
# @return [::String]
|
329
|
+
# Link to Service Producer documentation about maintenance control. Provided
|
330
|
+
# only when `isCustom` is `true`.
|
331
|
+
class MaintenanceControl
|
332
|
+
include ::Google::Protobuf::MessageExts
|
333
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
334
|
+
|
335
|
+
# Sets the type of control supported. comment (as in logs).
|
336
|
+
module Control
|
337
|
+
# Unspecified control.
|
338
|
+
CONTROL_UNSPECIFIED = 0
|
339
|
+
|
340
|
+
# Apply control.
|
341
|
+
APPLY = 1
|
342
|
+
|
343
|
+
# Manage policy control.
|
344
|
+
MANAGE_POLICY = 2
|
345
|
+
|
346
|
+
# Reschedule control.
|
347
|
+
RESCHEDULE = 3
|
348
|
+
end
|
349
|
+
end
|
350
|
+
|
351
|
+
# The request structure for the ListResourceMaintenances method.
|
352
|
+
# @!attribute [rw] parent
|
353
|
+
# @return [::String]
|
354
|
+
# Required. The parent of the resource maintenance.
|
355
|
+
# @!attribute [rw] page_size
|
356
|
+
# @return [::Integer]
|
357
|
+
# The maximum number of resource maintenances to send per page.
|
358
|
+
# @!attribute [rw] page_token
|
359
|
+
# @return [::String]
|
360
|
+
# The page token: If the next_page_token from a previous response
|
361
|
+
# is provided, this request will send the subsequent page.
|
362
|
+
# @!attribute [rw] filter
|
363
|
+
# @return [::String]
|
364
|
+
# Filter the list as specified in https://google.aip.dev/160.
|
365
|
+
# @!attribute [rw] order_by
|
366
|
+
# @return [::String]
|
367
|
+
# Order results as specified in https://google.aip.dev/132.
|
368
|
+
class ListResourceMaintenancesRequest
|
369
|
+
include ::Google::Protobuf::MessageExts
|
370
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
371
|
+
end
|
372
|
+
|
373
|
+
# The response structure for the ListResourceMaintenances method.
|
374
|
+
# @!attribute [rw] resource_maintenances
|
375
|
+
# @return [::Array<::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance>]
|
376
|
+
# The resulting resource maintenances.
|
377
|
+
# @!attribute [rw] next_page_token
|
378
|
+
# @return [::String]
|
379
|
+
# If present, the next page token can be provided to a subsequent
|
380
|
+
# ListResourceMaintenances call to list the next page.
|
381
|
+
# If empty, there are no more pages.
|
382
|
+
# @!attribute [rw] unreachable
|
383
|
+
# @return [::Array<::String>]
|
384
|
+
# Locations that could not be reached.
|
385
|
+
class ListResourceMaintenancesResponse
|
386
|
+
include ::Google::Protobuf::MessageExts
|
387
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
388
|
+
end
|
389
|
+
|
390
|
+
# The request structure for the GetResourceMaintenance method.
|
391
|
+
# @!attribute [rw] name
|
392
|
+
# @return [::String]
|
393
|
+
# Required. The resource name of the resource within a service.
|
394
|
+
class GetResourceMaintenanceRequest
|
395
|
+
include ::Google::Protobuf::MessageExts
|
396
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
397
|
+
end
|
398
|
+
|
399
|
+
# The Category of the maintenance.
|
400
|
+
module MaintenanceCategory
|
401
|
+
# Unspecified category.
|
402
|
+
MAINTENANCE_CATEGORY_UNSPECIFIED = 0
|
403
|
+
|
404
|
+
# Infrastructure maintenance events are times that Google Cloud performs
|
405
|
+
# regular maintenance on network equipment e.g. Google Cloud Interconnect
|
406
|
+
# These events are usually scheduled in advance and we provide
|
407
|
+
# notification, when possible, so that users can plan for the
|
408
|
+
# infrastructure maintenance event and prevent downtime. Infrastructure
|
409
|
+
# maintenance events don't have a set interval between occurrences, but
|
410
|
+
# generally occur several times a year.
|
411
|
+
INFRASTRUCTURE = 1
|
412
|
+
|
413
|
+
# Updates that can include bug fixes, changes, or new features that are
|
414
|
+
# backward compatible with existing versions (including patches).
|
415
|
+
# Some SPs allow users to control the scheduling of these maintenance
|
416
|
+
# events using maintenance windows and/or deny maintenance features.
|
417
|
+
SERVICE_UPDATE = 3
|
418
|
+
end
|
419
|
+
end
|
420
|
+
end
|
421
|
+
end
|
422
|
+
end
|
423
|
+
end
|
@@ -0,0 +1,145 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# `Any` contains an arbitrary serialized protocol buffer message along with a
|
23
|
+
# URL that describes the type of the serialized message.
|
24
|
+
#
|
25
|
+
# Protobuf library provides support to pack/unpack Any values in the form
|
26
|
+
# of utility functions or additional generated methods of the Any type.
|
27
|
+
#
|
28
|
+
# Example 1: Pack and unpack a message in C++.
|
29
|
+
#
|
30
|
+
# Foo foo = ...;
|
31
|
+
# Any any;
|
32
|
+
# any.PackFrom(foo);
|
33
|
+
# ...
|
34
|
+
# if (any.UnpackTo(&foo)) {
|
35
|
+
# ...
|
36
|
+
# }
|
37
|
+
#
|
38
|
+
# Example 2: Pack and unpack a message in Java.
|
39
|
+
#
|
40
|
+
# Foo foo = ...;
|
41
|
+
# Any any = Any.pack(foo);
|
42
|
+
# ...
|
43
|
+
# if (any.is(Foo.class)) {
|
44
|
+
# foo = any.unpack(Foo.class);
|
45
|
+
# }
|
46
|
+
# // or ...
|
47
|
+
# if (any.isSameTypeAs(Foo.getDefaultInstance())) {
|
48
|
+
# foo = any.unpack(Foo.getDefaultInstance());
|
49
|
+
# }
|
50
|
+
#
|
51
|
+
# Example 3: Pack and unpack a message in Python.
|
52
|
+
#
|
53
|
+
# foo = Foo(...)
|
54
|
+
# any = Any()
|
55
|
+
# any.Pack(foo)
|
56
|
+
# ...
|
57
|
+
# if any.Is(Foo.DESCRIPTOR):
|
58
|
+
# any.Unpack(foo)
|
59
|
+
# ...
|
60
|
+
#
|
61
|
+
# Example 4: Pack and unpack a message in Go
|
62
|
+
#
|
63
|
+
# foo := &pb.Foo{...}
|
64
|
+
# any, err := anypb.New(foo)
|
65
|
+
# if err != nil {
|
66
|
+
# ...
|
67
|
+
# }
|
68
|
+
# ...
|
69
|
+
# foo := &pb.Foo{}
|
70
|
+
# if err := any.UnmarshalTo(foo); err != nil {
|
71
|
+
# ...
|
72
|
+
# }
|
73
|
+
#
|
74
|
+
# The pack methods provided by protobuf library will by default use
|
75
|
+
# 'type.googleapis.com/full.type.name' as the type URL and the unpack
|
76
|
+
# methods only use the fully qualified type name after the last '/'
|
77
|
+
# in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
78
|
+
# name "y.z".
|
79
|
+
#
|
80
|
+
# JSON
|
81
|
+
# ====
|
82
|
+
# The JSON representation of an `Any` value uses the regular
|
83
|
+
# representation of the deserialized, embedded message, with an
|
84
|
+
# additional field `@type` which contains the type URL. Example:
|
85
|
+
#
|
86
|
+
# package google.profile;
|
87
|
+
# message Person {
|
88
|
+
# string first_name = 1;
|
89
|
+
# string last_name = 2;
|
90
|
+
# }
|
91
|
+
#
|
92
|
+
# {
|
93
|
+
# "@type": "type.googleapis.com/google.profile.Person",
|
94
|
+
# "firstName": <string>,
|
95
|
+
# "lastName": <string>
|
96
|
+
# }
|
97
|
+
#
|
98
|
+
# If the embedded message type is well-known and has a custom JSON
|
99
|
+
# representation, that representation will be embedded adding a field
|
100
|
+
# `value` which holds the custom JSON in addition to the `@type`
|
101
|
+
# field. Example (for message [google.protobuf.Duration][]):
|
102
|
+
#
|
103
|
+
# {
|
104
|
+
# "@type": "type.googleapis.com/google.protobuf.Duration",
|
105
|
+
# "value": "1.212s"
|
106
|
+
# }
|
107
|
+
# @!attribute [rw] type_url
|
108
|
+
# @return [::String]
|
109
|
+
# A URL/resource name that uniquely identifies the type of the serialized
|
110
|
+
# protocol buffer message. This string must contain at least
|
111
|
+
# one "/" character. The last segment of the URL's path must represent
|
112
|
+
# the fully qualified name of the type (as in
|
113
|
+
# `path/google.protobuf.Duration`). The name should be in a canonical form
|
114
|
+
# (e.g., leading "." is not accepted).
|
115
|
+
#
|
116
|
+
# In practice, teams usually precompile into the binary all types that they
|
117
|
+
# expect it to use in the context of Any. However, for URLs which use the
|
118
|
+
# scheme `http`, `https`, or no scheme, one can optionally set up a type
|
119
|
+
# server that maps type URLs to message definitions as follows:
|
120
|
+
#
|
121
|
+
# * If no scheme is provided, `https` is assumed.
|
122
|
+
# * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
123
|
+
# value in binary format, or produce an error.
|
124
|
+
# * Applications are allowed to cache lookup results based on the
|
125
|
+
# URL, or have them precompiled into a binary to avoid any
|
126
|
+
# lookup. Therefore, binary compatibility needs to be preserved
|
127
|
+
# on changes to types. (Use versioned type names to manage
|
128
|
+
# breaking changes.)
|
129
|
+
#
|
130
|
+
# Note: this functionality is not currently available in the official
|
131
|
+
# protobuf release, and it is not used for type URLs beginning with
|
132
|
+
# type.googleapis.com. As of May 2023, there are no widely used type server
|
133
|
+
# implementations and no plans to implement one.
|
134
|
+
#
|
135
|
+
# Schemes other than `http`, `https` (or the empty scheme) might be
|
136
|
+
# used with implementation specific semantics.
|
137
|
+
# @!attribute [rw] value
|
138
|
+
# @return [::String]
|
139
|
+
# Must be a valid serialized protocol buffer of the above specified type.
|
140
|
+
class Any
|
141
|
+
include ::Google::Protobuf::MessageExts
|
142
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# A Duration represents a signed, fixed-length span of time represented
|
23
|
+
# as a count of seconds and fractions of seconds at nanosecond
|
24
|
+
# resolution. It is independent of any calendar and concepts like "day"
|
25
|
+
# or "month". It is related to Timestamp in that the difference between
|
26
|
+
# two Timestamp values is a Duration and it can be added or subtracted
|
27
|
+
# from a Timestamp. Range is approximately +-10,000 years.
|
28
|
+
#
|
29
|
+
# # Examples
|
30
|
+
#
|
31
|
+
# Example 1: Compute Duration from two Timestamps in pseudo code.
|
32
|
+
#
|
33
|
+
# Timestamp start = ...;
|
34
|
+
# Timestamp end = ...;
|
35
|
+
# Duration duration = ...;
|
36
|
+
#
|
37
|
+
# duration.seconds = end.seconds - start.seconds;
|
38
|
+
# duration.nanos = end.nanos - start.nanos;
|
39
|
+
#
|
40
|
+
# if (duration.seconds < 0 && duration.nanos > 0) {
|
41
|
+
# duration.seconds += 1;
|
42
|
+
# duration.nanos -= 1000000000;
|
43
|
+
# } else if (duration.seconds > 0 && duration.nanos < 0) {
|
44
|
+
# duration.seconds -= 1;
|
45
|
+
# duration.nanos += 1000000000;
|
46
|
+
# }
|
47
|
+
#
|
48
|
+
# Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
|
49
|
+
#
|
50
|
+
# Timestamp start = ...;
|
51
|
+
# Duration duration = ...;
|
52
|
+
# Timestamp end = ...;
|
53
|
+
#
|
54
|
+
# end.seconds = start.seconds + duration.seconds;
|
55
|
+
# end.nanos = start.nanos + duration.nanos;
|
56
|
+
#
|
57
|
+
# if (end.nanos < 0) {
|
58
|
+
# end.seconds -= 1;
|
59
|
+
# end.nanos += 1000000000;
|
60
|
+
# } else if (end.nanos >= 1000000000) {
|
61
|
+
# end.seconds += 1;
|
62
|
+
# end.nanos -= 1000000000;
|
63
|
+
# }
|
64
|
+
#
|
65
|
+
# Example 3: Compute Duration from datetime.timedelta in Python.
|
66
|
+
#
|
67
|
+
# td = datetime.timedelta(days=3, minutes=10)
|
68
|
+
# duration = Duration()
|
69
|
+
# duration.FromTimedelta(td)
|
70
|
+
#
|
71
|
+
# # JSON Mapping
|
72
|
+
#
|
73
|
+
# In JSON format, the Duration type is encoded as a string rather than an
|
74
|
+
# object, where the string ends in the suffix "s" (indicating seconds) and
|
75
|
+
# is preceded by the number of seconds, with nanoseconds expressed as
|
76
|
+
# fractional seconds. For example, 3 seconds with 0 nanoseconds should be
|
77
|
+
# encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
|
78
|
+
# be expressed in JSON format as "3.000000001s", and 3 seconds and 1
|
79
|
+
# microsecond should be expressed in JSON format as "3.000001s".
|
80
|
+
# @!attribute [rw] seconds
|
81
|
+
# @return [::Integer]
|
82
|
+
# Signed seconds of the span of time. Must be from -315,576,000,000
|
83
|
+
# to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
84
|
+
# 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
|
85
|
+
# @!attribute [rw] nanos
|
86
|
+
# @return [::Integer]
|
87
|
+
# Signed fractions of a second at nanosecond resolution of the span
|
88
|
+
# of time. Durations less than one second are represented with a 0
|
89
|
+
# `seconds` field and a positive or negative `nanos` field. For durations
|
90
|
+
# of one second or more, a non-zero value for the `nanos` field must be
|
91
|
+
# of the same sign as the `seconds` field. Must be from -999,999,999
|
92
|
+
# to +999,999,999 inclusive.
|
93
|
+
class Duration
|
94
|
+
include ::Google::Protobuf::MessageExts
|
95
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|