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 containeranalysis provides access to the Container Analysis API. 8 // 9 // For product documentation, see: https://cloud.google.com/container-analysis/api/reference/rest/ 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/containeranalysis/v1" 27 // ... 28 // ctx := context.Background() 29 // containeranalysisService, err := containeranalysis.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 // containeranalysisService, err := containeranalysis.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 // containeranalysisService, err := containeranalysis.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 49 // 50 // See [google.golang.org/api/option.ClientOption] for details on options. 51 package containeranalysis // import "google.golang.org/api/containeranalysis/v1" 52 53 import ( 54 "bytes" 55 "context" 56 "encoding/json" 57 "errors" 58 "fmt" 59 "io" 60 "net/http" 61 "net/url" 62 "strconv" 63 "strings" 64 65 googleapi "google.golang.org/api/googleapi" 66 internal "google.golang.org/api/internal" 67 gensupport "google.golang.org/api/internal/gensupport" 68 option "google.golang.org/api/option" 69 internaloption "google.golang.org/api/option/internaloption" 70 htransport "google.golang.org/api/transport/http" 71 ) 72 73 // Always reference these packages, just in case the auto-generated code 74 // below doesn't. 75 var _ = bytes.NewBuffer 76 var _ = strconv.Itoa 77 var _ = fmt.Sprintf 78 var _ = json.NewDecoder 79 var _ = io.Copy 80 var _ = url.Parse 81 var _ = gensupport.MarshalJSON 82 var _ = googleapi.Version 83 var _ = errors.New 84 var _ = strings.Replace 85 var _ = context.Canceled 86 var _ = internaloption.WithDefaultEndpoint 87 var _ = internal.Version 88 89 const apiId = "containeranalysis:v1" 90 const apiName = "containeranalysis" 91 const apiVersion = "v1" 92 const basePath = "https://containeranalysis.googleapis.com/" 93 const basePathTemplate = "https://containeranalysis.UNIVERSE_DOMAIN/" 94 const mtlsBasePath = "https://containeranalysis.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 rs.Notes = NewProjectsNotesService(s) 161 rs.Occurrences = NewProjectsOccurrencesService(s) 162 rs.Resources = NewProjectsResourcesService(s) 163 return rs 164 } 165 166 type ProjectsService struct { 167 s *Service 168 169 Locations *ProjectsLocationsService 170 171 Notes *ProjectsNotesService 172 173 Occurrences *ProjectsOccurrencesService 174 175 Resources *ProjectsResourcesService 176 } 177 178 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 179 rs := &ProjectsLocationsService{s: s} 180 rs.Notes = NewProjectsLocationsNotesService(s) 181 rs.Occurrences = NewProjectsLocationsOccurrencesService(s) 182 rs.Resources = NewProjectsLocationsResourcesService(s) 183 return rs 184 } 185 186 type ProjectsLocationsService struct { 187 s *Service 188 189 Notes *ProjectsLocationsNotesService 190 191 Occurrences *ProjectsLocationsOccurrencesService 192 193 Resources *ProjectsLocationsResourcesService 194 } 195 196 func NewProjectsLocationsNotesService(s *Service) *ProjectsLocationsNotesService { 197 rs := &ProjectsLocationsNotesService{s: s} 198 rs.Occurrences = NewProjectsLocationsNotesOccurrencesService(s) 199 return rs 200 } 201 202 type ProjectsLocationsNotesService struct { 203 s *Service 204 205 Occurrences *ProjectsLocationsNotesOccurrencesService 206 } 207 208 func NewProjectsLocationsNotesOccurrencesService(s *Service) *ProjectsLocationsNotesOccurrencesService { 209 rs := &ProjectsLocationsNotesOccurrencesService{s: s} 210 return rs 211 } 212 213 type ProjectsLocationsNotesOccurrencesService struct { 214 s *Service 215 } 216 217 func NewProjectsLocationsOccurrencesService(s *Service) *ProjectsLocationsOccurrencesService { 218 rs := &ProjectsLocationsOccurrencesService{s: s} 219 return rs 220 } 221 222 type ProjectsLocationsOccurrencesService struct { 223 s *Service 224 } 225 226 func NewProjectsLocationsResourcesService(s *Service) *ProjectsLocationsResourcesService { 227 rs := &ProjectsLocationsResourcesService{s: s} 228 return rs 229 } 230 231 type ProjectsLocationsResourcesService struct { 232 s *Service 233 } 234 235 func NewProjectsNotesService(s *Service) *ProjectsNotesService { 236 rs := &ProjectsNotesService{s: s} 237 rs.Occurrences = NewProjectsNotesOccurrencesService(s) 238 return rs 239 } 240 241 type ProjectsNotesService struct { 242 s *Service 243 244 Occurrences *ProjectsNotesOccurrencesService 245 } 246 247 func NewProjectsNotesOccurrencesService(s *Service) *ProjectsNotesOccurrencesService { 248 rs := &ProjectsNotesOccurrencesService{s: s} 249 return rs 250 } 251 252 type ProjectsNotesOccurrencesService struct { 253 s *Service 254 } 255 256 func NewProjectsOccurrencesService(s *Service) *ProjectsOccurrencesService { 257 rs := &ProjectsOccurrencesService{s: s} 258 return rs 259 } 260 261 type ProjectsOccurrencesService struct { 262 s *Service 263 } 264 265 func NewProjectsResourcesService(s *Service) *ProjectsResourcesService { 266 rs := &ProjectsResourcesService{s: s} 267 return rs 268 } 269 270 type ProjectsResourcesService struct { 271 s *Service 272 } 273 274 // AliasContext: An alias to a repo revision. 275 type AliasContext struct { 276 // Kind: The alias kind. 277 // 278 // Possible values: 279 // "KIND_UNSPECIFIED" - Unknown. 280 // "FIXED" - Git tag. 281 // "MOVABLE" - Git branch. 282 // "OTHER" - Used to specify non-standard aliases. For example, if a Git repo 283 // has a ref named "refs/foo/bar". 284 Kind string `json:"kind,omitempty"` 285 // Name: The alias name. 286 Name string `json:"name,omitempty"` 287 // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally 288 // include in API requests. By default, fields with empty or default values are 289 // omitted from API requests. See 290 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 291 // details. 292 ForceSendFields []string `json:"-"` 293 // NullFields is a list of field names (e.g. "Kind") to include in API requests 294 // with the JSON null value. By default, fields with empty values are omitted 295 // from API requests. See 296 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 297 NullFields []string `json:"-"` 298 } 299 300 func (s *AliasContext) MarshalJSON() ([]byte, error) { 301 type NoMethod AliasContext 302 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 303 } 304 305 // AnalysisCompleted: Indicates which analysis completed successfully. Multiple 306 // types of analysis can be performed on a single resource. 307 type AnalysisCompleted struct { 308 AnalysisType []string `json:"analysisType,omitempty"` 309 // ForceSendFields is a list of field names (e.g. "AnalysisType") to 310 // unconditionally include in API requests. By default, fields with empty or 311 // default values are omitted from API requests. See 312 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 313 // details. 314 ForceSendFields []string `json:"-"` 315 // NullFields is a list of field names (e.g. "AnalysisType") to include in API 316 // requests with the JSON null value. By default, fields with empty values are 317 // omitted from API requests. See 318 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 319 NullFields []string `json:"-"` 320 } 321 322 func (s *AnalysisCompleted) MarshalJSON() ([]byte, error) { 323 type NoMethod AnalysisCompleted 324 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 325 } 326 327 // Artifact: Artifact describes a build product. 328 type Artifact struct { 329 // Checksum: Hash or checksum value of a binary, or Docker Registry 2.0 digest 330 // of a container. 331 Checksum string `json:"checksum,omitempty"` 332 // Id: Artifact ID, if any; for container images, this will be a URL by digest 333 // like `gcr.io/projectID/imagename@sha256:123456`. 334 Id string `json:"id,omitempty"` 335 // Names: Related artifact names. This may be the path to a binary or jar file, 336 // or in the case of a container build, the name used to push the container 337 // image to Google Container Registry, as presented to `docker push`. Note that 338 // a single Artifact ID can have multiple names, for example if two tags are 339 // applied to one image. 340 Names []string `json:"names,omitempty"` 341 // ForceSendFields is a list of field names (e.g. "Checksum") to 342 // unconditionally include in API requests. By default, fields with empty or 343 // default values are omitted from API requests. See 344 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 345 // details. 346 ForceSendFields []string `json:"-"` 347 // NullFields is a list of field names (e.g. "Checksum") to include in API 348 // requests with the JSON null value. By default, fields with empty values are 349 // omitted from API requests. See 350 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 351 NullFields []string `json:"-"` 352 } 353 354 func (s *Artifact) MarshalJSON() ([]byte, error) { 355 type NoMethod Artifact 356 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 357 } 358 359 // Assessment: Assessment provides all information that is related to a single 360 // vulnerability for this product. 361 type Assessment struct { 362 // Cve: Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) 363 // tracking number for the vulnerability. Deprecated: Use vulnerability_id 364 // instead to denote CVEs. 365 Cve string `json:"cve,omitempty"` 366 // Impacts: Contains information about the impact of this vulnerability, this 367 // will change with time. 368 Impacts []string `json:"impacts,omitempty"` 369 // Justification: Justification provides the justification when the state of 370 // the assessment if NOT_AFFECTED. 371 Justification *Justification `json:"justification,omitempty"` 372 // LongDescription: A detailed description of this Vex. 373 LongDescription string `json:"longDescription,omitempty"` 374 // RelatedUris: Holds a list of references associated with this vulnerability 375 // item and assessment. These uris have additional information about the 376 // vulnerability and the assessment itself. E.g. Link to a document which 377 // details how this assessment concluded the state of this vulnerability. 378 RelatedUris []*RelatedUrl `json:"relatedUris,omitempty"` 379 // Remediations: Specifies details on how to handle (and presumably, fix) a 380 // vulnerability. 381 Remediations []*Remediation `json:"remediations,omitempty"` 382 // ShortDescription: A one sentence description of this Vex. 383 ShortDescription string `json:"shortDescription,omitempty"` 384 // State: Provides the state of this Vulnerability assessment. 385 // 386 // Possible values: 387 // "STATE_UNSPECIFIED" - No state is specified. 388 // "AFFECTED" - This product is known to be affected by this vulnerability. 389 // "NOT_AFFECTED" - This product is known to be not affected by this 390 // vulnerability. 391 // "FIXED" - This product contains a fix for this vulnerability. 392 // "UNDER_INVESTIGATION" - It is not known yet whether these versions are or 393 // are not affected by the vulnerability. However, it is still under 394 // investigation. 395 State string `json:"state,omitempty"` 396 // VulnerabilityId: The vulnerability identifier for this Assessment. Will hold 397 // one of common identifiers e.g. CVE, GHSA etc. 398 VulnerabilityId string `json:"vulnerabilityId,omitempty"` 399 // ForceSendFields is a list of field names (e.g. "Cve") to unconditionally 400 // include in API requests. By default, fields with empty or default values are 401 // omitted from API requests. See 402 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 403 // details. 404 ForceSendFields []string `json:"-"` 405 // NullFields is a list of field names (e.g. "Cve") to include in API requests 406 // with the JSON null value. By default, fields with empty values are omitted 407 // from API requests. See 408 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 409 NullFields []string `json:"-"` 410 } 411 412 func (s *Assessment) MarshalJSON() ([]byte, error) { 413 type NoMethod Assessment 414 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 415 } 416 417 // AttestationNote: Note kind that represents a logical attestation "role" or 418 // "authority". For example, an organization might have one `Authority` for 419 // "QA" and one for "build". This note is intended to act strictly as a 420 // grouping mechanism for the attached occurrences (Attestations). This 421 // grouping mechanism also provides a security boundary, since IAM ACLs gate 422 // the ability for a principle to attach an occurrence to a given note. It also 423 // provides a single point of lookup to find all attached attestation 424 // occurrences, even if they don't all live in the same project. 425 type AttestationNote struct { 426 // Hint: Hint hints at the purpose of the attestation authority. 427 Hint *Hint `json:"hint,omitempty"` 428 // ForceSendFields is a list of field names (e.g. "Hint") to unconditionally 429 // include in API requests. By default, fields with empty or default values are 430 // omitted from API requests. See 431 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 432 // details. 433 ForceSendFields []string `json:"-"` 434 // NullFields is a list of field names (e.g. "Hint") to include in API requests 435 // with the JSON null value. By default, fields with empty values are omitted 436 // from API requests. See 437 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 438 NullFields []string `json:"-"` 439 } 440 441 func (s *AttestationNote) MarshalJSON() ([]byte, error) { 442 type NoMethod AttestationNote 443 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 444 } 445 446 // AttestationOccurrence: Occurrence that represents a single "attestation". 447 // The authenticity of an attestation can be verified using the attached 448 // signature. If the verifier trusts the public key of the signer, then 449 // verifying the signature is sufficient to establish trust. In this 450 // circumstance, the authority to which this attestation is attached is 451 // primarily useful for lookup (how to find this attestation if you already 452 // know the authority and artifact to be verified) and intent (for which 453 // authority this attestation was intended to sign. 454 type AttestationOccurrence struct { 455 // Jwts: One or more JWTs encoding a self-contained attestation. Each JWT 456 // encodes the payload that it verifies within the JWT itself. Verifier 457 // implementation SHOULD ignore the `serialized_payload` field when verifying 458 // these JWTs. If only JWTs are present on this AttestationOccurrence, then the 459 // `serialized_payload` SHOULD be left empty. Each JWT SHOULD encode a claim 460 // specific to the `resource_uri` of this Occurrence, but this is not validated 461 // by Grafeas metadata API implementations. The JWT itself is opaque to 462 // Grafeas. 463 Jwts []*Jwt `json:"jwts,omitempty"` 464 // SerializedPayload: Required. The serialized payload that is verified by one 465 // or more `signatures`. 466 SerializedPayload string `json:"serializedPayload,omitempty"` 467 // Signatures: One or more signatures over `serialized_payload`. Verifier 468 // implementations should consider this attestation message verified if at 469 // least one `signature` verifies `serialized_payload`. See `Signature` in 470 // common.proto for more details on signature structure and verification. 471 Signatures []*Signature `json:"signatures,omitempty"` 472 // ForceSendFields is a list of field names (e.g. "Jwts") to unconditionally 473 // include in API requests. By default, fields with empty or default values are 474 // omitted from API requests. See 475 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 476 // details. 477 ForceSendFields []string `json:"-"` 478 // NullFields is a list of field names (e.g. "Jwts") to include in API requests 479 // with the JSON null value. By default, fields with empty values are omitted 480 // from API requests. See 481 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 482 NullFields []string `json:"-"` 483 } 484 485 func (s *AttestationOccurrence) MarshalJSON() ([]byte, error) { 486 type NoMethod AttestationOccurrence 487 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 488 } 489 490 // BatchCreateNotesRequest: Request to create notes in batch. 491 type BatchCreateNotesRequest struct { 492 // Notes: Required. The notes to create. Max allowed length is 1000. 493 Notes map[string]Note `json:"notes,omitempty"` 494 // ForceSendFields is a list of field names (e.g. "Notes") to unconditionally 495 // include in API requests. By default, fields with empty or default values are 496 // omitted from API requests. See 497 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 498 // details. 499 ForceSendFields []string `json:"-"` 500 // NullFields is a list of field names (e.g. "Notes") to include in API 501 // requests with the JSON null value. By default, fields with empty values are 502 // omitted from API requests. See 503 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 504 NullFields []string `json:"-"` 505 } 506 507 func (s *BatchCreateNotesRequest) MarshalJSON() ([]byte, error) { 508 type NoMethod BatchCreateNotesRequest 509 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 510 } 511 512 // BatchCreateNotesResponse: Response for creating notes in batch. 513 type BatchCreateNotesResponse struct { 514 // Notes: The notes that were created. 515 Notes []*Note `json:"notes,omitempty"` 516 517 // ServerResponse contains the HTTP response code and headers from the server. 518 googleapi.ServerResponse `json:"-"` 519 // ForceSendFields is a list of field names (e.g. "Notes") to unconditionally 520 // include in API requests. By default, fields with empty or default values are 521 // omitted from API requests. See 522 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 523 // details. 524 ForceSendFields []string `json:"-"` 525 // NullFields is a list of field names (e.g. "Notes") to include in API 526 // requests with the JSON null value. By default, fields with empty values are 527 // omitted from API requests. See 528 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 529 NullFields []string `json:"-"` 530 } 531 532 func (s *BatchCreateNotesResponse) MarshalJSON() ([]byte, error) { 533 type NoMethod BatchCreateNotesResponse 534 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 535 } 536 537 // BatchCreateOccurrencesRequest: Request to create occurrences in batch. 538 type BatchCreateOccurrencesRequest struct { 539 // Occurrences: Required. The occurrences to create. Max allowed length is 540 // 1000. 541 Occurrences []*Occurrence `json:"occurrences,omitempty"` 542 // ForceSendFields is a list of field names (e.g. "Occurrences") to 543 // unconditionally include in API requests. By default, fields with empty or 544 // default values are omitted from API requests. See 545 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 546 // details. 547 ForceSendFields []string `json:"-"` 548 // NullFields is a list of field names (e.g. "Occurrences") to include in API 549 // requests with the JSON null value. By default, fields with empty values are 550 // omitted from API requests. See 551 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 552 NullFields []string `json:"-"` 553 } 554 555 func (s *BatchCreateOccurrencesRequest) MarshalJSON() ([]byte, error) { 556 type NoMethod BatchCreateOccurrencesRequest 557 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 558 } 559 560 // BatchCreateOccurrencesResponse: Response for creating occurrences in batch. 561 type BatchCreateOccurrencesResponse struct { 562 // Occurrences: The occurrences that were created. 563 Occurrences []*Occurrence `json:"occurrences,omitempty"` 564 565 // ServerResponse contains the HTTP response code and headers from the server. 566 googleapi.ServerResponse `json:"-"` 567 // ForceSendFields is a list of field names (e.g. "Occurrences") 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. "Occurrences") to include in API 574 // requests with the JSON null value. By default, fields with empty values are 575 // 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 *BatchCreateOccurrencesResponse) MarshalJSON() ([]byte, error) { 581 type NoMethod BatchCreateOccurrencesResponse 582 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 583 } 584 585 // Binding: Associates `members`, or principals, with a `role`. 586 type Binding struct { 587 // Condition: The condition that is associated with this binding. If the 588 // condition evaluates to `true`, then this binding applies to the current 589 // request. If the condition evaluates to `false`, then this binding does not 590 // apply to the current request. However, a different role binding might grant 591 // the same role to one or more of the principals in this binding. To learn 592 // which resources support conditions in their IAM policies, see the IAM 593 // documentation 594 // (https://cloud.google.com/iam/help/conditions/resource-policies). 595 Condition *Expr `json:"condition,omitempty"` 596 // Members: Specifies the principals requesting access for a Google Cloud 597 // resource. `members` can have the following values: * `allUsers`: A special 598 // identifier that represents anyone who is on the internet; with or without a 599 // Google account. * `allAuthenticatedUsers`: A special identifier that 600 // represents anyone who is authenticated with a Google account or a service 601 // account. Does not include identities that come from external identity 602 // providers (IdPs) through identity federation. * `user:{emailid}`: An email 603 // address that represents a specific Google account. For example, 604 // `alice@example.com` . * `serviceAccount:{emailid}`: An email address that 605 // represents a Google service account. For example, 606 // `my-other-app@appspot.gserviceaccount.com`. * 607 // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An 608 // identifier for a Kubernetes service account 609 // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). 610 // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * 611 // `group:{emailid}`: An email address that represents a Google group. For 612 // example, `admins@example.com`. * `domain:{domain}`: The G Suite domain 613 // (primary) that represents all the users of that domain. For example, 614 // `google.com` or `example.com`. * 615 // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub 616 // ject/{subject_attribute_value}`: A single identity in a workforce identity 617 // pool. * 618 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 619 // group/{group_id}`: All workforce identities in a group. * 620 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 621 // attribute.{attribute_name}/{attribute_value}`: All workforce identities with 622 // a specific attribute value. * 623 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 624 // *`: All identities in a workforce identity pool. * 625 // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo 626 // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single 627 // identity in a workload identity pool. * 628 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 629 // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool 630 // group. * 631 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 632 // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} 633 // `: All identities in a workload identity pool with a certain attribute. * 634 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 635 // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity 636 // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus 637 // unique identifier) representing a user that has been recently deleted. For 638 // example, `alice@example.com?uid=123456789012345678901`. If the user is 639 // recovered, this value reverts to `user:{emailid}` and the recovered user 640 // retains the role in the binding. * 641 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus 642 // unique identifier) representing a service account that has been recently 643 // deleted. For example, 644 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the 645 // service account is undeleted, this value reverts to 646 // `serviceAccount:{emailid}` and the undeleted service account retains the 647 // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email 648 // address (plus unique identifier) representing a Google group that has been 649 // recently deleted. For example, 650 // `admins@example.com?uid=123456789012345678901`. If the group is recovered, 651 // this value reverts to `group:{emailid}` and the recovered group retains the 652 // role in the binding. * 653 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool 654 // _id}/subject/{subject_attribute_value}`: Deleted single identity in a 655 // workforce identity pool. For example, 656 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po 657 // ol-id/subject/my-subject-attribute-value`. 658 Members []string `json:"members,omitempty"` 659 // Role: Role that is assigned to the list of `members`, or principals. For 660 // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview 661 // of the IAM roles and permissions, see the IAM documentation 662 // (https://cloud.google.com/iam/docs/roles-overview). For a list of the 663 // available pre-defined roles, see here 664 // (https://cloud.google.com/iam/docs/understanding-roles). 665 Role string `json:"role,omitempty"` 666 // ForceSendFields is a list of field names (e.g. "Condition") to 667 // unconditionally include in API requests. By default, fields with empty or 668 // default values are omitted from API requests. See 669 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 670 // details. 671 ForceSendFields []string `json:"-"` 672 // NullFields is a list of field names (e.g. "Condition") to include in API 673 // requests with the JSON null value. By default, fields with empty values are 674 // omitted from API requests. See 675 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 676 NullFields []string `json:"-"` 677 } 678 679 func (s *Binding) MarshalJSON() ([]byte, error) { 680 type NoMethod Binding 681 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 682 } 683 684 type BuildDefinition struct { 685 BuildType string `json:"buildType,omitempty"` 686 ExternalParameters googleapi.RawMessage `json:"externalParameters,omitempty"` 687 InternalParameters googleapi.RawMessage `json:"internalParameters,omitempty"` 688 ResolvedDependencies []*ResourceDescriptor `json:"resolvedDependencies,omitempty"` 689 // ForceSendFields is a list of field names (e.g. "BuildType") to 690 // unconditionally include in API requests. By default, fields with empty or 691 // default values are omitted from API requests. See 692 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 693 // details. 694 ForceSendFields []string `json:"-"` 695 // NullFields is a list of field names (e.g. "BuildType") to include in API 696 // requests with the JSON null value. By default, fields with empty values are 697 // omitted from API requests. See 698 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 699 NullFields []string `json:"-"` 700 } 701 702 func (s *BuildDefinition) MarshalJSON() ([]byte, error) { 703 type NoMethod BuildDefinition 704 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 705 } 706 707 type BuildMetadata struct { 708 FinishedOn string `json:"finishedOn,omitempty"` 709 InvocationId string `json:"invocationId,omitempty"` 710 StartedOn string `json:"startedOn,omitempty"` 711 // ForceSendFields is a list of field names (e.g. "FinishedOn") to 712 // unconditionally include in API requests. By default, fields with empty or 713 // default values are omitted from API requests. See 714 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 715 // details. 716 ForceSendFields []string `json:"-"` 717 // NullFields is a list of field names (e.g. "FinishedOn") to include in API 718 // requests with the JSON null value. By default, fields with empty values are 719 // omitted from API requests. See 720 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 721 NullFields []string `json:"-"` 722 } 723 724 func (s *BuildMetadata) MarshalJSON() ([]byte, error) { 725 type NoMethod BuildMetadata 726 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 727 } 728 729 // BuildNote: Note holding the version of the provider's builder and the 730 // signature of the provenance message in the build details occurrence. 731 type BuildNote struct { 732 // BuilderVersion: Required. Immutable. Version of the builder which produced 733 // this build. 734 BuilderVersion string `json:"builderVersion,omitempty"` 735 // ForceSendFields is a list of field names (e.g. "BuilderVersion") to 736 // unconditionally include in API requests. By default, fields with empty or 737 // default values are omitted from API requests. See 738 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 739 // details. 740 ForceSendFields []string `json:"-"` 741 // NullFields is a list of field names (e.g. "BuilderVersion") to include in 742 // API requests with the JSON null value. By default, fields with empty values 743 // are omitted from API requests. See 744 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 745 NullFields []string `json:"-"` 746 } 747 748 func (s *BuildNote) MarshalJSON() ([]byte, error) { 749 type NoMethod BuildNote 750 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 751 } 752 753 // BuildOccurrence: Details of a build occurrence. 754 type BuildOccurrence struct { 755 // InTotoSlsaProvenanceV1: In-Toto Slsa Provenance V1 represents a slsa 756 // provenance meeting the slsa spec, wrapped in an in-toto statement. This 757 // allows for direct jsonification of a to-spec in-toto slsa statement with a 758 // to-spec slsa provenance. 759 InTotoSlsaProvenanceV1 *InTotoSlsaProvenanceV1 `json:"inTotoSlsaProvenanceV1,omitempty"` 760 // IntotoProvenance: Deprecated. See InTotoStatement for the replacement. 761 // In-toto Provenance representation as defined in spec. 762 IntotoProvenance *InTotoProvenance `json:"intotoProvenance,omitempty"` 763 // IntotoStatement: In-toto Statement representation as defined in spec. The 764 // intoto_statement can contain any type of provenance. The serialized payload 765 // of the statement can be stored and signed in the Occurrence's envelope. 766 IntotoStatement *InTotoStatement `json:"intotoStatement,omitempty"` 767 // Provenance: The actual provenance for the build. 768 Provenance *BuildProvenance `json:"provenance,omitempty"` 769 // ProvenanceBytes: Serialized JSON representation of the provenance, used in 770 // generating the build signature in the corresponding build note. After 771 // verifying the signature, `provenance_bytes` can be unmarshalled and compared 772 // to the provenance to confirm that it is unchanged. A base64-encoded string 773 // representation of the provenance bytes is used for the signature in order to 774 // interoperate with openssl which expects this format for signature 775 // verification. The serialized form is captured both to avoid ambiguity in how 776 // the provenance is marshalled to json as well to prevent incompatibilities 777 // with future changes. 778 ProvenanceBytes string `json:"provenanceBytes,omitempty"` 779 // ForceSendFields is a list of field names (e.g. "InTotoSlsaProvenanceV1") to 780 // unconditionally include in API requests. By default, fields with empty or 781 // default values are omitted from API requests. See 782 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 783 // details. 784 ForceSendFields []string `json:"-"` 785 // NullFields is a list of field names (e.g. "InTotoSlsaProvenanceV1") to 786 // include in API requests with the JSON null value. By default, fields with 787 // empty values are omitted from API requests. See 788 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 789 NullFields []string `json:"-"` 790 } 791 792 func (s *BuildOccurrence) MarshalJSON() ([]byte, error) { 793 type NoMethod BuildOccurrence 794 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 795 } 796 797 // BuildProvenance: Provenance of a build. Contains all information needed to 798 // verify the full details about the build from source to completion. 799 type BuildProvenance struct { 800 // BuildOptions: Special options applied to this build. This is a catch-all 801 // field where build providers can enter any desired additional details. 802 BuildOptions map[string]string `json:"buildOptions,omitempty"` 803 // BuilderVersion: Version string of the builder at the time this build was 804 // executed. 805 BuilderVersion string `json:"builderVersion,omitempty"` 806 // BuiltArtifacts: Output of the build. 807 BuiltArtifacts []*Artifact `json:"builtArtifacts,omitempty"` 808 // Commands: Commands requested by the build. 809 Commands []*Command `json:"commands,omitempty"` 810 // CreateTime: Time at which the build was created. 811 CreateTime string `json:"createTime,omitempty"` 812 // Creator: E-mail address of the user who initiated this build. Note that this 813 // was the user's e-mail address at the time the build was initiated; this 814 // address may not represent the same end-user for all time. 815 Creator string `json:"creator,omitempty"` 816 // EndTime: Time at which execution of the build was finished. 817 EndTime string `json:"endTime,omitempty"` 818 // Id: Required. Unique identifier of the build. 819 Id string `json:"id,omitempty"` 820 // LogsUri: URI where any logs for this provenance were written. 821 LogsUri string `json:"logsUri,omitempty"` 822 // ProjectId: ID of the project. 823 ProjectId string `json:"projectId,omitempty"` 824 // SourceProvenance: Details of the Source input to the build. 825 SourceProvenance *Source `json:"sourceProvenance,omitempty"` 826 // StartTime: Time at which execution of the build was started. 827 StartTime string `json:"startTime,omitempty"` 828 // TriggerId: Trigger identifier if the build was triggered automatically; 829 // empty if not. 830 TriggerId string `json:"triggerId,omitempty"` 831 // ForceSendFields is a list of field names (e.g. "BuildOptions") to 832 // unconditionally include in API requests. By default, fields with empty or 833 // default values are omitted from API requests. See 834 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 835 // details. 836 ForceSendFields []string `json:"-"` 837 // NullFields is a list of field names (e.g. "BuildOptions") to include in API 838 // requests with the JSON null value. By default, fields with empty values are 839 // omitted from API requests. See 840 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 841 NullFields []string `json:"-"` 842 } 843 844 func (s *BuildProvenance) MarshalJSON() ([]byte, error) { 845 type NoMethod BuildProvenance 846 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 847 } 848 849 // BuildStep: A step in the build pipeline. Next ID: 21 850 type BuildStep struct { 851 // AllowExitCodes: Allow this build step to fail without failing the entire 852 // build if and only if the exit code is one of the specified codes. If 853 // allow_failure is also specified, this field will take precedence. 854 AllowExitCodes []int64 `json:"allowExitCodes,omitempty"` 855 // AllowFailure: Allow this build step to fail without failing the entire 856 // build. If false, the entire build will fail if this step fails. Otherwise, 857 // the build will succeed, but this step will still have a failure status. 858 // Error information will be reported in the failure_detail field. 859 AllowFailure bool `json:"allowFailure,omitempty"` 860 // Args: A list of arguments that will be presented to the step when it is 861 // started. If the image used to run the step's container has an entrypoint, 862 // the `args` are used as arguments to that entrypoint. If the image does not 863 // define an entrypoint, the first element in args is used as the entrypoint, 864 // and the remainder will be used as arguments. 865 Args []string `json:"args,omitempty"` 866 // AutomapSubstitutions: Option to include built-in and custom substitutions as 867 // env variables for this build step. This option will override the global 868 // option in BuildOption. 869 AutomapSubstitutions bool `json:"automapSubstitutions,omitempty"` 870 // Dir: Working directory to use when running this step's container. If this 871 // value is a relative path, it is relative to the build's working directory. 872 // If this value is absolute, it may be outside the build's working directory, 873 // in which case the contents of the path may not be persisted across build 874 // step executions, unless a `volume` for that path is specified. If the build 875 // specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies 876 // an absolute path, the `RepoSource` `dir` is ignored for the step's 877 // execution. 878 Dir string `json:"dir,omitempty"` 879 // Entrypoint: Entrypoint to be used instead of the build step image's default 880 // entrypoint. If unset, the image's default entrypoint is used. 881 Entrypoint string `json:"entrypoint,omitempty"` 882 // Env: A list of environment variable definitions to be used when running a 883 // step. The elements are of the form "KEY=VALUE" for the environment variable 884 // "KEY" being given the value "VALUE". 885 Env []string `json:"env,omitempty"` 886 // ExitCode: Output only. Return code from running the step. 887 ExitCode int64 `json:"exitCode,omitempty"` 888 // Id: Unique identifier for this build step, used in `wait_for` to reference 889 // this build step as a dependency. 890 Id string `json:"id,omitempty"` 891 // Name: Required. The name of the container image that will run this 892 // particular build step. If the image is available in the host's Docker 893 // daemon's cache, it will be run directly. If not, the host will attempt to 894 // pull the image first, using the builder service account's credentials if 895 // necessary. The Docker daemon's cache will already have the latest versions 896 // of all of the officially supported build steps 897 // (https://github.com/GoogleCloudPlatform/cloud-builders 898 // (https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon 899 // will also have cached many of the layers for some popular images, like 900 // "ubuntu", "debian", but they will be refreshed at the time you attempt to 901 // use them. If you built an image in a previous build step, it will be stored 902 // in the host's Docker daemon's cache and is available to use as the name for 903 // a later build step. 904 Name string `json:"name,omitempty"` 905 // PullTiming: Output only. Stores timing information for pulling this build 906 // step's builder image only. 907 PullTiming *TimeSpan `json:"pullTiming,omitempty"` 908 // Script: A shell script to be executed in the step. When script is provided, 909 // the user cannot specify the entrypoint or args. 910 Script string `json:"script,omitempty"` 911 // SecretEnv: A list of environment variables which are encrypted using a Cloud 912 // Key Management Service crypto key. These values must be specified in the 913 // build's `Secret`. 914 SecretEnv []string `json:"secretEnv,omitempty"` 915 // Status: Output only. Status of the build step. At this time, build step 916 // status is only updated on build completion; step status is not updated in 917 // real-time as the build progresses. 918 // 919 // Possible values: 920 // "STATUS_UNKNOWN" - Status of the build is unknown. 921 // "PENDING" - Build has been created and is pending execution and queuing. 922 // It has not been queued. 923 // "QUEUING" - Build has been received and is being queued. 924 // "QUEUED" - Build or step is queued; work has not yet begun. 925 // "WORKING" - Build or step is being executed. 926 // "SUCCESS" - Build or step finished successfully. 927 // "FAILURE" - Build or step failed to complete successfully. 928 // "INTERNAL_ERROR" - Build or step failed due to an internal cause. 929 // "TIMEOUT" - Build or step took longer than was allowed. 930 // "CANCELLED" - Build or step was canceled by a user. 931 // "EXPIRED" - Build was enqueued for longer than the value of `queue_ttl`. 932 Status string `json:"status,omitempty"` 933 // Timeout: Time limit for executing this build step. If not defined, the step 934 // has no time limit and will be allowed to continue to run until either it 935 // completes or the build itself times out. 936 Timeout string `json:"timeout,omitempty"` 937 // Timing: Output only. Stores timing information for executing this build 938 // step. 939 Timing *TimeSpan `json:"timing,omitempty"` 940 // Volumes: List of volumes to mount into the build step. Each volume is 941 // created as an empty volume prior to execution of the build step. Upon 942 // completion of the build, volumes and their contents are discarded. Using a 943 // named volume in only one step is not valid as it is indicative of a build 944 // request with an incorrect configuration. 945 Volumes []*Volume `json:"volumes,omitempty"` 946 // WaitFor: The ID(s) of the step(s) that this build step depends on. This 947 // build step will not start until all the build steps in `wait_for` have 948 // completed successfully. If `wait_for` is empty, this build step will start 949 // when all previous build steps in the `Build.Steps` list have completed 950 // successfully. 951 WaitFor []string `json:"waitFor,omitempty"` 952 // ForceSendFields is a list of field names (e.g. "AllowExitCodes") to 953 // unconditionally include in API requests. By default, fields with empty or 954 // default values are omitted from API requests. See 955 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 956 // details. 957 ForceSendFields []string `json:"-"` 958 // NullFields is a list of field names (e.g. "AllowExitCodes") to include in 959 // API requests with the JSON null value. By default, fields with empty values 960 // are omitted from API requests. See 961 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 962 NullFields []string `json:"-"` 963 } 964 965 func (s *BuildStep) MarshalJSON() ([]byte, error) { 966 type NoMethod BuildStep 967 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 968 } 969 970 type BuilderConfig struct { 971 Id string `json:"id,omitempty"` 972 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 973 // include in API requests. By default, fields with empty or default values are 974 // omitted from API requests. See 975 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 976 // details. 977 ForceSendFields []string `json:"-"` 978 // NullFields is a list of field names (e.g. "Id") to include in API requests 979 // with the JSON null value. By default, fields with empty values are omitted 980 // from API requests. See 981 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 982 NullFields []string `json:"-"` 983 } 984 985 func (s *BuilderConfig) MarshalJSON() ([]byte, error) { 986 type NoMethod BuilderConfig 987 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 988 } 989 990 // CVSS: Common Vulnerability Scoring System. For details, see 991 // https://www.first.org/cvss/specification-document This is a message we will 992 // try to use for storing various versions of CVSS rather than making a 993 // separate proto for storing a specific version. 994 type CVSS struct { 995 // Possible values: 996 // "ATTACK_COMPLEXITY_UNSPECIFIED" 997 // "ATTACK_COMPLEXITY_LOW" 998 // "ATTACK_COMPLEXITY_HIGH" 999 // "ATTACK_COMPLEXITY_MEDIUM" 1000 AttackComplexity string `json:"attackComplexity,omitempty"` 1001 // AttackVector: Base Metrics Represents the intrinsic characteristics of a 1002 // vulnerability that are constant over time and across user environments. 1003 // 1004 // Possible values: 1005 // "ATTACK_VECTOR_UNSPECIFIED" 1006 // "ATTACK_VECTOR_NETWORK" 1007 // "ATTACK_VECTOR_ADJACENT" 1008 // "ATTACK_VECTOR_LOCAL" 1009 // "ATTACK_VECTOR_PHYSICAL" 1010 AttackVector string `json:"attackVector,omitempty"` 1011 // Possible values: 1012 // "AUTHENTICATION_UNSPECIFIED" 1013 // "AUTHENTICATION_MULTIPLE" 1014 // "AUTHENTICATION_SINGLE" 1015 // "AUTHENTICATION_NONE" 1016 Authentication string `json:"authentication,omitempty"` 1017 // Possible values: 1018 // "IMPACT_UNSPECIFIED" 1019 // "IMPACT_HIGH" 1020 // "IMPACT_LOW" 1021 // "IMPACT_NONE" 1022 // "IMPACT_PARTIAL" 1023 // "IMPACT_COMPLETE" 1024 AvailabilityImpact string `json:"availabilityImpact,omitempty"` 1025 // BaseScore: The base score is a function of the base metric scores. 1026 BaseScore float64 `json:"baseScore,omitempty"` 1027 // Possible values: 1028 // "IMPACT_UNSPECIFIED" 1029 // "IMPACT_HIGH" 1030 // "IMPACT_LOW" 1031 // "IMPACT_NONE" 1032 // "IMPACT_PARTIAL" 1033 // "IMPACT_COMPLETE" 1034 ConfidentialityImpact string `json:"confidentialityImpact,omitempty"` 1035 ExploitabilityScore float64 `json:"exploitabilityScore,omitempty"` 1036 ImpactScore float64 `json:"impactScore,omitempty"` 1037 // Possible values: 1038 // "IMPACT_UNSPECIFIED" 1039 // "IMPACT_HIGH" 1040 // "IMPACT_LOW" 1041 // "IMPACT_NONE" 1042 // "IMPACT_PARTIAL" 1043 // "IMPACT_COMPLETE" 1044 IntegrityImpact string `json:"integrityImpact,omitempty"` 1045 // Possible values: 1046 // "PRIVILEGES_REQUIRED_UNSPECIFIED" 1047 // "PRIVILEGES_REQUIRED_NONE" 1048 // "PRIVILEGES_REQUIRED_LOW" 1049 // "PRIVILEGES_REQUIRED_HIGH" 1050 PrivilegesRequired string `json:"privilegesRequired,omitempty"` 1051 // Possible values: 1052 // "SCOPE_UNSPECIFIED" 1053 // "SCOPE_UNCHANGED" 1054 // "SCOPE_CHANGED" 1055 Scope string `json:"scope,omitempty"` 1056 // Possible values: 1057 // "USER_INTERACTION_UNSPECIFIED" 1058 // "USER_INTERACTION_NONE" 1059 // "USER_INTERACTION_REQUIRED" 1060 UserInteraction string `json:"userInteraction,omitempty"` 1061 // ForceSendFields is a list of field names (e.g. "AttackComplexity") to 1062 // unconditionally include in API requests. By default, fields with empty or 1063 // default values are omitted from API requests. See 1064 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1065 // details. 1066 ForceSendFields []string `json:"-"` 1067 // NullFields is a list of field names (e.g. "AttackComplexity") to include in 1068 // API requests with the JSON null value. By default, fields with empty values 1069 // are omitted from API requests. See 1070 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1071 NullFields []string `json:"-"` 1072 } 1073 1074 func (s *CVSS) MarshalJSON() ([]byte, error) { 1075 type NoMethod CVSS 1076 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1077 } 1078 1079 func (s *CVSS) UnmarshalJSON(data []byte) error { 1080 type NoMethod CVSS 1081 var s1 struct { 1082 BaseScore gensupport.JSONFloat64 `json:"baseScore"` 1083 ExploitabilityScore gensupport.JSONFloat64 `json:"exploitabilityScore"` 1084 ImpactScore gensupport.JSONFloat64 `json:"impactScore"` 1085 *NoMethod 1086 } 1087 s1.NoMethod = (*NoMethod)(s) 1088 if err := json.Unmarshal(data, &s1); err != nil { 1089 return err 1090 } 1091 s.BaseScore = float64(s1.BaseScore) 1092 s.ExploitabilityScore = float64(s1.ExploitabilityScore) 1093 s.ImpactScore = float64(s1.ImpactScore) 1094 return nil 1095 } 1096 1097 // CVSSv3: Common Vulnerability Scoring System version 3. For details, see 1098 // https://www.first.org/cvss/specification-document 1099 type CVSSv3 struct { 1100 // Possible values: 1101 // "ATTACK_COMPLEXITY_UNSPECIFIED" 1102 // "ATTACK_COMPLEXITY_LOW" 1103 // "ATTACK_COMPLEXITY_HIGH" 1104 AttackComplexity string `json:"attackComplexity,omitempty"` 1105 // AttackVector: Base Metrics Represents the intrinsic characteristics of a 1106 // vulnerability that are constant over time and across user environments. 1107 // 1108 // Possible values: 1109 // "ATTACK_VECTOR_UNSPECIFIED" 1110 // "ATTACK_VECTOR_NETWORK" 1111 // "ATTACK_VECTOR_ADJACENT" 1112 // "ATTACK_VECTOR_LOCAL" 1113 // "ATTACK_VECTOR_PHYSICAL" 1114 AttackVector string `json:"attackVector,omitempty"` 1115 // Possible values: 1116 // "IMPACT_UNSPECIFIED" 1117 // "IMPACT_HIGH" 1118 // "IMPACT_LOW" 1119 // "IMPACT_NONE" 1120 AvailabilityImpact string `json:"availabilityImpact,omitempty"` 1121 // BaseScore: The base score is a function of the base metric scores. 1122 BaseScore float64 `json:"baseScore,omitempty"` 1123 // Possible values: 1124 // "IMPACT_UNSPECIFIED" 1125 // "IMPACT_HIGH" 1126 // "IMPACT_LOW" 1127 // "IMPACT_NONE" 1128 ConfidentialityImpact string `json:"confidentialityImpact,omitempty"` 1129 ExploitabilityScore float64 `json:"exploitabilityScore,omitempty"` 1130 ImpactScore float64 `json:"impactScore,omitempty"` 1131 // Possible values: 1132 // "IMPACT_UNSPECIFIED" 1133 // "IMPACT_HIGH" 1134 // "IMPACT_LOW" 1135 // "IMPACT_NONE" 1136 IntegrityImpact string `json:"integrityImpact,omitempty"` 1137 // Possible values: 1138 // "PRIVILEGES_REQUIRED_UNSPECIFIED" 1139 // "PRIVILEGES_REQUIRED_NONE" 1140 // "PRIVILEGES_REQUIRED_LOW" 1141 // "PRIVILEGES_REQUIRED_HIGH" 1142 PrivilegesRequired string `json:"privilegesRequired,omitempty"` 1143 // Possible values: 1144 // "SCOPE_UNSPECIFIED" 1145 // "SCOPE_UNCHANGED" 1146 // "SCOPE_CHANGED" 1147 Scope string `json:"scope,omitempty"` 1148 // Possible values: 1149 // "USER_INTERACTION_UNSPECIFIED" 1150 // "USER_INTERACTION_NONE" 1151 // "USER_INTERACTION_REQUIRED" 1152 UserInteraction string `json:"userInteraction,omitempty"` 1153 // ForceSendFields is a list of field names (e.g. "AttackComplexity") to 1154 // unconditionally include in API requests. By default, fields with empty or 1155 // default values are omitted from API requests. See 1156 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1157 // details. 1158 ForceSendFields []string `json:"-"` 1159 // NullFields is a list of field names (e.g. "AttackComplexity") to include in 1160 // API requests with the JSON null value. By default, fields with empty values 1161 // are omitted from API requests. See 1162 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1163 NullFields []string `json:"-"` 1164 } 1165 1166 func (s *CVSSv3) MarshalJSON() ([]byte, error) { 1167 type NoMethod CVSSv3 1168 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1169 } 1170 1171 func (s *CVSSv3) UnmarshalJSON(data []byte) error { 1172 type NoMethod CVSSv3 1173 var s1 struct { 1174 BaseScore gensupport.JSONFloat64 `json:"baseScore"` 1175 ExploitabilityScore gensupport.JSONFloat64 `json:"exploitabilityScore"` 1176 ImpactScore gensupport.JSONFloat64 `json:"impactScore"` 1177 *NoMethod 1178 } 1179 s1.NoMethod = (*NoMethod)(s) 1180 if err := json.Unmarshal(data, &s1); err != nil { 1181 return err 1182 } 1183 s.BaseScore = float64(s1.BaseScore) 1184 s.ExploitabilityScore = float64(s1.ExploitabilityScore) 1185 s.ImpactScore = float64(s1.ImpactScore) 1186 return nil 1187 } 1188 1189 // Category: The category to which the update belongs. 1190 type Category struct { 1191 // CategoryId: The identifier of the category. 1192 CategoryId string `json:"categoryId,omitempty"` 1193 // Name: The localized name of the category. 1194 Name string `json:"name,omitempty"` 1195 // ForceSendFields is a list of field names (e.g. "CategoryId") to 1196 // unconditionally include in API requests. By default, fields with empty or 1197 // default values are omitted from API requests. See 1198 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1199 // details. 1200 ForceSendFields []string `json:"-"` 1201 // NullFields is a list of field names (e.g. "CategoryId") to include in API 1202 // requests with the JSON null value. By default, fields with empty values are 1203 // omitted from API requests. See 1204 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1205 NullFields []string `json:"-"` 1206 } 1207 1208 func (s *Category) MarshalJSON() ([]byte, error) { 1209 type NoMethod Category 1210 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1211 } 1212 1213 // CisBenchmark: A compliance check that is a CIS benchmark. 1214 type CisBenchmark struct { 1215 ProfileLevel int64 `json:"profileLevel,omitempty"` 1216 // Possible values: 1217 // "SEVERITY_UNSPECIFIED" - Unknown. 1218 // "MINIMAL" - Minimal severity. 1219 // "LOW" - Low severity. 1220 // "MEDIUM" - Medium severity. 1221 // "HIGH" - High severity. 1222 // "CRITICAL" - Critical severity. 1223 Severity string `json:"severity,omitempty"` 1224 // ForceSendFields is a list of field names (e.g. "ProfileLevel") to 1225 // unconditionally include in API requests. By default, fields with empty or 1226 // default values are omitted from API requests. See 1227 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1228 // details. 1229 ForceSendFields []string `json:"-"` 1230 // NullFields is a list of field names (e.g. "ProfileLevel") to include in API 1231 // requests with the JSON null value. By default, fields with empty values are 1232 // omitted from API requests. See 1233 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1234 NullFields []string `json:"-"` 1235 } 1236 1237 func (s *CisBenchmark) MarshalJSON() ([]byte, error) { 1238 type NoMethod CisBenchmark 1239 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1240 } 1241 1242 // CloudRepoSourceContext: A CloudRepoSourceContext denotes a particular 1243 // revision in a Google Cloud Source Repo. 1244 type CloudRepoSourceContext struct { 1245 // AliasContext: An alias, which may be a branch or tag. 1246 AliasContext *AliasContext `json:"aliasContext,omitempty"` 1247 // RepoId: The ID of the repo. 1248 RepoId *RepoId `json:"repoId,omitempty"` 1249 // RevisionId: A revision ID. 1250 RevisionId string `json:"revisionId,omitempty"` 1251 // ForceSendFields is a list of field names (e.g. "AliasContext") to 1252 // unconditionally include in API requests. By default, fields with empty or 1253 // default values are omitted from API requests. See 1254 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1255 // details. 1256 ForceSendFields []string `json:"-"` 1257 // NullFields is a list of field names (e.g. "AliasContext") to include in API 1258 // requests with the JSON null value. By default, fields with empty values are 1259 // omitted from API requests. See 1260 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1261 NullFields []string `json:"-"` 1262 } 1263 1264 func (s *CloudRepoSourceContext) MarshalJSON() ([]byte, error) { 1265 type NoMethod CloudRepoSourceContext 1266 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1267 } 1268 1269 // CloudStorageLocation: Empty placeholder to denote that this is a Google 1270 // Cloud Storage export request. 1271 type CloudStorageLocation struct { 1272 } 1273 1274 // Command: Command describes a step performed as part of the build pipeline. 1275 type Command struct { 1276 // Args: Command-line arguments used when executing this command. 1277 Args []string `json:"args,omitempty"` 1278 // Dir: Working directory (relative to project source root) used when running 1279 // this command. 1280 Dir string `json:"dir,omitempty"` 1281 // Env: Environment variables set before running this command. 1282 Env []string `json:"env,omitempty"` 1283 // Id: Optional unique identifier for this command, used in wait_for to 1284 // reference this command as a dependency. 1285 Id string `json:"id,omitempty"` 1286 // Name: Required. Name of the command, as presented on the command line, or if 1287 // the command is packaged as a Docker container, as presented to `docker 1288 // pull`. 1289 Name string `json:"name,omitempty"` 1290 // WaitFor: The ID(s) of the command(s) that this command depends on. 1291 WaitFor []string `json:"waitFor,omitempty"` 1292 // ForceSendFields is a list of field names (e.g. "Args") to unconditionally 1293 // include in API requests. By default, fields with empty or default values are 1294 // omitted from API requests. See 1295 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1296 // details. 1297 ForceSendFields []string `json:"-"` 1298 // NullFields is a list of field names (e.g. "Args") to include in API requests 1299 // with the JSON null value. By default, fields with empty values are omitted 1300 // from API requests. See 1301 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1302 NullFields []string `json:"-"` 1303 } 1304 1305 func (s *Command) MarshalJSON() ([]byte, error) { 1306 type NoMethod Command 1307 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1308 } 1309 1310 // Completeness: Indicates that the builder claims certain fields in this 1311 // message to be complete. 1312 type Completeness struct { 1313 // Arguments: If true, the builder claims that recipe.arguments is complete, 1314 // meaning that all external inputs are properly captured in the recipe. 1315 Arguments bool `json:"arguments,omitempty"` 1316 // Environment: If true, the builder claims that recipe.environment is claimed 1317 // to be complete. 1318 Environment bool `json:"environment,omitempty"` 1319 // Materials: If true, the builder claims that materials are complete, usually 1320 // through some controls to prevent network access. Sometimes called 1321 // "hermetic". 1322 Materials bool `json:"materials,omitempty"` 1323 // ForceSendFields is a list of field names (e.g. "Arguments") to 1324 // unconditionally include in API requests. By default, fields with empty or 1325 // default values are omitted from API requests. See 1326 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1327 // details. 1328 ForceSendFields []string `json:"-"` 1329 // NullFields is a list of field names (e.g. "Arguments") to include in API 1330 // requests with the JSON null value. By default, fields with empty values are 1331 // omitted from API requests. See 1332 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1333 NullFields []string `json:"-"` 1334 } 1335 1336 func (s *Completeness) MarshalJSON() ([]byte, error) { 1337 type NoMethod Completeness 1338 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1339 } 1340 1341 type ComplianceNote struct { 1342 CisBenchmark *CisBenchmark `json:"cisBenchmark,omitempty"` 1343 // Description: A description about this compliance check. 1344 Description string `json:"description,omitempty"` 1345 Impact string `json:"impact,omitempty"` 1346 // Rationale: A rationale for the existence of this compliance check. 1347 Rationale string `json:"rationale,omitempty"` 1348 // Remediation: A description of remediation steps if the compliance check 1349 // fails. 1350 Remediation string `json:"remediation,omitempty"` 1351 // ScanInstructions: Serialized scan instructions with a predefined format. 1352 ScanInstructions string `json:"scanInstructions,omitempty"` 1353 // Title: The title that identifies this compliance check. 1354 Title string `json:"title,omitempty"` 1355 // Version: The OS and config versions the benchmark applies to. 1356 Version []*ComplianceVersion `json:"version,omitempty"` 1357 // ForceSendFields is a list of field names (e.g. "CisBenchmark") to 1358 // unconditionally include in API requests. By default, fields with empty or 1359 // default values are omitted from API requests. See 1360 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1361 // details. 1362 ForceSendFields []string `json:"-"` 1363 // NullFields is a list of field names (e.g. "CisBenchmark") to include in API 1364 // requests with the JSON null value. By default, fields with empty values are 1365 // omitted from API requests. See 1366 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1367 NullFields []string `json:"-"` 1368 } 1369 1370 func (s *ComplianceNote) MarshalJSON() ([]byte, error) { 1371 type NoMethod ComplianceNote 1372 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1373 } 1374 1375 // ComplianceOccurrence: An indication that the compliance checks in the 1376 // associated ComplianceNote were not satisfied for particular resources or a 1377 // specified reason. 1378 type ComplianceOccurrence struct { 1379 NonComplianceReason string `json:"nonComplianceReason,omitempty"` 1380 NonCompliantFiles []*NonCompliantFile `json:"nonCompliantFiles,omitempty"` 1381 // Version: The OS and config version the benchmark was run on. 1382 Version *ComplianceVersion `json:"version,omitempty"` 1383 // ForceSendFields is a list of field names (e.g. "NonComplianceReason") to 1384 // unconditionally include in API requests. By default, fields with empty or 1385 // default values are omitted from API requests. See 1386 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1387 // details. 1388 ForceSendFields []string `json:"-"` 1389 // NullFields is a list of field names (e.g. "NonComplianceReason") to include 1390 // in API requests with the JSON null value. By default, fields with empty 1391 // values are omitted from API requests. See 1392 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1393 NullFields []string `json:"-"` 1394 } 1395 1396 func (s *ComplianceOccurrence) MarshalJSON() ([]byte, error) { 1397 type NoMethod ComplianceOccurrence 1398 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1399 } 1400 1401 // ComplianceVersion: Describes the CIS benchmark version that is applicable to 1402 // a given OS and os version. 1403 type ComplianceVersion struct { 1404 // BenchmarkDocument: The name of the document that defines this benchmark, 1405 // e.g. "CIS Container-Optimized OS". 1406 BenchmarkDocument string `json:"benchmarkDocument,omitempty"` 1407 // CpeUri: The CPE URI (https://cpe.mitre.org/specification/) this benchmark is 1408 // applicable to. 1409 CpeUri string `json:"cpeUri,omitempty"` 1410 // Version: The version of the benchmark. This is set to the version of the 1411 // OS-specific CIS document the benchmark is defined in. 1412 Version string `json:"version,omitempty"` 1413 // ForceSendFields is a list of field names (e.g. "BenchmarkDocument") to 1414 // unconditionally include in API requests. By default, fields with empty or 1415 // default values are omitted from API requests. See 1416 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1417 // details. 1418 ForceSendFields []string `json:"-"` 1419 // NullFields is a list of field names (e.g. "BenchmarkDocument") to include in 1420 // API requests with the JSON null value. By default, fields with empty values 1421 // are omitted from API requests. See 1422 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1423 NullFields []string `json:"-"` 1424 } 1425 1426 func (s *ComplianceVersion) MarshalJSON() ([]byte, error) { 1427 type NoMethod ComplianceVersion 1428 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1429 } 1430 1431 // ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalConfig: ApprovalConfig 1432 // describes configuration for manual approval of a build. 1433 type ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalConfig struct { 1434 // ApprovalRequired: Whether or not approval is needed. If this is set on a 1435 // build, it will become pending when created, and will need to be explicitly 1436 // approved to start. 1437 ApprovalRequired bool `json:"approvalRequired,omitempty"` 1438 // ForceSendFields is a list of field names (e.g. "ApprovalRequired") to 1439 // unconditionally include in API requests. By default, fields with empty or 1440 // default values are omitted from API requests. See 1441 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1442 // details. 1443 ForceSendFields []string `json:"-"` 1444 // NullFields is a list of field names (e.g. "ApprovalRequired") to include in 1445 // API requests with the JSON null value. By default, fields with empty values 1446 // are omitted from API requests. See 1447 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1448 NullFields []string `json:"-"` 1449 } 1450 1451 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalConfig) MarshalJSON() ([]byte, error) { 1452 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalConfig 1453 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1454 } 1455 1456 // ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalResult: ApprovalResult 1457 // describes the decision and associated metadata of a manual approval of a 1458 // build. 1459 type ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalResult struct { 1460 // ApprovalTime: Output only. The time when the approval decision was made. 1461 ApprovalTime string `json:"approvalTime,omitempty"` 1462 // ApproverAccount: Output only. Email of the user that called the ApproveBuild 1463 // API to approve or reject a build at the time that the API was called. 1464 ApproverAccount string `json:"approverAccount,omitempty"` 1465 // Comment: Optional. An optional comment for this manual approval result. 1466 Comment string `json:"comment,omitempty"` 1467 // Decision: Required. The decision of this manual approval. 1468 // 1469 // Possible values: 1470 // "DECISION_UNSPECIFIED" - Default enum type. This should not be used. 1471 // "APPROVED" - Build is approved. 1472 // "REJECTED" - Build is rejected. 1473 Decision string `json:"decision,omitempty"` 1474 // Url: Optional. An optional URL tied to this manual approval result. This 1475 // field is essentially the same as comment, except that it will be rendered by 1476 // the UI differently. An example use case is a link to an external job that 1477 // approved this Build. 1478 Url string `json:"url,omitempty"` 1479 // ForceSendFields is a list of field names (e.g. "ApprovalTime") 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. "ApprovalTime") to include in API 1486 // requests with the JSON null value. By default, fields with empty values are 1487 // 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 *ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalResult) MarshalJSON() ([]byte, error) { 1493 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalResult 1494 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1495 } 1496 1497 // ContaineranalysisGoogleDevtoolsCloudbuildV1Artifacts: Artifacts produced by 1498 // a build that should be uploaded upon successful completion of all build 1499 // steps. 1500 type ContaineranalysisGoogleDevtoolsCloudbuildV1Artifacts struct { 1501 // Images: A list of images to be pushed upon the successful completion of all 1502 // build steps. The images will be pushed using the builder service account's 1503 // credentials. The digests of the pushed images will be stored in the Build 1504 // resource's results field. If any of the images fail to be pushed, the build 1505 // is marked FAILURE. 1506 Images []string `json:"images,omitempty"` 1507 // MavenArtifacts: A list of Maven artifacts to be uploaded to Artifact 1508 // Registry upon successful completion of all build steps. Artifacts in the 1509 // workspace matching specified paths globs will be uploaded to the specified 1510 // Artifact Registry repository using the builder service account's 1511 // credentials. If any artifacts fail to be pushed, the build is marked 1512 // FAILURE. 1513 MavenArtifacts []*ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsMavenArtifact `json:"mavenArtifacts,omitempty"` 1514 // NpmPackages: A list of npm packages to be uploaded to Artifact Registry upon 1515 // successful completion of all build steps. Npm packages in the specified 1516 // paths will be uploaded to the specified Artifact Registry repository using 1517 // the builder service account's credentials. If any packages fail to be 1518 // pushed, the build is marked FAILURE. 1519 NpmPackages []*ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage `json:"npmPackages,omitempty"` 1520 // Objects: A list of objects to be uploaded to Cloud Storage upon successful 1521 // completion of all build steps. Files in the workspace matching specified 1522 // paths globs will be uploaded to the specified Cloud Storage location using 1523 // the builder service account's credentials. The location and generation of 1524 // the uploaded objects will be stored in the Build resource's results field. 1525 // If any objects fail to be pushed, the build is marked FAILURE. 1526 Objects *ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects `json:"objects,omitempty"` 1527 // PythonPackages: A list of Python packages to be uploaded to Artifact 1528 // Registry upon successful completion of all build steps. The build service 1529 // account credentials will be used to perform the upload. If any objects fail 1530 // to be pushed, the build is marked FAILURE. 1531 PythonPackages []*ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsPythonPackage `json:"pythonPackages,omitempty"` 1532 // ForceSendFields is a list of field names (e.g. "Images") to unconditionally 1533 // include in API requests. By default, fields with empty or default values are 1534 // omitted from API requests. See 1535 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1536 // details. 1537 ForceSendFields []string `json:"-"` 1538 // NullFields is a list of field names (e.g. "Images") to include in API 1539 // requests with the JSON null value. By default, fields with empty values are 1540 // omitted from API requests. See 1541 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1542 NullFields []string `json:"-"` 1543 } 1544 1545 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1Artifacts) MarshalJSON() ([]byte, error) { 1546 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1Artifacts 1547 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1548 } 1549 1550 // ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects: Files 1551 // in the workspace to upload to Cloud Storage upon successful completion of 1552 // all build steps. 1553 type ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects struct { 1554 // Location: Cloud Storage bucket and optional object path, in the form 1555 // "gs://bucket/path/to/somewhere/". (see Bucket Name Requirements 1556 // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). Files 1557 // in the workspace matching any path pattern will be uploaded to Cloud Storage 1558 // with this location as a prefix. 1559 Location string `json:"location,omitempty"` 1560 // Paths: Path globs used to match files in the build's workspace. 1561 Paths []string `json:"paths,omitempty"` 1562 // Timing: Output only. Stores timing information for pushing all artifact 1563 // objects. 1564 Timing *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"timing,omitempty"` 1565 // ForceSendFields is a list of field names (e.g. "Location") to 1566 // unconditionally include in API requests. By default, fields with empty or 1567 // default values are omitted from API requests. See 1568 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1569 // details. 1570 ForceSendFields []string `json:"-"` 1571 // NullFields is a list of field names (e.g. "Location") to include in API 1572 // requests with the JSON null value. By default, fields with empty values are 1573 // omitted from API requests. See 1574 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1575 NullFields []string `json:"-"` 1576 } 1577 1578 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects) MarshalJSON() ([]byte, error) { 1579 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects 1580 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1581 } 1582 1583 // ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsMavenArtifact: A Maven 1584 // artifact to upload to Artifact Registry upon successful completion of all 1585 // build steps. 1586 type ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsMavenArtifact struct { 1587 // ArtifactId: Maven `artifactId` value used when uploading the artifact to 1588 // Artifact Registry. 1589 ArtifactId string `json:"artifactId,omitempty"` 1590 // GroupId: Maven `groupId` value used when uploading the artifact to Artifact 1591 // Registry. 1592 GroupId string `json:"groupId,omitempty"` 1593 // Path: Path to an artifact in the build's workspace to be uploaded to 1594 // Artifact Registry. This can be either an absolute path, e.g. 1595 // /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar or a relative path from 1596 // /workspace, e.g. my-app/target/my-app-1.0.SNAPSHOT.jar. 1597 Path string `json:"path,omitempty"` 1598 // Repository: Artifact Registry repository, in the form 1599 // "https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY" Artifact in the 1600 // workspace specified by path will be uploaded to Artifact Registry with this 1601 // location as a prefix. 1602 Repository string `json:"repository,omitempty"` 1603 // Version: Maven `version` value used when uploading the artifact to Artifact 1604 // Registry. 1605 Version string `json:"version,omitempty"` 1606 // ForceSendFields is a list of field names (e.g. "ArtifactId") to 1607 // unconditionally include in API requests. By default, fields with empty or 1608 // default values are omitted from API requests. See 1609 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1610 // details. 1611 ForceSendFields []string `json:"-"` 1612 // NullFields is a list of field names (e.g. "ArtifactId") to include in API 1613 // requests with the JSON null value. By default, fields with empty values are 1614 // omitted from API requests. See 1615 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1616 NullFields []string `json:"-"` 1617 } 1618 1619 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsMavenArtifact) MarshalJSON() ([]byte, error) { 1620 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsMavenArtifact 1621 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1622 } 1623 1624 // ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage: Npm package 1625 // to upload to Artifact Registry upon successful completion of all build 1626 // steps. 1627 type ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage struct { 1628 // PackagePath: Path to the package.json. e.g. workspace/path/to/package 1629 PackagePath string `json:"packagePath,omitempty"` 1630 // Repository: Artifact Registry repository, in the form 1631 // "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY" Npm package in the 1632 // workspace specified by path will be zipped and uploaded to Artifact Registry 1633 // with this location as a prefix. 1634 Repository string `json:"repository,omitempty"` 1635 // ForceSendFields is a list of field names (e.g. "PackagePath") to 1636 // unconditionally include in API requests. By default, fields with empty or 1637 // default values are omitted from API requests. See 1638 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1639 // details. 1640 ForceSendFields []string `json:"-"` 1641 // NullFields is a list of field names (e.g. "PackagePath") to include in API 1642 // requests with the JSON null value. By default, fields with empty values are 1643 // omitted from API requests. See 1644 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1645 NullFields []string `json:"-"` 1646 } 1647 1648 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage) MarshalJSON() ([]byte, error) { 1649 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage 1650 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1651 } 1652 1653 // ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsPythonPackage: Python 1654 // package to upload to Artifact Registry upon successful completion of all 1655 // build steps. A package can encapsulate multiple objects to be uploaded to a 1656 // single repository. 1657 type ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsPythonPackage struct { 1658 // Paths: Path globs used to match files in the build's workspace. For Python/ 1659 // Twine, this is usually `dist/*`, and sometimes additionally an `.asc` file. 1660 Paths []string `json:"paths,omitempty"` 1661 // Repository: Artifact Registry repository, in the form 1662 // "https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY" Files in the workspace 1663 // matching any path pattern will be uploaded to Artifact Registry with this 1664 // location as a prefix. 1665 Repository string `json:"repository,omitempty"` 1666 // ForceSendFields is a list of field names (e.g. "Paths") to unconditionally 1667 // include in API requests. By default, fields with empty or default values are 1668 // omitted from API requests. See 1669 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1670 // details. 1671 ForceSendFields []string `json:"-"` 1672 // NullFields is a list of field names (e.g. "Paths") to include in API 1673 // requests with the JSON null value. By default, fields with empty values are 1674 // omitted from API requests. See 1675 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1676 NullFields []string `json:"-"` 1677 } 1678 1679 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsPythonPackage) MarshalJSON() ([]byte, error) { 1680 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsPythonPackage 1681 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1682 } 1683 1684 // ContaineranalysisGoogleDevtoolsCloudbuildV1Build: A build resource in the 1685 // Cloud Build API. At a high level, a `Build` describes where to find source 1686 // code, how to build it (for example, the builder image to run on the source), 1687 // and where to store the built artifacts. Fields can include the following 1688 // variables, which will be expanded when the build is created: - $PROJECT_ID: 1689 // the project ID of the build. - $PROJECT_NUMBER: the project number of the 1690 // build. - $LOCATION: the location/region of the build. - $BUILD_ID: the 1691 // autogenerated ID of the build. - $REPO_NAME: the source repository name 1692 // specified by RepoSource. - $BRANCH_NAME: the branch name specified by 1693 // RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - 1694 // $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or 1695 // resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters 1696 // of $REVISION_ID or $COMMIT_SHA. 1697 type ContaineranalysisGoogleDevtoolsCloudbuildV1Build struct { 1698 // Approval: Output only. Describes this build's approval configuration, 1699 // status, and result. 1700 Approval *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildApproval `json:"approval,omitempty"` 1701 // Artifacts: Artifacts produced by the build that should be uploaded upon 1702 // successful completion of all build steps. 1703 Artifacts *ContaineranalysisGoogleDevtoolsCloudbuildV1Artifacts `json:"artifacts,omitempty"` 1704 // AvailableSecrets: Secrets and secret environment variables. 1705 AvailableSecrets *ContaineranalysisGoogleDevtoolsCloudbuildV1Secrets `json:"availableSecrets,omitempty"` 1706 // BuildTriggerId: Output only. The ID of the `BuildTrigger` that triggered 1707 // this build, if it was triggered automatically. 1708 BuildTriggerId string `json:"buildTriggerId,omitempty"` 1709 // CreateTime: Output only. Time at which the request to create the build was 1710 // received. 1711 CreateTime string `json:"createTime,omitempty"` 1712 // FailureInfo: Output only. Contains information about the build when 1713 // status=FAILURE. 1714 FailureInfo *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildFailureInfo `json:"failureInfo,omitempty"` 1715 // FinishTime: Output only. Time at which execution of the build was finished. 1716 // The difference between finish_time and start_time is the duration of the 1717 // build's execution. 1718 FinishTime string `json:"finishTime,omitempty"` 1719 // GitConfig: Optional. Configuration for git operations. 1720 GitConfig *ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfig `json:"gitConfig,omitempty"` 1721 // Id: Output only. Unique identifier of the build. 1722 Id string `json:"id,omitempty"` 1723 // Images: A list of images to be pushed upon the successful completion of all 1724 // build steps. The images are pushed using the builder service account's 1725 // credentials. The digests of the pushed images will be stored in the `Build` 1726 // resource's results field. If any of the images fail to be pushed, the build 1727 // status is marked `FAILURE`. 1728 Images []string `json:"images,omitempty"` 1729 // LogUrl: Output only. URL to logs for this build in Google Cloud Console. 1730 LogUrl string `json:"logUrl,omitempty"` 1731 // LogsBucket: Cloud Storage bucket where logs should be written (see Bucket 1732 // Name Requirements 1733 // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs 1734 // file names will be of the format `${logs_bucket}/log-${build_id}.txt`. 1735 LogsBucket string `json:"logsBucket,omitempty"` 1736 // Name: Output only. The 'Build' name with format: 1737 // `projects/{project}/locations/{location}/builds/{build}`, where {build} is a 1738 // unique identifier generated by the service. 1739 Name string `json:"name,omitempty"` 1740 // Options: Special options for this build. 1741 Options *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptions `json:"options,omitempty"` 1742 // ProjectId: Output only. ID of the project. 1743 ProjectId string `json:"projectId,omitempty"` 1744 // QueueTtl: TTL in queue for this build. If provided and the build is enqueued 1745 // longer than this value, the build will expire and the build status will be 1746 // `EXPIRED`. The TTL starts ticking from create_time. 1747 QueueTtl string `json:"queueTtl,omitempty"` 1748 // Results: Output only. Results of the build. 1749 Results *ContaineranalysisGoogleDevtoolsCloudbuildV1Results `json:"results,omitempty"` 1750 // Secrets: Secrets to decrypt using Cloud Key Management Service. Note: Secret 1751 // Manager is the recommended technique for managing sensitive data with Cloud 1752 // Build. Use `available_secrets` to configure builds to access secrets from 1753 // Secret Manager. For instructions, see: 1754 // https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets 1755 Secrets []*ContaineranalysisGoogleDevtoolsCloudbuildV1Secret `json:"secrets,omitempty"` 1756 // ServiceAccount: IAM service account whose credentials will be used at build 1757 // runtime. Must be of the format 1758 // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email 1759 // address or uniqueId of the service account. 1760 ServiceAccount string `json:"serviceAccount,omitempty"` 1761 // Source: The location of the source files to build. 1762 Source *ContaineranalysisGoogleDevtoolsCloudbuildV1Source `json:"source,omitempty"` 1763 // SourceProvenance: Output only. A permanent fixed identifier for source. 1764 SourceProvenance *ContaineranalysisGoogleDevtoolsCloudbuildV1SourceProvenance `json:"sourceProvenance,omitempty"` 1765 // StartTime: Output only. Time at which execution of the build was started. 1766 StartTime string `json:"startTime,omitempty"` 1767 // Status: Output only. Status of the build. 1768 // 1769 // Possible values: 1770 // "STATUS_UNKNOWN" - Status of the build is unknown. 1771 // "PENDING" - Build has been created and is pending execution and queuing. 1772 // It has not been queued. 1773 // "QUEUED" - Build or step is queued; work has not yet begun. 1774 // "WORKING" - Build or step is being executed. 1775 // "SUCCESS" - Build or step finished successfully. 1776 // "FAILURE" - Build or step failed to complete successfully. 1777 // "INTERNAL_ERROR" - Build or step failed due to an internal cause. 1778 // "TIMEOUT" - Build or step took longer than was allowed. 1779 // "CANCELLED" - Build or step was canceled by a user. 1780 // "EXPIRED" - Build was enqueued for longer than the value of `queue_ttl`. 1781 Status string `json:"status,omitempty"` 1782 // StatusDetail: Output only. Customer-readable message about the current 1783 // status. 1784 StatusDetail string `json:"statusDetail,omitempty"` 1785 // Steps: Required. The operations to be performed on the workspace. 1786 Steps []*ContaineranalysisGoogleDevtoolsCloudbuildV1BuildStep `json:"steps,omitempty"` 1787 // Substitutions: Substitutions data for `Build` resource. 1788 Substitutions map[string]string `json:"substitutions,omitempty"` 1789 // Tags: Tags for annotation of a `Build`. These are not docker tags. 1790 Tags []string `json:"tags,omitempty"` 1791 // Timeout: Amount of time that this build should be allowed to run, to second 1792 // granularity. If this amount of time elapses, work on the build will cease 1793 // and the build status will be `TIMEOUT`. `timeout` starts ticking from 1794 // `startTime`. Default time is 60 minutes. 1795 Timeout string `json:"timeout,omitempty"` 1796 // Timing: Output only. Stores timing information for phases of the build. 1797 // Valid keys are: * BUILD: time to execute all build steps. * PUSH: time to 1798 // push all artifacts including docker images and non docker artifacts. * 1799 // FETCHSOURCE: time to fetch source. * SETUPBUILD: time to set up build. If 1800 // the build does not specify source or images, these keys will not be 1801 // included. 1802 Timing map[string]ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"timing,omitempty"` 1803 // Warnings: Output only. Non-fatal problems encountered during the execution 1804 // of the build. 1805 Warnings []*ContaineranalysisGoogleDevtoolsCloudbuildV1BuildWarning `json:"warnings,omitempty"` 1806 // ForceSendFields is a list of field names (e.g. "Approval") to 1807 // unconditionally include in API requests. By default, fields with empty or 1808 // default values are omitted from API requests. See 1809 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1810 // details. 1811 ForceSendFields []string `json:"-"` 1812 // NullFields is a list of field names (e.g. "Approval") to include in API 1813 // requests with the JSON null value. By default, fields with empty values are 1814 // omitted from API requests. See 1815 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1816 NullFields []string `json:"-"` 1817 } 1818 1819 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1Build) MarshalJSON() ([]byte, error) { 1820 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1Build 1821 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1822 } 1823 1824 // ContaineranalysisGoogleDevtoolsCloudbuildV1BuildApproval: BuildApproval 1825 // describes a build's approval configuration, state, and result. 1826 type ContaineranalysisGoogleDevtoolsCloudbuildV1BuildApproval struct { 1827 // Config: Output only. Configuration for manual approval of this build. 1828 Config *ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalConfig `json:"config,omitempty"` 1829 // Result: Output only. Result of manual approval for this Build. 1830 Result *ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalResult `json:"result,omitempty"` 1831 // State: Output only. The state of this build's approval. 1832 // 1833 // Possible values: 1834 // "STATE_UNSPECIFIED" - Default enum type. This should not be used. 1835 // "PENDING" - Build approval is pending. 1836 // "APPROVED" - Build approval has been approved. 1837 // "REJECTED" - Build approval has been rejected. 1838 // "CANCELLED" - Build was cancelled while it was still pending approval. 1839 State string `json:"state,omitempty"` 1840 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally 1841 // include in API requests. By default, fields with empty or default values are 1842 // omitted from API requests. See 1843 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1844 // details. 1845 ForceSendFields []string `json:"-"` 1846 // NullFields is a list of field names (e.g. "Config") to include in API 1847 // requests with the JSON null value. By default, fields with empty values are 1848 // omitted from API requests. See 1849 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1850 NullFields []string `json:"-"` 1851 } 1852 1853 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildApproval) MarshalJSON() ([]byte, error) { 1854 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1BuildApproval 1855 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1856 } 1857 1858 // ContaineranalysisGoogleDevtoolsCloudbuildV1BuildFailureInfo: A fatal problem 1859 // encountered during the execution of the build. 1860 type ContaineranalysisGoogleDevtoolsCloudbuildV1BuildFailureInfo struct { 1861 // Detail: Explains the failure issue in more detail using hard-coded text. 1862 Detail string `json:"detail,omitempty"` 1863 // Type: The name of the failure. 1864 // 1865 // Possible values: 1866 // "FAILURE_TYPE_UNSPECIFIED" - Type unspecified 1867 // "PUSH_FAILED" - Unable to push the image to the repository. 1868 // "PUSH_IMAGE_NOT_FOUND" - Final image not found. 1869 // "PUSH_NOT_AUTHORIZED" - Unauthorized push of the final image. 1870 // "LOGGING_FAILURE" - Backend logging failures. Should retry. 1871 // "USER_BUILD_STEP" - A build step has failed. 1872 // "FETCH_SOURCE_FAILED" - The source fetching has failed. 1873 Type string `json:"type,omitempty"` 1874 // ForceSendFields is a list of field names (e.g. "Detail") to unconditionally 1875 // include in API requests. By default, fields with empty or default values are 1876 // omitted from API requests. See 1877 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1878 // details. 1879 ForceSendFields []string `json:"-"` 1880 // NullFields is a list of field names (e.g. "Detail") to include in API 1881 // requests with the JSON null value. By default, fields with empty values are 1882 // omitted from API requests. See 1883 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1884 NullFields []string `json:"-"` 1885 } 1886 1887 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildFailureInfo) MarshalJSON() ([]byte, error) { 1888 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1BuildFailureInfo 1889 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1890 } 1891 1892 // ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptions: Optional arguments 1893 // to enable specific features of builds. 1894 type ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptions struct { 1895 // AutomapSubstitutions: Option to include built-in and custom substitutions as 1896 // env variables for all build steps. 1897 AutomapSubstitutions bool `json:"automapSubstitutions,omitempty"` 1898 // DefaultLogsBucketBehavior: Optional. Option to specify how default logs 1899 // buckets are setup. 1900 // 1901 // Possible values: 1902 // "DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED" - Unspecified. 1903 // "REGIONAL_USER_OWNED_BUCKET" - Bucket is located in user-owned project in 1904 // the same region as the build. The builder service account must have access 1905 // to create and write to Cloud Storage buckets in the build project. 1906 DefaultLogsBucketBehavior string `json:"defaultLogsBucketBehavior,omitempty"` 1907 // DiskSizeGb: Requested disk size for the VM that runs the build. Note that 1908 // this is *NOT* "disk free"; some of the space will be used by the operating 1909 // system and build utilities. Also note that this is the minimum disk size 1910 // that will be allocated for the build -- the build may run with a larger disk 1911 // than requested. At present, the maximum disk size is 2000GB; builds that 1912 // request more than the maximum are rejected with an error. 1913 DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` 1914 // DynamicSubstitutions: Option to specify whether or not to apply bash style 1915 // string operations to the substitutions. NOTE: this is always enabled for 1916 // triggered builds and cannot be overridden in the build configuration file. 1917 DynamicSubstitutions bool `json:"dynamicSubstitutions,omitempty"` 1918 // Env: A list of global environment variable definitions that will exist for 1919 // all build steps in this build. If a variable is defined in both globally and 1920 // in a build step, the variable will use the build step value. The elements 1921 // are of the form "KEY=VALUE" for the environment variable "KEY" being given 1922 // the value "VALUE". 1923 Env []string `json:"env,omitempty"` 1924 // LogStreamingOption: Option to define build log streaming behavior to Cloud 1925 // Storage. 1926 // 1927 // Possible values: 1928 // "STREAM_DEFAULT" - Service may automatically determine build log streaming 1929 // behavior. 1930 // "STREAM_ON" - Build logs should be streamed to Cloud Storage. 1931 // "STREAM_OFF" - Build logs should not be streamed to Cloud Storage; they 1932 // will be written when the build is completed. 1933 LogStreamingOption string `json:"logStreamingOption,omitempty"` 1934 // Logging: Option to specify the logging mode, which determines if and where 1935 // build logs are stored. 1936 // 1937 // Possible values: 1938 // "LOGGING_UNSPECIFIED" - The service determines the logging mode. The 1939 // default is `LEGACY`. Do not rely on the default logging behavior as it may 1940 // change in the future. 1941 // "LEGACY" - Build logs are stored in Cloud Logging and Cloud Storage. 1942 // "GCS_ONLY" - Build logs are stored in Cloud Storage. 1943 // "STACKDRIVER_ONLY" - This option is the same as CLOUD_LOGGING_ONLY. 1944 // "CLOUD_LOGGING_ONLY" - Build logs are stored in Cloud Logging. Selecting 1945 // this option will not allow [logs 1946 // streaming](https://cloud.google.com/sdk/gcloud/reference/builds/log). 1947 // "NONE" - Turn off all logging. No build logs will be captured. 1948 Logging string `json:"logging,omitempty"` 1949 // MachineType: Compute Engine machine type on which to run the build. 1950 // 1951 // Possible values: 1952 // "UNSPECIFIED" - Standard machine type. 1953 // "N1_HIGHCPU_8" - Highcpu machine with 8 CPUs. 1954 // "N1_HIGHCPU_32" - Highcpu machine with 32 CPUs. 1955 // "E2_HIGHCPU_8" - Highcpu e2 machine with 8 CPUs. 1956 // "E2_HIGHCPU_32" - Highcpu e2 machine with 32 CPUs. 1957 // "E2_MEDIUM" - E2 machine with 1 CPU. 1958 MachineType string `json:"machineType,omitempty"` 1959 // Pool: Optional. Specification for execution on a `WorkerPool`. See running 1960 // builds in a private pool 1961 // (https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 1962 // for more information. 1963 Pool *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptionsPoolOption `json:"pool,omitempty"` 1964 // RequestedVerifyOption: Requested verifiability options. 1965 // 1966 // Possible values: 1967 // "NOT_VERIFIED" - Not a verifiable build (the default). 1968 // "VERIFIED" - Build must be verified. 1969 RequestedVerifyOption string `json:"requestedVerifyOption,omitempty"` 1970 // SecretEnv: A list of global environment variables, which are encrypted using 1971 // a Cloud Key Management Service crypto key. These values must be specified in 1972 // the build's `Secret`. These variables will be available to all build steps 1973 // in this build. 1974 SecretEnv []string `json:"secretEnv,omitempty"` 1975 // SourceProvenanceHash: Requested hash for SourceProvenance. 1976 // 1977 // Possible values: 1978 // "NONE" - No hash requested. 1979 // "SHA256" - Use a sha256 hash. 1980 // "MD5" - Use a md5 hash. 1981 // "SHA512" - Use a sha512 hash. 1982 SourceProvenanceHash []string `json:"sourceProvenanceHash,omitempty"` 1983 // SubstitutionOption: Option to specify behavior when there is an error in the 1984 // substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered 1985 // builds and cannot be overridden in the build configuration file. 1986 // 1987 // Possible values: 1988 // "MUST_MATCH" - Fails the build if error in substitutions checks, like 1989 // missing a substitution in the template or in the map. 1990 // "ALLOW_LOOSE" - Do not fail the build if error in substitutions checks. 1991 SubstitutionOption string `json:"substitutionOption,omitempty"` 1992 // Volumes: Global list of volumes to mount for ALL build steps Each volume is 1993 // created as an empty volume prior to starting the build process. Upon 1994 // completion of the build, volumes and their contents are discarded. Global 1995 // volume names and paths cannot conflict with the volumes defined a build 1996 // step. Using a global volume in a build with only one step is not valid as it 1997 // is indicative of a build request with an incorrect configuration. 1998 Volumes []*ContaineranalysisGoogleDevtoolsCloudbuildV1Volume `json:"volumes,omitempty"` 1999 // WorkerPool: This field deprecated; please use `pool.name` instead. 2000 WorkerPool string `json:"workerPool,omitempty"` 2001 // ForceSendFields is a list of field names (e.g. "AutomapSubstitutions") to 2002 // unconditionally include in API requests. By default, fields with empty or 2003 // default values are omitted from API requests. See 2004 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2005 // details. 2006 ForceSendFields []string `json:"-"` 2007 // NullFields is a list of field names (e.g. "AutomapSubstitutions") to include 2008 // in API requests with the JSON null value. By default, fields with empty 2009 // values are omitted from API requests. See 2010 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2011 NullFields []string `json:"-"` 2012 } 2013 2014 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptions) MarshalJSON() ([]byte, error) { 2015 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptions 2016 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2017 } 2018 2019 // ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptionsPoolOption: Details 2020 // about how a build should be executed on a `WorkerPool`. See running builds 2021 // in a private pool 2022 // (https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 2023 // for more information. 2024 type ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptionsPoolOption struct { 2025 // Name: The `WorkerPool` resource to execute the build on. You must have 2026 // `cloudbuild.workerpools.use` on the project hosting the WorkerPool. Format 2027 // projects/{project}/locations/{location}/workerPools/{workerPoolId} 2028 Name string `json:"name,omitempty"` 2029 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 2030 // include in API requests. By default, fields with empty or default values are 2031 // omitted from API requests. See 2032 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2033 // details. 2034 ForceSendFields []string `json:"-"` 2035 // NullFields is a list of field names (e.g. "Name") to include in API requests 2036 // with the JSON null value. By default, fields with empty values are omitted 2037 // from API requests. See 2038 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2039 NullFields []string `json:"-"` 2040 } 2041 2042 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptionsPoolOption) MarshalJSON() ([]byte, error) { 2043 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptionsPoolOption 2044 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2045 } 2046 2047 // ContaineranalysisGoogleDevtoolsCloudbuildV1BuildStep: A step in the build 2048 // pipeline. 2049 type ContaineranalysisGoogleDevtoolsCloudbuildV1BuildStep struct { 2050 // AllowExitCodes: Allow this build step to fail without failing the entire 2051 // build if and only if the exit code is one of the specified codes. If 2052 // allow_failure is also specified, this field will take precedence. 2053 AllowExitCodes []int64 `json:"allowExitCodes,omitempty"` 2054 // AllowFailure: Allow this build step to fail without failing the entire 2055 // build. If false, the entire build will fail if this step fails. Otherwise, 2056 // the build will succeed, but this step will still have a failure status. 2057 // Error information will be reported in the failure_detail field. 2058 AllowFailure bool `json:"allowFailure,omitempty"` 2059 // Args: A list of arguments that will be presented to the step when it is 2060 // started. If the image used to run the step's container has an entrypoint, 2061 // the `args` are used as arguments to that entrypoint. If the image does not 2062 // define an entrypoint, the first element in args is used as the entrypoint, 2063 // and the remainder will be used as arguments. 2064 Args []string `json:"args,omitempty"` 2065 // AutomapSubstitutions: Option to include built-in and custom substitutions as 2066 // env variables for this build step. This option will override the global 2067 // option in BuildOption. 2068 AutomapSubstitutions bool `json:"automapSubstitutions,omitempty"` 2069 // Dir: Working directory to use when running this step's container. If this 2070 // value is a relative path, it is relative to the build's working directory. 2071 // If this value is absolute, it may be outside the build's working directory, 2072 // in which case the contents of the path may not be persisted across build 2073 // step executions, unless a `volume` for that path is specified. If the build 2074 // specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies 2075 // an absolute path, the `RepoSource` `dir` is ignored for the step's 2076 // execution. 2077 Dir string `json:"dir,omitempty"` 2078 // Entrypoint: Entrypoint to be used instead of the build step image's default 2079 // entrypoint. If unset, the image's default entrypoint is used. 2080 Entrypoint string `json:"entrypoint,omitempty"` 2081 // Env: A list of environment variable definitions to be used when running a 2082 // step. The elements are of the form "KEY=VALUE" for the environment variable 2083 // "KEY" being given the value "VALUE". 2084 Env []string `json:"env,omitempty"` 2085 // ExitCode: Output only. Return code from running the step. 2086 ExitCode int64 `json:"exitCode,omitempty"` 2087 // Id: Unique identifier for this build step, used in `wait_for` to reference 2088 // this build step as a dependency. 2089 Id string `json:"id,omitempty"` 2090 // Name: Required. The name of the container image that will run this 2091 // particular build step. If the image is available in the host's Docker 2092 // daemon's cache, it will be run directly. If not, the host will attempt to 2093 // pull the image first, using the builder service account's credentials if 2094 // necessary. The Docker daemon's cache will already have the latest versions 2095 // of all of the officially supported build steps 2096 // (https://github.com/GoogleCloudPlatform/cloud-builders 2097 // (https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon 2098 // will also have cached many of the layers for some popular images, like 2099 // "ubuntu", "debian", but they will be refreshed at the time you attempt to 2100 // use them. If you built an image in a previous build step, it will be stored 2101 // in the host's Docker daemon's cache and is available to use as the name for 2102 // a later build step. 2103 Name string `json:"name,omitempty"` 2104 // PullTiming: Output only. Stores timing information for pulling this build 2105 // step's builder image only. 2106 PullTiming *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"pullTiming,omitempty"` 2107 // Script: A shell script to be executed in the step. When script is provided, 2108 // the user cannot specify the entrypoint or args. 2109 Script string `json:"script,omitempty"` 2110 // SecretEnv: A list of environment variables which are encrypted using a Cloud 2111 // Key Management Service crypto key. These values must be specified in the 2112 // build's `Secret`. 2113 SecretEnv []string `json:"secretEnv,omitempty"` 2114 // Status: Output only. Status of the build step. At this time, build step 2115 // status is only updated on build completion; step status is not updated in 2116 // real-time as the build progresses. 2117 // 2118 // Possible values: 2119 // "STATUS_UNKNOWN" - Status of the build is unknown. 2120 // "PENDING" - Build has been created and is pending execution and queuing. 2121 // It has not been queued. 2122 // "QUEUED" - Build or step is queued; work has not yet begun. 2123 // "WORKING" - Build or step is being executed. 2124 // "SUCCESS" - Build or step finished successfully. 2125 // "FAILURE" - Build or step failed to complete successfully. 2126 // "INTERNAL_ERROR" - Build or step failed due to an internal cause. 2127 // "TIMEOUT" - Build or step took longer than was allowed. 2128 // "CANCELLED" - Build or step was canceled by a user. 2129 // "EXPIRED" - Build was enqueued for longer than the value of `queue_ttl`. 2130 Status string `json:"status,omitempty"` 2131 // Timeout: Time limit for executing this build step. If not defined, the step 2132 // has no time limit and will be allowed to continue to run until either it 2133 // completes or the build itself times out. 2134 Timeout string `json:"timeout,omitempty"` 2135 // Timing: Output only. Stores timing information for executing this build 2136 // step. 2137 Timing *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"timing,omitempty"` 2138 // Volumes: List of volumes to mount into the build step. Each volume is 2139 // created as an empty volume prior to execution of the build step. Upon 2140 // completion of the build, volumes and their contents are discarded. Using a 2141 // named volume in only one step is not valid as it is indicative of a build 2142 // request with an incorrect configuration. 2143 Volumes []*ContaineranalysisGoogleDevtoolsCloudbuildV1Volume `json:"volumes,omitempty"` 2144 // WaitFor: The ID(s) of the step(s) that this build step depends on. This 2145 // build step will not start until all the build steps in `wait_for` have 2146 // completed successfully. If `wait_for` is empty, this build step will start 2147 // when all previous build steps in the `Build.Steps` list have completed 2148 // successfully. 2149 WaitFor []string `json:"waitFor,omitempty"` 2150 // ForceSendFields is a list of field names (e.g. "AllowExitCodes") to 2151 // unconditionally include in API requests. By default, fields with empty or 2152 // default values are omitted from API requests. See 2153 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2154 // details. 2155 ForceSendFields []string `json:"-"` 2156 // NullFields is a list of field names (e.g. "AllowExitCodes") to include in 2157 // API requests with the JSON null value. By default, fields with empty values 2158 // are omitted from API requests. See 2159 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2160 NullFields []string `json:"-"` 2161 } 2162 2163 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildStep) MarshalJSON() ([]byte, error) { 2164 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1BuildStep 2165 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2166 } 2167 2168 // ContaineranalysisGoogleDevtoolsCloudbuildV1BuildWarning: A non-fatal problem 2169 // encountered during the execution of the build. 2170 type ContaineranalysisGoogleDevtoolsCloudbuildV1BuildWarning struct { 2171 // Priority: The priority for this warning. 2172 // 2173 // Possible values: 2174 // "PRIORITY_UNSPECIFIED" - Should not be used. 2175 // "INFO" - e.g. deprecation warnings and alternative feature highlights. 2176 // "WARNING" - e.g. automated detection of possible issues with the build. 2177 // "ALERT" - e.g. alerts that a feature used in the build is pending removal 2178 Priority string `json:"priority,omitempty"` 2179 // Text: Explanation of the warning generated. 2180 Text string `json:"text,omitempty"` 2181 // ForceSendFields is a list of field names (e.g. "Priority") to 2182 // unconditionally include in API requests. By default, fields with empty or 2183 // default values are omitted from API requests. See 2184 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2185 // details. 2186 ForceSendFields []string `json:"-"` 2187 // NullFields is a list of field names (e.g. "Priority") to include in API 2188 // requests with the JSON null value. By default, fields with empty values are 2189 // omitted from API requests. See 2190 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2191 NullFields []string `json:"-"` 2192 } 2193 2194 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildWarning) MarshalJSON() ([]byte, error) { 2195 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1BuildWarning 2196 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2197 } 2198 2199 // ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage: An image built by the 2200 // pipeline. 2201 type ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage struct { 2202 // Digest: Docker Registry 2.0 digest. 2203 Digest string `json:"digest,omitempty"` 2204 // Name: Name used to push the container image to Google Container Registry, as 2205 // presented to `docker push`. 2206 Name string `json:"name,omitempty"` 2207 // PushTiming: Output only. Stores timing information for pushing the specified 2208 // image. 2209 PushTiming *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"pushTiming,omitempty"` 2210 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally 2211 // include in API requests. By default, fields with empty or default values are 2212 // omitted from API requests. See 2213 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2214 // details. 2215 ForceSendFields []string `json:"-"` 2216 // NullFields is a list of field names (e.g. "Digest") to include in API 2217 // requests with the JSON null value. By default, fields with empty values are 2218 // omitted from API requests. See 2219 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2220 NullFields []string `json:"-"` 2221 } 2222 2223 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage) MarshalJSON() ([]byte, error) { 2224 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage 2225 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2226 } 2227 2228 // ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository: Location of 2229 // the source in a 2nd-gen Google Cloud Build repository resource. 2230 type ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository struct { 2231 // Dir: Directory, relative to the source root, in which to run the build. 2232 Dir string `json:"dir,omitempty"` 2233 // Repository: Required. Name of the Google Cloud Build repository, formatted 2234 // as `projects/*/locations/*/connections/*/repositories/*`. 2235 Repository string `json:"repository,omitempty"` 2236 // Revision: The revision to fetch from the Git repository such as a branch, a 2237 // tag, a commit SHA, or any Git ref. 2238 Revision string `json:"revision,omitempty"` 2239 // ForceSendFields is a list of field names (e.g. "Dir") to unconditionally 2240 // include in API requests. By default, fields with empty or default values are 2241 // omitted from API requests. See 2242 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2243 // details. 2244 ForceSendFields []string `json:"-"` 2245 // NullFields is a list of field names (e.g. "Dir") to include in API requests 2246 // with the JSON null value. By default, fields with empty values are omitted 2247 // from API requests. See 2248 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2249 NullFields []string `json:"-"` 2250 } 2251 2252 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository) MarshalJSON() ([]byte, error) { 2253 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository 2254 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2255 } 2256 2257 // ContaineranalysisGoogleDevtoolsCloudbuildV1DeveloperConnectConfig: This 2258 // config defines the location of a source through Developer Connect. 2259 type ContaineranalysisGoogleDevtoolsCloudbuildV1DeveloperConnectConfig struct { 2260 // Dir: Required. Directory, relative to the source root, in which to run the 2261 // build. 2262 Dir string `json:"dir,omitempty"` 2263 // GitRepositoryLink: Required. The Developer Connect Git repository link, 2264 // formatted as `projects/*/locations/*/connections/*/gitRepositoryLink/*`. 2265 GitRepositoryLink string `json:"gitRepositoryLink,omitempty"` 2266 // Revision: Required. The revision to fetch from the Git repository such as a 2267 // branch, a tag, a commit SHA, or any Git ref. 2268 Revision string `json:"revision,omitempty"` 2269 // ForceSendFields is a list of field names (e.g. "Dir") to unconditionally 2270 // include in API requests. By default, fields with empty or default values are 2271 // omitted from API requests. See 2272 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2273 // details. 2274 ForceSendFields []string `json:"-"` 2275 // NullFields is a list of field names (e.g. "Dir") to include in API requests 2276 // with the JSON null value. By default, fields with empty values are omitted 2277 // from API requests. See 2278 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2279 NullFields []string `json:"-"` 2280 } 2281 2282 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1DeveloperConnectConfig) MarshalJSON() ([]byte, error) { 2283 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1DeveloperConnectConfig 2284 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2285 } 2286 2287 // ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes: Container message for 2288 // hashes of byte content of files, used in SourceProvenance messages to verify 2289 // integrity of source input to the build. 2290 type ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes struct { 2291 // FileHash: Collection of file hashes. 2292 FileHash []*ContaineranalysisGoogleDevtoolsCloudbuildV1Hash `json:"fileHash,omitempty"` 2293 // ForceSendFields is a list of field names (e.g. "FileHash") to 2294 // unconditionally include in API requests. By default, fields with empty or 2295 // default values are omitted from API requests. See 2296 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2297 // details. 2298 ForceSendFields []string `json:"-"` 2299 // NullFields is a list of field names (e.g. "FileHash") to include in API 2300 // requests with the JSON null value. By default, fields with empty values are 2301 // omitted from API requests. See 2302 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2303 NullFields []string `json:"-"` 2304 } 2305 2306 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes) MarshalJSON() ([]byte, error) { 2307 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes 2308 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2309 } 2310 2311 // ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfig: GitConfig is a 2312 // configuration for git operations. 2313 type ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfig struct { 2314 // Http: Configuration for HTTP related git operations. 2315 Http *ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfigHttpConfig `json:"http,omitempty"` 2316 // ForceSendFields is a list of field names (e.g. "Http") to unconditionally 2317 // include in API requests. By default, fields with empty or default values are 2318 // omitted from API requests. See 2319 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2320 // details. 2321 ForceSendFields []string `json:"-"` 2322 // NullFields is a list of field names (e.g. "Http") to include in API requests 2323 // with the JSON null value. By default, fields with empty values are omitted 2324 // from API requests. See 2325 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2326 NullFields []string `json:"-"` 2327 } 2328 2329 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfig) MarshalJSON() ([]byte, error) { 2330 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfig 2331 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2332 } 2333 2334 // ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfigHttpConfig: HttpConfig 2335 // is a configuration for HTTP related git operations. 2336 type ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfigHttpConfig struct { 2337 // ProxySecretVersionName: SecretVersion resource of the HTTP proxy URL. The 2338 // proxy URL should be in format protocol://@]proxyhost[:port]. 2339 ProxySecretVersionName string `json:"proxySecretVersionName,omitempty"` 2340 // ForceSendFields is a list of field names (e.g. "ProxySecretVersionName") to 2341 // unconditionally include in API requests. By default, fields with empty or 2342 // default values are omitted from API requests. See 2343 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2344 // details. 2345 ForceSendFields []string `json:"-"` 2346 // NullFields is a list of field names (e.g. "ProxySecretVersionName") to 2347 // include in API requests with the JSON null value. By default, fields with 2348 // empty values are omitted from API requests. See 2349 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2350 NullFields []string `json:"-"` 2351 } 2352 2353 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfigHttpConfig) MarshalJSON() ([]byte, error) { 2354 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfigHttpConfig 2355 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2356 } 2357 2358 // ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource: Location of the source 2359 // in any accessible Git repository. 2360 type ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource struct { 2361 // Dir: Directory, relative to the source root, in which to run the build. This 2362 // must be a relative path. If a step's `dir` is specified and is an absolute 2363 // path, this value is ignored for that step's execution. 2364 Dir string `json:"dir,omitempty"` 2365 // Revision: The revision to fetch from the Git repository such as a branch, a 2366 // tag, a commit SHA, or any Git ref. Cloud Build uses `git fetch` to fetch the 2367 // revision from the Git repository; therefore make sure that the string you 2368 // provide for `revision` is parsable by the command. For information on string 2369 // values accepted by `git fetch`, see 2370 // https://git-scm.com/docs/gitrevisions#_specifying_revisions. For information 2371 // on `git fetch`, see https://git-scm.com/docs/git-fetch. 2372 Revision string `json:"revision,omitempty"` 2373 // Url: Location of the Git repo to build. This will be used as a `git remote`, 2374 // see https://git-scm.com/docs/git-remote. 2375 Url string `json:"url,omitempty"` 2376 // ForceSendFields is a list of field names (e.g. "Dir") to unconditionally 2377 // include in API requests. By default, fields with empty or default values are 2378 // omitted from API requests. See 2379 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2380 // details. 2381 ForceSendFields []string `json:"-"` 2382 // NullFields is a list of field names (e.g. "Dir") to include in API requests 2383 // with the JSON null value. By default, fields with empty values are omitted 2384 // from API requests. See 2385 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2386 NullFields []string `json:"-"` 2387 } 2388 2389 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource) MarshalJSON() ([]byte, error) { 2390 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource 2391 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2392 } 2393 2394 // ContaineranalysisGoogleDevtoolsCloudbuildV1Hash: Container message for hash 2395 // values. 2396 type ContaineranalysisGoogleDevtoolsCloudbuildV1Hash struct { 2397 // Type: The type of hash that was performed. 2398 // 2399 // Possible values: 2400 // "NONE" - No hash requested. 2401 // "SHA256" - Use a sha256 hash. 2402 // "MD5" - Use a md5 hash. 2403 // "SHA512" - Use a sha512 hash. 2404 Type string `json:"type,omitempty"` 2405 // Value: The hash value. 2406 Value string `json:"value,omitempty"` 2407 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 2408 // include in API requests. By default, fields with empty or default values are 2409 // omitted from API requests. See 2410 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2411 // details. 2412 ForceSendFields []string `json:"-"` 2413 // NullFields is a list of field names (e.g. "Type") to include in API requests 2414 // with the JSON null value. By default, fields with empty values are omitted 2415 // from API requests. See 2416 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2417 NullFields []string `json:"-"` 2418 } 2419 2420 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1Hash) MarshalJSON() ([]byte, error) { 2421 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1Hash 2422 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2423 } 2424 2425 // ContaineranalysisGoogleDevtoolsCloudbuildV1InlineSecret: Pairs a set of 2426 // secret environment variables mapped to encrypted values with the Cloud KMS 2427 // key to use to decrypt the value. 2428 type ContaineranalysisGoogleDevtoolsCloudbuildV1InlineSecret struct { 2429 // EnvMap: Map of environment variable name to its encrypted value. Secret 2430 // environment variables must be unique across all of a build's secrets, and 2431 // must be used by at least one build step. Values can be at most 64 KB in 2432 // size. There can be at most 100 secret values across all of a build's 2433 // secrets. 2434 EnvMap map[string]string `json:"envMap,omitempty"` 2435 // KmsKeyName: Resource name of Cloud KMS crypto key to decrypt the encrypted 2436 // value. In format: projects/*/locations/*/keyRings/*/cryptoKeys/* 2437 KmsKeyName string `json:"kmsKeyName,omitempty"` 2438 // ForceSendFields is a list of field names (e.g. "EnvMap") to unconditionally 2439 // include in API requests. By default, fields with empty or default values are 2440 // omitted from API requests. See 2441 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2442 // details. 2443 ForceSendFields []string `json:"-"` 2444 // NullFields is a list of field names (e.g. "EnvMap") to include in API 2445 // requests with the JSON null value. By default, fields with empty values are 2446 // omitted from API requests. See 2447 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2448 NullFields []string `json:"-"` 2449 } 2450 2451 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1InlineSecret) MarshalJSON() ([]byte, error) { 2452 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1InlineSecret 2453 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2454 } 2455 2456 // ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource: Location of the 2457 // source in a Google Cloud Source Repository. 2458 type ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource struct { 2459 // BranchName: Regex matching branches to build. The syntax of the regular 2460 // expressions accepted is the syntax accepted by RE2 and described at 2461 // https://github.com/google/re2/wiki/Syntax 2462 BranchName string `json:"branchName,omitempty"` 2463 // CommitSha: Explicit commit SHA to build. 2464 CommitSha string `json:"commitSha,omitempty"` 2465 // Dir: Directory, relative to the source root, in which to run the build. This 2466 // must be a relative path. If a step's `dir` is specified and is an absolute 2467 // path, this value is ignored for that step's execution. 2468 Dir string `json:"dir,omitempty"` 2469 // InvertRegex: Only trigger a build if the revision regex does NOT match the 2470 // revision regex. 2471 InvertRegex bool `json:"invertRegex,omitempty"` 2472 // ProjectId: ID of the project that owns the Cloud Source Repository. If 2473 // omitted, the project ID requesting the build is assumed. 2474 ProjectId string `json:"projectId,omitempty"` 2475 // RepoName: Name of the Cloud Source Repository. 2476 RepoName string `json:"repoName,omitempty"` 2477 // Substitutions: Substitutions to use in a triggered build. Should only be 2478 // used with RunBuildTrigger 2479 Substitutions map[string]string `json:"substitutions,omitempty"` 2480 // TagName: Regex matching tags to build. The syntax of the regular expressions 2481 // accepted is the syntax accepted by RE2 and described at 2482 // https://github.com/google/re2/wiki/Syntax 2483 TagName string `json:"tagName,omitempty"` 2484 // ForceSendFields is a list of field names (e.g. "BranchName") to 2485 // unconditionally include in API requests. By default, fields with empty or 2486 // default values are omitted from API requests. See 2487 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2488 // details. 2489 ForceSendFields []string `json:"-"` 2490 // NullFields is a list of field names (e.g. "BranchName") to include in API 2491 // requests with the JSON null value. By default, fields with empty values are 2492 // omitted from API requests. See 2493 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2494 NullFields []string `json:"-"` 2495 } 2496 2497 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource) MarshalJSON() ([]byte, error) { 2498 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource 2499 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2500 } 2501 2502 // ContaineranalysisGoogleDevtoolsCloudbuildV1Results: Artifacts created by the 2503 // build pipeline. 2504 type ContaineranalysisGoogleDevtoolsCloudbuildV1Results struct { 2505 // ArtifactManifest: Path to the artifact manifest for non-container artifacts 2506 // uploaded to Cloud Storage. Only populated when artifacts are uploaded to 2507 // Cloud Storage. 2508 ArtifactManifest string `json:"artifactManifest,omitempty"` 2509 // ArtifactTiming: Time to push all non-container artifacts to Cloud Storage. 2510 ArtifactTiming *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"artifactTiming,omitempty"` 2511 // BuildStepImages: List of build step digests, in the order corresponding to 2512 // build step indices. 2513 BuildStepImages []string `json:"buildStepImages,omitempty"` 2514 // BuildStepOutputs: List of build step outputs, produced by builder images, in 2515 // the order corresponding to build step indices. Cloud Builders 2516 // (https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this 2517 // output by writing to `$BUILDER_OUTPUT/output`. Only the first 50KB of data 2518 // is stored. Note that the `$BUILDER_OUTPUT` variable is read-only and can't 2519 // be substituted. 2520 BuildStepOutputs []string `json:"buildStepOutputs,omitempty"` 2521 // Images: Container images that were built as a part of the build. 2522 Images []*ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage `json:"images,omitempty"` 2523 // MavenArtifacts: Maven artifacts uploaded to Artifact Registry at the end of 2524 // the build. 2525 MavenArtifacts []*ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedMavenArtifact `json:"mavenArtifacts,omitempty"` 2526 // NpmPackages: Npm packages uploaded to Artifact Registry at the end of the 2527 // build. 2528 NpmPackages []*ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage `json:"npmPackages,omitempty"` 2529 // NumArtifacts: Number of non-container artifacts uploaded to Cloud Storage. 2530 // Only populated when artifacts are uploaded to Cloud Storage. 2531 NumArtifacts int64 `json:"numArtifacts,omitempty,string"` 2532 // PythonPackages: Python artifacts uploaded to Artifact Registry at the end of 2533 // the build. 2534 PythonPackages []*ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedPythonPackage `json:"pythonPackages,omitempty"` 2535 // ForceSendFields is a list of field names (e.g. "ArtifactManifest") to 2536 // unconditionally include in API requests. By default, fields with empty or 2537 // default values are omitted from API requests. See 2538 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2539 // details. 2540 ForceSendFields []string `json:"-"` 2541 // NullFields is a list of field names (e.g. "ArtifactManifest") to include in 2542 // API requests with the JSON null value. By default, fields with empty values 2543 // are omitted from API requests. See 2544 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2545 NullFields []string `json:"-"` 2546 } 2547 2548 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1Results) MarshalJSON() ([]byte, error) { 2549 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1Results 2550 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2551 } 2552 2553 // ContaineranalysisGoogleDevtoolsCloudbuildV1Secret: Pairs a set of secret 2554 // environment variables containing encrypted values with the Cloud KMS key to 2555 // use to decrypt the value. Note: Use `kmsKeyName` with `available_secrets` 2556 // instead of using `kmsKeyName` with `secret`. For instructions see: 2557 // https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials. 2558 type ContaineranalysisGoogleDevtoolsCloudbuildV1Secret struct { 2559 // KmsKeyName: Cloud KMS key name to use to decrypt these envs. 2560 KmsKeyName string `json:"kmsKeyName,omitempty"` 2561 // SecretEnv: Map of environment variable name to its encrypted value. Secret 2562 // environment variables must be unique across all of a build's secrets, and 2563 // must be used by at least one build step. Values can be at most 64 KB in 2564 // size. There can be at most 100 secret values across all of a build's 2565 // secrets. 2566 SecretEnv map[string]string `json:"secretEnv,omitempty"` 2567 // ForceSendFields is a list of field names (e.g. "KmsKeyName") to 2568 // unconditionally include in API requests. By default, fields with empty or 2569 // default values are omitted from API requests. See 2570 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2571 // details. 2572 ForceSendFields []string `json:"-"` 2573 // NullFields is a list of field names (e.g. "KmsKeyName") to include in API 2574 // requests with the JSON null value. By default, fields with empty values are 2575 // omitted from API requests. See 2576 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2577 NullFields []string `json:"-"` 2578 } 2579 2580 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1Secret) MarshalJSON() ([]byte, error) { 2581 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1Secret 2582 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2583 } 2584 2585 // ContaineranalysisGoogleDevtoolsCloudbuildV1SecretManagerSecret: Pairs a 2586 // secret environment variable with a SecretVersion in Secret Manager. 2587 type ContaineranalysisGoogleDevtoolsCloudbuildV1SecretManagerSecret struct { 2588 // Env: Environment variable name to associate with the secret. Secret 2589 // environment variables must be unique across all of a build's secrets, and 2590 // must be used by at least one build step. 2591 Env string `json:"env,omitempty"` 2592 // VersionName: Resource name of the SecretVersion. In format: 2593 // projects/*/secrets/*/versions/* 2594 VersionName string `json:"versionName,omitempty"` 2595 // ForceSendFields is a list of field names (e.g. "Env") to unconditionally 2596 // include in API requests. By default, fields with empty or default values are 2597 // omitted from API requests. See 2598 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2599 // details. 2600 ForceSendFields []string `json:"-"` 2601 // NullFields is a list of field names (e.g. "Env") to include in API requests 2602 // with the JSON null value. By default, fields with empty values are omitted 2603 // from API requests. See 2604 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2605 NullFields []string `json:"-"` 2606 } 2607 2608 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1SecretManagerSecret) MarshalJSON() ([]byte, error) { 2609 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1SecretManagerSecret 2610 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2611 } 2612 2613 // ContaineranalysisGoogleDevtoolsCloudbuildV1Secrets: Secrets and secret 2614 // environment variables. 2615 type ContaineranalysisGoogleDevtoolsCloudbuildV1Secrets struct { 2616 // Inline: Secrets encrypted with KMS key and the associated secret environment 2617 // variable. 2618 Inline []*ContaineranalysisGoogleDevtoolsCloudbuildV1InlineSecret `json:"inline,omitempty"` 2619 // SecretManager: Secrets in Secret Manager and associated secret environment 2620 // variable. 2621 SecretManager []*ContaineranalysisGoogleDevtoolsCloudbuildV1SecretManagerSecret `json:"secretManager,omitempty"` 2622 // ForceSendFields is a list of field names (e.g. "Inline") to unconditionally 2623 // include in API requests. By default, fields with empty or default values are 2624 // omitted from API requests. See 2625 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2626 // details. 2627 ForceSendFields []string `json:"-"` 2628 // NullFields is a list of field names (e.g. "Inline") to include in API 2629 // requests with the JSON null value. By default, fields with empty values are 2630 // omitted from API requests. See 2631 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2632 NullFields []string `json:"-"` 2633 } 2634 2635 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1Secrets) MarshalJSON() ([]byte, error) { 2636 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1Secrets 2637 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2638 } 2639 2640 // ContaineranalysisGoogleDevtoolsCloudbuildV1Source: Location of the source in 2641 // a supported storage service. 2642 type ContaineranalysisGoogleDevtoolsCloudbuildV1Source struct { 2643 // ConnectedRepository: Optional. If provided, get the source from this 2nd-gen 2644 // Google Cloud Build repository resource. 2645 ConnectedRepository *ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository `json:"connectedRepository,omitempty"` 2646 // DeveloperConnectConfig: If provided, get the source from this Developer 2647 // Connect config. 2648 DeveloperConnectConfig *ContaineranalysisGoogleDevtoolsCloudbuildV1DeveloperConnectConfig `json:"developerConnectConfig,omitempty"` 2649 // GitSource: If provided, get the source from this Git repository. 2650 GitSource *ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource `json:"gitSource,omitempty"` 2651 // RepoSource: If provided, get the source from this location in a Cloud Source 2652 // Repository. 2653 RepoSource *ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource `json:"repoSource,omitempty"` 2654 // StorageSource: If provided, get the source from this location in Cloud 2655 // Storage. 2656 StorageSource *ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource `json:"storageSource,omitempty"` 2657 // StorageSourceManifest: If provided, get the source from this manifest in 2658 // Cloud Storage. This feature is in Preview; see description here 2659 // (https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). 2660 StorageSourceManifest *ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest `json:"storageSourceManifest,omitempty"` 2661 // ForceSendFields is a list of field names (e.g. "ConnectedRepository") to 2662 // unconditionally include in API requests. By default, fields with empty or 2663 // default values are omitted from API requests. See 2664 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2665 // details. 2666 ForceSendFields []string `json:"-"` 2667 // NullFields is a list of field names (e.g. "ConnectedRepository") to include 2668 // in API requests with the JSON null value. By default, fields with empty 2669 // values are omitted from API requests. See 2670 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2671 NullFields []string `json:"-"` 2672 } 2673 2674 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1Source) MarshalJSON() ([]byte, error) { 2675 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1Source 2676 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2677 } 2678 2679 // ContaineranalysisGoogleDevtoolsCloudbuildV1SourceProvenance: Provenance of 2680 // the source. Ways to find the original source, or verify that some source was 2681 // used for this build. 2682 type ContaineranalysisGoogleDevtoolsCloudbuildV1SourceProvenance struct { 2683 // FileHashes: Output only. Hash(es) of the build source, which can be used to 2684 // verify that the original source integrity was maintained in the build. Note 2685 // that `FileHashes` will only be populated if `BuildOptions` has requested a 2686 // `SourceProvenanceHash`. The keys to this map are file paths used as build 2687 // source and the values contain the hash values for those files. If the build 2688 // source came in a single package such as a gzipped tarfile (`.tar.gz`), the 2689 // `FileHash` will be for the single path to that file. 2690 FileHashes map[string]ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes `json:"fileHashes,omitempty"` 2691 // ResolvedConnectedRepository: Output only. A copy of the build's 2692 // `source.connected_repository`, if exists, with any revisions resolved. 2693 ResolvedConnectedRepository *ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository `json:"resolvedConnectedRepository,omitempty"` 2694 // ResolvedGitSource: Output only. A copy of the build's `source.git_source`, 2695 // if exists, with any revisions resolved. 2696 ResolvedGitSource *ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource `json:"resolvedGitSource,omitempty"` 2697 // ResolvedRepoSource: A copy of the build's `source.repo_source`, if exists, 2698 // with any revisions resolved. 2699 ResolvedRepoSource *ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource `json:"resolvedRepoSource,omitempty"` 2700 // ResolvedStorageSource: A copy of the build's `source.storage_source`, if 2701 // exists, with any generations resolved. 2702 ResolvedStorageSource *ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource `json:"resolvedStorageSource,omitempty"` 2703 // ResolvedStorageSourceManifest: A copy of the build's 2704 // `source.storage_source_manifest`, if exists, with any revisions resolved. 2705 // This feature is in Preview. 2706 ResolvedStorageSourceManifest *ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest `json:"resolvedStorageSourceManifest,omitempty"` 2707 // ForceSendFields is a list of field names (e.g. "FileHashes") to 2708 // unconditionally include in API requests. By default, fields with empty or 2709 // default values are omitted from API requests. See 2710 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2711 // details. 2712 ForceSendFields []string `json:"-"` 2713 // NullFields is a list of field names (e.g. "FileHashes") to include in API 2714 // requests with the JSON null value. By default, fields with empty values are 2715 // omitted from API requests. See 2716 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2717 NullFields []string `json:"-"` 2718 } 2719 2720 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1SourceProvenance) MarshalJSON() ([]byte, error) { 2721 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1SourceProvenance 2722 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2723 } 2724 2725 // ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource: Location of the 2726 // source in an archive file in Cloud Storage. 2727 type ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource struct { 2728 // Bucket: Cloud Storage bucket containing the source (see Bucket Name 2729 // Requirements 2730 // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). 2731 Bucket string `json:"bucket,omitempty"` 2732 // Generation: Cloud Storage generation for the object. If the generation is 2733 // omitted, the latest generation will be used. 2734 Generation int64 `json:"generation,omitempty,string"` 2735 // Object: Cloud Storage object containing the source. This object must be a 2736 // zipped (`.zip`) or gzipped archive file (`.tar.gz`) containing source to 2737 // build. 2738 Object string `json:"object,omitempty"` 2739 // SourceFetcher: Optional. Option to specify the tool to fetch the source file 2740 // for the build. 2741 // 2742 // Possible values: 2743 // "SOURCE_FETCHER_UNSPECIFIED" - Unspecified defaults to GSUTIL. 2744 // "GSUTIL" - Use the "gsutil" tool to download the source file. 2745 // "GCS_FETCHER" - Use the Cloud Storage Fetcher tool to download the source 2746 // file. 2747 SourceFetcher string `json:"sourceFetcher,omitempty"` 2748 // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally 2749 // include in API requests. By default, fields with empty or default values are 2750 // omitted from API requests. See 2751 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2752 // details. 2753 ForceSendFields []string `json:"-"` 2754 // NullFields is a list of field names (e.g. "Bucket") to include in API 2755 // requests with the JSON null value. By default, fields with empty values are 2756 // omitted from API requests. See 2757 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2758 NullFields []string `json:"-"` 2759 } 2760 2761 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource) MarshalJSON() ([]byte, error) { 2762 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource 2763 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2764 } 2765 2766 // ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest: Location 2767 // of the source manifest in Cloud Storage. This feature is in Preview; see 2768 // description here 2769 // (https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). 2770 type ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest struct { 2771 // Bucket: Cloud Storage bucket containing the source manifest (see Bucket Name 2772 // Requirements 2773 // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). 2774 Bucket string `json:"bucket,omitempty"` 2775 // Generation: Cloud Storage generation for the object. If the generation is 2776 // omitted, the latest generation will be used. 2777 Generation int64 `json:"generation,omitempty,string"` 2778 // Object: Cloud Storage object containing the source manifest. This object 2779 // must be a JSON file. 2780 Object string `json:"object,omitempty"` 2781 // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally 2782 // include in API requests. By default, fields with empty or default values are 2783 // omitted from API requests. See 2784 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2785 // details. 2786 ForceSendFields []string `json:"-"` 2787 // NullFields is a list of field names (e.g. "Bucket") to include in API 2788 // requests with the JSON null value. By default, fields with empty values are 2789 // omitted from API requests. See 2790 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2791 NullFields []string `json:"-"` 2792 } 2793 2794 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest) MarshalJSON() ([]byte, error) { 2795 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest 2796 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2797 } 2798 2799 // ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan: Start and end times for 2800 // a build execution phase. 2801 type ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan struct { 2802 // EndTime: End of time span. 2803 EndTime string `json:"endTime,omitempty"` 2804 // StartTime: Start of time span. 2805 StartTime string `json:"startTime,omitempty"` 2806 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally 2807 // include in API requests. By default, fields with empty or default values are 2808 // omitted from API requests. See 2809 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2810 // details. 2811 ForceSendFields []string `json:"-"` 2812 // NullFields is a list of field names (e.g. "EndTime") to include in API 2813 // requests with the JSON null value. By default, fields with empty values are 2814 // omitted from API requests. See 2815 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2816 NullFields []string `json:"-"` 2817 } 2818 2819 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan) MarshalJSON() ([]byte, error) { 2820 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan 2821 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2822 } 2823 2824 // ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedMavenArtifact: A Maven 2825 // artifact uploaded using the MavenArtifact directive. 2826 type ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedMavenArtifact struct { 2827 // FileHashes: Hash types and values of the Maven Artifact. 2828 FileHashes *ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes `json:"fileHashes,omitempty"` 2829 // PushTiming: Output only. Stores timing information for pushing the specified 2830 // artifact. 2831 PushTiming *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"pushTiming,omitempty"` 2832 // Uri: URI of the uploaded artifact. 2833 Uri string `json:"uri,omitempty"` 2834 // ForceSendFields is a list of field names (e.g. "FileHashes") to 2835 // unconditionally include in API requests. By default, fields with empty or 2836 // default values are omitted from API requests. See 2837 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2838 // details. 2839 ForceSendFields []string `json:"-"` 2840 // NullFields is a list of field names (e.g. "FileHashes") to include in API 2841 // requests with the JSON null value. By default, fields with empty values are 2842 // omitted from API requests. See 2843 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2844 NullFields []string `json:"-"` 2845 } 2846 2847 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedMavenArtifact) MarshalJSON() ([]byte, error) { 2848 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedMavenArtifact 2849 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2850 } 2851 2852 // ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage: An npm 2853 // package uploaded to Artifact Registry using the NpmPackage directive. 2854 type ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage struct { 2855 // FileHashes: Hash types and values of the npm package. 2856 FileHashes *ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes `json:"fileHashes,omitempty"` 2857 // PushTiming: Output only. Stores timing information for pushing the specified 2858 // artifact. 2859 PushTiming *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"pushTiming,omitempty"` 2860 // Uri: URI of the uploaded npm package. 2861 Uri string `json:"uri,omitempty"` 2862 // ForceSendFields is a list of field names (e.g. "FileHashes") to 2863 // unconditionally include in API requests. By default, fields with empty or 2864 // default values are omitted from API requests. See 2865 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2866 // details. 2867 ForceSendFields []string `json:"-"` 2868 // NullFields is a list of field names (e.g. "FileHashes") to include in API 2869 // requests with the JSON null value. By default, fields with empty values are 2870 // omitted from API requests. See 2871 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2872 NullFields []string `json:"-"` 2873 } 2874 2875 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage) MarshalJSON() ([]byte, error) { 2876 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage 2877 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2878 } 2879 2880 // ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedPythonPackage: Artifact 2881 // uploaded using the PythonPackage directive. 2882 type ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedPythonPackage struct { 2883 // FileHashes: Hash types and values of the Python Artifact. 2884 FileHashes *ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes `json:"fileHashes,omitempty"` 2885 // PushTiming: Output only. Stores timing information for pushing the specified 2886 // artifact. 2887 PushTiming *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"pushTiming,omitempty"` 2888 // Uri: URI of the uploaded artifact. 2889 Uri string `json:"uri,omitempty"` 2890 // ForceSendFields is a list of field names (e.g. "FileHashes") to 2891 // unconditionally include in API requests. By default, fields with empty or 2892 // default values are omitted from API requests. See 2893 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2894 // details. 2895 ForceSendFields []string `json:"-"` 2896 // NullFields is a list of field names (e.g. "FileHashes") to include in API 2897 // requests with the JSON null value. By default, fields with empty values are 2898 // omitted from API requests. See 2899 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2900 NullFields []string `json:"-"` 2901 } 2902 2903 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedPythonPackage) MarshalJSON() ([]byte, error) { 2904 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedPythonPackage 2905 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2906 } 2907 2908 // ContaineranalysisGoogleDevtoolsCloudbuildV1Volume: Volume describes a Docker 2909 // container volume which is mounted into build steps in order to persist files 2910 // across build step execution. 2911 type ContaineranalysisGoogleDevtoolsCloudbuildV1Volume struct { 2912 // Name: Name of the volume to mount. Volume names must be unique per build 2913 // step and must be valid names for Docker volumes. Each named volume must be 2914 // used by at least two build steps. 2915 Name string `json:"name,omitempty"` 2916 // Path: Path at which to mount the volume. Paths must be absolute and cannot 2917 // conflict with other volume paths on the same build step or with certain 2918 // reserved volume paths. 2919 Path string `json:"path,omitempty"` 2920 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 2921 // include in API requests. By default, fields with empty or default values are 2922 // omitted from API requests. See 2923 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2924 // details. 2925 ForceSendFields []string `json:"-"` 2926 // NullFields is a list of field names (e.g. "Name") to include in API requests 2927 // with the JSON null value. By default, fields with empty values are omitted 2928 // from API requests. See 2929 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2930 NullFields []string `json:"-"` 2931 } 2932 2933 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1Volume) MarshalJSON() ([]byte, error) { 2934 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1Volume 2935 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2936 } 2937 2938 type DSSEAttestationNote struct { 2939 // Hint: DSSEHint hints at the purpose of the attestation authority. 2940 Hint *DSSEHint `json:"hint,omitempty"` 2941 // ForceSendFields is a list of field names (e.g. "Hint") to unconditionally 2942 // include in API requests. By default, fields with empty or default values are 2943 // omitted from API requests. See 2944 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2945 // details. 2946 ForceSendFields []string `json:"-"` 2947 // NullFields is a list of field names (e.g. "Hint") to include in API requests 2948 // with the JSON null value. By default, fields with empty values are omitted 2949 // from API requests. See 2950 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2951 NullFields []string `json:"-"` 2952 } 2953 2954 func (s *DSSEAttestationNote) MarshalJSON() ([]byte, error) { 2955 type NoMethod DSSEAttestationNote 2956 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2957 } 2958 2959 // DSSEAttestationOccurrence: Deprecated. Prefer to use a regular Occurrence, 2960 // and populate the Envelope at the top level of the Occurrence. 2961 type DSSEAttestationOccurrence struct { 2962 // Envelope: If doing something security critical, make sure to verify the 2963 // signatures in this metadata. 2964 Envelope *Envelope `json:"envelope,omitempty"` 2965 Statement *InTotoStatement `json:"statement,omitempty"` 2966 // ForceSendFields is a list of field names (e.g. "Envelope") to 2967 // unconditionally include in API requests. By default, fields with empty or 2968 // default values are omitted from API requests. See 2969 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2970 // details. 2971 ForceSendFields []string `json:"-"` 2972 // NullFields is a list of field names (e.g. "Envelope") to include in API 2973 // requests with the JSON null value. By default, fields with empty values are 2974 // omitted from API requests. See 2975 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2976 NullFields []string `json:"-"` 2977 } 2978 2979 func (s *DSSEAttestationOccurrence) MarshalJSON() ([]byte, error) { 2980 type NoMethod DSSEAttestationOccurrence 2981 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2982 } 2983 2984 // DSSEHint: This submessage provides human-readable hints about the purpose of 2985 // the authority. Because the name of a note acts as its resource reference, it 2986 // is important to disambiguate the canonical name of the Note (which might be 2987 // a UUID for security purposes) from "readable" names more suitable for debug 2988 // output. Note that these hints should not be used to look up authorities in 2989 // security sensitive contexts, such as when looking up attestations to verify. 2990 type DSSEHint struct { 2991 // HumanReadableName: Required. The human readable name of this attestation 2992 // authority, for example "cloudbuild-prod". 2993 HumanReadableName string `json:"humanReadableName,omitempty"` 2994 // ForceSendFields is a list of field names (e.g. "HumanReadableName") to 2995 // unconditionally include in API requests. By default, fields with empty or 2996 // default values are omitted from API requests. See 2997 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2998 // details. 2999 ForceSendFields []string `json:"-"` 3000 // NullFields is a list of field names (e.g. "HumanReadableName") to include in 3001 // API requests with the JSON null value. By default, fields with empty values 3002 // are omitted from API requests. See 3003 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3004 NullFields []string `json:"-"` 3005 } 3006 3007 func (s *DSSEHint) MarshalJSON() ([]byte, error) { 3008 type NoMethod DSSEHint 3009 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3010 } 3011 3012 // DeploymentNote: An artifact that can be deployed in some runtime. 3013 type DeploymentNote struct { 3014 // ResourceUri: Required. Resource URI for the artifact being deployed. 3015 ResourceUri []string `json:"resourceUri,omitempty"` 3016 // ForceSendFields is a list of field names (e.g. "ResourceUri") to 3017 // unconditionally include in API requests. By default, fields with empty or 3018 // default values are omitted from API requests. See 3019 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3020 // details. 3021 ForceSendFields []string `json:"-"` 3022 // NullFields is a list of field names (e.g. "ResourceUri") to include in API 3023 // requests with the JSON null value. By default, fields with empty values are 3024 // omitted from API requests. See 3025 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3026 NullFields []string `json:"-"` 3027 } 3028 3029 func (s *DeploymentNote) MarshalJSON() ([]byte, error) { 3030 type NoMethod DeploymentNote 3031 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3032 } 3033 3034 // DeploymentOccurrence: The period during which some deployable was active in 3035 // a runtime. 3036 type DeploymentOccurrence struct { 3037 // Address: Address of the runtime element hosting this deployment. 3038 Address string `json:"address,omitempty"` 3039 // Config: Configuration used to create this deployment. 3040 Config string `json:"config,omitempty"` 3041 // DeployTime: Required. Beginning of the lifetime of this deployment. 3042 DeployTime string `json:"deployTime,omitempty"` 3043 // Platform: Platform hosting this deployment. 3044 // 3045 // Possible values: 3046 // "PLATFORM_UNSPECIFIED" - Unknown. 3047 // "GKE" - Google Container Engine. 3048 // "FLEX" - Google App Engine: Flexible Environment. 3049 // "CUSTOM" - Custom user-defined platform. 3050 Platform string `json:"platform,omitempty"` 3051 // ResourceUri: Output only. Resource URI for the artifact being deployed taken 3052 // from the deployable field with the same name. 3053 ResourceUri []string `json:"resourceUri,omitempty"` 3054 // UndeployTime: End of the lifetime of this deployment. 3055 UndeployTime string `json:"undeployTime,omitempty"` 3056 // UserEmail: Identity of the user that triggered this deployment. 3057 UserEmail string `json:"userEmail,omitempty"` 3058 // ForceSendFields is a list of field names (e.g. "Address") to unconditionally 3059 // include in API requests. By default, fields with empty or default values are 3060 // omitted from API requests. See 3061 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3062 // details. 3063 ForceSendFields []string `json:"-"` 3064 // NullFields is a list of field names (e.g. "Address") to include in API 3065 // requests with the JSON null value. By default, fields with empty values are 3066 // omitted from API requests. See 3067 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3068 NullFields []string `json:"-"` 3069 } 3070 3071 func (s *DeploymentOccurrence) MarshalJSON() ([]byte, error) { 3072 type NoMethod DeploymentOccurrence 3073 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3074 } 3075 3076 // Detail: A detail for a distro and package affected by this vulnerability and 3077 // its associated fix (if one is available). 3078 type Detail struct { 3079 // AffectedCpeUri: Required. The CPE URI (https://cpe.mitre.org/specification/) 3080 // this vulnerability affects. 3081 AffectedCpeUri string `json:"affectedCpeUri,omitempty"` 3082 // AffectedPackage: Required. The package this vulnerability affects. 3083 AffectedPackage string `json:"affectedPackage,omitempty"` 3084 // AffectedVersionEnd: The version number at the end of an interval in which 3085 // this vulnerability exists. A vulnerability can affect a package between 3086 // version numbers that are disjoint sets of intervals (example: [1.0.0-1.1.0], 3087 // [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its 3088 // own Detail. If a specific affected version is provided by a vulnerability 3089 // database, affected_version_start and affected_version_end will be the same 3090 // in that Detail. 3091 AffectedVersionEnd *Version `json:"affectedVersionEnd,omitempty"` 3092 // AffectedVersionStart: The version number at the start of an interval in 3093 // which this vulnerability exists. A vulnerability can affect a package 3094 // between version numbers that are disjoint sets of intervals (example: 3095 // [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be 3096 // represented in its own Detail. If a specific affected version is provided by 3097 // a vulnerability database, affected_version_start and affected_version_end 3098 // will be the same in that Detail. 3099 AffectedVersionStart *Version `json:"affectedVersionStart,omitempty"` 3100 // Description: A vendor-specific description of this vulnerability. 3101 Description string `json:"description,omitempty"` 3102 // FixedCpeUri: The distro recommended CPE URI 3103 // (https://cpe.mitre.org/specification/) to update to that contains a fix for 3104 // this vulnerability. It is possible for this to be different from the 3105 // affected_cpe_uri. 3106 FixedCpeUri string `json:"fixedCpeUri,omitempty"` 3107 // FixedPackage: The distro recommended package to update to that contains a 3108 // fix for this vulnerability. It is possible for this to be different from the 3109 // affected_package. 3110 FixedPackage string `json:"fixedPackage,omitempty"` 3111 // FixedVersion: The distro recommended version to update to that contains a 3112 // fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no 3113 // such version is yet available. 3114 FixedVersion *Version `json:"fixedVersion,omitempty"` 3115 // IsObsolete: Whether this detail is obsolete. Occurrences are expected not to 3116 // point to obsolete details. 3117 IsObsolete bool `json:"isObsolete,omitempty"` 3118 // PackageType: The type of package; whether native or non native (e.g., ruby 3119 // gems, node.js packages, etc.). 3120 PackageType string `json:"packageType,omitempty"` 3121 // SeverityName: The distro assigned severity of this vulnerability. 3122 SeverityName string `json:"severityName,omitempty"` 3123 // Source: The source from which the information in this Detail was obtained. 3124 Source string `json:"source,omitempty"` 3125 // SourceUpdateTime: The time this information was last changed at the source. 3126 // This is an upstream timestamp from the underlying information source - e.g. 3127 // Ubuntu security tracker. 3128 SourceUpdateTime string `json:"sourceUpdateTime,omitempty"` 3129 // Vendor: The name of the vendor of the product. 3130 Vendor string `json:"vendor,omitempty"` 3131 // ForceSendFields is a list of field names (e.g. "AffectedCpeUri") to 3132 // unconditionally include in API requests. By default, fields with empty or 3133 // default values are omitted from API requests. See 3134 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3135 // details. 3136 ForceSendFields []string `json:"-"` 3137 // NullFields is a list of field names (e.g. "AffectedCpeUri") to include in 3138 // API requests with the JSON null value. By default, fields with empty values 3139 // are omitted from API requests. See 3140 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3141 NullFields []string `json:"-"` 3142 } 3143 3144 func (s *Detail) MarshalJSON() ([]byte, error) { 3145 type NoMethod Detail 3146 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3147 } 3148 3149 // Digest: Digest information. 3150 type Digest struct { 3151 // Algo: `SHA1`, `SHA512` etc. 3152 Algo string `json:"algo,omitempty"` 3153 // DigestBytes: Value of the digest. 3154 DigestBytes string `json:"digestBytes,omitempty"` 3155 // ForceSendFields is a list of field names (e.g. "Algo") to unconditionally 3156 // include in API requests. By default, fields with empty or default values are 3157 // omitted from API requests. See 3158 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3159 // details. 3160 ForceSendFields []string `json:"-"` 3161 // NullFields is a list of field names (e.g. "Algo") to include in API requests 3162 // with the JSON null value. By default, fields with empty values are omitted 3163 // from API requests. See 3164 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3165 NullFields []string `json:"-"` 3166 } 3167 3168 func (s *Digest) MarshalJSON() ([]byte, error) { 3169 type NoMethod Digest 3170 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3171 } 3172 3173 // DiscoveryNote: A note that indicates a type of analysis a provider would 3174 // perform. This note exists in a provider's project. A `Discovery` occurrence 3175 // is created in a consumer's project at the start of analysis. 3176 type DiscoveryNote struct { 3177 // AnalysisKind: Required. Immutable. The kind of analysis that is handled by 3178 // this discovery. 3179 // 3180 // Possible values: 3181 // "NOTE_KIND_UNSPECIFIED" - Default value. This value is unused. 3182 // "VULNERABILITY" - The note and occurrence represent a package 3183 // vulnerability. 3184 // "BUILD" - The note and occurrence assert build provenance. 3185 // "IMAGE" - This represents an image basis relationship. 3186 // "PACKAGE" - This represents a package installed via a package manager. 3187 // "DEPLOYMENT" - The note and occurrence track deployment events. 3188 // "DISCOVERY" - The note and occurrence track the initial discovery status 3189 // of a resource. 3190 // "ATTESTATION" - This represents a logical "role" that can attest to 3191 // artifacts. 3192 // "UPGRADE" - This represents an available package upgrade. 3193 // "COMPLIANCE" - This represents a Compliance Note 3194 // "DSSE_ATTESTATION" - This represents a DSSE attestation Note 3195 // "VULNERABILITY_ASSESSMENT" - This represents a Vulnerability Assessment. 3196 // "SBOM_REFERENCE" - This represents an SBOM Reference. 3197 AnalysisKind string `json:"analysisKind,omitempty"` 3198 // ForceSendFields is a list of field names (e.g. "AnalysisKind") to 3199 // unconditionally include in API requests. By default, fields with empty or 3200 // default values are omitted from API requests. See 3201 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3202 // details. 3203 ForceSendFields []string `json:"-"` 3204 // NullFields is a list of field names (e.g. "AnalysisKind") to include in API 3205 // requests with the JSON null value. By default, fields with empty values are 3206 // omitted from API requests. See 3207 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3208 NullFields []string `json:"-"` 3209 } 3210 3211 func (s *DiscoveryNote) MarshalJSON() ([]byte, error) { 3212 type NoMethod DiscoveryNote 3213 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3214 } 3215 3216 // DiscoveryOccurrence: Provides information about the analysis status of a 3217 // discovered resource. 3218 type DiscoveryOccurrence struct { 3219 AnalysisCompleted *AnalysisCompleted `json:"analysisCompleted,omitempty"` 3220 // AnalysisError: Indicates any errors encountered during analysis of a 3221 // resource. There could be 0 or more of these errors. 3222 AnalysisError []*Status `json:"analysisError,omitempty"` 3223 // AnalysisStatus: The status of discovery for the resource. 3224 // 3225 // Possible values: 3226 // "ANALYSIS_STATUS_UNSPECIFIED" - Unknown. 3227 // "PENDING" - Resource is known but no action has been taken yet. 3228 // "SCANNING" - Resource is being analyzed. 3229 // "FINISHED_SUCCESS" - Analysis has finished successfully. 3230 // "COMPLETE" - Analysis has completed. 3231 // "FINISHED_FAILED" - Analysis has finished unsuccessfully, the analysis 3232 // itself is in a bad state. 3233 // "FINISHED_UNSUPPORTED" - The resource is known not to be supported. 3234 AnalysisStatus string `json:"analysisStatus,omitempty"` 3235 // AnalysisStatusError: When an error is encountered this will contain a 3236 // LocalizedMessage under details to show to the user. The LocalizedMessage is 3237 // output only and populated by the API. 3238 AnalysisStatusError *Status `json:"analysisStatusError,omitempty"` 3239 // ArchiveTime: Output only. The time occurrences related to this discovery 3240 // occurrence were archived. 3241 ArchiveTime string `json:"archiveTime,omitempty"` 3242 // ContinuousAnalysis: Whether the resource is continuously analyzed. 3243 // 3244 // Possible values: 3245 // "CONTINUOUS_ANALYSIS_UNSPECIFIED" - Unknown. 3246 // "ACTIVE" - The resource is continuously analyzed. 3247 // "INACTIVE" - The resource is ignored for continuous analysis. 3248 ContinuousAnalysis string `json:"continuousAnalysis,omitempty"` 3249 // Cpe: The CPE of the resource being scanned. 3250 Cpe string `json:"cpe,omitempty"` 3251 // LastScanTime: The last time this resource was scanned. 3252 LastScanTime string `json:"lastScanTime,omitempty"` 3253 // SbomStatus: The status of an SBOM generation. 3254 SbomStatus *SBOMStatus `json:"sbomStatus,omitempty"` 3255 // ForceSendFields is a list of field names (e.g. "AnalysisCompleted") to 3256 // unconditionally include in API requests. By default, fields with empty or 3257 // default values are omitted from API requests. See 3258 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3259 // details. 3260 ForceSendFields []string `json:"-"` 3261 // NullFields is a list of field names (e.g. "AnalysisCompleted") to include in 3262 // API requests with the JSON null value. By default, fields with empty values 3263 // are omitted from API requests. See 3264 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3265 NullFields []string `json:"-"` 3266 } 3267 3268 func (s *DiscoveryOccurrence) MarshalJSON() ([]byte, error) { 3269 type NoMethod DiscoveryOccurrence 3270 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3271 } 3272 3273 // Distribution: This represents a particular channel of distribution for a 3274 // given package. E.g., Debian's jessie-backports dpkg mirror. 3275 type Distribution struct { 3276 // Architecture: The CPU architecture for which packages in this distribution 3277 // channel were built. 3278 // 3279 // Possible values: 3280 // "ARCHITECTURE_UNSPECIFIED" - Unknown architecture. 3281 // "X86" - X86 architecture. 3282 // "X64" - X64 architecture. 3283 Architecture string `json:"architecture,omitempty"` 3284 // CpeUri: Required. The cpe_uri in CPE format 3285 // (https://cpe.mitre.org/specification/) denoting the package manager version 3286 // distributing a package. 3287 CpeUri string `json:"cpeUri,omitempty"` 3288 // Description: The distribution channel-specific description of this package. 3289 Description string `json:"description,omitempty"` 3290 // LatestVersion: The latest available version of this package in this 3291 // distribution channel. 3292 LatestVersion *Version `json:"latestVersion,omitempty"` 3293 // Maintainer: A freeform string denoting the maintainer of this package. 3294 Maintainer string `json:"maintainer,omitempty"` 3295 // Url: The distribution channel-specific homepage for this package. 3296 Url string `json:"url,omitempty"` 3297 // ForceSendFields is a list of field names (e.g. "Architecture") to 3298 // unconditionally include in API requests. By default, fields with empty or 3299 // default values are omitted from API requests. See 3300 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3301 // details. 3302 ForceSendFields []string `json:"-"` 3303 // NullFields is a list of field names (e.g. "Architecture") to include in API 3304 // requests with the JSON null value. By default, fields with empty values are 3305 // omitted from API requests. See 3306 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3307 NullFields []string `json:"-"` 3308 } 3309 3310 func (s *Distribution) MarshalJSON() ([]byte, error) { 3311 type NoMethod Distribution 3312 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3313 } 3314 3315 // Empty: A generic empty message that you can re-use to avoid defining 3316 // duplicated empty messages in your APIs. A typical example is to use it as 3317 // the request or the response type of an API method. For instance: service Foo 3318 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } 3319 type Empty struct { 3320 // ServerResponse contains the HTTP response code and headers from the server. 3321 googleapi.ServerResponse `json:"-"` 3322 } 3323 3324 // Envelope: MUST match 3325 // https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An 3326 // authenticated message of arbitrary type. 3327 type Envelope struct { 3328 Payload string `json:"payload,omitempty"` 3329 PayloadType string `json:"payloadType,omitempty"` 3330 Signatures []*EnvelopeSignature `json:"signatures,omitempty"` 3331 // ForceSendFields is a list of field names (e.g. "Payload") to unconditionally 3332 // include in API requests. By default, fields with empty or default values are 3333 // omitted from API requests. See 3334 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3335 // details. 3336 ForceSendFields []string `json:"-"` 3337 // NullFields is a list of field names (e.g. "Payload") to include in API 3338 // requests with the JSON null value. By default, fields with empty values are 3339 // omitted from API requests. See 3340 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3341 NullFields []string `json:"-"` 3342 } 3343 3344 func (s *Envelope) MarshalJSON() ([]byte, error) { 3345 type NoMethod Envelope 3346 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3347 } 3348 3349 type EnvelopeSignature struct { 3350 Keyid string `json:"keyid,omitempty"` 3351 Sig string `json:"sig,omitempty"` 3352 // ForceSendFields is a list of field names (e.g. "Keyid") to unconditionally 3353 // include in API requests. By default, fields with empty or default values are 3354 // omitted from API requests. See 3355 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3356 // details. 3357 ForceSendFields []string `json:"-"` 3358 // NullFields is a list of field names (e.g. "Keyid") to include in API 3359 // requests with the JSON null value. By default, fields with empty values are 3360 // omitted from API requests. See 3361 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3362 NullFields []string `json:"-"` 3363 } 3364 3365 func (s *EnvelopeSignature) MarshalJSON() ([]byte, error) { 3366 type NoMethod EnvelopeSignature 3367 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3368 } 3369 3370 // ExportSBOMRequest: The request to generate and export SBOM. Target must be 3371 // specified for the request. 3372 type ExportSBOMRequest struct { 3373 // CloudStorageLocation: Empty placeholder to denote that this is a Google 3374 // Cloud Storage export request. 3375 CloudStorageLocation *CloudStorageLocation `json:"cloudStorageLocation,omitempty"` 3376 // ForceSendFields is a list of field names (e.g. "CloudStorageLocation") to 3377 // unconditionally include in API requests. By default, fields with empty or 3378 // default values are omitted from API requests. See 3379 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3380 // details. 3381 ForceSendFields []string `json:"-"` 3382 // NullFields is a list of field names (e.g. "CloudStorageLocation") to include 3383 // in API requests with the JSON null value. By default, fields with empty 3384 // values are omitted from API requests. See 3385 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3386 NullFields []string `json:"-"` 3387 } 3388 3389 func (s *ExportSBOMRequest) MarshalJSON() ([]byte, error) { 3390 type NoMethod ExportSBOMRequest 3391 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3392 } 3393 3394 // ExportSBOMResponse: The response from a call to ExportSBOM. 3395 type ExportSBOMResponse struct { 3396 // DiscoveryOccurrence: The name of the discovery occurrence in the form 3397 // "projects/{project_id}/occurrences/{OCCURRENCE_ID} It can be used to track 3398 // the progress of the SBOM export. 3399 DiscoveryOccurrence string `json:"discoveryOccurrence,omitempty"` 3400 3401 // ServerResponse contains the HTTP response code and headers from the server. 3402 googleapi.ServerResponse `json:"-"` 3403 // ForceSendFields is a list of field names (e.g. "DiscoveryOccurrence") to 3404 // unconditionally include in API requests. By default, fields with empty or 3405 // default values are omitted from API requests. See 3406 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3407 // details. 3408 ForceSendFields []string `json:"-"` 3409 // NullFields is a list of field names (e.g. "DiscoveryOccurrence") to include 3410 // in API requests with the JSON null value. By default, fields with empty 3411 // values are omitted from API requests. See 3412 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3413 NullFields []string `json:"-"` 3414 } 3415 3416 func (s *ExportSBOMResponse) MarshalJSON() ([]byte, error) { 3417 type NoMethod ExportSBOMResponse 3418 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3419 } 3420 3421 // Expr: Represents a textual expression in the Common Expression Language 3422 // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics 3423 // of CEL are documented at https://github.com/google/cel-spec. Example 3424 // (Comparison): title: "Summary size limit" description: "Determines if a 3425 // summary is less than 100 chars" expression: "document.summary.size() < 100" 3426 // Example (Equality): title: "Requestor is owner" description: "Determines if 3427 // requestor is the document owner" expression: "document.owner == 3428 // request.auth.claims.email" Example (Logic): title: "Public documents" 3429 // description: "Determine whether the document should be publicly visible" 3430 // expression: "document.type != 'private' && document.type != 'internal'" 3431 // Example (Data Manipulation): title: "Notification string" description: 3432 // "Create a notification string with a timestamp." expression: "'New message 3433 // received at ' + string(document.create_time)" The exact variables and 3434 // functions that may be referenced within an expression are determined by the 3435 // service that evaluates it. See the service documentation for additional 3436 // information. 3437 type Expr struct { 3438 // Description: Optional. Description of the expression. This is a longer text 3439 // which describes the expression, e.g. when hovered over it in a UI. 3440 Description string `json:"description,omitempty"` 3441 // Expression: Textual representation of an expression in Common Expression 3442 // Language syntax. 3443 Expression string `json:"expression,omitempty"` 3444 // Location: Optional. String indicating the location of the expression for 3445 // error reporting, e.g. a file name and a position in the file. 3446 Location string `json:"location,omitempty"` 3447 // Title: Optional. Title for the expression, i.e. a short string describing 3448 // its purpose. This can be used e.g. in UIs which allow to enter the 3449 // expression. 3450 Title string `json:"title,omitempty"` 3451 // ForceSendFields is a list of field names (e.g. "Description") to 3452 // unconditionally include in API requests. By default, fields with empty or 3453 // default values are omitted from API requests. See 3454 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3455 // details. 3456 ForceSendFields []string `json:"-"` 3457 // NullFields is a list of field names (e.g. "Description") to include in API 3458 // requests with the JSON null value. By default, fields with empty values are 3459 // omitted from API requests. See 3460 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3461 NullFields []string `json:"-"` 3462 } 3463 3464 func (s *Expr) MarshalJSON() ([]byte, error) { 3465 type NoMethod Expr 3466 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3467 } 3468 3469 // FileHashes: Container message for hashes of byte content of files, used in 3470 // source messages to verify integrity of source input to the build. 3471 type FileHashes struct { 3472 // FileHash: Required. Collection of file hashes. 3473 FileHash []*Hash `json:"fileHash,omitempty"` 3474 // ForceSendFields is a list of field names (e.g. "FileHash") to 3475 // unconditionally include in API requests. By default, fields with empty or 3476 // default values are omitted from API requests. See 3477 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3478 // details. 3479 ForceSendFields []string `json:"-"` 3480 // NullFields is a list of field names (e.g. "FileHash") to include in API 3481 // requests with the JSON null value. By default, fields with empty values are 3482 // omitted from API requests. See 3483 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3484 NullFields []string `json:"-"` 3485 } 3486 3487 func (s *FileHashes) MarshalJSON() ([]byte, error) { 3488 type NoMethod FileHashes 3489 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3490 } 3491 3492 // Fingerprint: A set of properties that uniquely identify a given Docker 3493 // image. 3494 type Fingerprint struct { 3495 // V1Name: Required. The layer ID of the final layer in the Docker image's v1 3496 // representation. 3497 V1Name string `json:"v1Name,omitempty"` 3498 // V2Blob: Required. The ordered list of v2 blobs that represent a given image. 3499 V2Blob []string `json:"v2Blob,omitempty"` 3500 // V2Name: Output only. The name of the image's v2 blobs computed via: [bottom] 3501 // := v2_blobbottom := sha256(v2_blob[N] + " " + v2_name[N+1]) Only the name of 3502 // the final blob is kept. 3503 V2Name string `json:"v2Name,omitempty"` 3504 // ForceSendFields is a list of field names (e.g. "V1Name") to unconditionally 3505 // include in API requests. By default, fields with empty or default values are 3506 // omitted from API requests. See 3507 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3508 // details. 3509 ForceSendFields []string `json:"-"` 3510 // NullFields is a list of field names (e.g. "V1Name") to include in API 3511 // requests with the JSON null value. By default, fields with empty values are 3512 // omitted from API requests. See 3513 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3514 NullFields []string `json:"-"` 3515 } 3516 3517 func (s *Fingerprint) MarshalJSON() ([]byte, error) { 3518 type NoMethod Fingerprint 3519 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3520 } 3521 3522 // FixableTotalByDigest: Per resource and severity counts of fixable and total 3523 // vulnerabilities. 3524 type FixableTotalByDigest struct { 3525 // FixableCount: The number of fixable vulnerabilities associated with this 3526 // resource. 3527 FixableCount int64 `json:"fixableCount,omitempty,string"` 3528 // ResourceUri: The affected resource. 3529 ResourceUri string `json:"resourceUri,omitempty"` 3530 // Severity: The severity for this count. SEVERITY_UNSPECIFIED indicates total 3531 // across all severities. 3532 // 3533 // Possible values: 3534 // "SEVERITY_UNSPECIFIED" - Unknown. 3535 // "MINIMAL" - Minimal severity. 3536 // "LOW" - Low severity. 3537 // "MEDIUM" - Medium severity. 3538 // "HIGH" - High severity. 3539 // "CRITICAL" - Critical severity. 3540 Severity string `json:"severity,omitempty"` 3541 // TotalCount: The total number of vulnerabilities associated with this 3542 // resource. 3543 TotalCount int64 `json:"totalCount,omitempty,string"` 3544 // ForceSendFields is a list of field names (e.g. "FixableCount") to 3545 // unconditionally include in API requests. By default, fields with empty or 3546 // default values are omitted from API requests. See 3547 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3548 // details. 3549 ForceSendFields []string `json:"-"` 3550 // NullFields is a list of field names (e.g. "FixableCount") to include in API 3551 // requests with the JSON null value. By default, fields with empty values are 3552 // omitted from API requests. See 3553 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3554 NullFields []string `json:"-"` 3555 } 3556 3557 func (s *FixableTotalByDigest) MarshalJSON() ([]byte, error) { 3558 type NoMethod FixableTotalByDigest 3559 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3560 } 3561 3562 // GerritSourceContext: A SourceContext referring to a Gerrit project. 3563 type GerritSourceContext struct { 3564 // AliasContext: An alias, which may be a branch or tag. 3565 AliasContext *AliasContext `json:"aliasContext,omitempty"` 3566 // GerritProject: The full project name within the host. Projects may be 3567 // nested, so "project/subproject" is a valid project name. The "repo name" is 3568 // the hostURI/project. 3569 GerritProject string `json:"gerritProject,omitempty"` 3570 // HostUri: The URI of a running Gerrit instance. 3571 HostUri string `json:"hostUri,omitempty"` 3572 // RevisionId: A revision (commit) ID. 3573 RevisionId string `json:"revisionId,omitempty"` 3574 // ForceSendFields is a list of field names (e.g. "AliasContext") to 3575 // unconditionally include in API requests. By default, fields with empty or 3576 // default values are omitted from API requests. See 3577 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3578 // details. 3579 ForceSendFields []string `json:"-"` 3580 // NullFields is a list of field names (e.g. "AliasContext") to include in API 3581 // requests with the JSON null value. By default, fields with empty values are 3582 // omitted from API requests. See 3583 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3584 NullFields []string `json:"-"` 3585 } 3586 3587 func (s *GerritSourceContext) MarshalJSON() ([]byte, error) { 3588 type NoMethod GerritSourceContext 3589 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3590 } 3591 3592 // GetIamPolicyRequest: Request message for `GetIamPolicy` method. 3593 type GetIamPolicyRequest struct { 3594 // Options: OPTIONAL: A `GetPolicyOptions` object for specifying options to 3595 // `GetIamPolicy`. 3596 Options *GetPolicyOptions `json:"options,omitempty"` 3597 // ForceSendFields is a list of field names (e.g. "Options") to unconditionally 3598 // include in API requests. By default, fields with empty or default values are 3599 // omitted from API requests. See 3600 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3601 // details. 3602 ForceSendFields []string `json:"-"` 3603 // NullFields is a list of field names (e.g. "Options") to include in API 3604 // requests with the JSON null value. By default, fields with empty values are 3605 // omitted from API requests. See 3606 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3607 NullFields []string `json:"-"` 3608 } 3609 3610 func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) { 3611 type NoMethod GetIamPolicyRequest 3612 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3613 } 3614 3615 // GetPolicyOptions: Encapsulates settings provided to GetIamPolicy. 3616 type GetPolicyOptions struct { 3617 // RequestedPolicyVersion: Optional. The maximum policy version that will be 3618 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying 3619 // an invalid value will be rejected. Requests for policies with any 3620 // conditional role bindings must specify version 3. Policies with no 3621 // conditional role bindings may specify any valid value or leave the field 3622 // unset. The policy in the response might use the policy version that you 3623 // specified, or it might use a lower policy version. For example, if you 3624 // specify version 3, but the policy has no conditional role bindings, the 3625 // response uses version 1. To learn which resources support conditions in 3626 // their IAM policies, see the IAM documentation 3627 // (https://cloud.google.com/iam/help/conditions/resource-policies). 3628 RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"` 3629 // ForceSendFields is a list of field names (e.g. "RequestedPolicyVersion") to 3630 // unconditionally include in API requests. By default, fields with empty or 3631 // default values are omitted from API requests. See 3632 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3633 // details. 3634 ForceSendFields []string `json:"-"` 3635 // NullFields is a list of field names (e.g. "RequestedPolicyVersion") to 3636 // include in API requests with the JSON null value. By default, fields with 3637 // empty values are omitted from API requests. See 3638 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3639 NullFields []string `json:"-"` 3640 } 3641 3642 func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) { 3643 type NoMethod GetPolicyOptions 3644 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3645 } 3646 3647 // GitSourceContext: A GitSourceContext denotes a particular revision in a 3648 // third party Git repository (e.g., GitHub). 3649 type GitSourceContext struct { 3650 // RevisionId: Git commit hash. 3651 RevisionId string `json:"revisionId,omitempty"` 3652 // Url: Git repository URL. 3653 Url string `json:"url,omitempty"` 3654 // ForceSendFields is a list of field names (e.g. "RevisionId") to 3655 // unconditionally include in API requests. By default, fields with empty or 3656 // default values are omitted from API requests. See 3657 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3658 // details. 3659 ForceSendFields []string `json:"-"` 3660 // NullFields is a list of field names (e.g. "RevisionId") to include in API 3661 // requests with the JSON null value. By default, fields with empty values are 3662 // omitted from API requests. See 3663 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3664 NullFields []string `json:"-"` 3665 } 3666 3667 func (s *GitSourceContext) MarshalJSON() ([]byte, error) { 3668 type NoMethod GitSourceContext 3669 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3670 } 3671 3672 // GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata: Metadata for all 3673 // operations used and required for all operations that created by Container 3674 // Analysis Providers 3675 type GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata struct { 3676 // CreateTime: Output only. The time this operation was created. 3677 CreateTime string `json:"createTime,omitempty"` 3678 // EndTime: Output only. The time that this operation was marked completed or 3679 // failed. 3680 EndTime string `json:"endTime,omitempty"` 3681 // ForceSendFields is a list of field names (e.g. "CreateTime") to 3682 // unconditionally include in API requests. By default, fields with empty or 3683 // default values are omitted from API requests. See 3684 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3685 // details. 3686 ForceSendFields []string `json:"-"` 3687 // NullFields is a list of field names (e.g. "CreateTime") to include in API 3688 // requests with the JSON null value. By default, fields with empty values are 3689 // omitted from API requests. See 3690 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3691 NullFields []string `json:"-"` 3692 } 3693 3694 func (s *GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata) MarshalJSON() ([]byte, error) { 3695 type NoMethod GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata 3696 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3697 } 3698 3699 // GrafeasV1FileLocation: Indicates the location at which a package was found. 3700 type GrafeasV1FileLocation struct { 3701 // FilePath: For jars that are contained inside .war files, this filepath can 3702 // indicate the path to war file combined with the path to jar file. 3703 FilePath string `json:"filePath,omitempty"` 3704 // ForceSendFields is a list of field names (e.g. "FilePath") to 3705 // unconditionally include in API requests. By default, fields with empty or 3706 // default values are omitted from API requests. See 3707 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3708 // details. 3709 ForceSendFields []string `json:"-"` 3710 // NullFields is a list of field names (e.g. "FilePath") to include in API 3711 // requests with the JSON null value. By default, fields with empty values are 3712 // omitted from API requests. See 3713 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3714 NullFields []string `json:"-"` 3715 } 3716 3717 func (s *GrafeasV1FileLocation) MarshalJSON() ([]byte, error) { 3718 type NoMethod GrafeasV1FileLocation 3719 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3720 } 3721 3722 // GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder: Identifies the entity that 3723 // executed the recipe, which is trusted to have correctly performed the 3724 // operation and populated this provenance. 3725 type GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder struct { 3726 Id string `json:"id,omitempty"` 3727 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 3728 // include in API requests. By default, fields with empty or default values are 3729 // omitted from API requests. See 3730 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3731 // details. 3732 ForceSendFields []string `json:"-"` 3733 // NullFields is a list of field names (e.g. "Id") to include in API requests 3734 // with the JSON null value. By default, fields with empty values are omitted 3735 // from API requests. See 3736 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3737 NullFields []string `json:"-"` 3738 } 3739 3740 func (s *GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder) MarshalJSON() ([]byte, error) { 3741 type NoMethod GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder 3742 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3743 } 3744 3745 // GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness: Indicates that the builder 3746 // claims certain fields in this message to be complete. 3747 type GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness struct { 3748 Environment bool `json:"environment,omitempty"` 3749 Materials bool `json:"materials,omitempty"` 3750 Parameters bool `json:"parameters,omitempty"` 3751 // ForceSendFields is a list of field names (e.g. "Environment") to 3752 // unconditionally include in API requests. By default, fields with empty or 3753 // default values are omitted from API requests. See 3754 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3755 // details. 3756 ForceSendFields []string `json:"-"` 3757 // NullFields is a list of field names (e.g. "Environment") to include in API 3758 // requests with the JSON null value. By default, fields with empty values are 3759 // omitted from API requests. See 3760 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3761 NullFields []string `json:"-"` 3762 } 3763 3764 func (s *GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness) MarshalJSON() ([]byte, error) { 3765 type NoMethod GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness 3766 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3767 } 3768 3769 // GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource: Describes where the config 3770 // file that kicked off the build came from. This is effectively a pointer to 3771 // the source where buildConfig came from. 3772 type GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource struct { 3773 Digest map[string]string `json:"digest,omitempty"` 3774 EntryPoint string `json:"entryPoint,omitempty"` 3775 Uri string `json:"uri,omitempty"` 3776 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally 3777 // include in API requests. By default, fields with empty or default values are 3778 // omitted from API requests. See 3779 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3780 // details. 3781 ForceSendFields []string `json:"-"` 3782 // NullFields is a list of field names (e.g. "Digest") to include in API 3783 // requests with the JSON null value. By default, fields with empty values are 3784 // omitted from API requests. See 3785 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3786 NullFields []string `json:"-"` 3787 } 3788 3789 func (s *GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource) MarshalJSON() ([]byte, error) { 3790 type NoMethod GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource 3791 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3792 } 3793 3794 // GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation: Identifies the event that 3795 // kicked off the build. 3796 type GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation struct { 3797 ConfigSource *GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource `json:"configSource,omitempty"` 3798 Environment googleapi.RawMessage `json:"environment,omitempty"` 3799 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 3800 // ForceSendFields is a list of field names (e.g. "ConfigSource") to 3801 // unconditionally include in API requests. By default, fields with empty or 3802 // default values are omitted from API requests. See 3803 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3804 // details. 3805 ForceSendFields []string `json:"-"` 3806 // NullFields is a list of field names (e.g. "ConfigSource") to include in API 3807 // requests with the JSON null value. By default, fields with empty values are 3808 // omitted from API requests. See 3809 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3810 NullFields []string `json:"-"` 3811 } 3812 3813 func (s *GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation) MarshalJSON() ([]byte, error) { 3814 type NoMethod GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation 3815 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3816 } 3817 3818 // GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial: The collection of artifacts that 3819 // influenced the build including sources, dependencies, build tools, base 3820 // images, and so on. 3821 type GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial struct { 3822 Digest map[string]string `json:"digest,omitempty"` 3823 Uri string `json:"uri,omitempty"` 3824 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally 3825 // include in API requests. By default, fields with empty or default values are 3826 // omitted from API requests. See 3827 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3828 // details. 3829 ForceSendFields []string `json:"-"` 3830 // NullFields is a list of field names (e.g. "Digest") to include in API 3831 // requests with the JSON null value. By default, fields with empty values are 3832 // omitted from API requests. See 3833 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3834 NullFields []string `json:"-"` 3835 } 3836 3837 func (s *GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial) MarshalJSON() ([]byte, error) { 3838 type NoMethod GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial 3839 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3840 } 3841 3842 // GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata: Other properties of the build. 3843 type GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata struct { 3844 BuildFinishedOn string `json:"buildFinishedOn,omitempty"` 3845 BuildInvocationId string `json:"buildInvocationId,omitempty"` 3846 BuildStartedOn string `json:"buildStartedOn,omitempty"` 3847 Completeness *GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness `json:"completeness,omitempty"` 3848 Reproducible bool `json:"reproducible,omitempty"` 3849 // ForceSendFields is a list of field names (e.g. "BuildFinishedOn") to 3850 // unconditionally include in API requests. By default, fields with empty or 3851 // default values are omitted from API requests. See 3852 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3853 // details. 3854 ForceSendFields []string `json:"-"` 3855 // NullFields is a list of field names (e.g. "BuildFinishedOn") to include in 3856 // API requests with the JSON null value. By default, fields with empty values 3857 // are omitted from API requests. See 3858 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3859 NullFields []string `json:"-"` 3860 } 3861 3862 func (s *GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata) MarshalJSON() ([]byte, error) { 3863 type NoMethod GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata 3864 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3865 } 3866 3867 // Hash: Container message for hash values. 3868 type Hash struct { 3869 // Type: Required. The type of hash that was performed, e.g. "SHA-256". 3870 Type string `json:"type,omitempty"` 3871 // Value: Required. The hash value. 3872 Value string `json:"value,omitempty"` 3873 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 3874 // include in API requests. By default, fields with empty or default values are 3875 // omitted from API requests. See 3876 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3877 // details. 3878 ForceSendFields []string `json:"-"` 3879 // NullFields is a list of field names (e.g. "Type") to include in API requests 3880 // with the JSON null value. By default, fields with empty values are omitted 3881 // from API requests. See 3882 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3883 NullFields []string `json:"-"` 3884 } 3885 3886 func (s *Hash) MarshalJSON() ([]byte, error) { 3887 type NoMethod Hash 3888 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3889 } 3890 3891 // Hint: This submessage provides human-readable hints about the purpose of the 3892 // authority. Because the name of a note acts as its resource reference, it is 3893 // important to disambiguate the canonical name of the Note (which might be a 3894 // UUID for security purposes) from "readable" names more suitable for debug 3895 // output. Note that these hints should not be used to look up authorities in 3896 // security sensitive contexts, such as when looking up attestations to verify. 3897 type Hint struct { 3898 // HumanReadableName: Required. The human readable name of this attestation 3899 // authority, for example "qa". 3900 HumanReadableName string `json:"humanReadableName,omitempty"` 3901 // ForceSendFields is a list of field names (e.g. "HumanReadableName") to 3902 // unconditionally include in API requests. By default, fields with empty or 3903 // default values are omitted from API requests. See 3904 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3905 // details. 3906 ForceSendFields []string `json:"-"` 3907 // NullFields is a list of field names (e.g. "HumanReadableName") to include in 3908 // API requests with the JSON null value. By default, fields with empty values 3909 // are omitted from API requests. See 3910 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3911 NullFields []string `json:"-"` 3912 } 3913 3914 func (s *Hint) MarshalJSON() ([]byte, error) { 3915 type NoMethod Hint 3916 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3917 } 3918 3919 // Identity: The unique identifier of the update. 3920 type Identity struct { 3921 // Revision: The revision number of the update. 3922 Revision int64 `json:"revision,omitempty"` 3923 // UpdateId: The revision independent identifier of the update. 3924 UpdateId string `json:"updateId,omitempty"` 3925 // ForceSendFields is a list of field names (e.g. "Revision") to 3926 // unconditionally include in API requests. By default, fields with empty or 3927 // default values are omitted from API requests. See 3928 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3929 // details. 3930 ForceSendFields []string `json:"-"` 3931 // NullFields is a list of field names (e.g. "Revision") to include in API 3932 // requests with the JSON null value. By default, fields with empty values are 3933 // omitted from API requests. See 3934 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3935 NullFields []string `json:"-"` 3936 } 3937 3938 func (s *Identity) MarshalJSON() ([]byte, error) { 3939 type NoMethod Identity 3940 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3941 } 3942 3943 // ImageNote: Basis describes the base image portion (Note) of the DockerImage 3944 // relationship. Linked occurrences are derived from this or an equivalent 3945 // image via: FROM Or an equivalent reference, e.g., a tag of the resource_url. 3946 type ImageNote struct { 3947 // Fingerprint: Required. Immutable. The fingerprint of the base image. 3948 Fingerprint *Fingerprint `json:"fingerprint,omitempty"` 3949 // ResourceUrl: Required. Immutable. The resource_url for the resource 3950 // representing the basis of associated occurrence images. 3951 ResourceUrl string `json:"resourceUrl,omitempty"` 3952 // ForceSendFields is a list of field names (e.g. "Fingerprint") to 3953 // unconditionally include in API requests. By default, fields with empty or 3954 // default values are omitted from API requests. See 3955 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3956 // details. 3957 ForceSendFields []string `json:"-"` 3958 // NullFields is a list of field names (e.g. "Fingerprint") to include in API 3959 // requests with the JSON null value. By default, fields with empty values are 3960 // omitted from API requests. See 3961 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3962 NullFields []string `json:"-"` 3963 } 3964 3965 func (s *ImageNote) MarshalJSON() ([]byte, error) { 3966 type NoMethod ImageNote 3967 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3968 } 3969 3970 // ImageOccurrence: Details of the derived image portion of the DockerImage 3971 // relationship. This image would be produced from a Dockerfile with FROM . 3972 type ImageOccurrence struct { 3973 // BaseResourceUrl: Output only. This contains the base image URL for the 3974 // derived image occurrence. 3975 BaseResourceUrl string `json:"baseResourceUrl,omitempty"` 3976 // Distance: Output only. The number of layers by which this image differs from 3977 // the associated image basis. 3978 Distance int64 `json:"distance,omitempty"` 3979 // Fingerprint: Required. The fingerprint of the derived image. 3980 Fingerprint *Fingerprint `json:"fingerprint,omitempty"` 3981 // LayerInfo: This contains layer-specific metadata, if populated it has length 3982 // "distance" and is ordered with [distance] being the layer immediately 3983 // following the base image and [1] being the final layer. 3984 LayerInfo []*Layer `json:"layerInfo,omitempty"` 3985 // ForceSendFields is a list of field names (e.g. "BaseResourceUrl") to 3986 // unconditionally include in API requests. By default, fields with empty or 3987 // default values are omitted from API requests. See 3988 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3989 // details. 3990 ForceSendFields []string `json:"-"` 3991 // NullFields is a list of field names (e.g. "BaseResourceUrl") to include in 3992 // API requests with the JSON null value. By default, fields with empty values 3993 // are omitted from API requests. See 3994 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3995 NullFields []string `json:"-"` 3996 } 3997 3998 func (s *ImageOccurrence) MarshalJSON() ([]byte, error) { 3999 type NoMethod ImageOccurrence 4000 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4001 } 4002 4003 type InTotoProvenance struct { 4004 // BuilderConfig: required 4005 BuilderConfig *BuilderConfig `json:"builderConfig,omitempty"` 4006 // Materials: The collection of artifacts that influenced the build including 4007 // sources, dependencies, build tools, base images, and so on. This is 4008 // considered to be incomplete unless metadata.completeness.materials is true. 4009 // Unset or null is equivalent to empty. 4010 Materials []string `json:"materials,omitempty"` 4011 Metadata *Metadata `json:"metadata,omitempty"` 4012 // Recipe: Identifies the configuration used for the build. When combined with 4013 // materials, this SHOULD fully describe the build, such that re-running this 4014 // recipe results in bit-for-bit identical output (if the build is 4015 // reproducible). required 4016 Recipe *Recipe `json:"recipe,omitempty"` 4017 // ForceSendFields is a list of field names (e.g. "BuilderConfig") to 4018 // unconditionally include in API requests. By default, fields with empty or 4019 // default values are omitted from API requests. See 4020 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4021 // details. 4022 ForceSendFields []string `json:"-"` 4023 // NullFields is a list of field names (e.g. "BuilderConfig") to include in API 4024 // requests with the JSON null value. By default, fields with empty values are 4025 // omitted from API requests. See 4026 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4027 NullFields []string `json:"-"` 4028 } 4029 4030 func (s *InTotoProvenance) MarshalJSON() ([]byte, error) { 4031 type NoMethod InTotoProvenance 4032 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4033 } 4034 4035 type InTotoSlsaProvenanceV1 struct { 4036 // Type: InToto spec defined at 4037 // https://github.com/in-toto/attestation/tree/main/spec#statement 4038 Type string `json:"_type,omitempty"` 4039 Predicate *SlsaProvenanceV1 `json:"predicate,omitempty"` 4040 PredicateType string `json:"predicateType,omitempty"` 4041 Subject []*Subject `json:"subject,omitempty"` 4042 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 4043 // include in API requests. By default, fields with empty or default values are 4044 // omitted from API requests. See 4045 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4046 // details. 4047 ForceSendFields []string `json:"-"` 4048 // NullFields is a list of field names (e.g. "Type") to include in API requests 4049 // with the JSON null value. By default, fields with empty values are omitted 4050 // from API requests. See 4051 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4052 NullFields []string `json:"-"` 4053 } 4054 4055 func (s *InTotoSlsaProvenanceV1) MarshalJSON() ([]byte, error) { 4056 type NoMethod InTotoSlsaProvenanceV1 4057 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4058 } 4059 4060 // InTotoStatement: Spec defined at 4061 // https://github.com/in-toto/attestation/tree/main/spec#statement The 4062 // serialized InTotoStatement will be stored as Envelope.payload. 4063 // Envelope.payloadType is always "application/vnd.in-toto+json". 4064 type InTotoStatement struct { 4065 // Type: Always `https://in-toto.io/Statement/v0.1`. 4066 Type string `json:"_type,omitempty"` 4067 // PredicateType: `https://slsa.dev/provenance/v0.1` for SlsaProvenance. 4068 PredicateType string `json:"predicateType,omitempty"` 4069 Provenance *InTotoProvenance `json:"provenance,omitempty"` 4070 SlsaProvenance *SlsaProvenance `json:"slsaProvenance,omitempty"` 4071 SlsaProvenanceZeroTwo *SlsaProvenanceZeroTwo `json:"slsaProvenanceZeroTwo,omitempty"` 4072 Subject []*Subject `json:"subject,omitempty"` 4073 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 4074 // include in API requests. By default, fields with empty or default values are 4075 // omitted from API requests. See 4076 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4077 // details. 4078 ForceSendFields []string `json:"-"` 4079 // NullFields is a list of field names (e.g. "Type") to include in API requests 4080 // with the JSON null value. By default, fields with empty values are omitted 4081 // from API requests. See 4082 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4083 NullFields []string `json:"-"` 4084 } 4085 4086 func (s *InTotoStatement) MarshalJSON() ([]byte, error) { 4087 type NoMethod InTotoStatement 4088 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4089 } 4090 4091 // Justification: Justification provides the justification when the state of 4092 // the assessment if NOT_AFFECTED. 4093 type Justification struct { 4094 // Details: Additional details on why this justification was chosen. 4095 Details string `json:"details,omitempty"` 4096 // JustificationType: The justification type for this vulnerability. 4097 // 4098 // Possible values: 4099 // "JUSTIFICATION_TYPE_UNSPECIFIED" - JUSTIFICATION_TYPE_UNSPECIFIED. 4100 // "COMPONENT_NOT_PRESENT" - The vulnerable component is not present in the 4101 // product. 4102 // "VULNERABLE_CODE_NOT_PRESENT" - The vulnerable code is not present. 4103 // Typically this case occurs when source code is configured or built in a way 4104 // that excludes the vulnerable code. 4105 // "VULNERABLE_CODE_NOT_IN_EXECUTE_PATH" - The vulnerable code can not be 4106 // executed. Typically this case occurs when the product includes the 4107 // vulnerable code but does not call or use the vulnerable code. 4108 // "VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY" - The vulnerable code 4109 // cannot be controlled by an attacker to exploit the vulnerability. 4110 // "INLINE_MITIGATIONS_ALREADY_EXIST" - The product includes built-in 4111 // protections or features that prevent exploitation of the vulnerability. 4112 // These built-in protections cannot be subverted by the attacker and cannot be 4113 // configured or disabled by the user. These mitigations completely prevent 4114 // exploitation based on known attack vectors. 4115 JustificationType string `json:"justificationType,omitempty"` 4116 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally 4117 // include in API requests. By default, fields with empty or default values are 4118 // omitted from API requests. See 4119 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4120 // details. 4121 ForceSendFields []string `json:"-"` 4122 // NullFields is a list of field names (e.g. "Details") to include in API 4123 // requests with the JSON null value. By default, fields with empty values are 4124 // omitted from API requests. See 4125 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4126 NullFields []string `json:"-"` 4127 } 4128 4129 func (s *Justification) MarshalJSON() ([]byte, error) { 4130 type NoMethod Justification 4131 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4132 } 4133 4134 type Jwt struct { 4135 // CompactJwt: The compact encoding of a JWS, which is always three base64 4136 // encoded strings joined by periods. For details, see: 4137 // https://tools.ietf.org/html/rfc7515.html#section-3.1 4138 CompactJwt string `json:"compactJwt,omitempty"` 4139 // ForceSendFields is a list of field names (e.g. "CompactJwt") to 4140 // unconditionally include in API requests. By default, fields with empty or 4141 // default values are omitted from API requests. See 4142 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4143 // details. 4144 ForceSendFields []string `json:"-"` 4145 // NullFields is a list of field names (e.g. "CompactJwt") to include in API 4146 // requests with the JSON null value. By default, fields with empty values are 4147 // omitted from API requests. See 4148 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4149 NullFields []string `json:"-"` 4150 } 4151 4152 func (s *Jwt) MarshalJSON() ([]byte, error) { 4153 type NoMethod Jwt 4154 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4155 } 4156 4157 type KnowledgeBase struct { 4158 // Name: The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). 4159 Name string `json:"name,omitempty"` 4160 // Url: A link to the KB in the [Windows update catalog] 4161 // (https://www.catalog.update.microsoft.com/). 4162 Url string `json:"url,omitempty"` 4163 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 4164 // include in API requests. By default, fields with empty or default values are 4165 // omitted from API requests. See 4166 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4167 // details. 4168 ForceSendFields []string `json:"-"` 4169 // NullFields is a list of field names (e.g. "Name") to include in API requests 4170 // with the JSON null value. By default, fields with empty values are omitted 4171 // from API requests. See 4172 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4173 NullFields []string `json:"-"` 4174 } 4175 4176 func (s *KnowledgeBase) MarshalJSON() ([]byte, error) { 4177 type NoMethod KnowledgeBase 4178 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4179 } 4180 4181 // Layer: Layer holds metadata specific to a layer of a Docker image. 4182 type Layer struct { 4183 // Arguments: The recovered arguments to the Dockerfile directive. 4184 Arguments string `json:"arguments,omitempty"` 4185 // Directive: Required. The recovered Dockerfile directive used to construct 4186 // this layer. See https://docs.docker.com/engine/reference/builder/ for more 4187 // information. 4188 Directive string `json:"directive,omitempty"` 4189 // ForceSendFields is a list of field names (e.g. "Arguments") to 4190 // unconditionally include in API requests. By default, fields with empty or 4191 // default values are omitted from API requests. See 4192 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4193 // details. 4194 ForceSendFields []string `json:"-"` 4195 // NullFields is a list of field names (e.g. "Arguments") to include in API 4196 // requests with the JSON null value. By default, fields with empty values are 4197 // omitted from API requests. See 4198 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4199 NullFields []string `json:"-"` 4200 } 4201 4202 func (s *Layer) MarshalJSON() ([]byte, error) { 4203 type NoMethod Layer 4204 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4205 } 4206 4207 // License: License information. 4208 type License struct { 4209 // Comments: Comments 4210 Comments string `json:"comments,omitempty"` 4211 // Expression: Often a single license can be used to represent the licensing 4212 // terms. Sometimes it is necessary to include a choice of one or more licenses 4213 // or some combination of license identifiers. Examples: "LGPL-2.1-only OR 4214 // MIT", "LGPL-2.1-only AND MIT", "GPL-2.0-or-later WITH Bison-exception-2.2". 4215 Expression string `json:"expression,omitempty"` 4216 // ForceSendFields is a list of field names (e.g. "Comments") to 4217 // unconditionally include in API requests. By default, fields with empty or 4218 // default values are omitted from API requests. See 4219 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4220 // details. 4221 ForceSendFields []string `json:"-"` 4222 // NullFields is a list of field names (e.g. "Comments") to include in API 4223 // requests with the JSON null value. By default, fields with empty values are 4224 // omitted from API requests. See 4225 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4226 NullFields []string `json:"-"` 4227 } 4228 4229 func (s *License) MarshalJSON() ([]byte, error) { 4230 type NoMethod License 4231 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4232 } 4233 4234 // ListNoteOccurrencesResponse: Response for listing occurrences for a note. 4235 type ListNoteOccurrencesResponse struct { 4236 // NextPageToken: Token to provide to skip to a particular spot in the list. 4237 NextPageToken string `json:"nextPageToken,omitempty"` 4238 // Occurrences: The occurrences attached to the specified note. 4239 Occurrences []*Occurrence `json:"occurrences,omitempty"` 4240 4241 // ServerResponse contains the HTTP response code and headers from the server. 4242 googleapi.ServerResponse `json:"-"` 4243 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 4244 // unconditionally include in API requests. By default, fields with empty or 4245 // default values are omitted from API requests. See 4246 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4247 // details. 4248 ForceSendFields []string `json:"-"` 4249 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 4250 // requests with the JSON null value. By default, fields with empty values are 4251 // omitted from API requests. See 4252 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4253 NullFields []string `json:"-"` 4254 } 4255 4256 func (s *ListNoteOccurrencesResponse) MarshalJSON() ([]byte, error) { 4257 type NoMethod ListNoteOccurrencesResponse 4258 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4259 } 4260 4261 // ListNotesResponse: Response for listing notes. 4262 type ListNotesResponse struct { 4263 // NextPageToken: The next pagination token in the list response. It should be 4264 // used as `page_token` for the following request. An empty value means no more 4265 // results. 4266 NextPageToken string `json:"nextPageToken,omitempty"` 4267 // Notes: The notes requested. 4268 Notes []*Note `json:"notes,omitempty"` 4269 4270 // ServerResponse contains the HTTP response code and headers from the server. 4271 googleapi.ServerResponse `json:"-"` 4272 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 4273 // unconditionally include in API requests. By default, fields with empty or 4274 // default values are omitted from API requests. See 4275 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4276 // details. 4277 ForceSendFields []string `json:"-"` 4278 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 4279 // requests with the JSON null value. By default, fields with empty values are 4280 // omitted from API requests. See 4281 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4282 NullFields []string `json:"-"` 4283 } 4284 4285 func (s *ListNotesResponse) MarshalJSON() ([]byte, error) { 4286 type NoMethod ListNotesResponse 4287 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4288 } 4289 4290 // ListOccurrencesResponse: Response for listing occurrences. 4291 type ListOccurrencesResponse struct { 4292 // NextPageToken: The next pagination token in the list response. It should be 4293 // used as `page_token` for the following request. An empty value means no more 4294 // results. 4295 NextPageToken string `json:"nextPageToken,omitempty"` 4296 // Occurrences: The occurrences requested. 4297 Occurrences []*Occurrence `json:"occurrences,omitempty"` 4298 4299 // ServerResponse contains the HTTP response code and headers from the server. 4300 googleapi.ServerResponse `json:"-"` 4301 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 4302 // unconditionally include in API requests. By default, fields with empty or 4303 // default values are omitted from API requests. See 4304 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4305 // details. 4306 ForceSendFields []string `json:"-"` 4307 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 4308 // requests with the JSON null value. By default, fields with empty values are 4309 // omitted from API requests. See 4310 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4311 NullFields []string `json:"-"` 4312 } 4313 4314 func (s *ListOccurrencesResponse) MarshalJSON() ([]byte, error) { 4315 type NoMethod ListOccurrencesResponse 4316 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4317 } 4318 4319 // Location: An occurrence of a particular package installation found within a 4320 // system's filesystem. E.g., glibc was found in `/var/lib/dpkg/status`. 4321 type Location struct { 4322 // CpeUri: Deprecated. The CPE URI in CPE format 4323 // (https://cpe.mitre.org/specification/) 4324 CpeUri string `json:"cpeUri,omitempty"` 4325 // Path: The path from which we gathered that this package/version is 4326 // installed. 4327 Path string `json:"path,omitempty"` 4328 // Version: Deprecated. The version installed at this location. 4329 Version *Version `json:"version,omitempty"` 4330 // ForceSendFields is a list of field names (e.g. "CpeUri") to unconditionally 4331 // include in API requests. By default, fields with empty or default values are 4332 // omitted from API requests. See 4333 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4334 // details. 4335 ForceSendFields []string `json:"-"` 4336 // NullFields is a list of field names (e.g. "CpeUri") to include in API 4337 // requests with the JSON null value. By default, fields with empty values are 4338 // omitted from API requests. See 4339 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4340 NullFields []string `json:"-"` 4341 } 4342 4343 func (s *Location) MarshalJSON() ([]byte, error) { 4344 type NoMethod Location 4345 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4346 } 4347 4348 type Material struct { 4349 Digest map[string]string `json:"digest,omitempty"` 4350 Uri string `json:"uri,omitempty"` 4351 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally 4352 // include in API requests. By default, fields with empty or default values are 4353 // omitted from API requests. See 4354 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4355 // details. 4356 ForceSendFields []string `json:"-"` 4357 // NullFields is a list of field names (e.g. "Digest") to include in API 4358 // requests with the JSON null value. By default, fields with empty values are 4359 // omitted from API requests. See 4360 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4361 NullFields []string `json:"-"` 4362 } 4363 4364 func (s *Material) MarshalJSON() ([]byte, error) { 4365 type NoMethod Material 4366 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4367 } 4368 4369 // Metadata: Other properties of the build. 4370 type Metadata struct { 4371 // BuildFinishedOn: The timestamp of when the build completed. 4372 BuildFinishedOn string `json:"buildFinishedOn,omitempty"` 4373 // BuildInvocationId: Identifies the particular build invocation, which can be 4374 // useful for finding associated logs or other ad-hoc analysis. The value 4375 // SHOULD be globally unique, per in-toto Provenance spec. 4376 BuildInvocationId string `json:"buildInvocationId,omitempty"` 4377 // BuildStartedOn: The timestamp of when the build started. 4378 BuildStartedOn string `json:"buildStartedOn,omitempty"` 4379 // Completeness: Indicates that the builder claims certain fields in this 4380 // message to be complete. 4381 Completeness *Completeness `json:"completeness,omitempty"` 4382 // Reproducible: If true, the builder claims that running the recipe on 4383 // materials will produce bit-for-bit identical output. 4384 Reproducible bool `json:"reproducible,omitempty"` 4385 // ForceSendFields is a list of field names (e.g. "BuildFinishedOn") to 4386 // unconditionally include in API requests. By default, fields with empty or 4387 // default values are omitted from API requests. See 4388 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4389 // details. 4390 ForceSendFields []string `json:"-"` 4391 // NullFields is a list of field names (e.g. "BuildFinishedOn") to include in 4392 // API requests with the JSON null value. By default, fields with empty values 4393 // are omitted from API requests. See 4394 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4395 NullFields []string `json:"-"` 4396 } 4397 4398 func (s *Metadata) MarshalJSON() ([]byte, error) { 4399 type NoMethod Metadata 4400 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4401 } 4402 4403 // NonCompliantFile: Details about files that caused a compliance check to 4404 // fail. display_command is a single command that can be used to display a list 4405 // of non compliant files. When there is no such command, we can also iterate a 4406 // list of non compliant file using 'path'. 4407 type NonCompliantFile struct { 4408 // DisplayCommand: Command to display the non-compliant files. 4409 DisplayCommand string `json:"displayCommand,omitempty"` 4410 // Path: Empty if `display_command` is set. 4411 Path string `json:"path,omitempty"` 4412 // Reason: Explains why a file is non compliant for a CIS check. 4413 Reason string `json:"reason,omitempty"` 4414 // ForceSendFields is a list of field names (e.g. "DisplayCommand") to 4415 // unconditionally include in API requests. By default, fields with empty or 4416 // default values are omitted from API requests. See 4417 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4418 // details. 4419 ForceSendFields []string `json:"-"` 4420 // NullFields is a list of field names (e.g. "DisplayCommand") to include in 4421 // API requests with the JSON null value. By default, fields with empty values 4422 // are omitted from API requests. See 4423 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4424 NullFields []string `json:"-"` 4425 } 4426 4427 func (s *NonCompliantFile) MarshalJSON() ([]byte, error) { 4428 type NoMethod NonCompliantFile 4429 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4430 } 4431 4432 // Note: A type of analysis that can be done for a resource. 4433 type Note struct { 4434 // Attestation: A note describing an attestation role. 4435 Attestation *AttestationNote `json:"attestation,omitempty"` 4436 // Build: A note describing build provenance for a verifiable build. 4437 Build *BuildNote `json:"build,omitempty"` 4438 // Compliance: A note describing a compliance check. 4439 Compliance *ComplianceNote `json:"compliance,omitempty"` 4440 // CreateTime: Output only. The time this note was created. This field can be 4441 // used as a filter in list requests. 4442 CreateTime string `json:"createTime,omitempty"` 4443 // Deployment: A note describing something that can be deployed. 4444 Deployment *DeploymentNote `json:"deployment,omitempty"` 4445 // Discovery: A note describing the initial analysis of a resource. 4446 Discovery *DiscoveryNote `json:"discovery,omitempty"` 4447 // DsseAttestation: A note describing a dsse attestation note. 4448 DsseAttestation *DSSEAttestationNote `json:"dsseAttestation,omitempty"` 4449 // ExpirationTime: Time of expiration for this note. Empty if note does not 4450 // expire. 4451 ExpirationTime string `json:"expirationTime,omitempty"` 4452 // Image: A note describing a base image. 4453 Image *ImageNote `json:"image,omitempty"` 4454 // Kind: Output only. The type of analysis. This field can be used as a filter 4455 // in list requests. 4456 // 4457 // Possible values: 4458 // "NOTE_KIND_UNSPECIFIED" - Default value. This value is unused. 4459 // "VULNERABILITY" - The note and occurrence represent a package 4460 // vulnerability. 4461 // "BUILD" - The note and occurrence assert build provenance. 4462 // "IMAGE" - This represents an image basis relationship. 4463 // "PACKAGE" - This represents a package installed via a package manager. 4464 // "DEPLOYMENT" - The note and occurrence track deployment events. 4465 // "DISCOVERY" - The note and occurrence track the initial discovery status 4466 // of a resource. 4467 // "ATTESTATION" - This represents a logical "role" that can attest to 4468 // artifacts. 4469 // "UPGRADE" - This represents an available package upgrade. 4470 // "COMPLIANCE" - This represents a Compliance Note 4471 // "DSSE_ATTESTATION" - This represents a DSSE attestation Note 4472 // "VULNERABILITY_ASSESSMENT" - This represents a Vulnerability Assessment. 4473 // "SBOM_REFERENCE" - This represents an SBOM Reference. 4474 Kind string `json:"kind,omitempty"` 4475 // LongDescription: A detailed description of this note. 4476 LongDescription string `json:"longDescription,omitempty"` 4477 // Name: Output only. The name of the note in the form of 4478 // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. 4479 Name string `json:"name,omitempty"` 4480 // Package: A note describing a package hosted by various package managers. 4481 Package *PackageNote `json:"package,omitempty"` 4482 // RelatedNoteNames: Other notes related to this note. 4483 RelatedNoteNames []string `json:"relatedNoteNames,omitempty"` 4484 // RelatedUrl: URLs associated with this note. 4485 RelatedUrl []*RelatedUrl `json:"relatedUrl,omitempty"` 4486 // SbomReference: A note describing an SBOM reference. 4487 SbomReference *SBOMReferenceNote `json:"sbomReference,omitempty"` 4488 // ShortDescription: A one sentence description of this note. 4489 ShortDescription string `json:"shortDescription,omitempty"` 4490 // UpdateTime: Output only. The time this note was last updated. This field can 4491 // be used as a filter in list requests. 4492 UpdateTime string `json:"updateTime,omitempty"` 4493 // Upgrade: A note describing available package upgrades. 4494 Upgrade *UpgradeNote `json:"upgrade,omitempty"` 4495 // Vulnerability: A note describing a package vulnerability. 4496 Vulnerability *VulnerabilityNote `json:"vulnerability,omitempty"` 4497 // VulnerabilityAssessment: A note describing a vulnerability assessment. 4498 VulnerabilityAssessment *VulnerabilityAssessmentNote `json:"vulnerabilityAssessment,omitempty"` 4499 4500 // ServerResponse contains the HTTP response code and headers from the server. 4501 googleapi.ServerResponse `json:"-"` 4502 // ForceSendFields is a list of field names (e.g. "Attestation") to 4503 // unconditionally include in API requests. By default, fields with empty or 4504 // default values are omitted from API requests. See 4505 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4506 // details. 4507 ForceSendFields []string `json:"-"` 4508 // NullFields is a list of field names (e.g. "Attestation") to include in API 4509 // requests with the JSON null value. By default, fields with empty values are 4510 // omitted from API requests. See 4511 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4512 NullFields []string `json:"-"` 4513 } 4514 4515 func (s *Note) MarshalJSON() ([]byte, error) { 4516 type NoMethod Note 4517 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4518 } 4519 4520 // Occurrence: An instance of an analysis type that has been found on a 4521 // resource. 4522 type Occurrence struct { 4523 // Attestation: Describes an attestation of an artifact. 4524 Attestation *AttestationOccurrence `json:"attestation,omitempty"` 4525 // Build: Describes a verifiable build. 4526 Build *BuildOccurrence `json:"build,omitempty"` 4527 // Compliance: Describes a compliance violation on a linked resource. 4528 Compliance *ComplianceOccurrence `json:"compliance,omitempty"` 4529 // CreateTime: Output only. The time this occurrence was created. 4530 CreateTime string `json:"createTime,omitempty"` 4531 // Deployment: Describes the deployment of an artifact on a runtime. 4532 Deployment *DeploymentOccurrence `json:"deployment,omitempty"` 4533 // Discovery: Describes when a resource was discovered. 4534 Discovery *DiscoveryOccurrence `json:"discovery,omitempty"` 4535 // DsseAttestation: Describes an attestation of an artifact using dsse. 4536 DsseAttestation *DSSEAttestationOccurrence `json:"dsseAttestation,omitempty"` 4537 // Envelope: https://github.com/secure-systems-lab/dsse 4538 Envelope *Envelope `json:"envelope,omitempty"` 4539 // Image: Describes how this resource derives from the basis in the associated 4540 // note. 4541 Image *ImageOccurrence `json:"image,omitempty"` 4542 // Kind: Output only. This explicitly denotes which of the occurrence details 4543 // are specified. This field can be used as a filter in list requests. 4544 // 4545 // Possible values: 4546 // "NOTE_KIND_UNSPECIFIED" - Default value. This value is unused. 4547 // "VULNERABILITY" - The note and occurrence represent a package 4548 // vulnerability. 4549 // "BUILD" - The note and occurrence assert build provenance. 4550 // "IMAGE" - This represents an image basis relationship. 4551 // "PACKAGE" - This represents a package installed via a package manager. 4552 // "DEPLOYMENT" - The note and occurrence track deployment events. 4553 // "DISCOVERY" - The note and occurrence track the initial discovery status 4554 // of a resource. 4555 // "ATTESTATION" - This represents a logical "role" that can attest to 4556 // artifacts. 4557 // "UPGRADE" - This represents an available package upgrade. 4558 // "COMPLIANCE" - This represents a Compliance Note 4559 // "DSSE_ATTESTATION" - This represents a DSSE attestation Note 4560 // "VULNERABILITY_ASSESSMENT" - This represents a Vulnerability Assessment. 4561 // "SBOM_REFERENCE" - This represents an SBOM Reference. 4562 Kind string `json:"kind,omitempty"` 4563 // Name: Output only. The name of the occurrence in the form of 4564 // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. 4565 Name string `json:"name,omitempty"` 4566 // NoteName: Required. Immutable. The analysis note associated with this 4567 // occurrence, in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This 4568 // field can be used as a filter in list requests. 4569 NoteName string `json:"noteName,omitempty"` 4570 // Package: Describes the installation of a package on the linked resource. 4571 Package *PackageOccurrence `json:"package,omitempty"` 4572 // Remediation: A description of actions that can be taken to remedy the note. 4573 Remediation string `json:"remediation,omitempty"` 4574 // ResourceUri: Required. Immutable. A URI that represents the resource for 4575 // which the occurrence applies. For example, 4576 // `https://gcr.io/project/image@sha256:123abc` for a Docker image. 4577 ResourceUri string `json:"resourceUri,omitempty"` 4578 // SbomReference: Describes a specific SBOM reference occurrences. 4579 SbomReference *SBOMReferenceOccurrence `json:"sbomReference,omitempty"` 4580 // UpdateTime: Output only. The time this occurrence was last updated. 4581 UpdateTime string `json:"updateTime,omitempty"` 4582 // Upgrade: Describes an available package upgrade on the linked resource. 4583 Upgrade *UpgradeOccurrence `json:"upgrade,omitempty"` 4584 // Vulnerability: Describes a security vulnerability. 4585 Vulnerability *VulnerabilityOccurrence `json:"vulnerability,omitempty"` 4586 4587 // ServerResponse contains the HTTP response code and headers from the server. 4588 googleapi.ServerResponse `json:"-"` 4589 // ForceSendFields is a list of field names (e.g. "Attestation") to 4590 // unconditionally include in API requests. By default, fields with empty or 4591 // default values are omitted from API requests. See 4592 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4593 // details. 4594 ForceSendFields []string `json:"-"` 4595 // NullFields is a list of field names (e.g. "Attestation") to include in API 4596 // requests with the JSON null value. By default, fields with empty values are 4597 // omitted from API requests. See 4598 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4599 NullFields []string `json:"-"` 4600 } 4601 4602 func (s *Occurrence) MarshalJSON() ([]byte, error) { 4603 type NoMethod Occurrence 4604 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4605 } 4606 4607 // PackageIssue: A detail for a distro and package this vulnerability 4608 // occurrence was found in and its associated fix (if one is available). 4609 type PackageIssue struct { 4610 // AffectedCpeUri: Required. The CPE URI (https://cpe.mitre.org/specification/) 4611 // this vulnerability was found in. 4612 AffectedCpeUri string `json:"affectedCpeUri,omitempty"` 4613 // AffectedPackage: Required. The package this vulnerability was found in. 4614 AffectedPackage string `json:"affectedPackage,omitempty"` 4615 // AffectedVersion: Required. The version of the package that is installed on 4616 // the resource affected by this vulnerability. 4617 AffectedVersion *Version `json:"affectedVersion,omitempty"` 4618 // EffectiveSeverity: Output only. The distro or language system assigned 4619 // severity for this vulnerability when that is available and note provider 4620 // assigned severity when it is not available. 4621 // 4622 // Possible values: 4623 // "SEVERITY_UNSPECIFIED" - Unknown. 4624 // "MINIMAL" - Minimal severity. 4625 // "LOW" - Low severity. 4626 // "MEDIUM" - Medium severity. 4627 // "HIGH" - High severity. 4628 // "CRITICAL" - Critical severity. 4629 EffectiveSeverity string `json:"effectiveSeverity,omitempty"` 4630 // FileLocation: The location at which this package was found. 4631 FileLocation []*GrafeasV1FileLocation `json:"fileLocation,omitempty"` 4632 // FixAvailable: Output only. Whether a fix is available for this package. 4633 FixAvailable bool `json:"fixAvailable,omitempty"` 4634 // FixedCpeUri: The CPE URI (https://cpe.mitre.org/specification/) this 4635 // vulnerability was fixed in. It is possible for this to be different from the 4636 // affected_cpe_uri. 4637 FixedCpeUri string `json:"fixedCpeUri,omitempty"` 4638 // FixedPackage: The package this vulnerability was fixed in. It is possible 4639 // for this to be different from the affected_package. 4640 FixedPackage string `json:"fixedPackage,omitempty"` 4641 // FixedVersion: Required. The version of the package this vulnerability was 4642 // fixed in. Setting this to VersionKind.MAXIMUM means no fix is yet available. 4643 FixedVersion *Version `json:"fixedVersion,omitempty"` 4644 // PackageType: The type of package (e.g. OS, MAVEN, GO). 4645 PackageType string `json:"packageType,omitempty"` 4646 // ForceSendFields is a list of field names (e.g. "AffectedCpeUri") to 4647 // unconditionally include in API requests. By default, fields with empty or 4648 // default values are omitted from API requests. See 4649 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4650 // details. 4651 ForceSendFields []string `json:"-"` 4652 // NullFields is a list of field names (e.g. "AffectedCpeUri") to include in 4653 // API requests with the JSON null value. By default, fields with empty values 4654 // are omitted from API requests. See 4655 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4656 NullFields []string `json:"-"` 4657 } 4658 4659 func (s *PackageIssue) MarshalJSON() ([]byte, error) { 4660 type NoMethod PackageIssue 4661 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4662 } 4663 4664 // PackageNote: PackageNote represents a particular package version. 4665 type PackageNote struct { 4666 // Architecture: The CPU architecture for which packages in this distribution 4667 // channel were built. Architecture will be blank for language packages. 4668 // 4669 // Possible values: 4670 // "ARCHITECTURE_UNSPECIFIED" - Unknown architecture. 4671 // "X86" - X86 architecture. 4672 // "X64" - X64 architecture. 4673 Architecture string `json:"architecture,omitempty"` 4674 // CpeUri: The cpe_uri in CPE format (https://cpe.mitre.org/specification/) 4675 // denoting the package manager version distributing a package. The cpe_uri 4676 // will be blank for language packages. 4677 CpeUri string `json:"cpeUri,omitempty"` 4678 // Description: The description of this package. 4679 Description string `json:"description,omitempty"` 4680 // Digest: Hash value, typically a file digest, that allows unique 4681 // identification a specific package. 4682 Digest []*Digest `json:"digest,omitempty"` 4683 // Distribution: Deprecated. The various channels by which a package is 4684 // distributed. 4685 Distribution []*Distribution `json:"distribution,omitempty"` 4686 // License: Licenses that have been declared by the authors of the package. 4687 License *License `json:"license,omitempty"` 4688 // Maintainer: A freeform text denoting the maintainer of this package. 4689 Maintainer string `json:"maintainer,omitempty"` 4690 // Name: Required. Immutable. The name of the package. 4691 Name string `json:"name,omitempty"` 4692 // PackageType: The type of package; whether native or non native (e.g., ruby 4693 // gems, node.js packages, etc.). 4694 PackageType string `json:"packageType,omitempty"` 4695 // Url: The homepage for this package. 4696 Url string `json:"url,omitempty"` 4697 // Version: The version of the package. 4698 Version *Version `json:"version,omitempty"` 4699 // ForceSendFields is a list of field names (e.g. "Architecture") to 4700 // unconditionally include in API requests. By default, fields with empty or 4701 // default values are omitted from API requests. See 4702 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4703 // details. 4704 ForceSendFields []string `json:"-"` 4705 // NullFields is a list of field names (e.g. "Architecture") to include in API 4706 // requests with the JSON null value. By default, fields with empty values are 4707 // omitted from API requests. See 4708 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4709 NullFields []string `json:"-"` 4710 } 4711 4712 func (s *PackageNote) MarshalJSON() ([]byte, error) { 4713 type NoMethod PackageNote 4714 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4715 } 4716 4717 // PackageOccurrence: Details on how a particular software package was 4718 // installed on a system. 4719 type PackageOccurrence struct { 4720 // Architecture: Output only. The CPU architecture for which packages in this 4721 // distribution channel were built. Architecture will be blank for language 4722 // packages. 4723 // 4724 // Possible values: 4725 // "ARCHITECTURE_UNSPECIFIED" - Unknown architecture. 4726 // "X86" - X86 architecture. 4727 // "X64" - X64 architecture. 4728 Architecture string `json:"architecture,omitempty"` 4729 // CpeUri: Output only. The cpe_uri in CPE format 4730 // (https://cpe.mitre.org/specification/) denoting the package manager version 4731 // distributing a package. The cpe_uri will be blank for language packages. 4732 CpeUri string `json:"cpeUri,omitempty"` 4733 // License: Licenses that have been declared by the authors of the package. 4734 License *License `json:"license,omitempty"` 4735 // Location: All of the places within the filesystem versions of this package 4736 // have been found. 4737 Location []*Location `json:"location,omitempty"` 4738 // Name: Required. Output only. The name of the installed package. 4739 Name string `json:"name,omitempty"` 4740 // PackageType: Output only. The type of package; whether native or non native 4741 // (e.g., ruby gems, node.js packages, etc.). 4742 PackageType string `json:"packageType,omitempty"` 4743 // Version: Output only. The version of the package. 4744 Version *Version `json:"version,omitempty"` 4745 // ForceSendFields is a list of field names (e.g. "Architecture") to 4746 // unconditionally include in API requests. By default, fields with empty or 4747 // default values are omitted from API requests. See 4748 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4749 // details. 4750 ForceSendFields []string `json:"-"` 4751 // NullFields is a list of field names (e.g. "Architecture") to include in API 4752 // requests with the JSON null value. By default, fields with empty values are 4753 // omitted from API requests. See 4754 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4755 NullFields []string `json:"-"` 4756 } 4757 4758 func (s *PackageOccurrence) MarshalJSON() ([]byte, error) { 4759 type NoMethod PackageOccurrence 4760 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4761 } 4762 4763 // Policy: An Identity and Access Management (IAM) policy, which specifies 4764 // access controls for Google Cloud resources. A `Policy` is a collection of 4765 // `bindings`. A `binding` binds one or more `members`, or principals, to a 4766 // single `role`. Principals can be user accounts, service accounts, Google 4767 // groups, and domains (such as G Suite). A `role` is a named list of 4768 // permissions; each `role` can be an IAM predefined role or a user-created 4769 // custom role. For some types of Google Cloud resources, a `binding` can also 4770 // specify a `condition`, which is a logical expression that allows access to a 4771 // resource only if the expression evaluates to `true`. A condition can add 4772 // constraints based on attributes of the request, the resource, or both. To 4773 // learn which resources support conditions in their IAM policies, see the IAM 4774 // documentation 4775 // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON 4776 // example:** ``` { "bindings": [ { "role": 4777 // "roles/resourcemanager.organizationAdmin", "members": [ 4778 // "user:mike@example.com", "group:admins@example.com", "domain:google.com", 4779 // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": 4780 // "roles/resourcemanager.organizationViewer", "members": [ 4781 // "user:eve@example.com" ], "condition": { "title": "expirable access", 4782 // "description": "Does not grant access after Sep 2020", "expression": 4783 // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": 4784 // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - 4785 // members: - user:mike@example.com - group:admins@example.com - 4786 // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com 4787 // role: roles/resourcemanager.organizationAdmin - members: - 4788 // user:eve@example.com role: roles/resourcemanager.organizationViewer 4789 // condition: title: expirable access description: Does not grant access after 4790 // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') 4791 // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, 4792 // see the IAM documentation (https://cloud.google.com/iam/docs/). 4793 type Policy struct { 4794 // Bindings: Associates a list of `members`, or principals, with a `role`. 4795 // Optionally, may specify a `condition` that determines how and when the 4796 // `bindings` are applied. Each of the `bindings` must contain at least one 4797 // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; 4798 // up to 250 of these principals can be Google groups. Each occurrence of a 4799 // principal counts towards these limits. For example, if the `bindings` grant 4800 // 50 different roles to `user:alice@example.com`, and not to any other 4801 // principal, then you can add another 1,450 principals to the `bindings` in 4802 // the `Policy`. 4803 Bindings []*Binding `json:"bindings,omitempty"` 4804 // Etag: `etag` is used for optimistic concurrency control as a way to help 4805 // prevent simultaneous updates of a policy from overwriting each other. It is 4806 // strongly suggested that systems make use of the `etag` in the 4807 // read-modify-write cycle to perform policy updates in order to avoid race 4808 // conditions: An `etag` is returned in the response to `getIamPolicy`, and 4809 // systems are expected to put that etag in the request to `setIamPolicy` to 4810 // ensure that their change will be applied to the same version of the policy. 4811 // **Important:** If you use IAM Conditions, you must include the `etag` field 4812 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows 4813 // you to overwrite a version `3` policy with a version `1` policy, and all of 4814 // the conditions in the version `3` policy are lost. 4815 Etag string `json:"etag,omitempty"` 4816 // Version: Specifies the format of the policy. Valid values are `0`, `1`, and 4817 // `3`. Requests that specify an invalid value are rejected. Any operation that 4818 // affects conditional role bindings must specify version `3`. This requirement 4819 // applies to the following operations: * Getting a policy that includes a 4820 // conditional role binding * Adding a conditional role binding to a policy * 4821 // Changing a conditional role binding in a policy * Removing any role binding, 4822 // with or without a condition, from a policy that includes conditions 4823 // **Important:** If you use IAM Conditions, you must include the `etag` field 4824 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows 4825 // you to overwrite a version `3` policy with a version `1` policy, and all of 4826 // the conditions in the version `3` policy are lost. If a policy does not 4827 // include any conditions, operations on that policy may specify any valid 4828 // version or leave the field unset. To learn which resources support 4829 // conditions in their IAM policies, see the IAM documentation 4830 // (https://cloud.google.com/iam/help/conditions/resource-policies). 4831 Version int64 `json:"version,omitempty"` 4832 4833 // ServerResponse contains the HTTP response code and headers from the server. 4834 googleapi.ServerResponse `json:"-"` 4835 // ForceSendFields is a list of field names (e.g. "Bindings") to 4836 // unconditionally include in API requests. By default, fields with empty or 4837 // default values are omitted from API requests. See 4838 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4839 // details. 4840 ForceSendFields []string `json:"-"` 4841 // NullFields is a list of field names (e.g. "Bindings") to include in API 4842 // requests with the JSON null value. By default, fields with empty values are 4843 // omitted from API requests. See 4844 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4845 NullFields []string `json:"-"` 4846 } 4847 4848 func (s *Policy) MarshalJSON() ([]byte, error) { 4849 type NoMethod Policy 4850 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4851 } 4852 4853 // Product: Product contains information about a product and how to uniquely 4854 // identify it. 4855 type Product struct { 4856 // GenericUri: Contains a URI which is vendor-specific. Example: The artifact 4857 // repository URL of an image. 4858 GenericUri string `json:"genericUri,omitempty"` 4859 // Id: Token that identifies a product so that it can be referred to from other 4860 // parts in the document. There is no predefined format as long as it uniquely 4861 // identifies a group in the context of the current document. 4862 Id string `json:"id,omitempty"` 4863 // Name: Name of the product. 4864 Name string `json:"name,omitempty"` 4865 // ForceSendFields is a list of field names (e.g. "GenericUri") to 4866 // unconditionally include in API requests. By default, fields with empty or 4867 // default values are omitted from API requests. See 4868 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4869 // details. 4870 ForceSendFields []string `json:"-"` 4871 // NullFields is a list of field names (e.g. "GenericUri") to include in API 4872 // requests with the JSON null value. By default, fields with empty values are 4873 // omitted from API requests. See 4874 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4875 NullFields []string `json:"-"` 4876 } 4877 4878 func (s *Product) MarshalJSON() ([]byte, error) { 4879 type NoMethod Product 4880 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4881 } 4882 4883 // ProjectRepoId: Selects a repo using a Google Cloud Platform project ID 4884 // (e.g., winged-cargo-31) and a repo name within that project. 4885 type ProjectRepoId struct { 4886 // ProjectId: The ID of the project. 4887 ProjectId string `json:"projectId,omitempty"` 4888 // RepoName: The name of the repo. Leave empty for the default repo. 4889 RepoName string `json:"repoName,omitempty"` 4890 // ForceSendFields is a list of field names (e.g. "ProjectId") to 4891 // unconditionally include in API requests. By default, fields with empty or 4892 // default values are omitted from API requests. See 4893 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4894 // details. 4895 ForceSendFields []string `json:"-"` 4896 // NullFields is a list of field names (e.g. "ProjectId") to include in API 4897 // requests with the JSON null value. By default, fields with empty values are 4898 // omitted from API requests. See 4899 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4900 NullFields []string `json:"-"` 4901 } 4902 4903 func (s *ProjectRepoId) MarshalJSON() ([]byte, error) { 4904 type NoMethod ProjectRepoId 4905 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4906 } 4907 4908 type ProvenanceBuilder struct { 4909 BuilderDependencies []*ResourceDescriptor `json:"builderDependencies,omitempty"` 4910 Id string `json:"id,omitempty"` 4911 Version map[string]string `json:"version,omitempty"` 4912 // ForceSendFields is a list of field names (e.g. "BuilderDependencies") to 4913 // unconditionally include in API requests. By default, fields with empty or 4914 // default values are omitted from API requests. See 4915 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4916 // details. 4917 ForceSendFields []string `json:"-"` 4918 // NullFields is a list of field names (e.g. "BuilderDependencies") to include 4919 // in API requests with the JSON null value. By default, fields with empty 4920 // values are omitted from API requests. See 4921 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4922 NullFields []string `json:"-"` 4923 } 4924 4925 func (s *ProvenanceBuilder) MarshalJSON() ([]byte, error) { 4926 type NoMethod ProvenanceBuilder 4927 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4928 } 4929 4930 // Publisher: Publisher contains information about the publisher of this Note. 4931 type Publisher struct { 4932 // IssuingAuthority: Provides information about the authority of the issuing 4933 // party to release the document, in particular, the party's constituency and 4934 // responsibilities or other obligations. 4935 IssuingAuthority string `json:"issuingAuthority,omitempty"` 4936 // Name: Name of the publisher. Examples: 'Google', 'Google Cloud Platform'. 4937 Name string `json:"name,omitempty"` 4938 // PublisherNamespace: The context or namespace. Contains a URL which is under 4939 // control of the issuing party and can be used as a globally unique identifier 4940 // for that issuing party. Example: https://csaf.io 4941 PublisherNamespace string `json:"publisherNamespace,omitempty"` 4942 // ForceSendFields is a list of field names (e.g. "IssuingAuthority") to 4943 // unconditionally include in API requests. By default, fields with empty or 4944 // default values are omitted from API requests. See 4945 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4946 // details. 4947 ForceSendFields []string `json:"-"` 4948 // NullFields is a list of field names (e.g. "IssuingAuthority") to include in 4949 // API requests with the JSON null value. By default, fields with empty values 4950 // are omitted from API requests. See 4951 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4952 NullFields []string `json:"-"` 4953 } 4954 4955 func (s *Publisher) MarshalJSON() ([]byte, error) { 4956 type NoMethod Publisher 4957 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4958 } 4959 4960 // Recipe: Steps taken to build the artifact. For a TaskRun, typically each 4961 // container corresponds to one step in the recipe. 4962 type Recipe struct { 4963 // Arguments: Collection of all external inputs that influenced the build on 4964 // top of recipe.definedInMaterial and recipe.entryPoint. For example, if the 4965 // recipe type were "make", then this might be the flags passed to make aside 4966 // from the target, which is captured in recipe.entryPoint. Since the arguments 4967 // field can greatly vary in structure, depending on the builder and recipe 4968 // type, this is of form "Any". 4969 Arguments []googleapi.RawMessage `json:"arguments,omitempty"` 4970 // DefinedInMaterial: Index in materials containing the recipe steps that are 4971 // not implied by recipe.type. For example, if the recipe type were "make", 4972 // then this would point to the source containing the Makefile, not the make 4973 // program itself. Set to -1 if the recipe doesn't come from a material, as 4974 // zero is default unset value for int64. 4975 DefinedInMaterial int64 `json:"definedInMaterial,omitempty,string"` 4976 // EntryPoint: String identifying the entry point into the build. This is often 4977 // a path to a configuration file and/or a target label within that file. The 4978 // syntax and meaning are defined by recipe.type. For example, if the recipe 4979 // type were "make", then this would reference the directory in which to run 4980 // make as well as which target to use. 4981 EntryPoint string `json:"entryPoint,omitempty"` 4982 // Environment: Any other builder-controlled inputs necessary for correctly 4983 // evaluating the recipe. Usually only needed for reproducing the build but not 4984 // evaluated as part of policy. Since the environment field can greatly vary in 4985 // structure, depending on the builder and recipe type, this is of form "Any". 4986 Environment []googleapi.RawMessage `json:"environment,omitempty"` 4987 // Type: URI indicating what type of recipe was performed. It determines the 4988 // meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and 4989 // materials. 4990 Type string `json:"type,omitempty"` 4991 // ForceSendFields is a list of field names (e.g. "Arguments") to 4992 // unconditionally include in API requests. By default, fields with empty or 4993 // default values are omitted from API requests. See 4994 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4995 // details. 4996 ForceSendFields []string `json:"-"` 4997 // NullFields is a list of field names (e.g. "Arguments") to include in API 4998 // requests with the JSON null value. By default, fields with empty values are 4999 // omitted from API requests. See 5000 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5001 NullFields []string `json:"-"` 5002 } 5003 5004 func (s *Recipe) MarshalJSON() ([]byte, error) { 5005 type NoMethod Recipe 5006 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5007 } 5008 5009 // RelatedUrl: Metadata for any related URL information. 5010 type RelatedUrl struct { 5011 // Label: Label to describe usage of the URL. 5012 Label string `json:"label,omitempty"` 5013 // Url: Specific URL associated with the resource. 5014 Url string `json:"url,omitempty"` 5015 // ForceSendFields is a list of field names (e.g. "Label") to unconditionally 5016 // include in API requests. By default, fields with empty or default values are 5017 // omitted from API requests. See 5018 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5019 // details. 5020 ForceSendFields []string `json:"-"` 5021 // NullFields is a list of field names (e.g. "Label") to include in API 5022 // requests with the JSON null value. By default, fields with empty values are 5023 // omitted from API requests. See 5024 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5025 NullFields []string `json:"-"` 5026 } 5027 5028 func (s *RelatedUrl) MarshalJSON() ([]byte, error) { 5029 type NoMethod RelatedUrl 5030 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5031 } 5032 5033 // Remediation: Specifies details on how to handle (and presumably, fix) a 5034 // vulnerability. 5035 type Remediation struct { 5036 // Details: Contains a comprehensive human-readable discussion of the 5037 // remediation. 5038 Details string `json:"details,omitempty"` 5039 // RemediationType: The type of remediation that can be applied. 5040 // 5041 // Possible values: 5042 // "REMEDIATION_TYPE_UNSPECIFIED" - No remediation type specified. 5043 // "MITIGATION" - A MITIGATION is available. 5044 // "NO_FIX_PLANNED" - No fix is planned. 5045 // "NONE_AVAILABLE" - Not available. 5046 // "VENDOR_FIX" - A vendor fix is available. 5047 // "WORKAROUND" - A workaround is available. 5048 RemediationType string `json:"remediationType,omitempty"` 5049 // RemediationUri: Contains the URL where to obtain the remediation. 5050 RemediationUri *RelatedUrl `json:"remediationUri,omitempty"` 5051 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally 5052 // include in API requests. By default, fields with empty or default values are 5053 // omitted from API requests. See 5054 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5055 // details. 5056 ForceSendFields []string `json:"-"` 5057 // NullFields is a list of field names (e.g. "Details") to include in API 5058 // requests with the JSON null value. By default, fields with empty values are 5059 // omitted from API requests. See 5060 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5061 NullFields []string `json:"-"` 5062 } 5063 5064 func (s *Remediation) MarshalJSON() ([]byte, error) { 5065 type NoMethod Remediation 5066 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5067 } 5068 5069 // RepoId: A unique identifier for a Cloud Repo. 5070 type RepoId struct { 5071 // ProjectRepoId: A combination of a project ID and a repo name. 5072 ProjectRepoId *ProjectRepoId `json:"projectRepoId,omitempty"` 5073 // Uid: A server-assigned, globally unique identifier. 5074 Uid string `json:"uid,omitempty"` 5075 // ForceSendFields is a list of field names (e.g. "ProjectRepoId") to 5076 // unconditionally include in API requests. By default, fields with empty or 5077 // default values are omitted from API requests. See 5078 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5079 // details. 5080 ForceSendFields []string `json:"-"` 5081 // NullFields is a list of field names (e.g. "ProjectRepoId") to include in API 5082 // requests with the JSON null value. By default, fields with empty values are 5083 // omitted from API requests. See 5084 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5085 NullFields []string `json:"-"` 5086 } 5087 5088 func (s *RepoId) MarshalJSON() ([]byte, error) { 5089 type NoMethod RepoId 5090 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5091 } 5092 5093 type ResourceDescriptor struct { 5094 Annotations googleapi.RawMessage `json:"annotations,omitempty"` 5095 Content string `json:"content,omitempty"` 5096 Digest map[string]string `json:"digest,omitempty"` 5097 DownloadLocation string `json:"downloadLocation,omitempty"` 5098 MediaType string `json:"mediaType,omitempty"` 5099 Name string `json:"name,omitempty"` 5100 Uri string `json:"uri,omitempty"` 5101 // ForceSendFields is a list of field names (e.g. "Annotations") to 5102 // unconditionally include in API requests. By default, fields with empty or 5103 // default values are omitted from API requests. See 5104 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5105 // details. 5106 ForceSendFields []string `json:"-"` 5107 // NullFields is a list of field names (e.g. "Annotations") to include in API 5108 // requests with the JSON null value. By default, fields with empty values are 5109 // omitted from API requests. See 5110 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5111 NullFields []string `json:"-"` 5112 } 5113 5114 func (s *ResourceDescriptor) MarshalJSON() ([]byte, error) { 5115 type NoMethod ResourceDescriptor 5116 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5117 } 5118 5119 type RunDetails struct { 5120 Builder *ProvenanceBuilder `json:"builder,omitempty"` 5121 Byproducts []*ResourceDescriptor `json:"byproducts,omitempty"` 5122 Metadata *BuildMetadata `json:"metadata,omitempty"` 5123 // ForceSendFields is a list of field names (e.g. "Builder") to unconditionally 5124 // include in API requests. By default, fields with empty or default values are 5125 // omitted from API requests. See 5126 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5127 // details. 5128 ForceSendFields []string `json:"-"` 5129 // NullFields is a list of field names (e.g. "Builder") to include in API 5130 // requests with the JSON null value. By default, fields with empty values are 5131 // omitted from API requests. See 5132 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5133 NullFields []string `json:"-"` 5134 } 5135 5136 func (s *RunDetails) MarshalJSON() ([]byte, error) { 5137 type NoMethod RunDetails 5138 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5139 } 5140 5141 // SBOMReferenceNote: The note representing an SBOM reference. 5142 type SBOMReferenceNote struct { 5143 // Format: The format that SBOM takes. E.g. may be spdx, cyclonedx, etc... 5144 Format string `json:"format,omitempty"` 5145 // Version: The version of the format that the SBOM takes. E.g. if the format 5146 // is spdx, the version may be 2.3. 5147 Version string `json:"version,omitempty"` 5148 // ForceSendFields is a list of field names (e.g. "Format") to unconditionally 5149 // include in API requests. By default, fields with empty or default values are 5150 // omitted from API requests. See 5151 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5152 // details. 5153 ForceSendFields []string `json:"-"` 5154 // NullFields is a list of field names (e.g. "Format") to include in API 5155 // requests with the JSON null value. By default, fields with empty values are 5156 // omitted from API requests. See 5157 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5158 NullFields []string `json:"-"` 5159 } 5160 5161 func (s *SBOMReferenceNote) MarshalJSON() ([]byte, error) { 5162 type NoMethod SBOMReferenceNote 5163 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5164 } 5165 5166 // SBOMReferenceOccurrence: The occurrence representing an SBOM reference as 5167 // applied to a specific resource. The occurrence follows the DSSE 5168 // specification. See 5169 // https://github.com/secure-systems-lab/dsse/blob/master/envelope.md for more 5170 // details. 5171 type SBOMReferenceOccurrence struct { 5172 // Payload: The actual payload that contains the SBOM reference data. 5173 Payload *SbomReferenceIntotoPayload `json:"payload,omitempty"` 5174 // PayloadType: The kind of payload that SbomReferenceIntotoPayload takes. 5175 // Since it's in the intoto format, this value is expected to be 5176 // 'application/vnd.in-toto+json'. 5177 PayloadType string `json:"payloadType,omitempty"` 5178 // Signatures: The signatures over the payload. 5179 Signatures []*EnvelopeSignature `json:"signatures,omitempty"` 5180 // ForceSendFields is a list of field names (e.g. "Payload") to unconditionally 5181 // include in API requests. By default, fields with empty or default values are 5182 // omitted from API requests. See 5183 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5184 // details. 5185 ForceSendFields []string `json:"-"` 5186 // NullFields is a list of field names (e.g. "Payload") to include in API 5187 // requests with the JSON null value. By default, fields with empty values are 5188 // omitted from API requests. See 5189 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5190 NullFields []string `json:"-"` 5191 } 5192 5193 func (s *SBOMReferenceOccurrence) MarshalJSON() ([]byte, error) { 5194 type NoMethod SBOMReferenceOccurrence 5195 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5196 } 5197 5198 // SBOMStatus: The status of an SBOM generation. 5199 type SBOMStatus struct { 5200 // Error: If there was an error generating an SBOM, this will indicate what 5201 // that error was. 5202 Error string `json:"error,omitempty"` 5203 // SbomState: The progress of the SBOM generation. 5204 // 5205 // Possible values: 5206 // "SBOM_STATE_UNSPECIFIED" - Default unknown state. 5207 // "PENDING" - SBOM scanning is pending. 5208 // "COMPLETE" - SBOM scanning has completed. 5209 SbomState string `json:"sbomState,omitempty"` 5210 // ForceSendFields is a list of field names (e.g. "Error") to unconditionally 5211 // include in API requests. By default, fields with empty or default values are 5212 // omitted from API requests. See 5213 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5214 // details. 5215 ForceSendFields []string `json:"-"` 5216 // NullFields is a list of field names (e.g. "Error") to include in API 5217 // requests with the JSON null value. By default, fields with empty values are 5218 // omitted from API requests. See 5219 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5220 NullFields []string `json:"-"` 5221 } 5222 5223 func (s *SBOMStatus) MarshalJSON() ([]byte, error) { 5224 type NoMethod SBOMStatus 5225 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5226 } 5227 5228 // SbomReferenceIntotoPayload: The actual payload that contains the SBOM 5229 // Reference data. The payload follows the intoto statement specification. See 5230 // https://github.com/in-toto/attestation/blob/main/spec/v1.0/statement.md for 5231 // more details. 5232 type SbomReferenceIntotoPayload struct { 5233 // Type: Identifier for the schema of the Statement. 5234 Type string `json:"_type,omitempty"` 5235 // Predicate: Additional parameters of the Predicate. Includes the actual data 5236 // about the SBOM. 5237 Predicate *SbomReferenceIntotoPredicate `json:"predicate,omitempty"` 5238 // PredicateType: URI identifying the type of the Predicate. 5239 PredicateType string `json:"predicateType,omitempty"` 5240 // Subject: Set of software artifacts that the attestation applies to. Each 5241 // element represents a single software artifact. 5242 Subject []*Subject `json:"subject,omitempty"` 5243 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 5244 // include in API requests. By default, fields with empty or default values are 5245 // omitted from API requests. See 5246 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5247 // details. 5248 ForceSendFields []string `json:"-"` 5249 // NullFields is a list of field names (e.g. "Type") to include in API requests 5250 // with the JSON null value. By default, fields with empty values are omitted 5251 // from API requests. See 5252 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5253 NullFields []string `json:"-"` 5254 } 5255 5256 func (s *SbomReferenceIntotoPayload) MarshalJSON() ([]byte, error) { 5257 type NoMethod SbomReferenceIntotoPayload 5258 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5259 } 5260 5261 // SbomReferenceIntotoPredicate: A predicate which describes the SBOM being 5262 // referenced. 5263 type SbomReferenceIntotoPredicate struct { 5264 // Digest: A map of algorithm to digest of the contents of the SBOM. 5265 Digest map[string]string `json:"digest,omitempty"` 5266 // Location: The location of the SBOM. 5267 Location string `json:"location,omitempty"` 5268 // MimeType: The mime type of the SBOM. 5269 MimeType string `json:"mimeType,omitempty"` 5270 // ReferrerId: The person or system referring this predicate to the consumer. 5271 ReferrerId string `json:"referrerId,omitempty"` 5272 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally 5273 // include in API requests. By default, fields with empty or default values are 5274 // omitted from API requests. See 5275 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5276 // details. 5277 ForceSendFields []string `json:"-"` 5278 // NullFields is a list of field names (e.g. "Digest") to include in API 5279 // requests with the JSON null value. By default, fields with empty values are 5280 // omitted from API requests. See 5281 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5282 NullFields []string `json:"-"` 5283 } 5284 5285 func (s *SbomReferenceIntotoPredicate) MarshalJSON() ([]byte, error) { 5286 type NoMethod SbomReferenceIntotoPredicate 5287 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5288 } 5289 5290 // SetIamPolicyRequest: Request message for `SetIamPolicy` method. 5291 type SetIamPolicyRequest struct { 5292 // Policy: REQUIRED: The complete policy to be applied to the `resource`. The 5293 // size of the policy is limited to a few 10s of KB. An empty policy is a valid 5294 // policy but certain Google Cloud services (such as Projects) might reject 5295 // them. 5296 Policy *Policy `json:"policy,omitempty"` 5297 // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally 5298 // include in API requests. By default, fields with empty or default values are 5299 // omitted from API requests. See 5300 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5301 // details. 5302 ForceSendFields []string `json:"-"` 5303 // NullFields is a list of field names (e.g. "Policy") to include in API 5304 // requests with the JSON null value. By default, fields with empty values are 5305 // omitted from API requests. See 5306 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5307 NullFields []string `json:"-"` 5308 } 5309 5310 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 5311 type NoMethod SetIamPolicyRequest 5312 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5313 } 5314 5315 // Signature: Verifiers (e.g. Kritis implementations) MUST verify signatures 5316 // with respect to the trust anchors defined in policy (e.g. a Kritis policy). 5317 // Typically this means that the verifier has been configured with a map from 5318 // `public_key_id` to public key material (and any required parameters, e.g. 5319 // signing algorithm). In particular, verification implementations MUST NOT 5320 // treat the signature `public_key_id` as anything more than a key lookup hint. 5321 // The `public_key_id` DOES NOT validate or authenticate a public key; it only 5322 // provides a mechanism for quickly selecting a public key ALREADY CONFIGURED 5323 // on the verifier through a trusted channel. Verification implementations MUST 5324 // reject signatures in any of the following circumstances: * The 5325 // `public_key_id` is not recognized by the verifier. * The public key that 5326 // `public_key_id` refers to does not verify the signature with respect to the 5327 // payload. The `signature` contents SHOULD NOT be "attached" (where the 5328 // payload is included with the serialized `signature` bytes). Verifiers MUST 5329 // ignore any "attached" payload and only verify signatures with respect to 5330 // explicitly provided payload (e.g. a `payload` field on the proto message 5331 // that holds this Signature, or the canonical serialization of the proto 5332 // message that holds this signature). 5333 type Signature struct { 5334 // PublicKeyId: The identifier for the public key that verifies this signature. 5335 // * The `public_key_id` is required. * The `public_key_id` SHOULD be an 5336 // RFC3986 conformant URI. * When possible, the `public_key_id` SHOULD be an 5337 // immutable reference, such as a cryptographic digest. Examples of valid 5338 // `public_key_id`s: OpenPGP V4 public key fingerprint: * 5339 // "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" See 5340 // https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more 5341 // details on this scheme. RFC6920 digest-named SubjectPublicKeyInfo (digest of 5342 // the DER serialization): * 5343 // "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" * 5344 // "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a127158 5345 // 9a5" 5346 PublicKeyId string `json:"publicKeyId,omitempty"` 5347 // Signature: The content of the signature, an opaque bytestring. The payload 5348 // that this signature verifies MUST be unambiguously provided with the 5349 // Signature during verification. A wrapper message might provide the payload 5350 // explicitly. Alternatively, a message might have a canonical serialization 5351 // that can always be unambiguously computed to derive the payload. 5352 Signature string `json:"signature,omitempty"` 5353 // ForceSendFields is a list of field names (e.g. "PublicKeyId") to 5354 // unconditionally include in API requests. By default, fields with empty or 5355 // default values are omitted from API requests. See 5356 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5357 // details. 5358 ForceSendFields []string `json:"-"` 5359 // NullFields is a list of field names (e.g. "PublicKeyId") to include in API 5360 // requests with the JSON null value. By default, fields with empty values are 5361 // omitted from API requests. See 5362 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5363 NullFields []string `json:"-"` 5364 } 5365 5366 func (s *Signature) MarshalJSON() ([]byte, error) { 5367 type NoMethod Signature 5368 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5369 } 5370 5371 type SlsaBuilder struct { 5372 Id string `json:"id,omitempty"` 5373 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 5374 // include in API requests. By default, fields with empty or default values are 5375 // omitted from API requests. See 5376 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5377 // details. 5378 ForceSendFields []string `json:"-"` 5379 // NullFields is a list of field names (e.g. "Id") to include in API requests 5380 // with the JSON null value. By default, fields with empty values are omitted 5381 // from API requests. See 5382 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5383 NullFields []string `json:"-"` 5384 } 5385 5386 func (s *SlsaBuilder) MarshalJSON() ([]byte, error) { 5387 type NoMethod SlsaBuilder 5388 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5389 } 5390 5391 // SlsaCompleteness: Indicates that the builder claims certain fields in this 5392 // message to be complete. 5393 type SlsaCompleteness struct { 5394 // Arguments: If true, the builder claims that recipe.arguments is complete, 5395 // meaning that all external inputs are properly captured in the recipe. 5396 Arguments bool `json:"arguments,omitempty"` 5397 // Environment: If true, the builder claims that recipe.environment is claimed 5398 // to be complete. 5399 Environment bool `json:"environment,omitempty"` 5400 // Materials: If true, the builder claims that materials are complete, usually 5401 // through some controls to prevent network access. Sometimes called 5402 // "hermetic". 5403 Materials bool `json:"materials,omitempty"` 5404 // ForceSendFields is a list of field names (e.g. "Arguments") to 5405 // unconditionally include in API requests. By default, fields with empty or 5406 // default values are omitted from API requests. See 5407 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5408 // details. 5409 ForceSendFields []string `json:"-"` 5410 // NullFields is a list of field names (e.g. "Arguments") to include in API 5411 // requests with the JSON null value. By default, fields with empty values are 5412 // omitted from API requests. See 5413 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5414 NullFields []string `json:"-"` 5415 } 5416 5417 func (s *SlsaCompleteness) MarshalJSON() ([]byte, error) { 5418 type NoMethod SlsaCompleteness 5419 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5420 } 5421 5422 // SlsaMetadata: Other properties of the build. 5423 type SlsaMetadata struct { 5424 // BuildFinishedOn: The timestamp of when the build completed. 5425 BuildFinishedOn string `json:"buildFinishedOn,omitempty"` 5426 // BuildInvocationId: Identifies the particular build invocation, which can be 5427 // useful for finding associated logs or other ad-hoc analysis. The value 5428 // SHOULD be globally unique, per in-toto Provenance spec. 5429 BuildInvocationId string `json:"buildInvocationId,omitempty"` 5430 // BuildStartedOn: The timestamp of when the build started. 5431 BuildStartedOn string `json:"buildStartedOn,omitempty"` 5432 // Completeness: Indicates that the builder claims certain fields in this 5433 // message to be complete. 5434 Completeness *SlsaCompleteness `json:"completeness,omitempty"` 5435 // Reproducible: If true, the builder claims that running the recipe on 5436 // materials will produce bit-for-bit identical output. 5437 Reproducible bool `json:"reproducible,omitempty"` 5438 // ForceSendFields is a list of field names (e.g. "BuildFinishedOn") to 5439 // unconditionally include in API requests. By default, fields with empty or 5440 // default values are omitted from API requests. See 5441 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5442 // details. 5443 ForceSendFields []string `json:"-"` 5444 // NullFields is a list of field names (e.g. "BuildFinishedOn") to include in 5445 // API requests with the JSON null value. By default, fields with empty values 5446 // are omitted from API requests. See 5447 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5448 NullFields []string `json:"-"` 5449 } 5450 5451 func (s *SlsaMetadata) MarshalJSON() ([]byte, error) { 5452 type NoMethod SlsaMetadata 5453 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5454 } 5455 5456 type SlsaProvenance struct { 5457 // Builder: required 5458 Builder *SlsaBuilder `json:"builder,omitempty"` 5459 // Materials: The collection of artifacts that influenced the build including 5460 // sources, dependencies, build tools, base images, and so on. This is 5461 // considered to be incomplete unless metadata.completeness.materials is true. 5462 // Unset or null is equivalent to empty. 5463 Materials []*Material `json:"materials,omitempty"` 5464 Metadata *SlsaMetadata `json:"metadata,omitempty"` 5465 // Recipe: Identifies the configuration used for the build. When combined with 5466 // materials, this SHOULD fully describe the build, such that re-running this 5467 // recipe results in bit-for-bit identical output (if the build is 5468 // reproducible). required 5469 Recipe *SlsaRecipe `json:"recipe,omitempty"` 5470 // ForceSendFields is a list of field names (e.g. "Builder") to unconditionally 5471 // include in API requests. By default, fields with empty or default values are 5472 // omitted from API requests. See 5473 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5474 // details. 5475 ForceSendFields []string `json:"-"` 5476 // NullFields is a list of field names (e.g. "Builder") to include in API 5477 // requests with the JSON null value. By default, fields with empty values are 5478 // omitted from API requests. See 5479 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5480 NullFields []string `json:"-"` 5481 } 5482 5483 func (s *SlsaProvenance) MarshalJSON() ([]byte, error) { 5484 type NoMethod SlsaProvenance 5485 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5486 } 5487 5488 // SlsaProvenanceV1: Keep in sync with schema at 5489 // https://github.com/slsa-framework/slsa/blob/main/docs/provenance/schema/v1/provenance.proto 5490 // Builder renamed to ProvenanceBuilder because of Java conflicts. 5491 type SlsaProvenanceV1 struct { 5492 BuildDefinition *BuildDefinition `json:"buildDefinition,omitempty"` 5493 RunDetails *RunDetails `json:"runDetails,omitempty"` 5494 // ForceSendFields is a list of field names (e.g. "BuildDefinition") to 5495 // unconditionally include in API requests. By default, fields with empty or 5496 // default values are omitted from API requests. See 5497 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5498 // details. 5499 ForceSendFields []string `json:"-"` 5500 // NullFields is a list of field names (e.g. "BuildDefinition") to include in 5501 // API requests with the JSON null value. By default, fields with empty values 5502 // are omitted from API requests. See 5503 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5504 NullFields []string `json:"-"` 5505 } 5506 5507 func (s *SlsaProvenanceV1) MarshalJSON() ([]byte, error) { 5508 type NoMethod SlsaProvenanceV1 5509 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5510 } 5511 5512 // SlsaProvenanceZeroTwo: See full explanation of fields at 5513 // slsa.dev/provenance/v0.2. 5514 type SlsaProvenanceZeroTwo struct { 5515 BuildConfig googleapi.RawMessage `json:"buildConfig,omitempty"` 5516 BuildType string `json:"buildType,omitempty"` 5517 Builder *GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder `json:"builder,omitempty"` 5518 Invocation *GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation `json:"invocation,omitempty"` 5519 Materials []*GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial `json:"materials,omitempty"` 5520 Metadata *GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata `json:"metadata,omitempty"` 5521 // ForceSendFields is a list of field names (e.g. "BuildConfig") to 5522 // unconditionally include in API requests. By default, fields with empty or 5523 // default values are omitted from API requests. See 5524 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5525 // details. 5526 ForceSendFields []string `json:"-"` 5527 // NullFields is a list of field names (e.g. "BuildConfig") to include in API 5528 // requests with the JSON null value. By default, fields with empty values are 5529 // omitted from API requests. See 5530 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5531 NullFields []string `json:"-"` 5532 } 5533 5534 func (s *SlsaProvenanceZeroTwo) MarshalJSON() ([]byte, error) { 5535 type NoMethod SlsaProvenanceZeroTwo 5536 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5537 } 5538 5539 // SlsaRecipe: Steps taken to build the artifact. For a TaskRun, typically each 5540 // container corresponds to one step in the recipe. 5541 type SlsaRecipe struct { 5542 // Arguments: Collection of all external inputs that influenced the build on 5543 // top of recipe.definedInMaterial and recipe.entryPoint. For example, if the 5544 // recipe type were "make", then this might be the flags passed to make aside 5545 // from the target, which is captured in recipe.entryPoint. Depending on the 5546 // recipe Type, the structure may be different. 5547 Arguments googleapi.RawMessage `json:"arguments,omitempty"` 5548 // DefinedInMaterial: Index in materials containing the recipe steps that are 5549 // not implied by recipe.type. For example, if the recipe type were "make", 5550 // then this would point to the source containing the Makefile, not the make 5551 // program itself. Set to -1 if the recipe doesn't come from a material, as 5552 // zero is default unset value for int64. 5553 DefinedInMaterial int64 `json:"definedInMaterial,omitempty,string"` 5554 // EntryPoint: String identifying the entry point into the build. This is often 5555 // a path to a configuration file and/or a target label within that file. The 5556 // syntax and meaning are defined by recipe.type. For example, if the recipe 5557 // type were "make", then this would reference the directory in which to run 5558 // make as well as which target to use. 5559 EntryPoint string `json:"entryPoint,omitempty"` 5560 // Environment: Any other builder-controlled inputs necessary for correctly 5561 // evaluating the recipe. Usually only needed for reproducing the build but not 5562 // evaluated as part of policy. Depending on the recipe Type, the structure may 5563 // be different. 5564 Environment googleapi.RawMessage `json:"environment,omitempty"` 5565 // Type: URI indicating what type of recipe was performed. It determines the 5566 // meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and 5567 // materials. 5568 Type string `json:"type,omitempty"` 5569 // ForceSendFields is a list of field names (e.g. "Arguments") to 5570 // unconditionally include in API requests. By default, fields with empty or 5571 // default values are omitted from API requests. See 5572 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5573 // details. 5574 ForceSendFields []string `json:"-"` 5575 // NullFields is a list of field names (e.g. "Arguments") to include in API 5576 // requests with the JSON null value. By default, fields with empty values are 5577 // omitted from API requests. See 5578 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5579 NullFields []string `json:"-"` 5580 } 5581 5582 func (s *SlsaRecipe) MarshalJSON() ([]byte, error) { 5583 type NoMethod SlsaRecipe 5584 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5585 } 5586 5587 // Source: Source describes the location of the source used for the build. 5588 type Source struct { 5589 // AdditionalContexts: If provided, some of the source code used for the build 5590 // may be found in these locations, in the case where the source repository had 5591 // multiple remotes or submodules. This list will not include the context 5592 // specified in the context field. 5593 AdditionalContexts []*SourceContext `json:"additionalContexts,omitempty"` 5594 // ArtifactStorageSourceUri: If provided, the input binary artifacts for the 5595 // build came from this location. 5596 ArtifactStorageSourceUri string `json:"artifactStorageSourceUri,omitempty"` 5597 // Context: If provided, the source code used for the build came from this 5598 // location. 5599 Context *SourceContext `json:"context,omitempty"` 5600 // FileHashes: Hash(es) of the build source, which can be used to verify that 5601 // the original source integrity was maintained in the build. The keys to this 5602 // map are file paths used as build source and the values contain the hash 5603 // values for those files. If the build source came in a single package such as 5604 // a gzipped tarfile (.tar.gz), the FileHash will be for the single path to 5605 // that file. 5606 FileHashes map[string]FileHashes `json:"fileHashes,omitempty"` 5607 // ForceSendFields is a list of field names (e.g. "AdditionalContexts") to 5608 // unconditionally include in API requests. By default, fields with empty or 5609 // default values are omitted from API requests. See 5610 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5611 // details. 5612 ForceSendFields []string `json:"-"` 5613 // NullFields is a list of field names (e.g. "AdditionalContexts") to include 5614 // in API requests with the JSON null value. By default, fields with empty 5615 // values are omitted from API requests. See 5616 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5617 NullFields []string `json:"-"` 5618 } 5619 5620 func (s *Source) MarshalJSON() ([]byte, error) { 5621 type NoMethod Source 5622 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5623 } 5624 5625 // SourceContext: A SourceContext is a reference to a tree of files. A 5626 // SourceContext together with a path point to a unique revision of a single 5627 // file or directory. 5628 type SourceContext struct { 5629 // CloudRepo: A SourceContext referring to a revision in a Google Cloud Source 5630 // Repo. 5631 CloudRepo *CloudRepoSourceContext `json:"cloudRepo,omitempty"` 5632 // Gerrit: A SourceContext referring to a Gerrit project. 5633 Gerrit *GerritSourceContext `json:"gerrit,omitempty"` 5634 // Git: A SourceContext referring to any third party Git repo (e.g., GitHub). 5635 Git *GitSourceContext `json:"git,omitempty"` 5636 // Labels: Labels with user defined metadata. 5637 Labels map[string]string `json:"labels,omitempty"` 5638 // ForceSendFields is a list of field names (e.g. "CloudRepo") to 5639 // unconditionally include in API requests. By default, fields with empty or 5640 // default values are omitted from API requests. See 5641 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5642 // details. 5643 ForceSendFields []string `json:"-"` 5644 // NullFields is a list of field names (e.g. "CloudRepo") to include in API 5645 // requests with the JSON null value. By default, fields with empty values are 5646 // omitted from API requests. See 5647 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5648 NullFields []string `json:"-"` 5649 } 5650 5651 func (s *SourceContext) MarshalJSON() ([]byte, error) { 5652 type NoMethod SourceContext 5653 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5654 } 5655 5656 // Status: The `Status` type defines a logical error model that is suitable for 5657 // different programming environments, including REST APIs and RPC APIs. It is 5658 // used by gRPC (https://github.com/grpc). Each `Status` message contains three 5659 // pieces of data: error code, error message, and error details. You can find 5660 // out more about this error model and how to work with it in the API Design 5661 // Guide (https://cloud.google.com/apis/design/errors). 5662 type Status struct { 5663 // Code: The status code, which should be an enum value of google.rpc.Code. 5664 Code int64 `json:"code,omitempty"` 5665 // Details: A list of messages that carry the error details. There is a common 5666 // set of message types for APIs to use. 5667 Details []googleapi.RawMessage `json:"details,omitempty"` 5668 // Message: A developer-facing error message, which should be in English. Any 5669 // user-facing error message should be localized and sent in the 5670 // google.rpc.Status.details field, or localized by the client. 5671 Message string `json:"message,omitempty"` 5672 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 5673 // include in API requests. By default, fields with empty or default values are 5674 // omitted from API requests. See 5675 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5676 // details. 5677 ForceSendFields []string `json:"-"` 5678 // NullFields is a list of field names (e.g. "Code") to include in API requests 5679 // with the JSON null value. By default, fields with empty values are omitted 5680 // from API requests. See 5681 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5682 NullFields []string `json:"-"` 5683 } 5684 5685 func (s *Status) MarshalJSON() ([]byte, error) { 5686 type NoMethod Status 5687 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5688 } 5689 5690 type Subject struct { 5691 // Digest: "": "" Algorithms can be e.g. sha256, sha512 See 5692 // https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet 5693 Digest map[string]string `json:"digest,omitempty"` 5694 Name string `json:"name,omitempty"` 5695 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally 5696 // include in API requests. By default, fields with empty or default values are 5697 // omitted from API requests. See 5698 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5699 // details. 5700 ForceSendFields []string `json:"-"` 5701 // NullFields is a list of field names (e.g. "Digest") to include in API 5702 // requests with the JSON null value. By default, fields with empty values are 5703 // omitted from API requests. See 5704 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5705 NullFields []string `json:"-"` 5706 } 5707 5708 func (s *Subject) MarshalJSON() ([]byte, error) { 5709 type NoMethod Subject 5710 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5711 } 5712 5713 // TestIamPermissionsRequest: Request message for `TestIamPermissions` method. 5714 type TestIamPermissionsRequest struct { 5715 // Permissions: The set of permissions to check for the `resource`. Permissions 5716 // with wildcards (such as `*` or `storage.*`) are not allowed. For more 5717 // information see IAM Overview 5718 // (https://cloud.google.com/iam/docs/overview#permissions). 5719 Permissions []string `json:"permissions,omitempty"` 5720 // ForceSendFields is a list of field names (e.g. "Permissions") to 5721 // unconditionally include in API requests. By default, fields with empty or 5722 // default values are omitted from API requests. See 5723 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5724 // details. 5725 ForceSendFields []string `json:"-"` 5726 // NullFields is a list of field names (e.g. "Permissions") to include in API 5727 // requests with the JSON null value. By default, fields with empty values are 5728 // omitted from API requests. See 5729 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5730 NullFields []string `json:"-"` 5731 } 5732 5733 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 5734 type NoMethod TestIamPermissionsRequest 5735 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5736 } 5737 5738 // TestIamPermissionsResponse: Response message for `TestIamPermissions` 5739 // method. 5740 type TestIamPermissionsResponse struct { 5741 // Permissions: A subset of `TestPermissionsRequest.permissions` that the 5742 // caller is allowed. 5743 Permissions []string `json:"permissions,omitempty"` 5744 5745 // ServerResponse contains the HTTP response code and headers from the server. 5746 googleapi.ServerResponse `json:"-"` 5747 // ForceSendFields is a list of field names (e.g. "Permissions") to 5748 // unconditionally include in API requests. By default, fields with empty or 5749 // default values are omitted from API requests. See 5750 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5751 // details. 5752 ForceSendFields []string `json:"-"` 5753 // NullFields is a list of field names (e.g. "Permissions") to include in API 5754 // requests with the JSON null value. By default, fields with empty values are 5755 // omitted from API requests. See 5756 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5757 NullFields []string `json:"-"` 5758 } 5759 5760 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 5761 type NoMethod TestIamPermissionsResponse 5762 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5763 } 5764 5765 // TimeSpan: Start and end times for a build execution phase. Next ID: 3 5766 type TimeSpan struct { 5767 // EndTime: End of time span. 5768 EndTime string `json:"endTime,omitempty"` 5769 // StartTime: Start of time span. 5770 StartTime string `json:"startTime,omitempty"` 5771 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally 5772 // include in API requests. By default, fields with empty or default values are 5773 // omitted from API requests. See 5774 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5775 // details. 5776 ForceSendFields []string `json:"-"` 5777 // NullFields is a list of field names (e.g. "EndTime") to include in API 5778 // requests with the JSON null value. By default, fields with empty values are 5779 // omitted from API requests. See 5780 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5781 NullFields []string `json:"-"` 5782 } 5783 5784 func (s *TimeSpan) MarshalJSON() ([]byte, error) { 5785 type NoMethod TimeSpan 5786 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5787 } 5788 5789 // UpgradeDistribution: The Upgrade Distribution represents metadata about the 5790 // Upgrade for each operating system (CPE). Some distributions have additional 5791 // metadata around updates, classifying them into various categories and 5792 // severities. 5793 type UpgradeDistribution struct { 5794 // Classification: The operating system classification of this Upgrade, as 5795 // specified by the upstream operating system upgrade feed. For Windows the 5796 // classification is one of the category_ids listed at 5797 // https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) 5798 Classification string `json:"classification,omitempty"` 5799 // CpeUri: Required - The specific operating system this metadata applies to. 5800 // See https://cpe.mitre.org/specification/. 5801 CpeUri string `json:"cpeUri,omitempty"` 5802 // Cve: The cve tied to this Upgrade. 5803 Cve []string `json:"cve,omitempty"` 5804 // Severity: The severity as specified by the upstream operating system. 5805 Severity string `json:"severity,omitempty"` 5806 // ForceSendFields is a list of field names (e.g. "Classification") to 5807 // unconditionally include in API requests. By default, fields with empty or 5808 // default values are omitted from API requests. See 5809 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5810 // details. 5811 ForceSendFields []string `json:"-"` 5812 // NullFields is a list of field names (e.g. "Classification") to include in 5813 // API requests with the JSON null value. By default, fields with empty values 5814 // are omitted from API requests. See 5815 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5816 NullFields []string `json:"-"` 5817 } 5818 5819 func (s *UpgradeDistribution) MarshalJSON() ([]byte, error) { 5820 type NoMethod UpgradeDistribution 5821 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5822 } 5823 5824 // UpgradeNote: An Upgrade Note represents a potential upgrade of a package to 5825 // a given version. For each package version combination (i.e. bash 4.0, bash 5826 // 4.1, bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update 5827 // field represents the information related to the update. 5828 type UpgradeNote struct { 5829 // Distributions: Metadata about the upgrade for each specific operating 5830 // system. 5831 Distributions []*UpgradeDistribution `json:"distributions,omitempty"` 5832 // Package: Required for non-Windows OS. The package this Upgrade is for. 5833 Package string `json:"package,omitempty"` 5834 // Version: Required for non-Windows OS. The version of the package in machine 5835 // + human readable form. 5836 Version *Version `json:"version,omitempty"` 5837 // WindowsUpdate: Required for Windows OS. Represents the metadata about the 5838 // Windows update. 5839 WindowsUpdate *WindowsUpdate `json:"windowsUpdate,omitempty"` 5840 // ForceSendFields is a list of field names (e.g. "Distributions") to 5841 // unconditionally include in API requests. By default, fields with empty or 5842 // default values are omitted from API requests. See 5843 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5844 // details. 5845 ForceSendFields []string `json:"-"` 5846 // NullFields is a list of field names (e.g. "Distributions") to include in API 5847 // requests with the JSON null value. By default, fields with empty values are 5848 // omitted from API requests. See 5849 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5850 NullFields []string `json:"-"` 5851 } 5852 5853 func (s *UpgradeNote) MarshalJSON() ([]byte, error) { 5854 type NoMethod UpgradeNote 5855 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5856 } 5857 5858 // UpgradeOccurrence: An Upgrade Occurrence represents that a specific 5859 // resource_url could install a specific upgrade. This presence is supplied via 5860 // local sources (i.e. it is present in the mirror and the running system has 5861 // noticed its availability). For Windows, both distribution and windows_update 5862 // contain information for the Windows update. 5863 type UpgradeOccurrence struct { 5864 // Distribution: Metadata about the upgrade for available for the specific 5865 // operating system for the resource_url. This allows efficient filtering, as 5866 // well as making it easier to use the occurrence. 5867 Distribution *UpgradeDistribution `json:"distribution,omitempty"` 5868 // Package: Required for non-Windows OS. The package this Upgrade is for. 5869 Package string `json:"package,omitempty"` 5870 // ParsedVersion: Required for non-Windows OS. The version of the package in a 5871 // machine + human readable form. 5872 ParsedVersion *Version `json:"parsedVersion,omitempty"` 5873 // WindowsUpdate: Required for Windows OS. Represents the metadata about the 5874 // Windows update. 5875 WindowsUpdate *WindowsUpdate `json:"windowsUpdate,omitempty"` 5876 // ForceSendFields is a list of field names (e.g. "Distribution") to 5877 // unconditionally include in API requests. By default, fields with empty or 5878 // default values are omitted from API requests. See 5879 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5880 // details. 5881 ForceSendFields []string `json:"-"` 5882 // NullFields is a list of field names (e.g. "Distribution") to include in API 5883 // requests with the JSON null value. By default, fields with empty values are 5884 // omitted from API requests. See 5885 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5886 NullFields []string `json:"-"` 5887 } 5888 5889 func (s *UpgradeOccurrence) MarshalJSON() ([]byte, error) { 5890 type NoMethod UpgradeOccurrence 5891 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5892 } 5893 5894 // Version: Version contains structured information about the version of a 5895 // package. 5896 type Version struct { 5897 // Epoch: Used to correct mistakes in the version numbering scheme. 5898 Epoch int64 `json:"epoch,omitempty"` 5899 // FullName: Human readable version string. This string is of the form :- and 5900 // is only set when kind is NORMAL. 5901 FullName string `json:"fullName,omitempty"` 5902 // Inclusive: Whether this version is specifying part of an inclusive range. 5903 // Grafeas does not have the capability to specify version ranges; instead we 5904 // have fields that specify start version and end versions. At times this is 5905 // insufficient - we also need to specify whether the version is included in 5906 // the range or is excluded from the range. This boolean is expected to be set 5907 // to true when the version is included in a range. 5908 Inclusive bool `json:"inclusive,omitempty"` 5909 // Kind: Required. Distinguishes between sentinel MIN/MAX versions and normal 5910 // versions. 5911 // 5912 // Possible values: 5913 // "VERSION_KIND_UNSPECIFIED" - Unknown. 5914 // "NORMAL" - A standard package version. 5915 // "MINIMUM" - A special version representing negative infinity. 5916 // "MAXIMUM" - A special version representing positive infinity. 5917 Kind string `json:"kind,omitempty"` 5918 // Name: Required only when version kind is NORMAL. The main part of the 5919 // version name. 5920 Name string `json:"name,omitempty"` 5921 // Revision: The iteration of the package build from the above version. 5922 Revision string `json:"revision,omitempty"` 5923 // ForceSendFields is a list of field names (e.g. "Epoch") to unconditionally 5924 // include in API requests. By default, fields with empty or default values are 5925 // omitted from API requests. See 5926 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5927 // details. 5928 ForceSendFields []string `json:"-"` 5929 // NullFields is a list of field names (e.g. "Epoch") to include in API 5930 // requests with the JSON null value. By default, fields with empty values are 5931 // omitted from API requests. See 5932 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5933 NullFields []string `json:"-"` 5934 } 5935 5936 func (s *Version) MarshalJSON() ([]byte, error) { 5937 type NoMethod Version 5938 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5939 } 5940 5941 // VexAssessment: VexAssessment provides all publisher provided Vex information 5942 // that is related to this vulnerability. 5943 type VexAssessment struct { 5944 // Cve: Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) 5945 // tracking number for the vulnerability. Deprecated: Use vulnerability_id 5946 // instead to denote CVEs. 5947 Cve string `json:"cve,omitempty"` 5948 // Impacts: Contains information about the impact of this vulnerability, this 5949 // will change with time. 5950 Impacts []string `json:"impacts,omitempty"` 5951 // Justification: Justification provides the justification when the state of 5952 // the assessment if NOT_AFFECTED. 5953 Justification *Justification `json:"justification,omitempty"` 5954 // NoteName: The VulnerabilityAssessment note from which this VexAssessment was 5955 // generated. This will be of the form: 5956 // `projects/[PROJECT_ID]/notes/[NOTE_ID]`. 5957 NoteName string `json:"noteName,omitempty"` 5958 // RelatedUris: Holds a list of references associated with this vulnerability 5959 // item and assessment. 5960 RelatedUris []*RelatedUrl `json:"relatedUris,omitempty"` 5961 // Remediations: Specifies details on how to handle (and presumably, fix) a 5962 // vulnerability. 5963 Remediations []*Remediation `json:"remediations,omitempty"` 5964 // State: Provides the state of this Vulnerability assessment. 5965 // 5966 // Possible values: 5967 // "STATE_UNSPECIFIED" - No state is specified. 5968 // "AFFECTED" - This product is known to be affected by this vulnerability. 5969 // "NOT_AFFECTED" - This product is known to be not affected by this 5970 // vulnerability. 5971 // "FIXED" - This product contains a fix for this vulnerability. 5972 // "UNDER_INVESTIGATION" - It is not known yet whether these versions are or 5973 // are not affected by the vulnerability. However, it is still under 5974 // investigation. 5975 State string `json:"state,omitempty"` 5976 // VulnerabilityId: The vulnerability identifier for this Assessment. Will hold 5977 // one of common identifiers e.g. CVE, GHSA etc. 5978 VulnerabilityId string `json:"vulnerabilityId,omitempty"` 5979 // ForceSendFields is a list of field names (e.g. "Cve") to unconditionally 5980 // include in API requests. By default, fields with empty or default values are 5981 // omitted from API requests. See 5982 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5983 // details. 5984 ForceSendFields []string `json:"-"` 5985 // NullFields is a list of field names (e.g. "Cve") to include in API requests 5986 // with the JSON null value. By default, fields with empty values are omitted 5987 // from API requests. See 5988 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5989 NullFields []string `json:"-"` 5990 } 5991 5992 func (s *VexAssessment) MarshalJSON() ([]byte, error) { 5993 type NoMethod VexAssessment 5994 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5995 } 5996 5997 // Volume: Volume describes a Docker container volume which is mounted into 5998 // build steps in order to persist files across build step execution. Next ID: 5999 // 3 6000 type Volume struct { 6001 // Name: Name of the volume to mount. Volume names must be unique per build 6002 // step and must be valid names for Docker volumes. Each named volume must be 6003 // used by at least two build steps. 6004 Name string `json:"name,omitempty"` 6005 // Path: Path at which to mount the volume. Paths must be absolute and cannot 6006 // conflict with other volume paths on the same build step or with certain 6007 // reserved volume paths. 6008 Path string `json:"path,omitempty"` 6009 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 6010 // include in API requests. By default, fields with empty or default values are 6011 // omitted from API requests. See 6012 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6013 // details. 6014 ForceSendFields []string `json:"-"` 6015 // NullFields is a list of field names (e.g. "Name") to include in API requests 6016 // with the JSON null value. By default, fields with empty values are omitted 6017 // from API requests. See 6018 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6019 NullFields []string `json:"-"` 6020 } 6021 6022 func (s *Volume) MarshalJSON() ([]byte, error) { 6023 type NoMethod Volume 6024 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6025 } 6026 6027 // VulnerabilityAssessmentNote: A single VulnerabilityAssessmentNote represents 6028 // one particular product's vulnerability assessment for one CVE. 6029 type VulnerabilityAssessmentNote struct { 6030 // Assessment: Represents a vulnerability assessment for the product. 6031 Assessment *Assessment `json:"assessment,omitempty"` 6032 // LanguageCode: Identifies the language used by this document, corresponding 6033 // to IETF BCP 47 / RFC 5646. 6034 LanguageCode string `json:"languageCode,omitempty"` 6035 // LongDescription: A detailed description of this Vex. 6036 LongDescription string `json:"longDescription,omitempty"` 6037 // Product: The product affected by this vex. 6038 Product *Product `json:"product,omitempty"` 6039 // Publisher: Publisher details of this Note. 6040 Publisher *Publisher `json:"publisher,omitempty"` 6041 // ShortDescription: A one sentence description of this Vex. 6042 ShortDescription string `json:"shortDescription,omitempty"` 6043 // Title: The title of the note. E.g. `Vex-Debian-11.4` 6044 Title string `json:"title,omitempty"` 6045 // ForceSendFields is a list of field names (e.g. "Assessment") to 6046 // unconditionally include in API requests. By default, fields with empty or 6047 // default values are omitted from API requests. See 6048 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6049 // details. 6050 ForceSendFields []string `json:"-"` 6051 // NullFields is a list of field names (e.g. "Assessment") to include in API 6052 // requests with the JSON null value. By default, fields with empty values are 6053 // omitted from API requests. See 6054 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6055 NullFields []string `json:"-"` 6056 } 6057 6058 func (s *VulnerabilityAssessmentNote) MarshalJSON() ([]byte, error) { 6059 type NoMethod VulnerabilityAssessmentNote 6060 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6061 } 6062 6063 // VulnerabilityNote: A security vulnerability that can be found in resources. 6064 type VulnerabilityNote struct { 6065 // CvssScore: The CVSS score of this vulnerability. CVSS score is on a scale of 6066 // 0 - 10 where 0 indicates low severity and 10 indicates high severity. 6067 CvssScore float64 `json:"cvssScore,omitempty"` 6068 // CvssV2: The full description of the v2 CVSS for this vulnerability. 6069 CvssV2 *CVSS `json:"cvssV2,omitempty"` 6070 // CvssV3: The full description of the CVSSv3 for this vulnerability. 6071 CvssV3 *CVSSv3 `json:"cvssV3,omitempty"` 6072 // CvssVersion: CVSS version used to populate cvss_score and severity. 6073 // 6074 // Possible values: 6075 // "CVSS_VERSION_UNSPECIFIED" 6076 // "CVSS_VERSION_2" 6077 // "CVSS_VERSION_3" 6078 CvssVersion string `json:"cvssVersion,omitempty"` 6079 // Details: Details of all known distros and packages affected by this 6080 // vulnerability. 6081 Details []*Detail `json:"details,omitempty"` 6082 // Severity: The note provider assigned severity of this vulnerability. 6083 // 6084 // Possible values: 6085 // "SEVERITY_UNSPECIFIED" - Unknown. 6086 // "MINIMAL" - Minimal severity. 6087 // "LOW" - Low severity. 6088 // "MEDIUM" - Medium severity. 6089 // "HIGH" - High severity. 6090 // "CRITICAL" - Critical severity. 6091 Severity string `json:"severity,omitempty"` 6092 // SourceUpdateTime: The time this information was last changed at the source. 6093 // This is an upstream timestamp from the underlying information source - e.g. 6094 // Ubuntu security tracker. 6095 SourceUpdateTime string `json:"sourceUpdateTime,omitempty"` 6096 // WindowsDetails: Windows details get their own format because the information 6097 // format and model don't match a normal detail. Specifically Windows updates 6098 // are done as patches, thus Windows vulnerabilities really are a missing 6099 // package, rather than a package being at an incorrect version. 6100 WindowsDetails []*WindowsDetail `json:"windowsDetails,omitempty"` 6101 // ForceSendFields is a list of field names (e.g. "CvssScore") to 6102 // unconditionally include in API requests. By default, fields with empty or 6103 // default values are omitted from API requests. See 6104 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6105 // details. 6106 ForceSendFields []string `json:"-"` 6107 // NullFields is a list of field names (e.g. "CvssScore") to include in API 6108 // requests with the JSON null value. By default, fields with empty values are 6109 // omitted from API requests. See 6110 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6111 NullFields []string `json:"-"` 6112 } 6113 6114 func (s *VulnerabilityNote) MarshalJSON() ([]byte, error) { 6115 type NoMethod VulnerabilityNote 6116 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6117 } 6118 6119 func (s *VulnerabilityNote) UnmarshalJSON(data []byte) error { 6120 type NoMethod VulnerabilityNote 6121 var s1 struct { 6122 CvssScore gensupport.JSONFloat64 `json:"cvssScore"` 6123 *NoMethod 6124 } 6125 s1.NoMethod = (*NoMethod)(s) 6126 if err := json.Unmarshal(data, &s1); err != nil { 6127 return err 6128 } 6129 s.CvssScore = float64(s1.CvssScore) 6130 return nil 6131 } 6132 6133 // VulnerabilityOccurrence: An occurrence of a severity vulnerability on a 6134 // resource. 6135 type VulnerabilityOccurrence struct { 6136 // CvssScore: Output only. The CVSS score of this vulnerability. CVSS score is 6137 // on a scale of 0 - 10 where 0 indicates low severity and 10 indicates high 6138 // severity. 6139 CvssScore float64 `json:"cvssScore,omitempty"` 6140 // CvssV2: The cvss v2 score for the vulnerability. 6141 CvssV2 *CVSS `json:"cvssV2,omitempty"` 6142 // CvssVersion: Output only. CVSS version used to populate cvss_score and 6143 // severity. 6144 // 6145 // Possible values: 6146 // "CVSS_VERSION_UNSPECIFIED" 6147 // "CVSS_VERSION_2" 6148 // "CVSS_VERSION_3" 6149 CvssVersion string `json:"cvssVersion,omitempty"` 6150 // Cvssv3: The cvss v3 score for the vulnerability. 6151 Cvssv3 *CVSS `json:"cvssv3,omitempty"` 6152 // EffectiveSeverity: The distro assigned severity for this vulnerability when 6153 // it is available, otherwise this is the note provider assigned severity. When 6154 // there are multiple PackageIssues for this vulnerability, they can have 6155 // different effective severities because some might be provided by the distro 6156 // while others are provided by the language ecosystem for a language pack. For 6157 // this reason, it is advised to use the effective severity on the PackageIssue 6158 // level. In the case where multiple PackageIssues have differing effective 6159 // severities, this field should be the highest severity for any of the 6160 // PackageIssues. 6161 // 6162 // Possible values: 6163 // "SEVERITY_UNSPECIFIED" - Unknown. 6164 // "MINIMAL" - Minimal severity. 6165 // "LOW" - Low severity. 6166 // "MEDIUM" - Medium severity. 6167 // "HIGH" - High severity. 6168 // "CRITICAL" - Critical severity. 6169 EffectiveSeverity string `json:"effectiveSeverity,omitempty"` 6170 // ExtraDetails: Occurrence-specific extra details about the vulnerability. 6171 ExtraDetails string `json:"extraDetails,omitempty"` 6172 // FixAvailable: Output only. Whether at least one of the affected packages has 6173 // a fix available. 6174 FixAvailable bool `json:"fixAvailable,omitempty"` 6175 // LongDescription: Output only. A detailed description of this vulnerability. 6176 LongDescription string `json:"longDescription,omitempty"` 6177 // PackageIssue: Required. The set of affected locations and their fixes (if 6178 // available) within the associated resource. 6179 PackageIssue []*PackageIssue `json:"packageIssue,omitempty"` 6180 // RelatedUrls: Output only. URLs related to this vulnerability. 6181 RelatedUrls []*RelatedUrl `json:"relatedUrls,omitempty"` 6182 // Severity: Output only. The note provider assigned severity of this 6183 // vulnerability. 6184 // 6185 // Possible values: 6186 // "SEVERITY_UNSPECIFIED" - Unknown. 6187 // "MINIMAL" - Minimal severity. 6188 // "LOW" - Low severity. 6189 // "MEDIUM" - Medium severity. 6190 // "HIGH" - High severity. 6191 // "CRITICAL" - Critical severity. 6192 Severity string `json:"severity,omitempty"` 6193 // ShortDescription: Output only. A one sentence description of this 6194 // vulnerability. 6195 ShortDescription string `json:"shortDescription,omitempty"` 6196 // Type: The type of package; whether native or non native (e.g., ruby gems, 6197 // node.js packages, etc.). 6198 Type string `json:"type,omitempty"` 6199 VexAssessment *VexAssessment `json:"vexAssessment,omitempty"` 6200 // ForceSendFields is a list of field names (e.g. "CvssScore") to 6201 // unconditionally include in API requests. By default, fields with empty or 6202 // default values are omitted from API requests. See 6203 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6204 // details. 6205 ForceSendFields []string `json:"-"` 6206 // NullFields is a list of field names (e.g. "CvssScore") to include in API 6207 // requests with the JSON null value. By default, fields with empty values are 6208 // omitted from API requests. See 6209 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6210 NullFields []string `json:"-"` 6211 } 6212 6213 func (s *VulnerabilityOccurrence) MarshalJSON() ([]byte, error) { 6214 type NoMethod VulnerabilityOccurrence 6215 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6216 } 6217 6218 func (s *VulnerabilityOccurrence) UnmarshalJSON(data []byte) error { 6219 type NoMethod VulnerabilityOccurrence 6220 var s1 struct { 6221 CvssScore gensupport.JSONFloat64 `json:"cvssScore"` 6222 *NoMethod 6223 } 6224 s1.NoMethod = (*NoMethod)(s) 6225 if err := json.Unmarshal(data, &s1); err != nil { 6226 return err 6227 } 6228 s.CvssScore = float64(s1.CvssScore) 6229 return nil 6230 } 6231 6232 // VulnerabilityOccurrencesSummary: A summary of how many vulnerability 6233 // occurrences there are per resource and severity type. 6234 type VulnerabilityOccurrencesSummary struct { 6235 // Counts: A listing by resource of the number of fixable and total 6236 // vulnerabilities. 6237 Counts []*FixableTotalByDigest `json:"counts,omitempty"` 6238 6239 // ServerResponse contains the HTTP response code and headers from the server. 6240 googleapi.ServerResponse `json:"-"` 6241 // ForceSendFields is a list of field names (e.g. "Counts") to unconditionally 6242 // include in API requests. By default, fields with empty or default values are 6243 // omitted from API requests. See 6244 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6245 // details. 6246 ForceSendFields []string `json:"-"` 6247 // NullFields is a list of field names (e.g. "Counts") to include in API 6248 // requests with the JSON null value. By default, fields with empty values are 6249 // omitted from API requests. See 6250 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6251 NullFields []string `json:"-"` 6252 } 6253 6254 func (s *VulnerabilityOccurrencesSummary) MarshalJSON() ([]byte, error) { 6255 type NoMethod VulnerabilityOccurrencesSummary 6256 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6257 } 6258 6259 type WindowsDetail struct { 6260 // CpeUri: Required. The CPE URI (https://cpe.mitre.org/specification/) this 6261 // vulnerability affects. 6262 CpeUri string `json:"cpeUri,omitempty"` 6263 // Description: The description of this vulnerability. 6264 Description string `json:"description,omitempty"` 6265 // FixingKbs: Required. The names of the KBs which have hotfixes to mitigate 6266 // this vulnerability. Note that there may be multiple hotfixes (and thus 6267 // multiple KBs) that mitigate a given vulnerability. Currently any listed KBs 6268 // presence is considered a fix. 6269 FixingKbs []*KnowledgeBase `json:"fixingKbs,omitempty"` 6270 // Name: Required. The name of this vulnerability. 6271 Name string `json:"name,omitempty"` 6272 // ForceSendFields is a list of field names (e.g. "CpeUri") to unconditionally 6273 // include in API requests. By default, fields with empty or default values are 6274 // omitted from API requests. See 6275 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6276 // details. 6277 ForceSendFields []string `json:"-"` 6278 // NullFields is a list of field names (e.g. "CpeUri") to include in API 6279 // requests with the JSON null value. By default, fields with empty values are 6280 // omitted from API requests. See 6281 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6282 NullFields []string `json:"-"` 6283 } 6284 6285 func (s *WindowsDetail) MarshalJSON() ([]byte, error) { 6286 type NoMethod WindowsDetail 6287 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6288 } 6289 6290 // WindowsUpdate: Windows Update represents the metadata about the update for 6291 // the Windows operating system. The fields in this message come from the 6292 // Windows Update API documented at 6293 // https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate. 6294 type WindowsUpdate struct { 6295 // Categories: The list of categories to which the update belongs. 6296 Categories []*Category `json:"categories,omitempty"` 6297 // Description: The localized description of the update. 6298 Description string `json:"description,omitempty"` 6299 // Identity: Required - The unique identifier for the update. 6300 Identity *Identity `json:"identity,omitempty"` 6301 // KbArticleIds: The Microsoft Knowledge Base article IDs that are associated 6302 // with the update. 6303 KbArticleIds []string `json:"kbArticleIds,omitempty"` 6304 // LastPublishedTimestamp: The last published timestamp of the update. 6305 LastPublishedTimestamp string `json:"lastPublishedTimestamp,omitempty"` 6306 // SupportUrl: The hyperlink to the support information for the update. 6307 SupportUrl string `json:"supportUrl,omitempty"` 6308 // Title: The localized title of the update. 6309 Title string `json:"title,omitempty"` 6310 // ForceSendFields is a list of field names (e.g. "Categories") to 6311 // unconditionally include in API requests. By default, fields with empty or 6312 // default values are omitted from API requests. See 6313 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6314 // details. 6315 ForceSendFields []string `json:"-"` 6316 // NullFields is a list of field names (e.g. "Categories") to include in API 6317 // requests with the JSON null value. By default, fields with empty values are 6318 // omitted from API requests. See 6319 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6320 NullFields []string `json:"-"` 6321 } 6322 6323 func (s *WindowsUpdate) MarshalJSON() ([]byte, error) { 6324 type NoMethod WindowsUpdate 6325 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6326 } 6327 6328 type ProjectsLocationsNotesGetCall struct { 6329 s *Service 6330 name string 6331 urlParams_ gensupport.URLParams 6332 ifNoneMatch_ string 6333 ctx_ context.Context 6334 header_ http.Header 6335 } 6336 6337 // Get: Gets the specified note. 6338 // 6339 // - name: The name of the note in the form of 6340 // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. 6341 func (r *ProjectsLocationsNotesService) Get(name string) *ProjectsLocationsNotesGetCall { 6342 c := &ProjectsLocationsNotesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6343 c.name = name 6344 return c 6345 } 6346 6347 // Fields allows partial responses to be retrieved. See 6348 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6349 // details. 6350 func (c *ProjectsLocationsNotesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesGetCall { 6351 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6352 return c 6353 } 6354 6355 // IfNoneMatch sets an optional parameter which makes the operation fail if the 6356 // object's ETag matches the given value. This is useful for getting updates 6357 // only after the object has changed since the last request. 6358 func (c *ProjectsLocationsNotesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotesGetCall { 6359 c.ifNoneMatch_ = entityTag 6360 return c 6361 } 6362 6363 // Context sets the context to be used in this call's Do method. 6364 func (c *ProjectsLocationsNotesGetCall) Context(ctx context.Context) *ProjectsLocationsNotesGetCall { 6365 c.ctx_ = ctx 6366 return c 6367 } 6368 6369 // Header returns a http.Header that can be modified by the caller to add 6370 // headers to the request. 6371 func (c *ProjectsLocationsNotesGetCall) Header() http.Header { 6372 if c.header_ == nil { 6373 c.header_ = make(http.Header) 6374 } 6375 return c.header_ 6376 } 6377 6378 func (c *ProjectsLocationsNotesGetCall) doRequest(alt string) (*http.Response, error) { 6379 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 6380 if c.ifNoneMatch_ != "" { 6381 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6382 } 6383 var body io.Reader = nil 6384 c.urlParams_.Set("alt", alt) 6385 c.urlParams_.Set("prettyPrint", "false") 6386 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 6387 urls += "?" + c.urlParams_.Encode() 6388 req, err := http.NewRequest("GET", urls, body) 6389 if err != nil { 6390 return nil, err 6391 } 6392 req.Header = reqHeaders 6393 googleapi.Expand(req.URL, map[string]string{ 6394 "name": c.name, 6395 }) 6396 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6397 } 6398 6399 // Do executes the "containeranalysis.projects.locations.notes.get" call. 6400 // Any non-2xx status code is an error. Response headers are in either 6401 // *Note.ServerResponse.Header or (if a response was returned at all) in 6402 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6403 // whether the returned error was because http.StatusNotModified was returned. 6404 func (c *ProjectsLocationsNotesGetCall) Do(opts ...googleapi.CallOption) (*Note, error) { 6405 gensupport.SetOptions(c.urlParams_, opts...) 6406 res, err := c.doRequest("json") 6407 if res != nil && res.StatusCode == http.StatusNotModified { 6408 if res.Body != nil { 6409 res.Body.Close() 6410 } 6411 return nil, gensupport.WrapError(&googleapi.Error{ 6412 Code: res.StatusCode, 6413 Header: res.Header, 6414 }) 6415 } 6416 if err != nil { 6417 return nil, err 6418 } 6419 defer googleapi.CloseBody(res) 6420 if err := googleapi.CheckResponse(res); err != nil { 6421 return nil, gensupport.WrapError(err) 6422 } 6423 ret := &Note{ 6424 ServerResponse: googleapi.ServerResponse{ 6425 Header: res.Header, 6426 HTTPStatusCode: res.StatusCode, 6427 }, 6428 } 6429 target := &ret 6430 if err := gensupport.DecodeResponse(target, res); err != nil { 6431 return nil, err 6432 } 6433 return ret, nil 6434 } 6435 6436 type ProjectsLocationsNotesListCall struct { 6437 s *Service 6438 parent string 6439 urlParams_ gensupport.URLParams 6440 ifNoneMatch_ string 6441 ctx_ context.Context 6442 header_ http.Header 6443 } 6444 6445 // List: Lists notes for the specified project. 6446 // 6447 // - parent: The name of the project to list notes for in the form of 6448 // `projects/[PROJECT_ID]`. 6449 func (r *ProjectsLocationsNotesService) List(parent string) *ProjectsLocationsNotesListCall { 6450 c := &ProjectsLocationsNotesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6451 c.parent = parent 6452 return c 6453 } 6454 6455 // Filter sets the optional parameter "filter": The filter expression. 6456 func (c *ProjectsLocationsNotesListCall) Filter(filter string) *ProjectsLocationsNotesListCall { 6457 c.urlParams_.Set("filter", filter) 6458 return c 6459 } 6460 6461 // PageSize sets the optional parameter "pageSize": Number of notes to return 6462 // in the list. Must be positive. Max allowed page size is 1000. If not 6463 // specified, page size defaults to 20. 6464 func (c *ProjectsLocationsNotesListCall) PageSize(pageSize int64) *ProjectsLocationsNotesListCall { 6465 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6466 return c 6467 } 6468 6469 // PageToken sets the optional parameter "pageToken": Token to provide to skip 6470 // to a particular spot in the list. 6471 func (c *ProjectsLocationsNotesListCall) PageToken(pageToken string) *ProjectsLocationsNotesListCall { 6472 c.urlParams_.Set("pageToken", pageToken) 6473 return c 6474 } 6475 6476 // Fields allows partial responses to be retrieved. See 6477 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6478 // details. 6479 func (c *ProjectsLocationsNotesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesListCall { 6480 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6481 return c 6482 } 6483 6484 // IfNoneMatch sets an optional parameter which makes the operation fail if the 6485 // object's ETag matches the given value. This is useful for getting updates 6486 // only after the object has changed since the last request. 6487 func (c *ProjectsLocationsNotesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotesListCall { 6488 c.ifNoneMatch_ = entityTag 6489 return c 6490 } 6491 6492 // Context sets the context to be used in this call's Do method. 6493 func (c *ProjectsLocationsNotesListCall) Context(ctx context.Context) *ProjectsLocationsNotesListCall { 6494 c.ctx_ = ctx 6495 return c 6496 } 6497 6498 // Header returns a http.Header that can be modified by the caller to add 6499 // headers to the request. 6500 func (c *ProjectsLocationsNotesListCall) Header() http.Header { 6501 if c.header_ == nil { 6502 c.header_ = make(http.Header) 6503 } 6504 return c.header_ 6505 } 6506 6507 func (c *ProjectsLocationsNotesListCall) doRequest(alt string) (*http.Response, error) { 6508 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 6509 if c.ifNoneMatch_ != "" { 6510 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6511 } 6512 var body io.Reader = nil 6513 c.urlParams_.Set("alt", alt) 6514 c.urlParams_.Set("prettyPrint", "false") 6515 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notes") 6516 urls += "?" + c.urlParams_.Encode() 6517 req, err := http.NewRequest("GET", urls, body) 6518 if err != nil { 6519 return nil, err 6520 } 6521 req.Header = reqHeaders 6522 googleapi.Expand(req.URL, map[string]string{ 6523 "parent": c.parent, 6524 }) 6525 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6526 } 6527 6528 // Do executes the "containeranalysis.projects.locations.notes.list" call. 6529 // Any non-2xx status code is an error. Response headers are in either 6530 // *ListNotesResponse.ServerResponse.Header or (if a response was returned at 6531 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6532 // check whether the returned error was because http.StatusNotModified was 6533 // returned. 6534 func (c *ProjectsLocationsNotesListCall) Do(opts ...googleapi.CallOption) (*ListNotesResponse, error) { 6535 gensupport.SetOptions(c.urlParams_, opts...) 6536 res, err := c.doRequest("json") 6537 if res != nil && res.StatusCode == http.StatusNotModified { 6538 if res.Body != nil { 6539 res.Body.Close() 6540 } 6541 return nil, gensupport.WrapError(&googleapi.Error{ 6542 Code: res.StatusCode, 6543 Header: res.Header, 6544 }) 6545 } 6546 if err != nil { 6547 return nil, err 6548 } 6549 defer googleapi.CloseBody(res) 6550 if err := googleapi.CheckResponse(res); err != nil { 6551 return nil, gensupport.WrapError(err) 6552 } 6553 ret := &ListNotesResponse{ 6554 ServerResponse: googleapi.ServerResponse{ 6555 Header: res.Header, 6556 HTTPStatusCode: res.StatusCode, 6557 }, 6558 } 6559 target := &ret 6560 if err := gensupport.DecodeResponse(target, res); err != nil { 6561 return nil, err 6562 } 6563 return ret, nil 6564 } 6565 6566 // Pages invokes f for each page of results. 6567 // A non-nil error returned from f will halt the iteration. 6568 // The provided context supersedes any context provided to the Context method. 6569 func (c *ProjectsLocationsNotesListCall) Pages(ctx context.Context, f func(*ListNotesResponse) error) error { 6570 c.ctx_ = ctx 6571 defer c.PageToken(c.urlParams_.Get("pageToken")) 6572 for { 6573 x, err := c.Do() 6574 if err != nil { 6575 return err 6576 } 6577 if err := f(x); err != nil { 6578 return err 6579 } 6580 if x.NextPageToken == "" { 6581 return nil 6582 } 6583 c.PageToken(x.NextPageToken) 6584 } 6585 } 6586 6587 type ProjectsLocationsNotesOccurrencesListCall struct { 6588 s *Service 6589 name string 6590 urlParams_ gensupport.URLParams 6591 ifNoneMatch_ string 6592 ctx_ context.Context 6593 header_ http.Header 6594 } 6595 6596 // List: Lists occurrences referencing the specified note. Provider projects 6597 // can use this method to get all occurrences across consumer projects 6598 // referencing the specified note. 6599 // 6600 // - name: The name of the note to list occurrences for in the form of 6601 // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. 6602 func (r *ProjectsLocationsNotesOccurrencesService) List(name string) *ProjectsLocationsNotesOccurrencesListCall { 6603 c := &ProjectsLocationsNotesOccurrencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6604 c.name = name 6605 return c 6606 } 6607 6608 // Filter sets the optional parameter "filter": The filter expression. 6609 func (c *ProjectsLocationsNotesOccurrencesListCall) Filter(filter string) *ProjectsLocationsNotesOccurrencesListCall { 6610 c.urlParams_.Set("filter", filter) 6611 return c 6612 } 6613 6614 // PageSize sets the optional parameter "pageSize": Number of occurrences to 6615 // return in the list. 6616 func (c *ProjectsLocationsNotesOccurrencesListCall) PageSize(pageSize int64) *ProjectsLocationsNotesOccurrencesListCall { 6617 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6618 return c 6619 } 6620 6621 // PageToken sets the optional parameter "pageToken": Token to provide to skip 6622 // to a particular spot in the list. 6623 func (c *ProjectsLocationsNotesOccurrencesListCall) PageToken(pageToken string) *ProjectsLocationsNotesOccurrencesListCall { 6624 c.urlParams_.Set("pageToken", pageToken) 6625 return c 6626 } 6627 6628 // Fields allows partial responses to be retrieved. See 6629 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6630 // details. 6631 func (c *ProjectsLocationsNotesOccurrencesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesOccurrencesListCall { 6632 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6633 return c 6634 } 6635 6636 // IfNoneMatch sets an optional parameter which makes the operation fail if the 6637 // object's ETag matches the given value. This is useful for getting updates 6638 // only after the object has changed since the last request. 6639 func (c *ProjectsLocationsNotesOccurrencesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotesOccurrencesListCall { 6640 c.ifNoneMatch_ = entityTag 6641 return c 6642 } 6643 6644 // Context sets the context to be used in this call's Do method. 6645 func (c *ProjectsLocationsNotesOccurrencesListCall) Context(ctx context.Context) *ProjectsLocationsNotesOccurrencesListCall { 6646 c.ctx_ = ctx 6647 return c 6648 } 6649 6650 // Header returns a http.Header that can be modified by the caller to add 6651 // headers to the request. 6652 func (c *ProjectsLocationsNotesOccurrencesListCall) Header() http.Header { 6653 if c.header_ == nil { 6654 c.header_ = make(http.Header) 6655 } 6656 return c.header_ 6657 } 6658 6659 func (c *ProjectsLocationsNotesOccurrencesListCall) doRequest(alt string) (*http.Response, error) { 6660 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 6661 if c.ifNoneMatch_ != "" { 6662 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6663 } 6664 var body io.Reader = nil 6665 c.urlParams_.Set("alt", alt) 6666 c.urlParams_.Set("prettyPrint", "false") 6667 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/occurrences") 6668 urls += "?" + c.urlParams_.Encode() 6669 req, err := http.NewRequest("GET", urls, body) 6670 if err != nil { 6671 return nil, err 6672 } 6673 req.Header = reqHeaders 6674 googleapi.Expand(req.URL, map[string]string{ 6675 "name": c.name, 6676 }) 6677 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6678 } 6679 6680 // Do executes the "containeranalysis.projects.locations.notes.occurrences.list" call. 6681 // Any non-2xx status code is an error. Response headers are in either 6682 // *ListNoteOccurrencesResponse.ServerResponse.Header or (if a response was 6683 // returned at all) in error.(*googleapi.Error).Header. Use 6684 // googleapi.IsNotModified to check whether the returned error was because 6685 // http.StatusNotModified was returned. 6686 func (c *ProjectsLocationsNotesOccurrencesListCall) Do(opts ...googleapi.CallOption) (*ListNoteOccurrencesResponse, error) { 6687 gensupport.SetOptions(c.urlParams_, opts...) 6688 res, err := c.doRequest("json") 6689 if res != nil && res.StatusCode == http.StatusNotModified { 6690 if res.Body != nil { 6691 res.Body.Close() 6692 } 6693 return nil, gensupport.WrapError(&googleapi.Error{ 6694 Code: res.StatusCode, 6695 Header: res.Header, 6696 }) 6697 } 6698 if err != nil { 6699 return nil, err 6700 } 6701 defer googleapi.CloseBody(res) 6702 if err := googleapi.CheckResponse(res); err != nil { 6703 return nil, gensupport.WrapError(err) 6704 } 6705 ret := &ListNoteOccurrencesResponse{ 6706 ServerResponse: googleapi.ServerResponse{ 6707 Header: res.Header, 6708 HTTPStatusCode: res.StatusCode, 6709 }, 6710 } 6711 target := &ret 6712 if err := gensupport.DecodeResponse(target, res); err != nil { 6713 return nil, err 6714 } 6715 return ret, nil 6716 } 6717 6718 // Pages invokes f for each page of results. 6719 // A non-nil error returned from f will halt the iteration. 6720 // The provided context supersedes any context provided to the Context method. 6721 func (c *ProjectsLocationsNotesOccurrencesListCall) Pages(ctx context.Context, f func(*ListNoteOccurrencesResponse) error) error { 6722 c.ctx_ = ctx 6723 defer c.PageToken(c.urlParams_.Get("pageToken")) 6724 for { 6725 x, err := c.Do() 6726 if err != nil { 6727 return err 6728 } 6729 if err := f(x); err != nil { 6730 return err 6731 } 6732 if x.NextPageToken == "" { 6733 return nil 6734 } 6735 c.PageToken(x.NextPageToken) 6736 } 6737 } 6738 6739 type ProjectsLocationsOccurrencesGetCall struct { 6740 s *Service 6741 name string 6742 urlParams_ gensupport.URLParams 6743 ifNoneMatch_ string 6744 ctx_ context.Context 6745 header_ http.Header 6746 } 6747 6748 // Get: Gets the specified occurrence. 6749 // 6750 // - name: The name of the occurrence in the form of 6751 // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. 6752 func (r *ProjectsLocationsOccurrencesService) Get(name string) *ProjectsLocationsOccurrencesGetCall { 6753 c := &ProjectsLocationsOccurrencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6754 c.name = name 6755 return c 6756 } 6757 6758 // Fields allows partial responses to be retrieved. See 6759 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6760 // details. 6761 func (c *ProjectsLocationsOccurrencesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesGetCall { 6762 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6763 return c 6764 } 6765 6766 // IfNoneMatch sets an optional parameter which makes the operation fail if the 6767 // object's ETag matches the given value. This is useful for getting updates 6768 // only after the object has changed since the last request. 6769 func (c *ProjectsLocationsOccurrencesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOccurrencesGetCall { 6770 c.ifNoneMatch_ = entityTag 6771 return c 6772 } 6773 6774 // Context sets the context to be used in this call's Do method. 6775 func (c *ProjectsLocationsOccurrencesGetCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesGetCall { 6776 c.ctx_ = ctx 6777 return c 6778 } 6779 6780 // Header returns a http.Header that can be modified by the caller to add 6781 // headers to the request. 6782 func (c *ProjectsLocationsOccurrencesGetCall) Header() http.Header { 6783 if c.header_ == nil { 6784 c.header_ = make(http.Header) 6785 } 6786 return c.header_ 6787 } 6788 6789 func (c *ProjectsLocationsOccurrencesGetCall) doRequest(alt string) (*http.Response, error) { 6790 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 6791 if c.ifNoneMatch_ != "" { 6792 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6793 } 6794 var body io.Reader = nil 6795 c.urlParams_.Set("alt", alt) 6796 c.urlParams_.Set("prettyPrint", "false") 6797 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 6798 urls += "?" + c.urlParams_.Encode() 6799 req, err := http.NewRequest("GET", urls, body) 6800 if err != nil { 6801 return nil, err 6802 } 6803 req.Header = reqHeaders 6804 googleapi.Expand(req.URL, map[string]string{ 6805 "name": c.name, 6806 }) 6807 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6808 } 6809 6810 // Do executes the "containeranalysis.projects.locations.occurrences.get" call. 6811 // Any non-2xx status code is an error. Response headers are in either 6812 // *Occurrence.ServerResponse.Header or (if a response was returned at all) in 6813 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6814 // whether the returned error was because http.StatusNotModified was returned. 6815 func (c *ProjectsLocationsOccurrencesGetCall) Do(opts ...googleapi.CallOption) (*Occurrence, error) { 6816 gensupport.SetOptions(c.urlParams_, opts...) 6817 res, err := c.doRequest("json") 6818 if res != nil && res.StatusCode == http.StatusNotModified { 6819 if res.Body != nil { 6820 res.Body.Close() 6821 } 6822 return nil, gensupport.WrapError(&googleapi.Error{ 6823 Code: res.StatusCode, 6824 Header: res.Header, 6825 }) 6826 } 6827 if err != nil { 6828 return nil, err 6829 } 6830 defer googleapi.CloseBody(res) 6831 if err := googleapi.CheckResponse(res); err != nil { 6832 return nil, gensupport.WrapError(err) 6833 } 6834 ret := &Occurrence{ 6835 ServerResponse: googleapi.ServerResponse{ 6836 Header: res.Header, 6837 HTTPStatusCode: res.StatusCode, 6838 }, 6839 } 6840 target := &ret 6841 if err := gensupport.DecodeResponse(target, res); err != nil { 6842 return nil, err 6843 } 6844 return ret, nil 6845 } 6846 6847 type ProjectsLocationsOccurrencesGetNotesCall struct { 6848 s *Service 6849 name string 6850 urlParams_ gensupport.URLParams 6851 ifNoneMatch_ string 6852 ctx_ context.Context 6853 header_ http.Header 6854 } 6855 6856 // GetNotes: Gets the note attached to the specified occurrence. Consumer 6857 // projects can use this method to get a note that belongs to a provider 6858 // project. 6859 // 6860 // - name: The name of the occurrence in the form of 6861 // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. 6862 func (r *ProjectsLocationsOccurrencesService) GetNotes(name string) *ProjectsLocationsOccurrencesGetNotesCall { 6863 c := &ProjectsLocationsOccurrencesGetNotesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6864 c.name = name 6865 return c 6866 } 6867 6868 // Fields allows partial responses to be retrieved. See 6869 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6870 // details. 6871 func (c *ProjectsLocationsOccurrencesGetNotesCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesGetNotesCall { 6872 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6873 return c 6874 } 6875 6876 // IfNoneMatch sets an optional parameter which makes the operation fail if the 6877 // object's ETag matches the given value. This is useful for getting updates 6878 // only after the object has changed since the last request. 6879 func (c *ProjectsLocationsOccurrencesGetNotesCall) IfNoneMatch(entityTag string) *ProjectsLocationsOccurrencesGetNotesCall { 6880 c.ifNoneMatch_ = entityTag 6881 return c 6882 } 6883 6884 // Context sets the context to be used in this call's Do method. 6885 func (c *ProjectsLocationsOccurrencesGetNotesCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesGetNotesCall { 6886 c.ctx_ = ctx 6887 return c 6888 } 6889 6890 // Header returns a http.Header that can be modified by the caller to add 6891 // headers to the request. 6892 func (c *ProjectsLocationsOccurrencesGetNotesCall) Header() http.Header { 6893 if c.header_ == nil { 6894 c.header_ = make(http.Header) 6895 } 6896 return c.header_ 6897 } 6898 6899 func (c *ProjectsLocationsOccurrencesGetNotesCall) doRequest(alt string) (*http.Response, error) { 6900 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 6901 if c.ifNoneMatch_ != "" { 6902 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6903 } 6904 var body io.Reader = nil 6905 c.urlParams_.Set("alt", alt) 6906 c.urlParams_.Set("prettyPrint", "false") 6907 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/notes") 6908 urls += "?" + c.urlParams_.Encode() 6909 req, err := http.NewRequest("GET", urls, body) 6910 if err != nil { 6911 return nil, err 6912 } 6913 req.Header = reqHeaders 6914 googleapi.Expand(req.URL, map[string]string{ 6915 "name": c.name, 6916 }) 6917 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6918 } 6919 6920 // Do executes the "containeranalysis.projects.locations.occurrences.getNotes" call. 6921 // Any non-2xx status code is an error. Response headers are in either 6922 // *Note.ServerResponse.Header or (if a response was returned at all) in 6923 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6924 // whether the returned error was because http.StatusNotModified was returned. 6925 func (c *ProjectsLocationsOccurrencesGetNotesCall) Do(opts ...googleapi.CallOption) (*Note, error) { 6926 gensupport.SetOptions(c.urlParams_, opts...) 6927 res, err := c.doRequest("json") 6928 if res != nil && res.StatusCode == http.StatusNotModified { 6929 if res.Body != nil { 6930 res.Body.Close() 6931 } 6932 return nil, gensupport.WrapError(&googleapi.Error{ 6933 Code: res.StatusCode, 6934 Header: res.Header, 6935 }) 6936 } 6937 if err != nil { 6938 return nil, err 6939 } 6940 defer googleapi.CloseBody(res) 6941 if err := googleapi.CheckResponse(res); err != nil { 6942 return nil, gensupport.WrapError(err) 6943 } 6944 ret := &Note{ 6945 ServerResponse: googleapi.ServerResponse{ 6946 Header: res.Header, 6947 HTTPStatusCode: res.StatusCode, 6948 }, 6949 } 6950 target := &ret 6951 if err := gensupport.DecodeResponse(target, res); err != nil { 6952 return nil, err 6953 } 6954 return ret, nil 6955 } 6956 6957 type ProjectsLocationsOccurrencesGetVulnerabilitySummaryCall struct { 6958 s *Service 6959 parent string 6960 urlParams_ gensupport.URLParams 6961 ifNoneMatch_ string 6962 ctx_ context.Context 6963 header_ http.Header 6964 } 6965 6966 // GetVulnerabilitySummary: Gets a summary of the number and severity of 6967 // occurrences. 6968 // 6969 // - parent: The name of the project to get a vulnerability summary for in the 6970 // form of `projects/[PROJECT_ID]`. 6971 func (r *ProjectsLocationsOccurrencesService) GetVulnerabilitySummary(parent string) *ProjectsLocationsOccurrencesGetVulnerabilitySummaryCall { 6972 c := &ProjectsLocationsOccurrencesGetVulnerabilitySummaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6973 c.parent = parent 6974 return c 6975 } 6976 6977 // Filter sets the optional parameter "filter": The filter expression. 6978 func (c *ProjectsLocationsOccurrencesGetVulnerabilitySummaryCall) Filter(filter string) *ProjectsLocationsOccurrencesGetVulnerabilitySummaryCall { 6979 c.urlParams_.Set("filter", filter) 6980 return c 6981 } 6982 6983 // Fields allows partial responses to be retrieved. See 6984 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6985 // details. 6986 func (c *ProjectsLocationsOccurrencesGetVulnerabilitySummaryCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesGetVulnerabilitySummaryCall { 6987 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6988 return c 6989 } 6990 6991 // IfNoneMatch sets an optional parameter which makes the operation fail if the 6992 // object's ETag matches the given value. This is useful for getting updates 6993 // only after the object has changed since the last request. 6994 func (c *ProjectsLocationsOccurrencesGetVulnerabilitySummaryCall) IfNoneMatch(entityTag string) *ProjectsLocationsOccurrencesGetVulnerabilitySummaryCall { 6995 c.ifNoneMatch_ = entityTag 6996 return c 6997 } 6998 6999 // Context sets the context to be used in this call's Do method. 7000 func (c *ProjectsLocationsOccurrencesGetVulnerabilitySummaryCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesGetVulnerabilitySummaryCall { 7001 c.ctx_ = ctx 7002 return c 7003 } 7004 7005 // Header returns a http.Header that can be modified by the caller to add 7006 // headers to the request. 7007 func (c *ProjectsLocationsOccurrencesGetVulnerabilitySummaryCall) Header() http.Header { 7008 if c.header_ == nil { 7009 c.header_ = make(http.Header) 7010 } 7011 return c.header_ 7012 } 7013 7014 func (c *ProjectsLocationsOccurrencesGetVulnerabilitySummaryCall) doRequest(alt string) (*http.Response, error) { 7015 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7016 if c.ifNoneMatch_ != "" { 7017 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7018 } 7019 var body io.Reader = nil 7020 c.urlParams_.Set("alt", alt) 7021 c.urlParams_.Set("prettyPrint", "false") 7022 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/occurrences:vulnerabilitySummary") 7023 urls += "?" + c.urlParams_.Encode() 7024 req, err := http.NewRequest("GET", urls, body) 7025 if err != nil { 7026 return nil, err 7027 } 7028 req.Header = reqHeaders 7029 googleapi.Expand(req.URL, map[string]string{ 7030 "parent": c.parent, 7031 }) 7032 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7033 } 7034 7035 // Do executes the "containeranalysis.projects.locations.occurrences.getVulnerabilitySummary" call. 7036 // Any non-2xx status code is an error. Response headers are in either 7037 // *VulnerabilityOccurrencesSummary.ServerResponse.Header or (if a response was 7038 // returned at all) in error.(*googleapi.Error).Header. Use 7039 // googleapi.IsNotModified to check whether the returned error was because 7040 // http.StatusNotModified was returned. 7041 func (c *ProjectsLocationsOccurrencesGetVulnerabilitySummaryCall) Do(opts ...googleapi.CallOption) (*VulnerabilityOccurrencesSummary, error) { 7042 gensupport.SetOptions(c.urlParams_, opts...) 7043 res, err := c.doRequest("json") 7044 if res != nil && res.StatusCode == http.StatusNotModified { 7045 if res.Body != nil { 7046 res.Body.Close() 7047 } 7048 return nil, gensupport.WrapError(&googleapi.Error{ 7049 Code: res.StatusCode, 7050 Header: res.Header, 7051 }) 7052 } 7053 if err != nil { 7054 return nil, err 7055 } 7056 defer googleapi.CloseBody(res) 7057 if err := googleapi.CheckResponse(res); err != nil { 7058 return nil, gensupport.WrapError(err) 7059 } 7060 ret := &VulnerabilityOccurrencesSummary{ 7061 ServerResponse: googleapi.ServerResponse{ 7062 Header: res.Header, 7063 HTTPStatusCode: res.StatusCode, 7064 }, 7065 } 7066 target := &ret 7067 if err := gensupport.DecodeResponse(target, res); err != nil { 7068 return nil, err 7069 } 7070 return ret, nil 7071 } 7072 7073 type ProjectsLocationsOccurrencesListCall struct { 7074 s *Service 7075 parent string 7076 urlParams_ gensupport.URLParams 7077 ifNoneMatch_ string 7078 ctx_ context.Context 7079 header_ http.Header 7080 } 7081 7082 // List: Lists occurrences for the specified project. 7083 // 7084 // - parent: The name of the project to list occurrences for in the form of 7085 // `projects/[PROJECT_ID]`. 7086 func (r *ProjectsLocationsOccurrencesService) List(parent string) *ProjectsLocationsOccurrencesListCall { 7087 c := &ProjectsLocationsOccurrencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7088 c.parent = parent 7089 return c 7090 } 7091 7092 // Filter sets the optional parameter "filter": The filter expression. 7093 func (c *ProjectsLocationsOccurrencesListCall) Filter(filter string) *ProjectsLocationsOccurrencesListCall { 7094 c.urlParams_.Set("filter", filter) 7095 return c 7096 } 7097 7098 // PageSize sets the optional parameter "pageSize": Number of occurrences to 7099 // return in the list. Must be positive. Max allowed page size is 1000. If not 7100 // specified, page size defaults to 20. 7101 func (c *ProjectsLocationsOccurrencesListCall) PageSize(pageSize int64) *ProjectsLocationsOccurrencesListCall { 7102 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7103 return c 7104 } 7105 7106 // PageToken sets the optional parameter "pageToken": Token to provide to skip 7107 // to a particular spot in the list. 7108 func (c *ProjectsLocationsOccurrencesListCall) PageToken(pageToken string) *ProjectsLocationsOccurrencesListCall { 7109 c.urlParams_.Set("pageToken", pageToken) 7110 return c 7111 } 7112 7113 // Fields allows partial responses to be retrieved. See 7114 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7115 // details. 7116 func (c *ProjectsLocationsOccurrencesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesListCall { 7117 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7118 return c 7119 } 7120 7121 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7122 // object's ETag matches the given value. This is useful for getting updates 7123 // only after the object has changed since the last request. 7124 func (c *ProjectsLocationsOccurrencesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOccurrencesListCall { 7125 c.ifNoneMatch_ = entityTag 7126 return c 7127 } 7128 7129 // Context sets the context to be used in this call's Do method. 7130 func (c *ProjectsLocationsOccurrencesListCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesListCall { 7131 c.ctx_ = ctx 7132 return c 7133 } 7134 7135 // Header returns a http.Header that can be modified by the caller to add 7136 // headers to the request. 7137 func (c *ProjectsLocationsOccurrencesListCall) Header() http.Header { 7138 if c.header_ == nil { 7139 c.header_ = make(http.Header) 7140 } 7141 return c.header_ 7142 } 7143 7144 func (c *ProjectsLocationsOccurrencesListCall) doRequest(alt string) (*http.Response, error) { 7145 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7146 if c.ifNoneMatch_ != "" { 7147 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7148 } 7149 var body io.Reader = nil 7150 c.urlParams_.Set("alt", alt) 7151 c.urlParams_.Set("prettyPrint", "false") 7152 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/occurrences") 7153 urls += "?" + c.urlParams_.Encode() 7154 req, err := http.NewRequest("GET", urls, body) 7155 if err != nil { 7156 return nil, err 7157 } 7158 req.Header = reqHeaders 7159 googleapi.Expand(req.URL, map[string]string{ 7160 "parent": c.parent, 7161 }) 7162 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7163 } 7164 7165 // Do executes the "containeranalysis.projects.locations.occurrences.list" call. 7166 // Any non-2xx status code is an error. Response headers are in either 7167 // *ListOccurrencesResponse.ServerResponse.Header or (if a response was 7168 // returned at all) in error.(*googleapi.Error).Header. Use 7169 // googleapi.IsNotModified to check whether the returned error was because 7170 // http.StatusNotModified was returned. 7171 func (c *ProjectsLocationsOccurrencesListCall) Do(opts ...googleapi.CallOption) (*ListOccurrencesResponse, error) { 7172 gensupport.SetOptions(c.urlParams_, opts...) 7173 res, err := c.doRequest("json") 7174 if res != nil && res.StatusCode == http.StatusNotModified { 7175 if res.Body != nil { 7176 res.Body.Close() 7177 } 7178 return nil, gensupport.WrapError(&googleapi.Error{ 7179 Code: res.StatusCode, 7180 Header: res.Header, 7181 }) 7182 } 7183 if err != nil { 7184 return nil, err 7185 } 7186 defer googleapi.CloseBody(res) 7187 if err := googleapi.CheckResponse(res); err != nil { 7188 return nil, gensupport.WrapError(err) 7189 } 7190 ret := &ListOccurrencesResponse{ 7191 ServerResponse: googleapi.ServerResponse{ 7192 Header: res.Header, 7193 HTTPStatusCode: res.StatusCode, 7194 }, 7195 } 7196 target := &ret 7197 if err := gensupport.DecodeResponse(target, res); err != nil { 7198 return nil, err 7199 } 7200 return ret, nil 7201 } 7202 7203 // Pages invokes f for each page of results. 7204 // A non-nil error returned from f will halt the iteration. 7205 // The provided context supersedes any context provided to the Context method. 7206 func (c *ProjectsLocationsOccurrencesListCall) Pages(ctx context.Context, f func(*ListOccurrencesResponse) error) error { 7207 c.ctx_ = ctx 7208 defer c.PageToken(c.urlParams_.Get("pageToken")) 7209 for { 7210 x, err := c.Do() 7211 if err != nil { 7212 return err 7213 } 7214 if err := f(x); err != nil { 7215 return err 7216 } 7217 if x.NextPageToken == "" { 7218 return nil 7219 } 7220 c.PageToken(x.NextPageToken) 7221 } 7222 } 7223 7224 type ProjectsLocationsResourcesExportSBOMCall struct { 7225 s *Service 7226 name string 7227 exportsbomrequest *ExportSBOMRequest 7228 urlParams_ gensupport.URLParams 7229 ctx_ context.Context 7230 header_ http.Header 7231 } 7232 7233 // ExportSBOM: Generates an SBOM for the given resource. 7234 // 7235 // - name: The name of the resource in the form of 7236 // `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`. 7237 func (r *ProjectsLocationsResourcesService) ExportSBOM(name string, exportsbomrequest *ExportSBOMRequest) *ProjectsLocationsResourcesExportSBOMCall { 7238 c := &ProjectsLocationsResourcesExportSBOMCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7239 c.name = name 7240 c.exportsbomrequest = exportsbomrequest 7241 return c 7242 } 7243 7244 // Fields allows partial responses to be retrieved. See 7245 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7246 // details. 7247 func (c *ProjectsLocationsResourcesExportSBOMCall) Fields(s ...googleapi.Field) *ProjectsLocationsResourcesExportSBOMCall { 7248 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7249 return c 7250 } 7251 7252 // Context sets the context to be used in this call's Do method. 7253 func (c *ProjectsLocationsResourcesExportSBOMCall) Context(ctx context.Context) *ProjectsLocationsResourcesExportSBOMCall { 7254 c.ctx_ = ctx 7255 return c 7256 } 7257 7258 // Header returns a http.Header that can be modified by the caller to add 7259 // headers to the request. 7260 func (c *ProjectsLocationsResourcesExportSBOMCall) Header() http.Header { 7261 if c.header_ == nil { 7262 c.header_ = make(http.Header) 7263 } 7264 return c.header_ 7265 } 7266 7267 func (c *ProjectsLocationsResourcesExportSBOMCall) doRequest(alt string) (*http.Response, error) { 7268 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7269 var body io.Reader = nil 7270 body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportsbomrequest) 7271 if err != nil { 7272 return nil, err 7273 } 7274 c.urlParams_.Set("alt", alt) 7275 c.urlParams_.Set("prettyPrint", "false") 7276 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:exportSBOM") 7277 urls += "?" + c.urlParams_.Encode() 7278 req, err := http.NewRequest("POST", urls, body) 7279 if err != nil { 7280 return nil, err 7281 } 7282 req.Header = reqHeaders 7283 googleapi.Expand(req.URL, map[string]string{ 7284 "name": c.name, 7285 }) 7286 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7287 } 7288 7289 // Do executes the "containeranalysis.projects.locations.resources.exportSBOM" call. 7290 // Any non-2xx status code is an error. Response headers are in either 7291 // *ExportSBOMResponse.ServerResponse.Header or (if a response was returned at 7292 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7293 // check whether the returned error was because http.StatusNotModified was 7294 // returned. 7295 func (c *ProjectsLocationsResourcesExportSBOMCall) Do(opts ...googleapi.CallOption) (*ExportSBOMResponse, error) { 7296 gensupport.SetOptions(c.urlParams_, opts...) 7297 res, err := c.doRequest("json") 7298 if res != nil && res.StatusCode == http.StatusNotModified { 7299 if res.Body != nil { 7300 res.Body.Close() 7301 } 7302 return nil, gensupport.WrapError(&googleapi.Error{ 7303 Code: res.StatusCode, 7304 Header: res.Header, 7305 }) 7306 } 7307 if err != nil { 7308 return nil, err 7309 } 7310 defer googleapi.CloseBody(res) 7311 if err := googleapi.CheckResponse(res); err != nil { 7312 return nil, gensupport.WrapError(err) 7313 } 7314 ret := &ExportSBOMResponse{ 7315 ServerResponse: googleapi.ServerResponse{ 7316 Header: res.Header, 7317 HTTPStatusCode: res.StatusCode, 7318 }, 7319 } 7320 target := &ret 7321 if err := gensupport.DecodeResponse(target, res); err != nil { 7322 return nil, err 7323 } 7324 return ret, nil 7325 } 7326 7327 type ProjectsNotesBatchCreateCall struct { 7328 s *Service 7329 parent string 7330 batchcreatenotesrequest *BatchCreateNotesRequest 7331 urlParams_ gensupport.URLParams 7332 ctx_ context.Context 7333 header_ http.Header 7334 } 7335 7336 // BatchCreate: Creates new notes in batch. 7337 // 7338 // - parent: The name of the project in the form of `projects/[PROJECT_ID]`, 7339 // under which the notes are to be created. 7340 func (r *ProjectsNotesService) BatchCreate(parent string, batchcreatenotesrequest *BatchCreateNotesRequest) *ProjectsNotesBatchCreateCall { 7341 c := &ProjectsNotesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7342 c.parent = parent 7343 c.batchcreatenotesrequest = batchcreatenotesrequest 7344 return c 7345 } 7346 7347 // Fields allows partial responses to be retrieved. See 7348 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7349 // details. 7350 func (c *ProjectsNotesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsNotesBatchCreateCall { 7351 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7352 return c 7353 } 7354 7355 // Context sets the context to be used in this call's Do method. 7356 func (c *ProjectsNotesBatchCreateCall) Context(ctx context.Context) *ProjectsNotesBatchCreateCall { 7357 c.ctx_ = ctx 7358 return c 7359 } 7360 7361 // Header returns a http.Header that can be modified by the caller to add 7362 // headers to the request. 7363 func (c *ProjectsNotesBatchCreateCall) Header() http.Header { 7364 if c.header_ == nil { 7365 c.header_ = make(http.Header) 7366 } 7367 return c.header_ 7368 } 7369 7370 func (c *ProjectsNotesBatchCreateCall) doRequest(alt string) (*http.Response, error) { 7371 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7372 var body io.Reader = nil 7373 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreatenotesrequest) 7374 if err != nil { 7375 return nil, err 7376 } 7377 c.urlParams_.Set("alt", alt) 7378 c.urlParams_.Set("prettyPrint", "false") 7379 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notes:batchCreate") 7380 urls += "?" + c.urlParams_.Encode() 7381 req, err := http.NewRequest("POST", urls, body) 7382 if err != nil { 7383 return nil, err 7384 } 7385 req.Header = reqHeaders 7386 googleapi.Expand(req.URL, map[string]string{ 7387 "parent": c.parent, 7388 }) 7389 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7390 } 7391 7392 // Do executes the "containeranalysis.projects.notes.batchCreate" call. 7393 // Any non-2xx status code is an error. Response headers are in either 7394 // *BatchCreateNotesResponse.ServerResponse.Header or (if a response was 7395 // returned at all) in error.(*googleapi.Error).Header. Use 7396 // googleapi.IsNotModified to check whether the returned error was because 7397 // http.StatusNotModified was returned. 7398 func (c *ProjectsNotesBatchCreateCall) Do(opts ...googleapi.CallOption) (*BatchCreateNotesResponse, error) { 7399 gensupport.SetOptions(c.urlParams_, opts...) 7400 res, err := c.doRequest("json") 7401 if res != nil && res.StatusCode == http.StatusNotModified { 7402 if res.Body != nil { 7403 res.Body.Close() 7404 } 7405 return nil, gensupport.WrapError(&googleapi.Error{ 7406 Code: res.StatusCode, 7407 Header: res.Header, 7408 }) 7409 } 7410 if err != nil { 7411 return nil, err 7412 } 7413 defer googleapi.CloseBody(res) 7414 if err := googleapi.CheckResponse(res); err != nil { 7415 return nil, gensupport.WrapError(err) 7416 } 7417 ret := &BatchCreateNotesResponse{ 7418 ServerResponse: googleapi.ServerResponse{ 7419 Header: res.Header, 7420 HTTPStatusCode: res.StatusCode, 7421 }, 7422 } 7423 target := &ret 7424 if err := gensupport.DecodeResponse(target, res); err != nil { 7425 return nil, err 7426 } 7427 return ret, nil 7428 } 7429 7430 type ProjectsNotesCreateCall struct { 7431 s *Service 7432 parent string 7433 note *Note 7434 urlParams_ gensupport.URLParams 7435 ctx_ context.Context 7436 header_ http.Header 7437 } 7438 7439 // Create: Creates a new note. 7440 // 7441 // - parent: The name of the project in the form of `projects/[PROJECT_ID]`, 7442 // under which the note is to be created. 7443 func (r *ProjectsNotesService) Create(parent string, note *Note) *ProjectsNotesCreateCall { 7444 c := &ProjectsNotesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7445 c.parent = parent 7446 c.note = note 7447 return c 7448 } 7449 7450 // NoteId sets the optional parameter "noteId": Required. The ID to use for 7451 // this note. 7452 func (c *ProjectsNotesCreateCall) NoteId(noteId string) *ProjectsNotesCreateCall { 7453 c.urlParams_.Set("noteId", noteId) 7454 return c 7455 } 7456 7457 // Fields allows partial responses to be retrieved. See 7458 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7459 // details. 7460 func (c *ProjectsNotesCreateCall) Fields(s ...googleapi.Field) *ProjectsNotesCreateCall { 7461 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7462 return c 7463 } 7464 7465 // Context sets the context to be used in this call's Do method. 7466 func (c *ProjectsNotesCreateCall) Context(ctx context.Context) *ProjectsNotesCreateCall { 7467 c.ctx_ = ctx 7468 return c 7469 } 7470 7471 // Header returns a http.Header that can be modified by the caller to add 7472 // headers to the request. 7473 func (c *ProjectsNotesCreateCall) Header() http.Header { 7474 if c.header_ == nil { 7475 c.header_ = make(http.Header) 7476 } 7477 return c.header_ 7478 } 7479 7480 func (c *ProjectsNotesCreateCall) doRequest(alt string) (*http.Response, error) { 7481 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7482 var body io.Reader = nil 7483 body, err := googleapi.WithoutDataWrapper.JSONReader(c.note) 7484 if err != nil { 7485 return nil, err 7486 } 7487 c.urlParams_.Set("alt", alt) 7488 c.urlParams_.Set("prettyPrint", "false") 7489 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notes") 7490 urls += "?" + c.urlParams_.Encode() 7491 req, err := http.NewRequest("POST", urls, body) 7492 if err != nil { 7493 return nil, err 7494 } 7495 req.Header = reqHeaders 7496 googleapi.Expand(req.URL, map[string]string{ 7497 "parent": c.parent, 7498 }) 7499 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7500 } 7501 7502 // Do executes the "containeranalysis.projects.notes.create" call. 7503 // Any non-2xx status code is an error. Response headers are in either 7504 // *Note.ServerResponse.Header or (if a response was returned at all) in 7505 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7506 // whether the returned error was because http.StatusNotModified was returned. 7507 func (c *ProjectsNotesCreateCall) Do(opts ...googleapi.CallOption) (*Note, error) { 7508 gensupport.SetOptions(c.urlParams_, opts...) 7509 res, err := c.doRequest("json") 7510 if res != nil && res.StatusCode == http.StatusNotModified { 7511 if res.Body != nil { 7512 res.Body.Close() 7513 } 7514 return nil, gensupport.WrapError(&googleapi.Error{ 7515 Code: res.StatusCode, 7516 Header: res.Header, 7517 }) 7518 } 7519 if err != nil { 7520 return nil, err 7521 } 7522 defer googleapi.CloseBody(res) 7523 if err := googleapi.CheckResponse(res); err != nil { 7524 return nil, gensupport.WrapError(err) 7525 } 7526 ret := &Note{ 7527 ServerResponse: googleapi.ServerResponse{ 7528 Header: res.Header, 7529 HTTPStatusCode: res.StatusCode, 7530 }, 7531 } 7532 target := &ret 7533 if err := gensupport.DecodeResponse(target, res); err != nil { 7534 return nil, err 7535 } 7536 return ret, nil 7537 } 7538 7539 type ProjectsNotesDeleteCall struct { 7540 s *Service 7541 name string 7542 urlParams_ gensupport.URLParams 7543 ctx_ context.Context 7544 header_ http.Header 7545 } 7546 7547 // Delete: Deletes the specified note. 7548 // 7549 // - name: The name of the note in the form of 7550 // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. 7551 func (r *ProjectsNotesService) Delete(name string) *ProjectsNotesDeleteCall { 7552 c := &ProjectsNotesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7553 c.name = name 7554 return c 7555 } 7556 7557 // Fields allows partial responses to be retrieved. See 7558 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7559 // details. 7560 func (c *ProjectsNotesDeleteCall) Fields(s ...googleapi.Field) *ProjectsNotesDeleteCall { 7561 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7562 return c 7563 } 7564 7565 // Context sets the context to be used in this call's Do method. 7566 func (c *ProjectsNotesDeleteCall) Context(ctx context.Context) *ProjectsNotesDeleteCall { 7567 c.ctx_ = ctx 7568 return c 7569 } 7570 7571 // Header returns a http.Header that can be modified by the caller to add 7572 // headers to the request. 7573 func (c *ProjectsNotesDeleteCall) Header() http.Header { 7574 if c.header_ == nil { 7575 c.header_ = make(http.Header) 7576 } 7577 return c.header_ 7578 } 7579 7580 func (c *ProjectsNotesDeleteCall) doRequest(alt string) (*http.Response, error) { 7581 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7582 var body io.Reader = nil 7583 c.urlParams_.Set("alt", alt) 7584 c.urlParams_.Set("prettyPrint", "false") 7585 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 7586 urls += "?" + c.urlParams_.Encode() 7587 req, err := http.NewRequest("DELETE", urls, body) 7588 if err != nil { 7589 return nil, err 7590 } 7591 req.Header = reqHeaders 7592 googleapi.Expand(req.URL, map[string]string{ 7593 "name": c.name, 7594 }) 7595 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7596 } 7597 7598 // Do executes the "containeranalysis.projects.notes.delete" call. 7599 // Any non-2xx status code is an error. Response headers are in either 7600 // *Empty.ServerResponse.Header or (if a response was returned at all) in 7601 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7602 // whether the returned error was because http.StatusNotModified was returned. 7603 func (c *ProjectsNotesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 7604 gensupport.SetOptions(c.urlParams_, opts...) 7605 res, err := c.doRequest("json") 7606 if res != nil && res.StatusCode == http.StatusNotModified { 7607 if res.Body != nil { 7608 res.Body.Close() 7609 } 7610 return nil, gensupport.WrapError(&googleapi.Error{ 7611 Code: res.StatusCode, 7612 Header: res.Header, 7613 }) 7614 } 7615 if err != nil { 7616 return nil, err 7617 } 7618 defer googleapi.CloseBody(res) 7619 if err := googleapi.CheckResponse(res); err != nil { 7620 return nil, gensupport.WrapError(err) 7621 } 7622 ret := &Empty{ 7623 ServerResponse: googleapi.ServerResponse{ 7624 Header: res.Header, 7625 HTTPStatusCode: res.StatusCode, 7626 }, 7627 } 7628 target := &ret 7629 if err := gensupport.DecodeResponse(target, res); err != nil { 7630 return nil, err 7631 } 7632 return ret, nil 7633 } 7634 7635 type ProjectsNotesGetCall struct { 7636 s *Service 7637 name string 7638 urlParams_ gensupport.URLParams 7639 ifNoneMatch_ string 7640 ctx_ context.Context 7641 header_ http.Header 7642 } 7643 7644 // Get: Gets the specified note. 7645 // 7646 // - name: The name of the note in the form of 7647 // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. 7648 func (r *ProjectsNotesService) Get(name string) *ProjectsNotesGetCall { 7649 c := &ProjectsNotesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7650 c.name = name 7651 return c 7652 } 7653 7654 // Fields allows partial responses to be retrieved. See 7655 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7656 // details. 7657 func (c *ProjectsNotesGetCall) Fields(s ...googleapi.Field) *ProjectsNotesGetCall { 7658 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7659 return c 7660 } 7661 7662 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7663 // object's ETag matches the given value. This is useful for getting updates 7664 // only after the object has changed since the last request. 7665 func (c *ProjectsNotesGetCall) IfNoneMatch(entityTag string) *ProjectsNotesGetCall { 7666 c.ifNoneMatch_ = entityTag 7667 return c 7668 } 7669 7670 // Context sets the context to be used in this call's Do method. 7671 func (c *ProjectsNotesGetCall) Context(ctx context.Context) *ProjectsNotesGetCall { 7672 c.ctx_ = ctx 7673 return c 7674 } 7675 7676 // Header returns a http.Header that can be modified by the caller to add 7677 // headers to the request. 7678 func (c *ProjectsNotesGetCall) Header() http.Header { 7679 if c.header_ == nil { 7680 c.header_ = make(http.Header) 7681 } 7682 return c.header_ 7683 } 7684 7685 func (c *ProjectsNotesGetCall) doRequest(alt string) (*http.Response, error) { 7686 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7687 if c.ifNoneMatch_ != "" { 7688 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7689 } 7690 var body io.Reader = nil 7691 c.urlParams_.Set("alt", alt) 7692 c.urlParams_.Set("prettyPrint", "false") 7693 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 7694 urls += "?" + c.urlParams_.Encode() 7695 req, err := http.NewRequest("GET", urls, body) 7696 if err != nil { 7697 return nil, err 7698 } 7699 req.Header = reqHeaders 7700 googleapi.Expand(req.URL, map[string]string{ 7701 "name": c.name, 7702 }) 7703 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7704 } 7705 7706 // Do executes the "containeranalysis.projects.notes.get" call. 7707 // Any non-2xx status code is an error. Response headers are in either 7708 // *Note.ServerResponse.Header or (if a response was returned at all) in 7709 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7710 // whether the returned error was because http.StatusNotModified was returned. 7711 func (c *ProjectsNotesGetCall) Do(opts ...googleapi.CallOption) (*Note, error) { 7712 gensupport.SetOptions(c.urlParams_, opts...) 7713 res, err := c.doRequest("json") 7714 if res != nil && res.StatusCode == http.StatusNotModified { 7715 if res.Body != nil { 7716 res.Body.Close() 7717 } 7718 return nil, gensupport.WrapError(&googleapi.Error{ 7719 Code: res.StatusCode, 7720 Header: res.Header, 7721 }) 7722 } 7723 if err != nil { 7724 return nil, err 7725 } 7726 defer googleapi.CloseBody(res) 7727 if err := googleapi.CheckResponse(res); err != nil { 7728 return nil, gensupport.WrapError(err) 7729 } 7730 ret := &Note{ 7731 ServerResponse: googleapi.ServerResponse{ 7732 Header: res.Header, 7733 HTTPStatusCode: res.StatusCode, 7734 }, 7735 } 7736 target := &ret 7737 if err := gensupport.DecodeResponse(target, res); err != nil { 7738 return nil, err 7739 } 7740 return ret, nil 7741 } 7742 7743 type ProjectsNotesGetIamPolicyCall struct { 7744 s *Service 7745 resource string 7746 getiampolicyrequest *GetIamPolicyRequest 7747 urlParams_ gensupport.URLParams 7748 ctx_ context.Context 7749 header_ http.Header 7750 } 7751 7752 // GetIamPolicy: Gets the access control policy for a note or an occurrence 7753 // resource. Requires `containeranalysis.notes.setIamPolicy` or 7754 // `containeranalysis.occurrences.setIamPolicy` permission if the resource is a 7755 // note or occurrence, respectively. The resource takes the format 7756 // `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and 7757 // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. 7758 // 7759 // - resource: REQUIRED: The resource for which the policy is being requested. 7760 // See Resource names (https://cloud.google.com/apis/design/resource_names) 7761 // for the appropriate value for this field. 7762 func (r *ProjectsNotesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsNotesGetIamPolicyCall { 7763 c := &ProjectsNotesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7764 c.resource = resource 7765 c.getiampolicyrequest = getiampolicyrequest 7766 return c 7767 } 7768 7769 // Fields allows partial responses to be retrieved. See 7770 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7771 // details. 7772 func (c *ProjectsNotesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsNotesGetIamPolicyCall { 7773 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7774 return c 7775 } 7776 7777 // Context sets the context to be used in this call's Do method. 7778 func (c *ProjectsNotesGetIamPolicyCall) Context(ctx context.Context) *ProjectsNotesGetIamPolicyCall { 7779 c.ctx_ = ctx 7780 return c 7781 } 7782 7783 // Header returns a http.Header that can be modified by the caller to add 7784 // headers to the request. 7785 func (c *ProjectsNotesGetIamPolicyCall) Header() http.Header { 7786 if c.header_ == nil { 7787 c.header_ = make(http.Header) 7788 } 7789 return c.header_ 7790 } 7791 7792 func (c *ProjectsNotesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 7793 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7794 var body io.Reader = nil 7795 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 7796 if err != nil { 7797 return nil, err 7798 } 7799 c.urlParams_.Set("alt", alt) 7800 c.urlParams_.Set("prettyPrint", "false") 7801 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 7802 urls += "?" + c.urlParams_.Encode() 7803 req, err := http.NewRequest("POST", urls, body) 7804 if err != nil { 7805 return nil, err 7806 } 7807 req.Header = reqHeaders 7808 googleapi.Expand(req.URL, map[string]string{ 7809 "resource": c.resource, 7810 }) 7811 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7812 } 7813 7814 // Do executes the "containeranalysis.projects.notes.getIamPolicy" call. 7815 // Any non-2xx status code is an error. Response headers are in either 7816 // *Policy.ServerResponse.Header or (if a response was returned at all) in 7817 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7818 // whether the returned error was because http.StatusNotModified was returned. 7819 func (c *ProjectsNotesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 7820 gensupport.SetOptions(c.urlParams_, opts...) 7821 res, err := c.doRequest("json") 7822 if res != nil && res.StatusCode == http.StatusNotModified { 7823 if res.Body != nil { 7824 res.Body.Close() 7825 } 7826 return nil, gensupport.WrapError(&googleapi.Error{ 7827 Code: res.StatusCode, 7828 Header: res.Header, 7829 }) 7830 } 7831 if err != nil { 7832 return nil, err 7833 } 7834 defer googleapi.CloseBody(res) 7835 if err := googleapi.CheckResponse(res); err != nil { 7836 return nil, gensupport.WrapError(err) 7837 } 7838 ret := &Policy{ 7839 ServerResponse: googleapi.ServerResponse{ 7840 Header: res.Header, 7841 HTTPStatusCode: res.StatusCode, 7842 }, 7843 } 7844 target := &ret 7845 if err := gensupport.DecodeResponse(target, res); err != nil { 7846 return nil, err 7847 } 7848 return ret, nil 7849 } 7850 7851 type ProjectsNotesListCall struct { 7852 s *Service 7853 parent string 7854 urlParams_ gensupport.URLParams 7855 ifNoneMatch_ string 7856 ctx_ context.Context 7857 header_ http.Header 7858 } 7859 7860 // List: Lists notes for the specified project. 7861 // 7862 // - parent: The name of the project to list notes for in the form of 7863 // `projects/[PROJECT_ID]`. 7864 func (r *ProjectsNotesService) List(parent string) *ProjectsNotesListCall { 7865 c := &ProjectsNotesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7866 c.parent = parent 7867 return c 7868 } 7869 7870 // Filter sets the optional parameter "filter": The filter expression. 7871 func (c *ProjectsNotesListCall) Filter(filter string) *ProjectsNotesListCall { 7872 c.urlParams_.Set("filter", filter) 7873 return c 7874 } 7875 7876 // PageSize sets the optional parameter "pageSize": Number of notes to return 7877 // in the list. Must be positive. Max allowed page size is 1000. If not 7878 // specified, page size defaults to 20. 7879 func (c *ProjectsNotesListCall) PageSize(pageSize int64) *ProjectsNotesListCall { 7880 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7881 return c 7882 } 7883 7884 // PageToken sets the optional parameter "pageToken": Token to provide to skip 7885 // to a particular spot in the list. 7886 func (c *ProjectsNotesListCall) PageToken(pageToken string) *ProjectsNotesListCall { 7887 c.urlParams_.Set("pageToken", pageToken) 7888 return c 7889 } 7890 7891 // Fields allows partial responses to be retrieved. See 7892 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7893 // details. 7894 func (c *ProjectsNotesListCall) Fields(s ...googleapi.Field) *ProjectsNotesListCall { 7895 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7896 return c 7897 } 7898 7899 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7900 // object's ETag matches the given value. This is useful for getting updates 7901 // only after the object has changed since the last request. 7902 func (c *ProjectsNotesListCall) IfNoneMatch(entityTag string) *ProjectsNotesListCall { 7903 c.ifNoneMatch_ = entityTag 7904 return c 7905 } 7906 7907 // Context sets the context to be used in this call's Do method. 7908 func (c *ProjectsNotesListCall) Context(ctx context.Context) *ProjectsNotesListCall { 7909 c.ctx_ = ctx 7910 return c 7911 } 7912 7913 // Header returns a http.Header that can be modified by the caller to add 7914 // headers to the request. 7915 func (c *ProjectsNotesListCall) Header() http.Header { 7916 if c.header_ == nil { 7917 c.header_ = make(http.Header) 7918 } 7919 return c.header_ 7920 } 7921 7922 func (c *ProjectsNotesListCall) doRequest(alt string) (*http.Response, error) { 7923 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7924 if c.ifNoneMatch_ != "" { 7925 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7926 } 7927 var body io.Reader = nil 7928 c.urlParams_.Set("alt", alt) 7929 c.urlParams_.Set("prettyPrint", "false") 7930 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notes") 7931 urls += "?" + c.urlParams_.Encode() 7932 req, err := http.NewRequest("GET", urls, body) 7933 if err != nil { 7934 return nil, err 7935 } 7936 req.Header = reqHeaders 7937 googleapi.Expand(req.URL, map[string]string{ 7938 "parent": c.parent, 7939 }) 7940 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7941 } 7942 7943 // Do executes the "containeranalysis.projects.notes.list" call. 7944 // Any non-2xx status code is an error. Response headers are in either 7945 // *ListNotesResponse.ServerResponse.Header or (if a response was returned at 7946 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7947 // check whether the returned error was because http.StatusNotModified was 7948 // returned. 7949 func (c *ProjectsNotesListCall) Do(opts ...googleapi.CallOption) (*ListNotesResponse, error) { 7950 gensupport.SetOptions(c.urlParams_, opts...) 7951 res, err := c.doRequest("json") 7952 if res != nil && res.StatusCode == http.StatusNotModified { 7953 if res.Body != nil { 7954 res.Body.Close() 7955 } 7956 return nil, gensupport.WrapError(&googleapi.Error{ 7957 Code: res.StatusCode, 7958 Header: res.Header, 7959 }) 7960 } 7961 if err != nil { 7962 return nil, err 7963 } 7964 defer googleapi.CloseBody(res) 7965 if err := googleapi.CheckResponse(res); err != nil { 7966 return nil, gensupport.WrapError(err) 7967 } 7968 ret := &ListNotesResponse{ 7969 ServerResponse: googleapi.ServerResponse{ 7970 Header: res.Header, 7971 HTTPStatusCode: res.StatusCode, 7972 }, 7973 } 7974 target := &ret 7975 if err := gensupport.DecodeResponse(target, res); err != nil { 7976 return nil, err 7977 } 7978 return ret, nil 7979 } 7980 7981 // Pages invokes f for each page of results. 7982 // A non-nil error returned from f will halt the iteration. 7983 // The provided context supersedes any context provided to the Context method. 7984 func (c *ProjectsNotesListCall) Pages(ctx context.Context, f func(*ListNotesResponse) error) error { 7985 c.ctx_ = ctx 7986 defer c.PageToken(c.urlParams_.Get("pageToken")) 7987 for { 7988 x, err := c.Do() 7989 if err != nil { 7990 return err 7991 } 7992 if err := f(x); err != nil { 7993 return err 7994 } 7995 if x.NextPageToken == "" { 7996 return nil 7997 } 7998 c.PageToken(x.NextPageToken) 7999 } 8000 } 8001 8002 type ProjectsNotesPatchCall struct { 8003 s *Service 8004 name string 8005 note *Note 8006 urlParams_ gensupport.URLParams 8007 ctx_ context.Context 8008 header_ http.Header 8009 } 8010 8011 // Patch: Updates the specified note. 8012 // 8013 // - name: The name of the note in the form of 8014 // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. 8015 func (r *ProjectsNotesService) Patch(name string, note *Note) *ProjectsNotesPatchCall { 8016 c := &ProjectsNotesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8017 c.name = name 8018 c.note = note 8019 return c 8020 } 8021 8022 // UpdateMask sets the optional parameter "updateMask": The fields to update. 8023 func (c *ProjectsNotesPatchCall) UpdateMask(updateMask string) *ProjectsNotesPatchCall { 8024 c.urlParams_.Set("updateMask", updateMask) 8025 return c 8026 } 8027 8028 // Fields allows partial responses to be retrieved. See 8029 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8030 // details. 8031 func (c *ProjectsNotesPatchCall) Fields(s ...googleapi.Field) *ProjectsNotesPatchCall { 8032 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8033 return c 8034 } 8035 8036 // Context sets the context to be used in this call's Do method. 8037 func (c *ProjectsNotesPatchCall) Context(ctx context.Context) *ProjectsNotesPatchCall { 8038 c.ctx_ = ctx 8039 return c 8040 } 8041 8042 // Header returns a http.Header that can be modified by the caller to add 8043 // headers to the request. 8044 func (c *ProjectsNotesPatchCall) Header() http.Header { 8045 if c.header_ == nil { 8046 c.header_ = make(http.Header) 8047 } 8048 return c.header_ 8049 } 8050 8051 func (c *ProjectsNotesPatchCall) doRequest(alt string) (*http.Response, error) { 8052 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8053 var body io.Reader = nil 8054 body, err := googleapi.WithoutDataWrapper.JSONReader(c.note) 8055 if err != nil { 8056 return nil, err 8057 } 8058 c.urlParams_.Set("alt", alt) 8059 c.urlParams_.Set("prettyPrint", "false") 8060 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 8061 urls += "?" + c.urlParams_.Encode() 8062 req, err := http.NewRequest("PATCH", urls, body) 8063 if err != nil { 8064 return nil, err 8065 } 8066 req.Header = reqHeaders 8067 googleapi.Expand(req.URL, map[string]string{ 8068 "name": c.name, 8069 }) 8070 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8071 } 8072 8073 // Do executes the "containeranalysis.projects.notes.patch" call. 8074 // Any non-2xx status code is an error. Response headers are in either 8075 // *Note.ServerResponse.Header or (if a response was returned at all) in 8076 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8077 // whether the returned error was because http.StatusNotModified was returned. 8078 func (c *ProjectsNotesPatchCall) Do(opts ...googleapi.CallOption) (*Note, error) { 8079 gensupport.SetOptions(c.urlParams_, opts...) 8080 res, err := c.doRequest("json") 8081 if res != nil && res.StatusCode == http.StatusNotModified { 8082 if res.Body != nil { 8083 res.Body.Close() 8084 } 8085 return nil, gensupport.WrapError(&googleapi.Error{ 8086 Code: res.StatusCode, 8087 Header: res.Header, 8088 }) 8089 } 8090 if err != nil { 8091 return nil, err 8092 } 8093 defer googleapi.CloseBody(res) 8094 if err := googleapi.CheckResponse(res); err != nil { 8095 return nil, gensupport.WrapError(err) 8096 } 8097 ret := &Note{ 8098 ServerResponse: googleapi.ServerResponse{ 8099 Header: res.Header, 8100 HTTPStatusCode: res.StatusCode, 8101 }, 8102 } 8103 target := &ret 8104 if err := gensupport.DecodeResponse(target, res); err != nil { 8105 return nil, err 8106 } 8107 return ret, nil 8108 } 8109 8110 type ProjectsNotesSetIamPolicyCall struct { 8111 s *Service 8112 resource string 8113 setiampolicyrequest *SetIamPolicyRequest 8114 urlParams_ gensupport.URLParams 8115 ctx_ context.Context 8116 header_ http.Header 8117 } 8118 8119 // SetIamPolicy: Sets the access control policy on the specified note or 8120 // occurrence. Requires `containeranalysis.notes.setIamPolicy` or 8121 // `containeranalysis.occurrences.setIamPolicy` permission if the resource is a 8122 // note or an occurrence, respectively. The resource takes the format 8123 // `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and 8124 // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. 8125 // 8126 // - resource: REQUIRED: The resource for which the policy is being specified. 8127 // See Resource names (https://cloud.google.com/apis/design/resource_names) 8128 // for the appropriate value for this field. 8129 func (r *ProjectsNotesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsNotesSetIamPolicyCall { 8130 c := &ProjectsNotesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8131 c.resource = resource 8132 c.setiampolicyrequest = setiampolicyrequest 8133 return c 8134 } 8135 8136 // Fields allows partial responses to be retrieved. See 8137 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8138 // details. 8139 func (c *ProjectsNotesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsNotesSetIamPolicyCall { 8140 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8141 return c 8142 } 8143 8144 // Context sets the context to be used in this call's Do method. 8145 func (c *ProjectsNotesSetIamPolicyCall) Context(ctx context.Context) *ProjectsNotesSetIamPolicyCall { 8146 c.ctx_ = ctx 8147 return c 8148 } 8149 8150 // Header returns a http.Header that can be modified by the caller to add 8151 // headers to the request. 8152 func (c *ProjectsNotesSetIamPolicyCall) Header() http.Header { 8153 if c.header_ == nil { 8154 c.header_ = make(http.Header) 8155 } 8156 return c.header_ 8157 } 8158 8159 func (c *ProjectsNotesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 8160 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8161 var body io.Reader = nil 8162 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 8163 if err != nil { 8164 return nil, err 8165 } 8166 c.urlParams_.Set("alt", alt) 8167 c.urlParams_.Set("prettyPrint", "false") 8168 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") 8169 urls += "?" + c.urlParams_.Encode() 8170 req, err := http.NewRequest("POST", urls, body) 8171 if err != nil { 8172 return nil, err 8173 } 8174 req.Header = reqHeaders 8175 googleapi.Expand(req.URL, map[string]string{ 8176 "resource": c.resource, 8177 }) 8178 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8179 } 8180 8181 // Do executes the "containeranalysis.projects.notes.setIamPolicy" call. 8182 // Any non-2xx status code is an error. Response headers are in either 8183 // *Policy.ServerResponse.Header or (if a response was returned at all) in 8184 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8185 // whether the returned error was because http.StatusNotModified was returned. 8186 func (c *ProjectsNotesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 8187 gensupport.SetOptions(c.urlParams_, opts...) 8188 res, err := c.doRequest("json") 8189 if res != nil && res.StatusCode == http.StatusNotModified { 8190 if res.Body != nil { 8191 res.Body.Close() 8192 } 8193 return nil, gensupport.WrapError(&googleapi.Error{ 8194 Code: res.StatusCode, 8195 Header: res.Header, 8196 }) 8197 } 8198 if err != nil { 8199 return nil, err 8200 } 8201 defer googleapi.CloseBody(res) 8202 if err := googleapi.CheckResponse(res); err != nil { 8203 return nil, gensupport.WrapError(err) 8204 } 8205 ret := &Policy{ 8206 ServerResponse: googleapi.ServerResponse{ 8207 Header: res.Header, 8208 HTTPStatusCode: res.StatusCode, 8209 }, 8210 } 8211 target := &ret 8212 if err := gensupport.DecodeResponse(target, res); err != nil { 8213 return nil, err 8214 } 8215 return ret, nil 8216 } 8217 8218 type ProjectsNotesTestIamPermissionsCall struct { 8219 s *Service 8220 resource string 8221 testiampermissionsrequest *TestIamPermissionsRequest 8222 urlParams_ gensupport.URLParams 8223 ctx_ context.Context 8224 header_ http.Header 8225 } 8226 8227 // TestIamPermissions: Returns the permissions that a caller has on the 8228 // specified note or occurrence. Requires list permission on the project (for 8229 // example, `containeranalysis.notes.list`). The resource takes the format 8230 // `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and 8231 // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. 8232 // 8233 // - resource: REQUIRED: The resource for which the policy detail is being 8234 // requested. See Resource names 8235 // (https://cloud.google.com/apis/design/resource_names) for the appropriate 8236 // value for this field. 8237 func (r *ProjectsNotesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsNotesTestIamPermissionsCall { 8238 c := &ProjectsNotesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8239 c.resource = resource 8240 c.testiampermissionsrequest = testiampermissionsrequest 8241 return c 8242 } 8243 8244 // Fields allows partial responses to be retrieved. See 8245 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8246 // details. 8247 func (c *ProjectsNotesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsNotesTestIamPermissionsCall { 8248 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8249 return c 8250 } 8251 8252 // Context sets the context to be used in this call's Do method. 8253 func (c *ProjectsNotesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsNotesTestIamPermissionsCall { 8254 c.ctx_ = ctx 8255 return c 8256 } 8257 8258 // Header returns a http.Header that can be modified by the caller to add 8259 // headers to the request. 8260 func (c *ProjectsNotesTestIamPermissionsCall) Header() http.Header { 8261 if c.header_ == nil { 8262 c.header_ = make(http.Header) 8263 } 8264 return c.header_ 8265 } 8266 8267 func (c *ProjectsNotesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 8268 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8269 var body io.Reader = nil 8270 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 8271 if err != nil { 8272 return nil, err 8273 } 8274 c.urlParams_.Set("alt", alt) 8275 c.urlParams_.Set("prettyPrint", "false") 8276 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") 8277 urls += "?" + c.urlParams_.Encode() 8278 req, err := http.NewRequest("POST", urls, body) 8279 if err != nil { 8280 return nil, err 8281 } 8282 req.Header = reqHeaders 8283 googleapi.Expand(req.URL, map[string]string{ 8284 "resource": c.resource, 8285 }) 8286 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8287 } 8288 8289 // Do executes the "containeranalysis.projects.notes.testIamPermissions" call. 8290 // Any non-2xx status code is an error. Response headers are in either 8291 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was 8292 // returned at all) in error.(*googleapi.Error).Header. Use 8293 // googleapi.IsNotModified to check whether the returned error was because 8294 // http.StatusNotModified was returned. 8295 func (c *ProjectsNotesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 8296 gensupport.SetOptions(c.urlParams_, opts...) 8297 res, err := c.doRequest("json") 8298 if res != nil && res.StatusCode == http.StatusNotModified { 8299 if res.Body != nil { 8300 res.Body.Close() 8301 } 8302 return nil, gensupport.WrapError(&googleapi.Error{ 8303 Code: res.StatusCode, 8304 Header: res.Header, 8305 }) 8306 } 8307 if err != nil { 8308 return nil, err 8309 } 8310 defer googleapi.CloseBody(res) 8311 if err := googleapi.CheckResponse(res); err != nil { 8312 return nil, gensupport.WrapError(err) 8313 } 8314 ret := &TestIamPermissionsResponse{ 8315 ServerResponse: googleapi.ServerResponse{ 8316 Header: res.Header, 8317 HTTPStatusCode: res.StatusCode, 8318 }, 8319 } 8320 target := &ret 8321 if err := gensupport.DecodeResponse(target, res); err != nil { 8322 return nil, err 8323 } 8324 return ret, nil 8325 } 8326 8327 type ProjectsNotesOccurrencesListCall struct { 8328 s *Service 8329 name string 8330 urlParams_ gensupport.URLParams 8331 ifNoneMatch_ string 8332 ctx_ context.Context 8333 header_ http.Header 8334 } 8335 8336 // List: Lists occurrences referencing the specified note. Provider projects 8337 // can use this method to get all occurrences across consumer projects 8338 // referencing the specified note. 8339 // 8340 // - name: The name of the note to list occurrences for in the form of 8341 // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. 8342 func (r *ProjectsNotesOccurrencesService) List(name string) *ProjectsNotesOccurrencesListCall { 8343 c := &ProjectsNotesOccurrencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8344 c.name = name 8345 return c 8346 } 8347 8348 // Filter sets the optional parameter "filter": The filter expression. 8349 func (c *ProjectsNotesOccurrencesListCall) Filter(filter string) *ProjectsNotesOccurrencesListCall { 8350 c.urlParams_.Set("filter", filter) 8351 return c 8352 } 8353 8354 // PageSize sets the optional parameter "pageSize": Number of occurrences to 8355 // return in the list. 8356 func (c *ProjectsNotesOccurrencesListCall) PageSize(pageSize int64) *ProjectsNotesOccurrencesListCall { 8357 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8358 return c 8359 } 8360 8361 // PageToken sets the optional parameter "pageToken": Token to provide to skip 8362 // to a particular spot in the list. 8363 func (c *ProjectsNotesOccurrencesListCall) PageToken(pageToken string) *ProjectsNotesOccurrencesListCall { 8364 c.urlParams_.Set("pageToken", pageToken) 8365 return c 8366 } 8367 8368 // Fields allows partial responses to be retrieved. See 8369 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8370 // details. 8371 func (c *ProjectsNotesOccurrencesListCall) Fields(s ...googleapi.Field) *ProjectsNotesOccurrencesListCall { 8372 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8373 return c 8374 } 8375 8376 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8377 // object's ETag matches the given value. This is useful for getting updates 8378 // only after the object has changed since the last request. 8379 func (c *ProjectsNotesOccurrencesListCall) IfNoneMatch(entityTag string) *ProjectsNotesOccurrencesListCall { 8380 c.ifNoneMatch_ = entityTag 8381 return c 8382 } 8383 8384 // Context sets the context to be used in this call's Do method. 8385 func (c *ProjectsNotesOccurrencesListCall) Context(ctx context.Context) *ProjectsNotesOccurrencesListCall { 8386 c.ctx_ = ctx 8387 return c 8388 } 8389 8390 // Header returns a http.Header that can be modified by the caller to add 8391 // headers to the request. 8392 func (c *ProjectsNotesOccurrencesListCall) Header() http.Header { 8393 if c.header_ == nil { 8394 c.header_ = make(http.Header) 8395 } 8396 return c.header_ 8397 } 8398 8399 func (c *ProjectsNotesOccurrencesListCall) doRequest(alt string) (*http.Response, error) { 8400 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8401 if c.ifNoneMatch_ != "" { 8402 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8403 } 8404 var body io.Reader = nil 8405 c.urlParams_.Set("alt", alt) 8406 c.urlParams_.Set("prettyPrint", "false") 8407 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/occurrences") 8408 urls += "?" + c.urlParams_.Encode() 8409 req, err := http.NewRequest("GET", urls, body) 8410 if err != nil { 8411 return nil, err 8412 } 8413 req.Header = reqHeaders 8414 googleapi.Expand(req.URL, map[string]string{ 8415 "name": c.name, 8416 }) 8417 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8418 } 8419 8420 // Do executes the "containeranalysis.projects.notes.occurrences.list" call. 8421 // Any non-2xx status code is an error. Response headers are in either 8422 // *ListNoteOccurrencesResponse.ServerResponse.Header or (if a response was 8423 // returned at all) in error.(*googleapi.Error).Header. Use 8424 // googleapi.IsNotModified to check whether the returned error was because 8425 // http.StatusNotModified was returned. 8426 func (c *ProjectsNotesOccurrencesListCall) Do(opts ...googleapi.CallOption) (*ListNoteOccurrencesResponse, error) { 8427 gensupport.SetOptions(c.urlParams_, opts...) 8428 res, err := c.doRequest("json") 8429 if res != nil && res.StatusCode == http.StatusNotModified { 8430 if res.Body != nil { 8431 res.Body.Close() 8432 } 8433 return nil, gensupport.WrapError(&googleapi.Error{ 8434 Code: res.StatusCode, 8435 Header: res.Header, 8436 }) 8437 } 8438 if err != nil { 8439 return nil, err 8440 } 8441 defer googleapi.CloseBody(res) 8442 if err := googleapi.CheckResponse(res); err != nil { 8443 return nil, gensupport.WrapError(err) 8444 } 8445 ret := &ListNoteOccurrencesResponse{ 8446 ServerResponse: googleapi.ServerResponse{ 8447 Header: res.Header, 8448 HTTPStatusCode: res.StatusCode, 8449 }, 8450 } 8451 target := &ret 8452 if err := gensupport.DecodeResponse(target, res); err != nil { 8453 return nil, err 8454 } 8455 return ret, nil 8456 } 8457 8458 // Pages invokes f for each page of results. 8459 // A non-nil error returned from f will halt the iteration. 8460 // The provided context supersedes any context provided to the Context method. 8461 func (c *ProjectsNotesOccurrencesListCall) Pages(ctx context.Context, f func(*ListNoteOccurrencesResponse) error) error { 8462 c.ctx_ = ctx 8463 defer c.PageToken(c.urlParams_.Get("pageToken")) 8464 for { 8465 x, err := c.Do() 8466 if err != nil { 8467 return err 8468 } 8469 if err := f(x); err != nil { 8470 return err 8471 } 8472 if x.NextPageToken == "" { 8473 return nil 8474 } 8475 c.PageToken(x.NextPageToken) 8476 } 8477 } 8478 8479 type ProjectsOccurrencesBatchCreateCall struct { 8480 s *Service 8481 parent string 8482 batchcreateoccurrencesrequest *BatchCreateOccurrencesRequest 8483 urlParams_ gensupport.URLParams 8484 ctx_ context.Context 8485 header_ http.Header 8486 } 8487 8488 // BatchCreate: Creates new occurrences in batch. 8489 // 8490 // - parent: The name of the project in the form of `projects/[PROJECT_ID]`, 8491 // under which the occurrences are to be created. 8492 func (r *ProjectsOccurrencesService) BatchCreate(parent string, batchcreateoccurrencesrequest *BatchCreateOccurrencesRequest) *ProjectsOccurrencesBatchCreateCall { 8493 c := &ProjectsOccurrencesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8494 c.parent = parent 8495 c.batchcreateoccurrencesrequest = batchcreateoccurrencesrequest 8496 return c 8497 } 8498 8499 // Fields allows partial responses to be retrieved. See 8500 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8501 // details. 8502 func (c *ProjectsOccurrencesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesBatchCreateCall { 8503 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8504 return c 8505 } 8506 8507 // Context sets the context to be used in this call's Do method. 8508 func (c *ProjectsOccurrencesBatchCreateCall) Context(ctx context.Context) *ProjectsOccurrencesBatchCreateCall { 8509 c.ctx_ = ctx 8510 return c 8511 } 8512 8513 // Header returns a http.Header that can be modified by the caller to add 8514 // headers to the request. 8515 func (c *ProjectsOccurrencesBatchCreateCall) Header() http.Header { 8516 if c.header_ == nil { 8517 c.header_ = make(http.Header) 8518 } 8519 return c.header_ 8520 } 8521 8522 func (c *ProjectsOccurrencesBatchCreateCall) doRequest(alt string) (*http.Response, error) { 8523 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8524 var body io.Reader = nil 8525 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreateoccurrencesrequest) 8526 if err != nil { 8527 return nil, err 8528 } 8529 c.urlParams_.Set("alt", alt) 8530 c.urlParams_.Set("prettyPrint", "false") 8531 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/occurrences:batchCreate") 8532 urls += "?" + c.urlParams_.Encode() 8533 req, err := http.NewRequest("POST", urls, body) 8534 if err != nil { 8535 return nil, err 8536 } 8537 req.Header = reqHeaders 8538 googleapi.Expand(req.URL, map[string]string{ 8539 "parent": c.parent, 8540 }) 8541 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8542 } 8543 8544 // Do executes the "containeranalysis.projects.occurrences.batchCreate" call. 8545 // Any non-2xx status code is an error. Response headers are in either 8546 // *BatchCreateOccurrencesResponse.ServerResponse.Header or (if a response was 8547 // returned at all) in error.(*googleapi.Error).Header. Use 8548 // googleapi.IsNotModified to check whether the returned error was because 8549 // http.StatusNotModified was returned. 8550 func (c *ProjectsOccurrencesBatchCreateCall) Do(opts ...googleapi.CallOption) (*BatchCreateOccurrencesResponse, error) { 8551 gensupport.SetOptions(c.urlParams_, opts...) 8552 res, err := c.doRequest("json") 8553 if res != nil && res.StatusCode == http.StatusNotModified { 8554 if res.Body != nil { 8555 res.Body.Close() 8556 } 8557 return nil, gensupport.WrapError(&googleapi.Error{ 8558 Code: res.StatusCode, 8559 Header: res.Header, 8560 }) 8561 } 8562 if err != nil { 8563 return nil, err 8564 } 8565 defer googleapi.CloseBody(res) 8566 if err := googleapi.CheckResponse(res); err != nil { 8567 return nil, gensupport.WrapError(err) 8568 } 8569 ret := &BatchCreateOccurrencesResponse{ 8570 ServerResponse: googleapi.ServerResponse{ 8571 Header: res.Header, 8572 HTTPStatusCode: res.StatusCode, 8573 }, 8574 } 8575 target := &ret 8576 if err := gensupport.DecodeResponse(target, res); err != nil { 8577 return nil, err 8578 } 8579 return ret, nil 8580 } 8581 8582 type ProjectsOccurrencesCreateCall struct { 8583 s *Service 8584 parent string 8585 occurrence *Occurrence 8586 urlParams_ gensupport.URLParams 8587 ctx_ context.Context 8588 header_ http.Header 8589 } 8590 8591 // Create: Creates a new occurrence. 8592 // 8593 // - parent: The name of the project in the form of `projects/[PROJECT_ID]`, 8594 // under which the occurrence is to be created. 8595 func (r *ProjectsOccurrencesService) Create(parent string, occurrence *Occurrence) *ProjectsOccurrencesCreateCall { 8596 c := &ProjectsOccurrencesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8597 c.parent = parent 8598 c.occurrence = occurrence 8599 return c 8600 } 8601 8602 // Fields allows partial responses to be retrieved. See 8603 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8604 // details. 8605 func (c *ProjectsOccurrencesCreateCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesCreateCall { 8606 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8607 return c 8608 } 8609 8610 // Context sets the context to be used in this call's Do method. 8611 func (c *ProjectsOccurrencesCreateCall) Context(ctx context.Context) *ProjectsOccurrencesCreateCall { 8612 c.ctx_ = ctx 8613 return c 8614 } 8615 8616 // Header returns a http.Header that can be modified by the caller to add 8617 // headers to the request. 8618 func (c *ProjectsOccurrencesCreateCall) Header() http.Header { 8619 if c.header_ == nil { 8620 c.header_ = make(http.Header) 8621 } 8622 return c.header_ 8623 } 8624 8625 func (c *ProjectsOccurrencesCreateCall) doRequest(alt string) (*http.Response, error) { 8626 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8627 var body io.Reader = nil 8628 body, err := googleapi.WithoutDataWrapper.JSONReader(c.occurrence) 8629 if err != nil { 8630 return nil, err 8631 } 8632 c.urlParams_.Set("alt", alt) 8633 c.urlParams_.Set("prettyPrint", "false") 8634 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/occurrences") 8635 urls += "?" + c.urlParams_.Encode() 8636 req, err := http.NewRequest("POST", urls, body) 8637 if err != nil { 8638 return nil, err 8639 } 8640 req.Header = reqHeaders 8641 googleapi.Expand(req.URL, map[string]string{ 8642 "parent": c.parent, 8643 }) 8644 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8645 } 8646 8647 // Do executes the "containeranalysis.projects.occurrences.create" call. 8648 // Any non-2xx status code is an error. Response headers are in either 8649 // *Occurrence.ServerResponse.Header or (if a response was returned at all) in 8650 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8651 // whether the returned error was because http.StatusNotModified was returned. 8652 func (c *ProjectsOccurrencesCreateCall) Do(opts ...googleapi.CallOption) (*Occurrence, error) { 8653 gensupport.SetOptions(c.urlParams_, opts...) 8654 res, err := c.doRequest("json") 8655 if res != nil && res.StatusCode == http.StatusNotModified { 8656 if res.Body != nil { 8657 res.Body.Close() 8658 } 8659 return nil, gensupport.WrapError(&googleapi.Error{ 8660 Code: res.StatusCode, 8661 Header: res.Header, 8662 }) 8663 } 8664 if err != nil { 8665 return nil, err 8666 } 8667 defer googleapi.CloseBody(res) 8668 if err := googleapi.CheckResponse(res); err != nil { 8669 return nil, gensupport.WrapError(err) 8670 } 8671 ret := &Occurrence{ 8672 ServerResponse: googleapi.ServerResponse{ 8673 Header: res.Header, 8674 HTTPStatusCode: res.StatusCode, 8675 }, 8676 } 8677 target := &ret 8678 if err := gensupport.DecodeResponse(target, res); err != nil { 8679 return nil, err 8680 } 8681 return ret, nil 8682 } 8683 8684 type ProjectsOccurrencesDeleteCall struct { 8685 s *Service 8686 name string 8687 urlParams_ gensupport.URLParams 8688 ctx_ context.Context 8689 header_ http.Header 8690 } 8691 8692 // Delete: Deletes the specified occurrence. For example, use this method to 8693 // delete an occurrence when the occurrence is no longer applicable for the 8694 // given resource. 8695 // 8696 // - name: The name of the occurrence in the form of 8697 // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. 8698 func (r *ProjectsOccurrencesService) Delete(name string) *ProjectsOccurrencesDeleteCall { 8699 c := &ProjectsOccurrencesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8700 c.name = name 8701 return c 8702 } 8703 8704 // Fields allows partial responses to be retrieved. See 8705 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8706 // details. 8707 func (c *ProjectsOccurrencesDeleteCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesDeleteCall { 8708 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8709 return c 8710 } 8711 8712 // Context sets the context to be used in this call's Do method. 8713 func (c *ProjectsOccurrencesDeleteCall) Context(ctx context.Context) *ProjectsOccurrencesDeleteCall { 8714 c.ctx_ = ctx 8715 return c 8716 } 8717 8718 // Header returns a http.Header that can be modified by the caller to add 8719 // headers to the request. 8720 func (c *ProjectsOccurrencesDeleteCall) Header() http.Header { 8721 if c.header_ == nil { 8722 c.header_ = make(http.Header) 8723 } 8724 return c.header_ 8725 } 8726 8727 func (c *ProjectsOccurrencesDeleteCall) doRequest(alt string) (*http.Response, error) { 8728 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8729 var body io.Reader = nil 8730 c.urlParams_.Set("alt", alt) 8731 c.urlParams_.Set("prettyPrint", "false") 8732 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 8733 urls += "?" + c.urlParams_.Encode() 8734 req, err := http.NewRequest("DELETE", urls, body) 8735 if err != nil { 8736 return nil, err 8737 } 8738 req.Header = reqHeaders 8739 googleapi.Expand(req.URL, map[string]string{ 8740 "name": c.name, 8741 }) 8742 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8743 } 8744 8745 // Do executes the "containeranalysis.projects.occurrences.delete" call. 8746 // Any non-2xx status code is an error. Response headers are in either 8747 // *Empty.ServerResponse.Header or (if a response was returned at all) in 8748 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8749 // whether the returned error was because http.StatusNotModified was returned. 8750 func (c *ProjectsOccurrencesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 8751 gensupport.SetOptions(c.urlParams_, opts...) 8752 res, err := c.doRequest("json") 8753 if res != nil && res.StatusCode == http.StatusNotModified { 8754 if res.Body != nil { 8755 res.Body.Close() 8756 } 8757 return nil, gensupport.WrapError(&googleapi.Error{ 8758 Code: res.StatusCode, 8759 Header: res.Header, 8760 }) 8761 } 8762 if err != nil { 8763 return nil, err 8764 } 8765 defer googleapi.CloseBody(res) 8766 if err := googleapi.CheckResponse(res); err != nil { 8767 return nil, gensupport.WrapError(err) 8768 } 8769 ret := &Empty{ 8770 ServerResponse: googleapi.ServerResponse{ 8771 Header: res.Header, 8772 HTTPStatusCode: res.StatusCode, 8773 }, 8774 } 8775 target := &ret 8776 if err := gensupport.DecodeResponse(target, res); err != nil { 8777 return nil, err 8778 } 8779 return ret, nil 8780 } 8781 8782 type ProjectsOccurrencesGetCall struct { 8783 s *Service 8784 name string 8785 urlParams_ gensupport.URLParams 8786 ifNoneMatch_ string 8787 ctx_ context.Context 8788 header_ http.Header 8789 } 8790 8791 // Get: Gets the specified occurrence. 8792 // 8793 // - name: The name of the occurrence in the form of 8794 // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. 8795 func (r *ProjectsOccurrencesService) Get(name string) *ProjectsOccurrencesGetCall { 8796 c := &ProjectsOccurrencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8797 c.name = name 8798 return c 8799 } 8800 8801 // Fields allows partial responses to be retrieved. See 8802 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8803 // details. 8804 func (c *ProjectsOccurrencesGetCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesGetCall { 8805 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8806 return c 8807 } 8808 8809 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8810 // object's ETag matches the given value. This is useful for getting updates 8811 // only after the object has changed since the last request. 8812 func (c *ProjectsOccurrencesGetCall) IfNoneMatch(entityTag string) *ProjectsOccurrencesGetCall { 8813 c.ifNoneMatch_ = entityTag 8814 return c 8815 } 8816 8817 // Context sets the context to be used in this call's Do method. 8818 func (c *ProjectsOccurrencesGetCall) Context(ctx context.Context) *ProjectsOccurrencesGetCall { 8819 c.ctx_ = ctx 8820 return c 8821 } 8822 8823 // Header returns a http.Header that can be modified by the caller to add 8824 // headers to the request. 8825 func (c *ProjectsOccurrencesGetCall) Header() http.Header { 8826 if c.header_ == nil { 8827 c.header_ = make(http.Header) 8828 } 8829 return c.header_ 8830 } 8831 8832 func (c *ProjectsOccurrencesGetCall) doRequest(alt string) (*http.Response, error) { 8833 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8834 if c.ifNoneMatch_ != "" { 8835 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8836 } 8837 var body io.Reader = nil 8838 c.urlParams_.Set("alt", alt) 8839 c.urlParams_.Set("prettyPrint", "false") 8840 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 8841 urls += "?" + c.urlParams_.Encode() 8842 req, err := http.NewRequest("GET", urls, body) 8843 if err != nil { 8844 return nil, err 8845 } 8846 req.Header = reqHeaders 8847 googleapi.Expand(req.URL, map[string]string{ 8848 "name": c.name, 8849 }) 8850 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8851 } 8852 8853 // Do executes the "containeranalysis.projects.occurrences.get" call. 8854 // Any non-2xx status code is an error. Response headers are in either 8855 // *Occurrence.ServerResponse.Header or (if a response was returned at all) in 8856 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8857 // whether the returned error was because http.StatusNotModified was returned. 8858 func (c *ProjectsOccurrencesGetCall) Do(opts ...googleapi.CallOption) (*Occurrence, error) { 8859 gensupport.SetOptions(c.urlParams_, opts...) 8860 res, err := c.doRequest("json") 8861 if res != nil && res.StatusCode == http.StatusNotModified { 8862 if res.Body != nil { 8863 res.Body.Close() 8864 } 8865 return nil, gensupport.WrapError(&googleapi.Error{ 8866 Code: res.StatusCode, 8867 Header: res.Header, 8868 }) 8869 } 8870 if err != nil { 8871 return nil, err 8872 } 8873 defer googleapi.CloseBody(res) 8874 if err := googleapi.CheckResponse(res); err != nil { 8875 return nil, gensupport.WrapError(err) 8876 } 8877 ret := &Occurrence{ 8878 ServerResponse: googleapi.ServerResponse{ 8879 Header: res.Header, 8880 HTTPStatusCode: res.StatusCode, 8881 }, 8882 } 8883 target := &ret 8884 if err := gensupport.DecodeResponse(target, res); err != nil { 8885 return nil, err 8886 } 8887 return ret, nil 8888 } 8889 8890 type ProjectsOccurrencesGetIamPolicyCall struct { 8891 s *Service 8892 resource string 8893 getiampolicyrequest *GetIamPolicyRequest 8894 urlParams_ gensupport.URLParams 8895 ctx_ context.Context 8896 header_ http.Header 8897 } 8898 8899 // GetIamPolicy: Gets the access control policy for a note or an occurrence 8900 // resource. Requires `containeranalysis.notes.setIamPolicy` or 8901 // `containeranalysis.occurrences.setIamPolicy` permission if the resource is a 8902 // note or occurrence, respectively. The resource takes the format 8903 // `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and 8904 // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. 8905 // 8906 // - resource: REQUIRED: The resource for which the policy is being requested. 8907 // See Resource names (https://cloud.google.com/apis/design/resource_names) 8908 // for the appropriate value for this field. 8909 func (r *ProjectsOccurrencesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsOccurrencesGetIamPolicyCall { 8910 c := &ProjectsOccurrencesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8911 c.resource = resource 8912 c.getiampolicyrequest = getiampolicyrequest 8913 return c 8914 } 8915 8916 // Fields allows partial responses to be retrieved. See 8917 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8918 // details. 8919 func (c *ProjectsOccurrencesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesGetIamPolicyCall { 8920 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8921 return c 8922 } 8923 8924 // Context sets the context to be used in this call's Do method. 8925 func (c *ProjectsOccurrencesGetIamPolicyCall) Context(ctx context.Context) *ProjectsOccurrencesGetIamPolicyCall { 8926 c.ctx_ = ctx 8927 return c 8928 } 8929 8930 // Header returns a http.Header that can be modified by the caller to add 8931 // headers to the request. 8932 func (c *ProjectsOccurrencesGetIamPolicyCall) Header() http.Header { 8933 if c.header_ == nil { 8934 c.header_ = make(http.Header) 8935 } 8936 return c.header_ 8937 } 8938 8939 func (c *ProjectsOccurrencesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 8940 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8941 var body io.Reader = nil 8942 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 8943 if err != nil { 8944 return nil, err 8945 } 8946 c.urlParams_.Set("alt", alt) 8947 c.urlParams_.Set("prettyPrint", "false") 8948 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 8949 urls += "?" + c.urlParams_.Encode() 8950 req, err := http.NewRequest("POST", urls, body) 8951 if err != nil { 8952 return nil, err 8953 } 8954 req.Header = reqHeaders 8955 googleapi.Expand(req.URL, map[string]string{ 8956 "resource": c.resource, 8957 }) 8958 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8959 } 8960 8961 // Do executes the "containeranalysis.projects.occurrences.getIamPolicy" call. 8962 // Any non-2xx status code is an error. Response headers are in either 8963 // *Policy.ServerResponse.Header or (if a response was returned at all) in 8964 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8965 // whether the returned error was because http.StatusNotModified was returned. 8966 func (c *ProjectsOccurrencesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 8967 gensupport.SetOptions(c.urlParams_, opts...) 8968 res, err := c.doRequest("json") 8969 if res != nil && res.StatusCode == http.StatusNotModified { 8970 if res.Body != nil { 8971 res.Body.Close() 8972 } 8973 return nil, gensupport.WrapError(&googleapi.Error{ 8974 Code: res.StatusCode, 8975 Header: res.Header, 8976 }) 8977 } 8978 if err != nil { 8979 return nil, err 8980 } 8981 defer googleapi.CloseBody(res) 8982 if err := googleapi.CheckResponse(res); err != nil { 8983 return nil, gensupport.WrapError(err) 8984 } 8985 ret := &Policy{ 8986 ServerResponse: googleapi.ServerResponse{ 8987 Header: res.Header, 8988 HTTPStatusCode: res.StatusCode, 8989 }, 8990 } 8991 target := &ret 8992 if err := gensupport.DecodeResponse(target, res); err != nil { 8993 return nil, err 8994 } 8995 return ret, nil 8996 } 8997 8998 type ProjectsOccurrencesGetNotesCall struct { 8999 s *Service 9000 name string 9001 urlParams_ gensupport.URLParams 9002 ifNoneMatch_ string 9003 ctx_ context.Context 9004 header_ http.Header 9005 } 9006 9007 // GetNotes: Gets the note attached to the specified occurrence. Consumer 9008 // projects can use this method to get a note that belongs to a provider 9009 // project. 9010 // 9011 // - name: The name of the occurrence in the form of 9012 // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. 9013 func (r *ProjectsOccurrencesService) GetNotes(name string) *ProjectsOccurrencesGetNotesCall { 9014 c := &ProjectsOccurrencesGetNotesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9015 c.name = name 9016 return c 9017 } 9018 9019 // Fields allows partial responses to be retrieved. See 9020 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9021 // details. 9022 func (c *ProjectsOccurrencesGetNotesCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesGetNotesCall { 9023 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9024 return c 9025 } 9026 9027 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9028 // object's ETag matches the given value. This is useful for getting updates 9029 // only after the object has changed since the last request. 9030 func (c *ProjectsOccurrencesGetNotesCall) IfNoneMatch(entityTag string) *ProjectsOccurrencesGetNotesCall { 9031 c.ifNoneMatch_ = entityTag 9032 return c 9033 } 9034 9035 // Context sets the context to be used in this call's Do method. 9036 func (c *ProjectsOccurrencesGetNotesCall) Context(ctx context.Context) *ProjectsOccurrencesGetNotesCall { 9037 c.ctx_ = ctx 9038 return c 9039 } 9040 9041 // Header returns a http.Header that can be modified by the caller to add 9042 // headers to the request. 9043 func (c *ProjectsOccurrencesGetNotesCall) Header() http.Header { 9044 if c.header_ == nil { 9045 c.header_ = make(http.Header) 9046 } 9047 return c.header_ 9048 } 9049 9050 func (c *ProjectsOccurrencesGetNotesCall) doRequest(alt string) (*http.Response, error) { 9051 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9052 if c.ifNoneMatch_ != "" { 9053 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9054 } 9055 var body io.Reader = nil 9056 c.urlParams_.Set("alt", alt) 9057 c.urlParams_.Set("prettyPrint", "false") 9058 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/notes") 9059 urls += "?" + c.urlParams_.Encode() 9060 req, err := http.NewRequest("GET", urls, body) 9061 if err != nil { 9062 return nil, err 9063 } 9064 req.Header = reqHeaders 9065 googleapi.Expand(req.URL, map[string]string{ 9066 "name": c.name, 9067 }) 9068 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9069 } 9070 9071 // Do executes the "containeranalysis.projects.occurrences.getNotes" call. 9072 // Any non-2xx status code is an error. Response headers are in either 9073 // *Note.ServerResponse.Header or (if a response was returned at all) in 9074 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9075 // whether the returned error was because http.StatusNotModified was returned. 9076 func (c *ProjectsOccurrencesGetNotesCall) Do(opts ...googleapi.CallOption) (*Note, error) { 9077 gensupport.SetOptions(c.urlParams_, opts...) 9078 res, err := c.doRequest("json") 9079 if res != nil && res.StatusCode == http.StatusNotModified { 9080 if res.Body != nil { 9081 res.Body.Close() 9082 } 9083 return nil, gensupport.WrapError(&googleapi.Error{ 9084 Code: res.StatusCode, 9085 Header: res.Header, 9086 }) 9087 } 9088 if err != nil { 9089 return nil, err 9090 } 9091 defer googleapi.CloseBody(res) 9092 if err := googleapi.CheckResponse(res); err != nil { 9093 return nil, gensupport.WrapError(err) 9094 } 9095 ret := &Note{ 9096 ServerResponse: googleapi.ServerResponse{ 9097 Header: res.Header, 9098 HTTPStatusCode: res.StatusCode, 9099 }, 9100 } 9101 target := &ret 9102 if err := gensupport.DecodeResponse(target, res); err != nil { 9103 return nil, err 9104 } 9105 return ret, nil 9106 } 9107 9108 type ProjectsOccurrencesGetVulnerabilitySummaryCall struct { 9109 s *Service 9110 parent string 9111 urlParams_ gensupport.URLParams 9112 ifNoneMatch_ string 9113 ctx_ context.Context 9114 header_ http.Header 9115 } 9116 9117 // GetVulnerabilitySummary: Gets a summary of the number and severity of 9118 // occurrences. 9119 // 9120 // - parent: The name of the project to get a vulnerability summary for in the 9121 // form of `projects/[PROJECT_ID]`. 9122 func (r *ProjectsOccurrencesService) GetVulnerabilitySummary(parent string) *ProjectsOccurrencesGetVulnerabilitySummaryCall { 9123 c := &ProjectsOccurrencesGetVulnerabilitySummaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9124 c.parent = parent 9125 return c 9126 } 9127 9128 // Filter sets the optional parameter "filter": The filter expression. 9129 func (c *ProjectsOccurrencesGetVulnerabilitySummaryCall) Filter(filter string) *ProjectsOccurrencesGetVulnerabilitySummaryCall { 9130 c.urlParams_.Set("filter", filter) 9131 return c 9132 } 9133 9134 // Fields allows partial responses to be retrieved. See 9135 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9136 // details. 9137 func (c *ProjectsOccurrencesGetVulnerabilitySummaryCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesGetVulnerabilitySummaryCall { 9138 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9139 return c 9140 } 9141 9142 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9143 // object's ETag matches the given value. This is useful for getting updates 9144 // only after the object has changed since the last request. 9145 func (c *ProjectsOccurrencesGetVulnerabilitySummaryCall) IfNoneMatch(entityTag string) *ProjectsOccurrencesGetVulnerabilitySummaryCall { 9146 c.ifNoneMatch_ = entityTag 9147 return c 9148 } 9149 9150 // Context sets the context to be used in this call's Do method. 9151 func (c *ProjectsOccurrencesGetVulnerabilitySummaryCall) Context(ctx context.Context) *ProjectsOccurrencesGetVulnerabilitySummaryCall { 9152 c.ctx_ = ctx 9153 return c 9154 } 9155 9156 // Header returns a http.Header that can be modified by the caller to add 9157 // headers to the request. 9158 func (c *ProjectsOccurrencesGetVulnerabilitySummaryCall) Header() http.Header { 9159 if c.header_ == nil { 9160 c.header_ = make(http.Header) 9161 } 9162 return c.header_ 9163 } 9164 9165 func (c *ProjectsOccurrencesGetVulnerabilitySummaryCall) doRequest(alt string) (*http.Response, error) { 9166 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9167 if c.ifNoneMatch_ != "" { 9168 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9169 } 9170 var body io.Reader = nil 9171 c.urlParams_.Set("alt", alt) 9172 c.urlParams_.Set("prettyPrint", "false") 9173 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/occurrences:vulnerabilitySummary") 9174 urls += "?" + c.urlParams_.Encode() 9175 req, err := http.NewRequest("GET", urls, body) 9176 if err != nil { 9177 return nil, err 9178 } 9179 req.Header = reqHeaders 9180 googleapi.Expand(req.URL, map[string]string{ 9181 "parent": c.parent, 9182 }) 9183 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9184 } 9185 9186 // Do executes the "containeranalysis.projects.occurrences.getVulnerabilitySummary" call. 9187 // Any non-2xx status code is an error. Response headers are in either 9188 // *VulnerabilityOccurrencesSummary.ServerResponse.Header or (if a response was 9189 // returned at all) in error.(*googleapi.Error).Header. Use 9190 // googleapi.IsNotModified to check whether the returned error was because 9191 // http.StatusNotModified was returned. 9192 func (c *ProjectsOccurrencesGetVulnerabilitySummaryCall) Do(opts ...googleapi.CallOption) (*VulnerabilityOccurrencesSummary, error) { 9193 gensupport.SetOptions(c.urlParams_, opts...) 9194 res, err := c.doRequest("json") 9195 if res != nil && res.StatusCode == http.StatusNotModified { 9196 if res.Body != nil { 9197 res.Body.Close() 9198 } 9199 return nil, gensupport.WrapError(&googleapi.Error{ 9200 Code: res.StatusCode, 9201 Header: res.Header, 9202 }) 9203 } 9204 if err != nil { 9205 return nil, err 9206 } 9207 defer googleapi.CloseBody(res) 9208 if err := googleapi.CheckResponse(res); err != nil { 9209 return nil, gensupport.WrapError(err) 9210 } 9211 ret := &VulnerabilityOccurrencesSummary{ 9212 ServerResponse: googleapi.ServerResponse{ 9213 Header: res.Header, 9214 HTTPStatusCode: res.StatusCode, 9215 }, 9216 } 9217 target := &ret 9218 if err := gensupport.DecodeResponse(target, res); err != nil { 9219 return nil, err 9220 } 9221 return ret, nil 9222 } 9223 9224 type ProjectsOccurrencesListCall struct { 9225 s *Service 9226 parent string 9227 urlParams_ gensupport.URLParams 9228 ifNoneMatch_ string 9229 ctx_ context.Context 9230 header_ http.Header 9231 } 9232 9233 // List: Lists occurrences for the specified project. 9234 // 9235 // - parent: The name of the project to list occurrences for in the form of 9236 // `projects/[PROJECT_ID]`. 9237 func (r *ProjectsOccurrencesService) List(parent string) *ProjectsOccurrencesListCall { 9238 c := &ProjectsOccurrencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9239 c.parent = parent 9240 return c 9241 } 9242 9243 // Filter sets the optional parameter "filter": The filter expression. 9244 func (c *ProjectsOccurrencesListCall) Filter(filter string) *ProjectsOccurrencesListCall { 9245 c.urlParams_.Set("filter", filter) 9246 return c 9247 } 9248 9249 // PageSize sets the optional parameter "pageSize": Number of occurrences to 9250 // return in the list. Must be positive. Max allowed page size is 1000. If not 9251 // specified, page size defaults to 20. 9252 func (c *ProjectsOccurrencesListCall) PageSize(pageSize int64) *ProjectsOccurrencesListCall { 9253 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9254 return c 9255 } 9256 9257 // PageToken sets the optional parameter "pageToken": Token to provide to skip 9258 // to a particular spot in the list. 9259 func (c *ProjectsOccurrencesListCall) PageToken(pageToken string) *ProjectsOccurrencesListCall { 9260 c.urlParams_.Set("pageToken", pageToken) 9261 return c 9262 } 9263 9264 // Fields allows partial responses to be retrieved. See 9265 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9266 // details. 9267 func (c *ProjectsOccurrencesListCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesListCall { 9268 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9269 return c 9270 } 9271 9272 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9273 // object's ETag matches the given value. This is useful for getting updates 9274 // only after the object has changed since the last request. 9275 func (c *ProjectsOccurrencesListCall) IfNoneMatch(entityTag string) *ProjectsOccurrencesListCall { 9276 c.ifNoneMatch_ = entityTag 9277 return c 9278 } 9279 9280 // Context sets the context to be used in this call's Do method. 9281 func (c *ProjectsOccurrencesListCall) Context(ctx context.Context) *ProjectsOccurrencesListCall { 9282 c.ctx_ = ctx 9283 return c 9284 } 9285 9286 // Header returns a http.Header that can be modified by the caller to add 9287 // headers to the request. 9288 func (c *ProjectsOccurrencesListCall) Header() http.Header { 9289 if c.header_ == nil { 9290 c.header_ = make(http.Header) 9291 } 9292 return c.header_ 9293 } 9294 9295 func (c *ProjectsOccurrencesListCall) doRequest(alt string) (*http.Response, error) { 9296 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9297 if c.ifNoneMatch_ != "" { 9298 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9299 } 9300 var body io.Reader = nil 9301 c.urlParams_.Set("alt", alt) 9302 c.urlParams_.Set("prettyPrint", "false") 9303 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/occurrences") 9304 urls += "?" + c.urlParams_.Encode() 9305 req, err := http.NewRequest("GET", urls, body) 9306 if err != nil { 9307 return nil, err 9308 } 9309 req.Header = reqHeaders 9310 googleapi.Expand(req.URL, map[string]string{ 9311 "parent": c.parent, 9312 }) 9313 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9314 } 9315 9316 // Do executes the "containeranalysis.projects.occurrences.list" call. 9317 // Any non-2xx status code is an error. Response headers are in either 9318 // *ListOccurrencesResponse.ServerResponse.Header or (if a response was 9319 // returned at all) in error.(*googleapi.Error).Header. Use 9320 // googleapi.IsNotModified to check whether the returned error was because 9321 // http.StatusNotModified was returned. 9322 func (c *ProjectsOccurrencesListCall) Do(opts ...googleapi.CallOption) (*ListOccurrencesResponse, error) { 9323 gensupport.SetOptions(c.urlParams_, opts...) 9324 res, err := c.doRequest("json") 9325 if res != nil && res.StatusCode == http.StatusNotModified { 9326 if res.Body != nil { 9327 res.Body.Close() 9328 } 9329 return nil, gensupport.WrapError(&googleapi.Error{ 9330 Code: res.StatusCode, 9331 Header: res.Header, 9332 }) 9333 } 9334 if err != nil { 9335 return nil, err 9336 } 9337 defer googleapi.CloseBody(res) 9338 if err := googleapi.CheckResponse(res); err != nil { 9339 return nil, gensupport.WrapError(err) 9340 } 9341 ret := &ListOccurrencesResponse{ 9342 ServerResponse: googleapi.ServerResponse{ 9343 Header: res.Header, 9344 HTTPStatusCode: res.StatusCode, 9345 }, 9346 } 9347 target := &ret 9348 if err := gensupport.DecodeResponse(target, res); err != nil { 9349 return nil, err 9350 } 9351 return ret, nil 9352 } 9353 9354 // Pages invokes f for each page of results. 9355 // A non-nil error returned from f will halt the iteration. 9356 // The provided context supersedes any context provided to the Context method. 9357 func (c *ProjectsOccurrencesListCall) Pages(ctx context.Context, f func(*ListOccurrencesResponse) error) error { 9358 c.ctx_ = ctx 9359 defer c.PageToken(c.urlParams_.Get("pageToken")) 9360 for { 9361 x, err := c.Do() 9362 if err != nil { 9363 return err 9364 } 9365 if err := f(x); err != nil { 9366 return err 9367 } 9368 if x.NextPageToken == "" { 9369 return nil 9370 } 9371 c.PageToken(x.NextPageToken) 9372 } 9373 } 9374 9375 type ProjectsOccurrencesPatchCall struct { 9376 s *Service 9377 name string 9378 occurrence *Occurrence 9379 urlParams_ gensupport.URLParams 9380 ctx_ context.Context 9381 header_ http.Header 9382 } 9383 9384 // Patch: Updates the specified occurrence. 9385 // 9386 // - name: The name of the occurrence in the form of 9387 // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. 9388 func (r *ProjectsOccurrencesService) Patch(name string, occurrence *Occurrence) *ProjectsOccurrencesPatchCall { 9389 c := &ProjectsOccurrencesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9390 c.name = name 9391 c.occurrence = occurrence 9392 return c 9393 } 9394 9395 // UpdateMask sets the optional parameter "updateMask": The fields to update. 9396 func (c *ProjectsOccurrencesPatchCall) UpdateMask(updateMask string) *ProjectsOccurrencesPatchCall { 9397 c.urlParams_.Set("updateMask", updateMask) 9398 return c 9399 } 9400 9401 // Fields allows partial responses to be retrieved. See 9402 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9403 // details. 9404 func (c *ProjectsOccurrencesPatchCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesPatchCall { 9405 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9406 return c 9407 } 9408 9409 // Context sets the context to be used in this call's Do method. 9410 func (c *ProjectsOccurrencesPatchCall) Context(ctx context.Context) *ProjectsOccurrencesPatchCall { 9411 c.ctx_ = ctx 9412 return c 9413 } 9414 9415 // Header returns a http.Header that can be modified by the caller to add 9416 // headers to the request. 9417 func (c *ProjectsOccurrencesPatchCall) Header() http.Header { 9418 if c.header_ == nil { 9419 c.header_ = make(http.Header) 9420 } 9421 return c.header_ 9422 } 9423 9424 func (c *ProjectsOccurrencesPatchCall) doRequest(alt string) (*http.Response, error) { 9425 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9426 var body io.Reader = nil 9427 body, err := googleapi.WithoutDataWrapper.JSONReader(c.occurrence) 9428 if err != nil { 9429 return nil, err 9430 } 9431 c.urlParams_.Set("alt", alt) 9432 c.urlParams_.Set("prettyPrint", "false") 9433 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 9434 urls += "?" + c.urlParams_.Encode() 9435 req, err := http.NewRequest("PATCH", urls, body) 9436 if err != nil { 9437 return nil, err 9438 } 9439 req.Header = reqHeaders 9440 googleapi.Expand(req.URL, map[string]string{ 9441 "name": c.name, 9442 }) 9443 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9444 } 9445 9446 // Do executes the "containeranalysis.projects.occurrences.patch" call. 9447 // Any non-2xx status code is an error. Response headers are in either 9448 // *Occurrence.ServerResponse.Header or (if a response was returned at all) in 9449 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9450 // whether the returned error was because http.StatusNotModified was returned. 9451 func (c *ProjectsOccurrencesPatchCall) Do(opts ...googleapi.CallOption) (*Occurrence, error) { 9452 gensupport.SetOptions(c.urlParams_, opts...) 9453 res, err := c.doRequest("json") 9454 if res != nil && res.StatusCode == http.StatusNotModified { 9455 if res.Body != nil { 9456 res.Body.Close() 9457 } 9458 return nil, gensupport.WrapError(&googleapi.Error{ 9459 Code: res.StatusCode, 9460 Header: res.Header, 9461 }) 9462 } 9463 if err != nil { 9464 return nil, err 9465 } 9466 defer googleapi.CloseBody(res) 9467 if err := googleapi.CheckResponse(res); err != nil { 9468 return nil, gensupport.WrapError(err) 9469 } 9470 ret := &Occurrence{ 9471 ServerResponse: googleapi.ServerResponse{ 9472 Header: res.Header, 9473 HTTPStatusCode: res.StatusCode, 9474 }, 9475 } 9476 target := &ret 9477 if err := gensupport.DecodeResponse(target, res); err != nil { 9478 return nil, err 9479 } 9480 return ret, nil 9481 } 9482 9483 type ProjectsOccurrencesSetIamPolicyCall struct { 9484 s *Service 9485 resource string 9486 setiampolicyrequest *SetIamPolicyRequest 9487 urlParams_ gensupport.URLParams 9488 ctx_ context.Context 9489 header_ http.Header 9490 } 9491 9492 // SetIamPolicy: Sets the access control policy on the specified note or 9493 // occurrence. Requires `containeranalysis.notes.setIamPolicy` or 9494 // `containeranalysis.occurrences.setIamPolicy` permission if the resource is a 9495 // note or an occurrence, respectively. The resource takes the format 9496 // `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and 9497 // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. 9498 // 9499 // - resource: REQUIRED: The resource for which the policy is being specified. 9500 // See Resource names (https://cloud.google.com/apis/design/resource_names) 9501 // for the appropriate value for this field. 9502 func (r *ProjectsOccurrencesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsOccurrencesSetIamPolicyCall { 9503 c := &ProjectsOccurrencesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9504 c.resource = resource 9505 c.setiampolicyrequest = setiampolicyrequest 9506 return c 9507 } 9508 9509 // Fields allows partial responses to be retrieved. See 9510 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9511 // details. 9512 func (c *ProjectsOccurrencesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesSetIamPolicyCall { 9513 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9514 return c 9515 } 9516 9517 // Context sets the context to be used in this call's Do method. 9518 func (c *ProjectsOccurrencesSetIamPolicyCall) Context(ctx context.Context) *ProjectsOccurrencesSetIamPolicyCall { 9519 c.ctx_ = ctx 9520 return c 9521 } 9522 9523 // Header returns a http.Header that can be modified by the caller to add 9524 // headers to the request. 9525 func (c *ProjectsOccurrencesSetIamPolicyCall) Header() http.Header { 9526 if c.header_ == nil { 9527 c.header_ = make(http.Header) 9528 } 9529 return c.header_ 9530 } 9531 9532 func (c *ProjectsOccurrencesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 9533 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9534 var body io.Reader = nil 9535 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 9536 if err != nil { 9537 return nil, err 9538 } 9539 c.urlParams_.Set("alt", alt) 9540 c.urlParams_.Set("prettyPrint", "false") 9541 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") 9542 urls += "?" + c.urlParams_.Encode() 9543 req, err := http.NewRequest("POST", urls, body) 9544 if err != nil { 9545 return nil, err 9546 } 9547 req.Header = reqHeaders 9548 googleapi.Expand(req.URL, map[string]string{ 9549 "resource": c.resource, 9550 }) 9551 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9552 } 9553 9554 // Do executes the "containeranalysis.projects.occurrences.setIamPolicy" call. 9555 // Any non-2xx status code is an error. Response headers are in either 9556 // *Policy.ServerResponse.Header or (if a response was returned at all) in 9557 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9558 // whether the returned error was because http.StatusNotModified was returned. 9559 func (c *ProjectsOccurrencesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 9560 gensupport.SetOptions(c.urlParams_, opts...) 9561 res, err := c.doRequest("json") 9562 if res != nil && res.StatusCode == http.StatusNotModified { 9563 if res.Body != nil { 9564 res.Body.Close() 9565 } 9566 return nil, gensupport.WrapError(&googleapi.Error{ 9567 Code: res.StatusCode, 9568 Header: res.Header, 9569 }) 9570 } 9571 if err != nil { 9572 return nil, err 9573 } 9574 defer googleapi.CloseBody(res) 9575 if err := googleapi.CheckResponse(res); err != nil { 9576 return nil, gensupport.WrapError(err) 9577 } 9578 ret := &Policy{ 9579 ServerResponse: googleapi.ServerResponse{ 9580 Header: res.Header, 9581 HTTPStatusCode: res.StatusCode, 9582 }, 9583 } 9584 target := &ret 9585 if err := gensupport.DecodeResponse(target, res); err != nil { 9586 return nil, err 9587 } 9588 return ret, nil 9589 } 9590 9591 type ProjectsOccurrencesTestIamPermissionsCall struct { 9592 s *Service 9593 resource string 9594 testiampermissionsrequest *TestIamPermissionsRequest 9595 urlParams_ gensupport.URLParams 9596 ctx_ context.Context 9597 header_ http.Header 9598 } 9599 9600 // TestIamPermissions: Returns the permissions that a caller has on the 9601 // specified note or occurrence. Requires list permission on the project (for 9602 // example, `containeranalysis.notes.list`). The resource takes the format 9603 // `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and 9604 // `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. 9605 // 9606 // - resource: REQUIRED: The resource for which the policy detail is being 9607 // requested. See Resource names 9608 // (https://cloud.google.com/apis/design/resource_names) for the appropriate 9609 // value for this field. 9610 func (r *ProjectsOccurrencesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsOccurrencesTestIamPermissionsCall { 9611 c := &ProjectsOccurrencesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9612 c.resource = resource 9613 c.testiampermissionsrequest = testiampermissionsrequest 9614 return c 9615 } 9616 9617 // Fields allows partial responses to be retrieved. See 9618 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9619 // details. 9620 func (c *ProjectsOccurrencesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesTestIamPermissionsCall { 9621 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9622 return c 9623 } 9624 9625 // Context sets the context to be used in this call's Do method. 9626 func (c *ProjectsOccurrencesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsOccurrencesTestIamPermissionsCall { 9627 c.ctx_ = ctx 9628 return c 9629 } 9630 9631 // Header returns a http.Header that can be modified by the caller to add 9632 // headers to the request. 9633 func (c *ProjectsOccurrencesTestIamPermissionsCall) Header() http.Header { 9634 if c.header_ == nil { 9635 c.header_ = make(http.Header) 9636 } 9637 return c.header_ 9638 } 9639 9640 func (c *ProjectsOccurrencesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 9641 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9642 var body io.Reader = nil 9643 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 9644 if err != nil { 9645 return nil, err 9646 } 9647 c.urlParams_.Set("alt", alt) 9648 c.urlParams_.Set("prettyPrint", "false") 9649 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") 9650 urls += "?" + c.urlParams_.Encode() 9651 req, err := http.NewRequest("POST", urls, body) 9652 if err != nil { 9653 return nil, err 9654 } 9655 req.Header = reqHeaders 9656 googleapi.Expand(req.URL, map[string]string{ 9657 "resource": c.resource, 9658 }) 9659 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9660 } 9661 9662 // Do executes the "containeranalysis.projects.occurrences.testIamPermissions" call. 9663 // Any non-2xx status code is an error. Response headers are in either 9664 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was 9665 // returned at all) in error.(*googleapi.Error).Header. Use 9666 // googleapi.IsNotModified to check whether the returned error was because 9667 // http.StatusNotModified was returned. 9668 func (c *ProjectsOccurrencesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 9669 gensupport.SetOptions(c.urlParams_, opts...) 9670 res, err := c.doRequest("json") 9671 if res != nil && res.StatusCode == http.StatusNotModified { 9672 if res.Body != nil { 9673 res.Body.Close() 9674 } 9675 return nil, gensupport.WrapError(&googleapi.Error{ 9676 Code: res.StatusCode, 9677 Header: res.Header, 9678 }) 9679 } 9680 if err != nil { 9681 return nil, err 9682 } 9683 defer googleapi.CloseBody(res) 9684 if err := googleapi.CheckResponse(res); err != nil { 9685 return nil, gensupport.WrapError(err) 9686 } 9687 ret := &TestIamPermissionsResponse{ 9688 ServerResponse: googleapi.ServerResponse{ 9689 Header: res.Header, 9690 HTTPStatusCode: res.StatusCode, 9691 }, 9692 } 9693 target := &ret 9694 if err := gensupport.DecodeResponse(target, res); err != nil { 9695 return nil, err 9696 } 9697 return ret, nil 9698 } 9699 9700 type ProjectsResourcesExportSBOMCall struct { 9701 s *Service 9702 name string 9703 exportsbomrequest *ExportSBOMRequest 9704 urlParams_ gensupport.URLParams 9705 ctx_ context.Context 9706 header_ http.Header 9707 } 9708 9709 // ExportSBOM: Generates an SBOM for the given resource. 9710 // 9711 // - name: The name of the resource in the form of 9712 // `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`. 9713 func (r *ProjectsResourcesService) ExportSBOM(name string, exportsbomrequest *ExportSBOMRequest) *ProjectsResourcesExportSBOMCall { 9714 c := &ProjectsResourcesExportSBOMCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9715 c.name = name 9716 c.exportsbomrequest = exportsbomrequest 9717 return c 9718 } 9719 9720 // Fields allows partial responses to be retrieved. See 9721 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9722 // details. 9723 func (c *ProjectsResourcesExportSBOMCall) Fields(s ...googleapi.Field) *ProjectsResourcesExportSBOMCall { 9724 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9725 return c 9726 } 9727 9728 // Context sets the context to be used in this call's Do method. 9729 func (c *ProjectsResourcesExportSBOMCall) Context(ctx context.Context) *ProjectsResourcesExportSBOMCall { 9730 c.ctx_ = ctx 9731 return c 9732 } 9733 9734 // Header returns a http.Header that can be modified by the caller to add 9735 // headers to the request. 9736 func (c *ProjectsResourcesExportSBOMCall) Header() http.Header { 9737 if c.header_ == nil { 9738 c.header_ = make(http.Header) 9739 } 9740 return c.header_ 9741 } 9742 9743 func (c *ProjectsResourcesExportSBOMCall) doRequest(alt string) (*http.Response, error) { 9744 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9745 var body io.Reader = nil 9746 body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportsbomrequest) 9747 if err != nil { 9748 return nil, err 9749 } 9750 c.urlParams_.Set("alt", alt) 9751 c.urlParams_.Set("prettyPrint", "false") 9752 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:exportSBOM") 9753 urls += "?" + c.urlParams_.Encode() 9754 req, err := http.NewRequest("POST", urls, body) 9755 if err != nil { 9756 return nil, err 9757 } 9758 req.Header = reqHeaders 9759 googleapi.Expand(req.URL, map[string]string{ 9760 "name": c.name, 9761 }) 9762 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9763 } 9764 9765 // Do executes the "containeranalysis.projects.resources.exportSBOM" call. 9766 // Any non-2xx status code is an error. Response headers are in either 9767 // *ExportSBOMResponse.ServerResponse.Header or (if a response was returned at 9768 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9769 // check whether the returned error was because http.StatusNotModified was 9770 // returned. 9771 func (c *ProjectsResourcesExportSBOMCall) Do(opts ...googleapi.CallOption) (*ExportSBOMResponse, error) { 9772 gensupport.SetOptions(c.urlParams_, opts...) 9773 res, err := c.doRequest("json") 9774 if res != nil && res.StatusCode == http.StatusNotModified { 9775 if res.Body != nil { 9776 res.Body.Close() 9777 } 9778 return nil, gensupport.WrapError(&googleapi.Error{ 9779 Code: res.StatusCode, 9780 Header: res.Header, 9781 }) 9782 } 9783 if err != nil { 9784 return nil, err 9785 } 9786 defer googleapi.CloseBody(res) 9787 if err := googleapi.CheckResponse(res); err != nil { 9788 return nil, gensupport.WrapError(err) 9789 } 9790 ret := &ExportSBOMResponse{ 9791 ServerResponse: googleapi.ServerResponse{ 9792 Header: res.Header, 9793 HTTPStatusCode: res.StatusCode, 9794 }, 9795 } 9796 target := &ret 9797 if err := gensupport.DecodeResponse(target, res); err != nil { 9798 return nil, err 9799 } 9800 return ret, nil 9801 } 9802