google-apis-ondemandscanning_v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-ondemandscanning_v1.rb +15 -0
- data/lib/google/apis/ondemandscanning_v1.rb +36 -0
- data/lib/google/apis/ondemandscanning_v1/classes.rb +1799 -0
- data/lib/google/apis/ondemandscanning_v1/gem_version.rb +28 -0
- data/lib/google/apis/ondemandscanning_v1/representations.rb +774 -0
- data/lib/google/apis/ondemandscanning_v1/service.rb +321 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 28d49ac6455f37349697178a010969f2507a36dff9c8eda5ea6042539e264dd7
|
4
|
+
data.tar.gz: f5390059ed88d8c9ca2c5643b19439b77d7b4e929450db127436bd826e40c6f7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2c7114baac783e930ad91a3fcd8ef06c6554535bf2efc2b33876b58c662c02bed4c1d89840d5c2da161781f3a8ad43365b671cbb0f3a21b4c5453ede0683f3f1
|
7
|
+
data.tar.gz: f872113b9875efb7d2db3f0a753d6e68cd0a05d836064ae36aefb08ebb95f3b4396efbc840a06c8a0248e98b9cb03020fd65ccd2242454789fed80eb2d3b3656
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-ondemandscanning_v1
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/ondemandscanning_v1/*.rb
|
9
|
+
lib/google/apis/ondemandscanning_v1.rb
|
10
|
+
-
|
11
|
+
OVERVIEW.md
|
12
|
+
CHANGELOG.md
|
13
|
+
LICENSE.md
|
data/CHANGELOG.md
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
data/OVERVIEW.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# Simple REST client for version V1 of the On-Demand Scanning API
|
2
|
+
|
3
|
+
This is a simple client library for version V1 of the On-Demand Scanning API. It provides:
|
4
|
+
|
5
|
+
* A client object that connects to the HTTP/JSON REST endpoint for the service.
|
6
|
+
* Ruby objects for data structures related to the service.
|
7
|
+
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
|
8
|
+
* Control of retry, pagination, and timeouts.
|
9
|
+
|
10
|
+
Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
|
11
|
+
|
12
|
+
## Getting started
|
13
|
+
|
14
|
+
### Before you begin
|
15
|
+
|
16
|
+
There are a few setup steps you need to complete before you can use this library:
|
17
|
+
|
18
|
+
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
|
19
|
+
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
|
20
|
+
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/ondemandscanning.googleapis.com) in the console.
|
21
|
+
|
22
|
+
### Installation
|
23
|
+
|
24
|
+
Add this line to your application's Gemfile:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
gem 'google-apis-ondemandscanning_v1', '~> 0.1'
|
28
|
+
```
|
29
|
+
|
30
|
+
And then execute:
|
31
|
+
|
32
|
+
```
|
33
|
+
$ bundle
|
34
|
+
```
|
35
|
+
|
36
|
+
Or install it yourself as:
|
37
|
+
|
38
|
+
```
|
39
|
+
$ gem install google-apis-ondemandscanning_v1
|
40
|
+
```
|
41
|
+
|
42
|
+
### Creating a client object
|
43
|
+
|
44
|
+
Once the gem is installed, you can load the client code and instantiate a client.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
# Load the client
|
48
|
+
require "google/apis/ondemandscanning_v1"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::OndemandscanningV1::OnDemandScanningService.new
|
52
|
+
|
53
|
+
# Authenticate calls
|
54
|
+
client.authentication = # ... use the googleauth gem to create credentials
|
55
|
+
```
|
56
|
+
|
57
|
+
See the class reference docs for information on the methods you can call from a client.
|
58
|
+
|
59
|
+
## Documentation
|
60
|
+
|
61
|
+
More detailed descriptions of the Google simple REST clients are available in two documents.
|
62
|
+
|
63
|
+
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
64
|
+
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
65
|
+
|
66
|
+
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Ondemandscanning service in particular.)
|
67
|
+
|
68
|
+
For reference information on specific calls in the On-Demand Scanning API, see the {Google::Apis::OndemandscanningV1::OnDemandScanningService class reference docs}.
|
69
|
+
|
70
|
+
## Which client should I use?
|
71
|
+
|
72
|
+
Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
|
73
|
+
|
74
|
+
This library, `google-apis-ondemandscanning_v1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
|
75
|
+
|
76
|
+
Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
|
77
|
+
|
78
|
+
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
|
79
|
+
|
80
|
+
**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
|
81
|
+
|
82
|
+
The [product documentation](https://cloud.google.com/container-analysis/docs/on-demand-scanning/) may provide guidance regarding the preferred client library to use.
|
83
|
+
|
84
|
+
## Supported Ruby versions
|
85
|
+
|
86
|
+
This library is supported on Ruby 2.5+.
|
87
|
+
|
88
|
+
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
|
89
|
+
|
90
|
+
## License
|
91
|
+
|
92
|
+
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
|
93
|
+
|
94
|
+
## Support
|
95
|
+
|
96
|
+
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require "google/apis/ondemandscanning_v1"
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/ondemandscanning_v1/service.rb'
|
16
|
+
require 'google/apis/ondemandscanning_v1/classes.rb'
|
17
|
+
require 'google/apis/ondemandscanning_v1/representations.rb'
|
18
|
+
require 'google/apis/ondemandscanning_v1/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# On-Demand Scanning API
|
23
|
+
#
|
24
|
+
# A service to scan container images for vulnerabilities.
|
25
|
+
#
|
26
|
+
# @see https://cloud.google.com/container-analysis/docs/on-demand-scanning/
|
27
|
+
module OndemandscanningV1
|
28
|
+
# Version of the On-Demand Scanning API this client connects to.
|
29
|
+
# This is NOT the gem version.
|
30
|
+
VERSION = 'V1'
|
31
|
+
|
32
|
+
# See, edit, configure, and delete your Google Cloud Platform data
|
33
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,1799 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module OndemandscanningV1
|
24
|
+
|
25
|
+
# An alias to a repo revision.
|
26
|
+
class AliasContext
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# The alias kind.
|
30
|
+
# Corresponds to the JSON property `kind`
|
31
|
+
# @return [String]
|
32
|
+
attr_accessor :kind
|
33
|
+
|
34
|
+
# The alias name.
|
35
|
+
# Corresponds to the JSON property `name`
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :name
|
38
|
+
|
39
|
+
def initialize(**args)
|
40
|
+
update!(**args)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Update properties of this object
|
44
|
+
def update!(**args)
|
45
|
+
@kind = args[:kind] if args.key?(:kind)
|
46
|
+
@name = args[:name] if args.key?(:name)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# AnalyzePackagesMetadata contains metadata for an active scan of a container
|
51
|
+
# image.
|
52
|
+
class AnalyzePackagesMetadata
|
53
|
+
include Google::Apis::Core::Hashable
|
54
|
+
|
55
|
+
# When the scan was created.
|
56
|
+
# Corresponds to the JSON property `createTime`
|
57
|
+
# @return [String]
|
58
|
+
attr_accessor :create_time
|
59
|
+
|
60
|
+
# The resource URI of the container image being scanned.
|
61
|
+
# Corresponds to the JSON property `resourceUri`
|
62
|
+
# @return [String]
|
63
|
+
attr_accessor :resource_uri
|
64
|
+
|
65
|
+
def initialize(**args)
|
66
|
+
update!(**args)
|
67
|
+
end
|
68
|
+
|
69
|
+
# Update properties of this object
|
70
|
+
def update!(**args)
|
71
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
72
|
+
@resource_uri = args[:resource_uri] if args.key?(:resource_uri)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# AnalyzePackagesMetadata contains metadata for an active scan of a container
|
77
|
+
# image.
|
78
|
+
class AnalyzePackagesMetadataV1
|
79
|
+
include Google::Apis::Core::Hashable
|
80
|
+
|
81
|
+
# When the scan was created.
|
82
|
+
# Corresponds to the JSON property `createTime`
|
83
|
+
# @return [String]
|
84
|
+
attr_accessor :create_time
|
85
|
+
|
86
|
+
# The resource URI of the container image being scanned.
|
87
|
+
# Corresponds to the JSON property `resourceUri`
|
88
|
+
# @return [String]
|
89
|
+
attr_accessor :resource_uri
|
90
|
+
|
91
|
+
def initialize(**args)
|
92
|
+
update!(**args)
|
93
|
+
end
|
94
|
+
|
95
|
+
# Update properties of this object
|
96
|
+
def update!(**args)
|
97
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
98
|
+
@resource_uri = args[:resource_uri] if args.key?(:resource_uri)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
# AnalyzePackagesRequest is the request to analyze a list of packages and create
|
103
|
+
# Vulnerability Occurrences for it.
|
104
|
+
class AnalyzePackagesRequestV1
|
105
|
+
include Google::Apis::Core::Hashable
|
106
|
+
|
107
|
+
# The packages to analyze.
|
108
|
+
# Corresponds to the JSON property `packages`
|
109
|
+
# @return [Array<Google::Apis::OndemandscanningV1::PackageData>]
|
110
|
+
attr_accessor :packages
|
111
|
+
|
112
|
+
# Required. The resource URI of the container image being scanned.
|
113
|
+
# Corresponds to the JSON property `resourceUri`
|
114
|
+
# @return [String]
|
115
|
+
attr_accessor :resource_uri
|
116
|
+
|
117
|
+
def initialize(**args)
|
118
|
+
update!(**args)
|
119
|
+
end
|
120
|
+
|
121
|
+
# Update properties of this object
|
122
|
+
def update!(**args)
|
123
|
+
@packages = args[:packages] if args.key?(:packages)
|
124
|
+
@resource_uri = args[:resource_uri] if args.key?(:resource_uri)
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
# AnalyzePackagesResponse contains the information necessary to find results for
|
129
|
+
# the given scan.
|
130
|
+
class AnalyzePackagesResponse
|
131
|
+
include Google::Apis::Core::Hashable
|
132
|
+
|
133
|
+
# The name of the scan resource created by this successful scan.
|
134
|
+
# Corresponds to the JSON property `scan`
|
135
|
+
# @return [String]
|
136
|
+
attr_accessor :scan
|
137
|
+
|
138
|
+
def initialize(**args)
|
139
|
+
update!(**args)
|
140
|
+
end
|
141
|
+
|
142
|
+
# Update properties of this object
|
143
|
+
def update!(**args)
|
144
|
+
@scan = args[:scan] if args.key?(:scan)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# AnalyzePackagesResponse contains the information necessary to find results for
|
149
|
+
# the given scan.
|
150
|
+
class AnalyzePackagesResponseV1
|
151
|
+
include Google::Apis::Core::Hashable
|
152
|
+
|
153
|
+
# The name of the scan resource created by this successful scan.
|
154
|
+
# Corresponds to the JSON property `scan`
|
155
|
+
# @return [String]
|
156
|
+
attr_accessor :scan
|
157
|
+
|
158
|
+
def initialize(**args)
|
159
|
+
update!(**args)
|
160
|
+
end
|
161
|
+
|
162
|
+
# Update properties of this object
|
163
|
+
def update!(**args)
|
164
|
+
@scan = args[:scan] if args.key?(:scan)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
# Artifact describes a build product.
|
169
|
+
class Artifact
|
170
|
+
include Google::Apis::Core::Hashable
|
171
|
+
|
172
|
+
# Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
|
173
|
+
# container.
|
174
|
+
# Corresponds to the JSON property `checksum`
|
175
|
+
# @return [String]
|
176
|
+
attr_accessor :checksum
|
177
|
+
|
178
|
+
# Artifact ID, if any; for container images, this will be a URL by digest like `
|
179
|
+
# gcr.io/projectID/imagename@sha256:123456`.
|
180
|
+
# Corresponds to the JSON property `id`
|
181
|
+
# @return [String]
|
182
|
+
attr_accessor :id
|
183
|
+
|
184
|
+
# Related artifact names. This may be the path to a binary or jar file, or in
|
185
|
+
# the case of a container build, the name used to push the container image to
|
186
|
+
# Google Container Registry, as presented to `docker push`. Note that a single
|
187
|
+
# Artifact ID can have multiple names, for example if two tags are applied to
|
188
|
+
# one image.
|
189
|
+
# Corresponds to the JSON property `names`
|
190
|
+
# @return [Array<String>]
|
191
|
+
attr_accessor :names
|
192
|
+
|
193
|
+
def initialize(**args)
|
194
|
+
update!(**args)
|
195
|
+
end
|
196
|
+
|
197
|
+
# Update properties of this object
|
198
|
+
def update!(**args)
|
199
|
+
@checksum = args[:checksum] if args.key?(:checksum)
|
200
|
+
@id = args[:id] if args.key?(:id)
|
201
|
+
@names = args[:names] if args.key?(:names)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
# Occurrence that represents a single "attestation". The authenticity of an
|
206
|
+
# attestation can be verified using the attached signature. If the verifier
|
207
|
+
# trusts the public key of the signer, then verifying the signature is
|
208
|
+
# sufficient to establish trust. In this circumstance, the authority to which
|
209
|
+
# this attestation is attached is primarily useful for lookup (how to find this
|
210
|
+
# attestation if you already know the authority and artifact to be verified) and
|
211
|
+
# intent (for which authority this attestation was intended to sign.
|
212
|
+
class AttestationOccurrence
|
213
|
+
include Google::Apis::Core::Hashable
|
214
|
+
|
215
|
+
# One or more JWTs encoding a self-contained attestation. Each JWT encodes the
|
216
|
+
# payload that it verifies within the JWT itself. Verifier implementation SHOULD
|
217
|
+
# ignore the `serialized_payload` field when verifying these JWTs. If only JWTs
|
218
|
+
# are present on this AttestationOccurrence, then the `serialized_payload`
|
219
|
+
# SHOULD be left empty. Each JWT SHOULD encode a claim specific to the `
|
220
|
+
# resource_uri` of this Occurrence, but this is not validated by Grafeas
|
221
|
+
# metadata API implementations. The JWT itself is opaque to Grafeas.
|
222
|
+
# Corresponds to the JSON property `jwts`
|
223
|
+
# @return [Array<Google::Apis::OndemandscanningV1::Jwt>]
|
224
|
+
attr_accessor :jwts
|
225
|
+
|
226
|
+
# Required. The serialized payload that is verified by one or more `signatures`.
|
227
|
+
# Corresponds to the JSON property `serializedPayload`
|
228
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
229
|
+
# @return [String]
|
230
|
+
attr_accessor :serialized_payload
|
231
|
+
|
232
|
+
# One or more signatures over `serialized_payload`. Verifier implementations
|
233
|
+
# should consider this attestation message verified if at least one `signature`
|
234
|
+
# verifies `serialized_payload`. See `Signature` in common.proto for more
|
235
|
+
# details on signature structure and verification.
|
236
|
+
# Corresponds to the JSON property `signatures`
|
237
|
+
# @return [Array<Google::Apis::OndemandscanningV1::Signature>]
|
238
|
+
attr_accessor :signatures
|
239
|
+
|
240
|
+
def initialize(**args)
|
241
|
+
update!(**args)
|
242
|
+
end
|
243
|
+
|
244
|
+
# Update properties of this object
|
245
|
+
def update!(**args)
|
246
|
+
@jwts = args[:jwts] if args.key?(:jwts)
|
247
|
+
@serialized_payload = args[:serialized_payload] if args.key?(:serialized_payload)
|
248
|
+
@signatures = args[:signatures] if args.key?(:signatures)
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
# Details of a build occurrence.
|
253
|
+
class BuildOccurrence
|
254
|
+
include Google::Apis::Core::Hashable
|
255
|
+
|
256
|
+
# Provenance of a build. Contains all information needed to verify the full
|
257
|
+
# details about the build from source to completion.
|
258
|
+
# Corresponds to the JSON property `provenance`
|
259
|
+
# @return [Google::Apis::OndemandscanningV1::BuildProvenance]
|
260
|
+
attr_accessor :provenance
|
261
|
+
|
262
|
+
# Serialized JSON representation of the provenance, used in generating the build
|
263
|
+
# signature in the corresponding build note. After verifying the signature, `
|
264
|
+
# provenance_bytes` can be unmarshalled and compared to the provenance to
|
265
|
+
# confirm that it is unchanged. A base64-encoded string representation of the
|
266
|
+
# provenance bytes is used for the signature in order to interoperate with
|
267
|
+
# openssl which expects this format for signature verification. The serialized
|
268
|
+
# form is captured both to avoid ambiguity in how the provenance is marshalled
|
269
|
+
# to json as well to prevent incompatibilities with future changes.
|
270
|
+
# Corresponds to the JSON property `provenanceBytes`
|
271
|
+
# @return [String]
|
272
|
+
attr_accessor :provenance_bytes
|
273
|
+
|
274
|
+
def initialize(**args)
|
275
|
+
update!(**args)
|
276
|
+
end
|
277
|
+
|
278
|
+
# Update properties of this object
|
279
|
+
def update!(**args)
|
280
|
+
@provenance = args[:provenance] if args.key?(:provenance)
|
281
|
+
@provenance_bytes = args[:provenance_bytes] if args.key?(:provenance_bytes)
|
282
|
+
end
|
283
|
+
end
|
284
|
+
|
285
|
+
# Provenance of a build. Contains all information needed to verify the full
|
286
|
+
# details about the build from source to completion.
|
287
|
+
class BuildProvenance
|
288
|
+
include Google::Apis::Core::Hashable
|
289
|
+
|
290
|
+
# Special options applied to this build. This is a catch-all field where build
|
291
|
+
# providers can enter any desired additional details.
|
292
|
+
# Corresponds to the JSON property `buildOptions`
|
293
|
+
# @return [Hash<String,String>]
|
294
|
+
attr_accessor :build_options
|
295
|
+
|
296
|
+
# Version string of the builder at the time this build was executed.
|
297
|
+
# Corresponds to the JSON property `builderVersion`
|
298
|
+
# @return [String]
|
299
|
+
attr_accessor :builder_version
|
300
|
+
|
301
|
+
# Output of the build.
|
302
|
+
# Corresponds to the JSON property `builtArtifacts`
|
303
|
+
# @return [Array<Google::Apis::OndemandscanningV1::Artifact>]
|
304
|
+
attr_accessor :built_artifacts
|
305
|
+
|
306
|
+
# Commands requested by the build.
|
307
|
+
# Corresponds to the JSON property `commands`
|
308
|
+
# @return [Array<Google::Apis::OndemandscanningV1::Command>]
|
309
|
+
attr_accessor :commands
|
310
|
+
|
311
|
+
# Time at which the build was created.
|
312
|
+
# Corresponds to the JSON property `createTime`
|
313
|
+
# @return [String]
|
314
|
+
attr_accessor :create_time
|
315
|
+
|
316
|
+
# E-mail address of the user who initiated this build. Note that this was the
|
317
|
+
# user's e-mail address at the time the build was initiated; this address may
|
318
|
+
# not represent the same end-user for all time.
|
319
|
+
# Corresponds to the JSON property `creator`
|
320
|
+
# @return [String]
|
321
|
+
attr_accessor :creator
|
322
|
+
|
323
|
+
# Time at which execution of the build was finished.
|
324
|
+
# Corresponds to the JSON property `endTime`
|
325
|
+
# @return [String]
|
326
|
+
attr_accessor :end_time
|
327
|
+
|
328
|
+
# Required. Unique identifier of the build.
|
329
|
+
# Corresponds to the JSON property `id`
|
330
|
+
# @return [String]
|
331
|
+
attr_accessor :id
|
332
|
+
|
333
|
+
# URI where any logs for this provenance were written.
|
334
|
+
# Corresponds to the JSON property `logsUri`
|
335
|
+
# @return [String]
|
336
|
+
attr_accessor :logs_uri
|
337
|
+
|
338
|
+
# ID of the project.
|
339
|
+
# Corresponds to the JSON property `projectId`
|
340
|
+
# @return [String]
|
341
|
+
attr_accessor :project_id
|
342
|
+
|
343
|
+
# Source describes the location of the source used for the build.
|
344
|
+
# Corresponds to the JSON property `sourceProvenance`
|
345
|
+
# @return [Google::Apis::OndemandscanningV1::Source]
|
346
|
+
attr_accessor :source_provenance
|
347
|
+
|
348
|
+
# Time at which execution of the build was started.
|
349
|
+
# Corresponds to the JSON property `startTime`
|
350
|
+
# @return [String]
|
351
|
+
attr_accessor :start_time
|
352
|
+
|
353
|
+
# Trigger identifier if the build was triggered automatically; empty if not.
|
354
|
+
# Corresponds to the JSON property `triggerId`
|
355
|
+
# @return [String]
|
356
|
+
attr_accessor :trigger_id
|
357
|
+
|
358
|
+
def initialize(**args)
|
359
|
+
update!(**args)
|
360
|
+
end
|
361
|
+
|
362
|
+
# Update properties of this object
|
363
|
+
def update!(**args)
|
364
|
+
@build_options = args[:build_options] if args.key?(:build_options)
|
365
|
+
@builder_version = args[:builder_version] if args.key?(:builder_version)
|
366
|
+
@built_artifacts = args[:built_artifacts] if args.key?(:built_artifacts)
|
367
|
+
@commands = args[:commands] if args.key?(:commands)
|
368
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
369
|
+
@creator = args[:creator] if args.key?(:creator)
|
370
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
371
|
+
@id = args[:id] if args.key?(:id)
|
372
|
+
@logs_uri = args[:logs_uri] if args.key?(:logs_uri)
|
373
|
+
@project_id = args[:project_id] if args.key?(:project_id)
|
374
|
+
@source_provenance = args[:source_provenance] if args.key?(:source_provenance)
|
375
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
376
|
+
@trigger_id = args[:trigger_id] if args.key?(:trigger_id)
|
377
|
+
end
|
378
|
+
end
|
379
|
+
|
380
|
+
# The category to which the update belongs.
|
381
|
+
class Category
|
382
|
+
include Google::Apis::Core::Hashable
|
383
|
+
|
384
|
+
# The identifier of the category.
|
385
|
+
# Corresponds to the JSON property `categoryId`
|
386
|
+
# @return [String]
|
387
|
+
attr_accessor :category_id
|
388
|
+
|
389
|
+
# The localized name of the category.
|
390
|
+
# Corresponds to the JSON property `name`
|
391
|
+
# @return [String]
|
392
|
+
attr_accessor :name
|
393
|
+
|
394
|
+
def initialize(**args)
|
395
|
+
update!(**args)
|
396
|
+
end
|
397
|
+
|
398
|
+
# Update properties of this object
|
399
|
+
def update!(**args)
|
400
|
+
@category_id = args[:category_id] if args.key?(:category_id)
|
401
|
+
@name = args[:name] if args.key?(:name)
|
402
|
+
end
|
403
|
+
end
|
404
|
+
|
405
|
+
# A CloudRepoSourceContext denotes a particular revision in a Google Cloud
|
406
|
+
# Source Repo.
|
407
|
+
class CloudRepoSourceContext
|
408
|
+
include Google::Apis::Core::Hashable
|
409
|
+
|
410
|
+
# An alias to a repo revision.
|
411
|
+
# Corresponds to the JSON property `aliasContext`
|
412
|
+
# @return [Google::Apis::OndemandscanningV1::AliasContext]
|
413
|
+
attr_accessor :alias_context
|
414
|
+
|
415
|
+
# A unique identifier for a Cloud Repo.
|
416
|
+
# Corresponds to the JSON property `repoId`
|
417
|
+
# @return [Google::Apis::OndemandscanningV1::RepoId]
|
418
|
+
attr_accessor :repo_id
|
419
|
+
|
420
|
+
# A revision ID.
|
421
|
+
# Corresponds to the JSON property `revisionId`
|
422
|
+
# @return [String]
|
423
|
+
attr_accessor :revision_id
|
424
|
+
|
425
|
+
def initialize(**args)
|
426
|
+
update!(**args)
|
427
|
+
end
|
428
|
+
|
429
|
+
# Update properties of this object
|
430
|
+
def update!(**args)
|
431
|
+
@alias_context = args[:alias_context] if args.key?(:alias_context)
|
432
|
+
@repo_id = args[:repo_id] if args.key?(:repo_id)
|
433
|
+
@revision_id = args[:revision_id] if args.key?(:revision_id)
|
434
|
+
end
|
435
|
+
end
|
436
|
+
|
437
|
+
# Command describes a step performed as part of the build pipeline.
|
438
|
+
class Command
|
439
|
+
include Google::Apis::Core::Hashable
|
440
|
+
|
441
|
+
# Command-line arguments used when executing this command.
|
442
|
+
# Corresponds to the JSON property `args`
|
443
|
+
# @return [Array<String>]
|
444
|
+
attr_accessor :args
|
445
|
+
|
446
|
+
# Working directory (relative to project source root) used when running this
|
447
|
+
# command.
|
448
|
+
# Corresponds to the JSON property `dir`
|
449
|
+
# @return [String]
|
450
|
+
attr_accessor :dir
|
451
|
+
|
452
|
+
# Environment variables set before running this command.
|
453
|
+
# Corresponds to the JSON property `env`
|
454
|
+
# @return [Array<String>]
|
455
|
+
attr_accessor :env
|
456
|
+
|
457
|
+
# Optional unique identifier for this command, used in wait_for to reference
|
458
|
+
# this command as a dependency.
|
459
|
+
# Corresponds to the JSON property `id`
|
460
|
+
# @return [String]
|
461
|
+
attr_accessor :id
|
462
|
+
|
463
|
+
# Required. Name of the command, as presented on the command line, or if the
|
464
|
+
# command is packaged as a Docker container, as presented to `docker pull`.
|
465
|
+
# Corresponds to the JSON property `name`
|
466
|
+
# @return [String]
|
467
|
+
attr_accessor :name
|
468
|
+
|
469
|
+
# The ID(s) of the command(s) that this command depends on.
|
470
|
+
# Corresponds to the JSON property `waitFor`
|
471
|
+
# @return [Array<String>]
|
472
|
+
attr_accessor :wait_for
|
473
|
+
|
474
|
+
def initialize(**args)
|
475
|
+
update!(**args)
|
476
|
+
end
|
477
|
+
|
478
|
+
# Update properties of this object
|
479
|
+
def update!(**args)
|
480
|
+
@args = args[:args] if args.key?(:args)
|
481
|
+
@dir = args[:dir] if args.key?(:dir)
|
482
|
+
@env = args[:env] if args.key?(:env)
|
483
|
+
@id = args[:id] if args.key?(:id)
|
484
|
+
@name = args[:name] if args.key?(:name)
|
485
|
+
@wait_for = args[:wait_for] if args.key?(:wait_for)
|
486
|
+
end
|
487
|
+
end
|
488
|
+
|
489
|
+
# The period during which some deployable was active in a runtime.
|
490
|
+
class DeploymentOccurrence
|
491
|
+
include Google::Apis::Core::Hashable
|
492
|
+
|
493
|
+
# Address of the runtime element hosting this deployment.
|
494
|
+
# Corresponds to the JSON property `address`
|
495
|
+
# @return [String]
|
496
|
+
attr_accessor :address
|
497
|
+
|
498
|
+
# Configuration used to create this deployment.
|
499
|
+
# Corresponds to the JSON property `config`
|
500
|
+
# @return [String]
|
501
|
+
attr_accessor :config
|
502
|
+
|
503
|
+
# Required. Beginning of the lifetime of this deployment.
|
504
|
+
# Corresponds to the JSON property `deployTime`
|
505
|
+
# @return [String]
|
506
|
+
attr_accessor :deploy_time
|
507
|
+
|
508
|
+
# Platform hosting this deployment.
|
509
|
+
# Corresponds to the JSON property `platform`
|
510
|
+
# @return [String]
|
511
|
+
attr_accessor :platform
|
512
|
+
|
513
|
+
# Output only. Resource URI for the artifact being deployed taken from the
|
514
|
+
# deployable field with the same name.
|
515
|
+
# Corresponds to the JSON property `resourceUri`
|
516
|
+
# @return [Array<String>]
|
517
|
+
attr_accessor :resource_uri
|
518
|
+
|
519
|
+
# End of the lifetime of this deployment.
|
520
|
+
# Corresponds to the JSON property `undeployTime`
|
521
|
+
# @return [String]
|
522
|
+
attr_accessor :undeploy_time
|
523
|
+
|
524
|
+
# Identity of the user that triggered this deployment.
|
525
|
+
# Corresponds to the JSON property `userEmail`
|
526
|
+
# @return [String]
|
527
|
+
attr_accessor :user_email
|
528
|
+
|
529
|
+
def initialize(**args)
|
530
|
+
update!(**args)
|
531
|
+
end
|
532
|
+
|
533
|
+
# Update properties of this object
|
534
|
+
def update!(**args)
|
535
|
+
@address = args[:address] if args.key?(:address)
|
536
|
+
@config = args[:config] if args.key?(:config)
|
537
|
+
@deploy_time = args[:deploy_time] if args.key?(:deploy_time)
|
538
|
+
@platform = args[:platform] if args.key?(:platform)
|
539
|
+
@resource_uri = args[:resource_uri] if args.key?(:resource_uri)
|
540
|
+
@undeploy_time = args[:undeploy_time] if args.key?(:undeploy_time)
|
541
|
+
@user_email = args[:user_email] if args.key?(:user_email)
|
542
|
+
end
|
543
|
+
end
|
544
|
+
|
545
|
+
# Provides information about the analysis status of a discovered resource.
|
546
|
+
class DiscoveryOccurrence
|
547
|
+
include Google::Apis::Core::Hashable
|
548
|
+
|
549
|
+
# The status of discovery for the resource.
|
550
|
+
# Corresponds to the JSON property `analysisStatus`
|
551
|
+
# @return [String]
|
552
|
+
attr_accessor :analysis_status
|
553
|
+
|
554
|
+
# The `Status` type defines a logical error model that is suitable for different
|
555
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
556
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
557
|
+
# data: error code, error message, and error details. You can find out more
|
558
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
559
|
+
# //cloud.google.com/apis/design/errors).
|
560
|
+
# Corresponds to the JSON property `analysisStatusError`
|
561
|
+
# @return [Google::Apis::OndemandscanningV1::Status]
|
562
|
+
attr_accessor :analysis_status_error
|
563
|
+
|
564
|
+
# Whether the resource is continuously analyzed.
|
565
|
+
# Corresponds to the JSON property `continuousAnalysis`
|
566
|
+
# @return [String]
|
567
|
+
attr_accessor :continuous_analysis
|
568
|
+
|
569
|
+
# The CPE of the resource being scanned.
|
570
|
+
# Corresponds to the JSON property `cpe`
|
571
|
+
# @return [String]
|
572
|
+
attr_accessor :cpe
|
573
|
+
|
574
|
+
# The last time this resource was scanned.
|
575
|
+
# Corresponds to the JSON property `lastScanTime`
|
576
|
+
# @return [String]
|
577
|
+
attr_accessor :last_scan_time
|
578
|
+
|
579
|
+
def initialize(**args)
|
580
|
+
update!(**args)
|
581
|
+
end
|
582
|
+
|
583
|
+
# Update properties of this object
|
584
|
+
def update!(**args)
|
585
|
+
@analysis_status = args[:analysis_status] if args.key?(:analysis_status)
|
586
|
+
@analysis_status_error = args[:analysis_status_error] if args.key?(:analysis_status_error)
|
587
|
+
@continuous_analysis = args[:continuous_analysis] if args.key?(:continuous_analysis)
|
588
|
+
@cpe = args[:cpe] if args.key?(:cpe)
|
589
|
+
@last_scan_time = args[:last_scan_time] if args.key?(:last_scan_time)
|
590
|
+
end
|
591
|
+
end
|
592
|
+
|
593
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
594
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
595
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
596
|
+
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
|
597
|
+
# `Empty` is empty JSON object ````.
|
598
|
+
class Empty
|
599
|
+
include Google::Apis::Core::Hashable
|
600
|
+
|
601
|
+
def initialize(**args)
|
602
|
+
update!(**args)
|
603
|
+
end
|
604
|
+
|
605
|
+
# Update properties of this object
|
606
|
+
def update!(**args)
|
607
|
+
end
|
608
|
+
end
|
609
|
+
|
610
|
+
# Container message for hashes of byte content of files, used in source messages
|
611
|
+
# to verify integrity of source input to the build.
|
612
|
+
class FileHashes
|
613
|
+
include Google::Apis::Core::Hashable
|
614
|
+
|
615
|
+
# Required. Collection of file hashes.
|
616
|
+
# Corresponds to the JSON property `fileHash`
|
617
|
+
# @return [Array<Google::Apis::OndemandscanningV1::HashProp>]
|
618
|
+
attr_accessor :file_hash
|
619
|
+
|
620
|
+
def initialize(**args)
|
621
|
+
update!(**args)
|
622
|
+
end
|
623
|
+
|
624
|
+
# Update properties of this object
|
625
|
+
def update!(**args)
|
626
|
+
@file_hash = args[:file_hash] if args.key?(:file_hash)
|
627
|
+
end
|
628
|
+
end
|
629
|
+
|
630
|
+
# A set of properties that uniquely identify a given Docker image.
|
631
|
+
class Fingerprint
|
632
|
+
include Google::Apis::Core::Hashable
|
633
|
+
|
634
|
+
# Required. The layer ID of the final layer in the Docker image's v1
|
635
|
+
# representation.
|
636
|
+
# Corresponds to the JSON property `v1Name`
|
637
|
+
# @return [String]
|
638
|
+
attr_accessor :v1_name
|
639
|
+
|
640
|
+
# Required. The ordered list of v2 blobs that represent a given image.
|
641
|
+
# Corresponds to the JSON property `v2Blob`
|
642
|
+
# @return [Array<String>]
|
643
|
+
attr_accessor :v2_blob
|
644
|
+
|
645
|
+
# Output only. The name of the image's v2 blobs computed via: [bottom] :=
|
646
|
+
# v2_blobbottom := sha256(v2_blob[N] + " " + v2_name[N+1]) Only the name of the
|
647
|
+
# final blob is kept.
|
648
|
+
# Corresponds to the JSON property `v2Name`
|
649
|
+
# @return [String]
|
650
|
+
attr_accessor :v2_name
|
651
|
+
|
652
|
+
def initialize(**args)
|
653
|
+
update!(**args)
|
654
|
+
end
|
655
|
+
|
656
|
+
# Update properties of this object
|
657
|
+
def update!(**args)
|
658
|
+
@v1_name = args[:v1_name] if args.key?(:v1_name)
|
659
|
+
@v2_blob = args[:v2_blob] if args.key?(:v2_blob)
|
660
|
+
@v2_name = args[:v2_name] if args.key?(:v2_name)
|
661
|
+
end
|
662
|
+
end
|
663
|
+
|
664
|
+
# A SourceContext referring to a Gerrit project.
|
665
|
+
class GerritSourceContext
|
666
|
+
include Google::Apis::Core::Hashable
|
667
|
+
|
668
|
+
# An alias to a repo revision.
|
669
|
+
# Corresponds to the JSON property `aliasContext`
|
670
|
+
# @return [Google::Apis::OndemandscanningV1::AliasContext]
|
671
|
+
attr_accessor :alias_context
|
672
|
+
|
673
|
+
# The full project name within the host. Projects may be nested, so "project/
|
674
|
+
# subproject" is a valid project name. The "repo name" is the hostURI/project.
|
675
|
+
# Corresponds to the JSON property `gerritProject`
|
676
|
+
# @return [String]
|
677
|
+
attr_accessor :gerrit_project
|
678
|
+
|
679
|
+
# The URI of a running Gerrit instance.
|
680
|
+
# Corresponds to the JSON property `hostUri`
|
681
|
+
# @return [String]
|
682
|
+
attr_accessor :host_uri
|
683
|
+
|
684
|
+
# A revision (commit) ID.
|
685
|
+
# Corresponds to the JSON property `revisionId`
|
686
|
+
# @return [String]
|
687
|
+
attr_accessor :revision_id
|
688
|
+
|
689
|
+
def initialize(**args)
|
690
|
+
update!(**args)
|
691
|
+
end
|
692
|
+
|
693
|
+
# Update properties of this object
|
694
|
+
def update!(**args)
|
695
|
+
@alias_context = args[:alias_context] if args.key?(:alias_context)
|
696
|
+
@gerrit_project = args[:gerrit_project] if args.key?(:gerrit_project)
|
697
|
+
@host_uri = args[:host_uri] if args.key?(:host_uri)
|
698
|
+
@revision_id = args[:revision_id] if args.key?(:revision_id)
|
699
|
+
end
|
700
|
+
end
|
701
|
+
|
702
|
+
# A GitSourceContext denotes a particular revision in a third party Git
|
703
|
+
# repository (e.g., GitHub).
|
704
|
+
class GitSourceContext
|
705
|
+
include Google::Apis::Core::Hashable
|
706
|
+
|
707
|
+
# Git commit hash.
|
708
|
+
# Corresponds to the JSON property `revisionId`
|
709
|
+
# @return [String]
|
710
|
+
attr_accessor :revision_id
|
711
|
+
|
712
|
+
# Git repository URL.
|
713
|
+
# Corresponds to the JSON property `url`
|
714
|
+
# @return [String]
|
715
|
+
attr_accessor :url
|
716
|
+
|
717
|
+
def initialize(**args)
|
718
|
+
update!(**args)
|
719
|
+
end
|
720
|
+
|
721
|
+
# Update properties of this object
|
722
|
+
def update!(**args)
|
723
|
+
@revision_id = args[:revision_id] if args.key?(:revision_id)
|
724
|
+
@url = args[:url] if args.key?(:url)
|
725
|
+
end
|
726
|
+
end
|
727
|
+
|
728
|
+
# Container message for hash values.
|
729
|
+
class HashProp
|
730
|
+
include Google::Apis::Core::Hashable
|
731
|
+
|
732
|
+
# Required. The type of hash that was performed, e.g. "SHA-256".
|
733
|
+
# Corresponds to the JSON property `type`
|
734
|
+
# @return [String]
|
735
|
+
attr_accessor :type
|
736
|
+
|
737
|
+
# Required. The hash value.
|
738
|
+
# Corresponds to the JSON property `value`
|
739
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
740
|
+
# @return [String]
|
741
|
+
attr_accessor :value
|
742
|
+
|
743
|
+
def initialize(**args)
|
744
|
+
update!(**args)
|
745
|
+
end
|
746
|
+
|
747
|
+
# Update properties of this object
|
748
|
+
def update!(**args)
|
749
|
+
@type = args[:type] if args.key?(:type)
|
750
|
+
@value = args[:value] if args.key?(:value)
|
751
|
+
end
|
752
|
+
end
|
753
|
+
|
754
|
+
# The unique identifier of the update.
|
755
|
+
class Identity
|
756
|
+
include Google::Apis::Core::Hashable
|
757
|
+
|
758
|
+
# The revision number of the update.
|
759
|
+
# Corresponds to the JSON property `revision`
|
760
|
+
# @return [Fixnum]
|
761
|
+
attr_accessor :revision
|
762
|
+
|
763
|
+
# The revision independent identifier of the update.
|
764
|
+
# Corresponds to the JSON property `updateId`
|
765
|
+
# @return [String]
|
766
|
+
attr_accessor :update_id
|
767
|
+
|
768
|
+
def initialize(**args)
|
769
|
+
update!(**args)
|
770
|
+
end
|
771
|
+
|
772
|
+
# Update properties of this object
|
773
|
+
def update!(**args)
|
774
|
+
@revision = args[:revision] if args.key?(:revision)
|
775
|
+
@update_id = args[:update_id] if args.key?(:update_id)
|
776
|
+
end
|
777
|
+
end
|
778
|
+
|
779
|
+
# Details of the derived image portion of the DockerImage relationship. This
|
780
|
+
# image would be produced from a Dockerfile with FROM .
|
781
|
+
class ImageOccurrence
|
782
|
+
include Google::Apis::Core::Hashable
|
783
|
+
|
784
|
+
# Output only. This contains the base image URL for the derived image occurrence.
|
785
|
+
# Corresponds to the JSON property `baseResourceUrl`
|
786
|
+
# @return [String]
|
787
|
+
attr_accessor :base_resource_url
|
788
|
+
|
789
|
+
# Output only. The number of layers by which this image differs from the
|
790
|
+
# associated image basis.
|
791
|
+
# Corresponds to the JSON property `distance`
|
792
|
+
# @return [Fixnum]
|
793
|
+
attr_accessor :distance
|
794
|
+
|
795
|
+
# A set of properties that uniquely identify a given Docker image.
|
796
|
+
# Corresponds to the JSON property `fingerprint`
|
797
|
+
# @return [Google::Apis::OndemandscanningV1::Fingerprint]
|
798
|
+
attr_accessor :fingerprint
|
799
|
+
|
800
|
+
# This contains layer-specific metadata, if populated it has length "distance"
|
801
|
+
# and is ordered with [distance] being the layer immediately following the base
|
802
|
+
# image and [1] being the final layer.
|
803
|
+
# Corresponds to the JSON property `layerInfo`
|
804
|
+
# @return [Array<Google::Apis::OndemandscanningV1::Layer>]
|
805
|
+
attr_accessor :layer_info
|
806
|
+
|
807
|
+
def initialize(**args)
|
808
|
+
update!(**args)
|
809
|
+
end
|
810
|
+
|
811
|
+
# Update properties of this object
|
812
|
+
def update!(**args)
|
813
|
+
@base_resource_url = args[:base_resource_url] if args.key?(:base_resource_url)
|
814
|
+
@distance = args[:distance] if args.key?(:distance)
|
815
|
+
@fingerprint = args[:fingerprint] if args.key?(:fingerprint)
|
816
|
+
@layer_info = args[:layer_info] if args.key?(:layer_info)
|
817
|
+
end
|
818
|
+
end
|
819
|
+
|
820
|
+
#
|
821
|
+
class Jwt
|
822
|
+
include Google::Apis::Core::Hashable
|
823
|
+
|
824
|
+
# The compact encoding of a JWS, which is always three base64 encoded strings
|
825
|
+
# joined by periods. For details, see: https://tools.ietf.org/html/rfc7515.html#
|
826
|
+
# section-3.1
|
827
|
+
# Corresponds to the JSON property `compactJwt`
|
828
|
+
# @return [String]
|
829
|
+
attr_accessor :compact_jwt
|
830
|
+
|
831
|
+
def initialize(**args)
|
832
|
+
update!(**args)
|
833
|
+
end
|
834
|
+
|
835
|
+
# Update properties of this object
|
836
|
+
def update!(**args)
|
837
|
+
@compact_jwt = args[:compact_jwt] if args.key?(:compact_jwt)
|
838
|
+
end
|
839
|
+
end
|
840
|
+
|
841
|
+
# Layer holds metadata specific to a layer of a Docker image.
|
842
|
+
class Layer
|
843
|
+
include Google::Apis::Core::Hashable
|
844
|
+
|
845
|
+
# The recovered arguments to the Dockerfile directive.
|
846
|
+
# Corresponds to the JSON property `arguments`
|
847
|
+
# @return [String]
|
848
|
+
attr_accessor :arguments
|
849
|
+
|
850
|
+
# Required. The recovered Dockerfile directive used to construct this layer. See
|
851
|
+
# https://docs.docker.com/engine/reference/builder/ for more information.
|
852
|
+
# Corresponds to the JSON property `directive`
|
853
|
+
# @return [String]
|
854
|
+
attr_accessor :directive
|
855
|
+
|
856
|
+
def initialize(**args)
|
857
|
+
update!(**args)
|
858
|
+
end
|
859
|
+
|
860
|
+
# Update properties of this object
|
861
|
+
def update!(**args)
|
862
|
+
@arguments = args[:arguments] if args.key?(:arguments)
|
863
|
+
@directive = args[:directive] if args.key?(:directive)
|
864
|
+
end
|
865
|
+
end
|
866
|
+
|
867
|
+
# The response message for Operations.ListOperations.
|
868
|
+
class ListOperationsResponse
|
869
|
+
include Google::Apis::Core::Hashable
|
870
|
+
|
871
|
+
# The standard List next-page token.
|
872
|
+
# Corresponds to the JSON property `nextPageToken`
|
873
|
+
# @return [String]
|
874
|
+
attr_accessor :next_page_token
|
875
|
+
|
876
|
+
# A list of operations that matches the specified filter in the request.
|
877
|
+
# Corresponds to the JSON property `operations`
|
878
|
+
# @return [Array<Google::Apis::OndemandscanningV1::Operation>]
|
879
|
+
attr_accessor :operations
|
880
|
+
|
881
|
+
def initialize(**args)
|
882
|
+
update!(**args)
|
883
|
+
end
|
884
|
+
|
885
|
+
# Update properties of this object
|
886
|
+
def update!(**args)
|
887
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
888
|
+
@operations = args[:operations] if args.key?(:operations)
|
889
|
+
end
|
890
|
+
end
|
891
|
+
|
892
|
+
# ListVulnerabilitiesResponse contains a single page of vulnerabilities
|
893
|
+
# resulting from a scan.
|
894
|
+
class ListVulnerabilitiesResponseV1
|
895
|
+
include Google::Apis::Core::Hashable
|
896
|
+
|
897
|
+
# A page token that can be used in a subsequent call to ListVulnerabilities to
|
898
|
+
# continue retrieving results.
|
899
|
+
# Corresponds to the JSON property `nextPageToken`
|
900
|
+
# @return [String]
|
901
|
+
attr_accessor :next_page_token
|
902
|
+
|
903
|
+
# The list of Vulnerability Occurrences resulting from a scan.
|
904
|
+
# Corresponds to the JSON property `occurrences`
|
905
|
+
# @return [Array<Google::Apis::OndemandscanningV1::Occurrence>]
|
906
|
+
attr_accessor :occurrences
|
907
|
+
|
908
|
+
def initialize(**args)
|
909
|
+
update!(**args)
|
910
|
+
end
|
911
|
+
|
912
|
+
# Update properties of this object
|
913
|
+
def update!(**args)
|
914
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
915
|
+
@occurrences = args[:occurrences] if args.key?(:occurrences)
|
916
|
+
end
|
917
|
+
end
|
918
|
+
|
919
|
+
# An occurrence of a particular package installation found within a system's
|
920
|
+
# filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.
|
921
|
+
class Location
|
922
|
+
include Google::Apis::Core::Hashable
|
923
|
+
|
924
|
+
# Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
|
925
|
+
# denoting the package manager version distributing a package.
|
926
|
+
# Corresponds to the JSON property `cpeUri`
|
927
|
+
# @return [String]
|
928
|
+
attr_accessor :cpe_uri
|
929
|
+
|
930
|
+
# The path from which we gathered that this package/version is installed.
|
931
|
+
# Corresponds to the JSON property `path`
|
932
|
+
# @return [String]
|
933
|
+
attr_accessor :path
|
934
|
+
|
935
|
+
# Version contains structured information about the version of a package.
|
936
|
+
# Corresponds to the JSON property `version`
|
937
|
+
# @return [Google::Apis::OndemandscanningV1::Version]
|
938
|
+
attr_accessor :version
|
939
|
+
|
940
|
+
def initialize(**args)
|
941
|
+
update!(**args)
|
942
|
+
end
|
943
|
+
|
944
|
+
# Update properties of this object
|
945
|
+
def update!(**args)
|
946
|
+
@cpe_uri = args[:cpe_uri] if args.key?(:cpe_uri)
|
947
|
+
@path = args[:path] if args.key?(:path)
|
948
|
+
@version = args[:version] if args.key?(:version)
|
949
|
+
end
|
950
|
+
end
|
951
|
+
|
952
|
+
# An instance of an analysis type that has been found on a resource.
|
953
|
+
class Occurrence
|
954
|
+
include Google::Apis::Core::Hashable
|
955
|
+
|
956
|
+
# Occurrence that represents a single "attestation". The authenticity of an
|
957
|
+
# attestation can be verified using the attached signature. If the verifier
|
958
|
+
# trusts the public key of the signer, then verifying the signature is
|
959
|
+
# sufficient to establish trust. In this circumstance, the authority to which
|
960
|
+
# this attestation is attached is primarily useful for lookup (how to find this
|
961
|
+
# attestation if you already know the authority and artifact to be verified) and
|
962
|
+
# intent (for which authority this attestation was intended to sign.
|
963
|
+
# Corresponds to the JSON property `attestation`
|
964
|
+
# @return [Google::Apis::OndemandscanningV1::AttestationOccurrence]
|
965
|
+
attr_accessor :attestation
|
966
|
+
|
967
|
+
# Details of a build occurrence.
|
968
|
+
# Corresponds to the JSON property `build`
|
969
|
+
# @return [Google::Apis::OndemandscanningV1::BuildOccurrence]
|
970
|
+
attr_accessor :build
|
971
|
+
|
972
|
+
# Output only. The time this occurrence was created.
|
973
|
+
# Corresponds to the JSON property `createTime`
|
974
|
+
# @return [String]
|
975
|
+
attr_accessor :create_time
|
976
|
+
|
977
|
+
# The period during which some deployable was active in a runtime.
|
978
|
+
# Corresponds to the JSON property `deployment`
|
979
|
+
# @return [Google::Apis::OndemandscanningV1::DeploymentOccurrence]
|
980
|
+
attr_accessor :deployment
|
981
|
+
|
982
|
+
# Provides information about the analysis status of a discovered resource.
|
983
|
+
# Corresponds to the JSON property `discovery`
|
984
|
+
# @return [Google::Apis::OndemandscanningV1::DiscoveryOccurrence]
|
985
|
+
attr_accessor :discovery
|
986
|
+
|
987
|
+
# Details of the derived image portion of the DockerImage relationship. This
|
988
|
+
# image would be produced from a Dockerfile with FROM .
|
989
|
+
# Corresponds to the JSON property `image`
|
990
|
+
# @return [Google::Apis::OndemandscanningV1::ImageOccurrence]
|
991
|
+
attr_accessor :image
|
992
|
+
|
993
|
+
# Output only. This explicitly denotes which of the occurrence details are
|
994
|
+
# specified. This field can be used as a filter in list requests.
|
995
|
+
# Corresponds to the JSON property `kind`
|
996
|
+
# @return [String]
|
997
|
+
attr_accessor :kind
|
998
|
+
|
999
|
+
# Output only. The name of the occurrence in the form of `projects/[PROJECT_ID]/
|
1000
|
+
# occurrences/[OCCURRENCE_ID]`.
|
1001
|
+
# Corresponds to the JSON property `name`
|
1002
|
+
# @return [String]
|
1003
|
+
attr_accessor :name
|
1004
|
+
|
1005
|
+
# Required. Immutable. The analysis note associated with this occurrence, in the
|
1006
|
+
# form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be used as a
|
1007
|
+
# filter in list requests.
|
1008
|
+
# Corresponds to the JSON property `noteName`
|
1009
|
+
# @return [String]
|
1010
|
+
attr_accessor :note_name
|
1011
|
+
|
1012
|
+
# Details on how a particular software package was installed on a system.
|
1013
|
+
# Corresponds to the JSON property `package`
|
1014
|
+
# @return [Google::Apis::OndemandscanningV1::PackageOccurrence]
|
1015
|
+
attr_accessor :package
|
1016
|
+
|
1017
|
+
# A description of actions that can be taken to remedy the note.
|
1018
|
+
# Corresponds to the JSON property `remediation`
|
1019
|
+
# @return [String]
|
1020
|
+
attr_accessor :remediation
|
1021
|
+
|
1022
|
+
# Required. Immutable. A URI that represents the resource for which the
|
1023
|
+
# occurrence applies. For example, `https://gcr.io/project/image@sha256:123abc`
|
1024
|
+
# for a Docker image.
|
1025
|
+
# Corresponds to the JSON property `resourceUri`
|
1026
|
+
# @return [String]
|
1027
|
+
attr_accessor :resource_uri
|
1028
|
+
|
1029
|
+
# Output only. The time this occurrence was last updated.
|
1030
|
+
# Corresponds to the JSON property `updateTime`
|
1031
|
+
# @return [String]
|
1032
|
+
attr_accessor :update_time
|
1033
|
+
|
1034
|
+
# An Upgrade Occurrence represents that a specific resource_url could install a
|
1035
|
+
# specific upgrade. This presence is supplied via local sources (i.e. it is
|
1036
|
+
# present in the mirror and the running system has noticed its availability).
|
1037
|
+
# For Windows, both distribution and windows_update contain information for the
|
1038
|
+
# Windows update.
|
1039
|
+
# Corresponds to the JSON property `upgrade`
|
1040
|
+
# @return [Google::Apis::OndemandscanningV1::UpgradeOccurrence]
|
1041
|
+
attr_accessor :upgrade
|
1042
|
+
|
1043
|
+
# An occurrence of a severity vulnerability on a resource.
|
1044
|
+
# Corresponds to the JSON property `vulnerability`
|
1045
|
+
# @return [Google::Apis::OndemandscanningV1::VulnerabilityOccurrence]
|
1046
|
+
attr_accessor :vulnerability
|
1047
|
+
|
1048
|
+
def initialize(**args)
|
1049
|
+
update!(**args)
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
# Update properties of this object
|
1053
|
+
def update!(**args)
|
1054
|
+
@attestation = args[:attestation] if args.key?(:attestation)
|
1055
|
+
@build = args[:build] if args.key?(:build)
|
1056
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
1057
|
+
@deployment = args[:deployment] if args.key?(:deployment)
|
1058
|
+
@discovery = args[:discovery] if args.key?(:discovery)
|
1059
|
+
@image = args[:image] if args.key?(:image)
|
1060
|
+
@kind = args[:kind] if args.key?(:kind)
|
1061
|
+
@name = args[:name] if args.key?(:name)
|
1062
|
+
@note_name = args[:note_name] if args.key?(:note_name)
|
1063
|
+
@package = args[:package] if args.key?(:package)
|
1064
|
+
@remediation = args[:remediation] if args.key?(:remediation)
|
1065
|
+
@resource_uri = args[:resource_uri] if args.key?(:resource_uri)
|
1066
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
1067
|
+
@upgrade = args[:upgrade] if args.key?(:upgrade)
|
1068
|
+
@vulnerability = args[:vulnerability] if args.key?(:vulnerability)
|
1069
|
+
end
|
1070
|
+
end
|
1071
|
+
|
1072
|
+
# This resource represents a long-running operation that is the result of a
|
1073
|
+
# network API call.
|
1074
|
+
class Operation
|
1075
|
+
include Google::Apis::Core::Hashable
|
1076
|
+
|
1077
|
+
# If the value is `false`, it means the operation is still in progress. If `true`
|
1078
|
+
# , the operation is completed, and either `error` or `response` is available.
|
1079
|
+
# Corresponds to the JSON property `done`
|
1080
|
+
# @return [Boolean]
|
1081
|
+
attr_accessor :done
|
1082
|
+
alias_method :done?, :done
|
1083
|
+
|
1084
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1085
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
1086
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
1087
|
+
# data: error code, error message, and error details. You can find out more
|
1088
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
1089
|
+
# //cloud.google.com/apis/design/errors).
|
1090
|
+
# Corresponds to the JSON property `error`
|
1091
|
+
# @return [Google::Apis::OndemandscanningV1::Status]
|
1092
|
+
attr_accessor :error
|
1093
|
+
|
1094
|
+
# Service-specific metadata associated with the operation. It typically contains
|
1095
|
+
# progress information and common metadata such as create time. Some services
|
1096
|
+
# might not provide such metadata. Any method that returns a long-running
|
1097
|
+
# operation should document the metadata type, if any.
|
1098
|
+
# Corresponds to the JSON property `metadata`
|
1099
|
+
# @return [Hash<String,Object>]
|
1100
|
+
attr_accessor :metadata
|
1101
|
+
|
1102
|
+
# The server-assigned name, which is only unique within the same service that
|
1103
|
+
# originally returns it. If you use the default HTTP mapping, the `name` should
|
1104
|
+
# be a resource name ending with `operations/`unique_id``.
|
1105
|
+
# Corresponds to the JSON property `name`
|
1106
|
+
# @return [String]
|
1107
|
+
attr_accessor :name
|
1108
|
+
|
1109
|
+
# The normal response of the operation in case of success. If the original
|
1110
|
+
# method returns no data on success, such as `Delete`, the response is `google.
|
1111
|
+
# protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
|
1112
|
+
# the response should be the resource. For other methods, the response should
|
1113
|
+
# have the type `XxxResponse`, where `Xxx` is the original method name. For
|
1114
|
+
# example, if the original method name is `TakeSnapshot()`, the inferred
|
1115
|
+
# response type is `TakeSnapshotResponse`.
|
1116
|
+
# Corresponds to the JSON property `response`
|
1117
|
+
# @return [Hash<String,Object>]
|
1118
|
+
attr_accessor :response
|
1119
|
+
|
1120
|
+
def initialize(**args)
|
1121
|
+
update!(**args)
|
1122
|
+
end
|
1123
|
+
|
1124
|
+
# Update properties of this object
|
1125
|
+
def update!(**args)
|
1126
|
+
@done = args[:done] if args.key?(:done)
|
1127
|
+
@error = args[:error] if args.key?(:error)
|
1128
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
1129
|
+
@name = args[:name] if args.key?(:name)
|
1130
|
+
@response = args[:response] if args.key?(:response)
|
1131
|
+
end
|
1132
|
+
end
|
1133
|
+
|
1134
|
+
#
|
1135
|
+
class PackageData
|
1136
|
+
include Google::Apis::Core::Hashable
|
1137
|
+
|
1138
|
+
# The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/) in which
|
1139
|
+
# the vulnerability may manifest. Examples include distro or storage location
|
1140
|
+
# for vulnerable jar.
|
1141
|
+
# Corresponds to the JSON property `cpeUri`
|
1142
|
+
# @return [String]
|
1143
|
+
attr_accessor :cpe_uri
|
1144
|
+
|
1145
|
+
# The OS affected by a vulnerability This field is deprecated and the
|
1146
|
+
# information is in cpe_uri
|
1147
|
+
# Corresponds to the JSON property `os`
|
1148
|
+
# @return [String]
|
1149
|
+
attr_accessor :os
|
1150
|
+
|
1151
|
+
# The version of the OS This field is deprecated and the information is in
|
1152
|
+
# cpe_uri
|
1153
|
+
# Corresponds to the JSON property `osVersion`
|
1154
|
+
# @return [String]
|
1155
|
+
attr_accessor :os_version
|
1156
|
+
|
1157
|
+
# The package being analysed for vulnerabilities
|
1158
|
+
# Corresponds to the JSON property `package`
|
1159
|
+
# @return [String]
|
1160
|
+
attr_accessor :package
|
1161
|
+
|
1162
|
+
# The version of the package being analysed
|
1163
|
+
# Corresponds to the JSON property `version`
|
1164
|
+
# @return [String]
|
1165
|
+
attr_accessor :version
|
1166
|
+
|
1167
|
+
def initialize(**args)
|
1168
|
+
update!(**args)
|
1169
|
+
end
|
1170
|
+
|
1171
|
+
# Update properties of this object
|
1172
|
+
def update!(**args)
|
1173
|
+
@cpe_uri = args[:cpe_uri] if args.key?(:cpe_uri)
|
1174
|
+
@os = args[:os] if args.key?(:os)
|
1175
|
+
@os_version = args[:os_version] if args.key?(:os_version)
|
1176
|
+
@package = args[:package] if args.key?(:package)
|
1177
|
+
@version = args[:version] if args.key?(:version)
|
1178
|
+
end
|
1179
|
+
end
|
1180
|
+
|
1181
|
+
# A detail for a distro and package this vulnerability occurrence was found in
|
1182
|
+
# and its associated fix (if one is available).
|
1183
|
+
class PackageIssue
|
1184
|
+
include Google::Apis::Core::Hashable
|
1185
|
+
|
1186
|
+
# Required. The [CPE URI](https://cpe.mitre.org/specification/) this
|
1187
|
+
# vulnerability was found in.
|
1188
|
+
# Corresponds to the JSON property `affectedCpeUri`
|
1189
|
+
# @return [String]
|
1190
|
+
attr_accessor :affected_cpe_uri
|
1191
|
+
|
1192
|
+
# Required. The package this vulnerability was found in.
|
1193
|
+
# Corresponds to the JSON property `affectedPackage`
|
1194
|
+
# @return [String]
|
1195
|
+
attr_accessor :affected_package
|
1196
|
+
|
1197
|
+
# Version contains structured information about the version of a package.
|
1198
|
+
# Corresponds to the JSON property `affectedVersion`
|
1199
|
+
# @return [Google::Apis::OndemandscanningV1::Version]
|
1200
|
+
attr_accessor :affected_version
|
1201
|
+
|
1202
|
+
# Output only. Whether a fix is available for this package.
|
1203
|
+
# Corresponds to the JSON property `fixAvailable`
|
1204
|
+
# @return [Boolean]
|
1205
|
+
attr_accessor :fix_available
|
1206
|
+
alias_method :fix_available?, :fix_available
|
1207
|
+
|
1208
|
+
# The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability was
|
1209
|
+
# fixed in. It is possible for this to be different from the affected_cpe_uri.
|
1210
|
+
# Corresponds to the JSON property `fixedCpeUri`
|
1211
|
+
# @return [String]
|
1212
|
+
attr_accessor :fixed_cpe_uri
|
1213
|
+
|
1214
|
+
# The package this vulnerability was fixed in. It is possible for this to be
|
1215
|
+
# different from the affected_package.
|
1216
|
+
# Corresponds to the JSON property `fixedPackage`
|
1217
|
+
# @return [String]
|
1218
|
+
attr_accessor :fixed_package
|
1219
|
+
|
1220
|
+
# Version contains structured information about the version of a package.
|
1221
|
+
# Corresponds to the JSON property `fixedVersion`
|
1222
|
+
# @return [Google::Apis::OndemandscanningV1::Version]
|
1223
|
+
attr_accessor :fixed_version
|
1224
|
+
|
1225
|
+
def initialize(**args)
|
1226
|
+
update!(**args)
|
1227
|
+
end
|
1228
|
+
|
1229
|
+
# Update properties of this object
|
1230
|
+
def update!(**args)
|
1231
|
+
@affected_cpe_uri = args[:affected_cpe_uri] if args.key?(:affected_cpe_uri)
|
1232
|
+
@affected_package = args[:affected_package] if args.key?(:affected_package)
|
1233
|
+
@affected_version = args[:affected_version] if args.key?(:affected_version)
|
1234
|
+
@fix_available = args[:fix_available] if args.key?(:fix_available)
|
1235
|
+
@fixed_cpe_uri = args[:fixed_cpe_uri] if args.key?(:fixed_cpe_uri)
|
1236
|
+
@fixed_package = args[:fixed_package] if args.key?(:fixed_package)
|
1237
|
+
@fixed_version = args[:fixed_version] if args.key?(:fixed_version)
|
1238
|
+
end
|
1239
|
+
end
|
1240
|
+
|
1241
|
+
# Details on how a particular software package was installed on a system.
|
1242
|
+
class PackageOccurrence
|
1243
|
+
include Google::Apis::Core::Hashable
|
1244
|
+
|
1245
|
+
# Required. All of the places within the filesystem versions of this package
|
1246
|
+
# have been found.
|
1247
|
+
# Corresponds to the JSON property `location`
|
1248
|
+
# @return [Array<Google::Apis::OndemandscanningV1::Location>]
|
1249
|
+
attr_accessor :location
|
1250
|
+
|
1251
|
+
# Output only. The name of the installed package.
|
1252
|
+
# Corresponds to the JSON property `name`
|
1253
|
+
# @return [String]
|
1254
|
+
attr_accessor :name
|
1255
|
+
|
1256
|
+
def initialize(**args)
|
1257
|
+
update!(**args)
|
1258
|
+
end
|
1259
|
+
|
1260
|
+
# Update properties of this object
|
1261
|
+
def update!(**args)
|
1262
|
+
@location = args[:location] if args.key?(:location)
|
1263
|
+
@name = args[:name] if args.key?(:name)
|
1264
|
+
end
|
1265
|
+
end
|
1266
|
+
|
1267
|
+
# Selects a repo using a Google Cloud Platform project ID (e.g., winged-cargo-31)
|
1268
|
+
# and a repo name within that project.
|
1269
|
+
class ProjectRepoId
|
1270
|
+
include Google::Apis::Core::Hashable
|
1271
|
+
|
1272
|
+
# The ID of the project.
|
1273
|
+
# Corresponds to the JSON property `projectId`
|
1274
|
+
# @return [String]
|
1275
|
+
attr_accessor :project_id
|
1276
|
+
|
1277
|
+
# The name of the repo. Leave empty for the default repo.
|
1278
|
+
# Corresponds to the JSON property `repoName`
|
1279
|
+
# @return [String]
|
1280
|
+
attr_accessor :repo_name
|
1281
|
+
|
1282
|
+
def initialize(**args)
|
1283
|
+
update!(**args)
|
1284
|
+
end
|
1285
|
+
|
1286
|
+
# Update properties of this object
|
1287
|
+
def update!(**args)
|
1288
|
+
@project_id = args[:project_id] if args.key?(:project_id)
|
1289
|
+
@repo_name = args[:repo_name] if args.key?(:repo_name)
|
1290
|
+
end
|
1291
|
+
end
|
1292
|
+
|
1293
|
+
# Metadata for any related URL information.
|
1294
|
+
class RelatedUrl
|
1295
|
+
include Google::Apis::Core::Hashable
|
1296
|
+
|
1297
|
+
# Label to describe usage of the URL.
|
1298
|
+
# Corresponds to the JSON property `label`
|
1299
|
+
# @return [String]
|
1300
|
+
attr_accessor :label
|
1301
|
+
|
1302
|
+
# Specific URL associated with the resource.
|
1303
|
+
# Corresponds to the JSON property `url`
|
1304
|
+
# @return [String]
|
1305
|
+
attr_accessor :url
|
1306
|
+
|
1307
|
+
def initialize(**args)
|
1308
|
+
update!(**args)
|
1309
|
+
end
|
1310
|
+
|
1311
|
+
# Update properties of this object
|
1312
|
+
def update!(**args)
|
1313
|
+
@label = args[:label] if args.key?(:label)
|
1314
|
+
@url = args[:url] if args.key?(:url)
|
1315
|
+
end
|
1316
|
+
end
|
1317
|
+
|
1318
|
+
# A unique identifier for a Cloud Repo.
|
1319
|
+
class RepoId
|
1320
|
+
include Google::Apis::Core::Hashable
|
1321
|
+
|
1322
|
+
# Selects a repo using a Google Cloud Platform project ID (e.g., winged-cargo-31)
|
1323
|
+
# and a repo name within that project.
|
1324
|
+
# Corresponds to the JSON property `projectRepoId`
|
1325
|
+
# @return [Google::Apis::OndemandscanningV1::ProjectRepoId]
|
1326
|
+
attr_accessor :project_repo_id
|
1327
|
+
|
1328
|
+
# A server-assigned, globally unique identifier.
|
1329
|
+
# Corresponds to the JSON property `uid`
|
1330
|
+
# @return [String]
|
1331
|
+
attr_accessor :uid
|
1332
|
+
|
1333
|
+
def initialize(**args)
|
1334
|
+
update!(**args)
|
1335
|
+
end
|
1336
|
+
|
1337
|
+
# Update properties of this object
|
1338
|
+
def update!(**args)
|
1339
|
+
@project_repo_id = args[:project_repo_id] if args.key?(:project_repo_id)
|
1340
|
+
@uid = args[:uid] if args.key?(:uid)
|
1341
|
+
end
|
1342
|
+
end
|
1343
|
+
|
1344
|
+
# Verifiers (e.g. Kritis implementations) MUST verify signatures with respect to
|
1345
|
+
# the trust anchors defined in policy (e.g. a Kritis policy). Typically this
|
1346
|
+
# means that the verifier has been configured with a map from `public_key_id` to
|
1347
|
+
# public key material (and any required parameters, e.g. signing algorithm). In
|
1348
|
+
# particular, verification implementations MUST NOT treat the signature `
|
1349
|
+
# public_key_id` as anything more than a key lookup hint. The `public_key_id`
|
1350
|
+
# DOES NOT validate or authenticate a public key; it only provides a mechanism
|
1351
|
+
# for quickly selecting a public key ALREADY CONFIGURED on the verifier through
|
1352
|
+
# a trusted channel. Verification implementations MUST reject signatures in any
|
1353
|
+
# of the following circumstances: * The `public_key_id` is not recognized by the
|
1354
|
+
# verifier. * The public key that `public_key_id` refers to does not verify the
|
1355
|
+
# signature with respect to the payload. The `signature` contents SHOULD NOT be "
|
1356
|
+
# attached" (where the payload is included with the serialized `signature` bytes)
|
1357
|
+
# . Verifiers MUST ignore any "attached" payload and only verify signatures with
|
1358
|
+
# respect to explicitly provided payload (e.g. a `payload` field on the proto
|
1359
|
+
# message that holds this Signature, or the canonical serialization of the proto
|
1360
|
+
# message that holds this signature).
|
1361
|
+
class Signature
|
1362
|
+
include Google::Apis::Core::Hashable
|
1363
|
+
|
1364
|
+
# The identifier for the public key that verifies this signature. * The `
|
1365
|
+
# public_key_id` is required. * The `public_key_id` SHOULD be an RFC3986
|
1366
|
+
# conformant URI. * When possible, the `public_key_id` SHOULD be an immutable
|
1367
|
+
# reference, such as a cryptographic digest. Examples of valid `public_key_id`s:
|
1368
|
+
# OpenPGP V4 public key fingerprint: * "openpgp4fpr:
|
1369
|
+
# 74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" See https://www.iana.org/assignments/
|
1370
|
+
# uri-schemes/prov/openpgp4fpr for more details on this scheme. RFC6920 digest-
|
1371
|
+
# named SubjectPublicKeyInfo (digest of the DER serialization): * "ni:///sha-256;
|
1372
|
+
# cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" * "nih:///sha-256;
|
1373
|
+
# 703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
|
1374
|
+
# Corresponds to the JSON property `publicKeyId`
|
1375
|
+
# @return [String]
|
1376
|
+
attr_accessor :public_key_id
|
1377
|
+
|
1378
|
+
# The content of the signature, an opaque bytestring. The payload that this
|
1379
|
+
# signature verifies MUST be unambiguously provided with the Signature during
|
1380
|
+
# verification. A wrapper message might provide the payload explicitly.
|
1381
|
+
# Alternatively, a message might have a canonical serialization that can always
|
1382
|
+
# be unambiguously computed to derive the payload.
|
1383
|
+
# Corresponds to the JSON property `signature`
|
1384
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1385
|
+
# @return [String]
|
1386
|
+
attr_accessor :signature
|
1387
|
+
|
1388
|
+
def initialize(**args)
|
1389
|
+
update!(**args)
|
1390
|
+
end
|
1391
|
+
|
1392
|
+
# Update properties of this object
|
1393
|
+
def update!(**args)
|
1394
|
+
@public_key_id = args[:public_key_id] if args.key?(:public_key_id)
|
1395
|
+
@signature = args[:signature] if args.key?(:signature)
|
1396
|
+
end
|
1397
|
+
end
|
1398
|
+
|
1399
|
+
# Source describes the location of the source used for the build.
|
1400
|
+
class Source
|
1401
|
+
include Google::Apis::Core::Hashable
|
1402
|
+
|
1403
|
+
# If provided, some of the source code used for the build may be found in these
|
1404
|
+
# locations, in the case where the source repository had multiple remotes or
|
1405
|
+
# submodules. This list will not include the context specified in the context
|
1406
|
+
# field.
|
1407
|
+
# Corresponds to the JSON property `additionalContexts`
|
1408
|
+
# @return [Array<Google::Apis::OndemandscanningV1::SourceContext>]
|
1409
|
+
attr_accessor :additional_contexts
|
1410
|
+
|
1411
|
+
# If provided, the input binary artifacts for the build came from this location.
|
1412
|
+
# Corresponds to the JSON property `artifactStorageSourceUri`
|
1413
|
+
# @return [String]
|
1414
|
+
attr_accessor :artifact_storage_source_uri
|
1415
|
+
|
1416
|
+
# A SourceContext is a reference to a tree of files. A SourceContext together
|
1417
|
+
# with a path point to a unique revision of a single file or directory.
|
1418
|
+
# Corresponds to the JSON property `context`
|
1419
|
+
# @return [Google::Apis::OndemandscanningV1::SourceContext]
|
1420
|
+
attr_accessor :context
|
1421
|
+
|
1422
|
+
# Hash(es) of the build source, which can be used to verify that the original
|
1423
|
+
# source integrity was maintained in the build. The keys to this map are file
|
1424
|
+
# paths used as build source and the values contain the hash values for those
|
1425
|
+
# files. If the build source came in a single package such as a gzipped tarfile (
|
1426
|
+
# .tar.gz), the FileHash will be for the single path to that file.
|
1427
|
+
# Corresponds to the JSON property `fileHashes`
|
1428
|
+
# @return [Hash<String,Google::Apis::OndemandscanningV1::FileHashes>]
|
1429
|
+
attr_accessor :file_hashes
|
1430
|
+
|
1431
|
+
def initialize(**args)
|
1432
|
+
update!(**args)
|
1433
|
+
end
|
1434
|
+
|
1435
|
+
# Update properties of this object
|
1436
|
+
def update!(**args)
|
1437
|
+
@additional_contexts = args[:additional_contexts] if args.key?(:additional_contexts)
|
1438
|
+
@artifact_storage_source_uri = args[:artifact_storage_source_uri] if args.key?(:artifact_storage_source_uri)
|
1439
|
+
@context = args[:context] if args.key?(:context)
|
1440
|
+
@file_hashes = args[:file_hashes] if args.key?(:file_hashes)
|
1441
|
+
end
|
1442
|
+
end
|
1443
|
+
|
1444
|
+
# A SourceContext is a reference to a tree of files. A SourceContext together
|
1445
|
+
# with a path point to a unique revision of a single file or directory.
|
1446
|
+
class SourceContext
|
1447
|
+
include Google::Apis::Core::Hashable
|
1448
|
+
|
1449
|
+
# A CloudRepoSourceContext denotes a particular revision in a Google Cloud
|
1450
|
+
# Source Repo.
|
1451
|
+
# Corresponds to the JSON property `cloudRepo`
|
1452
|
+
# @return [Google::Apis::OndemandscanningV1::CloudRepoSourceContext]
|
1453
|
+
attr_accessor :cloud_repo
|
1454
|
+
|
1455
|
+
# A SourceContext referring to a Gerrit project.
|
1456
|
+
# Corresponds to the JSON property `gerrit`
|
1457
|
+
# @return [Google::Apis::OndemandscanningV1::GerritSourceContext]
|
1458
|
+
attr_accessor :gerrit
|
1459
|
+
|
1460
|
+
# A GitSourceContext denotes a particular revision in a third party Git
|
1461
|
+
# repository (e.g., GitHub).
|
1462
|
+
# Corresponds to the JSON property `git`
|
1463
|
+
# @return [Google::Apis::OndemandscanningV1::GitSourceContext]
|
1464
|
+
attr_accessor :git
|
1465
|
+
|
1466
|
+
# Labels with user defined metadata.
|
1467
|
+
# Corresponds to the JSON property `labels`
|
1468
|
+
# @return [Hash<String,String>]
|
1469
|
+
attr_accessor :labels
|
1470
|
+
|
1471
|
+
def initialize(**args)
|
1472
|
+
update!(**args)
|
1473
|
+
end
|
1474
|
+
|
1475
|
+
# Update properties of this object
|
1476
|
+
def update!(**args)
|
1477
|
+
@cloud_repo = args[:cloud_repo] if args.key?(:cloud_repo)
|
1478
|
+
@gerrit = args[:gerrit] if args.key?(:gerrit)
|
1479
|
+
@git = args[:git] if args.key?(:git)
|
1480
|
+
@labels = args[:labels] if args.key?(:labels)
|
1481
|
+
end
|
1482
|
+
end
|
1483
|
+
|
1484
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1485
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
1486
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
1487
|
+
# data: error code, error message, and error details. You can find out more
|
1488
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
1489
|
+
# //cloud.google.com/apis/design/errors).
|
1490
|
+
class Status
|
1491
|
+
include Google::Apis::Core::Hashable
|
1492
|
+
|
1493
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
1494
|
+
# Corresponds to the JSON property `code`
|
1495
|
+
# @return [Fixnum]
|
1496
|
+
attr_accessor :code
|
1497
|
+
|
1498
|
+
# A list of messages that carry the error details. There is a common set of
|
1499
|
+
# message types for APIs to use.
|
1500
|
+
# Corresponds to the JSON property `details`
|
1501
|
+
# @return [Array<Hash<String,Object>>]
|
1502
|
+
attr_accessor :details
|
1503
|
+
|
1504
|
+
# A developer-facing error message, which should be in English. Any user-facing
|
1505
|
+
# error message should be localized and sent in the google.rpc.Status.details
|
1506
|
+
# field, or localized by the client.
|
1507
|
+
# Corresponds to the JSON property `message`
|
1508
|
+
# @return [String]
|
1509
|
+
attr_accessor :message
|
1510
|
+
|
1511
|
+
def initialize(**args)
|
1512
|
+
update!(**args)
|
1513
|
+
end
|
1514
|
+
|
1515
|
+
# Update properties of this object
|
1516
|
+
def update!(**args)
|
1517
|
+
@code = args[:code] if args.key?(:code)
|
1518
|
+
@details = args[:details] if args.key?(:details)
|
1519
|
+
@message = args[:message] if args.key?(:message)
|
1520
|
+
end
|
1521
|
+
end
|
1522
|
+
|
1523
|
+
# The Upgrade Distribution represents metadata about the Upgrade for each
|
1524
|
+
# operating system (CPE). Some distributions have additional metadata around
|
1525
|
+
# updates, classifying them into various categories and severities.
|
1526
|
+
class UpgradeDistribution
|
1527
|
+
include Google::Apis::Core::Hashable
|
1528
|
+
|
1529
|
+
# The operating system classification of this Upgrade, as specified by the
|
1530
|
+
# upstream operating system upgrade feed. For Windows the classification is one
|
1531
|
+
# of the category_ids listed at https://docs.microsoft.com/en-us/previous-
|
1532
|
+
# versions/windows/desktop/ff357803(v=vs.85)
|
1533
|
+
# Corresponds to the JSON property `classification`
|
1534
|
+
# @return [String]
|
1535
|
+
attr_accessor :classification
|
1536
|
+
|
1537
|
+
# Required - The specific operating system this metadata applies to. See https://
|
1538
|
+
# cpe.mitre.org/specification/.
|
1539
|
+
# Corresponds to the JSON property `cpeUri`
|
1540
|
+
# @return [String]
|
1541
|
+
attr_accessor :cpe_uri
|
1542
|
+
|
1543
|
+
# The cve tied to this Upgrade.
|
1544
|
+
# Corresponds to the JSON property `cve`
|
1545
|
+
# @return [Array<String>]
|
1546
|
+
attr_accessor :cve
|
1547
|
+
|
1548
|
+
# The severity as specified by the upstream operating system.
|
1549
|
+
# Corresponds to the JSON property `severity`
|
1550
|
+
# @return [String]
|
1551
|
+
attr_accessor :severity
|
1552
|
+
|
1553
|
+
def initialize(**args)
|
1554
|
+
update!(**args)
|
1555
|
+
end
|
1556
|
+
|
1557
|
+
# Update properties of this object
|
1558
|
+
def update!(**args)
|
1559
|
+
@classification = args[:classification] if args.key?(:classification)
|
1560
|
+
@cpe_uri = args[:cpe_uri] if args.key?(:cpe_uri)
|
1561
|
+
@cve = args[:cve] if args.key?(:cve)
|
1562
|
+
@severity = args[:severity] if args.key?(:severity)
|
1563
|
+
end
|
1564
|
+
end
|
1565
|
+
|
1566
|
+
# An Upgrade Occurrence represents that a specific resource_url could install a
|
1567
|
+
# specific upgrade. This presence is supplied via local sources (i.e. it is
|
1568
|
+
# present in the mirror and the running system has noticed its availability).
|
1569
|
+
# For Windows, both distribution and windows_update contain information for the
|
1570
|
+
# Windows update.
|
1571
|
+
class UpgradeOccurrence
|
1572
|
+
include Google::Apis::Core::Hashable
|
1573
|
+
|
1574
|
+
# The Upgrade Distribution represents metadata about the Upgrade for each
|
1575
|
+
# operating system (CPE). Some distributions have additional metadata around
|
1576
|
+
# updates, classifying them into various categories and severities.
|
1577
|
+
# Corresponds to the JSON property `distribution`
|
1578
|
+
# @return [Google::Apis::OndemandscanningV1::UpgradeDistribution]
|
1579
|
+
attr_accessor :distribution
|
1580
|
+
|
1581
|
+
# Required for non-Windows OS. The package this Upgrade is for.
|
1582
|
+
# Corresponds to the JSON property `package`
|
1583
|
+
# @return [String]
|
1584
|
+
attr_accessor :package
|
1585
|
+
|
1586
|
+
# Version contains structured information about the version of a package.
|
1587
|
+
# Corresponds to the JSON property `parsedVersion`
|
1588
|
+
# @return [Google::Apis::OndemandscanningV1::Version]
|
1589
|
+
attr_accessor :parsed_version
|
1590
|
+
|
1591
|
+
# Windows Update represents the metadata about the update for the Windows
|
1592
|
+
# operating system. The fields in this message come from the Windows Update API
|
1593
|
+
# documented at https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-
|
1594
|
+
# wuapi-iupdate.
|
1595
|
+
# Corresponds to the JSON property `windowsUpdate`
|
1596
|
+
# @return [Google::Apis::OndemandscanningV1::WindowsUpdate]
|
1597
|
+
attr_accessor :windows_update
|
1598
|
+
|
1599
|
+
def initialize(**args)
|
1600
|
+
update!(**args)
|
1601
|
+
end
|
1602
|
+
|
1603
|
+
# Update properties of this object
|
1604
|
+
def update!(**args)
|
1605
|
+
@distribution = args[:distribution] if args.key?(:distribution)
|
1606
|
+
@package = args[:package] if args.key?(:package)
|
1607
|
+
@parsed_version = args[:parsed_version] if args.key?(:parsed_version)
|
1608
|
+
@windows_update = args[:windows_update] if args.key?(:windows_update)
|
1609
|
+
end
|
1610
|
+
end
|
1611
|
+
|
1612
|
+
# Version contains structured information about the version of a package.
|
1613
|
+
class Version
|
1614
|
+
include Google::Apis::Core::Hashable
|
1615
|
+
|
1616
|
+
# Used to correct mistakes in the version numbering scheme.
|
1617
|
+
# Corresponds to the JSON property `epoch`
|
1618
|
+
# @return [Fixnum]
|
1619
|
+
attr_accessor :epoch
|
1620
|
+
|
1621
|
+
# Human readable version string. This string is of the form :- and is only set
|
1622
|
+
# when kind is NORMAL.
|
1623
|
+
# Corresponds to the JSON property `fullName`
|
1624
|
+
# @return [String]
|
1625
|
+
attr_accessor :full_name
|
1626
|
+
|
1627
|
+
# Whether this version is specifying part of an inclusive range. Grafeas does
|
1628
|
+
# not have the capability to specify version ranges; instead we have fields that
|
1629
|
+
# specify start version and end versions. At times this is insufficient - we
|
1630
|
+
# also need to specify whether the version is included in the range or is
|
1631
|
+
# excluded from the range. This boolean is expected to be set to true when the
|
1632
|
+
# version is included in a range.
|
1633
|
+
# Corresponds to the JSON property `inclusive`
|
1634
|
+
# @return [Boolean]
|
1635
|
+
attr_accessor :inclusive
|
1636
|
+
alias_method :inclusive?, :inclusive
|
1637
|
+
|
1638
|
+
# Required. Distinguishes between sentinel MIN/MAX versions and normal versions.
|
1639
|
+
# Corresponds to the JSON property `kind`
|
1640
|
+
# @return [String]
|
1641
|
+
attr_accessor :kind
|
1642
|
+
|
1643
|
+
# Required only when version kind is NORMAL. The main part of the version name.
|
1644
|
+
# Corresponds to the JSON property `name`
|
1645
|
+
# @return [String]
|
1646
|
+
attr_accessor :name
|
1647
|
+
|
1648
|
+
# The iteration of the package build from the above version.
|
1649
|
+
# Corresponds to the JSON property `revision`
|
1650
|
+
# @return [String]
|
1651
|
+
attr_accessor :revision
|
1652
|
+
|
1653
|
+
def initialize(**args)
|
1654
|
+
update!(**args)
|
1655
|
+
end
|
1656
|
+
|
1657
|
+
# Update properties of this object
|
1658
|
+
def update!(**args)
|
1659
|
+
@epoch = args[:epoch] if args.key?(:epoch)
|
1660
|
+
@full_name = args[:full_name] if args.key?(:full_name)
|
1661
|
+
@inclusive = args[:inclusive] if args.key?(:inclusive)
|
1662
|
+
@kind = args[:kind] if args.key?(:kind)
|
1663
|
+
@name = args[:name] if args.key?(:name)
|
1664
|
+
@revision = args[:revision] if args.key?(:revision)
|
1665
|
+
end
|
1666
|
+
end
|
1667
|
+
|
1668
|
+
# An occurrence of a severity vulnerability on a resource.
|
1669
|
+
class VulnerabilityOccurrence
|
1670
|
+
include Google::Apis::Core::Hashable
|
1671
|
+
|
1672
|
+
# Output only. The CVSS score of this vulnerability. CVSS score is on a scale of
|
1673
|
+
# 0 - 10 where 0 indicates low severity and 10 indicates high severity.
|
1674
|
+
# Corresponds to the JSON property `cvssScore`
|
1675
|
+
# @return [Float]
|
1676
|
+
attr_accessor :cvss_score
|
1677
|
+
|
1678
|
+
# The distro assigned severity for this vulnerability when it is available,
|
1679
|
+
# otherwise this is the note provider assigned severity.
|
1680
|
+
# Corresponds to the JSON property `effectiveSeverity`
|
1681
|
+
# @return [String]
|
1682
|
+
attr_accessor :effective_severity
|
1683
|
+
|
1684
|
+
# Output only. Whether at least one of the affected packages has a fix available.
|
1685
|
+
# Corresponds to the JSON property `fixAvailable`
|
1686
|
+
# @return [Boolean]
|
1687
|
+
attr_accessor :fix_available
|
1688
|
+
alias_method :fix_available?, :fix_available
|
1689
|
+
|
1690
|
+
# Output only. A detailed description of this vulnerability.
|
1691
|
+
# Corresponds to the JSON property `longDescription`
|
1692
|
+
# @return [String]
|
1693
|
+
attr_accessor :long_description
|
1694
|
+
|
1695
|
+
# Required. The set of affected locations and their fixes (if available) within
|
1696
|
+
# the associated resource.
|
1697
|
+
# Corresponds to the JSON property `packageIssue`
|
1698
|
+
# @return [Array<Google::Apis::OndemandscanningV1::PackageIssue>]
|
1699
|
+
attr_accessor :package_issue
|
1700
|
+
|
1701
|
+
# Output only. URLs related to this vulnerability.
|
1702
|
+
# Corresponds to the JSON property `relatedUrls`
|
1703
|
+
# @return [Array<Google::Apis::OndemandscanningV1::RelatedUrl>]
|
1704
|
+
attr_accessor :related_urls
|
1705
|
+
|
1706
|
+
# Output only. The note provider assigned severity of this vulnerability.
|
1707
|
+
# Corresponds to the JSON property `severity`
|
1708
|
+
# @return [String]
|
1709
|
+
attr_accessor :severity
|
1710
|
+
|
1711
|
+
# Output only. A one sentence description of this vulnerability.
|
1712
|
+
# Corresponds to the JSON property `shortDescription`
|
1713
|
+
# @return [String]
|
1714
|
+
attr_accessor :short_description
|
1715
|
+
|
1716
|
+
# The type of package; whether native or non native (e.g., ruby gems, node.js
|
1717
|
+
# packages, etc.).
|
1718
|
+
# Corresponds to the JSON property `type`
|
1719
|
+
# @return [String]
|
1720
|
+
attr_accessor :type
|
1721
|
+
|
1722
|
+
def initialize(**args)
|
1723
|
+
update!(**args)
|
1724
|
+
end
|
1725
|
+
|
1726
|
+
# Update properties of this object
|
1727
|
+
def update!(**args)
|
1728
|
+
@cvss_score = args[:cvss_score] if args.key?(:cvss_score)
|
1729
|
+
@effective_severity = args[:effective_severity] if args.key?(:effective_severity)
|
1730
|
+
@fix_available = args[:fix_available] if args.key?(:fix_available)
|
1731
|
+
@long_description = args[:long_description] if args.key?(:long_description)
|
1732
|
+
@package_issue = args[:package_issue] if args.key?(:package_issue)
|
1733
|
+
@related_urls = args[:related_urls] if args.key?(:related_urls)
|
1734
|
+
@severity = args[:severity] if args.key?(:severity)
|
1735
|
+
@short_description = args[:short_description] if args.key?(:short_description)
|
1736
|
+
@type = args[:type] if args.key?(:type)
|
1737
|
+
end
|
1738
|
+
end
|
1739
|
+
|
1740
|
+
# Windows Update represents the metadata about the update for the Windows
|
1741
|
+
# operating system. The fields in this message come from the Windows Update API
|
1742
|
+
# documented at https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-
|
1743
|
+
# wuapi-iupdate.
|
1744
|
+
class WindowsUpdate
|
1745
|
+
include Google::Apis::Core::Hashable
|
1746
|
+
|
1747
|
+
# The list of categories to which the update belongs.
|
1748
|
+
# Corresponds to the JSON property `categories`
|
1749
|
+
# @return [Array<Google::Apis::OndemandscanningV1::Category>]
|
1750
|
+
attr_accessor :categories
|
1751
|
+
|
1752
|
+
# The localized description of the update.
|
1753
|
+
# Corresponds to the JSON property `description`
|
1754
|
+
# @return [String]
|
1755
|
+
attr_accessor :description
|
1756
|
+
|
1757
|
+
# The unique identifier of the update.
|
1758
|
+
# Corresponds to the JSON property `identity`
|
1759
|
+
# @return [Google::Apis::OndemandscanningV1::Identity]
|
1760
|
+
attr_accessor :identity
|
1761
|
+
|
1762
|
+
# The Microsoft Knowledge Base article IDs that are associated with the update.
|
1763
|
+
# Corresponds to the JSON property `kbArticleIds`
|
1764
|
+
# @return [Array<String>]
|
1765
|
+
attr_accessor :kb_article_ids
|
1766
|
+
|
1767
|
+
# The last published timestamp of the update.
|
1768
|
+
# Corresponds to the JSON property `lastPublishedTimestamp`
|
1769
|
+
# @return [String]
|
1770
|
+
attr_accessor :last_published_timestamp
|
1771
|
+
|
1772
|
+
# The hyperlink to the support information for the update.
|
1773
|
+
# Corresponds to the JSON property `supportUrl`
|
1774
|
+
# @return [String]
|
1775
|
+
attr_accessor :support_url
|
1776
|
+
|
1777
|
+
# The localized title of the update.
|
1778
|
+
# Corresponds to the JSON property `title`
|
1779
|
+
# @return [String]
|
1780
|
+
attr_accessor :title
|
1781
|
+
|
1782
|
+
def initialize(**args)
|
1783
|
+
update!(**args)
|
1784
|
+
end
|
1785
|
+
|
1786
|
+
# Update properties of this object
|
1787
|
+
def update!(**args)
|
1788
|
+
@categories = args[:categories] if args.key?(:categories)
|
1789
|
+
@description = args[:description] if args.key?(:description)
|
1790
|
+
@identity = args[:identity] if args.key?(:identity)
|
1791
|
+
@kb_article_ids = args[:kb_article_ids] if args.key?(:kb_article_ids)
|
1792
|
+
@last_published_timestamp = args[:last_published_timestamp] if args.key?(:last_published_timestamp)
|
1793
|
+
@support_url = args[:support_url] if args.key?(:support_url)
|
1794
|
+
@title = args[:title] if args.key?(:title)
|
1795
|
+
end
|
1796
|
+
end
|
1797
|
+
end
|
1798
|
+
end
|
1799
|
+
end
|