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