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