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,266 @@
|
|
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
|
+
require "google/cloud/maintenance/api/v1beta/maintenance_service_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Maintenance
|
24
|
+
module Api
|
25
|
+
module V1beta
|
26
|
+
module Maintenance
|
27
|
+
module Rest
|
28
|
+
##
|
29
|
+
# REST service stub for the Maintenance service.
|
30
|
+
# Service stub contains baseline method implementations
|
31
|
+
# including transcoding, making the REST call, and deserialing the response.
|
32
|
+
#
|
33
|
+
class ServiceStub
|
34
|
+
# @private
|
35
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
36
|
+
# These require statements are intentionally placed here to initialize
|
37
|
+
# the REST modules only when it's required.
|
38
|
+
require "gapic/rest"
|
39
|
+
|
40
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
41
|
+
endpoint_template: endpoint_template,
|
42
|
+
universe_domain: universe_domain,
|
43
|
+
credentials: credentials,
|
44
|
+
numeric_enums: true,
|
45
|
+
service_name: self.class,
|
46
|
+
raise_faraday_errors: false,
|
47
|
+
logger: logger
|
48
|
+
end
|
49
|
+
|
50
|
+
##
|
51
|
+
# The effective universe domain
|
52
|
+
#
|
53
|
+
# @return [String]
|
54
|
+
#
|
55
|
+
def universe_domain
|
56
|
+
@client_stub.universe_domain
|
57
|
+
end
|
58
|
+
|
59
|
+
##
|
60
|
+
# The effective endpoint
|
61
|
+
#
|
62
|
+
# @return [String]
|
63
|
+
#
|
64
|
+
def endpoint
|
65
|
+
@client_stub.endpoint
|
66
|
+
end
|
67
|
+
|
68
|
+
##
|
69
|
+
# The logger used for request/response debug logging.
|
70
|
+
#
|
71
|
+
# @return [Logger]
|
72
|
+
#
|
73
|
+
def logger stub: false
|
74
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
75
|
+
end
|
76
|
+
|
77
|
+
##
|
78
|
+
# Baseline implementation for the summarize_maintenances REST call
|
79
|
+
#
|
80
|
+
# @param request_pb [::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest]
|
81
|
+
# A request object representing the call parameters. Required.
|
82
|
+
# @param options [::Gapic::CallOptions]
|
83
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
84
|
+
#
|
85
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
86
|
+
# @yieldparam result [::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesResponse]
|
87
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
88
|
+
#
|
89
|
+
# @return [::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesResponse]
|
90
|
+
# A result object deserialized from the server's reply
|
91
|
+
def summarize_maintenances request_pb, options = nil
|
92
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
93
|
+
|
94
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_summarize_maintenances_request request_pb
|
95
|
+
query_string_params = if query_string_params.any?
|
96
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
97
|
+
else
|
98
|
+
{}
|
99
|
+
end
|
100
|
+
|
101
|
+
response = @client_stub.make_http_request(
|
102
|
+
verb,
|
103
|
+
uri: uri,
|
104
|
+
body: body || "",
|
105
|
+
params: query_string_params,
|
106
|
+
method_name: "summarize_maintenances",
|
107
|
+
options: options
|
108
|
+
)
|
109
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
110
|
+
result = ::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesResponse.decode_json response.body, ignore_unknown_fields: true
|
111
|
+
catch :response do
|
112
|
+
yield result, operation if block_given?
|
113
|
+
result
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
##
|
118
|
+
# Baseline implementation for the list_resource_maintenances REST call
|
119
|
+
#
|
120
|
+
# @param request_pb [::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest]
|
121
|
+
# A request object representing the call parameters. Required.
|
122
|
+
# @param options [::Gapic::CallOptions]
|
123
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
124
|
+
#
|
125
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
126
|
+
# @yieldparam result [::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesResponse]
|
127
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
128
|
+
#
|
129
|
+
# @return [::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesResponse]
|
130
|
+
# A result object deserialized from the server's reply
|
131
|
+
def list_resource_maintenances request_pb, options = nil
|
132
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
133
|
+
|
134
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_maintenances_request request_pb
|
135
|
+
query_string_params = if query_string_params.any?
|
136
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
137
|
+
else
|
138
|
+
{}
|
139
|
+
end
|
140
|
+
|
141
|
+
response = @client_stub.make_http_request(
|
142
|
+
verb,
|
143
|
+
uri: uri,
|
144
|
+
body: body || "",
|
145
|
+
params: query_string_params,
|
146
|
+
method_name: "list_resource_maintenances",
|
147
|
+
options: options
|
148
|
+
)
|
149
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
150
|
+
result = ::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesResponse.decode_json response.body, ignore_unknown_fields: true
|
151
|
+
catch :response do
|
152
|
+
yield result, operation if block_given?
|
153
|
+
result
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# Baseline implementation for the get_resource_maintenance REST call
|
159
|
+
#
|
160
|
+
# @param request_pb [::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest]
|
161
|
+
# A request object representing the call parameters. Required.
|
162
|
+
# @param options [::Gapic::CallOptions]
|
163
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
164
|
+
#
|
165
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
166
|
+
# @yieldparam result [::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance]
|
167
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
168
|
+
#
|
169
|
+
# @return [::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance]
|
170
|
+
# A result object deserialized from the server's reply
|
171
|
+
def get_resource_maintenance request_pb, options = nil
|
172
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
173
|
+
|
174
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_resource_maintenance_request request_pb
|
175
|
+
query_string_params = if query_string_params.any?
|
176
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
177
|
+
else
|
178
|
+
{}
|
179
|
+
end
|
180
|
+
|
181
|
+
response = @client_stub.make_http_request(
|
182
|
+
verb,
|
183
|
+
uri: uri,
|
184
|
+
body: body || "",
|
185
|
+
params: query_string_params,
|
186
|
+
method_name: "get_resource_maintenance",
|
187
|
+
options: options
|
188
|
+
)
|
189
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
190
|
+
result = ::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance.decode_json response.body, ignore_unknown_fields: true
|
191
|
+
catch :response do
|
192
|
+
yield result, operation if block_given?
|
193
|
+
result
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
##
|
198
|
+
# @private
|
199
|
+
#
|
200
|
+
# GRPC transcoding helper method for the summarize_maintenances REST call
|
201
|
+
#
|
202
|
+
# @param request_pb [::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest]
|
203
|
+
# A request object representing the call parameters. Required.
|
204
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
205
|
+
# Uri, Body, Query string parameters
|
206
|
+
def self.transcode_summarize_maintenances_request request_pb
|
207
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
208
|
+
.with_bindings(
|
209
|
+
uri_method: :get,
|
210
|
+
uri_template: "/v1beta/{parent}/resourceMaintenances:summarize",
|
211
|
+
matches: [
|
212
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
213
|
+
]
|
214
|
+
)
|
215
|
+
transcoder.transcode request_pb
|
216
|
+
end
|
217
|
+
|
218
|
+
##
|
219
|
+
# @private
|
220
|
+
#
|
221
|
+
# GRPC transcoding helper method for the list_resource_maintenances REST call
|
222
|
+
#
|
223
|
+
# @param request_pb [::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest]
|
224
|
+
# A request object representing the call parameters. Required.
|
225
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
226
|
+
# Uri, Body, Query string parameters
|
227
|
+
def self.transcode_list_resource_maintenances_request request_pb
|
228
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
229
|
+
.with_bindings(
|
230
|
+
uri_method: :get,
|
231
|
+
uri_template: "/v1beta/{parent}/resourceMaintenances",
|
232
|
+
matches: [
|
233
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
234
|
+
]
|
235
|
+
)
|
236
|
+
transcoder.transcode request_pb
|
237
|
+
end
|
238
|
+
|
239
|
+
##
|
240
|
+
# @private
|
241
|
+
#
|
242
|
+
# GRPC transcoding helper method for the get_resource_maintenance REST call
|
243
|
+
#
|
244
|
+
# @param request_pb [::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest]
|
245
|
+
# A request object representing the call parameters. Required.
|
246
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
247
|
+
# Uri, Body, Query string parameters
|
248
|
+
def self.transcode_get_resource_maintenance_request request_pb
|
249
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
250
|
+
.with_bindings(
|
251
|
+
uri_method: :get,
|
252
|
+
uri_template: "/v1beta/{name}",
|
253
|
+
matches: [
|
254
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/resourceMaintenances/[^/]+/?$}, false]
|
255
|
+
]
|
256
|
+
)
|
257
|
+
transcoder.transcode request_pb
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|
261
|
+
end
|
262
|
+
end
|
263
|
+
end
|
264
|
+
end
|
265
|
+
end
|
266
|
+
end
|
@@ -0,0 +1,55 @@
|
|
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
|
+
require "gapic/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/maintenance/api/v1beta/version"
|
24
|
+
require "google/cloud/maintenance/api/v1beta/bindings_override"
|
25
|
+
|
26
|
+
require "google/cloud/maintenance/api/v1beta/maintenance/credentials"
|
27
|
+
require "google/cloud/maintenance/api/v1beta/maintenance/paths"
|
28
|
+
require "google/cloud/maintenance/api/v1beta/maintenance/rest/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module Maintenance
|
33
|
+
module Api
|
34
|
+
module V1beta
|
35
|
+
##
|
36
|
+
# Unified Maintenance service
|
37
|
+
#
|
38
|
+
# To load this service and instantiate a REST client:
|
39
|
+
#
|
40
|
+
# require "google/cloud/maintenance/api/v1beta/maintenance/rest"
|
41
|
+
# client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new
|
42
|
+
#
|
43
|
+
module Maintenance
|
44
|
+
# Client for the REST transport
|
45
|
+
module Rest
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
55
|
+
require "google/cloud/maintenance/api/v1beta/maintenance/rest/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,57 @@
|
|
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
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/maintenance/api/v1beta/version"
|
24
|
+
|
25
|
+
require "google/cloud/maintenance/api/v1beta/maintenance/credentials"
|
26
|
+
require "google/cloud/maintenance/api/v1beta/maintenance/paths"
|
27
|
+
require "google/cloud/maintenance/api/v1beta/maintenance/client"
|
28
|
+
require "google/cloud/maintenance/api/v1beta/maintenance/rest"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module Maintenance
|
33
|
+
module Api
|
34
|
+
module V1beta
|
35
|
+
##
|
36
|
+
# Unified Maintenance service
|
37
|
+
#
|
38
|
+
# @example Load this service and instantiate a gRPC client
|
39
|
+
#
|
40
|
+
# require "google/cloud/maintenance/api/v1beta/maintenance"
|
41
|
+
# client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new
|
42
|
+
#
|
43
|
+
# @example Load this service and instantiate a REST client
|
44
|
+
#
|
45
|
+
# require "google/cloud/maintenance/api/v1beta/maintenance/rest"
|
46
|
+
# client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new
|
47
|
+
#
|
48
|
+
module Maintenance
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
helper_path = ::File.join __dir__, "maintenance", "helpers.rb"
|
57
|
+
require "google/cloud/maintenance/api/v1beta/maintenance/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/cloud/maintenance/api/v1beta/maintenance_service.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
require 'google/api/client_pb'
|
9
|
+
require 'google/api/field_behavior_pb'
|
10
|
+
require 'google/api/field_info_pb'
|
11
|
+
require 'google/api/resource_pb'
|
12
|
+
require 'google/protobuf/timestamp_pb'
|
13
|
+
|
14
|
+
|
15
|
+
descriptor_data = "\n=google/cloud/maintenance/api/v1beta/maintenance_service.proto\x12#google.cloud.maintenance.api.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb4\x01\n\x1cSummarizeMaintenancesRequest\x12G\n\x06parent\x18\x96N \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.maintenance.googleapis.com/ResourceMaintenance\x12\x12\n\tpage_size\x18\x89R \x01(\x05\x12\x13\n\npage_token\x18\x8aR \x01(\t\x12\x0f\n\x06\x66ilter\x18\x8bR \x01(\t\x12\x11\n\x08order_by\x18\x8cR \x01(\t\"\xa4\x01\n\x1dSummarizeMaintenancesResponse\x12N\n\x0cmaintenances\x18\x8dR \x03(\x0b\x32\x37.google.cloud.maintenance.api.v1beta.MaintenanceSummary\x12\x18\n\x0fnext_page_token\x18\x8eR \x01(\t\x12\x19\n\x0bunreachable\x18\x8fR \x03(\tB\x03\xe0\x41\x06\"\xa6\x06\n\x12MaintenanceSummary\x12\x1d\n\x10maintenance_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05title\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12O\n\x08\x63\x61tegory\x18\r \x01(\x0e\x32\x38.google.cloud.maintenance.api.v1beta.MaintenanceCategoryB\x03\xe0\x41\x03\x12I\n maintenance_scheduled_start_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x1emaintenance_scheduled_end_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x16maintenance_start_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14maintenance_end_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1e\n\x11user_controllable\x18\n \x01(\x08\x42\x03\xe0\x41\x03\x12N\n\x08\x63ontrols\x18\x0e \x03(\x0b\x32\x37.google.cloud.maintenance.api.v1beta.MaintenanceControlB\x03\xe0\x41\x03\x12Q\n\x05stats\x18\x0c \x03(\x0b\x32=.google.cloud.maintenance.api.v1beta.MaintenanceSummary.StatsB\x03\xe0\x41\x03\x1ap\n\x05Stats\x12\x10\n\x08group_by\x18\x01 \x01(\t\x12U\n\naggregates\x18\x02 \x03(\x0b\x32\x41.google.cloud.maintenance.api.v1beta.MaintenanceSummary.Aggregate\x1a)\n\tAggregate\x12\r\n\x05group\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xc8\r\n\x13ResourceMaintenance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12X\n\x08resource\x18\x02 \x01(\x0b\x32\x41.google.cloud.maintenance.api.v1beta.ResourceMaintenance.ResourceB\x03\xe0\x41\x03\x12^\n\x0bmaintenance\x18\x03 \x01(\x0b\x32\x44.google.cloud.maintenance.api.v1beta.ResourceMaintenance.MaintenanceB\x03\xe0\x41\x03\x12R\n\x05state\x18\x04 \x01(\x0e\x32>.google.cloud.maintenance.api.v1beta.ResourceMaintenance.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x16maintenance_start_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14maintenance_end_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x17maintenance_cancel_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n maintenance_scheduled_start_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x1emaintenance_scheduled_end_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1e\n\x11user_controllable\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\x12N\n\x08\x63ontrols\x18\r \x03(\x0b\x32\x37.google.cloud.maintenance.api.v1beta.MaintenanceControlB\x03\xe0\x41\x03\x12Z\n\x06labels\x18\xa1Q \x03(\x0b\x32\x44.google.cloud.maintenance.api.v1beta.ResourceMaintenance.LabelsEntryB\x03\xe0\x41\x01\x12\x64\n\x0b\x61nnotations\x18\xa2Q \x03(\x0b\x32I.google.cloud.maintenance.api.v1beta.ResourceMaintenance.AnnotationsEntryB\x03\xe0\x41\x01\x12\x19\n\x03uid\x18\xd9O \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x12\n\x04\x65tag\x18\xdaO \x01(\tB\x03\xe0\x41\x03\x1aP\n\x08Resource\x12\x1a\n\rresource_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08location\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x03 \x01(\tB\x03\xe0\x41\x03\x1a\xa6\x01\n\x0bMaintenance\x12\x18\n\x10maintenance_name\x18\x01 \x01(\t\x12\x12\n\x05title\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12O\n\x08\x63\x61tegory\x18\x04 \x01(\x0e\x32\x38.google.cloud.maintenance.api.v1beta.MaintenanceCategoryB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"X\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04:\xb4\x01\xea\x41\xb0\x01\n.maintenance.googleapis.com/ResourceMaintenance\x12Sprojects/{project}/locations/{location}/resourceMaintenances/{resource_maintenance}*\x14resourceMaintenances2\x13resourceMaintenance\"\xe2\x01\n\x12MaintenanceControl\x12P\n\x07\x63ontrol\x18\x01 \x01(\x0e\x32?.google.cloud.maintenance.api.v1beta.MaintenanceControl.Control\x12\x11\n\tis_custom\x18\x02 \x01(\x08\x12\x15\n\rdocumentation\x18\x03 \x01(\t\"P\n\x07\x43ontrol\x12\x17\n\x13\x43ONTROL_UNSPECIFIED\x10\x00\x12\t\n\x05\x41PPLY\x10\x01\x12\x11\n\rMANAGE_POLICY\x10\x02\x12\x0e\n\nRESCHEDULE\x10\x03\"\xb7\x01\n\x1fListResourceMaintenancesRequest\x12G\n\x06parent\x18\x96N \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.maintenance.googleapis.com/ResourceMaintenance\x12\x12\n\tpage_size\x18\x89R \x01(\x05\x12\x13\n\npage_token\x18\x8aR \x01(\t\x12\x0f\n\x06\x66ilter\x18\x8bR \x01(\t\x12\x11\n\x08order_by\x18\x8cR \x01(\t\"\xac\x01\n ListResourceMaintenancesResponse\x12X\n\x15resource_maintenances\x18\x8dR \x03(\x0b\x32\x38.google.cloud.maintenance.api.v1beta.ResourceMaintenance\x12\x18\n\x0fnext_page_token\x18\x8eR \x01(\t\x12\x14\n\x0bunreachable\x18\x8fR \x03(\t\"f\n\x1dGetResourceMaintenanceRequest\x12\x45\n\x04name\x18\x91N \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.maintenance.googleapis.com/ResourceMaintenance*c\n\x13MaintenanceCategory\x12$\n MAINTENANCE_CATEGORY_UNSPECIFIED\x10\x00\x12\x12\n\x0eINFRASTRUCTURE\x10\x01\x12\x12\n\x0eSERVICE_UPDATE\x10\x03\x32\xb6\x06\n\x0bMaintenance\x12\xf7\x01\n\x15SummarizeMaintenances\x12\x41.google.cloud.maintenance.api.v1beta.SummarizeMaintenancesRequest\x1a\x42.google.cloud.maintenance.api.v1beta.SummarizeMaintenancesResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1beta/{parent=projects/*/locations/*}/resourceMaintenances:summarize\x12\xf6\x01\n\x18ListResourceMaintenances\x12\x44.google.cloud.maintenance.api.v1beta.ListResourceMaintenancesRequest\x1a\x45.google.cloud.maintenance.api.v1beta.ListResourceMaintenancesResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12</v1beta/{parent=projects/*/locations/*}/resourceMaintenances\x12\xe3\x01\n\x16GetResourceMaintenance\x12\x42.google.cloud.maintenance.api.v1beta.GetResourceMaintenanceRequest\x1a\x38.google.cloud.maintenance.api.v1beta.ResourceMaintenance\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\x12</v1beta/{name=projects/*/locations/*/resourceMaintenances/*}\x1aN\xca\x41\x1amaintenance.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBw\n\'com.google.cloud.maintenance.api.v1betaB\x0fUMMServiceProtoP\x01Z9cloud.google.com/go/maintenance/api/apiv1beta/apipb;apipbb\x06proto3"
|
16
|
+
|
17
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
18
|
+
|
19
|
+
begin
|
20
|
+
pool.add_serialized_file(descriptor_data)
|
21
|
+
rescue TypeError
|
22
|
+
# Compatibility code: will be removed in the next major version.
|
23
|
+
require 'google/protobuf/descriptor_pb'
|
24
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
25
|
+
parsed.clear_dependency
|
26
|
+
serialized = parsed.class.encode(parsed)
|
27
|
+
file = pool.add_serialized_file(serialized)
|
28
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
29
|
+
imports = [
|
30
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
31
|
+
]
|
32
|
+
imports.each do |type_name, expected_filename|
|
33
|
+
import_file = pool.lookup(type_name).file_descriptor
|
34
|
+
if import_file.name != expected_filename
|
35
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
39
|
+
warn "This will become an error in the next major version."
|
40
|
+
end
|
41
|
+
|
42
|
+
module Google
|
43
|
+
module Cloud
|
44
|
+
module Maintenance
|
45
|
+
module Api
|
46
|
+
module V1beta
|
47
|
+
SummarizeMaintenancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.maintenance.api.v1beta.SummarizeMaintenancesRequest").msgclass
|
48
|
+
SummarizeMaintenancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.maintenance.api.v1beta.SummarizeMaintenancesResponse").msgclass
|
49
|
+
MaintenanceSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.maintenance.api.v1beta.MaintenanceSummary").msgclass
|
50
|
+
MaintenanceSummary::Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.maintenance.api.v1beta.MaintenanceSummary.Stats").msgclass
|
51
|
+
MaintenanceSummary::Aggregate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.maintenance.api.v1beta.MaintenanceSummary.Aggregate").msgclass
|
52
|
+
ResourceMaintenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.maintenance.api.v1beta.ResourceMaintenance").msgclass
|
53
|
+
ResourceMaintenance::Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.maintenance.api.v1beta.ResourceMaintenance.Resource").msgclass
|
54
|
+
ResourceMaintenance::Maintenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.maintenance.api.v1beta.ResourceMaintenance.Maintenance").msgclass
|
55
|
+
ResourceMaintenance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.maintenance.api.v1beta.ResourceMaintenance.State").enummodule
|
56
|
+
MaintenanceControl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.maintenance.api.v1beta.MaintenanceControl").msgclass
|
57
|
+
MaintenanceControl::Control = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.maintenance.api.v1beta.MaintenanceControl.Control").enummodule
|
58
|
+
ListResourceMaintenancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.maintenance.api.v1beta.ListResourceMaintenancesRequest").msgclass
|
59
|
+
ListResourceMaintenancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.maintenance.api.v1beta.ListResourceMaintenancesResponse").msgclass
|
60
|
+
GetResourceMaintenanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.maintenance.api.v1beta.GetResourceMaintenanceRequest").msgclass
|
61
|
+
MaintenanceCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.maintenance.api.v1beta.MaintenanceCategory").enummodule
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/maintenance/api/v1beta/maintenance_service.proto for package 'google.cloud.maintenance.api.v1beta'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2025 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/cloud/maintenance/api/v1beta/maintenance_service_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Maintenance
|
25
|
+
module Api
|
26
|
+
module V1beta
|
27
|
+
module Maintenance
|
28
|
+
# Unified Maintenance service
|
29
|
+
class Service
|
30
|
+
|
31
|
+
include ::GRPC::GenericService
|
32
|
+
|
33
|
+
self.marshal_class_method = :encode
|
34
|
+
self.unmarshal_class_method = :decode
|
35
|
+
self.service_name = 'google.cloud.maintenance.api.v1beta.Maintenance'
|
36
|
+
|
37
|
+
# Retrieves the statistics of a specific maintenance.
|
38
|
+
rpc :SummarizeMaintenances, ::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesRequest, ::Google::Cloud::Maintenance::Api::V1beta::SummarizeMaintenancesResponse
|
39
|
+
# Retrieve a collection of resource maintenances.
|
40
|
+
rpc :ListResourceMaintenances, ::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesRequest, ::Google::Cloud::Maintenance::Api::V1beta::ListResourceMaintenancesResponse
|
41
|
+
# Retrieve a single resource maintenance.
|
42
|
+
rpc :GetResourceMaintenance, ::Google::Cloud::Maintenance::Api::V1beta::GetResourceMaintenanceRequest, ::Google::Cloud::Maintenance::Api::V1beta::ResourceMaintenance
|
43
|
+
end
|
44
|
+
|
45
|
+
Stub = Service.rpc_stub_class
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,40 @@
|
|
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
|
+
require "google/cloud/maintenance/api/v1beta/maintenance/rest"
|
20
|
+
require "google/cloud/maintenance/api/v1beta/bindings_override"
|
21
|
+
require "google/cloud/maintenance/api/v1beta/version"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module Maintenance
|
26
|
+
module Api
|
27
|
+
##
|
28
|
+
# To load just the REST part of this package, including all its services, and instantiate a REST client:
|
29
|
+
#
|
30
|
+
# @example
|
31
|
+
#
|
32
|
+
# require "google/cloud/maintenance/api/v1beta/rest"
|
33
|
+
# client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new
|
34
|
+
#
|
35
|
+
module V1beta
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -1,10 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright 2025 Google LLC
|
2
4
|
#
|
3
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
6
|
# you may not use this file except in compliance with the License.
|
5
7
|
# You may obtain a copy of the License at
|
6
8
|
#
|
7
|
-
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
10
|
#
|
9
11
|
# Unless required by applicable law or agreed to in writing, software
|
10
12
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
@@ -12,12 +14,15 @@
|
|
12
14
|
# See the License for the specific language governing permissions and
|
13
15
|
# limitations under the License.
|
14
16
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
15
20
|
module Google
|
16
21
|
module Cloud
|
17
22
|
module Maintenance
|
18
23
|
module Api
|
19
24
|
module V1beta
|
20
|
-
VERSION = "0.
|
25
|
+
VERSION = "0.1.0"
|
21
26
|
end
|
22
27
|
end
|
23
28
|
end
|
@@ -0,0 +1,47 @@
|
|
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
|
+
require "google/cloud/maintenance/api/v1beta/maintenance"
|
20
|
+
require "google/cloud/maintenance/api/v1beta/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Maintenance
|
25
|
+
module Api
|
26
|
+
##
|
27
|
+
# API client module.
|
28
|
+
#
|
29
|
+
# @example Load this package, including all its services, and instantiate a gRPC client
|
30
|
+
#
|
31
|
+
# require "google/cloud/maintenance/api/v1beta"
|
32
|
+
# client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Client.new
|
33
|
+
#
|
34
|
+
# @example Load this package, including all its services, and instantiate a REST client
|
35
|
+
#
|
36
|
+
# require "google/cloud/maintenance/api/v1beta"
|
37
|
+
# client = ::Google::Cloud::Maintenance::Api::V1beta::Maintenance::Rest::Client.new
|
38
|
+
#
|
39
|
+
module V1beta
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
helper_path = ::File.join __dir__, "v1beta", "_helpers.rb"
|
47
|
+
require "google/cloud/maintenance/api/v1beta/_helpers" if ::File.file? helper_path
|
@@ -0,0 +1,21 @@
|
|
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
|
+
# This gem does not autoload during Bundler.require. To load this gem,
|
20
|
+
# issue explicit require statements for the packages desired, e.g.:
|
21
|
+
# require "google/cloud/maintenance/api/v1beta"
|