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