Debian Codegraph @

ondemandscanning/v1beta1/ondemandscanning-gen.go

raw
1 // Copyright 2026 Google LLC.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Code generated file. DO NOT EDIT.
6
7 // Package ondemandscanning provides access to the On-Demand Scanning API.
8 //
9 // For product documentation, see: https://cloud.google.com/container-analysis/docs/on-demand-scanning/
10 //
11 // # Library status
12 //
13 // These client libraries are officially supported by Google. However, this
14 // library is considered complete and is in maintenance mode. This means
15 // that we will address critical bugs and security issues but will not add
16 // any new features.
17 //
18 // When possible, we recommend using our newer
19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
20 // that are still actively being worked and iterated on.
21 //
22 // # Creating a client
23 //
24 // Usage example:
25 //
26 // import "google.golang.org/api/ondemandscanning/v1beta1"
27 // ...
28 // ctx := context.Background()
29 // ondemandscanningService, err := ondemandscanning.NewService(ctx)
30 //
31 // In this example, Google Application Default Credentials are used for
32 // authentication. For information on how to create and obtain Application
33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
34 //
35 // # Other authentication options
36 //
37 // To use an API key for authentication (note: some APIs do not support API
38 // keys), use [google.golang.org/api/option.WithAPIKey]:
39 //
40 // ondemandscanningService, err := ondemandscanning.NewService(ctx, option.WithAPIKey("AIza..."))
41 //
42 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
43 // flow, use [google.golang.org/api/option.WithTokenSource]:
44 //
45 // config := &oauth2.Config{...}
46 // // ...
47 // token, err := config.Exchange(ctx, ...)
48 // ondemandscanningService, err := ondemandscanning.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
49 //
50 // See [google.golang.org/api/option.ClientOption] for details on options.
51 package ondemandscanning // import "google.golang.org/api/ondemandscanning/v1beta1"
52
53 import (
54 "bytes"
55 "context"
56 "encoding/json"
57 "errors"
58 "fmt"
59 "io"
60 "log/slog"
61 "net/http"
62 "net/url"
63 "strconv"
64 "strings"
65
66 "github.com/googleapis/gax-go/v2/internallog"
67 googleapi "google.golang.org/api/googleapi"
68 internal "google.golang.org/api/internal"
69 gensupport "google.golang.org/api/internal/gensupport"
70 option "google.golang.org/api/option"
71 internaloption "google.golang.org/api/option/internaloption"
72 htransport "google.golang.org/api/transport/http"
73 )
74
75 // Always reference these packages, just in case the auto-generated code
76 // below doesn't.
77 var _ = bytes.NewBuffer
78 var _ = strconv.Itoa
79 var _ = fmt.Sprintf
80 var _ = json.NewDecoder
81 var _ = io.Copy
82 var _ = url.Parse
83 var _ = gensupport.MarshalJSON
84 var _ = googleapi.Version
85 var _ = errors.New
86 var _ = strings.Replace
87 var _ = context.Canceled
88 var _ = internaloption.WithDefaultEndpoint
89 var _ = internal.Version
90 var _ = internallog.New
91
92 const apiId = "ondemandscanning:v1beta1"
93 const apiName = "ondemandscanning"
94 const apiVersion = "v1beta1"
95 const basePath = "https://ondemandscanning.googleapis.com/"
96 const basePathTemplate = "https://ondemandscanning.UNIVERSE_DOMAIN/"
97 const mtlsBasePath = "https://ondemandscanning.mtls.googleapis.com/"
98
99 // OAuth2 scopes used by this API.
100 const (
101 // See, edit, configure, and delete your Google Cloud data and see the email
102 // address for your Google Account.
103 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
104 )
105
106 // NewService creates a new Service.
107 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
108 scopesOption := internaloption.WithDefaultScopes(
109 "https://www.googleapis.com/auth/cloud-platform",
110 )
111 // NOTE: prepend, so we don't override user-specified scopes.
112 opts = append([]option.ClientOption{scopesOption}, opts...)
113 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
114 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
115 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
116 opts = append(opts, internaloption.EnableNewAuthLibrary())
117 client, endpoint, err := htransport.NewClient(ctx, opts...)
118 if err != nil {
119 return nil, err
120 }
121 s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)}
122 s.Projects = NewProjectsService(s)
123 if endpoint != "" {
124 s.BasePath = endpoint
125 }
126 return s, nil
127 }
128
129 // New creates a new Service. It uses the provided http.Client for requests.
130 //
131 // Deprecated: please use NewService instead.
132 // To provide a custom HTTP client, use option.WithHTTPClient.
133 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
134 func New(client *http.Client) (*Service, error) {
135 if client == nil {
136 return nil, errors.New("client is nil")
137 }
138 return NewService(context.TODO(), option.WithHTTPClient(client))
139 }
140
141 type Service struct {
142 client *http.Client
143 logger *slog.Logger
144 BasePath string // API endpoint base URL
145 UserAgent string // optional additional User-Agent fragment
146
147 Projects *ProjectsService
148 }
149
150 func (s *Service) userAgent() string {
151 if s.UserAgent == "" {
152 return googleapi.UserAgent
153 }
154 return googleapi.UserAgent + " " + s.UserAgent
155 }
156
157 func NewProjectsService(s *Service) *ProjectsService {
158 rs := &ProjectsService{s: s}
159 rs.Locations = NewProjectsLocationsService(s)
160 return rs
161 }
162
163 type ProjectsService struct {
164 s *Service
165
166 Locations *ProjectsLocationsService
167 }
168
169 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
170 rs := &ProjectsLocationsService{s: s}
171 rs.Operations = NewProjectsLocationsOperationsService(s)
172 rs.Scans = NewProjectsLocationsScansService(s)
173 return rs
174 }
175
176 type ProjectsLocationsService struct {
177 s *Service
178
179 Operations *ProjectsLocationsOperationsService
180
181 Scans *ProjectsLocationsScansService
182 }
183
184 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
185 rs := &ProjectsLocationsOperationsService{s: s}
186 return rs
187 }
188
189 type ProjectsLocationsOperationsService struct {
190 s *Service
191 }
192
193 func NewProjectsLocationsScansService(s *Service) *ProjectsLocationsScansService {
194 rs := &ProjectsLocationsScansService{s: s}
195 rs.Vulnerabilities = NewProjectsLocationsScansVulnerabilitiesService(s)
196 return rs
197 }
198
199 type ProjectsLocationsScansService struct {
200 s *Service
201
202 Vulnerabilities *ProjectsLocationsScansVulnerabilitiesService
203 }
204
205 func NewProjectsLocationsScansVulnerabilitiesService(s *Service) *ProjectsLocationsScansVulnerabilitiesService {
206 rs := &ProjectsLocationsScansVulnerabilitiesService{s: s}
207 return rs
208 }
209
210 type ProjectsLocationsScansVulnerabilitiesService struct {
211 s *Service
212 }
213
214 // AISkillAnalysisOccurrence: AISkillAnalysisOccurrence provides the results of
215 // an AI-based skill analysis.
216 type AISkillAnalysisOccurrence struct {
217 // Findings: Findings produced by the analysis.
218 Findings []*Finding `json:"findings,omitempty"`
219 // SkillName: Name of the skill that produced this analysis.
220 SkillName string `json:"skillName,omitempty"`
221 // ForceSendFields is a list of field names (e.g. "Findings") to
222 // unconditionally include in API requests. By default, fields with empty or
223 // default values are omitted from API requests. See
224 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
225 // details.
226 ForceSendFields []string `json:"-"`
227 // NullFields is a list of field names (e.g. "Findings") to include in API
228 // requests with the JSON null value. By default, fields with empty values are
229 // omitted from API requests. See
230 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
231 NullFields []string `json:"-"`
232 }
233
234 func (s AISkillAnalysisOccurrence) MarshalJSON() ([]byte, error) {
235 type NoMethod AISkillAnalysisOccurrence
236 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
237 }
238
239 // AliasContext: An alias to a repo revision.
240 type AliasContext struct {
241 // Kind: The alias kind.
242 //
243 // Possible values:
244 // "KIND_UNSPECIFIED" - Unknown.
245 // "FIXED" - Git tag.
246 // "MOVABLE" - Git branch.
247 // "OTHER" - Used to specify non-standard aliases. For example, if a Git repo
248 // has a ref named "refs/foo/bar".
249 Kind string `json:"kind,omitempty"`
250 // Name: The alias name.
251 Name string `json:"name,omitempty"`
252 // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
253 // include in API requests. By default, fields with empty or default values are
254 // omitted from API requests. See
255 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
256 // details.
257 ForceSendFields []string `json:"-"`
258 // NullFields is a list of field names (e.g. "Kind") to include in API requests
259 // with the JSON null value. By default, fields with empty values are omitted
260 // from API requests. See
261 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
262 NullFields []string `json:"-"`
263 }
264
265 func (s AliasContext) MarshalJSON() ([]byte, error) {
266 type NoMethod AliasContext
267 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
268 }
269
270 // AnalysisCompleted: Indicates which analysis completed successfully. Multiple
271 // types of analysis can be performed on a single resource.
272 type AnalysisCompleted struct {
273 AnalysisType []string `json:"analysisType,omitempty"`
274 // ForceSendFields is a list of field names (e.g. "AnalysisType") to
275 // unconditionally include in API requests. By default, fields with empty or
276 // default values are omitted from API requests. See
277 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
278 // details.
279 ForceSendFields []string `json:"-"`
280 // NullFields is a list of field names (e.g. "AnalysisType") to include in API
281 // requests with the JSON null value. By default, fields with empty values are
282 // omitted from API requests. See
283 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
284 NullFields []string `json:"-"`
285 }
286
287 func (s AnalysisCompleted) MarshalJSON() ([]byte, error) {
288 type NoMethod AnalysisCompleted
289 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
290 }
291
292 // AnalyzePackagesMetadata: AnalyzePackagesMetadata contains metadata for an
293 // active scan of a container image.
294 type AnalyzePackagesMetadata struct {
295 // CreateTime: When the scan was created.
296 CreateTime string `json:"createTime,omitempty"`
297 // ResourceUri: The resource URI of the container image being scanned.
298 ResourceUri string `json:"resourceUri,omitempty"`
299 // ForceSendFields is a list of field names (e.g. "CreateTime") to
300 // unconditionally include in API requests. By default, fields with empty or
301 // default values are omitted from API requests. See
302 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
303 // details.
304 ForceSendFields []string `json:"-"`
305 // NullFields is a list of field names (e.g. "CreateTime") to include in API
306 // requests with the JSON null value. By default, fields with empty values are
307 // omitted from API requests. See
308 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
309 NullFields []string `json:"-"`
310 }
311
312 func (s AnalyzePackagesMetadata) MarshalJSON() ([]byte, error) {
313 type NoMethod AnalyzePackagesMetadata
314 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
315 }
316
317 // AnalyzePackagesMetadataV1: AnalyzePackagesMetadata contains metadata for an
318 // active scan of a container image.
319 type AnalyzePackagesMetadataV1 struct {
320 // CreateTime: When the scan was created.
321 CreateTime string `json:"createTime,omitempty"`
322 // ResourceUri: The resource URI of the container image being scanned.
323 ResourceUri string `json:"resourceUri,omitempty"`
324 // ForceSendFields is a list of field names (e.g. "CreateTime") to
325 // unconditionally include in API requests. By default, fields with empty or
326 // default values are omitted from API requests. See
327 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
328 // details.
329 ForceSendFields []string `json:"-"`
330 // NullFields is a list of field names (e.g. "CreateTime") to include in API
331 // requests with the JSON null value. By default, fields with empty values are
332 // omitted from API requests. See
333 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
334 NullFields []string `json:"-"`
335 }
336
337 func (s AnalyzePackagesMetadataV1) MarshalJSON() ([]byte, error) {
338 type NoMethod AnalyzePackagesMetadataV1
339 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
340 }
341
342 // AnalyzePackagesRequest: AnalyzePackagesRequest is the request to analyze a
343 // list of packages and create Vulnerability Occurrences for it.
344 type AnalyzePackagesRequest struct {
345 // Packages: The packages to analyze.
346 Packages []*PackageData `json:"packages,omitempty"`
347 // ResourceUri: Required. The resource URI of the container image being
348 // scanned.
349 ResourceUri string `json:"resourceUri,omitempty"`
350 // ForceSendFields is a list of field names (e.g. "Packages") to
351 // unconditionally include in API requests. By default, fields with empty or
352 // default values are omitted from API requests. See
353 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
354 // details.
355 ForceSendFields []string `json:"-"`
356 // NullFields is a list of field names (e.g. "Packages") to include in API
357 // requests with the JSON null value. By default, fields with empty values are
358 // omitted from API requests. See
359 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
360 NullFields []string `json:"-"`
361 }
362
363 func (s AnalyzePackagesRequest) MarshalJSON() ([]byte, error) {
364 type NoMethod AnalyzePackagesRequest
365 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
366 }
367
368 // AnalyzePackagesResponse: AnalyzePackagesResponse contains the information
369 // necessary to find results for the given scan.
370 type AnalyzePackagesResponse struct {
371 // Scan: The name of the scan resource created by this successful scan.
372 Scan string `json:"scan,omitempty"`
373 // ForceSendFields is a list of field names (e.g. "Scan") to unconditionally
374 // include in API requests. By default, fields with empty or default values are
375 // omitted from API requests. See
376 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
377 // details.
378 ForceSendFields []string `json:"-"`
379 // NullFields is a list of field names (e.g. "Scan") to include in API requests
380 // with the JSON null value. By default, fields with empty values are omitted
381 // from API requests. See
382 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
383 NullFields []string `json:"-"`
384 }
385
386 func (s AnalyzePackagesResponse) MarshalJSON() ([]byte, error) {
387 type NoMethod AnalyzePackagesResponse
388 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
389 }
390
391 // AnalyzePackagesResponseV1: AnalyzePackagesResponse contains the information
392 // necessary to find results for the given scan.
393 type AnalyzePackagesResponseV1 struct {
394 // Scan: The name of the scan resource created by this successful scan.
395 Scan string `json:"scan,omitempty"`
396 // ForceSendFields is a list of field names (e.g. "Scan") to unconditionally
397 // include in API requests. By default, fields with empty or default values are
398 // omitted from API requests. See
399 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
400 // details.
401 ForceSendFields []string `json:"-"`
402 // NullFields is a list of field names (e.g. "Scan") to include in API requests
403 // with the JSON null value. By default, fields with empty values are omitted
404 // from API requests. See
405 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
406 NullFields []string `json:"-"`
407 }
408
409 func (s AnalyzePackagesResponseV1) MarshalJSON() ([]byte, error) {
410 type NoMethod AnalyzePackagesResponseV1
411 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
412 }
413
414 // Artifact: Artifact describes a build product.
415 type Artifact struct {
416 // Checksum: Hash or checksum value of a binary, or Docker Registry 2.0 digest
417 // of a container.
418 Checksum string `json:"checksum,omitempty"`
419 // Id: Artifact ID, if any; for container images, this will be a URL by digest
420 // like `gcr.io/projectID/imagename@sha256:123456`.
421 Id string `json:"id,omitempty"`
422 // Names: Related artifact names. This may be the path to a binary or jar file,
423 // or in the case of a container build, the name used to push the container
424 // image to Google Container Registry, as presented to `docker push`. Note that
425 // a single Artifact ID can have multiple names, for example if two tags are
426 // applied to one image.
427 Names []string `json:"names,omitempty"`
428 // ForceSendFields is a list of field names (e.g. "Checksum") to
429 // unconditionally include in API requests. By default, fields with empty or
430 // default values are omitted from API requests. See
431 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
432 // details.
433 ForceSendFields []string `json:"-"`
434 // NullFields is a list of field names (e.g. "Checksum") to include in API
435 // requests with the JSON null value. By default, fields with empty values are
436 // omitted from API requests. See
437 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
438 NullFields []string `json:"-"`
439 }
440
441 func (s Artifact) MarshalJSON() ([]byte, error) {
442 type NoMethod Artifact
443 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
444 }
445
446 // AttestationOccurrence: Occurrence that represents a single "attestation".
447 // The authenticity of an attestation can be verified using the attached
448 // signature. If the verifier trusts the public key of the signer, then
449 // verifying the signature is sufficient to establish trust. In this
450 // circumstance, the authority to which this attestation is attached is
451 // primarily useful for lookup (how to find this attestation if you already
452 // know the authority and artifact to be verified) and intent (for which
453 // authority this attestation was intended to sign.
454 type AttestationOccurrence struct {
455 // Jwts: One or more JWTs encoding a self-contained attestation. Each JWT
456 // encodes the payload that it verifies within the JWT itself. Verifier
457 // implementation SHOULD ignore the `serialized_payload` field when verifying
458 // these JWTs. If only JWTs are present on this AttestationOccurrence, then the
459 // `serialized_payload` SHOULD be left empty. Each JWT SHOULD encode a claim
460 // specific to the `resource_uri` of this Occurrence, but this is not validated
461 // by Grafeas metadata API implementations. The JWT itself is opaque to
462 // Grafeas.
463 Jwts []*Jwt `json:"jwts,omitempty"`
464 // SerializedPayload: Required. The serialized payload that is verified by one
465 // or more `signatures`.
466 SerializedPayload string `json:"serializedPayload,omitempty"`
467 // Signatures: One or more signatures over `serialized_payload`. Verifier
468 // implementations should consider this attestation message verified if at
469 // least one `signature` verifies `serialized_payload`. See `Signature` in
470 // common.proto for more details on signature structure and verification.
471 Signatures []*Signature `json:"signatures,omitempty"`
472 // ForceSendFields is a list of field names (e.g. "Jwts") to unconditionally
473 // include in API requests. By default, fields with empty or default values are
474 // omitted from API requests. See
475 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
476 // details.
477 ForceSendFields []string `json:"-"`
478 // NullFields is a list of field names (e.g. "Jwts") to include in API requests
479 // with the JSON null value. By default, fields with empty values are omitted
480 // from API requests. See
481 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
482 NullFields []string `json:"-"`
483 }
484
485 func (s AttestationOccurrence) MarshalJSON() ([]byte, error) {
486 type NoMethod AttestationOccurrence
487 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
488 }
489
490 // BaseImage: BaseImage describes a base image of a container image.
491 type BaseImage struct {
492 // LayerCount: The number of layers that the base image is composed of.
493 LayerCount int64 `json:"layerCount,omitempty"`
494 // Name: The name of the base image.
495 Name string `json:"name,omitempty"`
496 // Registry: The registry in which the base image is from.
497 Registry string `json:"registry,omitempty"`
498 // Repository: The repository name in which the base image is from.
499 Repository string `json:"repository,omitempty"`
500 // ForceSendFields is a list of field names (e.g. "LayerCount") to
501 // unconditionally include in API requests. By default, fields with empty or
502 // default values are omitted from API requests. See
503 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
504 // details.
505 ForceSendFields []string `json:"-"`
506 // NullFields is a list of field names (e.g. "LayerCount") to include in API
507 // requests with the JSON null value. By default, fields with empty values are
508 // omitted from API requests. See
509 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
510 NullFields []string `json:"-"`
511 }
512
513 func (s BaseImage) MarshalJSON() ([]byte, error) {
514 type NoMethod BaseImage
515 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
516 }
517
518 type BinarySourceInfo struct {
519 // BinaryVersion: The binary package. This is significant when the source is
520 // different than the binary itself. Historically if they've differed, we've
521 // stored the name of the source and its version in the package/version fields,
522 // but we should also store the binary package info, as that's what's actually
523 // installed.
524 BinaryVersion *PackageVersion `json:"binaryVersion,omitempty"`
525 // SourceVersion: The source package. Similar to the above, this is significant
526 // when the source is different than the binary itself. Since the top-level
527 // package/version fields are based on an if/else, we need a separate field for
528 // both binary and source if we want to know definitively where the data is
529 // coming from.
530 SourceVersion *PackageVersion `json:"sourceVersion,omitempty"`
531 // ForceSendFields is a list of field names (e.g. "BinaryVersion") to
532 // unconditionally include in API requests. By default, fields with empty or
533 // default values are omitted from API requests. See
534 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
535 // details.
536 ForceSendFields []string `json:"-"`
537 // NullFields is a list of field names (e.g. "BinaryVersion") to include in API
538 // requests with the JSON null value. By default, fields with empty values are
539 // omitted from API requests. See
540 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
541 NullFields []string `json:"-"`
542 }
543
544 func (s BinarySourceInfo) MarshalJSON() ([]byte, error) {
545 type NoMethod BinarySourceInfo
546 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
547 }
548
549 type BuildDefinition struct {
550 BuildType string `json:"buildType,omitempty"`
551 ExternalParameters googleapi.RawMessage `json:"externalParameters,omitempty"`
552 InternalParameters googleapi.RawMessage `json:"internalParameters,omitempty"`
553 ResolvedDependencies []*ResourceDescriptor `json:"resolvedDependencies,omitempty"`
554 // ForceSendFields is a list of field names (e.g. "BuildType") to
555 // unconditionally include in API requests. By default, fields with empty or
556 // default values are omitted from API requests. See
557 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
558 // details.
559 ForceSendFields []string `json:"-"`
560 // NullFields is a list of field names (e.g. "BuildType") to include in API
561 // requests with the JSON null value. By default, fields with empty values are
562 // omitted from API requests. See
563 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
564 NullFields []string `json:"-"`
565 }
566
567 func (s BuildDefinition) MarshalJSON() ([]byte, error) {
568 type NoMethod BuildDefinition
569 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
570 }
571
572 type BuildMetadata struct {
573 FinishedOn string `json:"finishedOn,omitempty"`
574 InvocationId string `json:"invocationId,omitempty"`
575 StartedOn string `json:"startedOn,omitempty"`
576 // ForceSendFields is a list of field names (e.g. "FinishedOn") to
577 // unconditionally include in API requests. By default, fields with empty or
578 // default values are omitted from API requests. See
579 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
580 // details.
581 ForceSendFields []string `json:"-"`
582 // NullFields is a list of field names (e.g. "FinishedOn") to include in API
583 // requests with the JSON null value. By default, fields with empty values are
584 // omitted from API requests. See
585 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
586 NullFields []string `json:"-"`
587 }
588
589 func (s BuildMetadata) MarshalJSON() ([]byte, error) {
590 type NoMethod BuildMetadata
591 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
592 }
593
594 // BuildOccurrence: Details of a build occurrence.
595 type BuildOccurrence struct {
596 // InTotoSlsaProvenanceV1: In-Toto Slsa Provenance V1 represents a slsa
597 // provenance meeting the slsa spec, wrapped in an in-toto statement. This
598 // allows for direct jsonification of a to-spec in-toto slsa statement with a
599 // to-spec slsa provenance.
600 InTotoSlsaProvenanceV1 *InTotoSlsaProvenanceV1 `json:"inTotoSlsaProvenanceV1,omitempty"`
601 // IntotoProvenance: Deprecated. See InTotoStatement for the replacement.
602 // In-toto Provenance representation as defined in spec.
603 IntotoProvenance *InTotoProvenance `json:"intotoProvenance,omitempty"`
604 // IntotoStatement: In-toto Statement representation as defined in spec. The
605 // intoto_statement can contain any type of provenance. The serialized payload
606 // of the statement can be stored and signed in the Occurrence's envelope.
607 IntotoStatement *InTotoStatement `json:"intotoStatement,omitempty"`
608 // Provenance: The actual provenance for the build.
609 Provenance *BuildProvenance `json:"provenance,omitempty"`
610 // ProvenanceBytes: Serialized JSON representation of the provenance, used in
611 // generating the build signature in the corresponding build note. After
612 // verifying the signature, `provenance_bytes` can be unmarshalled and compared
613 // to the provenance to confirm that it is unchanged. A base64-encoded string
614 // representation of the provenance bytes is used for the signature in order to
615 // interoperate with openssl which expects this format for signature
616 // verification. The serialized form is captured both to avoid ambiguity in how
617 // the provenance is marshalled to json as well to prevent incompatibilities
618 // with future changes.
619 ProvenanceBytes string `json:"provenanceBytes,omitempty"`
620 // ForceSendFields is a list of field names (e.g. "InTotoSlsaProvenanceV1") to
621 // unconditionally include in API requests. By default, fields with empty or
622 // default values are omitted from API requests. See
623 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
624 // details.
625 ForceSendFields []string `json:"-"`
626 // NullFields is a list of field names (e.g. "InTotoSlsaProvenanceV1") to
627 // include in API requests with the JSON null value. By default, fields with
628 // empty values are omitted from API requests. See
629 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
630 NullFields []string `json:"-"`
631 }
632
633 func (s BuildOccurrence) MarshalJSON() ([]byte, error) {
634 type NoMethod BuildOccurrence
635 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
636 }
637
638 // BuildProvenance: Provenance of a build. Contains all information needed to
639 // verify the full details about the build from source to completion.
640 type BuildProvenance struct {
641 // BuildOptions: Special options applied to this build. This is a catch-all
642 // field where build providers can enter any desired additional details.
643 BuildOptions map[string]string `json:"buildOptions,omitempty"`
644 // BuilderVersion: Version string of the builder at the time this build was
645 // executed.
646 BuilderVersion string `json:"builderVersion,omitempty"`
647 // BuiltArtifacts: Output of the build.
648 BuiltArtifacts []*Artifact `json:"builtArtifacts,omitempty"`
649 // Commands: Commands requested by the build.
650 Commands []*Command `json:"commands,omitempty"`
651 // CreateTime: Time at which the build was created.
652 CreateTime string `json:"createTime,omitempty"`
653 // Creator: E-mail address of the user who initiated this build. Note that this
654 // was the user's e-mail address at the time the build was initiated; this
655 // address may not represent the same end-user for all time.
656 Creator string `json:"creator,omitempty"`
657 // EndTime: Time at which execution of the build was finished.
658 EndTime string `json:"endTime,omitempty"`
659 // Id: Required. Unique identifier of the build.
660 Id string `json:"id,omitempty"`
661 // LogsUri: URI where any logs for this provenance were written.
662 LogsUri string `json:"logsUri,omitempty"`
663 // ProjectId: ID of the project.
664 ProjectId string `json:"projectId,omitempty"`
665 // SourceProvenance: Details of the Source input to the build.
666 SourceProvenance *Source `json:"sourceProvenance,omitempty"`
667 // StartTime: Time at which execution of the build was started.
668 StartTime string `json:"startTime,omitempty"`
669 // TriggerId: Trigger identifier if the build was triggered automatically;
670 // empty if not.
671 TriggerId string `json:"triggerId,omitempty"`
672 // ForceSendFields is a list of field names (e.g. "BuildOptions") to
673 // unconditionally include in API requests. By default, fields with empty or
674 // default values are omitted from API requests. See
675 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
676 // details.
677 ForceSendFields []string `json:"-"`
678 // NullFields is a list of field names (e.g. "BuildOptions") to include in API
679 // requests with the JSON null value. By default, fields with empty values are
680 // omitted from API requests. See
681 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
682 NullFields []string `json:"-"`
683 }
684
685 func (s BuildProvenance) MarshalJSON() ([]byte, error) {
686 type NoMethod BuildProvenance
687 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
688 }
689
690 type BuilderConfig struct {
691 Id string `json:"id,omitempty"`
692 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally
693 // include in API requests. By default, fields with empty or default values are
694 // omitted from API requests. See
695 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
696 // details.
697 ForceSendFields []string `json:"-"`
698 // NullFields is a list of field names (e.g. "Id") to include in API requests
699 // with the JSON null value. By default, fields with empty values are omitted
700 // from API requests. See
701 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
702 NullFields []string `json:"-"`
703 }
704
705 func (s BuilderConfig) MarshalJSON() ([]byte, error) {
706 type NoMethod BuilderConfig
707 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
708 }
709
710 type CISAKnownExploitedVulnerabilities struct {
711 // KnownRansomwareCampaignUse: Whether the vulnerability is known to have been
712 // leveraged as part of a ransomware campaign.
713 KnownRansomwareCampaignUse string `json:"knownRansomwareCampaignUse,omitempty"`
714 // ForceSendFields is a list of field names (e.g. "KnownRansomwareCampaignUse")
715 // to unconditionally include in API requests. By default, fields with empty or
716 // default values are omitted from API requests. See
717 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
718 // details.
719 ForceSendFields []string `json:"-"`
720 // NullFields is a list of field names (e.g. "KnownRansomwareCampaignUse") to
721 // include in API requests with the JSON null value. By default, fields with
722 // empty values are omitted from API requests. See
723 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
724 NullFields []string `json:"-"`
725 }
726
727 func (s CISAKnownExploitedVulnerabilities) MarshalJSON() ([]byte, error) {
728 type NoMethod CISAKnownExploitedVulnerabilities
729 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
730 }
731
732 // CVSS: Common Vulnerability Scoring System. For details, see
733 // https://www.first.org/cvss/specification-document This is a message we will
734 // try to use for storing various versions of CVSS rather than making a
735 // separate proto for storing a specific version.
736 type CVSS struct {
737 // Possible values:
738 // "ATTACK_COMPLEXITY_UNSPECIFIED"
739 // "ATTACK_COMPLEXITY_LOW"
740 // "ATTACK_COMPLEXITY_HIGH"
741 // "ATTACK_COMPLEXITY_MEDIUM"
742 AttackComplexity string `json:"attackComplexity,omitempty"`
743 // AttackVector: Base Metrics Represents the intrinsic characteristics of a
744 // vulnerability that are constant over time and across user environments.
745 //
746 // Possible values:
747 // "ATTACK_VECTOR_UNSPECIFIED"
748 // "ATTACK_VECTOR_NETWORK"
749 // "ATTACK_VECTOR_ADJACENT"
750 // "ATTACK_VECTOR_LOCAL"
751 // "ATTACK_VECTOR_PHYSICAL"
752 AttackVector string `json:"attackVector,omitempty"`
753 // Possible values:
754 // "AUTHENTICATION_UNSPECIFIED"
755 // "AUTHENTICATION_MULTIPLE"
756 // "AUTHENTICATION_SINGLE"
757 // "AUTHENTICATION_NONE"
758 Authentication string `json:"authentication,omitempty"`
759 // Possible values:
760 // "IMPACT_UNSPECIFIED"
761 // "IMPACT_HIGH"
762 // "IMPACT_LOW"
763 // "IMPACT_NONE"
764 // "IMPACT_PARTIAL"
765 // "IMPACT_COMPLETE"
766 AvailabilityImpact string `json:"availabilityImpact,omitempty"`
767 // BaseScore: The base score is a function of the base metric scores.
768 BaseScore float64 `json:"baseScore,omitempty"`
769 // Possible values:
770 // "IMPACT_UNSPECIFIED"
771 // "IMPACT_HIGH"
772 // "IMPACT_LOW"
773 // "IMPACT_NONE"
774 // "IMPACT_PARTIAL"
775 // "IMPACT_COMPLETE"
776 ConfidentialityImpact string `json:"confidentialityImpact,omitempty"`
777 ExploitabilityScore float64 `json:"exploitabilityScore,omitempty"`
778 ImpactScore float64 `json:"impactScore,omitempty"`
779 // Possible values:
780 // "IMPACT_UNSPECIFIED"
781 // "IMPACT_HIGH"
782 // "IMPACT_LOW"
783 // "IMPACT_NONE"
784 // "IMPACT_PARTIAL"
785 // "IMPACT_COMPLETE"
786 IntegrityImpact string `json:"integrityImpact,omitempty"`
787 // Possible values:
788 // "PRIVILEGES_REQUIRED_UNSPECIFIED"
789 // "PRIVILEGES_REQUIRED_NONE"
790 // "PRIVILEGES_REQUIRED_LOW"
791 // "PRIVILEGES_REQUIRED_HIGH"
792 PrivilegesRequired string `json:"privilegesRequired,omitempty"`
793 // Possible values:
794 // "SCOPE_UNSPECIFIED"
795 // "SCOPE_UNCHANGED"
796 // "SCOPE_CHANGED"
797 Scope string `json:"scope,omitempty"`
798 // Possible values:
799 // "USER_INTERACTION_UNSPECIFIED"
800 // "USER_INTERACTION_NONE"
801 // "USER_INTERACTION_REQUIRED"
802 UserInteraction string `json:"userInteraction,omitempty"`
803 // ForceSendFields is a list of field names (e.g. "AttackComplexity") to
804 // unconditionally include in API requests. By default, fields with empty or
805 // default values are omitted from API requests. See
806 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
807 // details.
808 ForceSendFields []string `json:"-"`
809 // NullFields is a list of field names (e.g. "AttackComplexity") to include in
810 // API requests with the JSON null value. By default, fields with empty values
811 // are omitted from API requests. See
812 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
813 NullFields []string `json:"-"`
814 }
815
816 func (s CVSS) MarshalJSON() ([]byte, error) {
817 type NoMethod CVSS
818 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
819 }
820
821 func (s *CVSS) UnmarshalJSON(data []byte) error {
822 type NoMethod CVSS
823 var s1 struct {
824 BaseScore gensupport.JSONFloat64 `json:"baseScore"`
825 ExploitabilityScore gensupport.JSONFloat64 `json:"exploitabilityScore"`
826 ImpactScore gensupport.JSONFloat64 `json:"impactScore"`
827 *NoMethod
828 }
829 s1.NoMethod = (*NoMethod)(s)
830 if err := json.Unmarshal(data, &s1); err != nil {
831 return err
832 }
833 s.BaseScore = float64(s1.BaseScore)
834 s.ExploitabilityScore = float64(s1.ExploitabilityScore)
835 s.ImpactScore = float64(s1.ImpactScore)
836 return nil
837 }
838
839 // Category: The category to which the update belongs.
840 type Category struct {
841 // CategoryId: The identifier of the category.
842 CategoryId string `json:"categoryId,omitempty"`
843 // Name: The localized name of the category.
844 Name string `json:"name,omitempty"`
845 // ForceSendFields is a list of field names (e.g. "CategoryId") to
846 // unconditionally include in API requests. By default, fields with empty or
847 // default values are omitted from API requests. See
848 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
849 // details.
850 ForceSendFields []string `json:"-"`
851 // NullFields is a list of field names (e.g. "CategoryId") to include in API
852 // requests with the JSON null value. By default, fields with empty values are
853 // omitted from API requests. See
854 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
855 NullFields []string `json:"-"`
856 }
857
858 func (s Category) MarshalJSON() ([]byte, error) {
859 type NoMethod Category
860 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
861 }
862
863 // CloudRepoSourceContext: A CloudRepoSourceContext denotes a particular
864 // revision in a Google Cloud Source Repo.
865 type CloudRepoSourceContext struct {
866 // AliasContext: An alias, which may be a branch or tag.
867 AliasContext *AliasContext `json:"aliasContext,omitempty"`
868 // RepoId: The ID of the repo.
869 RepoId *RepoId `json:"repoId,omitempty"`
870 // RevisionId: A revision ID.
871 RevisionId string `json:"revisionId,omitempty"`
872 // ForceSendFields is a list of field names (e.g. "AliasContext") to
873 // unconditionally include in API requests. By default, fields with empty or
874 // default values are omitted from API requests. See
875 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
876 // details.
877 ForceSendFields []string `json:"-"`
878 // NullFields is a list of field names (e.g. "AliasContext") to include in API
879 // requests with the JSON null value. By default, fields with empty values are
880 // omitted from API requests. See
881 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
882 NullFields []string `json:"-"`
883 }
884
885 func (s CloudRepoSourceContext) MarshalJSON() ([]byte, error) {
886 type NoMethod CloudRepoSourceContext
887 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
888 }
889
890 // Command: Command describes a step performed as part of the build pipeline.
891 type Command struct {
892 // Args: Command-line arguments used when executing this command.
893 Args []string `json:"args,omitempty"`
894 // Dir: Working directory (relative to project source root) used when running
895 // this command.
896 Dir string `json:"dir,omitempty"`
897 // Env: Environment variables set before running this command.
898 Env []string `json:"env,omitempty"`
899 // Id: Optional unique identifier for this command, used in wait_for to
900 // reference this command as a dependency.
901 Id string `json:"id,omitempty"`
902 // Name: Required. Name of the command, as presented on the command line, or if
903 // the command is packaged as a Docker container, as presented to `docker
904 // pull`.
905 Name string `json:"name,omitempty"`
906 // WaitFor: The ID(s) of the command(s) that this command depends on.
907 WaitFor []string `json:"waitFor,omitempty"`
908 // ForceSendFields is a list of field names (e.g. "Args") to unconditionally
909 // include in API requests. By default, fields with empty or default values are
910 // omitted from API requests. See
911 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
912 // details.
913 ForceSendFields []string `json:"-"`
914 // NullFields is a list of field names (e.g. "Args") to include in API requests
915 // with the JSON null value. By default, fields with empty values are omitted
916 // from API requests. See
917 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
918 NullFields []string `json:"-"`
919 }
920
921 func (s Command) MarshalJSON() ([]byte, error) {
922 type NoMethod Command
923 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
924 }
925
926 // Completeness: Indicates that the builder claims certain fields in this
927 // message to be complete.
928 type Completeness struct {
929 // Arguments: If true, the builder claims that recipe.arguments is complete,
930 // meaning that all external inputs are properly captured in the recipe.
931 Arguments bool `json:"arguments,omitempty"`
932 // Environment: If true, the builder claims that recipe.environment is claimed
933 // to be complete.
934 Environment bool `json:"environment,omitempty"`
935 // Materials: If true, the builder claims that materials are complete, usually
936 // through some controls to prevent network access. Sometimes called
937 // "hermetic".
938 Materials bool `json:"materials,omitempty"`
939 // ForceSendFields is a list of field names (e.g. "Arguments") to
940 // unconditionally include in API requests. By default, fields with empty or
941 // default values are omitted from API requests. See
942 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
943 // details.
944 ForceSendFields []string `json:"-"`
945 // NullFields is a list of field names (e.g. "Arguments") to include in API
946 // requests with the JSON null value. By default, fields with empty values are
947 // omitted from API requests. See
948 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
949 NullFields []string `json:"-"`
950 }
951
952 func (s Completeness) MarshalJSON() ([]byte, error) {
953 type NoMethod Completeness
954 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
955 }
956
957 // ComplianceOccurrence: An indication that the compliance checks in the
958 // associated ComplianceNote were not satisfied for particular resources or a
959 // specified reason.
960 type ComplianceOccurrence struct {
961 NonComplianceReason string `json:"nonComplianceReason,omitempty"`
962 NonCompliantFiles []*NonCompliantFile `json:"nonCompliantFiles,omitempty"`
963 // Version: The OS and config version the benchmark was run on.
964 Version *ComplianceVersion `json:"version,omitempty"`
965 // ForceSendFields is a list of field names (e.g. "NonComplianceReason") to
966 // unconditionally include in API requests. By default, fields with empty or
967 // default values are omitted from API requests. See
968 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
969 // details.
970 ForceSendFields []string `json:"-"`
971 // NullFields is a list of field names (e.g. "NonComplianceReason") to include
972 // in API requests with the JSON null value. By default, fields with empty
973 // values are omitted from API requests. See
974 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
975 NullFields []string `json:"-"`
976 }
977
978 func (s ComplianceOccurrence) MarshalJSON() ([]byte, error) {
979 type NoMethod ComplianceOccurrence
980 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
981 }
982
983 // ComplianceVersion: Describes the CIS benchmark version that is applicable to
984 // a given OS and os version.
985 type ComplianceVersion struct {
986 // BenchmarkDocument: The name of the document that defines this benchmark,
987 // e.g. "CIS Container-Optimized OS".
988 BenchmarkDocument string `json:"benchmarkDocument,omitempty"`
989 // CpeUri: The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
990 // applicable to.
991 CpeUri string `json:"cpeUri,omitempty"`
992 // Version: The version of the benchmark. This is set to the version of the
993 // OS-specific CIS document the benchmark is defined in.
994 Version string `json:"version,omitempty"`
995 // ForceSendFields is a list of field names (e.g. "BenchmarkDocument") to
996 // unconditionally include in API requests. By default, fields with empty or
997 // default values are omitted from API requests. See
998 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
999 // details.
1000 ForceSendFields []string `json:"-"`
1001 // NullFields is a list of field names (e.g. "BenchmarkDocument") to include in
1002 // API requests with the JSON null value. By default, fields with empty values
1003 // are omitted from API requests. See
1004 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1005 NullFields []string `json:"-"`
1006 }
1007
1008 func (s ComplianceVersion) MarshalJSON() ([]byte, error) {
1009 type NoMethod ComplianceVersion
1010 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1011 }
1012
1013 // DSSEAttestationOccurrence: Deprecated. Prefer to use a regular Occurrence,
1014 // and populate the Envelope at the top level of the Occurrence.
1015 type DSSEAttestationOccurrence struct {
1016 // Envelope: If doing something security critical, make sure to verify the
1017 // signatures in this metadata.
1018 Envelope *Envelope `json:"envelope,omitempty"`
1019 Statement *InTotoStatement `json:"statement,omitempty"`
1020 // ForceSendFields is a list of field names (e.g. "Envelope") to
1021 // unconditionally include in API requests. By default, fields with empty or
1022 // default values are omitted from API requests. See
1023 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1024 // details.
1025 ForceSendFields []string `json:"-"`
1026 // NullFields is a list of field names (e.g. "Envelope") to include in API
1027 // requests with the JSON null value. By default, fields with empty values are
1028 // omitted from API requests. See
1029 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1030 NullFields []string `json:"-"`
1031 }
1032
1033 func (s DSSEAttestationOccurrence) MarshalJSON() ([]byte, error) {
1034 type NoMethod DSSEAttestationOccurrence
1035 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1036 }
1037
1038 // DeploymentOccurrence: The period during which some deployable was active in
1039 // a runtime.
1040 type DeploymentOccurrence struct {
1041 // Address: Address of the runtime element hosting this deployment.
1042 Address string `json:"address,omitempty"`
1043 // Config: Configuration used to create this deployment.
1044 Config string `json:"config,omitempty"`
1045 // DeployTime: Required. Beginning of the lifetime of this deployment.
1046 DeployTime string `json:"deployTime,omitempty"`
1047 // Platform: Platform hosting this deployment.
1048 //
1049 // Possible values:
1050 // "PLATFORM_UNSPECIFIED" - Unknown.
1051 // "GKE" - Google Container Engine.
1052 // "FLEX" - Google App Engine: Flexible Environment.
1053 // "CUSTOM" - Custom user-defined platform.
1054 Platform string `json:"platform,omitempty"`
1055 // ResourceUri: Output only. Resource URI for the artifact being deployed taken
1056 // from the deployable field with the same name.
1057 ResourceUri []string `json:"resourceUri,omitempty"`
1058 // UndeployTime: End of the lifetime of this deployment.
1059 UndeployTime string `json:"undeployTime,omitempty"`
1060 // UserEmail: Identity of the user that triggered this deployment.
1061 UserEmail string `json:"userEmail,omitempty"`
1062 // ForceSendFields is a list of field names (e.g. "Address") to unconditionally
1063 // include in API requests. By default, fields with empty or default values are
1064 // omitted from API requests. See
1065 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1066 // details.
1067 ForceSendFields []string `json:"-"`
1068 // NullFields is a list of field names (e.g. "Address") to include in API
1069 // requests with the JSON null value. By default, fields with empty values are
1070 // omitted from API requests. See
1071 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1072 NullFields []string `json:"-"`
1073 }
1074
1075 func (s DeploymentOccurrence) MarshalJSON() ([]byte, error) {
1076 type NoMethod DeploymentOccurrence
1077 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1078 }
1079
1080 // DiscoveryOccurrence: Provides information about the analysis status of a
1081 // discovered resource.
1082 type DiscoveryOccurrence struct {
1083 AnalysisCompleted *AnalysisCompleted `json:"analysisCompleted,omitempty"`
1084 // AnalysisError: Indicates any errors encountered during analysis of a
1085 // resource. There could be 0 or more of these errors.
1086 AnalysisError []*Status `json:"analysisError,omitempty"`
1087 // AnalysisStatus: The status of discovery for the resource.
1088 //
1089 // Possible values:
1090 // "ANALYSIS_STATUS_UNSPECIFIED" - Unknown.
1091 // "PENDING" - Resource is known but no action has been taken yet.
1092 // "SCANNING" - Resource is being analyzed.
1093 // "FINISHED_SUCCESS" - Analysis has finished successfully.
1094 // "COMPLETE" - Analysis has completed.
1095 // "FINISHED_FAILED" - Analysis has finished unsuccessfully, the analysis
1096 // itself is in a bad state.
1097 // "FINISHED_UNSUPPORTED" - The resource is known not to be supported.
1098 AnalysisStatus string `json:"analysisStatus,omitempty"`
1099 // AnalysisStatusError: When an error is encountered this will contain a
1100 // LocalizedMessage under details to show to the user. The LocalizedMessage is
1101 // output only and populated by the API.
1102 AnalysisStatusError *Status `json:"analysisStatusError,omitempty"`
1103 // ArchiveTime: Output only. The time occurrences related to this discovery
1104 // occurrence were archived.
1105 ArchiveTime string `json:"archiveTime,omitempty"`
1106 // ContinuousAnalysis: Whether the resource is continuously analyzed.
1107 //
1108 // Possible values:
1109 // "CONTINUOUS_ANALYSIS_UNSPECIFIED" - Unknown.
1110 // "ACTIVE" - The resource is continuously analyzed.
1111 // "INACTIVE" - The resource is ignored for continuous analysis.
1112 ContinuousAnalysis string `json:"continuousAnalysis,omitempty"`
1113 // Cpe: The CPE of the resource being scanned.
1114 Cpe string `json:"cpe,omitempty"`
1115 // Files: Files that make up the resource described by the occurrence.
1116 Files []*File `json:"files,omitempty"`
1117 // LastScanTime: The last time this resource was scanned.
1118 LastScanTime string `json:"lastScanTime,omitempty"`
1119 // LastVulnerabilityUpdateTime: The last time vulnerability scan results
1120 // changed.
1121 LastVulnerabilityUpdateTime string `json:"lastVulnerabilityUpdateTime,omitempty"`
1122 // SbomStatus: The status of an SBOM generation.
1123 SbomStatus *SBOMStatus `json:"sbomStatus,omitempty"`
1124 // ForceSendFields is a list of field names (e.g. "AnalysisCompleted") to
1125 // unconditionally include in API requests. By default, fields with empty or
1126 // default values are omitted from API requests. See
1127 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1128 // details.
1129 ForceSendFields []string `json:"-"`
1130 // NullFields is a list of field names (e.g. "AnalysisCompleted") to include in
1131 // API requests with the JSON null value. By default, fields with empty values
1132 // are omitted from API requests. See
1133 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1134 NullFields []string `json:"-"`
1135 }
1136
1137 func (s DiscoveryOccurrence) MarshalJSON() ([]byte, error) {
1138 type NoMethod DiscoveryOccurrence
1139 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1140 }
1141
1142 // Empty: A generic empty message that you can re-use to avoid defining
1143 // duplicated empty messages in your APIs. A typical example is to use it as
1144 // the request or the response type of an API method. For instance: service Foo
1145 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
1146 type Empty struct {
1147 // ServerResponse contains the HTTP response code and headers from the server.
1148 googleapi.ServerResponse `json:"-"`
1149 }
1150
1151 // Envelope: MUST match
1152 // https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An
1153 // authenticated message of arbitrary type.
1154 type Envelope struct {
1155 Payload string `json:"payload,omitempty"`
1156 PayloadType string `json:"payloadType,omitempty"`
1157 Signatures []*EnvelopeSignature `json:"signatures,omitempty"`
1158 // ForceSendFields is a list of field names (e.g. "Payload") to unconditionally
1159 // include in API requests. By default, fields with empty or default values are
1160 // omitted from API requests. See
1161 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1162 // details.
1163 ForceSendFields []string `json:"-"`
1164 // NullFields is a list of field names (e.g. "Payload") to include in API
1165 // requests with the JSON null value. By default, fields with empty values are
1166 // omitted from API requests. See
1167 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1168 NullFields []string `json:"-"`
1169 }
1170
1171 func (s Envelope) MarshalJSON() ([]byte, error) {
1172 type NoMethod Envelope
1173 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1174 }
1175
1176 type EnvelopeSignature struct {
1177 Keyid string `json:"keyid,omitempty"`
1178 Sig string `json:"sig,omitempty"`
1179 // ForceSendFields is a list of field names (e.g. "Keyid") to unconditionally
1180 // include in API requests. By default, fields with empty or default values are
1181 // omitted from API requests. See
1182 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1183 // details.
1184 ForceSendFields []string `json:"-"`
1185 // NullFields is a list of field names (e.g. "Keyid") to include in API
1186 // requests with the JSON null value. By default, fields with empty values are
1187 // omitted from API requests. See
1188 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1189 NullFields []string `json:"-"`
1190 }
1191
1192 func (s EnvelopeSignature) MarshalJSON() ([]byte, error) {
1193 type NoMethod EnvelopeSignature
1194 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1195 }
1196
1197 type ExploitPredictionScoringSystem struct {
1198 // Percentile: The percentile of the current score, the proportion of all
1199 // scored vulnerabilities with the same or a lower EPSS score
1200 Percentile float64 `json:"percentile,omitempty"`
1201 // Score: The EPSS score representing the probability [0-1] of exploitation in
1202 // the wild in the next 30 days
1203 Score float64 `json:"score,omitempty"`
1204 // ForceSendFields is a list of field names (e.g. "Percentile") to
1205 // unconditionally include in API requests. By default, fields with empty or
1206 // default values are omitted from API requests. See
1207 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1208 // details.
1209 ForceSendFields []string `json:"-"`
1210 // NullFields is a list of field names (e.g. "Percentile") to include in API
1211 // requests with the JSON null value. By default, fields with empty values are
1212 // omitted from API requests. See
1213 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1214 NullFields []string `json:"-"`
1215 }
1216
1217 func (s ExploitPredictionScoringSystem) MarshalJSON() ([]byte, error) {
1218 type NoMethod ExploitPredictionScoringSystem
1219 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1220 }
1221
1222 func (s *ExploitPredictionScoringSystem) UnmarshalJSON(data []byte) error {
1223 type NoMethod ExploitPredictionScoringSystem
1224 var s1 struct {
1225 Percentile gensupport.JSONFloat64 `json:"percentile"`
1226 Score gensupport.JSONFloat64 `json:"score"`
1227 *NoMethod
1228 }
1229 s1.NoMethod = (*NoMethod)(s)
1230 if err := json.Unmarshal(data, &s1); err != nil {
1231 return err
1232 }
1233 s.Percentile = float64(s1.Percentile)
1234 s.Score = float64(s1.Score)
1235 return nil
1236 }
1237
1238 type File struct {
1239 Digest map[string]string `json:"digest,omitempty"`
1240 Name string `json:"name,omitempty"`
1241 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally
1242 // include in API requests. By default, fields with empty or default values are
1243 // omitted from API requests. See
1244 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1245 // details.
1246 ForceSendFields []string `json:"-"`
1247 // NullFields is a list of field names (e.g. "Digest") to include in API
1248 // requests with the JSON null value. By default, fields with empty values are
1249 // omitted from API requests. See
1250 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1251 NullFields []string `json:"-"`
1252 }
1253
1254 func (s File) MarshalJSON() ([]byte, error) {
1255 type NoMethod File
1256 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1257 }
1258
1259 // FileHashes: Container message for hashes of byte content of files, used in
1260 // source messages to verify integrity of source input to the build.
1261 type FileHashes struct {
1262 // FileHash: Required. Collection of file hashes.
1263 FileHash []*Hash `json:"fileHash,omitempty"`
1264 // ForceSendFields is a list of field names (e.g. "FileHash") to
1265 // unconditionally include in API requests. By default, fields with empty or
1266 // default values are omitted from API requests. See
1267 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1268 // details.
1269 ForceSendFields []string `json:"-"`
1270 // NullFields is a list of field names (e.g. "FileHash") to include in API
1271 // requests with the JSON null value. By default, fields with empty values are
1272 // omitted from API requests. See
1273 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1274 NullFields []string `json:"-"`
1275 }
1276
1277 func (s FileHashes) MarshalJSON() ([]byte, error) {
1278 type NoMethod FileHashes
1279 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1280 }
1281
1282 // FileLocation: Indicates the location at which a package was found.
1283 type FileLocation struct {
1284 // FilePath: For jars that are contained inside .war files, this filepath can
1285 // indicate the path to war file combined with the path to jar file.
1286 FilePath string `json:"filePath,omitempty"`
1287 LayerDetails *LayerDetails `json:"layerDetails,omitempty"`
1288 // ForceSendFields is a list of field names (e.g. "FilePath") to
1289 // unconditionally include in API requests. By default, fields with empty or
1290 // default values are omitted from API requests. See
1291 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1292 // details.
1293 ForceSendFields []string `json:"-"`
1294 // NullFields is a list of field names (e.g. "FilePath") to include in API
1295 // requests with the JSON null value. By default, fields with empty values are
1296 // omitted from API requests. See
1297 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1298 NullFields []string `json:"-"`
1299 }
1300
1301 func (s FileLocation) MarshalJSON() ([]byte, error) {
1302 type NoMethod FileLocation
1303 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1304 }
1305
1306 // Finding: Finding provides details for a single finding within an
1307 // AISkillAnalysisOccurrence.
1308 type Finding struct {
1309 // Category: Category of the finding.
1310 Category string `json:"category,omitempty"`
1311 // Description: Detailed description of the finding.
1312 Description string `json:"description,omitempty"`
1313 // FilePath: Path to the file where the finding was detected.
1314 FilePath string `json:"filePath,omitempty"`
1315 // RuleId: Unique identifier of the rule that produced this finding.
1316 RuleId string `json:"ruleId,omitempty"`
1317 // Severity: Severity of the finding.
1318 Severity string `json:"severity,omitempty"`
1319 // Snippet: Code snippet relevant to the finding.
1320 Snippet string `json:"snippet,omitempty"`
1321 // Title: Title of the finding.
1322 Title string `json:"title,omitempty"`
1323 // ForceSendFields is a list of field names (e.g. "Category") to
1324 // unconditionally include in API requests. By default, fields with empty or
1325 // default values are omitted from API requests. See
1326 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1327 // details.
1328 ForceSendFields []string `json:"-"`
1329 // NullFields is a list of field names (e.g. "Category") to include in API
1330 // requests with the JSON null value. By default, fields with empty values are
1331 // omitted from API requests. See
1332 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1333 NullFields []string `json:"-"`
1334 }
1335
1336 func (s Finding) MarshalJSON() ([]byte, error) {
1337 type NoMethod Finding
1338 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1339 }
1340
1341 // Fingerprint: A set of properties that uniquely identify a given Docker
1342 // image.
1343 type Fingerprint struct {
1344 // V1Name: Required. The layer ID of the final layer in the Docker image's v1
1345 // representation.
1346 V1Name string `json:"v1Name,omitempty"`
1347 // V2Blob: Required. The ordered list of v2 blobs that represent a given image.
1348 V2Blob []string `json:"v2Blob,omitempty"`
1349 // V2Name: Output only. The name of the image's v2 blobs computed via: [bottom]
1350 // := v2_blobbottom := sha256(v2_blob[N] + " " + v2_name[N+1]) Only the name of
1351 // the final blob is kept.
1352 V2Name string `json:"v2Name,omitempty"`
1353 // ForceSendFields is a list of field names (e.g. "V1Name") to unconditionally
1354 // include in API requests. By default, fields with empty or default values are
1355 // omitted from API requests. See
1356 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1357 // details.
1358 ForceSendFields []string `json:"-"`
1359 // NullFields is a list of field names (e.g. "V1Name") to include in API
1360 // requests with the JSON null value. By default, fields with empty values are
1361 // omitted from API requests. See
1362 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1363 NullFields []string `json:"-"`
1364 }
1365
1366 func (s Fingerprint) MarshalJSON() ([]byte, error) {
1367 type NoMethod Fingerprint
1368 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1369 }
1370
1371 // GerritSourceContext: A SourceContext referring to a Gerrit project.
1372 type GerritSourceContext struct {
1373 // AliasContext: An alias, which may be a branch or tag.
1374 AliasContext *AliasContext `json:"aliasContext,omitempty"`
1375 // GerritProject: The full project name within the host. Projects may be
1376 // nested, so "project/subproject" is a valid project name. The "repo name" is
1377 // the hostURI/project.
1378 GerritProject string `json:"gerritProject,omitempty"`
1379 // HostUri: The URI of a running Gerrit instance.
1380 HostUri string `json:"hostUri,omitempty"`
1381 // RevisionId: A revision (commit) ID.
1382 RevisionId string `json:"revisionId,omitempty"`
1383 // ForceSendFields is a list of field names (e.g. "AliasContext") to
1384 // unconditionally include in API requests. By default, fields with empty or
1385 // default values are omitted from API requests. See
1386 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1387 // details.
1388 ForceSendFields []string `json:"-"`
1389 // NullFields is a list of field names (e.g. "AliasContext") to include in API
1390 // requests with the JSON null value. By default, fields with empty values are
1391 // omitted from API requests. See
1392 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1393 NullFields []string `json:"-"`
1394 }
1395
1396 func (s GerritSourceContext) MarshalJSON() ([]byte, error) {
1397 type NoMethod GerritSourceContext
1398 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1399 }
1400
1401 // GitSourceContext: A GitSourceContext denotes a particular revision in a
1402 // third party Git repository (e.g., GitHub).
1403 type GitSourceContext struct {
1404 // RevisionId: Git commit hash.
1405 RevisionId string `json:"revisionId,omitempty"`
1406 // Url: Git repository URL.
1407 Url string `json:"url,omitempty"`
1408 // ForceSendFields is a list of field names (e.g. "RevisionId") to
1409 // unconditionally include in API requests. By default, fields with empty or
1410 // default values are omitted from API requests. See
1411 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1412 // details.
1413 ForceSendFields []string `json:"-"`
1414 // NullFields is a list of field names (e.g. "RevisionId") to include in API
1415 // requests with the JSON null value. By default, fields with empty values are
1416 // omitted from API requests. See
1417 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1418 NullFields []string `json:"-"`
1419 }
1420
1421 func (s GitSourceContext) MarshalJSON() ([]byte, error) {
1422 type NoMethod GitSourceContext
1423 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1424 }
1425
1426 // GrafeasV1BaseImage: BaseImage describes a base image of a container image.
1427 type GrafeasV1BaseImage struct {
1428 // LayerCount: The number of layers that the base image is composed of.
1429 LayerCount int64 `json:"layerCount,omitempty"`
1430 // Name: The name of the base image.
1431 Name string `json:"name,omitempty"`
1432 // Registry: The registry in which the base image is from.
1433 Registry string `json:"registry,omitempty"`
1434 // Repository: The repository name in which the base image is from.
1435 Repository string `json:"repository,omitempty"`
1436 // ForceSendFields is a list of field names (e.g. "LayerCount") to
1437 // unconditionally include in API requests. By default, fields with empty or
1438 // default values are omitted from API requests. See
1439 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1440 // details.
1441 ForceSendFields []string `json:"-"`
1442 // NullFields is a list of field names (e.g. "LayerCount") to include in API
1443 // requests with the JSON null value. By default, fields with empty values are
1444 // omitted from API requests. See
1445 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1446 NullFields []string `json:"-"`
1447 }
1448
1449 func (s GrafeasV1BaseImage) MarshalJSON() ([]byte, error) {
1450 type NoMethod GrafeasV1BaseImage
1451 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1452 }
1453
1454 // GrafeasV1FileLocation: Indicates the location at which a package was found.
1455 type GrafeasV1FileLocation struct {
1456 // FilePath: For jars that are contained inside .war files, this filepath can
1457 // indicate the path to war file combined with the path to jar file.
1458 FilePath string `json:"filePath,omitempty"`
1459 // LayerDetails: Each package found in a file should have its own layer
1460 // metadata (that is, information from the origin layer of the package).
1461 LayerDetails *GrafeasV1LayerDetails `json:"layerDetails,omitempty"`
1462 // LineNumber: Line number in the file where the package was found. Optional
1463 // field that only applies to source repository scanning.
1464 LineNumber int64 `json:"lineNumber,omitempty"`
1465 // ForceSendFields is a list of field names (e.g. "FilePath") to
1466 // unconditionally include in API requests. By default, fields with empty or
1467 // default values are omitted from API requests. See
1468 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1469 // details.
1470 ForceSendFields []string `json:"-"`
1471 // NullFields is a list of field names (e.g. "FilePath") to include in API
1472 // requests with the JSON null value. By default, fields with empty values are
1473 // omitted from API requests. See
1474 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1475 NullFields []string `json:"-"`
1476 }
1477
1478 func (s GrafeasV1FileLocation) MarshalJSON() ([]byte, error) {
1479 type NoMethod GrafeasV1FileLocation
1480 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1481 }
1482
1483 // GrafeasV1LayerDetails: Details about the layer a package was found in.
1484 type GrafeasV1LayerDetails struct {
1485 // BaseImages: The base images the layer is found within.
1486 BaseImages []*GrafeasV1BaseImage `json:"baseImages,omitempty"`
1487 // ChainId: The layer chain ID (sha256 hash) of the layer in the container
1488 // image.
1489 // https://github.com/opencontainers/image-spec/blob/main/config.md#layer-chainid
1490 ChainId string `json:"chainId,omitempty"`
1491 // Command: The layer build command that was used to build the layer. This may
1492 // not be found in all layers depending on how the container image is built.
1493 Command string `json:"command,omitempty"`
1494 // DiffId: The diff ID (typically a sha256 hash) of the layer in the container
1495 // image.
1496 DiffId string `json:"diffId,omitempty"`
1497 // Index: The index of the layer in the container image.
1498 Index int64 `json:"index,omitempty"`
1499 // ForceSendFields is a list of field names (e.g. "BaseImages") to
1500 // unconditionally include in API requests. By default, fields with empty or
1501 // default values are omitted from API requests. See
1502 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1503 // details.
1504 ForceSendFields []string `json:"-"`
1505 // NullFields is a list of field names (e.g. "BaseImages") to include in API
1506 // requests with the JSON null value. By default, fields with empty values are
1507 // omitted from API requests. See
1508 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1509 NullFields []string `json:"-"`
1510 }
1511
1512 func (s GrafeasV1LayerDetails) MarshalJSON() ([]byte, error) {
1513 type NoMethod GrafeasV1LayerDetails
1514 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1515 }
1516
1517 // GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder: Identifies the entity that
1518 // executed the recipe, which is trusted to have correctly performed the
1519 // operation and populated this provenance.
1520 type GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder struct {
1521 Id string `json:"id,omitempty"`
1522 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally
1523 // include in API requests. By default, fields with empty or default values are
1524 // omitted from API requests. See
1525 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1526 // details.
1527 ForceSendFields []string `json:"-"`
1528 // NullFields is a list of field names (e.g. "Id") to include in API requests
1529 // with the JSON null value. By default, fields with empty values are omitted
1530 // from API requests. See
1531 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1532 NullFields []string `json:"-"`
1533 }
1534
1535 func (s GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder) MarshalJSON() ([]byte, error) {
1536 type NoMethod GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder
1537 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1538 }
1539
1540 // GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness: Indicates that the builder
1541 // claims certain fields in this message to be complete.
1542 type GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness struct {
1543 Environment bool `json:"environment,omitempty"`
1544 Materials bool `json:"materials,omitempty"`
1545 Parameters bool `json:"parameters,omitempty"`
1546 // ForceSendFields is a list of field names (e.g. "Environment") to
1547 // unconditionally include in API requests. By default, fields with empty or
1548 // default values are omitted from API requests. See
1549 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1550 // details.
1551 ForceSendFields []string `json:"-"`
1552 // NullFields is a list of field names (e.g. "Environment") to include in API
1553 // requests with the JSON null value. By default, fields with empty values are
1554 // omitted from API requests. See
1555 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1556 NullFields []string `json:"-"`
1557 }
1558
1559 func (s GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness) MarshalJSON() ([]byte, error) {
1560 type NoMethod GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness
1561 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1562 }
1563
1564 // GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource: Describes where the config
1565 // file that kicked off the build came from. This is effectively a pointer to
1566 // the source where buildConfig came from.
1567 type GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource struct {
1568 Digest map[string]string `json:"digest,omitempty"`
1569 EntryPoint string `json:"entryPoint,omitempty"`
1570 Uri string `json:"uri,omitempty"`
1571 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally
1572 // include in API requests. By default, fields with empty or default values are
1573 // omitted from API requests. See
1574 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1575 // details.
1576 ForceSendFields []string `json:"-"`
1577 // NullFields is a list of field names (e.g. "Digest") to include in API
1578 // requests with the JSON null value. By default, fields with empty values are
1579 // omitted from API requests. See
1580 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1581 NullFields []string `json:"-"`
1582 }
1583
1584 func (s GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource) MarshalJSON() ([]byte, error) {
1585 type NoMethod GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource
1586 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1587 }
1588
1589 // GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation: Identifies the event that
1590 // kicked off the build.
1591 type GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation struct {
1592 ConfigSource *GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource `json:"configSource,omitempty"`
1593 Environment googleapi.RawMessage `json:"environment,omitempty"`
1594 Parameters googleapi.RawMessage `json:"parameters,omitempty"`
1595 // ForceSendFields is a list of field names (e.g. "ConfigSource") to
1596 // unconditionally include in API requests. By default, fields with empty or
1597 // default values are omitted from API requests. See
1598 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1599 // details.
1600 ForceSendFields []string `json:"-"`
1601 // NullFields is a list of field names (e.g. "ConfigSource") to include in API
1602 // requests with the JSON null value. By default, fields with empty values are
1603 // omitted from API requests. See
1604 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1605 NullFields []string `json:"-"`
1606 }
1607
1608 func (s GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation) MarshalJSON() ([]byte, error) {
1609 type NoMethod GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation
1610 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1611 }
1612
1613 // GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial: The collection of artifacts that
1614 // influenced the build including sources, dependencies, build tools, base
1615 // images, and so on.
1616 type GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial struct {
1617 Digest map[string]string `json:"digest,omitempty"`
1618 Uri string `json:"uri,omitempty"`
1619 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally
1620 // include in API requests. By default, fields with empty or default values are
1621 // omitted from API requests. See
1622 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1623 // details.
1624 ForceSendFields []string `json:"-"`
1625 // NullFields is a list of field names (e.g. "Digest") to include in API
1626 // requests with the JSON null value. By default, fields with empty values are
1627 // omitted from API requests. See
1628 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1629 NullFields []string `json:"-"`
1630 }
1631
1632 func (s GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial) MarshalJSON() ([]byte, error) {
1633 type NoMethod GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial
1634 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1635 }
1636
1637 // GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata: Other properties of the build.
1638 type GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata struct {
1639 BuildFinishedOn string `json:"buildFinishedOn,omitempty"`
1640 BuildInvocationId string `json:"buildInvocationId,omitempty"`
1641 BuildStartedOn string `json:"buildStartedOn,omitempty"`
1642 Completeness *GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness `json:"completeness,omitempty"`
1643 Reproducible bool `json:"reproducible,omitempty"`
1644 // ForceSendFields is a list of field names (e.g. "BuildFinishedOn") to
1645 // unconditionally include in API requests. By default, fields with empty or
1646 // default values are omitted from API requests. See
1647 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1648 // details.
1649 ForceSendFields []string `json:"-"`
1650 // NullFields is a list of field names (e.g. "BuildFinishedOn") to include in
1651 // API requests with the JSON null value. By default, fields with empty values
1652 // are omitted from API requests. See
1653 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1654 NullFields []string `json:"-"`
1655 }
1656
1657 func (s GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata) MarshalJSON() ([]byte, error) {
1658 type NoMethod GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata
1659 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1660 }
1661
1662 // Hash: Container message for hash values.
1663 type Hash struct {
1664 // Type: Required. The type of hash that was performed, e.g. "SHA-256".
1665 Type string `json:"type,omitempty"`
1666 // Value: Required. The hash value.
1667 Value string `json:"value,omitempty"`
1668 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally
1669 // include in API requests. By default, fields with empty or default values are
1670 // omitted from API requests. See
1671 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1672 // details.
1673 ForceSendFields []string `json:"-"`
1674 // NullFields is a list of field names (e.g. "Type") to include in API requests
1675 // with the JSON null value. By default, fields with empty values are omitted
1676 // from API requests. See
1677 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1678 NullFields []string `json:"-"`
1679 }
1680
1681 func (s Hash) MarshalJSON() ([]byte, error) {
1682 type NoMethod Hash
1683 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1684 }
1685
1686 // Identity: The unique identifier of the update.
1687 type Identity struct {
1688 // Revision: The revision number of the update.
1689 Revision int64 `json:"revision,omitempty"`
1690 // UpdateId: The revision independent identifier of the update.
1691 UpdateId string `json:"updateId,omitempty"`
1692 // ForceSendFields is a list of field names (e.g. "Revision") to
1693 // unconditionally include in API requests. By default, fields with empty or
1694 // default values are omitted from API requests. See
1695 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1696 // details.
1697 ForceSendFields []string `json:"-"`
1698 // NullFields is a list of field names (e.g. "Revision") to include in API
1699 // requests with the JSON null value. By default, fields with empty values are
1700 // omitted from API requests. See
1701 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1702 NullFields []string `json:"-"`
1703 }
1704
1705 func (s Identity) MarshalJSON() ([]byte, error) {
1706 type NoMethod Identity
1707 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1708 }
1709
1710 // ImageOccurrence: Details of the derived image portion of the DockerImage
1711 // relationship. This image would be produced from a Dockerfile with FROM .
1712 type ImageOccurrence struct {
1713 // BaseResourceUrl: Output only. This contains the base image URL for the
1714 // derived image occurrence.
1715 BaseResourceUrl string `json:"baseResourceUrl,omitempty"`
1716 // Distance: Output only. The number of layers by which this image differs from
1717 // the associated image basis.
1718 Distance int64 `json:"distance,omitempty"`
1719 // Fingerprint: Required. The fingerprint of the derived image.
1720 Fingerprint *Fingerprint `json:"fingerprint,omitempty"`
1721 // LayerInfo: This contains layer-specific metadata, if populated it has length
1722 // "distance" and is ordered with [distance] being the layer immediately
1723 // following the base image and [1] being the final layer.
1724 LayerInfo []*Layer `json:"layerInfo,omitempty"`
1725 // ForceSendFields is a list of field names (e.g. "BaseResourceUrl") to
1726 // unconditionally include in API requests. By default, fields with empty or
1727 // default values are omitted from API requests. See
1728 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1729 // details.
1730 ForceSendFields []string `json:"-"`
1731 // NullFields is a list of field names (e.g. "BaseResourceUrl") to include in
1732 // API requests with the JSON null value. By default, fields with empty values
1733 // are omitted from API requests. See
1734 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1735 NullFields []string `json:"-"`
1736 }
1737
1738 func (s ImageOccurrence) MarshalJSON() ([]byte, error) {
1739 type NoMethod ImageOccurrence
1740 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1741 }
1742
1743 type InTotoProvenance struct {
1744 // BuilderConfig: required
1745 BuilderConfig *BuilderConfig `json:"builderConfig,omitempty"`
1746 // Materials: The collection of artifacts that influenced the build including
1747 // sources, dependencies, build tools, base images, and so on. This is
1748 // considered to be incomplete unless metadata.completeness.materials is true.
1749 // Unset or null is equivalent to empty.
1750 Materials []string `json:"materials,omitempty"`
1751 Metadata *Metadata `json:"metadata,omitempty"`
1752 // Recipe: Identifies the configuration used for the build. When combined with
1753 // materials, this SHOULD fully describe the build, such that re-running this
1754 // recipe results in bit-for-bit identical output (if the build is
1755 // reproducible). required
1756 Recipe *Recipe `json:"recipe,omitempty"`
1757 // ForceSendFields is a list of field names (e.g. "BuilderConfig") to
1758 // unconditionally include in API requests. By default, fields with empty or
1759 // default values are omitted from API requests. See
1760 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1761 // details.
1762 ForceSendFields []string `json:"-"`
1763 // NullFields is a list of field names (e.g. "BuilderConfig") to include in API
1764 // requests with the JSON null value. By default, fields with empty values are
1765 // omitted from API requests. See
1766 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1767 NullFields []string `json:"-"`
1768 }
1769
1770 func (s InTotoProvenance) MarshalJSON() ([]byte, error) {
1771 type NoMethod InTotoProvenance
1772 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1773 }
1774
1775 type InTotoSlsaProvenanceV1 struct {
1776 // Type: InToto spec defined at
1777 // https://github.com/in-toto/attestation/tree/main/spec#statement
1778 Type string `json:"_type,omitempty"`
1779 Predicate *SlsaProvenanceV1 `json:"predicate,omitempty"`
1780 PredicateType string `json:"predicateType,omitempty"`
1781 Subject []*Subject `json:"subject,omitempty"`
1782 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally
1783 // include in API requests. By default, fields with empty or default values are
1784 // omitted from API requests. See
1785 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1786 // details.
1787 ForceSendFields []string `json:"-"`
1788 // NullFields is a list of field names (e.g. "Type") to include in API requests
1789 // with the JSON null value. By default, fields with empty values are omitted
1790 // from API requests. See
1791 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1792 NullFields []string `json:"-"`
1793 }
1794
1795 func (s InTotoSlsaProvenanceV1) MarshalJSON() ([]byte, error) {
1796 type NoMethod InTotoSlsaProvenanceV1
1797 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1798 }
1799
1800 // InTotoStatement: Spec defined at
1801 // https://github.com/in-toto/attestation/tree/main/spec#statement The
1802 // serialized InTotoStatement will be stored as Envelope.payload.
1803 // Envelope.payloadType is always "application/vnd.in-toto+json".
1804 type InTotoStatement struct {
1805 // Type: Always `https://in-toto.io/Statement/v0.1`.
1806 Type string `json:"_type,omitempty"`
1807 // PredicateType: `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
1808 PredicateType string `json:"predicateType,omitempty"`
1809 Provenance *InTotoProvenance `json:"provenance,omitempty"`
1810 SlsaProvenance *SlsaProvenance `json:"slsaProvenance,omitempty"`
1811 SlsaProvenanceZeroTwo *SlsaProvenanceZeroTwo `json:"slsaProvenanceZeroTwo,omitempty"`
1812 Subject []*Subject `json:"subject,omitempty"`
1813 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally
1814 // include in API requests. By default, fields with empty or default values are
1815 // omitted from API requests. See
1816 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1817 // details.
1818 ForceSendFields []string `json:"-"`
1819 // NullFields is a list of field names (e.g. "Type") to include in API requests
1820 // with the JSON null value. By default, fields with empty values are omitted
1821 // from API requests. See
1822 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1823 NullFields []string `json:"-"`
1824 }
1825
1826 func (s InTotoStatement) MarshalJSON() ([]byte, error) {
1827 type NoMethod InTotoStatement
1828 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1829 }
1830
1831 // Justification: Justification provides the justification when the state of
1832 // the assessment if NOT_AFFECTED.
1833 type Justification struct {
1834 // Details: Additional details on why this justification was chosen.
1835 Details string `json:"details,omitempty"`
1836 // JustificationType: The justification type for this vulnerability.
1837 //
1838 // Possible values:
1839 // "JUSTIFICATION_TYPE_UNSPECIFIED" - JUSTIFICATION_TYPE_UNSPECIFIED.
1840 // "COMPONENT_NOT_PRESENT" - The vulnerable component is not present in the
1841 // product.
1842 // "VULNERABLE_CODE_NOT_PRESENT" - The vulnerable code is not present.
1843 // Typically this case occurs when source code is configured or built in a way
1844 // that excludes the vulnerable code.
1845 // "VULNERABLE_CODE_NOT_IN_EXECUTE_PATH" - The vulnerable code can not be
1846 // executed. Typically this case occurs when the product includes the
1847 // vulnerable code but does not call or use the vulnerable code.
1848 // "VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY" - The vulnerable code
1849 // cannot be controlled by an attacker to exploit the vulnerability.
1850 // "INLINE_MITIGATIONS_ALREADY_EXIST" - The product includes built-in
1851 // protections or features that prevent exploitation of the vulnerability.
1852 // These built-in protections cannot be subverted by the attacker and cannot be
1853 // configured or disabled by the user. These mitigations completely prevent
1854 // exploitation based on known attack vectors.
1855 JustificationType string `json:"justificationType,omitempty"`
1856 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
1857 // include in API requests. By default, fields with empty or default values are
1858 // omitted from API requests. See
1859 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1860 // details.
1861 ForceSendFields []string `json:"-"`
1862 // NullFields is a list of field names (e.g. "Details") to include in API
1863 // requests with the JSON null value. By default, fields with empty values are
1864 // omitted from API requests. See
1865 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1866 NullFields []string `json:"-"`
1867 }
1868
1869 func (s Justification) MarshalJSON() ([]byte, error) {
1870 type NoMethod Justification
1871 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1872 }
1873
1874 type Jwt struct {
1875 // CompactJwt: The compact encoding of a JWS, which is always three base64
1876 // encoded strings joined by periods. For details, see:
1877 // https://tools.ietf.org/html/rfc7515.html#section-3.1
1878 CompactJwt string `json:"compactJwt,omitempty"`
1879 // ForceSendFields is a list of field names (e.g. "CompactJwt") to
1880 // unconditionally include in API requests. By default, fields with empty or
1881 // default values are omitted from API requests. See
1882 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1883 // details.
1884 ForceSendFields []string `json:"-"`
1885 // NullFields is a list of field names (e.g. "CompactJwt") to include in API
1886 // requests with the JSON null value. By default, fields with empty values are
1887 // omitted from API requests. See
1888 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1889 NullFields []string `json:"-"`
1890 }
1891
1892 func (s Jwt) MarshalJSON() ([]byte, error) {
1893 type NoMethod Jwt
1894 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1895 }
1896
1897 // LanguagePackageDependency: Indicates a language package available between
1898 // this package and the customer's resource artifact.
1899 type LanguagePackageDependency struct {
1900 Package string `json:"package,omitempty"`
1901 Version string `json:"version,omitempty"`
1902 // ForceSendFields is a list of field names (e.g. "Package") to unconditionally
1903 // include in API requests. By default, fields with empty or default values are
1904 // omitted from API requests. See
1905 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1906 // details.
1907 ForceSendFields []string `json:"-"`
1908 // NullFields is a list of field names (e.g. "Package") to include in API
1909 // requests with the JSON null value. By default, fields with empty values are
1910 // omitted from API requests. See
1911 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1912 NullFields []string `json:"-"`
1913 }
1914
1915 func (s LanguagePackageDependency) MarshalJSON() ([]byte, error) {
1916 type NoMethod LanguagePackageDependency
1917 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1918 }
1919
1920 // Layer: Layer holds metadata specific to a layer of a Docker image.
1921 type Layer struct {
1922 // Arguments: The recovered arguments to the Dockerfile directive.
1923 Arguments string `json:"arguments,omitempty"`
1924 // Directive: Required. The recovered Dockerfile directive used to construct
1925 // this layer. See https://docs.docker.com/engine/reference/builder/ for more
1926 // information.
1927 Directive string `json:"directive,omitempty"`
1928 // ForceSendFields is a list of field names (e.g. "Arguments") to
1929 // unconditionally include in API requests. By default, fields with empty or
1930 // default values are omitted from API requests. See
1931 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1932 // details.
1933 ForceSendFields []string `json:"-"`
1934 // NullFields is a list of field names (e.g. "Arguments") to include in API
1935 // requests with the JSON null value. By default, fields with empty values are
1936 // omitted from API requests. See
1937 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1938 NullFields []string `json:"-"`
1939 }
1940
1941 func (s Layer) MarshalJSON() ([]byte, error) {
1942 type NoMethod Layer
1943 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1944 }
1945
1946 // LayerDetails: Details about the layer a package was found in.
1947 type LayerDetails struct {
1948 // BaseImages: The base images the layer is found within.
1949 BaseImages []*BaseImage `json:"baseImages,omitempty"`
1950 // ChainId: The layer chain ID (sha256 hash) of the layer in the container
1951 // image.
1952 // https://github.com/opencontainers/image-spec/blob/main/config.md#layer-chainid
1953 ChainId string `json:"chainId,omitempty"`
1954 // Command: The layer build command that was used to build the layer. This may
1955 // not be found in all layers depending on how the container image is built.
1956 Command string `json:"command,omitempty"`
1957 // DiffId: The diff ID (sha256 hash) of the layer in the container image.
1958 DiffId string `json:"diffId,omitempty"`
1959 // Index: The index of the layer in the container image.
1960 Index int64 `json:"index,omitempty"`
1961 // ForceSendFields is a list of field names (e.g. "BaseImages") to
1962 // unconditionally include in API requests. By default, fields with empty or
1963 // default values are omitted from API requests. See
1964 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1965 // details.
1966 ForceSendFields []string `json:"-"`
1967 // NullFields is a list of field names (e.g. "BaseImages") to include in API
1968 // requests with the JSON null value. By default, fields with empty values are
1969 // omitted from API requests. See
1970 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1971 NullFields []string `json:"-"`
1972 }
1973
1974 func (s LayerDetails) MarshalJSON() ([]byte, error) {
1975 type NoMethod LayerDetails
1976 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1977 }
1978
1979 // License: License information.
1980 type License struct {
1981 // Comments: Comments
1982 Comments string `json:"comments,omitempty"`
1983 // Expression: Often a single license can be used to represent the licensing
1984 // terms. Sometimes it is necessary to include a choice of one or more licenses
1985 // or some combination of license identifiers. Examples: "LGPL-2.1-only OR
1986 // MIT", "LGPL-2.1-only AND MIT", "GPL-2.0-or-later WITH Bison-exception-2.2".
1987 Expression string `json:"expression,omitempty"`
1988 // ForceSendFields is a list of field names (e.g. "Comments") to
1989 // unconditionally include in API requests. By default, fields with empty or
1990 // default values are omitted from API requests. See
1991 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1992 // details.
1993 ForceSendFields []string `json:"-"`
1994 // NullFields is a list of field names (e.g. "Comments") to include in API
1995 // requests with the JSON null value. By default, fields with empty values are
1996 // omitted from API requests. See
1997 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1998 NullFields []string `json:"-"`
1999 }
2000
2001 func (s License) MarshalJSON() ([]byte, error) {
2002 type NoMethod License
2003 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2004 }
2005
2006 // ListOperationsResponse: The response message for Operations.ListOperations.
2007 type ListOperationsResponse struct {
2008 // NextPageToken: The standard List next-page token.
2009 NextPageToken string `json:"nextPageToken,omitempty"`
2010 // Operations: A list of operations that matches the specified filter in the
2011 // request.
2012 Operations []*Operation `json:"operations,omitempty"`
2013 // Unreachable: Unordered list. Unreachable resources. Populated when the
2014 // request sets `ListOperationsRequest.return_partial_success` and reads across
2015 // collections. For example, when attempting to list all resources across all
2016 // supported locations.
2017 Unreachable []string `json:"unreachable,omitempty"`
2018
2019 // ServerResponse contains the HTTP response code and headers from the server.
2020 googleapi.ServerResponse `json:"-"`
2021 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
2022 // unconditionally include in API requests. By default, fields with empty or
2023 // default values are omitted from API requests. See
2024 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2025 // details.
2026 ForceSendFields []string `json:"-"`
2027 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
2028 // requests with the JSON null value. By default, fields with empty values are
2029 // omitted from API requests. See
2030 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2031 NullFields []string `json:"-"`
2032 }
2033
2034 func (s ListOperationsResponse) MarshalJSON() ([]byte, error) {
2035 type NoMethod ListOperationsResponse
2036 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2037 }
2038
2039 // ListVulnerabilitiesResponse: ListVulnerabilitiesResponse contains a single
2040 // page of vulnerabilities resulting from a scan.
2041 type ListVulnerabilitiesResponse struct {
2042 // NextPageToken: A page token that can be used in a subsequent call to
2043 // ListVulnerabilities to continue retrieving results.
2044 NextPageToken string `json:"nextPageToken,omitempty"`
2045 // Occurrences: The list of Vulnerability Occurrences resulting from a scan.
2046 Occurrences []*Occurrence `json:"occurrences,omitempty"`
2047
2048 // ServerResponse contains the HTTP response code and headers from the server.
2049 googleapi.ServerResponse `json:"-"`
2050 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
2051 // unconditionally include in API requests. By default, fields with empty or
2052 // default values are omitted from API requests. See
2053 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2054 // details.
2055 ForceSendFields []string `json:"-"`
2056 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
2057 // requests with the JSON null value. By default, fields with empty values are
2058 // omitted from API requests. See
2059 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2060 NullFields []string `json:"-"`
2061 }
2062
2063 func (s ListVulnerabilitiesResponse) MarshalJSON() ([]byte, error) {
2064 type NoMethod ListVulnerabilitiesResponse
2065 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2066 }
2067
2068 // Location: An occurrence of a particular package installation found within a
2069 // system's filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.
2070 type Location struct {
2071 // CpeUri: Deprecated. The CPE URI in CPE format
2072 // (https://cpe.mitre.org/specification/)
2073 CpeUri string `json:"cpeUri,omitempty"`
2074 // Path: The path from which we gathered that this package/version is
2075 // installed.
2076 Path string `json:"path,omitempty"`
2077 // Version: Deprecated. The version installed at this location.
2078 Version *Version `json:"version,omitempty"`
2079 // ForceSendFields is a list of field names (e.g. "CpeUri") to unconditionally
2080 // include in API requests. By default, fields with empty or default values are
2081 // omitted from API requests. See
2082 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2083 // details.
2084 ForceSendFields []string `json:"-"`
2085 // NullFields is a list of field names (e.g. "CpeUri") to include in API
2086 // requests with the JSON null value. By default, fields with empty values are
2087 // omitted from API requests. See
2088 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2089 NullFields []string `json:"-"`
2090 }
2091
2092 func (s Location) MarshalJSON() ([]byte, error) {
2093 type NoMethod Location
2094 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2095 }
2096
2097 type Maintainer struct {
2098 Email string `json:"email,omitempty"`
2099 Kind string `json:"kind,omitempty"`
2100 Name string `json:"name,omitempty"`
2101 Url string `json:"url,omitempty"`
2102 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally
2103 // include in API requests. By default, fields with empty or default values are
2104 // omitted from API requests. See
2105 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2106 // details.
2107 ForceSendFields []string `json:"-"`
2108 // NullFields is a list of field names (e.g. "Email") to include in API
2109 // requests with the JSON null value. By default, fields with empty values are
2110 // omitted from API requests. See
2111 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2112 NullFields []string `json:"-"`
2113 }
2114
2115 func (s Maintainer) MarshalJSON() ([]byte, error) {
2116 type NoMethod Maintainer
2117 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2118 }
2119
2120 type Material struct {
2121 Digest map[string]string `json:"digest,omitempty"`
2122 Uri string `json:"uri,omitempty"`
2123 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally
2124 // include in API requests. By default, fields with empty or default values are
2125 // omitted from API requests. See
2126 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2127 // details.
2128 ForceSendFields []string `json:"-"`
2129 // NullFields is a list of field names (e.g. "Digest") to include in API
2130 // requests with the JSON null value. By default, fields with empty values are
2131 // omitted from API requests. See
2132 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2133 NullFields []string `json:"-"`
2134 }
2135
2136 func (s Material) MarshalJSON() ([]byte, error) {
2137 type NoMethod Material
2138 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2139 }
2140
2141 // Metadata: Other properties of the build.
2142 type Metadata struct {
2143 // BuildFinishedOn: The timestamp of when the build completed.
2144 BuildFinishedOn string `json:"buildFinishedOn,omitempty"`
2145 // BuildInvocationId: Identifies the particular build invocation, which can be
2146 // useful for finding associated logs or other ad-hoc analysis. The value
2147 // SHOULD be globally unique, per in-toto Provenance spec.
2148 BuildInvocationId string `json:"buildInvocationId,omitempty"`
2149 // BuildStartedOn: The timestamp of when the build started.
2150 BuildStartedOn string `json:"buildStartedOn,omitempty"`
2151 // Completeness: Indicates that the builder claims certain fields in this
2152 // message to be complete.
2153 Completeness *Completeness `json:"completeness,omitempty"`
2154 // Reproducible: If true, the builder claims that running the recipe on
2155 // materials will produce bit-for-bit identical output.
2156 Reproducible bool `json:"reproducible,omitempty"`
2157 // ForceSendFields is a list of field names (e.g. "BuildFinishedOn") to
2158 // unconditionally include in API requests. By default, fields with empty or
2159 // default values are omitted from API requests. See
2160 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2161 // details.
2162 ForceSendFields []string `json:"-"`
2163 // NullFields is a list of field names (e.g. "BuildFinishedOn") to include in
2164 // API requests with the JSON null value. By default, fields with empty values
2165 // are omitted from API requests. See
2166 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2167 NullFields []string `json:"-"`
2168 }
2169
2170 func (s Metadata) MarshalJSON() ([]byte, error) {
2171 type NoMethod Metadata
2172 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2173 }
2174
2175 // NonCompliantFile: Details about files that caused a compliance check to
2176 // fail. display_command is a single command that can be used to display a list
2177 // of non compliant files. When there is no such command, we can also iterate a
2178 // list of non compliant file using 'path'.
2179 type NonCompliantFile struct {
2180 // DisplayCommand: Command to display the non-compliant files.
2181 DisplayCommand string `json:"displayCommand,omitempty"`
2182 // Path: Empty if `display_command` is set.
2183 Path string `json:"path,omitempty"`
2184 // Reason: Explains why a file is non compliant for a CIS check.
2185 Reason string `json:"reason,omitempty"`
2186 // ForceSendFields is a list of field names (e.g. "DisplayCommand") to
2187 // unconditionally include in API requests. By default, fields with empty or
2188 // default values are omitted from API requests. See
2189 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2190 // details.
2191 ForceSendFields []string `json:"-"`
2192 // NullFields is a list of field names (e.g. "DisplayCommand") to include in
2193 // API requests with the JSON null value. By default, fields with empty values
2194 // are omitted from API requests. See
2195 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2196 NullFields []string `json:"-"`
2197 }
2198
2199 func (s NonCompliantFile) MarshalJSON() ([]byte, error) {
2200 type NoMethod NonCompliantFile
2201 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2202 }
2203
2204 // Occurrence: An instance of an analysis type that has been found on a
2205 // resource.
2206 type Occurrence struct {
2207 // AdvisoryPublishTime: The time this advisory was published by the source.
2208 AdvisoryPublishTime string `json:"advisoryPublishTime,omitempty"`
2209 // AiSkillAnalysis: Describes an AI skill analysis.
2210 AiSkillAnalysis *AISkillAnalysisOccurrence `json:"aiSkillAnalysis,omitempty"`
2211 // Attestation: Describes an attestation of an artifact.
2212 Attestation *AttestationOccurrence `json:"attestation,omitempty"`
2213 // Build: Describes a verifiable build.
2214 Build *BuildOccurrence `json:"build,omitempty"`
2215 // Compliance: Describes a compliance violation on a linked resource.
2216 Compliance *ComplianceOccurrence `json:"compliance,omitempty"`
2217 // CreateTime: Output only. The time this occurrence was created.
2218 CreateTime string `json:"createTime,omitempty"`
2219 // Deployment: Describes the deployment of an artifact on a runtime.
2220 Deployment *DeploymentOccurrence `json:"deployment,omitempty"`
2221 // Discovery: Describes when a resource was discovered.
2222 Discovery *DiscoveryOccurrence `json:"discovery,omitempty"`
2223 // DsseAttestation: Describes an attestation of an artifact using dsse.
2224 DsseAttestation *DSSEAttestationOccurrence `json:"dsseAttestation,omitempty"`
2225 // Envelope: https://github.com/secure-systems-lab/dsse
2226 Envelope *Envelope `json:"envelope,omitempty"`
2227 // Image: Describes how this resource derives from the basis in the associated
2228 // note.
2229 Image *ImageOccurrence `json:"image,omitempty"`
2230 // Kind: Output only. This explicitly denotes which of the occurrence details
2231 // are specified. This field can be used as a filter in list requests.
2232 //
2233 // Possible values:
2234 // "NOTE_KIND_UNSPECIFIED" - Default value. This value is unused.
2235 // "VULNERABILITY" - The note and occurrence represent a package
2236 // vulnerability.
2237 // "BUILD" - The note and occurrence assert build provenance.
2238 // "IMAGE" - This represents an image basis relationship.
2239 // "PACKAGE" - This represents a package installed via a package manager.
2240 // "DEPLOYMENT" - The note and occurrence track deployment events.
2241 // "DISCOVERY" - The note and occurrence track the initial discovery status
2242 // of a resource.
2243 // "ATTESTATION" - This represents a logical "role" that can attest to
2244 // artifacts.
2245 // "UPGRADE" - This represents an available package upgrade.
2246 // "COMPLIANCE" - This represents a Compliance Note
2247 // "DSSE_ATTESTATION" - This represents a DSSE attestation Note
2248 // "VULNERABILITY_ASSESSMENT" - This represents a Vulnerability Assessment.
2249 // "SBOM_REFERENCE" - This represents an SBOM Reference.
2250 // "SECRET" - This represents a secret.
2251 // "AI_SKILL_ANALYSIS" - This represents an AI skill analysis.
2252 Kind string `json:"kind,omitempty"`
2253 // Name: Output only. The name of the occurrence in the form of
2254 // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
2255 Name string `json:"name,omitempty"`
2256 // NoteName: Required. Immutable. The analysis note associated with this
2257 // occurrence, in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This
2258 // field can be used as a filter in list requests.
2259 NoteName string `json:"noteName,omitempty"`
2260 // Package: Describes the installation of a package on the linked resource.
2261 Package *PackageOccurrence `json:"package,omitempty"`
2262 // Remediation: A description of actions that can be taken to remedy the note.
2263 Remediation string `json:"remediation,omitempty"`
2264 // ResourceUri: Required. Immutable. A URI that represents the resource for
2265 // which the occurrence applies. For example,
2266 // `https://gcr.io/project/image@sha256:123abc` for a Docker image.
2267 ResourceUri string `json:"resourceUri,omitempty"`
2268 // SbomReference: Describes a specific SBOM reference occurrences.
2269 SbomReference *SBOMReferenceOccurrence `json:"sbomReference,omitempty"`
2270 // Secret: Describes a secret.
2271 Secret *SecretOccurrence `json:"secret,omitempty"`
2272 // UpdateTime: Output only. The time this occurrence was last updated.
2273 UpdateTime string `json:"updateTime,omitempty"`
2274 // Upgrade: Describes an available package upgrade on the linked resource.
2275 Upgrade *UpgradeOccurrence `json:"upgrade,omitempty"`
2276 // Vulnerability: Describes a security vulnerability.
2277 Vulnerability *VulnerabilityOccurrence `json:"vulnerability,omitempty"`
2278 // ForceSendFields is a list of field names (e.g. "AdvisoryPublishTime") to
2279 // unconditionally include in API requests. By default, fields with empty or
2280 // default values are omitted from API requests. See
2281 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2282 // details.
2283 ForceSendFields []string `json:"-"`
2284 // NullFields is a list of field names (e.g. "AdvisoryPublishTime") to include
2285 // in API requests with the JSON null value. By default, fields with empty
2286 // values are omitted from API requests. See
2287 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2288 NullFields []string `json:"-"`
2289 }
2290
2291 func (s Occurrence) MarshalJSON() ([]byte, error) {
2292 type NoMethod Occurrence
2293 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2294 }
2295
2296 // Operation: This resource represents a long-running operation that is the
2297 // result of a network API call.
2298 type Operation struct {
2299 // Done: If the value is `false`, it means the operation is still in progress.
2300 // If `true`, the operation is completed, and either `error` or `response` is
2301 // available.
2302 Done bool `json:"done,omitempty"`
2303 // Error: The error result of the operation in case of failure or cancellation.
2304 Error *Status `json:"error,omitempty"`
2305 // Metadata: Service-specific metadata associated with the operation. It
2306 // typically contains progress information and common metadata such as create
2307 // time. Some services might not provide such metadata. Any method that returns
2308 // a long-running operation should document the metadata type, if any.
2309 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2310 // Name: The server-assigned name, which is only unique within the same service
2311 // that originally returns it. If you use the default HTTP mapping, the `name`
2312 // should be a resource name ending with `operations/{unique_id}`.
2313 Name string `json:"name,omitempty"`
2314 // Response: The normal, successful response of the operation. If the original
2315 // method returns no data on success, such as `Delete`, the response is
2316 // `google.protobuf.Empty`. If the original method is standard
2317 // `Get`/`Create`/`Update`, the response should be the resource. For other
2318 // methods, the response should have the type `XxxResponse`, where `Xxx` is the
2319 // original method name. For example, if the original method name is
2320 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
2321 Response googleapi.RawMessage `json:"response,omitempty"`
2322
2323 // ServerResponse contains the HTTP response code and headers from the server.
2324 googleapi.ServerResponse `json:"-"`
2325 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally
2326 // include in API requests. By default, fields with empty or default values are
2327 // omitted from API requests. See
2328 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2329 // details.
2330 ForceSendFields []string `json:"-"`
2331 // NullFields is a list of field names (e.g. "Done") to include in API requests
2332 // with the JSON null value. By default, fields with empty values are omitted
2333 // from API requests. See
2334 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2335 NullFields []string `json:"-"`
2336 }
2337
2338 func (s Operation) MarshalJSON() ([]byte, error) {
2339 type NoMethod Operation
2340 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2341 }
2342
2343 type PackageData struct {
2344 // Architecture: The architecture of the package.
2345 Architecture string `json:"architecture,omitempty"`
2346 // BinarySourceInfo: A bundle containing the binary and source information.
2347 BinarySourceInfo []*BinarySourceInfo `json:"binarySourceInfo,omitempty"`
2348 // BinaryVersion: DEPRECATED
2349 BinaryVersion *PackageVersion `json:"binaryVersion,omitempty"`
2350 // CpeUri: The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/)
2351 // in which the vulnerability may manifest. Examples include distro or storage
2352 // location for vulnerable jar.
2353 CpeUri string `json:"cpeUri,omitempty"`
2354 // DependencyChain: The dependency chain between this package and the user's
2355 // artifact. List in order from the customer's package under review first, to
2356 // the current package last. Inclusive of the original package and the current
2357 // package.
2358 DependencyChain []*LanguagePackageDependency `json:"dependencyChain,omitempty"`
2359 // FileLocation: The path to the jar file / go binary file.
2360 FileLocation []*FileLocation `json:"fileLocation,omitempty"`
2361 // HashDigest: HashDigest stores the SHA512 hash digest of the jar file if the
2362 // package is of type Maven. This field will be unset for non Maven packages.
2363 HashDigest string `json:"hashDigest,omitempty"`
2364 LayerDetails *LayerDetails `json:"layerDetails,omitempty"`
2365 // Licenses: The list of licenses found that are related to a given package.
2366 // Note that licenses may also be stored on the BinarySourceInfo. If there is
2367 // no BinarySourceInfo (because there's no concept of source vs binary), then
2368 // it will be stored here, while if there are BinarySourceInfos, it will be
2369 // stored there, as one source can have multiple binaries with different
2370 // licenses.
2371 Licenses []string `json:"licenses,omitempty"`
2372 // Maintainer: The maintainer of the package.
2373 Maintainer *Maintainer `json:"maintainer,omitempty"`
2374 // Os: The OS affected by a vulnerability Used to generate the cpe_uri for OS
2375 // packages
2376 Os string `json:"os,omitempty"`
2377 // OsVersion: The version of the OS Used to generate the cpe_uri for OS
2378 // packages
2379 OsVersion string `json:"osVersion,omitempty"`
2380 // Package: The package being analysed for vulnerabilities
2381 Package string `json:"package,omitempty"`
2382 // PackageType: The type of package: os, maven, go, etc.
2383 //
2384 // Possible values:
2385 // "PACKAGE_TYPE_UNSPECIFIED"
2386 // "OS" - Operating System
2387 // "MAVEN" - Java packages from Maven.
2388 // "GO" - Go third-party packages.
2389 // "GO_STDLIB" - Go toolchain + standard library packages.
2390 // "PYPI" - Python packages.
2391 // "NPM" - NPM packages.
2392 // "NUGET" - Nuget (C#/.NET) packages.
2393 // "RUBYGEMS" - Ruby packges (from RubyGems package manager).
2394 // "RUST" - Rust packages from Cargo (GitHub ecosystem is `RUST`).
2395 // "COMPOSER" - PHP packages from Composer package manager.
2396 // "SWIFT" - Swift packages from Swift Package Manager (SwiftPM).
2397 PackageType string `json:"packageType,omitempty"`
2398 // PatchedCve: CVEs that this package is no longer vulnerable to
2399 PatchedCve []string `json:"patchedCve,omitempty"`
2400 // SourceVersion: DEPRECATED
2401 SourceVersion *PackageVersion `json:"sourceVersion,omitempty"`
2402 Unused string `json:"unused,omitempty"`
2403 // Version: The version of the package being analysed
2404 Version string `json:"version,omitempty"`
2405 // ForceSendFields is a list of field names (e.g. "Architecture") to
2406 // unconditionally include in API requests. By default, fields with empty or
2407 // default values are omitted from API requests. See
2408 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2409 // details.
2410 ForceSendFields []string `json:"-"`
2411 // NullFields is a list of field names (e.g. "Architecture") to include in API
2412 // requests with the JSON null value. By default, fields with empty values are
2413 // omitted from API requests. See
2414 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2415 NullFields []string `json:"-"`
2416 }
2417
2418 func (s PackageData) MarshalJSON() ([]byte, error) {
2419 type NoMethod PackageData
2420 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2421 }
2422
2423 // PackageIssue: A detail for a distro and package this vulnerability
2424 // occurrence was found in and its associated fix (if one is available).
2425 type PackageIssue struct {
2426 // AffectedCpeUri: Required. The CPE URI (https://cpe.mitre.org/specification/)
2427 // this vulnerability was found in.
2428 AffectedCpeUri string `json:"affectedCpeUri,omitempty"`
2429 // AffectedPackage: Required. The package this vulnerability was found in.
2430 AffectedPackage string `json:"affectedPackage,omitempty"`
2431 // AffectedVersion: Required. The version of the package that is installed on
2432 // the resource affected by this vulnerability.
2433 AffectedVersion *Version `json:"affectedVersion,omitempty"`
2434 // EffectiveSeverity: Output only. The distro or language system assigned
2435 // severity for this vulnerability when that is available and note provider
2436 // assigned severity when it is not available.
2437 //
2438 // Possible values:
2439 // "SEVERITY_UNSPECIFIED" - Unknown.
2440 // "MINIMAL" - Minimal severity.
2441 // "LOW" - Low severity.
2442 // "MEDIUM" - Medium severity.
2443 // "HIGH" - High severity.
2444 // "CRITICAL" - Critical severity.
2445 EffectiveSeverity string `json:"effectiveSeverity,omitempty"`
2446 // FileLocation: The location at which this package was found.
2447 FileLocation []*GrafeasV1FileLocation `json:"fileLocation,omitempty"`
2448 // FixAvailable: Output only. Whether a fix is available for this package.
2449 FixAvailable bool `json:"fixAvailable,omitempty"`
2450 // FixedCpeUri: The CPE URI (https://cpe.mitre.org/specification/) this
2451 // vulnerability was fixed in. It is possible for this to be different from the
2452 // affected_cpe_uri.
2453 FixedCpeUri string `json:"fixedCpeUri,omitempty"`
2454 // FixedPackage: The package this vulnerability was fixed in. It is possible
2455 // for this to be different from the affected_package.
2456 FixedPackage string `json:"fixedPackage,omitempty"`
2457 // FixedVersion: Required. The version of the package this vulnerability was
2458 // fixed in. Setting this to VersionKind.MAXIMUM means no fix is yet available.
2459 FixedVersion *Version `json:"fixedVersion,omitempty"`
2460 // PackageType: The type of package (e.g. OS, MAVEN, GO).
2461 PackageType string `json:"packageType,omitempty"`
2462 // ForceSendFields is a list of field names (e.g. "AffectedCpeUri") to
2463 // unconditionally include in API requests. By default, fields with empty or
2464 // default values are omitted from API requests. See
2465 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2466 // details.
2467 ForceSendFields []string `json:"-"`
2468 // NullFields is a list of field names (e.g. "AffectedCpeUri") to include in
2469 // API requests with the JSON null value. By default, fields with empty values
2470 // are omitted from API requests. See
2471 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2472 NullFields []string `json:"-"`
2473 }
2474
2475 func (s PackageIssue) MarshalJSON() ([]byte, error) {
2476 type NoMethod PackageIssue
2477 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2478 }
2479
2480 // PackageOccurrence: Details on how a particular software package was
2481 // installed on a system.
2482 type PackageOccurrence struct {
2483 // Architecture: Output only. The CPU architecture for which packages in this
2484 // distribution channel were built. Architecture will be blank for language
2485 // packages.
2486 //
2487 // Possible values:
2488 // "ARCHITECTURE_UNSPECIFIED" - Unknown architecture.
2489 // "X86" - X86 architecture.
2490 // "X64" - X64 architecture.
2491 Architecture string `json:"architecture,omitempty"`
2492 // CpeUri: Output only. The cpe_uri in CPE format
2493 // (https://cpe.mitre.org/specification/) denoting the package manager version
2494 // distributing a package. The cpe_uri will be blank for language packages.
2495 CpeUri string `json:"cpeUri,omitempty"`
2496 // License: Licenses that have been declared by the authors of the package.
2497 License *License `json:"license,omitempty"`
2498 // Location: All of the places within the filesystem versions of this package
2499 // have been found.
2500 Location []*Location `json:"location,omitempty"`
2501 // Name: Required. Output only. The name of the installed package.
2502 Name string `json:"name,omitempty"`
2503 // PackageType: Output only. The type of package; whether native or non native
2504 // (e.g., ruby gems, node.js packages, etc.).
2505 PackageType string `json:"packageType,omitempty"`
2506 // Version: Output only. The version of the package.
2507 Version *Version `json:"version,omitempty"`
2508 // ForceSendFields is a list of field names (e.g. "Architecture") to
2509 // unconditionally include in API requests. By default, fields with empty or
2510 // default values are omitted from API requests. See
2511 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2512 // details.
2513 ForceSendFields []string `json:"-"`
2514 // NullFields is a list of field names (e.g. "Architecture") to include in API
2515 // requests with the JSON null value. By default, fields with empty values are
2516 // omitted from API requests. See
2517 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2518 NullFields []string `json:"-"`
2519 }
2520
2521 func (s PackageOccurrence) MarshalJSON() ([]byte, error) {
2522 type NoMethod PackageOccurrence
2523 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2524 }
2525
2526 type PackageVersion struct {
2527 // Licenses: The licenses associated with this package. Note that this has to
2528 // go on the PackageVersion level, because we can have cases with images with
2529 // the same source having different licences. E.g. in Alpine, musl and
2530 // musl-utils both have the same origin musl, but have different sets of
2531 // licenses.
2532 Licenses []string `json:"licenses,omitempty"`
2533 Name string `json:"name,omitempty"`
2534 Version string `json:"version,omitempty"`
2535 // ForceSendFields is a list of field names (e.g. "Licenses") to
2536 // unconditionally include in API requests. By default, fields with empty or
2537 // default values are omitted from API requests. See
2538 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2539 // details.
2540 ForceSendFields []string `json:"-"`
2541 // NullFields is a list of field names (e.g. "Licenses") to include in API
2542 // requests with the JSON null value. By default, fields with empty values are
2543 // omitted from API requests. See
2544 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2545 NullFields []string `json:"-"`
2546 }
2547
2548 func (s PackageVersion) MarshalJSON() ([]byte, error) {
2549 type NoMethod PackageVersion
2550 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2551 }
2552
2553 // ProjectRepoId: Selects a repo using a Google Cloud Platform project ID
2554 // (e.g., winged-cargo-31) and a repo name within that project.
2555 type ProjectRepoId struct {
2556 // ProjectId: The ID of the project.
2557 ProjectId string `json:"projectId,omitempty"`
2558 // RepoName: The name of the repo. Leave empty for the default repo.
2559 RepoName string `json:"repoName,omitempty"`
2560 // ForceSendFields is a list of field names (e.g. "ProjectId") to
2561 // unconditionally include in API requests. By default, fields with empty or
2562 // default values are omitted from API requests. See
2563 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2564 // details.
2565 ForceSendFields []string `json:"-"`
2566 // NullFields is a list of field names (e.g. "ProjectId") to include in API
2567 // requests with the JSON null value. By default, fields with empty values are
2568 // omitted from API requests. See
2569 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2570 NullFields []string `json:"-"`
2571 }
2572
2573 func (s ProjectRepoId) MarshalJSON() ([]byte, error) {
2574 type NoMethod ProjectRepoId
2575 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2576 }
2577
2578 type ProvenanceBuilder struct {
2579 BuilderDependencies []*ResourceDescriptor `json:"builderDependencies,omitempty"`
2580 Id string `json:"id,omitempty"`
2581 Version map[string]string `json:"version,omitempty"`
2582 // ForceSendFields is a list of field names (e.g. "BuilderDependencies") to
2583 // unconditionally include in API requests. By default, fields with empty or
2584 // default values are omitted from API requests. See
2585 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2586 // details.
2587 ForceSendFields []string `json:"-"`
2588 // NullFields is a list of field names (e.g. "BuilderDependencies") to include
2589 // in API requests with the JSON null value. By default, fields with empty
2590 // values are omitted from API requests. See
2591 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2592 NullFields []string `json:"-"`
2593 }
2594
2595 func (s ProvenanceBuilder) MarshalJSON() ([]byte, error) {
2596 type NoMethod ProvenanceBuilder
2597 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2598 }
2599
2600 // Recipe: Steps taken to build the artifact. For a TaskRun, typically each
2601 // container corresponds to one step in the recipe.
2602 type Recipe struct {
2603 // Arguments: Collection of all external inputs that influenced the build on
2604 // top of recipe.definedInMaterial and recipe.entryPoint. For example, if the
2605 // recipe type were "make", then this might be the flags passed to make aside
2606 // from the target, which is captured in recipe.entryPoint. Since the arguments
2607 // field can greatly vary in structure, depending on the builder and recipe
2608 // type, this is of form "Any".
2609 Arguments []googleapi.RawMessage `json:"arguments,omitempty"`
2610 // DefinedInMaterial: Index in materials containing the recipe steps that are
2611 // not implied by recipe.type. For example, if the recipe type were "make",
2612 // then this would point to the source containing the Makefile, not the make
2613 // program itself. Set to -1 if the recipe doesn't come from a material, as
2614 // zero is default unset value for int64.
2615 DefinedInMaterial int64 `json:"definedInMaterial,omitempty,string"`
2616 // EntryPoint: String identifying the entry point into the build. This is often
2617 // a path to a configuration file and/or a target label within that file. The
2618 // syntax and meaning are defined by recipe.type. For example, if the recipe
2619 // type were "make", then this would reference the directory in which to run
2620 // make as well as which target to use.
2621 EntryPoint string `json:"entryPoint,omitempty"`
2622 // Environment: Any other builder-controlled inputs necessary for correctly
2623 // evaluating the recipe. Usually only needed for reproducing the build but not
2624 // evaluated as part of policy. Since the environment field can greatly vary in
2625 // structure, depending on the builder and recipe type, this is of form "Any".
2626 Environment []googleapi.RawMessage `json:"environment,omitempty"`
2627 // Type: URI indicating what type of recipe was performed. It determines the
2628 // meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
2629 // materials.
2630 Type string `json:"type,omitempty"`
2631 // ForceSendFields is a list of field names (e.g. "Arguments") to
2632 // unconditionally include in API requests. By default, fields with empty or
2633 // default values are omitted from API requests. See
2634 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2635 // details.
2636 ForceSendFields []string `json:"-"`
2637 // NullFields is a list of field names (e.g. "Arguments") to include in API
2638 // requests with the JSON null value. By default, fields with empty values are
2639 // omitted from API requests. See
2640 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2641 NullFields []string `json:"-"`
2642 }
2643
2644 func (s Recipe) MarshalJSON() ([]byte, error) {
2645 type NoMethod Recipe
2646 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2647 }
2648
2649 // RelatedUrl: Metadata for any related URL information.
2650 type RelatedUrl struct {
2651 // Label: Label to describe usage of the URL.
2652 Label string `json:"label,omitempty"`
2653 // Url: Specific URL associated with the resource.
2654 Url string `json:"url,omitempty"`
2655 // ForceSendFields is a list of field names (e.g. "Label") to unconditionally
2656 // include in API requests. By default, fields with empty or default values are
2657 // omitted from API requests. See
2658 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2659 // details.
2660 ForceSendFields []string `json:"-"`
2661 // NullFields is a list of field names (e.g. "Label") to include in API
2662 // requests with the JSON null value. By default, fields with empty values are
2663 // omitted from API requests. See
2664 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2665 NullFields []string `json:"-"`
2666 }
2667
2668 func (s RelatedUrl) MarshalJSON() ([]byte, error) {
2669 type NoMethod RelatedUrl
2670 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2671 }
2672
2673 // Remediation: Specifies details on how to handle (and presumably, fix) a
2674 // vulnerability.
2675 type Remediation struct {
2676 // Details: Contains a comprehensive human-readable discussion of the
2677 // remediation.
2678 Details string `json:"details,omitempty"`
2679 // RemediationType: The type of remediation that can be applied.
2680 //
2681 // Possible values:
2682 // "REMEDIATION_TYPE_UNSPECIFIED" - No remediation type specified.
2683 // "MITIGATION" - A MITIGATION is available.
2684 // "NO_FIX_PLANNED" - No fix is planned.
2685 // "NONE_AVAILABLE" - Not available.
2686 // "VENDOR_FIX" - A vendor fix is available.
2687 // "WORKAROUND" - A workaround is available.
2688 RemediationType string `json:"remediationType,omitempty"`
2689 // RemediationUri: Contains the URL where to obtain the remediation.
2690 RemediationUri *RelatedUrl `json:"remediationUri,omitempty"`
2691 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
2692 // include in API requests. By default, fields with empty or default values are
2693 // omitted from API requests. See
2694 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2695 // details.
2696 ForceSendFields []string `json:"-"`
2697 // NullFields is a list of field names (e.g. "Details") to include in API
2698 // requests with the JSON null value. By default, fields with empty values are
2699 // omitted from API requests. See
2700 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2701 NullFields []string `json:"-"`
2702 }
2703
2704 func (s Remediation) MarshalJSON() ([]byte, error) {
2705 type NoMethod Remediation
2706 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2707 }
2708
2709 // RepoId: A unique identifier for a Cloud Repo.
2710 type RepoId struct {
2711 // ProjectRepoId: A combination of a project ID and a repo name.
2712 ProjectRepoId *ProjectRepoId `json:"projectRepoId,omitempty"`
2713 // Uid: A server-assigned, globally unique identifier.
2714 Uid string `json:"uid,omitempty"`
2715 // ForceSendFields is a list of field names (e.g. "ProjectRepoId") to
2716 // unconditionally include in API requests. By default, fields with empty or
2717 // default values are omitted from API requests. See
2718 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2719 // details.
2720 ForceSendFields []string `json:"-"`
2721 // NullFields is a list of field names (e.g. "ProjectRepoId") to include in API
2722 // requests with the JSON null value. By default, fields with empty values are
2723 // omitted from API requests. See
2724 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2725 NullFields []string `json:"-"`
2726 }
2727
2728 func (s RepoId) MarshalJSON() ([]byte, error) {
2729 type NoMethod RepoId
2730 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2731 }
2732
2733 type ResourceDescriptor struct {
2734 Annotations googleapi.RawMessage `json:"annotations,omitempty"`
2735 Content string `json:"content,omitempty"`
2736 Digest map[string]string `json:"digest,omitempty"`
2737 DownloadLocation string `json:"downloadLocation,omitempty"`
2738 MediaType string `json:"mediaType,omitempty"`
2739 Name string `json:"name,omitempty"`
2740 Uri string `json:"uri,omitempty"`
2741 // ForceSendFields is a list of field names (e.g. "Annotations") to
2742 // unconditionally include in API requests. By default, fields with empty or
2743 // default values are omitted from API requests. See
2744 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2745 // details.
2746 ForceSendFields []string `json:"-"`
2747 // NullFields is a list of field names (e.g. "Annotations") to include in API
2748 // requests with the JSON null value. By default, fields with empty values are
2749 // omitted from API requests. See
2750 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2751 NullFields []string `json:"-"`
2752 }
2753
2754 func (s ResourceDescriptor) MarshalJSON() ([]byte, error) {
2755 type NoMethod ResourceDescriptor
2756 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2757 }
2758
2759 type Risk struct {
2760 // CisaKev: CISA maintains the authoritative source of vulnerabilities that
2761 // have been exploited in the wild.
2762 CisaKev *CISAKnownExploitedVulnerabilities `json:"cisaKev,omitempty"`
2763 // Epss: The Exploit Prediction Scoring System (EPSS) estimates the likelihood
2764 // (probability) that a software vulnerability will be exploited in the wild.
2765 Epss *ExploitPredictionScoringSystem `json:"epss,omitempty"`
2766 // ForceSendFields is a list of field names (e.g. "CisaKev") to unconditionally
2767 // include in API requests. By default, fields with empty or default values are
2768 // omitted from API requests. See
2769 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2770 // details.
2771 ForceSendFields []string `json:"-"`
2772 // NullFields is a list of field names (e.g. "CisaKev") to include in API
2773 // requests with the JSON null value. By default, fields with empty values are
2774 // omitted from API requests. See
2775 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2776 NullFields []string `json:"-"`
2777 }
2778
2779 func (s Risk) MarshalJSON() ([]byte, error) {
2780 type NoMethod Risk
2781 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2782 }
2783
2784 type RunDetails struct {
2785 Builder *ProvenanceBuilder `json:"builder,omitempty"`
2786 Byproducts []*ResourceDescriptor `json:"byproducts,omitempty"`
2787 Metadata *BuildMetadata `json:"metadata,omitempty"`
2788 // ForceSendFields is a list of field names (e.g. "Builder") to unconditionally
2789 // include in API requests. By default, fields with empty or default values are
2790 // omitted from API requests. See
2791 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2792 // details.
2793 ForceSendFields []string `json:"-"`
2794 // NullFields is a list of field names (e.g. "Builder") to include in API
2795 // requests with the JSON null value. By default, fields with empty values are
2796 // omitted from API requests. See
2797 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2798 NullFields []string `json:"-"`
2799 }
2800
2801 func (s RunDetails) MarshalJSON() ([]byte, error) {
2802 type NoMethod RunDetails
2803 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2804 }
2805
2806 // SBOMReferenceOccurrence: The occurrence representing an SBOM reference as
2807 // applied to a specific resource. The occurrence follows the DSSE
2808 // specification. See
2809 // https://github.com/secure-systems-lab/dsse/blob/master/envelope.md for more
2810 // details.
2811 type SBOMReferenceOccurrence struct {
2812 // Payload: The actual payload that contains the SBOM reference data.
2813 Payload *SbomReferenceIntotoPayload `json:"payload,omitempty"`
2814 // PayloadType: The kind of payload that SbomReferenceIntotoPayload takes.
2815 // Since it's in the intoto format, this value is expected to be
2816 // 'application/vnd.in-toto+json'.
2817 PayloadType string `json:"payloadType,omitempty"`
2818 // Signatures: The signatures over the payload.
2819 Signatures []*EnvelopeSignature `json:"signatures,omitempty"`
2820 // ForceSendFields is a list of field names (e.g. "Payload") to unconditionally
2821 // include in API requests. By default, fields with empty or default values are
2822 // omitted from API requests. See
2823 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2824 // details.
2825 ForceSendFields []string `json:"-"`
2826 // NullFields is a list of field names (e.g. "Payload") to include in API
2827 // requests with the JSON null value. By default, fields with empty values are
2828 // omitted from API requests. See
2829 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2830 NullFields []string `json:"-"`
2831 }
2832
2833 func (s SBOMReferenceOccurrence) MarshalJSON() ([]byte, error) {
2834 type NoMethod SBOMReferenceOccurrence
2835 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2836 }
2837
2838 // SBOMStatus: The status of an SBOM generation.
2839 type SBOMStatus struct {
2840 // Error: If there was an error generating an SBOM, this will indicate what
2841 // that error was.
2842 Error string `json:"error,omitempty"`
2843 // SbomState: The progress of the SBOM generation.
2844 //
2845 // Possible values:
2846 // "SBOM_STATE_UNSPECIFIED" - Default unknown state.
2847 // "PENDING" - SBOM scanning is pending.
2848 // "COMPLETE" - SBOM scanning has completed.
2849 SbomState string `json:"sbomState,omitempty"`
2850 // ForceSendFields is a list of field names (e.g. "Error") to unconditionally
2851 // include in API requests. By default, fields with empty or default values are
2852 // omitted from API requests. See
2853 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2854 // details.
2855 ForceSendFields []string `json:"-"`
2856 // NullFields is a list of field names (e.g. "Error") to include in API
2857 // requests with the JSON null value. By default, fields with empty values are
2858 // omitted from API requests. See
2859 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2860 NullFields []string `json:"-"`
2861 }
2862
2863 func (s SBOMStatus) MarshalJSON() ([]byte, error) {
2864 type NoMethod SBOMStatus
2865 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2866 }
2867
2868 // SbomReferenceIntotoPayload: The actual payload that contains the SBOM
2869 // Reference data. The payload follows the intoto statement specification. See
2870 // https://github.com/in-toto/attestation/blob/main/spec/v1.0/statement.md for
2871 // more details.
2872 type SbomReferenceIntotoPayload struct {
2873 // Type: Identifier for the schema of the Statement.
2874 Type string `json:"_type,omitempty"`
2875 // Predicate: Additional parameters of the Predicate. Includes the actual data
2876 // about the SBOM.
2877 Predicate *SbomReferenceIntotoPredicate `json:"predicate,omitempty"`
2878 // PredicateType: URI identifying the type of the Predicate.
2879 PredicateType string `json:"predicateType,omitempty"`
2880 // Subject: Set of software artifacts that the attestation applies to. Each
2881 // element represents a single software artifact.
2882 Subject []*Subject `json:"subject,omitempty"`
2883 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally
2884 // include in API requests. By default, fields with empty or default values are
2885 // omitted from API requests. See
2886 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2887 // details.
2888 ForceSendFields []string `json:"-"`
2889 // NullFields is a list of field names (e.g. "Type") to include in API requests
2890 // with the JSON null value. By default, fields with empty values are omitted
2891 // from API requests. See
2892 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2893 NullFields []string `json:"-"`
2894 }
2895
2896 func (s SbomReferenceIntotoPayload) MarshalJSON() ([]byte, error) {
2897 type NoMethod SbomReferenceIntotoPayload
2898 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2899 }
2900
2901 // SbomReferenceIntotoPredicate: A predicate which describes the SBOM being
2902 // referenced.
2903 type SbomReferenceIntotoPredicate struct {
2904 // Digest: A map of algorithm to digest of the contents of the SBOM.
2905 Digest map[string]string `json:"digest,omitempty"`
2906 // Location: The location of the SBOM.
2907 Location string `json:"location,omitempty"`
2908 // MimeType: The mime type of the SBOM.
2909 MimeType string `json:"mimeType,omitempty"`
2910 // ReferrerId: The person or system referring this predicate to the consumer.
2911 ReferrerId string `json:"referrerId,omitempty"`
2912 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally
2913 // include in API requests. By default, fields with empty or default values are
2914 // omitted from API requests. See
2915 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2916 // details.
2917 ForceSendFields []string `json:"-"`
2918 // NullFields is a list of field names (e.g. "Digest") to include in API
2919 // requests with the JSON null value. By default, fields with empty values are
2920 // omitted from API requests. See
2921 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2922 NullFields []string `json:"-"`
2923 }
2924
2925 func (s SbomReferenceIntotoPredicate) MarshalJSON() ([]byte, error) {
2926 type NoMethod SbomReferenceIntotoPredicate
2927 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2928 }
2929
2930 // SecretLocation: The location of the secret.
2931 type SecretLocation struct {
2932 // FileLocation: The secret is found from a file.
2933 FileLocation *GrafeasV1FileLocation `json:"fileLocation,omitempty"`
2934 // ForceSendFields is a list of field names (e.g. "FileLocation") to
2935 // unconditionally include in API requests. By default, fields with empty or
2936 // default values are omitted from API requests. See
2937 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2938 // details.
2939 ForceSendFields []string `json:"-"`
2940 // NullFields is a list of field names (e.g. "FileLocation") to include in API
2941 // requests with the JSON null value. By default, fields with empty values are
2942 // omitted from API requests. See
2943 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2944 NullFields []string `json:"-"`
2945 }
2946
2947 func (s SecretLocation) MarshalJSON() ([]byte, error) {
2948 type NoMethod SecretLocation
2949 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2950 }
2951
2952 // SecretOccurrence: The occurrence provides details of a secret.
2953 type SecretOccurrence struct {
2954 // Kind: Required. Type of secret.
2955 //
2956 // Possible values:
2957 // "SECRET_KIND_UNSPECIFIED" - Unspecified
2958 // "SECRET_KIND_UNKNOWN" - The secret kind is unknown.
2959 // "SECRET_KIND_GCP_SERVICE_ACCOUNT_KEY" - A Google Cloud service account key
2960 // per:
2961 // https://cloud.google.com/iam/docs/creating-managing-service-account-keys
2962 // "SECRET_KIND_GCP_API_KEY" - A Google Cloud API key per:
2963 // https://cloud.google.com/docs/authentication/api-keys
2964 // "SECRET_KIND_GCP_OAUTH2_CLIENT_CREDENTIALS" - A Google Cloud OAuth2 client
2965 // credentials per: https://developers.google.com/identity/protocols/oauth2
2966 // "SECRET_KIND_GCP_OAUTH2_ACCESS_TOKEN" - A Google Cloud OAuth2 access token
2967 // per: https://cloud.google.com/docs/authentication/token-types#access
2968 // "SECRET_KIND_ANTHROPIC_ADMIN_API_KEY" - An Anthropic Admin API key.
2969 // "SECRET_KIND_ANTHROPIC_API_KEY" - An Anthropic API key.
2970 // "SECRET_KIND_AZURE_ACCESS_TOKEN" - An Azure access token.
2971 // "SECRET_KIND_AZURE_IDENTITY_TOKEN" - An Azure Identity Platform ID token.
2972 // "SECRET_KIND_DOCKER_HUB_PERSONAL_ACCESS_TOKEN" - A Docker Hub personal
2973 // access token.
2974 // "SECRET_KIND_GITHUB_APP_REFRESH_TOKEN" - A GitHub App refresh token.
2975 // "SECRET_KIND_GITHUB_APP_SERVER_TO_SERVER_TOKEN" - A GitHub App
2976 // server-to-server token.
2977 // "SECRET_KIND_GITHUB_APP_USER_TO_SERVER_TOKEN" - A GitHub App
2978 // user-to-server token.
2979 // "SECRET_KIND_GITHUB_CLASSIC_PERSONAL_ACCESS_TOKEN" - A GitHub personal
2980 // access token (classic).
2981 // "SECRET_KIND_GITHUB_FINE_GRAINED_PERSONAL_ACCESS_TOKEN" - A GitHub
2982 // fine-grained personal access token.
2983 // "SECRET_KIND_GITHUB_OAUTH_TOKEN" - A GitHub OAuth token.
2984 // "SECRET_KIND_HUGGINGFACE_API_KEY" - A Hugging Face API key.
2985 // "SECRET_KIND_OPENAI_API_KEY" - An OpenAI API key.
2986 // "SECRET_KIND_PERPLEXITY_API_KEY" - A Perplexity API key.
2987 // "SECRET_KIND_STRIPE_SECRET_KEY" - A Stripe secret key.
2988 // "SECRET_KIND_STRIPE_RESTRICTED_KEY" - A Stripe restricted key.
2989 // "SECRET_KIND_STRIPE_WEBHOOK_SECRET" - A Stripe webhook secret.
2990 Kind string `json:"kind,omitempty"`
2991 // Locations: Optional. Locations where the secret is detected.
2992 Locations []*SecretLocation `json:"locations,omitempty"`
2993 // Statuses: Optional. Status of the secret.
2994 Statuses []*SecretStatus `json:"statuses,omitempty"`
2995 // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
2996 // include in API requests. By default, fields with empty or default values are
2997 // omitted from API requests. See
2998 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2999 // details.
3000 ForceSendFields []string `json:"-"`
3001 // NullFields is a list of field names (e.g. "Kind") to include in API requests
3002 // with the JSON null value. By default, fields with empty values are omitted
3003 // from API requests. See
3004 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3005 NullFields []string `json:"-"`
3006 }
3007
3008 func (s SecretOccurrence) MarshalJSON() ([]byte, error) {
3009 type NoMethod SecretOccurrence
3010 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3011 }
3012
3013 // SecretStatus: The status of the secret with a timestamp.
3014 type SecretStatus struct {
3015 // Message: Optional. Optional message about the status code.
3016 Message string `json:"message,omitempty"`
3017 // Status: Optional. The status of the secret.
3018 //
3019 // Possible values:
3020 // "STATUS_UNSPECIFIED" - Unspecified
3021 // "UNKNOWN" - The status of the secret is unknown.
3022 // "VALID" - The secret is valid.
3023 // "INVALID" - The secret is invalid.
3024 Status string `json:"status,omitempty"`
3025 // UpdateTime: Optional. The time the secret status was last updated.
3026 UpdateTime string `json:"updateTime,omitempty"`
3027 // ForceSendFields is a list of field names (e.g. "Message") to unconditionally
3028 // include in API requests. By default, fields with empty or default values are
3029 // omitted from API requests. See
3030 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3031 // details.
3032 ForceSendFields []string `json:"-"`
3033 // NullFields is a list of field names (e.g. "Message") to include in API
3034 // requests with the JSON null value. By default, fields with empty values are
3035 // omitted from API requests. See
3036 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3037 NullFields []string `json:"-"`
3038 }
3039
3040 func (s SecretStatus) MarshalJSON() ([]byte, error) {
3041 type NoMethod SecretStatus
3042 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3043 }
3044
3045 // Signature: Verifiers (e.g. Kritis implementations) MUST verify signatures
3046 // with respect to the trust anchors defined in policy (e.g. a Kritis policy).
3047 // Typically this means that the verifier has been configured with a map from
3048 // `public_key_id` to public key material (and any required parameters, e.g.
3049 // signing algorithm). In particular, verification implementations MUST NOT
3050 // treat the signature `public_key_id` as anything more than a key lookup hint.
3051 // The `public_key_id` DOES NOT validate or authenticate a public key; it only
3052 // provides a mechanism for quickly selecting a public key ALREADY CONFIGURED
3053 // on the verifier through a trusted channel. Verification implementations MUST
3054 // reject signatures in any of the following circumstances: * The
3055 // `public_key_id` is not recognized by the verifier. * The public key that
3056 // `public_key_id` refers to does not verify the signature with respect to the
3057 // payload. The `signature` contents SHOULD NOT be "attached" (where the
3058 // payload is included with the serialized `signature` bytes). Verifiers MUST
3059 // ignore any "attached" payload and only verify signatures with respect to
3060 // explicitly provided payload (e.g. a `payload` field on the proto message
3061 // that holds this Signature, or the canonical serialization of the proto
3062 // message that holds this signature).
3063 type Signature struct {
3064 // PublicKeyId: The identifier for the public key that verifies this signature.
3065 // * The `public_key_id` is required. * The `public_key_id` SHOULD be an
3066 // RFC3986 conformant URI. * When possible, the `public_key_id` SHOULD be an
3067 // immutable reference, such as a cryptographic digest. Examples of valid
3068 // `public_key_id`s: OpenPGP V4 public key fingerprint: *
3069 // "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" See
3070 // https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
3071 // details on this scheme. RFC6920 digest-named SubjectPublicKeyInfo (digest of
3072 // the DER serialization): *
3073 // "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" *
3074 // "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a127158
3075 // 9a5"
3076 PublicKeyId string `json:"publicKeyId,omitempty"`
3077 // Signature: The content of the signature, an opaque bytestring. The payload
3078 // that this signature verifies MUST be unambiguously provided with the
3079 // Signature during verification. A wrapper message might provide the payload
3080 // explicitly. Alternatively, a message might have a canonical serialization
3081 // that can always be unambiguously computed to derive the payload.
3082 Signature string `json:"signature,omitempty"`
3083 // ForceSendFields is a list of field names (e.g. "PublicKeyId") to
3084 // unconditionally include in API requests. By default, fields with empty or
3085 // default values are omitted from API requests. See
3086 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3087 // details.
3088 ForceSendFields []string `json:"-"`
3089 // NullFields is a list of field names (e.g. "PublicKeyId") to include in API
3090 // requests with the JSON null value. By default, fields with empty values are
3091 // omitted from API requests. See
3092 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3093 NullFields []string `json:"-"`
3094 }
3095
3096 func (s Signature) MarshalJSON() ([]byte, error) {
3097 type NoMethod Signature
3098 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3099 }
3100
3101 type SlsaBuilder struct {
3102 Id string `json:"id,omitempty"`
3103 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally
3104 // include in API requests. By default, fields with empty or default values are
3105 // omitted from API requests. See
3106 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3107 // details.
3108 ForceSendFields []string `json:"-"`
3109 // NullFields is a list of field names (e.g. "Id") to include in API requests
3110 // with the JSON null value. By default, fields with empty values are omitted
3111 // from API requests. See
3112 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3113 NullFields []string `json:"-"`
3114 }
3115
3116 func (s SlsaBuilder) MarshalJSON() ([]byte, error) {
3117 type NoMethod SlsaBuilder
3118 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3119 }
3120
3121 // SlsaCompleteness: Indicates that the builder claims certain fields in this
3122 // message to be complete.
3123 type SlsaCompleteness struct {
3124 // Arguments: If true, the builder claims that recipe.arguments is complete,
3125 // meaning that all external inputs are properly captured in the recipe.
3126 Arguments bool `json:"arguments,omitempty"`
3127 // Environment: If true, the builder claims that recipe.environment is claimed
3128 // to be complete.
3129 Environment bool `json:"environment,omitempty"`
3130 // Materials: If true, the builder claims that materials are complete, usually
3131 // through some controls to prevent network access. Sometimes called
3132 // "hermetic".
3133 Materials bool `json:"materials,omitempty"`
3134 // ForceSendFields is a list of field names (e.g. "Arguments") to
3135 // unconditionally include in API requests. By default, fields with empty or
3136 // default values are omitted from API requests. See
3137 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3138 // details.
3139 ForceSendFields []string `json:"-"`
3140 // NullFields is a list of field names (e.g. "Arguments") to include in API
3141 // requests with the JSON null value. By default, fields with empty values are
3142 // omitted from API requests. See
3143 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3144 NullFields []string `json:"-"`
3145 }
3146
3147 func (s SlsaCompleteness) MarshalJSON() ([]byte, error) {
3148 type NoMethod SlsaCompleteness
3149 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3150 }
3151
3152 // SlsaMetadata: Other properties of the build.
3153 type SlsaMetadata struct {
3154 // BuildFinishedOn: The timestamp of when the build completed.
3155 BuildFinishedOn string `json:"buildFinishedOn,omitempty"`
3156 // BuildInvocationId: Identifies the particular build invocation, which can be
3157 // useful for finding associated logs or other ad-hoc analysis. The value
3158 // SHOULD be globally unique, per in-toto Provenance spec.
3159 BuildInvocationId string `json:"buildInvocationId,omitempty"`
3160 // BuildStartedOn: The timestamp of when the build started.
3161 BuildStartedOn string `json:"buildStartedOn,omitempty"`
3162 // Completeness: Indicates that the builder claims certain fields in this
3163 // message to be complete.
3164 Completeness *SlsaCompleteness `json:"completeness,omitempty"`
3165 // Reproducible: If true, the builder claims that running the recipe on
3166 // materials will produce bit-for-bit identical output.
3167 Reproducible bool `json:"reproducible,omitempty"`
3168 // ForceSendFields is a list of field names (e.g. "BuildFinishedOn") to
3169 // unconditionally include in API requests. By default, fields with empty or
3170 // default values are omitted from API requests. See
3171 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3172 // details.
3173 ForceSendFields []string `json:"-"`
3174 // NullFields is a list of field names (e.g. "BuildFinishedOn") to include in
3175 // API requests with the JSON null value. By default, fields with empty values
3176 // are omitted from API requests. See
3177 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3178 NullFields []string `json:"-"`
3179 }
3180
3181 func (s SlsaMetadata) MarshalJSON() ([]byte, error) {
3182 type NoMethod SlsaMetadata
3183 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3184 }
3185
3186 type SlsaProvenance struct {
3187 // Builder: required
3188 Builder *SlsaBuilder `json:"builder,omitempty"`
3189 // Materials: The collection of artifacts that influenced the build including
3190 // sources, dependencies, build tools, base images, and so on. This is
3191 // considered to be incomplete unless metadata.completeness.materials is true.
3192 // Unset or null is equivalent to empty.
3193 Materials []*Material `json:"materials,omitempty"`
3194 Metadata *SlsaMetadata `json:"metadata,omitempty"`
3195 // Recipe: Identifies the configuration used for the build. When combined with
3196 // materials, this SHOULD fully describe the build, such that re-running this
3197 // recipe results in bit-for-bit identical output (if the build is
3198 // reproducible). required
3199 Recipe *SlsaRecipe `json:"recipe,omitempty"`
3200 // ForceSendFields is a list of field names (e.g. "Builder") to unconditionally
3201 // include in API requests. By default, fields with empty or default values are
3202 // omitted from API requests. See
3203 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3204 // details.
3205 ForceSendFields []string `json:"-"`
3206 // NullFields is a list of field names (e.g. "Builder") to include in API
3207 // requests with the JSON null value. By default, fields with empty values are
3208 // omitted from API requests. See
3209 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3210 NullFields []string `json:"-"`
3211 }
3212
3213 func (s SlsaProvenance) MarshalJSON() ([]byte, error) {
3214 type NoMethod SlsaProvenance
3215 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3216 }
3217
3218 // SlsaProvenanceV1: Keep in sync with schema at
3219 // https://github.com/slsa-framework/slsa/blob/main/docs/provenance/schema/v1/provenance.proto
3220 // Builder renamed to ProvenanceBuilder because of Java conflicts.
3221 type SlsaProvenanceV1 struct {
3222 BuildDefinition *BuildDefinition `json:"buildDefinition,omitempty"`
3223 RunDetails *RunDetails `json:"runDetails,omitempty"`
3224 // ForceSendFields is a list of field names (e.g. "BuildDefinition") to
3225 // unconditionally include in API requests. By default, fields with empty or
3226 // default values are omitted from API requests. See
3227 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3228 // details.
3229 ForceSendFields []string `json:"-"`
3230 // NullFields is a list of field names (e.g. "BuildDefinition") to include in
3231 // API requests with the JSON null value. By default, fields with empty values
3232 // are omitted from API requests. See
3233 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3234 NullFields []string `json:"-"`
3235 }
3236
3237 func (s SlsaProvenanceV1) MarshalJSON() ([]byte, error) {
3238 type NoMethod SlsaProvenanceV1
3239 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3240 }
3241
3242 // SlsaProvenanceZeroTwo: See full explanation of fields at
3243 // slsa.dev/provenance/v0.2.
3244 type SlsaProvenanceZeroTwo struct {
3245 BuildConfig googleapi.RawMessage `json:"buildConfig,omitempty"`
3246 BuildType string `json:"buildType,omitempty"`
3247 Builder *GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder `json:"builder,omitempty"`
3248 Invocation *GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation `json:"invocation,omitempty"`
3249 Materials []*GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial `json:"materials,omitempty"`
3250 Metadata *GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata `json:"metadata,omitempty"`
3251 // ForceSendFields is a list of field names (e.g. "BuildConfig") to
3252 // unconditionally include in API requests. By default, fields with empty or
3253 // default values are omitted from API requests. See
3254 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3255 // details.
3256 ForceSendFields []string `json:"-"`
3257 // NullFields is a list of field names (e.g. "BuildConfig") to include in API
3258 // requests with the JSON null value. By default, fields with empty values are
3259 // omitted from API requests. See
3260 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3261 NullFields []string `json:"-"`
3262 }
3263
3264 func (s SlsaProvenanceZeroTwo) MarshalJSON() ([]byte, error) {
3265 type NoMethod SlsaProvenanceZeroTwo
3266 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3267 }
3268
3269 // SlsaRecipe: Steps taken to build the artifact. For a TaskRun, typically each
3270 // container corresponds to one step in the recipe.
3271 type SlsaRecipe struct {
3272 // Arguments: Collection of all external inputs that influenced the build on
3273 // top of recipe.definedInMaterial and recipe.entryPoint. For example, if the
3274 // recipe type were "make", then this might be the flags passed to make aside
3275 // from the target, which is captured in recipe.entryPoint. Depending on the
3276 // recipe Type, the structure may be different.
3277 Arguments googleapi.RawMessage `json:"arguments,omitempty"`
3278 // DefinedInMaterial: Index in materials containing the recipe steps that are
3279 // not implied by recipe.type. For example, if the recipe type were "make",
3280 // then this would point to the source containing the Makefile, not the make
3281 // program itself. Set to -1 if the recipe doesn't come from a material, as
3282 // zero is default unset value for int64.
3283 DefinedInMaterial int64 `json:"definedInMaterial,omitempty,string"`
3284 // EntryPoint: String identifying the entry point into the build. This is often
3285 // a path to a configuration file and/or a target label within that file. The
3286 // syntax and meaning are defined by recipe.type. For example, if the recipe
3287 // type were "make", then this would reference the directory in which to run
3288 // make as well as which target to use.
3289 EntryPoint string `json:"entryPoint,omitempty"`
3290 // Environment: Any other builder-controlled inputs necessary for correctly
3291 // evaluating the recipe. Usually only needed for reproducing the build but not
3292 // evaluated as part of policy. Depending on the recipe Type, the structure may
3293 // be different.
3294 Environment googleapi.RawMessage `json:"environment,omitempty"`
3295 // Type: URI indicating what type of recipe was performed. It determines the
3296 // meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
3297 // materials.
3298 Type string `json:"type,omitempty"`
3299 // ForceSendFields is a list of field names (e.g. "Arguments") to
3300 // unconditionally include in API requests. By default, fields with empty or
3301 // default values are omitted from API requests. See
3302 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3303 // details.
3304 ForceSendFields []string `json:"-"`
3305 // NullFields is a list of field names (e.g. "Arguments") to include in API
3306 // requests with the JSON null value. By default, fields with empty values are
3307 // omitted from API requests. See
3308 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3309 NullFields []string `json:"-"`
3310 }
3311
3312 func (s SlsaRecipe) MarshalJSON() ([]byte, error) {
3313 type NoMethod SlsaRecipe
3314 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3315 }
3316
3317 // Source: Source describes the location of the source used for the build.
3318 type Source struct {
3319 // AdditionalContexts: If provided, some of the source code used for the build
3320 // may be found in these locations, in the case where the source repository had
3321 // multiple remotes or submodules. This list will not include the context
3322 // specified in the context field.
3323 AdditionalContexts []*SourceContext `json:"additionalContexts,omitempty"`
3324 // ArtifactStorageSourceUri: If provided, the input binary artifacts for the
3325 // build came from this location.
3326 ArtifactStorageSourceUri string `json:"artifactStorageSourceUri,omitempty"`
3327 // Context: If provided, the source code used for the build came from this
3328 // location.
3329 Context *SourceContext `json:"context,omitempty"`
3330 // FileHashes: Hash(es) of the build source, which can be used to verify that
3331 // the original source integrity was maintained in the build. The keys to this
3332 // map are file paths used as build source and the values contain the hash
3333 // values for those files. If the build source came in a single package such as
3334 // a gzipped tarfile (.tar.gz), the FileHash will be for the single path to
3335 // that file.
3336 FileHashes map[string]FileHashes `json:"fileHashes,omitempty"`
3337 // ForceSendFields is a list of field names (e.g. "AdditionalContexts") to
3338 // unconditionally include in API requests. By default, fields with empty or
3339 // default values are omitted from API requests. See
3340 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3341 // details.
3342 ForceSendFields []string `json:"-"`
3343 // NullFields is a list of field names (e.g. "AdditionalContexts") to include
3344 // in API requests with the JSON null value. By default, fields with empty
3345 // values are omitted from API requests. See
3346 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3347 NullFields []string `json:"-"`
3348 }
3349
3350 func (s Source) MarshalJSON() ([]byte, error) {
3351 type NoMethod Source
3352 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3353 }
3354
3355 // SourceContext: A SourceContext is a reference to a tree of files. A
3356 // SourceContext together with a path point to a unique revision of a single
3357 // file or directory.
3358 type SourceContext struct {
3359 // CloudRepo: A SourceContext referring to a revision in a Google Cloud Source
3360 // Repo.
3361 CloudRepo *CloudRepoSourceContext `json:"cloudRepo,omitempty"`
3362 // Gerrit: A SourceContext referring to a Gerrit project.
3363 Gerrit *GerritSourceContext `json:"gerrit,omitempty"`
3364 // Git: A SourceContext referring to any third party Git repo (e.g., GitHub).
3365 Git *GitSourceContext `json:"git,omitempty"`
3366 // Labels: Labels with user defined metadata.
3367 Labels map[string]string `json:"labels,omitempty"`
3368 // ForceSendFields is a list of field names (e.g. "CloudRepo") to
3369 // unconditionally include in API requests. By default, fields with empty or
3370 // default values are omitted from API requests. See
3371 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3372 // details.
3373 ForceSendFields []string `json:"-"`
3374 // NullFields is a list of field names (e.g. "CloudRepo") to include in API
3375 // requests with the JSON null value. By default, fields with empty values are
3376 // omitted from API requests. See
3377 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3378 NullFields []string `json:"-"`
3379 }
3380
3381 func (s SourceContext) MarshalJSON() ([]byte, error) {
3382 type NoMethod SourceContext
3383 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3384 }
3385
3386 // Status: The `Status` type defines a logical error model that is suitable for
3387 // different programming environments, including REST APIs and RPC APIs. It is
3388 // used by gRPC (https://github.com/grpc). Each `Status` message contains three
3389 // pieces of data: error code, error message, and error details. You can find
3390 // out more about this error model and how to work with it in the API Design
3391 // Guide (https://cloud.google.com/apis/design/errors).
3392 type Status struct {
3393 // Code: The status code, which should be an enum value of google.rpc.Code.
3394 Code int64 `json:"code,omitempty"`
3395 // Details: A list of messages that carry the error details. There is a common
3396 // set of message types for APIs to use.
3397 Details []googleapi.RawMessage `json:"details,omitempty"`
3398 // Message: A developer-facing error message, which should be in English. Any
3399 // user-facing error message should be localized and sent in the
3400 // google.rpc.Status.details field, or localized by the client.
3401 Message string `json:"message,omitempty"`
3402 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
3403 // include in API requests. By default, fields with empty or default values are
3404 // omitted from API requests. See
3405 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3406 // details.
3407 ForceSendFields []string `json:"-"`
3408 // NullFields is a list of field names (e.g. "Code") to include in API requests
3409 // with the JSON null value. By default, fields with empty values are omitted
3410 // from API requests. See
3411 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3412 NullFields []string `json:"-"`
3413 }
3414
3415 func (s Status) MarshalJSON() ([]byte, error) {
3416 type NoMethod Status
3417 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3418 }
3419
3420 type Subject struct {
3421 // Digest: "": "" Algorithms can be e.g. sha256, sha512 See
3422 // https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
3423 Digest map[string]string `json:"digest,omitempty"`
3424 Name string `json:"name,omitempty"`
3425 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally
3426 // include in API requests. By default, fields with empty or default values are
3427 // omitted from API requests. See
3428 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3429 // details.
3430 ForceSendFields []string `json:"-"`
3431 // NullFields is a list of field names (e.g. "Digest") to include in API
3432 // requests with the JSON null value. By default, fields with empty values are
3433 // omitted from API requests. See
3434 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3435 NullFields []string `json:"-"`
3436 }
3437
3438 func (s Subject) MarshalJSON() ([]byte, error) {
3439 type NoMethod Subject
3440 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3441 }
3442
3443 // UpgradeDistribution: The Upgrade Distribution represents metadata about the
3444 // Upgrade for each operating system (CPE). Some distributions have additional
3445 // metadata around updates, classifying them into various categories and
3446 // severities.
3447 type UpgradeDistribution struct {
3448 // Classification: The operating system classification of this Upgrade, as
3449 // specified by the upstream operating system upgrade feed. For Windows the
3450 // classification is one of the category_ids listed at
3451 // https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
3452 Classification string `json:"classification,omitempty"`
3453 // CpeUri: Required - The specific operating system this metadata applies to.
3454 // See https://cpe.mitre.org/specification/.
3455 CpeUri string `json:"cpeUri,omitempty"`
3456 // Cve: The cve tied to this Upgrade.
3457 Cve []string `json:"cve,omitempty"`
3458 // Severity: The severity as specified by the upstream operating system.
3459 Severity string `json:"severity,omitempty"`
3460 // ForceSendFields is a list of field names (e.g. "Classification") to
3461 // unconditionally include in API requests. By default, fields with empty or
3462 // default values are omitted from API requests. See
3463 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3464 // details.
3465 ForceSendFields []string `json:"-"`
3466 // NullFields is a list of field names (e.g. "Classification") to include in
3467 // API requests with the JSON null value. By default, fields with empty values
3468 // are omitted from API requests. See
3469 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3470 NullFields []string `json:"-"`
3471 }
3472
3473 func (s UpgradeDistribution) MarshalJSON() ([]byte, error) {
3474 type NoMethod UpgradeDistribution
3475 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3476 }
3477
3478 // UpgradeOccurrence: An Upgrade Occurrence represents that a specific
3479 // resource_url could install a specific upgrade. This presence is supplied via
3480 // local sources (i.e. it is present in the mirror and the running system has
3481 // noticed its availability). For Windows, both distribution and windows_update
3482 // contain information for the Windows update.
3483 type UpgradeOccurrence struct {
3484 // Distribution: Metadata about the upgrade for available for the specific
3485 // operating system for the resource_url. This allows efficient filtering, as
3486 // well as making it easier to use the occurrence.
3487 Distribution *UpgradeDistribution `json:"distribution,omitempty"`
3488 // Package: Required for non-Windows OS. The package this Upgrade is for.
3489 Package string `json:"package,omitempty"`
3490 // ParsedVersion: Required for non-Windows OS. The version of the package in a
3491 // machine + human readable form.
3492 ParsedVersion *Version `json:"parsedVersion,omitempty"`
3493 // WindowsUpdate: Required for Windows OS. Represents the metadata about the
3494 // Windows update.
3495 WindowsUpdate *WindowsUpdate `json:"windowsUpdate,omitempty"`
3496 // ForceSendFields is a list of field names (e.g. "Distribution") to
3497 // unconditionally include in API requests. By default, fields with empty or
3498 // default values are omitted from API requests. See
3499 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3500 // details.
3501 ForceSendFields []string `json:"-"`
3502 // NullFields is a list of field names (e.g. "Distribution") to include in API
3503 // requests with the JSON null value. By default, fields with empty values are
3504 // omitted from API requests. See
3505 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3506 NullFields []string `json:"-"`
3507 }
3508
3509 func (s UpgradeOccurrence) MarshalJSON() ([]byte, error) {
3510 type NoMethod UpgradeOccurrence
3511 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3512 }
3513
3514 // Version: Version contains structured information about the version of a
3515 // package.
3516 type Version struct {
3517 // Epoch: Used to correct mistakes in the version numbering scheme.
3518 Epoch int64 `json:"epoch,omitempty"`
3519 // FullName: Human readable version string. This string is of the form :- and
3520 // is only set when kind is NORMAL.
3521 FullName string `json:"fullName,omitempty"`
3522 // Inclusive: Whether this version is specifying part of an inclusive range.
3523 // Grafeas does not have the capability to specify version ranges; instead we
3524 // have fields that specify start version and end versions. At times this is
3525 // insufficient - we also need to specify whether the version is included in
3526 // the range or is excluded from the range. This boolean is expected to be set
3527 // to true when the version is included in a range.
3528 Inclusive bool `json:"inclusive,omitempty"`
3529 // Kind: Required. Distinguishes between sentinel MIN/MAX versions and normal
3530 // versions.
3531 //
3532 // Possible values:
3533 // "VERSION_KIND_UNSPECIFIED" - Unknown.
3534 // "NORMAL" - A standard package version.
3535 // "MINIMUM" - A special version representing negative infinity.
3536 // "MAXIMUM" - A special version representing positive infinity.
3537 Kind string `json:"kind,omitempty"`
3538 // Name: Required only when version kind is NORMAL. The main part of the
3539 // version name.
3540 Name string `json:"name,omitempty"`
3541 // Revision: The iteration of the package build from the above version.
3542 Revision string `json:"revision,omitempty"`
3543 // ForceSendFields is a list of field names (e.g. "Epoch") to unconditionally
3544 // include in API requests. By default, fields with empty or default values are
3545 // omitted from API requests. See
3546 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3547 // details.
3548 ForceSendFields []string `json:"-"`
3549 // NullFields is a list of field names (e.g. "Epoch") to include in API
3550 // requests with the JSON null value. By default, fields with empty values are
3551 // omitted from API requests. See
3552 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3553 NullFields []string `json:"-"`
3554 }
3555
3556 func (s Version) MarshalJSON() ([]byte, error) {
3557 type NoMethod Version
3558 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3559 }
3560
3561 // VexAssessment: VexAssessment provides all publisher provided Vex information
3562 // that is related to this vulnerability.
3563 type VexAssessment struct {
3564 // Cve: Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
3565 // tracking number for the vulnerability. Deprecated: Use vulnerability_id
3566 // instead to denote CVEs.
3567 Cve string `json:"cve,omitempty"`
3568 // Impacts: Contains information about the impact of this vulnerability, this
3569 // will change with time.
3570 Impacts []string `json:"impacts,omitempty"`
3571 // Justification: Justification provides the justification when the state of
3572 // the assessment if NOT_AFFECTED.
3573 Justification *Justification `json:"justification,omitempty"`
3574 // NoteName: The VulnerabilityAssessment note from which this VexAssessment was
3575 // generated. This will be of the form:
3576 // `projects/[PROJECT_ID]/notes/[NOTE_ID]`.
3577 NoteName string `json:"noteName,omitempty"`
3578 // RelatedUris: Holds a list of references associated with this vulnerability
3579 // item and assessment.
3580 RelatedUris []*RelatedUrl `json:"relatedUris,omitempty"`
3581 // Remediations: Specifies details on how to handle (and presumably, fix) a
3582 // vulnerability.
3583 Remediations []*Remediation `json:"remediations,omitempty"`
3584 // State: Provides the state of this Vulnerability assessment.
3585 //
3586 // Possible values:
3587 // "STATE_UNSPECIFIED" - No state is specified.
3588 // "AFFECTED" - This product is known to be affected by this vulnerability.
3589 // "NOT_AFFECTED" - This product is known to be not affected by this
3590 // vulnerability.
3591 // "FIXED" - This product contains a fix for this vulnerability.
3592 // "UNDER_INVESTIGATION" - It is not known yet whether these versions are or
3593 // are not affected by the vulnerability. However, it is still under
3594 // investigation.
3595 State string `json:"state,omitempty"`
3596 // VulnerabilityId: The vulnerability identifier for this Assessment. Will hold
3597 // one of common identifiers e.g. CVE, GHSA etc.
3598 VulnerabilityId string `json:"vulnerabilityId,omitempty"`
3599 // ForceSendFields is a list of field names (e.g. "Cve") to unconditionally
3600 // include in API requests. By default, fields with empty or default values are
3601 // omitted from API requests. See
3602 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3603 // details.
3604 ForceSendFields []string `json:"-"`
3605 // NullFields is a list of field names (e.g. "Cve") to include in API requests
3606 // with the JSON null value. By default, fields with empty values are omitted
3607 // from API requests. See
3608 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3609 NullFields []string `json:"-"`
3610 }
3611
3612 func (s VexAssessment) MarshalJSON() ([]byte, error) {
3613 type NoMethod VexAssessment
3614 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3615 }
3616
3617 // VulnerabilityOccurrence: An occurrence of a severity vulnerability on a
3618 // resource.
3619 type VulnerabilityOccurrence struct {
3620 // CvssScore: Output only. The CVSS score of this vulnerability. CVSS score is
3621 // on a scale of 0 - 10 where 0 indicates low severity and 10 indicates high
3622 // severity.
3623 CvssScore float64 `json:"cvssScore,omitempty"`
3624 // CvssV2: The cvss v2 score for the vulnerability.
3625 CvssV2 *CVSS `json:"cvssV2,omitempty"`
3626 // CvssVersion: Output only. CVSS version used to populate cvss_score and
3627 // severity.
3628 //
3629 // Possible values:
3630 // "CVSS_VERSION_UNSPECIFIED"
3631 // "CVSS_VERSION_2"
3632 // "CVSS_VERSION_3"
3633 CvssVersion string `json:"cvssVersion,omitempty"`
3634 // Cvssv3: The cvss v3 score for the vulnerability.
3635 Cvssv3 *CVSS `json:"cvssv3,omitempty"`
3636 // EffectiveSeverity: The distro assigned severity for this vulnerability when
3637 // it is available, otherwise this is the note provider assigned severity. When
3638 // there are multiple PackageIssues for this vulnerability, they can have
3639 // different effective severities because some might be provided by the distro
3640 // while others are provided by the language ecosystem for a language pack. For
3641 // this reason, it is advised to use the effective severity on the PackageIssue
3642 // level. In the case where multiple PackageIssues have differing effective
3643 // severities, this field should be the highest severity for any of the
3644 // PackageIssues.
3645 //
3646 // Possible values:
3647 // "SEVERITY_UNSPECIFIED" - Unknown.
3648 // "MINIMAL" - Minimal severity.
3649 // "LOW" - Low severity.
3650 // "MEDIUM" - Medium severity.
3651 // "HIGH" - High severity.
3652 // "CRITICAL" - Critical severity.
3653 EffectiveSeverity string `json:"effectiveSeverity,omitempty"`
3654 // ExtraDetails: Occurrence-specific extra details about the vulnerability.
3655 ExtraDetails string `json:"extraDetails,omitempty"`
3656 // FixAvailable: Output only. Whether at least one of the affected packages has
3657 // a fix available.
3658 FixAvailable bool `json:"fixAvailable,omitempty"`
3659 // LongDescription: Output only. A detailed description of this vulnerability.
3660 LongDescription string `json:"longDescription,omitempty"`
3661 // PackageIssue: Required. The set of affected locations and their fixes (if
3662 // available) within the associated resource.
3663 PackageIssue []*PackageIssue `json:"packageIssue,omitempty"`
3664 // RelatedUrls: Output only. URLs related to this vulnerability.
3665 RelatedUrls []*RelatedUrl `json:"relatedUrls,omitempty"`
3666 // Risk: Risk information about the vulnerability, such as CISA, EPSS, etc.
3667 Risk *Risk `json:"risk,omitempty"`
3668 // Severity: Output only. The note provider assigned severity of this
3669 // vulnerability.
3670 //
3671 // Possible values:
3672 // "SEVERITY_UNSPECIFIED" - Unknown.
3673 // "MINIMAL" - Minimal severity.
3674 // "LOW" - Low severity.
3675 // "MEDIUM" - Medium severity.
3676 // "HIGH" - High severity.
3677 // "CRITICAL" - Critical severity.
3678 Severity string `json:"severity,omitempty"`
3679 // ShortDescription: Output only. A one sentence description of this
3680 // vulnerability.
3681 ShortDescription string `json:"shortDescription,omitempty"`
3682 // Type: The type of package; whether native or non native (e.g., ruby gems,
3683 // node.js packages, etc.).
3684 Type string `json:"type,omitempty"`
3685 VexAssessment *VexAssessment `json:"vexAssessment,omitempty"`
3686 // ForceSendFields is a list of field names (e.g. "CvssScore") to
3687 // unconditionally include in API requests. By default, fields with empty or
3688 // default values are omitted from API requests. See
3689 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3690 // details.
3691 ForceSendFields []string `json:"-"`
3692 // NullFields is a list of field names (e.g. "CvssScore") to include in API
3693 // requests with the JSON null value. By default, fields with empty values are
3694 // omitted from API requests. See
3695 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3696 NullFields []string `json:"-"`
3697 }
3698
3699 func (s VulnerabilityOccurrence) MarshalJSON() ([]byte, error) {
3700 type NoMethod VulnerabilityOccurrence
3701 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3702 }
3703
3704 func (s *VulnerabilityOccurrence) UnmarshalJSON(data []byte) error {
3705 type NoMethod VulnerabilityOccurrence
3706 var s1 struct {
3707 CvssScore gensupport.JSONFloat64 `json:"cvssScore"`
3708 *NoMethod
3709 }
3710 s1.NoMethod = (*NoMethod)(s)
3711 if err := json.Unmarshal(data, &s1); err != nil {
3712 return err
3713 }
3714 s.CvssScore = float64(s1.CvssScore)
3715 return nil
3716 }
3717
3718 // WindowsUpdate: Windows Update represents the metadata about the update for
3719 // the Windows operating system. The fields in this message come from the
3720 // Windows Update API documented at
3721 // https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate.
3722 type WindowsUpdate struct {
3723 // Categories: The list of categories to which the update belongs.
3724 Categories []*Category `json:"categories,omitempty"`
3725 // Description: The localized description of the update.
3726 Description string `json:"description,omitempty"`
3727 // Identity: Required - The unique identifier for the update.
3728 Identity *Identity `json:"identity,omitempty"`
3729 // KbArticleIds: The Microsoft Knowledge Base article IDs that are associated
3730 // with the update.
3731 KbArticleIds []string `json:"kbArticleIds,omitempty"`
3732 // LastPublishedTimestamp: The last published timestamp of the update.
3733 LastPublishedTimestamp string `json:"lastPublishedTimestamp,omitempty"`
3734 // SupportUrl: The hyperlink to the support information for the update.
3735 SupportUrl string `json:"supportUrl,omitempty"`
3736 // Title: The localized title of the update.
3737 Title string `json:"title,omitempty"`
3738 // ForceSendFields is a list of field names (e.g. "Categories") to
3739 // unconditionally include in API requests. By default, fields with empty or
3740 // default values are omitted from API requests. See
3741 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3742 // details.
3743 ForceSendFields []string `json:"-"`
3744 // NullFields is a list of field names (e.g. "Categories") to include in API
3745 // requests with the JSON null value. By default, fields with empty values are
3746 // omitted from API requests. See
3747 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3748 NullFields []string `json:"-"`
3749 }
3750
3751 func (s WindowsUpdate) MarshalJSON() ([]byte, error) {
3752 type NoMethod WindowsUpdate
3753 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3754 }
3755
3756 type ProjectsLocationsOperationsCancelCall struct {
3757 s *Service
3758 name string
3759 urlParams_ gensupport.URLParams
3760 ctx_ context.Context
3761 header_ http.Header
3762 }
3763
3764 // Cancel: Starts asynchronous cancellation on a long-running operation. The
3765 // server makes a best effort to cancel the operation, but success is not
3766 // guaranteed. If the server doesn't support this method, it returns
3767 // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
3768 // other methods to check whether the cancellation succeeded or whether the
3769 // operation completed despite cancellation. On successful cancellation, the
3770 // operation is not deleted; instead, it becomes an operation with an
3771 // Operation.error value with a google.rpc.Status.code of `1`, corresponding to
3772 // `Code.CANCELLED`.
3773 //
3774 // - name: The name of the operation resource to be cancelled.
3775 func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall {
3776 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3777 c.name = name
3778 return c
3779 }
3780
3781 // Fields allows partial responses to be retrieved. See
3782 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3783 // details.
3784 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
3785 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3786 return c
3787 }
3788
3789 // Context sets the context to be used in this call's Do method.
3790 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
3791 c.ctx_ = ctx
3792 return c
3793 }
3794
3795 // Header returns a http.Header that can be modified by the caller to add
3796 // headers to the request.
3797 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
3798 if c.header_ == nil {
3799 c.header_ = make(http.Header)
3800 }
3801 return c.header_
3802 }
3803
3804 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
3805 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3806 c.urlParams_.Set("alt", alt)
3807 c.urlParams_.Set("prettyPrint", "false")
3808 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel")
3809 urls += "?" + c.urlParams_.Encode()
3810 req, err := http.NewRequest("POST", urls, nil)
3811 if err != nil {
3812 return nil, err
3813 }
3814 req.Header = reqHeaders
3815 googleapi.Expand(req.URL, map[string]string{
3816 "name": c.name,
3817 })
3818 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "ondemandscanning.projects.locations.operations.cancel", "request", internallog.HTTPRequest(req, nil))
3819 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3820 }
3821
3822 // Do executes the "ondemandscanning.projects.locations.operations.cancel" call.
3823 // Any non-2xx status code is an error. Response headers are in either
3824 // *Empty.ServerResponse.Header or (if a response was returned at all) in
3825 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3826 // whether the returned error was because http.StatusNotModified was returned.
3827 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3828 gensupport.SetOptions(c.urlParams_, opts...)
3829 res, err := c.doRequest("json")
3830 if res != nil && res.StatusCode == http.StatusNotModified {
3831 if res.Body != nil {
3832 res.Body.Close()
3833 }
3834 return nil, gensupport.WrapError(&googleapi.Error{
3835 Code: res.StatusCode,
3836 Header: res.Header,
3837 })
3838 }
3839 if err != nil {
3840 return nil, err
3841 }
3842 defer googleapi.CloseBody(res)
3843 if err := googleapi.CheckResponse(res); err != nil {
3844 return nil, gensupport.WrapError(err)
3845 }
3846 ret := &Empty{
3847 ServerResponse: googleapi.ServerResponse{
3848 Header: res.Header,
3849 HTTPStatusCode: res.StatusCode,
3850 },
3851 }
3852 target := &ret
3853 b, err := gensupport.DecodeResponseBytes(target, res)
3854 if err != nil {
3855 return nil, err
3856 }
3857 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "ondemandscanning.projects.locations.operations.cancel", "response", internallog.HTTPResponse(res, b))
3858 return ret, nil
3859 }
3860
3861 type ProjectsLocationsOperationsDeleteCall struct {
3862 s *Service
3863 name string
3864 urlParams_ gensupport.URLParams
3865 ctx_ context.Context
3866 header_ http.Header
3867 }
3868
3869 // Delete: Deletes a long-running operation. This method indicates that the
3870 // client is no longer interested in the operation result. It does not cancel
3871 // the operation. If the server doesn't support this method, it returns
3872 // `google.rpc.Code.UNIMPLEMENTED`.
3873 //
3874 // - name: The name of the operation resource to be deleted.
3875 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
3876 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3877 c.name = name
3878 return c
3879 }
3880
3881 // Fields allows partial responses to be retrieved. See
3882 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3883 // details.
3884 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
3885 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3886 return c
3887 }
3888
3889 // Context sets the context to be used in this call's Do method.
3890 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
3891 c.ctx_ = ctx
3892 return c
3893 }
3894
3895 // Header returns a http.Header that can be modified by the caller to add
3896 // headers to the request.
3897 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
3898 if c.header_ == nil {
3899 c.header_ = make(http.Header)
3900 }
3901 return c.header_
3902 }
3903
3904 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
3905 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3906 c.urlParams_.Set("alt", alt)
3907 c.urlParams_.Set("prettyPrint", "false")
3908 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3909 urls += "?" + c.urlParams_.Encode()
3910 req, err := http.NewRequest("DELETE", urls, nil)
3911 if err != nil {
3912 return nil, err
3913 }
3914 req.Header = reqHeaders
3915 googleapi.Expand(req.URL, map[string]string{
3916 "name": c.name,
3917 })
3918 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "ondemandscanning.projects.locations.operations.delete", "request", internallog.HTTPRequest(req, nil))
3919 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3920 }
3921
3922 // Do executes the "ondemandscanning.projects.locations.operations.delete" call.
3923 // Any non-2xx status code is an error. Response headers are in either
3924 // *Empty.ServerResponse.Header or (if a response was returned at all) in
3925 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3926 // whether the returned error was because http.StatusNotModified was returned.
3927 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3928 gensupport.SetOptions(c.urlParams_, opts...)
3929 res, err := c.doRequest("json")
3930 if res != nil && res.StatusCode == http.StatusNotModified {
3931 if res.Body != nil {
3932 res.Body.Close()
3933 }
3934 return nil, gensupport.WrapError(&googleapi.Error{
3935 Code: res.StatusCode,
3936 Header: res.Header,
3937 })
3938 }
3939 if err != nil {
3940 return nil, err
3941 }
3942 defer googleapi.CloseBody(res)
3943 if err := googleapi.CheckResponse(res); err != nil {
3944 return nil, gensupport.WrapError(err)
3945 }
3946 ret := &Empty{
3947 ServerResponse: googleapi.ServerResponse{
3948 Header: res.Header,
3949 HTTPStatusCode: res.StatusCode,
3950 },
3951 }
3952 target := &ret
3953 b, err := gensupport.DecodeResponseBytes(target, res)
3954 if err != nil {
3955 return nil, err
3956 }
3957 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "ondemandscanning.projects.locations.operations.delete", "response", internallog.HTTPResponse(res, b))
3958 return ret, nil
3959 }
3960
3961 type ProjectsLocationsOperationsGetCall struct {
3962 s *Service
3963 name string
3964 urlParams_ gensupport.URLParams
3965 ifNoneMatch_ string
3966 ctx_ context.Context
3967 header_ http.Header
3968 }
3969
3970 // Get: Gets the latest state of a long-running operation. Clients can use this
3971 // method to poll the operation result at intervals as recommended by the API
3972 // service.
3973 //
3974 // - name: The name of the operation resource.
3975 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
3976 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3977 c.name = name
3978 return c
3979 }
3980
3981 // Fields allows partial responses to be retrieved. See
3982 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3983 // details.
3984 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
3985 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3986 return c
3987 }
3988
3989 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3990 // object's ETag matches the given value. This is useful for getting updates
3991 // only after the object has changed since the last request.
3992 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
3993 c.ifNoneMatch_ = entityTag
3994 return c
3995 }
3996
3997 // Context sets the context to be used in this call's Do method.
3998 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
3999 c.ctx_ = ctx
4000 return c
4001 }
4002
4003 // Header returns a http.Header that can be modified by the caller to add
4004 // headers to the request.
4005 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
4006 if c.header_ == nil {
4007 c.header_ = make(http.Header)
4008 }
4009 return c.header_
4010 }
4011
4012 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
4013 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4014 if c.ifNoneMatch_ != "" {
4015 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4016 }
4017 c.urlParams_.Set("alt", alt)
4018 c.urlParams_.Set("prettyPrint", "false")
4019 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
4020 urls += "?" + c.urlParams_.Encode()
4021 req, err := http.NewRequest("GET", urls, nil)
4022 if err != nil {
4023 return nil, err
4024 }
4025 req.Header = reqHeaders
4026 googleapi.Expand(req.URL, map[string]string{
4027 "name": c.name,
4028 })
4029 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "ondemandscanning.projects.locations.operations.get", "request", internallog.HTTPRequest(req, nil))
4030 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4031 }
4032
4033 // Do executes the "ondemandscanning.projects.locations.operations.get" call.
4034 // Any non-2xx status code is an error. Response headers are in either
4035 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4036 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4037 // whether the returned error was because http.StatusNotModified was returned.
4038 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4039 gensupport.SetOptions(c.urlParams_, opts...)
4040 res, err := c.doRequest("json")
4041 if res != nil && res.StatusCode == http.StatusNotModified {
4042 if res.Body != nil {
4043 res.Body.Close()
4044 }
4045 return nil, gensupport.WrapError(&googleapi.Error{
4046 Code: res.StatusCode,
4047 Header: res.Header,
4048 })
4049 }
4050 if err != nil {
4051 return nil, err
4052 }
4053 defer googleapi.CloseBody(res)
4054 if err := googleapi.CheckResponse(res); err != nil {
4055 return nil, gensupport.WrapError(err)
4056 }
4057 ret := &Operation{
4058 ServerResponse: googleapi.ServerResponse{
4059 Header: res.Header,
4060 HTTPStatusCode: res.StatusCode,
4061 },
4062 }
4063 target := &ret
4064 b, err := gensupport.DecodeResponseBytes(target, res)
4065 if err != nil {
4066 return nil, err
4067 }
4068 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "ondemandscanning.projects.locations.operations.get", "response", internallog.HTTPResponse(res, b))
4069 return ret, nil
4070 }
4071
4072 type ProjectsLocationsOperationsListCall struct {
4073 s *Service
4074 name string
4075 urlParams_ gensupport.URLParams
4076 ifNoneMatch_ string
4077 ctx_ context.Context
4078 header_ http.Header
4079 }
4080
4081 // List: Lists operations that match the specified filter in the request. If
4082 // the server doesn't support this method, it returns `UNIMPLEMENTED`.
4083 //
4084 // - name: The name of the operation's parent resource.
4085 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
4086 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4087 c.name = name
4088 return c
4089 }
4090
4091 // Filter sets the optional parameter "filter": The standard list filter.
4092 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
4093 c.urlParams_.Set("filter", filter)
4094 return c
4095 }
4096
4097 // PageSize sets the optional parameter "pageSize": The standard list page
4098 // size.
4099 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
4100 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4101 return c
4102 }
4103
4104 // PageToken sets the optional parameter "pageToken": The standard list page
4105 // token.
4106 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
4107 c.urlParams_.Set("pageToken", pageToken)
4108 return c
4109 }
4110
4111 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
4112 // When set to `true`, operations that are reachable are returned as normal,
4113 // and those that are unreachable are returned in the
4114 // ListOperationsResponse.unreachable field. This can only be `true` when
4115 // reading across collections. For example, when `parent` is set to
4116 // "projects/example/locations/-". This field is not supported by default and
4117 // will result in an `UNIMPLEMENTED` error if set unless explicitly documented
4118 // otherwise in service or product specific documentation.
4119 func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall {
4120 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
4121 return c
4122 }
4123
4124 // Fields allows partial responses to be retrieved. See
4125 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4126 // details.
4127 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
4128 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4129 return c
4130 }
4131
4132 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4133 // object's ETag matches the given value. This is useful for getting updates
4134 // only after the object has changed since the last request.
4135 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
4136 c.ifNoneMatch_ = entityTag
4137 return c
4138 }
4139
4140 // Context sets the context to be used in this call's Do method.
4141 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
4142 c.ctx_ = ctx
4143 return c
4144 }
4145
4146 // Header returns a http.Header that can be modified by the caller to add
4147 // headers to the request.
4148 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
4149 if c.header_ == nil {
4150 c.header_ = make(http.Header)
4151 }
4152 return c.header_
4153 }
4154
4155 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
4156 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4157 if c.ifNoneMatch_ != "" {
4158 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4159 }
4160 c.urlParams_.Set("alt", alt)
4161 c.urlParams_.Set("prettyPrint", "false")
4162 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations")
4163 urls += "?" + c.urlParams_.Encode()
4164 req, err := http.NewRequest("GET", urls, nil)
4165 if err != nil {
4166 return nil, err
4167 }
4168 req.Header = reqHeaders
4169 googleapi.Expand(req.URL, map[string]string{
4170 "name": c.name,
4171 })
4172 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "ondemandscanning.projects.locations.operations.list", "request", internallog.HTTPRequest(req, nil))
4173 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4174 }
4175
4176 // Do executes the "ondemandscanning.projects.locations.operations.list" call.
4177 // Any non-2xx status code is an error. Response headers are in either
4178 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
4179 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4180 // check whether the returned error was because http.StatusNotModified was
4181 // returned.
4182 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
4183 gensupport.SetOptions(c.urlParams_, opts...)
4184 res, err := c.doRequest("json")
4185 if res != nil && res.StatusCode == http.StatusNotModified {
4186 if res.Body != nil {
4187 res.Body.Close()
4188 }
4189 return nil, gensupport.WrapError(&googleapi.Error{
4190 Code: res.StatusCode,
4191 Header: res.Header,
4192 })
4193 }
4194 if err != nil {
4195 return nil, err
4196 }
4197 defer googleapi.CloseBody(res)
4198 if err := googleapi.CheckResponse(res); err != nil {
4199 return nil, gensupport.WrapError(err)
4200 }
4201 ret := &ListOperationsResponse{
4202 ServerResponse: googleapi.ServerResponse{
4203 Header: res.Header,
4204 HTTPStatusCode: res.StatusCode,
4205 },
4206 }
4207 target := &ret
4208 b, err := gensupport.DecodeResponseBytes(target, res)
4209 if err != nil {
4210 return nil, err
4211 }
4212 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "ondemandscanning.projects.locations.operations.list", "response", internallog.HTTPResponse(res, b))
4213 return ret, nil
4214 }
4215
4216 // Pages invokes f for each page of results.
4217 // A non-nil error returned from f will halt the iteration.
4218 // The provided context supersedes any context provided to the Context method.
4219 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
4220 c.ctx_ = ctx
4221 defer c.PageToken(c.urlParams_.Get("pageToken"))
4222 for {
4223 x, err := c.Do()
4224 if err != nil {
4225 return err
4226 }
4227 if err := f(x); err != nil {
4228 return err
4229 }
4230 if x.NextPageToken == "" {
4231 return nil
4232 }
4233 c.PageToken(x.NextPageToken)
4234 }
4235 }
4236
4237 type ProjectsLocationsOperationsWaitCall struct {
4238 s *Service
4239 name string
4240 urlParams_ gensupport.URLParams
4241 ctx_ context.Context
4242 header_ http.Header
4243 }
4244
4245 // Wait: Waits until the specified long-running operation is done or reaches at
4246 // most a specified timeout, returning the latest state. If the operation is
4247 // already done, the latest state is immediately returned. If the timeout
4248 // specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout
4249 // is used. If the server does not support this method, it returns
4250 // `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort
4251 // basis. It may return the latest state before the specified timeout
4252 // (including immediately), meaning even an immediate response is no guarantee
4253 // that the operation is done.
4254 //
4255 // - name: The name of the operation resource to wait on.
4256 func (r *ProjectsLocationsOperationsService) Wait(name string) *ProjectsLocationsOperationsWaitCall {
4257 c := &ProjectsLocationsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4258 c.name = name
4259 return c
4260 }
4261
4262 // Timeout sets the optional parameter "timeout": The maximum duration to wait
4263 // before timing out. If left blank, the wait will be at most the time
4264 // permitted by the underlying HTTP/RPC protocol. If RPC context deadline is
4265 // also specified, the shorter one will be used.
4266 func (c *ProjectsLocationsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsOperationsWaitCall {
4267 c.urlParams_.Set("timeout", timeout)
4268 return c
4269 }
4270
4271 // Fields allows partial responses to be retrieved. See
4272 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4273 // details.
4274 func (c *ProjectsLocationsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsWaitCall {
4275 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4276 return c
4277 }
4278
4279 // Context sets the context to be used in this call's Do method.
4280 func (c *ProjectsLocationsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsOperationsWaitCall {
4281 c.ctx_ = ctx
4282 return c
4283 }
4284
4285 // Header returns a http.Header that can be modified by the caller to add
4286 // headers to the request.
4287 func (c *ProjectsLocationsOperationsWaitCall) Header() http.Header {
4288 if c.header_ == nil {
4289 c.header_ = make(http.Header)
4290 }
4291 return c.header_
4292 }
4293
4294 func (c *ProjectsLocationsOperationsWaitCall) doRequest(alt string) (*http.Response, error) {
4295 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4296 c.urlParams_.Set("alt", alt)
4297 c.urlParams_.Set("prettyPrint", "false")
4298 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:wait")
4299 urls += "?" + c.urlParams_.Encode()
4300 req, err := http.NewRequest("POST", urls, nil)
4301 if err != nil {
4302 return nil, err
4303 }
4304 req.Header = reqHeaders
4305 googleapi.Expand(req.URL, map[string]string{
4306 "name": c.name,
4307 })
4308 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "ondemandscanning.projects.locations.operations.wait", "request", internallog.HTTPRequest(req, nil))
4309 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4310 }
4311
4312 // Do executes the "ondemandscanning.projects.locations.operations.wait" call.
4313 // Any non-2xx status code is an error. Response headers are in either
4314 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4315 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4316 // whether the returned error was because http.StatusNotModified was returned.
4317 func (c *ProjectsLocationsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4318 gensupport.SetOptions(c.urlParams_, opts...)
4319 res, err := c.doRequest("json")
4320 if res != nil && res.StatusCode == http.StatusNotModified {
4321 if res.Body != nil {
4322 res.Body.Close()
4323 }
4324 return nil, gensupport.WrapError(&googleapi.Error{
4325 Code: res.StatusCode,
4326 Header: res.Header,
4327 })
4328 }
4329 if err != nil {
4330 return nil, err
4331 }
4332 defer googleapi.CloseBody(res)
4333 if err := googleapi.CheckResponse(res); err != nil {
4334 return nil, gensupport.WrapError(err)
4335 }
4336 ret := &Operation{
4337 ServerResponse: googleapi.ServerResponse{
4338 Header: res.Header,
4339 HTTPStatusCode: res.StatusCode,
4340 },
4341 }
4342 target := &ret
4343 b, err := gensupport.DecodeResponseBytes(target, res)
4344 if err != nil {
4345 return nil, err
4346 }
4347 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "ondemandscanning.projects.locations.operations.wait", "response", internallog.HTTPResponse(res, b))
4348 return ret, nil
4349 }
4350
4351 type ProjectsLocationsScansAnalyzePackagesCall struct {
4352 s *Service
4353 parent string
4354 analyzepackagesrequest *AnalyzePackagesRequest
4355 urlParams_ gensupport.URLParams
4356 ctx_ context.Context
4357 header_ http.Header
4358 }
4359
4360 // AnalyzePackages: Initiates an analysis of the provided packages.
4361 //
4362 // - parent: The parent of the resource for which analysis is requested.
4363 // Format: projects/[project_name]/locations/[location].
4364 func (r *ProjectsLocationsScansService) AnalyzePackages(parent string, analyzepackagesrequest *AnalyzePackagesRequest) *ProjectsLocationsScansAnalyzePackagesCall {
4365 c := &ProjectsLocationsScansAnalyzePackagesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4366 c.parent = parent
4367 c.analyzepackagesrequest = analyzepackagesrequest
4368 return c
4369 }
4370
4371 // Fields allows partial responses to be retrieved. See
4372 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4373 // details.
4374 func (c *ProjectsLocationsScansAnalyzePackagesCall) Fields(s ...googleapi.Field) *ProjectsLocationsScansAnalyzePackagesCall {
4375 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4376 return c
4377 }
4378
4379 // Context sets the context to be used in this call's Do method.
4380 func (c *ProjectsLocationsScansAnalyzePackagesCall) Context(ctx context.Context) *ProjectsLocationsScansAnalyzePackagesCall {
4381 c.ctx_ = ctx
4382 return c
4383 }
4384
4385 // Header returns a http.Header that can be modified by the caller to add
4386 // headers to the request.
4387 func (c *ProjectsLocationsScansAnalyzePackagesCall) Header() http.Header {
4388 if c.header_ == nil {
4389 c.header_ = make(http.Header)
4390 }
4391 return c.header_
4392 }
4393
4394 func (c *ProjectsLocationsScansAnalyzePackagesCall) doRequest(alt string) (*http.Response, error) {
4395 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4396 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.analyzepackagesrequest)
4397 if err != nil {
4398 return nil, err
4399 }
4400 c.urlParams_.Set("alt", alt)
4401 c.urlParams_.Set("prettyPrint", "false")
4402 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/scans:analyzePackages")
4403 urls += "?" + c.urlParams_.Encode()
4404 req, err := http.NewRequest("POST", urls, body)
4405 if err != nil {
4406 return nil, err
4407 }
4408 req.Header = reqHeaders
4409 googleapi.Expand(req.URL, map[string]string{
4410 "parent": c.parent,
4411 })
4412 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "ondemandscanning.projects.locations.scans.analyzePackages", "request", internallog.HTTPRequest(req, body.Bytes()))
4413 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4414 }
4415
4416 // Do executes the "ondemandscanning.projects.locations.scans.analyzePackages" call.
4417 // Any non-2xx status code is an error. Response headers are in either
4418 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4419 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4420 // whether the returned error was because http.StatusNotModified was returned.
4421 func (c *ProjectsLocationsScansAnalyzePackagesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4422 gensupport.SetOptions(c.urlParams_, opts...)
4423 res, err := c.doRequest("json")
4424 if res != nil && res.StatusCode == http.StatusNotModified {
4425 if res.Body != nil {
4426 res.Body.Close()
4427 }
4428 return nil, gensupport.WrapError(&googleapi.Error{
4429 Code: res.StatusCode,
4430 Header: res.Header,
4431 })
4432 }
4433 if err != nil {
4434 return nil, err
4435 }
4436 defer googleapi.CloseBody(res)
4437 if err := googleapi.CheckResponse(res); err != nil {
4438 return nil, gensupport.WrapError(err)
4439 }
4440 ret := &Operation{
4441 ServerResponse: googleapi.ServerResponse{
4442 Header: res.Header,
4443 HTTPStatusCode: res.StatusCode,
4444 },
4445 }
4446 target := &ret
4447 b, err := gensupport.DecodeResponseBytes(target, res)
4448 if err != nil {
4449 return nil, err
4450 }
4451 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "ondemandscanning.projects.locations.scans.analyzePackages", "response", internallog.HTTPResponse(res, b))
4452 return ret, nil
4453 }
4454
4455 type ProjectsLocationsScansVulnerabilitiesListCall struct {
4456 s *Service
4457 parent string
4458 urlParams_ gensupport.URLParams
4459 ifNoneMatch_ string
4460 ctx_ context.Context
4461 header_ http.Header
4462 }
4463
4464 // List: Lists vulnerabilities resulting from a successfully completed scan.
4465 //
4466 // - parent: The parent of the collection of Vulnerabilities being requested.
4467 // Format: projects/[project_name]/locations/[location]/scans/[scan_id].
4468 func (r *ProjectsLocationsScansVulnerabilitiesService) List(parent string) *ProjectsLocationsScansVulnerabilitiesListCall {
4469 c := &ProjectsLocationsScansVulnerabilitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4470 c.parent = parent
4471 return c
4472 }
4473
4474 // PageSize sets the optional parameter "pageSize": The number of
4475 // vulnerabilities to retrieve.
4476 func (c *ProjectsLocationsScansVulnerabilitiesListCall) PageSize(pageSize int64) *ProjectsLocationsScansVulnerabilitiesListCall {
4477 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4478 return c
4479 }
4480
4481 // PageToken sets the optional parameter "pageToken": The page token, resulting
4482 // from a previous call to ListVulnerabilities.
4483 func (c *ProjectsLocationsScansVulnerabilitiesListCall) PageToken(pageToken string) *ProjectsLocationsScansVulnerabilitiesListCall {
4484 c.urlParams_.Set("pageToken", pageToken)
4485 return c
4486 }
4487
4488 // Fields allows partial responses to be retrieved. See
4489 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4490 // details.
4491 func (c *ProjectsLocationsScansVulnerabilitiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsScansVulnerabilitiesListCall {
4492 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4493 return c
4494 }
4495
4496 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4497 // object's ETag matches the given value. This is useful for getting updates
4498 // only after the object has changed since the last request.
4499 func (c *ProjectsLocationsScansVulnerabilitiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsScansVulnerabilitiesListCall {
4500 c.ifNoneMatch_ = entityTag
4501 return c
4502 }
4503
4504 // Context sets the context to be used in this call's Do method.
4505 func (c *ProjectsLocationsScansVulnerabilitiesListCall) Context(ctx context.Context) *ProjectsLocationsScansVulnerabilitiesListCall {
4506 c.ctx_ = ctx
4507 return c
4508 }
4509
4510 // Header returns a http.Header that can be modified by the caller to add
4511 // headers to the request.
4512 func (c *ProjectsLocationsScansVulnerabilitiesListCall) Header() http.Header {
4513 if c.header_ == nil {
4514 c.header_ = make(http.Header)
4515 }
4516 return c.header_
4517 }
4518
4519 func (c *ProjectsLocationsScansVulnerabilitiesListCall) doRequest(alt string) (*http.Response, error) {
4520 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4521 if c.ifNoneMatch_ != "" {
4522 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4523 }
4524 c.urlParams_.Set("alt", alt)
4525 c.urlParams_.Set("prettyPrint", "false")
4526 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/vulnerabilities")
4527 urls += "?" + c.urlParams_.Encode()
4528 req, err := http.NewRequest("GET", urls, nil)
4529 if err != nil {
4530 return nil, err
4531 }
4532 req.Header = reqHeaders
4533 googleapi.Expand(req.URL, map[string]string{
4534 "parent": c.parent,
4535 })
4536 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "ondemandscanning.projects.locations.scans.vulnerabilities.list", "request", internallog.HTTPRequest(req, nil))
4537 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4538 }
4539
4540 // Do executes the "ondemandscanning.projects.locations.scans.vulnerabilities.list" call.
4541 // Any non-2xx status code is an error. Response headers are in either
4542 // *ListVulnerabilitiesResponse.ServerResponse.Header or (if a response was
4543 // returned at all) in error.(*googleapi.Error).Header. Use
4544 // googleapi.IsNotModified to check whether the returned error was because
4545 // http.StatusNotModified was returned.
4546 func (c *ProjectsLocationsScansVulnerabilitiesListCall) Do(opts ...googleapi.CallOption) (*ListVulnerabilitiesResponse, error) {
4547 gensupport.SetOptions(c.urlParams_, opts...)
4548 res, err := c.doRequest("json")
4549 if res != nil && res.StatusCode == http.StatusNotModified {
4550 if res.Body != nil {
4551 res.Body.Close()
4552 }
4553 return nil, gensupport.WrapError(&googleapi.Error{
4554 Code: res.StatusCode,
4555 Header: res.Header,
4556 })
4557 }
4558 if err != nil {
4559 return nil, err
4560 }
4561 defer googleapi.CloseBody(res)
4562 if err := googleapi.CheckResponse(res); err != nil {
4563 return nil, gensupport.WrapError(err)
4564 }
4565 ret := &ListVulnerabilitiesResponse{
4566 ServerResponse: googleapi.ServerResponse{
4567 Header: res.Header,
4568 HTTPStatusCode: res.StatusCode,
4569 },
4570 }
4571 target := &ret
4572 b, err := gensupport.DecodeResponseBytes(target, res)
4573 if err != nil {
4574 return nil, err
4575 }
4576 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "ondemandscanning.projects.locations.scans.vulnerabilities.list", "response", internallog.HTTPResponse(res, b))
4577 return ret, nil
4578 }
4579
4580 // Pages invokes f for each page of results.
4581 // A non-nil error returned from f will halt the iteration.
4582 // The provided context supersedes any context provided to the Context method.
4583 func (c *ProjectsLocationsScansVulnerabilitiesListCall) Pages(ctx context.Context, f func(*ListVulnerabilitiesResponse) error) error {
4584 c.ctx_ = ctx
4585 defer c.PageToken(c.urlParams_.Get("pageToken"))
4586 for {
4587 x, err := c.Do()
4588 if err != nil {
4589 return err
4590 }
4591 if err := f(x); err != nil {
4592 return err
4593 }
4594 if x.NextPageToken == "" {
4595 return nil
4596 }
4597 c.PageToken(x.NextPageToken)
4598 }
4599 }