google-cloud-os_config-v1 0.5.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/os_config/v1/os_config_service/client.rb +198 -27
- data/lib/google/cloud/os_config/v1/os_config_zonal_service/client.rb +1628 -0
- data/lib/google/cloud/os_config/v1/os_config_zonal_service/credentials.rb +51 -0
- data/lib/google/cloud/os_config/v1/os_config_zonal_service/operations.rb +767 -0
- data/lib/google/cloud/os_config/v1/os_config_zonal_service/paths.rb +192 -0
- data/lib/google/cloud/os_config/v1/os_config_zonal_service.rb +53 -0
- data/lib/google/cloud/os_config/v1/version.rb +1 -1
- data/lib/google/cloud/os_config/v1.rb +1 -0
- data/lib/google/cloud/osconfig/v1/inventory_pb.rb +37 -9
- data/lib/google/cloud/osconfig/v1/os_policy_assignment_reports_pb.rb +92 -0
- data/lib/google/cloud/osconfig/v1/os_policy_assignments_pb.rb +134 -0
- data/lib/google/cloud/osconfig/v1/os_policy_pb.rb +204 -0
- data/lib/google/cloud/osconfig/v1/osconfig_service_pb.rb +2 -2
- data/lib/google/cloud/osconfig/v1/osconfig_service_services_pb.rb +1 -1
- data/lib/google/cloud/osconfig/v1/osconfig_zonal_service_pb.rb +25 -0
- data/lib/google/cloud/osconfig/v1/osconfig_zonal_service_services_pb.rb +107 -0
- data/lib/google/cloud/osconfig/v1/patch_deployments_pb.rb +3 -2
- data/lib/google/cloud/osconfig/v1/patch_jobs_pb.rb +2 -2
- data/lib/google/cloud/osconfig/v1/vulnerability_pb.rb +127 -0
- data/proto_docs/google/cloud/osconfig/v1/inventory.rb +111 -20
- data/proto_docs/google/cloud/osconfig/v1/os_policy.rb +597 -0
- data/proto_docs/google/cloud/osconfig/v1/os_policy_assignment_reports.rb +293 -0
- data/proto_docs/google/cloud/osconfig/v1/os_policy_assignments.rb +392 -0
- data/proto_docs/google/cloud/osconfig/v1/patch_deployments.rb +4 -0
- data/proto_docs/google/cloud/osconfig/v1/vulnerability.rb +374 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +21 -2
@@ -0,0 +1,374 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 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 OsConfig
|
23
|
+
module V1
|
24
|
+
# This API resource represents the vulnerability report for a specified
|
25
|
+
# Compute Engine virtual machine (VM) instance at a given point in time.
|
26
|
+
#
|
27
|
+
# For more information, see [Vulnerability
|
28
|
+
# reports](https://cloud.google.com/compute/docs/instances/os-inventory-management#vulnerability-reports).
|
29
|
+
# @!attribute [r] name
|
30
|
+
# @return [::String]
|
31
|
+
# Output only. The `vulnerabilityReport` API resource name.
|
32
|
+
#
|
33
|
+
# Format:
|
34
|
+
# `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`
|
35
|
+
# @!attribute [r] vulnerabilities
|
36
|
+
# @return [::Array<::Google::Cloud::OsConfig::V1::VulnerabilityReport::Vulnerability>]
|
37
|
+
# Output only. List of vulnerabilities affecting the VM.
|
38
|
+
# @!attribute [r] update_time
|
39
|
+
# @return [::Google::Protobuf::Timestamp]
|
40
|
+
# Output only. The timestamp for when the last vulnerability report was generated for the
|
41
|
+
# VM.
|
42
|
+
class VulnerabilityReport
|
43
|
+
include ::Google::Protobuf::MessageExts
|
44
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
45
|
+
|
46
|
+
# A vulnerability affecting the VM instance.
|
47
|
+
# @!attribute [rw] details
|
48
|
+
# @return [::Google::Cloud::OsConfig::V1::VulnerabilityReport::Vulnerability::Details]
|
49
|
+
# Contains metadata as per the upstream feed of the operating system and
|
50
|
+
# NVD.
|
51
|
+
# @!attribute [rw] installed_inventory_item_ids
|
52
|
+
# @return [::Array<::String>]
|
53
|
+
# Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
|
54
|
+
# This field displays the inventory items affected by this vulnerability.
|
55
|
+
# If the vulnerability report was not updated after the VM inventory
|
56
|
+
# update, these values might not display in VM inventory. For some distros,
|
57
|
+
# this field may be empty.
|
58
|
+
# @!attribute [rw] available_inventory_item_ids
|
59
|
+
# @return [::Array<::String>]
|
60
|
+
# Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
|
61
|
+
# If the vulnerability report was not updated after the VM inventory
|
62
|
+
# update, these values might not display in VM inventory. If there is no
|
63
|
+
# available fix, the field is empty. The `inventory_item` value specifies
|
64
|
+
# the latest `SoftwarePackage` available to the VM that fixes the
|
65
|
+
# vulnerability.
|
66
|
+
# @!attribute [rw] create_time
|
67
|
+
# @return [::Google::Protobuf::Timestamp]
|
68
|
+
# The timestamp for when the vulnerability was first detected.
|
69
|
+
# @!attribute [rw] update_time
|
70
|
+
# @return [::Google::Protobuf::Timestamp]
|
71
|
+
# The timestamp for when the vulnerability was last modified.
|
72
|
+
# @!attribute [rw] items
|
73
|
+
# @return [::Array<::Google::Cloud::OsConfig::V1::VulnerabilityReport::Vulnerability::Item>]
|
74
|
+
# List of items affected by the vulnerability.
|
75
|
+
class Vulnerability
|
76
|
+
include ::Google::Protobuf::MessageExts
|
77
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
78
|
+
|
79
|
+
# Contains metadata information for the vulnerability. This information is
|
80
|
+
# collected from the upstream feed of the operating system.
|
81
|
+
# @!attribute [rw] cve
|
82
|
+
# @return [::String]
|
83
|
+
# The CVE of the vulnerability. CVE cannot be
|
84
|
+
# empty and the combination of <cve, classification> should be unique
|
85
|
+
# across vulnerabilities for a VM.
|
86
|
+
# @!attribute [rw] cvss_v2_score
|
87
|
+
# @return [::Float]
|
88
|
+
# The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of
|
89
|
+
# 0 - 10 where 0 indicates low severity and 10 indicates high severity.
|
90
|
+
# @!attribute [rw] cvss_v3
|
91
|
+
# @return [::Google::Cloud::OsConfig::V1::CVSSv3]
|
92
|
+
# The full description of the CVSSv3 for this vulnerability from NVD.
|
93
|
+
# @!attribute [rw] severity
|
94
|
+
# @return [::String]
|
95
|
+
# Assigned severity/impact ranking from the distro.
|
96
|
+
# @!attribute [rw] description
|
97
|
+
# @return [::String]
|
98
|
+
# The note or description describing the vulnerability from the distro.
|
99
|
+
# @!attribute [rw] references
|
100
|
+
# @return [::Array<::Google::Cloud::OsConfig::V1::VulnerabilityReport::Vulnerability::Details::Reference>]
|
101
|
+
# Corresponds to the references attached to the `VulnerabilityDetails`.
|
102
|
+
class Details
|
103
|
+
include ::Google::Protobuf::MessageExts
|
104
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
105
|
+
|
106
|
+
# A reference for this vulnerability.
|
107
|
+
# @!attribute [rw] url
|
108
|
+
# @return [::String]
|
109
|
+
# The url of the reference.
|
110
|
+
# @!attribute [rw] source
|
111
|
+
# @return [::String]
|
112
|
+
# The source of the reference e.g. NVD.
|
113
|
+
class Reference
|
114
|
+
include ::Google::Protobuf::MessageExts
|
115
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
# OS inventory item that is affected by a vulnerability or fixed as a
|
120
|
+
# result of a vulnerability.
|
121
|
+
# @!attribute [rw] installed_inventory_item_id
|
122
|
+
# @return [::String]
|
123
|
+
# Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
|
124
|
+
# This field displays the inventory items affected by this vulnerability.
|
125
|
+
# If the vulnerability report was not updated after the VM inventory
|
126
|
+
# update, these values might not display in VM inventory. For some
|
127
|
+
# operating systems, this field might be empty.
|
128
|
+
# @!attribute [rw] available_inventory_item_id
|
129
|
+
# @return [::String]
|
130
|
+
# Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
|
131
|
+
# If the vulnerability report was not updated after the VM inventory
|
132
|
+
# update, these values might not display in VM inventory. If there is no
|
133
|
+
# available fix, the field is empty. The `inventory_item` value specifies
|
134
|
+
# the latest `SoftwarePackage` available to the VM that fixes the
|
135
|
+
# vulnerability.
|
136
|
+
# @!attribute [rw] fixed_cpe_uri
|
137
|
+
# @return [::String]
|
138
|
+
# The recommended [CPE URI](https://cpe.mitre.org/specification/) update
|
139
|
+
# that contains a fix for this vulnerability.
|
140
|
+
# @!attribute [rw] upstream_fix
|
141
|
+
# @return [::String]
|
142
|
+
# The upstream OS patch, packages or KB that fixes the vulnerability.
|
143
|
+
class Item
|
144
|
+
include ::Google::Protobuf::MessageExts
|
145
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
# A request message for getting the vulnerability report for the specified VM.
|
151
|
+
# @!attribute [rw] name
|
152
|
+
# @return [::String]
|
153
|
+
# Required. API resource name for vulnerability resource.
|
154
|
+
#
|
155
|
+
# Format:
|
156
|
+
# `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport`
|
157
|
+
#
|
158
|
+
# For `{project}`, either `project-number` or `project-id` can be provided.
|
159
|
+
# For `{instance}`, either Compute Engine `instance-id` or `instance-name`
|
160
|
+
# can be provided.
|
161
|
+
class GetVulnerabilityReportRequest
|
162
|
+
include ::Google::Protobuf::MessageExts
|
163
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
164
|
+
end
|
165
|
+
|
166
|
+
# A request message for listing vulnerability reports for all VM instances in
|
167
|
+
# the specified location.
|
168
|
+
# @!attribute [rw] parent
|
169
|
+
# @return [::String]
|
170
|
+
# Required. The parent resource name.
|
171
|
+
#
|
172
|
+
# Format: `projects/{project}/locations/{location}/instances/-`
|
173
|
+
#
|
174
|
+
# For `{project}`, either `project-number` or `project-id` can be provided.
|
175
|
+
# @!attribute [rw] page_size
|
176
|
+
# @return [::Integer]
|
177
|
+
# The maximum number of results to return.
|
178
|
+
# @!attribute [rw] page_token
|
179
|
+
# @return [::String]
|
180
|
+
# A pagination token returned from a previous call to
|
181
|
+
# `ListVulnerabilityReports` that indicates where this listing
|
182
|
+
# should continue from.
|
183
|
+
# @!attribute [rw] filter
|
184
|
+
# @return [::String]
|
185
|
+
# If provided, this field specifies the criteria that must be met by a
|
186
|
+
# `vulnerabilityReport` API resource to be included in the response.
|
187
|
+
class ListVulnerabilityReportsRequest
|
188
|
+
include ::Google::Protobuf::MessageExts
|
189
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
190
|
+
end
|
191
|
+
|
192
|
+
# A response message for listing vulnerability reports for all VM instances in
|
193
|
+
# the specified location.
|
194
|
+
# @!attribute [rw] vulnerability_reports
|
195
|
+
# @return [::Array<::Google::Cloud::OsConfig::V1::VulnerabilityReport>]
|
196
|
+
# List of vulnerabilityReport objects.
|
197
|
+
# @!attribute [rw] next_page_token
|
198
|
+
# @return [::String]
|
199
|
+
# The pagination token to retrieve the next page of vulnerabilityReports
|
200
|
+
# object.
|
201
|
+
class ListVulnerabilityReportsResponse
|
202
|
+
include ::Google::Protobuf::MessageExts
|
203
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
204
|
+
end
|
205
|
+
|
206
|
+
# Common Vulnerability Scoring System version 3.
|
207
|
+
# For details, see https://www.first.org/cvss/specification-document
|
208
|
+
# @!attribute [rw] base_score
|
209
|
+
# @return [::Float]
|
210
|
+
# The base score is a function of the base metric scores.
|
211
|
+
# https://www.first.org/cvss/specification-document#Base-Metrics
|
212
|
+
# @!attribute [rw] exploitability_score
|
213
|
+
# @return [::Float]
|
214
|
+
# The Exploitability sub-score equation is derived from the Base
|
215
|
+
# Exploitability metrics.
|
216
|
+
# https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics
|
217
|
+
# @!attribute [rw] impact_score
|
218
|
+
# @return [::Float]
|
219
|
+
# The Impact sub-score equation is derived from the Base Impact metrics.
|
220
|
+
# @!attribute [rw] attack_vector
|
221
|
+
# @return [::Google::Cloud::OsConfig::V1::CVSSv3::AttackVector]
|
222
|
+
# This metric reflects the context by which vulnerability exploitation is
|
223
|
+
# possible.
|
224
|
+
# @!attribute [rw] attack_complexity
|
225
|
+
# @return [::Google::Cloud::OsConfig::V1::CVSSv3::AttackComplexity]
|
226
|
+
# This metric describes the conditions beyond the attacker's control that
|
227
|
+
# must exist in order to exploit the vulnerability.
|
228
|
+
# @!attribute [rw] privileges_required
|
229
|
+
# @return [::Google::Cloud::OsConfig::V1::CVSSv3::PrivilegesRequired]
|
230
|
+
# This metric describes the level of privileges an attacker must possess
|
231
|
+
# before successfully exploiting the vulnerability.
|
232
|
+
# @!attribute [rw] user_interaction
|
233
|
+
# @return [::Google::Cloud::OsConfig::V1::CVSSv3::UserInteraction]
|
234
|
+
# This metric captures the requirement for a human user, other than the
|
235
|
+
# attacker, to participate in the successful compromise of the vulnerable
|
236
|
+
# component.
|
237
|
+
# @!attribute [rw] scope
|
238
|
+
# @return [::Google::Cloud::OsConfig::V1::CVSSv3::Scope]
|
239
|
+
# The Scope metric captures whether a vulnerability in one vulnerable
|
240
|
+
# component impacts resources in components beyond its security scope.
|
241
|
+
# @!attribute [rw] confidentiality_impact
|
242
|
+
# @return [::Google::Cloud::OsConfig::V1::CVSSv3::Impact]
|
243
|
+
# This metric measures the impact to the confidentiality of the information
|
244
|
+
# resources managed by a software component due to a successfully exploited
|
245
|
+
# vulnerability.
|
246
|
+
# @!attribute [rw] integrity_impact
|
247
|
+
# @return [::Google::Cloud::OsConfig::V1::CVSSv3::Impact]
|
248
|
+
# This metric measures the impact to integrity of a successfully exploited
|
249
|
+
# vulnerability.
|
250
|
+
# @!attribute [rw] availability_impact
|
251
|
+
# @return [::Google::Cloud::OsConfig::V1::CVSSv3::Impact]
|
252
|
+
# This metric measures the impact to the availability of the impacted
|
253
|
+
# component resulting from a successfully exploited vulnerability.
|
254
|
+
class CVSSv3
|
255
|
+
include ::Google::Protobuf::MessageExts
|
256
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
257
|
+
|
258
|
+
# This metric reflects the context by which vulnerability exploitation is
|
259
|
+
# possible.
|
260
|
+
module AttackVector
|
261
|
+
# Invalid value.
|
262
|
+
ATTACK_VECTOR_UNSPECIFIED = 0
|
263
|
+
|
264
|
+
# The vulnerable component is bound to the network stack and the set of
|
265
|
+
# possible attackers extends beyond the other options listed below, up to
|
266
|
+
# and including the entire Internet.
|
267
|
+
ATTACK_VECTOR_NETWORK = 1
|
268
|
+
|
269
|
+
# The vulnerable component is bound to the network stack, but the attack is
|
270
|
+
# limited at the protocol level to a logically adjacent topology.
|
271
|
+
ATTACK_VECTOR_ADJACENT = 2
|
272
|
+
|
273
|
+
# The vulnerable component is not bound to the network stack and the
|
274
|
+
# attacker's path is via read/write/execute capabilities.
|
275
|
+
ATTACK_VECTOR_LOCAL = 3
|
276
|
+
|
277
|
+
# The attack requires the attacker to physically touch or manipulate the
|
278
|
+
# vulnerable component.
|
279
|
+
ATTACK_VECTOR_PHYSICAL = 4
|
280
|
+
end
|
281
|
+
|
282
|
+
# This metric describes the conditions beyond the attacker's control that
|
283
|
+
# must exist in order to exploit the vulnerability.
|
284
|
+
module AttackComplexity
|
285
|
+
# Invalid value.
|
286
|
+
ATTACK_COMPLEXITY_UNSPECIFIED = 0
|
287
|
+
|
288
|
+
# Specialized access conditions or extenuating circumstances do not exist.
|
289
|
+
# An attacker can expect repeatable success when attacking the vulnerable
|
290
|
+
# component.
|
291
|
+
ATTACK_COMPLEXITY_LOW = 1
|
292
|
+
|
293
|
+
# A successful attack depends on conditions beyond the attacker's control.
|
294
|
+
# That is, a successful attack cannot be accomplished at will, but requires
|
295
|
+
# the attacker to invest in some measurable amount of effort in preparation
|
296
|
+
# or execution against the vulnerable component before a successful attack
|
297
|
+
# can be expected.
|
298
|
+
ATTACK_COMPLEXITY_HIGH = 2
|
299
|
+
end
|
300
|
+
|
301
|
+
# This metric describes the level of privileges an attacker must possess
|
302
|
+
# before successfully exploiting the vulnerability.
|
303
|
+
module PrivilegesRequired
|
304
|
+
# Invalid value.
|
305
|
+
PRIVILEGES_REQUIRED_UNSPECIFIED = 0
|
306
|
+
|
307
|
+
# The attacker is unauthorized prior to attack, and therefore does not
|
308
|
+
# require any access to settings or files of the vulnerable system to
|
309
|
+
# carry out an attack.
|
310
|
+
PRIVILEGES_REQUIRED_NONE = 1
|
311
|
+
|
312
|
+
# The attacker requires privileges that provide basic user capabilities
|
313
|
+
# that could normally affect only settings and files owned by a user.
|
314
|
+
# Alternatively, an attacker with Low privileges has the ability to access
|
315
|
+
# only non-sensitive resources.
|
316
|
+
PRIVILEGES_REQUIRED_LOW = 2
|
317
|
+
|
318
|
+
# The attacker requires privileges that provide significant (e.g.,
|
319
|
+
# administrative) control over the vulnerable component allowing access to
|
320
|
+
# component-wide settings and files.
|
321
|
+
PRIVILEGES_REQUIRED_HIGH = 3
|
322
|
+
end
|
323
|
+
|
324
|
+
# This metric captures the requirement for a human user, other than the
|
325
|
+
# attacker, to participate in the successful compromise of the vulnerable
|
326
|
+
# component.
|
327
|
+
module UserInteraction
|
328
|
+
# Invalid value.
|
329
|
+
USER_INTERACTION_UNSPECIFIED = 0
|
330
|
+
|
331
|
+
# The vulnerable system can be exploited without interaction from any user.
|
332
|
+
USER_INTERACTION_NONE = 1
|
333
|
+
|
334
|
+
# Successful exploitation of this vulnerability requires a user to take
|
335
|
+
# some action before the vulnerability can be exploited.
|
336
|
+
USER_INTERACTION_REQUIRED = 2
|
337
|
+
end
|
338
|
+
|
339
|
+
# The Scope metric captures whether a vulnerability in one vulnerable
|
340
|
+
# component impacts resources in components beyond its security scope.
|
341
|
+
module Scope
|
342
|
+
# Invalid value.
|
343
|
+
SCOPE_UNSPECIFIED = 0
|
344
|
+
|
345
|
+
# An exploited vulnerability can only affect resources managed by the same
|
346
|
+
# security authority.
|
347
|
+
SCOPE_UNCHANGED = 1
|
348
|
+
|
349
|
+
# An exploited vulnerability can affect resources beyond the security scope
|
350
|
+
# managed by the security authority of the vulnerable component.
|
351
|
+
SCOPE_CHANGED = 2
|
352
|
+
end
|
353
|
+
|
354
|
+
# The Impact metrics capture the effects of a successfully exploited
|
355
|
+
# vulnerability on the component that suffers the worst outcome that is most
|
356
|
+
# directly and predictably associated with the attack.
|
357
|
+
module Impact
|
358
|
+
# Invalid value.
|
359
|
+
IMPACT_UNSPECIFIED = 0
|
360
|
+
|
361
|
+
# High impact.
|
362
|
+
IMPACT_HIGH = 1
|
363
|
+
|
364
|
+
# Low impact.
|
365
|
+
IMPACT_LOW = 2
|
366
|
+
|
367
|
+
# No impact.
|
368
|
+
IMPACT_NONE = 3
|
369
|
+
end
|
370
|
+
end
|
371
|
+
end
|
372
|
+
end
|
373
|
+
end
|
374
|
+
end
|
@@ -0,0 +1,164 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 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 Longrunning
|
22
|
+
# This resource represents a long-running operation that is the result of a
|
23
|
+
# network API call.
|
24
|
+
# @!attribute [rw] name
|
25
|
+
# @return [::String]
|
26
|
+
# The server-assigned name, which is only unique within the same service that
|
27
|
+
# originally returns it. If you use the default HTTP mapping, the
|
28
|
+
# `name` should be a resource name ending with `operations/{unique_id}`.
|
29
|
+
# @!attribute [rw] metadata
|
30
|
+
# @return [::Google::Protobuf::Any]
|
31
|
+
# Service-specific metadata associated with the operation. It typically
|
32
|
+
# contains progress information and common metadata such as create time.
|
33
|
+
# Some services might not provide such metadata. Any method that returns a
|
34
|
+
# long-running operation should document the metadata type, if any.
|
35
|
+
# @!attribute [rw] done
|
36
|
+
# @return [::Boolean]
|
37
|
+
# If the value is `false`, it means the operation is still in progress.
|
38
|
+
# If `true`, the operation is completed, and either `error` or `response` is
|
39
|
+
# available.
|
40
|
+
# @!attribute [rw] error
|
41
|
+
# @return [::Google::Rpc::Status]
|
42
|
+
# The error result of the operation in case of failure or cancellation.
|
43
|
+
# @!attribute [rw] response
|
44
|
+
# @return [::Google::Protobuf::Any]
|
45
|
+
# The normal response of the operation in case of success. If the original
|
46
|
+
# method returns no data on success, such as `Delete`, the response is
|
47
|
+
# `google.protobuf.Empty`. If the original method is standard
|
48
|
+
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
49
|
+
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
50
|
+
# is the original method name. For example, if the original method name
|
51
|
+
# is `TakeSnapshot()`, the inferred response type is
|
52
|
+
# `TakeSnapshotResponse`.
|
53
|
+
class Operation
|
54
|
+
include ::Google::Protobuf::MessageExts
|
55
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
56
|
+
end
|
57
|
+
|
58
|
+
# The request message for Operations.GetOperation.
|
59
|
+
# @!attribute [rw] name
|
60
|
+
# @return [::String]
|
61
|
+
# The name of the operation resource.
|
62
|
+
class GetOperationRequest
|
63
|
+
include ::Google::Protobuf::MessageExts
|
64
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
65
|
+
end
|
66
|
+
|
67
|
+
# The request message for Operations.ListOperations.
|
68
|
+
# @!attribute [rw] name
|
69
|
+
# @return [::String]
|
70
|
+
# The name of the operation's parent resource.
|
71
|
+
# @!attribute [rw] filter
|
72
|
+
# @return [::String]
|
73
|
+
# The standard list filter.
|
74
|
+
# @!attribute [rw] page_size
|
75
|
+
# @return [::Integer]
|
76
|
+
# The standard list page size.
|
77
|
+
# @!attribute [rw] page_token
|
78
|
+
# @return [::String]
|
79
|
+
# The standard list page token.
|
80
|
+
class ListOperationsRequest
|
81
|
+
include ::Google::Protobuf::MessageExts
|
82
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
83
|
+
end
|
84
|
+
|
85
|
+
# The response message for Operations.ListOperations.
|
86
|
+
# @!attribute [rw] operations
|
87
|
+
# @return [::Array<::Google::Longrunning::Operation>]
|
88
|
+
# A list of operations that matches the specified filter in the request.
|
89
|
+
# @!attribute [rw] next_page_token
|
90
|
+
# @return [::String]
|
91
|
+
# The standard List next-page token.
|
92
|
+
class ListOperationsResponse
|
93
|
+
include ::Google::Protobuf::MessageExts
|
94
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
95
|
+
end
|
96
|
+
|
97
|
+
# The request message for Operations.CancelOperation.
|
98
|
+
# @!attribute [rw] name
|
99
|
+
# @return [::String]
|
100
|
+
# The name of the operation resource to be cancelled.
|
101
|
+
class CancelOperationRequest
|
102
|
+
include ::Google::Protobuf::MessageExts
|
103
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
104
|
+
end
|
105
|
+
|
106
|
+
# The request message for Operations.DeleteOperation.
|
107
|
+
# @!attribute [rw] name
|
108
|
+
# @return [::String]
|
109
|
+
# The name of the operation resource to be deleted.
|
110
|
+
class DeleteOperationRequest
|
111
|
+
include ::Google::Protobuf::MessageExts
|
112
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
113
|
+
end
|
114
|
+
|
115
|
+
# The request message for Operations.WaitOperation.
|
116
|
+
# @!attribute [rw] name
|
117
|
+
# @return [::String]
|
118
|
+
# The name of the operation resource to wait on.
|
119
|
+
# @!attribute [rw] timeout
|
120
|
+
# @return [::Google::Protobuf::Duration]
|
121
|
+
# The maximum duration to wait before timing out. If left blank, the wait
|
122
|
+
# will be at most the time permitted by the underlying HTTP/RPC protocol.
|
123
|
+
# If RPC context deadline is also specified, the shorter one will be used.
|
124
|
+
class WaitOperationRequest
|
125
|
+
include ::Google::Protobuf::MessageExts
|
126
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
127
|
+
end
|
128
|
+
|
129
|
+
# A message representing the message types used by a long-running operation.
|
130
|
+
#
|
131
|
+
# Example:
|
132
|
+
#
|
133
|
+
# rpc LongRunningRecognize(LongRunningRecognizeRequest)
|
134
|
+
# returns (google.longrunning.Operation) {
|
135
|
+
# option (google.longrunning.operation_info) = {
|
136
|
+
# response_type: "LongRunningRecognizeResponse"
|
137
|
+
# metadata_type: "LongRunningRecognizeMetadata"
|
138
|
+
# };
|
139
|
+
# }
|
140
|
+
# @!attribute [rw] response_type
|
141
|
+
# @return [::String]
|
142
|
+
# Required. The message name of the primary return type for this
|
143
|
+
# long-running operation.
|
144
|
+
# This type will be used to deserialize the LRO's response.
|
145
|
+
#
|
146
|
+
# If the response is in a different package from the rpc, a fully-qualified
|
147
|
+
# message name must be used (e.g. `google.protobuf.Struct`).
|
148
|
+
#
|
149
|
+
# Note: Altering this value constitutes a breaking change.
|
150
|
+
# @!attribute [rw] metadata_type
|
151
|
+
# @return [::String]
|
152
|
+
# Required. The message name of the metadata type for this long-running
|
153
|
+
# operation.
|
154
|
+
#
|
155
|
+
# If the response is in a different package from the rpc, a fully-qualified
|
156
|
+
# message name must be used (e.g. `google.protobuf.Struct`).
|
157
|
+
#
|
158
|
+
# Note: Altering this value constitutes a breaking change.
|
159
|
+
class OperationInfo
|
160
|
+
include ::Google::Protobuf::MessageExts
|
161
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
@@ -0,0 +1,141 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 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
|
+
#
|
47
|
+
# Example 3: Pack and unpack a message in Python.
|
48
|
+
#
|
49
|
+
# foo = Foo(...)
|
50
|
+
# any = Any()
|
51
|
+
# any.Pack(foo)
|
52
|
+
# ...
|
53
|
+
# if any.Is(Foo.DESCRIPTOR):
|
54
|
+
# any.Unpack(foo)
|
55
|
+
# ...
|
56
|
+
#
|
57
|
+
# Example 4: Pack and unpack a message in Go
|
58
|
+
#
|
59
|
+
# foo := &pb.Foo{...}
|
60
|
+
# any, err := anypb.New(foo)
|
61
|
+
# if err != nil {
|
62
|
+
# ...
|
63
|
+
# }
|
64
|
+
# ...
|
65
|
+
# foo := &pb.Foo{}
|
66
|
+
# if err := any.UnmarshalTo(foo); err != nil {
|
67
|
+
# ...
|
68
|
+
# }
|
69
|
+
#
|
70
|
+
# The pack methods provided by protobuf library will by default use
|
71
|
+
# 'type.googleapis.com/full.type.name' as the type URL and the unpack
|
72
|
+
# methods only use the fully qualified type name after the last '/'
|
73
|
+
# in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
74
|
+
# name "y.z".
|
75
|
+
#
|
76
|
+
#
|
77
|
+
# JSON
|
78
|
+
# ====
|
79
|
+
# The JSON representation of an `Any` value uses the regular
|
80
|
+
# representation of the deserialized, embedded message, with an
|
81
|
+
# additional field `@type` which contains the type URL. Example:
|
82
|
+
#
|
83
|
+
# package google.profile;
|
84
|
+
# message Person {
|
85
|
+
# string first_name = 1;
|
86
|
+
# string last_name = 2;
|
87
|
+
# }
|
88
|
+
#
|
89
|
+
# {
|
90
|
+
# "@type": "type.googleapis.com/google.profile.Person",
|
91
|
+
# "firstName": <string>,
|
92
|
+
# "lastName": <string>
|
93
|
+
# }
|
94
|
+
#
|
95
|
+
# If the embedded message type is well-known and has a custom JSON
|
96
|
+
# representation, that representation will be embedded adding a field
|
97
|
+
# `value` which holds the custom JSON in addition to the `@type`
|
98
|
+
# field. Example (for message [google.protobuf.Duration][]):
|
99
|
+
#
|
100
|
+
# {
|
101
|
+
# "@type": "type.googleapis.com/google.protobuf.Duration",
|
102
|
+
# "value": "1.212s"
|
103
|
+
# }
|
104
|
+
# @!attribute [rw] type_url
|
105
|
+
# @return [::String]
|
106
|
+
# A URL/resource name that uniquely identifies the type of the serialized
|
107
|
+
# protocol buffer message. This string must contain at least
|
108
|
+
# one "/" character. The last segment of the URL's path must represent
|
109
|
+
# the fully qualified name of the type (as in
|
110
|
+
# `path/google.protobuf.Duration`). The name should be in a canonical form
|
111
|
+
# (e.g., leading "." is not accepted).
|
112
|
+
#
|
113
|
+
# In practice, teams usually precompile into the binary all types that they
|
114
|
+
# expect it to use in the context of Any. However, for URLs which use the
|
115
|
+
# scheme `http`, `https`, or no scheme, one can optionally set up a type
|
116
|
+
# server that maps type URLs to message definitions as follows:
|
117
|
+
#
|
118
|
+
# * If no scheme is provided, `https` is assumed.
|
119
|
+
# * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
120
|
+
# value in binary format, or produce an error.
|
121
|
+
# * Applications are allowed to cache lookup results based on the
|
122
|
+
# URL, or have them precompiled into a binary to avoid any
|
123
|
+
# lookup. Therefore, binary compatibility needs to be preserved
|
124
|
+
# on changes to types. (Use versioned type names to manage
|
125
|
+
# breaking changes.)
|
126
|
+
#
|
127
|
+
# Note: this functionality is not currently available in the official
|
128
|
+
# protobuf release, and it is not used for type URLs beginning with
|
129
|
+
# type.googleapis.com.
|
130
|
+
#
|
131
|
+
# Schemes other than `http`, `https` (or the empty scheme) might be
|
132
|
+
# used with implementation specific semantics.
|
133
|
+
# @!attribute [rw] value
|
134
|
+
# @return [::String]
|
135
|
+
# Must be a valid serialized protocol buffer of the above specified type.
|
136
|
+
class Any
|
137
|
+
include ::Google::Protobuf::MessageExts
|
138
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|