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/v1alpha1" 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/v1alpha1" 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:v1alpha1" 90 const apiName = "containeranalysis" 91 const apiVersion = "v1alpha1" 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 s.Providers = NewProvidersService(s) 140 return s, nil 141 } 142 143 type Service struct { 144 client *http.Client 145 BasePath string // API endpoint base URL 146 UserAgent string // optional additional User-Agent fragment 147 148 Projects *ProjectsService 149 150 Providers *ProvidersService 151 } 152 153 func (s *Service) userAgent() string { 154 if s.UserAgent == "" { 155 return googleapi.UserAgent 156 } 157 return googleapi.UserAgent + " " + s.UserAgent 158 } 159 160 func NewProjectsService(s *Service) *ProjectsService { 161 rs := &ProjectsService{s: s} 162 rs.Notes = NewProjectsNotesService(s) 163 rs.Occurrences = NewProjectsOccurrencesService(s) 164 rs.Operations = NewProjectsOperationsService(s) 165 rs.ScanConfigs = NewProjectsScanConfigsService(s) 166 return rs 167 } 168 169 type ProjectsService struct { 170 s *Service 171 172 Notes *ProjectsNotesService 173 174 Occurrences *ProjectsOccurrencesService 175 176 Operations *ProjectsOperationsService 177 178 ScanConfigs *ProjectsScanConfigsService 179 } 180 181 func NewProjectsNotesService(s *Service) *ProjectsNotesService { 182 rs := &ProjectsNotesService{s: s} 183 rs.Occurrences = NewProjectsNotesOccurrencesService(s) 184 return rs 185 } 186 187 type ProjectsNotesService struct { 188 s *Service 189 190 Occurrences *ProjectsNotesOccurrencesService 191 } 192 193 func NewProjectsNotesOccurrencesService(s *Service) *ProjectsNotesOccurrencesService { 194 rs := &ProjectsNotesOccurrencesService{s: s} 195 return rs 196 } 197 198 type ProjectsNotesOccurrencesService struct { 199 s *Service 200 } 201 202 func NewProjectsOccurrencesService(s *Service) *ProjectsOccurrencesService { 203 rs := &ProjectsOccurrencesService{s: s} 204 return rs 205 } 206 207 type ProjectsOccurrencesService struct { 208 s *Service 209 } 210 211 func NewProjectsOperationsService(s *Service) *ProjectsOperationsService { 212 rs := &ProjectsOperationsService{s: s} 213 return rs 214 } 215 216 type ProjectsOperationsService struct { 217 s *Service 218 } 219 220 func NewProjectsScanConfigsService(s *Service) *ProjectsScanConfigsService { 221 rs := &ProjectsScanConfigsService{s: s} 222 return rs 223 } 224 225 type ProjectsScanConfigsService struct { 226 s *Service 227 } 228 229 func NewProvidersService(s *Service) *ProvidersService { 230 rs := &ProvidersService{s: s} 231 rs.Notes = NewProvidersNotesService(s) 232 return rs 233 } 234 235 type ProvidersService struct { 236 s *Service 237 238 Notes *ProvidersNotesService 239 } 240 241 func NewProvidersNotesService(s *Service) *ProvidersNotesService { 242 rs := &ProvidersNotesService{s: s} 243 rs.Occurrences = NewProvidersNotesOccurrencesService(s) 244 return rs 245 } 246 247 type ProvidersNotesService struct { 248 s *Service 249 250 Occurrences *ProvidersNotesOccurrencesService 251 } 252 253 func NewProvidersNotesOccurrencesService(s *Service) *ProvidersNotesOccurrencesService { 254 rs := &ProvidersNotesOccurrencesService{s: s} 255 return rs 256 } 257 258 type ProvidersNotesOccurrencesService struct { 259 s *Service 260 } 261 262 // AnalysisCompleted: Indicates which analysis completed successfully. Multiple 263 // types of analysis can be performed on a single resource. 264 type AnalysisCompleted struct { 265 // AnalysisType: type of analysis that were completed on a resource. 266 AnalysisType []string `json:"analysisType,omitempty"` 267 // ForceSendFields is a list of field names (e.g. "AnalysisType") to 268 // unconditionally include in API requests. By default, fields with empty or 269 // default values are omitted from API requests. See 270 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 271 // details. 272 ForceSendFields []string `json:"-"` 273 // NullFields is a list of field names (e.g. "AnalysisType") to include in API 274 // requests with the JSON null value. By default, fields with empty values are 275 // omitted from API requests. See 276 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 277 NullFields []string `json:"-"` 278 } 279 280 func (s *AnalysisCompleted) MarshalJSON() ([]byte, error) { 281 type NoMethod AnalysisCompleted 282 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 283 } 284 285 // Artifact: Artifact describes a build product. 286 type Artifact struct { 287 // Checksum: Hash or checksum value of a binary, or Docker Registry 2.0 digest 288 // of a container. 289 Checksum string `json:"checksum,omitempty"` 290 // Id: Artifact ID, if any; for container images, this will be a URL by digest 291 // like gcr.io/projectID/imagename@sha256:123456 292 Id string `json:"id,omitempty"` 293 // Name: Name of the artifact. This may be the path to a binary or jar file, or 294 // in the case of a container build, the name used to push the container image 295 // to Google Container Registry, as presented to `docker push`. This field is 296 // deprecated in favor of the plural `names` field; it continues to exist here 297 // to allow existing BuildProvenance serialized to json in 298 // google.devtools.containeranalysis.v1alpha1.BuildDetails.provenance_bytes to 299 // deserialize back into proto. 300 Name string `json:"name,omitempty"` 301 // Names: Related artifact names. This may be the path to a binary or jar file, 302 // or in the case of a container build, the name used to push the container 303 // image to Google Container Registry, as presented to `docker push`. Note that 304 // a single Artifact ID can have multiple names, for example if two tags are 305 // applied to one image. 306 Names []string `json:"names,omitempty"` 307 // ForceSendFields is a list of field names (e.g. "Checksum") to 308 // unconditionally include in API requests. By default, fields with empty or 309 // default values are omitted from API requests. See 310 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 311 // details. 312 ForceSendFields []string `json:"-"` 313 // NullFields is a list of field names (e.g. "Checksum") to include in API 314 // requests with the JSON null value. By default, fields with empty values are 315 // omitted from API requests. See 316 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 317 NullFields []string `json:"-"` 318 } 319 320 func (s *Artifact) MarshalJSON() ([]byte, error) { 321 type NoMethod Artifact 322 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 323 } 324 325 // Assessment: Assessment provides all information that is related to a single 326 // vulnerability for this product. 327 type Assessment struct { 328 // Cve: Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) 329 // tracking number for the vulnerability. 330 Cve string `json:"cve,omitempty"` 331 // Impacts: Contains information about the impact of this vulnerability, this 332 // will change with time. 333 Impacts []string `json:"impacts,omitempty"` 334 // Justification: Justification provides the justification when the state of 335 // the assessment if NOT_AFFECTED. 336 Justification *Justification `json:"justification,omitempty"` 337 // LongDescription: A detailed description of this Vex. 338 LongDescription string `json:"longDescription,omitempty"` 339 // RelatedUris: Holds a list of references associated with this vulnerability 340 // item and assessment. These uris have additional information about the 341 // vulnerability and the assessment itself. E.g. Link to a document which 342 // details how this assessment concluded the state of this vulnerability. 343 RelatedUris []*URI `json:"relatedUris,omitempty"` 344 // Remediations: Specifies details on how to handle (and presumably, fix) a 345 // vulnerability. 346 Remediations []*Remediation `json:"remediations,omitempty"` 347 // ShortDescription: A one sentence description of this Vex. 348 ShortDescription string `json:"shortDescription,omitempty"` 349 // State: Provides the state of this Vulnerability assessment. 350 // 351 // Possible values: 352 // "STATE_UNSPECIFIED" - No state is specified. 353 // "AFFECTED" - This product is known to be affected by this vulnerability. 354 // "NOT_AFFECTED" - This product is known to be not affected by this 355 // vulnerability. 356 // "FIXED" - This product contains a fix for this vulnerability. 357 // "UNDER_INVESTIGATION" - It is not known yet whether these versions are or 358 // are not affected by the vulnerability. However, it is still under 359 // investigation. 360 State string `json:"state,omitempty"` 361 // VulnerabilityId: The vulnerability identifier for this Assessment. Will hold 362 // one of common identifiers e.g. CVE, GHSA etc. 363 VulnerabilityId string `json:"vulnerabilityId,omitempty"` 364 // ForceSendFields is a list of field names (e.g. "Cve") to unconditionally 365 // include in API requests. By default, fields with empty or default values are 366 // omitted from API requests. See 367 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 368 // details. 369 ForceSendFields []string `json:"-"` 370 // NullFields is a list of field names (e.g. "Cve") to include in API requests 371 // with the JSON null value. By default, fields with empty values are omitted 372 // from API requests. See 373 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 374 NullFields []string `json:"-"` 375 } 376 377 func (s *Assessment) MarshalJSON() ([]byte, error) { 378 type NoMethod Assessment 379 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 380 } 381 382 // Attestation: Occurrence that represents a single "attestation". The 383 // authenticity of an Attestation can be verified using the attached signature. 384 // If the verifier trusts the public key of the signer, then verifying the 385 // signature is sufficient to establish trust. In this circumstance, the 386 // AttestationAuthority to which this Attestation is attached is primarily 387 // useful for look-up (how to find this Attestation if you already know the 388 // Authority and artifact to be verified) and intent (which authority was this 389 // attestation intended to sign for). 390 type Attestation struct { 391 PgpSignedAttestation *PgpSignedAttestation `json:"pgpSignedAttestation,omitempty"` 392 // ForceSendFields is a list of field names (e.g. "PgpSignedAttestation") to 393 // unconditionally include in API requests. By default, fields with empty or 394 // default values are omitted from API requests. See 395 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 396 // details. 397 ForceSendFields []string `json:"-"` 398 // NullFields is a list of field names (e.g. "PgpSignedAttestation") to include 399 // in API requests with the JSON null value. By default, fields with empty 400 // values are omitted from API requests. See 401 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 402 NullFields []string `json:"-"` 403 } 404 405 func (s *Attestation) MarshalJSON() ([]byte, error) { 406 type NoMethod Attestation 407 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 408 } 409 410 // AttestationAuthority: Note kind that represents a logical attestation "role" 411 // or "authority". For example, an organization might have one 412 // `AttestationAuthority` for "QA" and one for "build". This Note is intended 413 // to act strictly as a grouping mechanism for the attached Occurrences 414 // (Attestations). This grouping mechanism also provides a security boundary, 415 // since IAM ACLs gate the ability for a principle to attach an Occurrence to a 416 // given Note. It also provides a single point of lookup to find all attached 417 // Attestation Occurrences, even if they don't all live in the same project. 418 type AttestationAuthority struct { 419 Hint *AttestationAuthorityHint `json:"hint,omitempty"` 420 // ForceSendFields is a list of field names (e.g. "Hint") to unconditionally 421 // include in API requests. By default, fields with empty or default values are 422 // omitted from API requests. See 423 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 424 // details. 425 ForceSendFields []string `json:"-"` 426 // NullFields is a list of field names (e.g. "Hint") to include in API requests 427 // with the JSON null value. By default, fields with empty values are omitted 428 // from API requests. See 429 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 430 NullFields []string `json:"-"` 431 } 432 433 func (s *AttestationAuthority) MarshalJSON() ([]byte, error) { 434 type NoMethod AttestationAuthority 435 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 436 } 437 438 // AttestationAuthorityHint: This submessage provides human-readable hints 439 // about the purpose of the AttestationAuthority. Because the name of a Note 440 // acts as its resource reference, it is important to disambiguate the 441 // canonical name of the Note (which might be a UUID for security purposes) 442 // from "readable" names more suitable for debug output. Note that these hints 443 // should NOT be used to look up AttestationAuthorities in security sensitive 444 // contexts, such as when looking up Attestations to verify. 445 type AttestationAuthorityHint struct { 446 // HumanReadableName: The human readable name of this Attestation Authority, 447 // for example "qa". 448 HumanReadableName string `json:"humanReadableName,omitempty"` 449 // ForceSendFields is a list of field names (e.g. "HumanReadableName") to 450 // unconditionally include in API requests. By default, fields with empty or 451 // default values are omitted from API requests. See 452 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 453 // details. 454 ForceSendFields []string `json:"-"` 455 // NullFields is a list of field names (e.g. "HumanReadableName") to include in 456 // API requests with the JSON null value. By default, fields with empty values 457 // are omitted from API requests. See 458 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 459 NullFields []string `json:"-"` 460 } 461 462 func (s *AttestationAuthorityHint) MarshalJSON() ([]byte, error) { 463 type NoMethod AttestationAuthorityHint 464 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 465 } 466 467 // Basis: Basis describes the base image portion (Note) of the DockerImage 468 // relationship. Linked occurrences are derived from this or an equivalent 469 // image via: FROM Or an equivalent reference, e.g. a tag of the resource_url. 470 type Basis struct { 471 // Fingerprint: The fingerprint of the base image. 472 Fingerprint *Fingerprint `json:"fingerprint,omitempty"` 473 // ResourceUrl: The resource_url for the resource representing the basis of 474 // associated occurrence images. 475 ResourceUrl string `json:"resourceUrl,omitempty"` 476 // ForceSendFields is a list of field names (e.g. "Fingerprint") to 477 // unconditionally include in API requests. By default, fields with empty or 478 // default values are omitted from API requests. See 479 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 480 // details. 481 ForceSendFields []string `json:"-"` 482 // NullFields is a list of field names (e.g. "Fingerprint") to include in API 483 // requests with the JSON null value. By default, fields with empty values are 484 // omitted from API requests. See 485 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 486 NullFields []string `json:"-"` 487 } 488 489 func (s *Basis) MarshalJSON() ([]byte, error) { 490 type NoMethod Basis 491 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 492 } 493 494 // Binding: Associates `members`, or principals, with a `role`. 495 type Binding struct { 496 // Condition: The condition that is associated with this binding. If the 497 // condition evaluates to `true`, then this binding applies to the current 498 // request. If the condition evaluates to `false`, then this binding does not 499 // apply to the current request. However, a different role binding might grant 500 // the same role to one or more of the principals in this binding. To learn 501 // which resources support conditions in their IAM policies, see the IAM 502 // documentation 503 // (https://cloud.google.com/iam/help/conditions/resource-policies). 504 Condition *Expr `json:"condition,omitempty"` 505 // Members: Specifies the principals requesting access for a Google Cloud 506 // resource. `members` can have the following values: * `allUsers`: A special 507 // identifier that represents anyone who is on the internet; with or without a 508 // Google account. * `allAuthenticatedUsers`: A special identifier that 509 // represents anyone who is authenticated with a Google account or a service 510 // account. Does not include identities that come from external identity 511 // providers (IdPs) through identity federation. * `user:{emailid}`: An email 512 // address that represents a specific Google account. For example, 513 // `alice@example.com` . * `serviceAccount:{emailid}`: An email address that 514 // represents a Google service account. For example, 515 // `my-other-app@appspot.gserviceaccount.com`. * 516 // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An 517 // identifier for a Kubernetes service account 518 // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). 519 // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * 520 // `group:{emailid}`: An email address that represents a Google group. For 521 // example, `admins@example.com`. * `domain:{domain}`: The G Suite domain 522 // (primary) that represents all the users of that domain. For example, 523 // `google.com` or `example.com`. * 524 // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub 525 // ject/{subject_attribute_value}`: A single identity in a workforce identity 526 // pool. * 527 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 528 // group/{group_id}`: All workforce identities in a group. * 529 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 530 // attribute.{attribute_name}/{attribute_value}`: All workforce identities with 531 // a specific attribute value. * 532 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 533 // *`: All identities in a workforce identity pool. * 534 // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo 535 // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single 536 // identity in a workload identity pool. * 537 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 538 // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool 539 // group. * 540 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 541 // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} 542 // `: All identities in a workload identity pool with a certain attribute. * 543 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 544 // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity 545 // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus 546 // unique identifier) representing a user that has been recently deleted. For 547 // example, `alice@example.com?uid=123456789012345678901`. If the user is 548 // recovered, this value reverts to `user:{emailid}` and the recovered user 549 // retains the role in the binding. * 550 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus 551 // unique identifier) representing a service account that has been recently 552 // deleted. For example, 553 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the 554 // service account is undeleted, this value reverts to 555 // `serviceAccount:{emailid}` and the undeleted service account retains the 556 // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email 557 // address (plus unique identifier) representing a Google group that has been 558 // recently deleted. For example, 559 // `admins@example.com?uid=123456789012345678901`. If the group is recovered, 560 // this value reverts to `group:{emailid}` and the recovered group retains the 561 // role in the binding. * 562 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool 563 // _id}/subject/{subject_attribute_value}`: Deleted single identity in a 564 // workforce identity pool. For example, 565 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po 566 // ol-id/subject/my-subject-attribute-value`. 567 Members []string `json:"members,omitempty"` 568 // Role: Role that is assigned to the list of `members`, or principals. For 569 // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview 570 // of the IAM roles and permissions, see the IAM documentation 571 // (https://cloud.google.com/iam/docs/roles-overview). For a list of the 572 // available pre-defined roles, see here 573 // (https://cloud.google.com/iam/docs/understanding-roles). 574 Role string `json:"role,omitempty"` 575 // ForceSendFields is a list of field names (e.g. "Condition") to 576 // unconditionally include in API requests. By default, fields with empty or 577 // default values are omitted from API requests. See 578 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 579 // details. 580 ForceSendFields []string `json:"-"` 581 // NullFields is a list of field names (e.g. "Condition") to include in API 582 // requests with the JSON null value. By default, fields with empty values are 583 // omitted from API requests. See 584 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 585 NullFields []string `json:"-"` 586 } 587 588 func (s *Binding) MarshalJSON() ([]byte, error) { 589 type NoMethod Binding 590 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 591 } 592 593 type BuildDefinition struct { 594 BuildType string `json:"buildType,omitempty"` 595 ExternalParameters googleapi.RawMessage `json:"externalParameters,omitempty"` 596 InternalParameters googleapi.RawMessage `json:"internalParameters,omitempty"` 597 ResolvedDependencies []*ResourceDescriptor `json:"resolvedDependencies,omitempty"` 598 // ForceSendFields is a list of field names (e.g. "BuildType") to 599 // unconditionally include in API requests. By default, fields with empty or 600 // default values are omitted from API requests. See 601 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 602 // details. 603 ForceSendFields []string `json:"-"` 604 // NullFields is a list of field names (e.g. "BuildType") to include in API 605 // requests with the JSON null value. By default, fields with empty values are 606 // omitted from API requests. See 607 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 608 NullFields []string `json:"-"` 609 } 610 611 func (s *BuildDefinition) MarshalJSON() ([]byte, error) { 612 type NoMethod BuildDefinition 613 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 614 } 615 616 // BuildDetails: Message encapsulating build provenance details. 617 type BuildDetails struct { 618 // InTotoSlsaProvenanceV1: In-Toto Slsa Provenance V1 represents a slsa 619 // provenance meeting the slsa spec, wrapped in an in-toto statement. This 620 // allows for direct jsonification of a to-spec in-toto slsa statement with a 621 // to-spec slsa provenance. 622 InTotoSlsaProvenanceV1 *InTotoSlsaProvenanceV1 `json:"inTotoSlsaProvenanceV1,omitempty"` 623 // IntotoProvenance: Deprecated. See InTotoStatement for the replacement. 624 // In-toto Provenance representation as defined in spec. 625 IntotoProvenance *InTotoProvenance `json:"intotoProvenance,omitempty"` 626 // IntotoStatement: In-toto Statement representation as defined in spec. The 627 // intoto_statement can contain any type of provenance. The serialized payload 628 // of the statement can be stored and signed in the Occurrence's envelope. 629 IntotoStatement *InTotoStatement `json:"intotoStatement,omitempty"` 630 // Provenance: The actual provenance 631 Provenance *BuildProvenance `json:"provenance,omitempty"` 632 // ProvenanceBytes: Serialized JSON representation of the provenance, used in 633 // generating the `BuildSignature` in the corresponding Result. After verifying 634 // the signature, `provenance_bytes` can be unmarshalled and compared to the 635 // provenance to confirm that it is unchanged. A base64-encoded string 636 // representation of the provenance bytes is used for the signature in order to 637 // interoperate with openssl which expects this format for signature 638 // verification. The serialized form is captured both to avoid ambiguity in how 639 // the provenance is marshalled to json as well to prevent incompatibilities 640 // with future changes. 641 ProvenanceBytes string `json:"provenanceBytes,omitempty"` 642 // ForceSendFields is a list of field names (e.g. "InTotoSlsaProvenanceV1") to 643 // unconditionally include in API requests. By default, fields with empty or 644 // default values are omitted from API requests. See 645 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 646 // details. 647 ForceSendFields []string `json:"-"` 648 // NullFields is a list of field names (e.g. "InTotoSlsaProvenanceV1") to 649 // include in API requests with the JSON null value. By default, fields with 650 // empty values are omitted from API requests. See 651 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 652 NullFields []string `json:"-"` 653 } 654 655 func (s *BuildDetails) MarshalJSON() ([]byte, error) { 656 type NoMethod BuildDetails 657 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 658 } 659 660 type BuildMetadata struct { 661 FinishedOn string `json:"finishedOn,omitempty"` 662 InvocationId string `json:"invocationId,omitempty"` 663 StartedOn string `json:"startedOn,omitempty"` 664 // ForceSendFields is a list of field names (e.g. "FinishedOn") to 665 // unconditionally include in API requests. By default, fields with empty or 666 // default values are omitted from API requests. See 667 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 668 // details. 669 ForceSendFields []string `json:"-"` 670 // NullFields is a list of field names (e.g. "FinishedOn") to include in API 671 // requests with the JSON null value. By default, fields with empty values are 672 // omitted from API requests. See 673 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 674 NullFields []string `json:"-"` 675 } 676 677 func (s *BuildMetadata) MarshalJSON() ([]byte, error) { 678 type NoMethod BuildMetadata 679 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 680 } 681 682 // BuildProvenance: Provenance of a build. Contains all information needed to 683 // verify the full details about the build from source to completion. 684 type BuildProvenance struct { 685 // BuildOptions: Special options applied to this build. This is a catch-all 686 // field where build providers can enter any desired additional details. 687 BuildOptions map[string]string `json:"buildOptions,omitempty"` 688 // BuilderVersion: Version string of the builder at the time this build was 689 // executed. 690 BuilderVersion string `json:"builderVersion,omitempty"` 691 // BuiltArtifacts: Output of the build. 692 BuiltArtifacts []*Artifact `json:"builtArtifacts,omitempty"` 693 // Commands: Commands requested by the build. 694 Commands []*Command `json:"commands,omitempty"` 695 // CreateTime: Time at which the build was created. 696 CreateTime string `json:"createTime,omitempty"` 697 // Creator: E-mail address of the user who initiated this build. Note that this 698 // was the user's e-mail address at the time the build was initiated; this 699 // address may not represent the same end-user for all time. 700 Creator string `json:"creator,omitempty"` 701 // FinishTime: Time at which execution of the build was finished. 702 FinishTime string `json:"finishTime,omitempty"` 703 // Id: Unique identifier of the build. 704 Id string `json:"id,omitempty"` 705 // LogsBucket: Google Cloud Storage bucket where logs were written. 706 LogsBucket string `json:"logsBucket,omitempty"` 707 // ProjectId: ID of the project. 708 ProjectId string `json:"projectId,omitempty"` 709 // SourceProvenance: Details of the Source input to the build. 710 SourceProvenance *Source `json:"sourceProvenance,omitempty"` 711 // StartTime: Time at which execution of the build was started. 712 StartTime string `json:"startTime,omitempty"` 713 // TriggerId: Trigger identifier if the build was triggered automatically; 714 // empty if not. 715 TriggerId string `json:"triggerId,omitempty"` 716 // ForceSendFields is a list of field names (e.g. "BuildOptions") to 717 // unconditionally include in API requests. By default, fields with empty or 718 // default values are omitted from API requests. See 719 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 720 // details. 721 ForceSendFields []string `json:"-"` 722 // NullFields is a list of field names (e.g. "BuildOptions") to include in API 723 // requests with the JSON null value. By default, fields with empty values are 724 // omitted from API requests. See 725 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 726 NullFields []string `json:"-"` 727 } 728 729 func (s *BuildProvenance) MarshalJSON() ([]byte, error) { 730 type NoMethod BuildProvenance 731 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 732 } 733 734 // BuildSignature: Message encapsulating the signature of the verified build. 735 type BuildSignature struct { 736 // KeyId: An Id for the key used to sign. This could be either an Id for the 737 // key stored in `public_key` (such as the Id or fingerprint for a PGP key, or 738 // the CN for a cert), or a reference to an external key (such as a reference 739 // to a key in Cloud Key Management Service). 740 KeyId string `json:"keyId,omitempty"` 741 // KeyType: The type of the key, either stored in `public_key` or referenced in 742 // `key_id` 743 // 744 // Possible values: 745 // "KEY_TYPE_UNSPECIFIED" - `KeyType` is not set. 746 // "PGP_ASCII_ARMORED" - `PGP ASCII Armored` public key. 747 // "PKIX_PEM" - `PKIX PEM` public key. 748 KeyType string `json:"keyType,omitempty"` 749 // PublicKey: Public key of the builder which can be used to verify that the 750 // related findings are valid and unchanged. If `key_type` is empty, this 751 // defaults to PEM encoded public keys. This field may be empty if `key_id` 752 // references an external key. For Cloud Build based signatures, this is a PEM 753 // encoded public key. To verify the Cloud Build signature, place the contents 754 // of this field into a file (public.pem). The signature field is 755 // base64-decoded into its binary representation in signature.bin, and the 756 // provenance bytes from `BuildDetails` are base64-decoded into a binary 757 // representation in signed.bin. OpenSSL can then verify the signature: 758 // `openssl sha256 -verify public.pem -signature signature.bin signed.bin` 759 PublicKey string `json:"publicKey,omitempty"` 760 // Signature: Signature of the related `BuildProvenance`, encoded in a base64 761 // string. 762 Signature string `json:"signature,omitempty"` 763 // ForceSendFields is a list of field names (e.g. "KeyId") to unconditionally 764 // include in API requests. By default, fields with empty or default values are 765 // omitted from API requests. See 766 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 767 // details. 768 ForceSendFields []string `json:"-"` 769 // NullFields is a list of field names (e.g. "KeyId") to include in API 770 // requests with the JSON null value. By default, fields with empty values are 771 // omitted from API requests. See 772 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 773 NullFields []string `json:"-"` 774 } 775 776 func (s *BuildSignature) MarshalJSON() ([]byte, error) { 777 type NoMethod BuildSignature 778 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 779 } 780 781 // BuildStep: A step in the build pipeline. Next ID: 21 782 type BuildStep struct { 783 // AllowExitCodes: Allow this build step to fail without failing the entire 784 // build if and only if the exit code is one of the specified codes. If 785 // allow_failure is also specified, this field will take precedence. 786 AllowExitCodes []int64 `json:"allowExitCodes,omitempty"` 787 // AllowFailure: Allow this build step to fail without failing the entire 788 // build. If false, the entire build will fail if this step fails. Otherwise, 789 // the build will succeed, but this step will still have a failure status. 790 // Error information will be reported in the failure_detail field. 791 AllowFailure bool `json:"allowFailure,omitempty"` 792 // Args: A list of arguments that will be presented to the step when it is 793 // started. If the image used to run the step's container has an entrypoint, 794 // the `args` are used as arguments to that entrypoint. If the image does not 795 // define an entrypoint, the first element in args is used as the entrypoint, 796 // and the remainder will be used as arguments. 797 Args []string `json:"args,omitempty"` 798 // AutomapSubstitutions: Option to include built-in and custom substitutions as 799 // env variables for this build step. This option will override the global 800 // option in BuildOption. 801 AutomapSubstitutions bool `json:"automapSubstitutions,omitempty"` 802 // Dir: Working directory to use when running this step's container. If this 803 // value is a relative path, it is relative to the build's working directory. 804 // If this value is absolute, it may be outside the build's working directory, 805 // in which case the contents of the path may not be persisted across build 806 // step executions, unless a `volume` for that path is specified. If the build 807 // specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies 808 // an absolute path, the `RepoSource` `dir` is ignored for the step's 809 // execution. 810 Dir string `json:"dir,omitempty"` 811 // Entrypoint: Entrypoint to be used instead of the build step image's default 812 // entrypoint. If unset, the image's default entrypoint is used. 813 Entrypoint string `json:"entrypoint,omitempty"` 814 // Env: A list of environment variable definitions to be used when running a 815 // step. The elements are of the form "KEY=VALUE" for the environment variable 816 // "KEY" being given the value "VALUE". 817 Env []string `json:"env,omitempty"` 818 // ExitCode: Output only. Return code from running the step. 819 ExitCode int64 `json:"exitCode,omitempty"` 820 // Id: Unique identifier for this build step, used in `wait_for` to reference 821 // this build step as a dependency. 822 Id string `json:"id,omitempty"` 823 // Name: Required. The name of the container image that will run this 824 // particular build step. If the image is available in the host's Docker 825 // daemon's cache, it will be run directly. If not, the host will attempt to 826 // pull the image first, using the builder service account's credentials if 827 // necessary. The Docker daemon's cache will already have the latest versions 828 // of all of the officially supported build steps 829 // (https://github.com/GoogleCloudPlatform/cloud-builders 830 // (https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon 831 // will also have cached many of the layers for some popular images, like 832 // "ubuntu", "debian", but they will be refreshed at the time you attempt to 833 // use them. If you built an image in a previous build step, it will be stored 834 // in the host's Docker daemon's cache and is available to use as the name for 835 // a later build step. 836 Name string `json:"name,omitempty"` 837 // PullTiming: Output only. Stores timing information for pulling this build 838 // step's builder image only. 839 PullTiming *TimeSpan `json:"pullTiming,omitempty"` 840 // Script: A shell script to be executed in the step. When script is provided, 841 // the user cannot specify the entrypoint or args. 842 Script string `json:"script,omitempty"` 843 // SecretEnv: A list of environment variables which are encrypted using a Cloud 844 // Key Management Service crypto key. These values must be specified in the 845 // build's `Secret`. 846 SecretEnv []string `json:"secretEnv,omitempty"` 847 // Status: Output only. Status of the build step. At this time, build step 848 // status is only updated on build completion; step status is not updated in 849 // real-time as the build progresses. 850 // 851 // Possible values: 852 // "STATUS_UNKNOWN" - Status of the build is unknown. 853 // "PENDING" - Build has been created and is pending execution and queuing. 854 // It has not been queued. 855 // "QUEUING" - Build has been received and is being queued. 856 // "QUEUED" - Build or step is queued; work has not yet begun. 857 // "WORKING" - Build or step is being executed. 858 // "SUCCESS" - Build or step finished successfully. 859 // "FAILURE" - Build or step failed to complete successfully. 860 // "INTERNAL_ERROR" - Build or step failed due to an internal cause. 861 // "TIMEOUT" - Build or step took longer than was allowed. 862 // "CANCELLED" - Build or step was canceled by a user. 863 // "EXPIRED" - Build was enqueued for longer than the value of `queue_ttl`. 864 Status string `json:"status,omitempty"` 865 // Timeout: Time limit for executing this build step. If not defined, the step 866 // has no time limit and will be allowed to continue to run until either it 867 // completes or the build itself times out. 868 Timeout string `json:"timeout,omitempty"` 869 // Timing: Output only. Stores timing information for executing this build 870 // step. 871 Timing *TimeSpan `json:"timing,omitempty"` 872 // Volumes: List of volumes to mount into the build step. Each volume is 873 // created as an empty volume prior to execution of the build step. Upon 874 // completion of the build, volumes and their contents are discarded. Using a 875 // named volume in only one step is not valid as it is indicative of a build 876 // request with an incorrect configuration. 877 Volumes []*Volume `json:"volumes,omitempty"` 878 // WaitFor: The ID(s) of the step(s) that this build step depends on. This 879 // build step will not start until all the build steps in `wait_for` have 880 // completed successfully. If `wait_for` is empty, this build step will start 881 // when all previous build steps in the `Build.Steps` list have completed 882 // successfully. 883 WaitFor []string `json:"waitFor,omitempty"` 884 // ForceSendFields is a list of field names (e.g. "AllowExitCodes") to 885 // unconditionally include in API requests. By default, fields with empty or 886 // default values are omitted from API requests. See 887 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 888 // details. 889 ForceSendFields []string `json:"-"` 890 // NullFields is a list of field names (e.g. "AllowExitCodes") to include in 891 // API requests with the JSON null value. By default, fields with empty values 892 // are omitted from API requests. See 893 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 894 NullFields []string `json:"-"` 895 } 896 897 func (s *BuildStep) MarshalJSON() ([]byte, error) { 898 type NoMethod BuildStep 899 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 900 } 901 902 // BuildType: Note holding the version of the provider's builder and the 903 // signature of the provenance message in linked BuildDetails. 904 type BuildType struct { 905 // BuilderVersion: Version of the builder which produced this Note. 906 BuilderVersion string `json:"builderVersion,omitempty"` 907 // Signature: Signature of the build in Occurrences pointing to the Note 908 // containing this `BuilderDetails`. 909 Signature *BuildSignature `json:"signature,omitempty"` 910 // ForceSendFields is a list of field names (e.g. "BuilderVersion") to 911 // unconditionally include in API requests. By default, fields with empty or 912 // default values are omitted from API requests. See 913 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 914 // details. 915 ForceSendFields []string `json:"-"` 916 // NullFields is a list of field names (e.g. "BuilderVersion") to include in 917 // API requests with the JSON null value. By default, fields with empty values 918 // are omitted from API requests. See 919 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 920 NullFields []string `json:"-"` 921 } 922 923 func (s *BuildType) MarshalJSON() ([]byte, error) { 924 type NoMethod BuildType 925 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 926 } 927 928 type BuilderConfig struct { 929 Id string `json:"id,omitempty"` 930 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 931 // include in API requests. By default, fields with empty or default values are 932 // omitted from API requests. See 933 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 934 // details. 935 ForceSendFields []string `json:"-"` 936 // NullFields is a list of field names (e.g. "Id") to include in API requests 937 // with the JSON null value. By default, fields with empty values are omitted 938 // from API requests. See 939 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 940 NullFields []string `json:"-"` 941 } 942 943 func (s *BuilderConfig) MarshalJSON() ([]byte, error) { 944 type NoMethod BuilderConfig 945 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 946 } 947 948 // CVSS: Common Vulnerability Scoring System. This message is compatible with 949 // CVSS v2 and v3. For CVSS v2 details, see https://www.first.org/cvss/v2/guide 950 // CVSS v2 calculator: https://nvd.nist.gov/vuln-metrics/cvss/v2-calculator For 951 // CVSS v3 details, see https://www.first.org/cvss/specification-document CVSS 952 // v3 calculator: https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator 953 type CVSS struct { 954 // AttackComplexity: Defined in CVSS v3, CVSS v2 955 // 956 // Possible values: 957 // "ATTACK_COMPLEXITY_UNSPECIFIED" - Defined in CVSS v3, CVSS v2 958 // "ATTACK_COMPLEXITY_LOW" - Defined in CVSS v3, CVSS v2 959 // "ATTACK_COMPLEXITY_HIGH" - Defined in CVSS v3, CVSS v2 960 // "ATTACK_COMPLEXITY_MEDIUM" - Defined in CVSS v2 961 AttackComplexity string `json:"attackComplexity,omitempty"` 962 // AttackVector: Base Metrics Represents the intrinsic characteristics of a 963 // vulnerability that are constant over time and across user environments. 964 // Defined in CVSS v3, CVSS v2 965 // 966 // Possible values: 967 // "ATTACK_VECTOR_UNSPECIFIED" - Defined in CVSS v3, CVSS v2 968 // "ATTACK_VECTOR_NETWORK" - Defined in CVSS v3, CVSS v2 969 // "ATTACK_VECTOR_ADJACENT" - Defined in CVSS v3, CVSS v2 970 // "ATTACK_VECTOR_LOCAL" - Defined in CVSS v3, CVSS v2 971 // "ATTACK_VECTOR_PHYSICAL" - Defined in CVSS v3 972 AttackVector string `json:"attackVector,omitempty"` 973 // Authentication: Defined in CVSS v2 974 // 975 // Possible values: 976 // "AUTHENTICATION_UNSPECIFIED" - Defined in CVSS v2 977 // "AUTHENTICATION_MULTIPLE" - Defined in CVSS v2 978 // "AUTHENTICATION_SINGLE" - Defined in CVSS v2 979 // "AUTHENTICATION_NONE" - Defined in CVSS v2 980 Authentication string `json:"authentication,omitempty"` 981 // AvailabilityImpact: Defined in CVSS v3, CVSS v2 982 // 983 // Possible values: 984 // "IMPACT_UNSPECIFIED" - Defined in CVSS v3, CVSS v2 985 // "IMPACT_HIGH" - Defined in CVSS v3 986 // "IMPACT_LOW" - Defined in CVSS v3 987 // "IMPACT_NONE" - Defined in CVSS v3, CVSS v2 988 // "IMPACT_PARTIAL" - Defined in CVSS v2 989 // "IMPACT_COMPLETE" - Defined in CVSS v2 990 AvailabilityImpact string `json:"availabilityImpact,omitempty"` 991 // BaseScore: The base score is a function of the base metric scores. 992 BaseScore float64 `json:"baseScore,omitempty"` 993 // ConfidentialityImpact: Defined in CVSS v3, CVSS v2 994 // 995 // Possible values: 996 // "IMPACT_UNSPECIFIED" - Defined in CVSS v3, CVSS v2 997 // "IMPACT_HIGH" - Defined in CVSS v3 998 // "IMPACT_LOW" - Defined in CVSS v3 999 // "IMPACT_NONE" - Defined in CVSS v3, CVSS v2 1000 // "IMPACT_PARTIAL" - Defined in CVSS v2 1001 // "IMPACT_COMPLETE" - Defined in CVSS v2 1002 ConfidentialityImpact string `json:"confidentialityImpact,omitempty"` 1003 ExploitabilityScore float64 `json:"exploitabilityScore,omitempty"` 1004 ImpactScore float64 `json:"impactScore,omitempty"` 1005 // IntegrityImpact: Defined in CVSS v3, CVSS v2 1006 // 1007 // Possible values: 1008 // "IMPACT_UNSPECIFIED" - Defined in CVSS v3, CVSS v2 1009 // "IMPACT_HIGH" - Defined in CVSS v3 1010 // "IMPACT_LOW" - Defined in CVSS v3 1011 // "IMPACT_NONE" - Defined in CVSS v3, CVSS v2 1012 // "IMPACT_PARTIAL" - Defined in CVSS v2 1013 // "IMPACT_COMPLETE" - Defined in CVSS v2 1014 IntegrityImpact string `json:"integrityImpact,omitempty"` 1015 // PrivilegesRequired: Defined in CVSS v3 1016 // 1017 // Possible values: 1018 // "PRIVILEGES_REQUIRED_UNSPECIFIED" - Defined in CVSS v3 1019 // "PRIVILEGES_REQUIRED_NONE" - Defined in CVSS v3 1020 // "PRIVILEGES_REQUIRED_LOW" - Defined in CVSS v3 1021 // "PRIVILEGES_REQUIRED_HIGH" - Defined in CVSS v3 1022 PrivilegesRequired string `json:"privilegesRequired,omitempty"` 1023 // Scope: Defined in CVSS v3 1024 // 1025 // Possible values: 1026 // "SCOPE_UNSPECIFIED" - Defined in CVSS v3 1027 // "SCOPE_UNCHANGED" - Defined in CVSS v3 1028 // "SCOPE_CHANGED" - Defined in CVSS v3 1029 Scope string `json:"scope,omitempty"` 1030 // UserInteraction: Defined in CVSS v3 1031 // 1032 // Possible values: 1033 // "USER_INTERACTION_UNSPECIFIED" - Defined in CVSS v3 1034 // "USER_INTERACTION_NONE" - Defined in CVSS v3 1035 // "USER_INTERACTION_REQUIRED" - Defined in CVSS v3 1036 UserInteraction string `json:"userInteraction,omitempty"` 1037 // ForceSendFields is a list of field names (e.g. "AttackComplexity") to 1038 // unconditionally include in API requests. By default, fields with empty or 1039 // default values are omitted from API requests. See 1040 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1041 // details. 1042 ForceSendFields []string `json:"-"` 1043 // NullFields is a list of field names (e.g. "AttackComplexity") to include in 1044 // API requests with the JSON null value. By default, fields with empty values 1045 // are omitted from API requests. See 1046 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1047 NullFields []string `json:"-"` 1048 } 1049 1050 func (s *CVSS) MarshalJSON() ([]byte, error) { 1051 type NoMethod CVSS 1052 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1053 } 1054 1055 func (s *CVSS) UnmarshalJSON(data []byte) error { 1056 type NoMethod CVSS 1057 var s1 struct { 1058 BaseScore gensupport.JSONFloat64 `json:"baseScore"` 1059 ExploitabilityScore gensupport.JSONFloat64 `json:"exploitabilityScore"` 1060 ImpactScore gensupport.JSONFloat64 `json:"impactScore"` 1061 *NoMethod 1062 } 1063 s1.NoMethod = (*NoMethod)(s) 1064 if err := json.Unmarshal(data, &s1); err != nil { 1065 return err 1066 } 1067 s.BaseScore = float64(s1.BaseScore) 1068 s.ExploitabilityScore = float64(s1.ExploitabilityScore) 1069 s.ImpactScore = float64(s1.ImpactScore) 1070 return nil 1071 } 1072 1073 // CisBenchmark: A compliance check that is a CIS benchmark. 1074 type CisBenchmark struct { 1075 // ProfileLevel: The profile level of this CIS benchmark check. 1076 ProfileLevel int64 `json:"profileLevel,omitempty"` 1077 // Severity: The severity level of this CIS benchmark check. 1078 // 1079 // Possible values: 1080 // "SEVERITY_UNSPECIFIED" - Unknown Impact 1081 // "MINIMAL" - Minimal Impact 1082 // "LOW" - Low Impact 1083 // "MEDIUM" - Medium Impact 1084 // "HIGH" - High Impact 1085 // "CRITICAL" - Critical Impact 1086 Severity string `json:"severity,omitempty"` 1087 // ForceSendFields is a list of field names (e.g. "ProfileLevel") to 1088 // unconditionally include in API requests. By default, fields with empty or 1089 // default values are omitted from API requests. See 1090 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1091 // details. 1092 ForceSendFields []string `json:"-"` 1093 // NullFields is a list of field names (e.g. "ProfileLevel") to include in API 1094 // requests with the JSON null value. By default, fields with empty values are 1095 // omitted from API requests. See 1096 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1097 NullFields []string `json:"-"` 1098 } 1099 1100 func (s *CisBenchmark) MarshalJSON() ([]byte, error) { 1101 type NoMethod CisBenchmark 1102 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1103 } 1104 1105 // Command: Command describes a step performed as part of the build pipeline. 1106 type Command struct { 1107 // Args: Command-line arguments used when executing this Command. 1108 Args []string `json:"args,omitempty"` 1109 // Dir: Working directory (relative to project source root) used when running 1110 // this Command. 1111 Dir string `json:"dir,omitempty"` 1112 // Env: Environment variables set before running this Command. 1113 Env []string `json:"env,omitempty"` 1114 // Id: Optional unique identifier for this Command, used in wait_for to 1115 // reference this Command as a dependency. 1116 Id string `json:"id,omitempty"` 1117 // Name: Name of the command, as presented on the command line, or if the 1118 // command is packaged as a Docker container, as presented to `docker pull`. 1119 Name string `json:"name,omitempty"` 1120 // WaitFor: The ID(s) of the Command(s) that this Command depends on. 1121 WaitFor []string `json:"waitFor,omitempty"` 1122 // ForceSendFields is a list of field names (e.g. "Args") to unconditionally 1123 // include in API requests. By default, fields with empty or default values are 1124 // omitted from API requests. See 1125 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1126 // details. 1127 ForceSendFields []string `json:"-"` 1128 // NullFields is a list of field names (e.g. "Args") to include in API requests 1129 // with the JSON null value. By default, fields with empty values are omitted 1130 // from API requests. See 1131 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1132 NullFields []string `json:"-"` 1133 } 1134 1135 func (s *Command) MarshalJSON() ([]byte, error) { 1136 type NoMethod Command 1137 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1138 } 1139 1140 // Completeness: Indicates that the builder claims certain fields in this 1141 // message to be complete. 1142 type Completeness struct { 1143 // Arguments: If true, the builder claims that recipe.arguments is complete, 1144 // meaning that all external inputs are properly captured in the recipe. 1145 Arguments bool `json:"arguments,omitempty"` 1146 // Environment: If true, the builder claims that recipe.environment is claimed 1147 // to be complete. 1148 Environment bool `json:"environment,omitempty"` 1149 // Materials: If true, the builder claims that materials are complete, usually 1150 // through some controls to prevent network access. Sometimes called 1151 // "hermetic". 1152 Materials bool `json:"materials,omitempty"` 1153 // ForceSendFields is a list of field names (e.g. "Arguments") 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. "Arguments") to include in API 1160 // requests with the JSON null value. By default, fields with empty values are 1161 // 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 *Completeness) MarshalJSON() ([]byte, error) { 1167 type NoMethod Completeness 1168 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1169 } 1170 1171 // ComplianceNote: ComplianceNote encapsulates all information about a specific 1172 // compliance check. 1173 type ComplianceNote struct { 1174 // CisBenchmark: Right now we only have one compliance type, but we may add 1175 // additional types in the future. 1176 CisBenchmark *CisBenchmark `json:"cisBenchmark,omitempty"` 1177 // Description: A description about this compliance check. 1178 Description string `json:"description,omitempty"` 1179 // Impact: Potential impact of the suggested remediation 1180 Impact string `json:"impact,omitempty"` 1181 // Rationale: A rationale for the existence of this compliance check. 1182 Rationale string `json:"rationale,omitempty"` 1183 // Remediation: A description of remediation steps if the compliance check 1184 // fails. 1185 Remediation string `json:"remediation,omitempty"` 1186 // ScanInstructions: Serialized scan instructions with a predefined format. 1187 ScanInstructions string `json:"scanInstructions,omitempty"` 1188 // Title: The title that identifies this compliance check. 1189 Title string `json:"title,omitempty"` 1190 // Version: The OS and config versions the benchmark applies to. 1191 Version []*ComplianceVersion `json:"version,omitempty"` 1192 // ForceSendFields is a list of field names (e.g. "CisBenchmark") to 1193 // unconditionally include in API requests. By default, fields with empty or 1194 // default values are omitted from API requests. See 1195 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1196 // details. 1197 ForceSendFields []string `json:"-"` 1198 // NullFields is a list of field names (e.g. "CisBenchmark") to include in API 1199 // requests with the JSON null value. By default, fields with empty values are 1200 // omitted from API requests. See 1201 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1202 NullFields []string `json:"-"` 1203 } 1204 1205 func (s *ComplianceNote) MarshalJSON() ([]byte, error) { 1206 type NoMethod ComplianceNote 1207 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1208 } 1209 1210 // ComplianceOccurrence: An indication that the compliance checks in the 1211 // associated ComplianceNote were not satisfied for particular resources or a 1212 // specified reason. 1213 type ComplianceOccurrence struct { 1214 // NonComplianceReason: The reason for non compliance of these files. 1215 NonComplianceReason string `json:"nonComplianceReason,omitempty"` 1216 // NonCompliantFiles: A list of files which are violating compliance checks. 1217 NonCompliantFiles []*NonCompliantFile `json:"nonCompliantFiles,omitempty"` 1218 // ForceSendFields is a list of field names (e.g. "NonComplianceReason") to 1219 // unconditionally include in API requests. By default, fields with empty or 1220 // default values are omitted from API requests. See 1221 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1222 // details. 1223 ForceSendFields []string `json:"-"` 1224 // NullFields is a list of field names (e.g. "NonComplianceReason") to include 1225 // in API requests with the JSON null value. By default, fields with empty 1226 // values are omitted from API requests. See 1227 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1228 NullFields []string `json:"-"` 1229 } 1230 1231 func (s *ComplianceOccurrence) MarshalJSON() ([]byte, error) { 1232 type NoMethod ComplianceOccurrence 1233 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1234 } 1235 1236 // ComplianceVersion: Describes the CIS benchmark version that is applicable to 1237 // a given OS and os version. 1238 type ComplianceVersion struct { 1239 // BenchmarkDocument: The name of the document that defines this benchmark, 1240 // e.g. "CIS Container-Optimized OS". 1241 BenchmarkDocument string `json:"benchmarkDocument,omitempty"` 1242 // CpeUri: The CPE URI (https://cpe.mitre.org/specification/) this benchmark is 1243 // applicable to. 1244 CpeUri string `json:"cpeUri,omitempty"` 1245 // Version: The version of the benchmark. This is set to the version of the 1246 // OS-specific CIS document the benchmark is defined in. 1247 Version string `json:"version,omitempty"` 1248 // ForceSendFields is a list of field names (e.g. "BenchmarkDocument") to 1249 // unconditionally include in API requests. By default, fields with empty or 1250 // default values are omitted from API requests. See 1251 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1252 // details. 1253 ForceSendFields []string `json:"-"` 1254 // NullFields is a list of field names (e.g. "BenchmarkDocument") to include in 1255 // API requests with the JSON null value. By default, fields with empty values 1256 // are omitted from API requests. See 1257 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1258 NullFields []string `json:"-"` 1259 } 1260 1261 func (s *ComplianceVersion) MarshalJSON() ([]byte, error) { 1262 type NoMethod ComplianceVersion 1263 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1264 } 1265 1266 // ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalConfig: ApprovalConfig 1267 // describes configuration for manual approval of a build. 1268 type ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalConfig struct { 1269 // ApprovalRequired: Whether or not approval is needed. If this is set on a 1270 // build, it will become pending when created, and will need to be explicitly 1271 // approved to start. 1272 ApprovalRequired bool `json:"approvalRequired,omitempty"` 1273 // ForceSendFields is a list of field names (e.g. "ApprovalRequired") to 1274 // unconditionally include in API requests. By default, fields with empty or 1275 // default values are omitted from API requests. See 1276 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1277 // details. 1278 ForceSendFields []string `json:"-"` 1279 // NullFields is a list of field names (e.g. "ApprovalRequired") to include in 1280 // API requests with the JSON null value. By default, fields with empty values 1281 // are omitted from API requests. See 1282 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1283 NullFields []string `json:"-"` 1284 } 1285 1286 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalConfig) MarshalJSON() ([]byte, error) { 1287 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalConfig 1288 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1289 } 1290 1291 // ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalResult: ApprovalResult 1292 // describes the decision and associated metadata of a manual approval of a 1293 // build. 1294 type ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalResult struct { 1295 // ApprovalTime: Output only. The time when the approval decision was made. 1296 ApprovalTime string `json:"approvalTime,omitempty"` 1297 // ApproverAccount: Output only. Email of the user that called the ApproveBuild 1298 // API to approve or reject a build at the time that the API was called. 1299 ApproverAccount string `json:"approverAccount,omitempty"` 1300 // Comment: Optional. An optional comment for this manual approval result. 1301 Comment string `json:"comment,omitempty"` 1302 // Decision: Required. The decision of this manual approval. 1303 // 1304 // Possible values: 1305 // "DECISION_UNSPECIFIED" - Default enum type. This should not be used. 1306 // "APPROVED" - Build is approved. 1307 // "REJECTED" - Build is rejected. 1308 Decision string `json:"decision,omitempty"` 1309 // Url: Optional. An optional URL tied to this manual approval result. This 1310 // field is essentially the same as comment, except that it will be rendered by 1311 // the UI differently. An example use case is a link to an external job that 1312 // approved this Build. 1313 Url string `json:"url,omitempty"` 1314 // ForceSendFields is a list of field names (e.g. "ApprovalTime") to 1315 // unconditionally include in API requests. By default, fields with empty or 1316 // default values are omitted from API requests. See 1317 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1318 // details. 1319 ForceSendFields []string `json:"-"` 1320 // NullFields is a list of field names (e.g. "ApprovalTime") to include in API 1321 // requests with the JSON null value. By default, fields with empty values are 1322 // omitted from API requests. See 1323 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1324 NullFields []string `json:"-"` 1325 } 1326 1327 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalResult) MarshalJSON() ([]byte, error) { 1328 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalResult 1329 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1330 } 1331 1332 // ContaineranalysisGoogleDevtoolsCloudbuildV1Artifacts: Artifacts produced by 1333 // a build that should be uploaded upon successful completion of all build 1334 // steps. 1335 type ContaineranalysisGoogleDevtoolsCloudbuildV1Artifacts struct { 1336 // Images: A list of images to be pushed upon the successful completion of all 1337 // build steps. The images will be pushed using the builder service account's 1338 // credentials. The digests of the pushed images will be stored in the Build 1339 // resource's results field. If any of the images fail to be pushed, the build 1340 // is marked FAILURE. 1341 Images []string `json:"images,omitempty"` 1342 // MavenArtifacts: A list of Maven artifacts to be uploaded to Artifact 1343 // Registry upon successful completion of all build steps. Artifacts in the 1344 // workspace matching specified paths globs will be uploaded to the specified 1345 // Artifact Registry repository using the builder service account's 1346 // credentials. If any artifacts fail to be pushed, the build is marked 1347 // FAILURE. 1348 MavenArtifacts []*ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsMavenArtifact `json:"mavenArtifacts,omitempty"` 1349 // NpmPackages: A list of npm packages to be uploaded to Artifact Registry upon 1350 // successful completion of all build steps. Npm packages in the specified 1351 // paths will be uploaded to the specified Artifact Registry repository using 1352 // the builder service account's credentials. If any packages fail to be 1353 // pushed, the build is marked FAILURE. 1354 NpmPackages []*ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage `json:"npmPackages,omitempty"` 1355 // Objects: A list of objects to be uploaded to Cloud Storage upon successful 1356 // completion of all build steps. Files in the workspace matching specified 1357 // paths globs will be uploaded to the specified Cloud Storage location using 1358 // the builder service account's credentials. The location and generation of 1359 // the uploaded objects will be stored in the Build resource's results field. 1360 // If any objects fail to be pushed, the build is marked FAILURE. 1361 Objects *ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects `json:"objects,omitempty"` 1362 // PythonPackages: A list of Python packages to be uploaded to Artifact 1363 // Registry upon successful completion of all build steps. The build service 1364 // account credentials will be used to perform the upload. If any objects fail 1365 // to be pushed, the build is marked FAILURE. 1366 PythonPackages []*ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsPythonPackage `json:"pythonPackages,omitempty"` 1367 // ForceSendFields is a list of field names (e.g. "Images") to unconditionally 1368 // include in API requests. By default, fields with empty or default values are 1369 // omitted from API requests. See 1370 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1371 // details. 1372 ForceSendFields []string `json:"-"` 1373 // NullFields is a list of field names (e.g. "Images") to include in API 1374 // requests with the JSON null value. By default, fields with empty values are 1375 // omitted from API requests. See 1376 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1377 NullFields []string `json:"-"` 1378 } 1379 1380 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1Artifacts) MarshalJSON() ([]byte, error) { 1381 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1Artifacts 1382 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1383 } 1384 1385 // ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects: Files 1386 // in the workspace to upload to Cloud Storage upon successful completion of 1387 // all build steps. 1388 type ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects struct { 1389 // Location: Cloud Storage bucket and optional object path, in the form 1390 // "gs://bucket/path/to/somewhere/". (see Bucket Name Requirements 1391 // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). Files 1392 // in the workspace matching any path pattern will be uploaded to Cloud Storage 1393 // with this location as a prefix. 1394 Location string `json:"location,omitempty"` 1395 // Paths: Path globs used to match files in the build's workspace. 1396 Paths []string `json:"paths,omitempty"` 1397 // Timing: Output only. Stores timing information for pushing all artifact 1398 // objects. 1399 Timing *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"timing,omitempty"` 1400 // ForceSendFields is a list of field names (e.g. "Location") to 1401 // unconditionally include in API requests. By default, fields with empty or 1402 // default values are omitted from API requests. See 1403 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1404 // details. 1405 ForceSendFields []string `json:"-"` 1406 // NullFields is a list of field names (e.g. "Location") to include in API 1407 // requests with the JSON null value. By default, fields with empty values are 1408 // omitted from API requests. See 1409 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1410 NullFields []string `json:"-"` 1411 } 1412 1413 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects) MarshalJSON() ([]byte, error) { 1414 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects 1415 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1416 } 1417 1418 // ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsMavenArtifact: A Maven 1419 // artifact to upload to Artifact Registry upon successful completion of all 1420 // build steps. 1421 type ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsMavenArtifact struct { 1422 // ArtifactId: Maven `artifactId` value used when uploading the artifact to 1423 // Artifact Registry. 1424 ArtifactId string `json:"artifactId,omitempty"` 1425 // GroupId: Maven `groupId` value used when uploading the artifact to Artifact 1426 // Registry. 1427 GroupId string `json:"groupId,omitempty"` 1428 // Path: Path to an artifact in the build's workspace to be uploaded to 1429 // Artifact Registry. This can be either an absolute path, e.g. 1430 // /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar or a relative path from 1431 // /workspace, e.g. my-app/target/my-app-1.0.SNAPSHOT.jar. 1432 Path string `json:"path,omitempty"` 1433 // Repository: Artifact Registry repository, in the form 1434 // "https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY" Artifact in the 1435 // workspace specified by path will be uploaded to Artifact Registry with this 1436 // location as a prefix. 1437 Repository string `json:"repository,omitempty"` 1438 // Version: Maven `version` value used when uploading the artifact to Artifact 1439 // Registry. 1440 Version string `json:"version,omitempty"` 1441 // ForceSendFields is a list of field names (e.g. "ArtifactId") to 1442 // unconditionally include in API requests. By default, fields with empty or 1443 // default values are omitted from API requests. See 1444 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1445 // details. 1446 ForceSendFields []string `json:"-"` 1447 // NullFields is a list of field names (e.g. "ArtifactId") to include in API 1448 // requests with the JSON null value. By default, fields with empty values are 1449 // omitted from API requests. See 1450 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1451 NullFields []string `json:"-"` 1452 } 1453 1454 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsMavenArtifact) MarshalJSON() ([]byte, error) { 1455 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsMavenArtifact 1456 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1457 } 1458 1459 // ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage: Npm package 1460 // to upload to Artifact Registry upon successful completion of all build 1461 // steps. 1462 type ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage struct { 1463 // PackagePath: Path to the package.json. e.g. workspace/path/to/package 1464 PackagePath string `json:"packagePath,omitempty"` 1465 // Repository: Artifact Registry repository, in the form 1466 // "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY" Npm package in the 1467 // workspace specified by path will be zipped and uploaded to Artifact Registry 1468 // with this location as a prefix. 1469 Repository string `json:"repository,omitempty"` 1470 // ForceSendFields is a list of field names (e.g. "PackagePath") to 1471 // unconditionally include in API requests. By default, fields with empty or 1472 // default values are omitted from API requests. See 1473 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1474 // details. 1475 ForceSendFields []string `json:"-"` 1476 // NullFields is a list of field names (e.g. "PackagePath") to include in API 1477 // requests with the JSON null value. By default, fields with empty values are 1478 // omitted from API requests. See 1479 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1480 NullFields []string `json:"-"` 1481 } 1482 1483 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage) MarshalJSON() ([]byte, error) { 1484 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage 1485 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1486 } 1487 1488 // ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsPythonPackage: Python 1489 // package to upload to Artifact Registry upon successful completion of all 1490 // build steps. A package can encapsulate multiple objects to be uploaded to a 1491 // single repository. 1492 type ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsPythonPackage struct { 1493 // Paths: Path globs used to match files in the build's workspace. For Python/ 1494 // Twine, this is usually `dist/*`, and sometimes additionally an `.asc` file. 1495 Paths []string `json:"paths,omitempty"` 1496 // Repository: Artifact Registry repository, in the form 1497 // "https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY" Files in the workspace 1498 // matching any path pattern will be uploaded to Artifact Registry with this 1499 // location as a prefix. 1500 Repository string `json:"repository,omitempty"` 1501 // ForceSendFields is a list of field names (e.g. "Paths") to unconditionally 1502 // include in API requests. By default, fields with empty or default values are 1503 // omitted from API requests. See 1504 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1505 // details. 1506 ForceSendFields []string `json:"-"` 1507 // NullFields is a list of field names (e.g. "Paths") to include in API 1508 // requests with the JSON null value. By default, fields with empty values are 1509 // omitted from API requests. See 1510 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1511 NullFields []string `json:"-"` 1512 } 1513 1514 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsPythonPackage) MarshalJSON() ([]byte, error) { 1515 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsPythonPackage 1516 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1517 } 1518 1519 // ContaineranalysisGoogleDevtoolsCloudbuildV1Build: A build resource in the 1520 // Cloud Build API. At a high level, a `Build` describes where to find source 1521 // code, how to build it (for example, the builder image to run on the source), 1522 // and where to store the built artifacts. Fields can include the following 1523 // variables, which will be expanded when the build is created: - $PROJECT_ID: 1524 // the project ID of the build. - $PROJECT_NUMBER: the project number of the 1525 // build. - $LOCATION: the location/region of the build. - $BUILD_ID: the 1526 // autogenerated ID of the build. - $REPO_NAME: the source repository name 1527 // specified by RepoSource. - $BRANCH_NAME: the branch name specified by 1528 // RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - 1529 // $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or 1530 // resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters 1531 // of $REVISION_ID or $COMMIT_SHA. 1532 type ContaineranalysisGoogleDevtoolsCloudbuildV1Build struct { 1533 // Approval: Output only. Describes this build's approval configuration, 1534 // status, and result. 1535 Approval *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildApproval `json:"approval,omitempty"` 1536 // Artifacts: Artifacts produced by the build that should be uploaded upon 1537 // successful completion of all build steps. 1538 Artifacts *ContaineranalysisGoogleDevtoolsCloudbuildV1Artifacts `json:"artifacts,omitempty"` 1539 // AvailableSecrets: Secrets and secret environment variables. 1540 AvailableSecrets *ContaineranalysisGoogleDevtoolsCloudbuildV1Secrets `json:"availableSecrets,omitempty"` 1541 // BuildTriggerId: Output only. The ID of the `BuildTrigger` that triggered 1542 // this build, if it was triggered automatically. 1543 BuildTriggerId string `json:"buildTriggerId,omitempty"` 1544 // CreateTime: Output only. Time at which the request to create the build was 1545 // received. 1546 CreateTime string `json:"createTime,omitempty"` 1547 // FailureInfo: Output only. Contains information about the build when 1548 // status=FAILURE. 1549 FailureInfo *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildFailureInfo `json:"failureInfo,omitempty"` 1550 // FinishTime: Output only. Time at which execution of the build was finished. 1551 // The difference between finish_time and start_time is the duration of the 1552 // build's execution. 1553 FinishTime string `json:"finishTime,omitempty"` 1554 // GitConfig: Optional. Configuration for git operations. 1555 GitConfig *ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfig `json:"gitConfig,omitempty"` 1556 // Id: Output only. Unique identifier of the build. 1557 Id string `json:"id,omitempty"` 1558 // Images: A list of images to be pushed upon the successful completion of all 1559 // build steps. The images are pushed using the builder service account's 1560 // credentials. The digests of the pushed images will be stored in the `Build` 1561 // resource's results field. If any of the images fail to be pushed, the build 1562 // status is marked `FAILURE`. 1563 Images []string `json:"images,omitempty"` 1564 // LogUrl: Output only. URL to logs for this build in Google Cloud Console. 1565 LogUrl string `json:"logUrl,omitempty"` 1566 // LogsBucket: Cloud Storage bucket where logs should be written (see Bucket 1567 // Name Requirements 1568 // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs 1569 // file names will be of the format `${logs_bucket}/log-${build_id}.txt`. 1570 LogsBucket string `json:"logsBucket,omitempty"` 1571 // Name: Output only. The 'Build' name with format: 1572 // `projects/{project}/locations/{location}/builds/{build}`, where {build} is a 1573 // unique identifier generated by the service. 1574 Name string `json:"name,omitempty"` 1575 // Options: Special options for this build. 1576 Options *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptions `json:"options,omitempty"` 1577 // ProjectId: Output only. ID of the project. 1578 ProjectId string `json:"projectId,omitempty"` 1579 // QueueTtl: TTL in queue for this build. If provided and the build is enqueued 1580 // longer than this value, the build will expire and the build status will be 1581 // `EXPIRED`. The TTL starts ticking from create_time. 1582 QueueTtl string `json:"queueTtl,omitempty"` 1583 // Results: Output only. Results of the build. 1584 Results *ContaineranalysisGoogleDevtoolsCloudbuildV1Results `json:"results,omitempty"` 1585 // Secrets: Secrets to decrypt using Cloud Key Management Service. Note: Secret 1586 // Manager is the recommended technique for managing sensitive data with Cloud 1587 // Build. Use `available_secrets` to configure builds to access secrets from 1588 // Secret Manager. For instructions, see: 1589 // https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets 1590 Secrets []*ContaineranalysisGoogleDevtoolsCloudbuildV1Secret `json:"secrets,omitempty"` 1591 // ServiceAccount: IAM service account whose credentials will be used at build 1592 // runtime. Must be of the format 1593 // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email 1594 // address or uniqueId of the service account. 1595 ServiceAccount string `json:"serviceAccount,omitempty"` 1596 // Source: The location of the source files to build. 1597 Source *ContaineranalysisGoogleDevtoolsCloudbuildV1Source `json:"source,omitempty"` 1598 // SourceProvenance: Output only. A permanent fixed identifier for source. 1599 SourceProvenance *ContaineranalysisGoogleDevtoolsCloudbuildV1SourceProvenance `json:"sourceProvenance,omitempty"` 1600 // StartTime: Output only. Time at which execution of the build was started. 1601 StartTime string `json:"startTime,omitempty"` 1602 // Status: Output only. Status of the build. 1603 // 1604 // Possible values: 1605 // "STATUS_UNKNOWN" - Status of the build is unknown. 1606 // "PENDING" - Build has been created and is pending execution and queuing. 1607 // It has not been queued. 1608 // "QUEUED" - Build or step is queued; work has not yet begun. 1609 // "WORKING" - Build or step is being executed. 1610 // "SUCCESS" - Build or step finished successfully. 1611 // "FAILURE" - Build or step failed to complete successfully. 1612 // "INTERNAL_ERROR" - Build or step failed due to an internal cause. 1613 // "TIMEOUT" - Build or step took longer than was allowed. 1614 // "CANCELLED" - Build or step was canceled by a user. 1615 // "EXPIRED" - Build was enqueued for longer than the value of `queue_ttl`. 1616 Status string `json:"status,omitempty"` 1617 // StatusDetail: Output only. Customer-readable message about the current 1618 // status. 1619 StatusDetail string `json:"statusDetail,omitempty"` 1620 // Steps: Required. The operations to be performed on the workspace. 1621 Steps []*ContaineranalysisGoogleDevtoolsCloudbuildV1BuildStep `json:"steps,omitempty"` 1622 // Substitutions: Substitutions data for `Build` resource. 1623 Substitutions map[string]string `json:"substitutions,omitempty"` 1624 // Tags: Tags for annotation of a `Build`. These are not docker tags. 1625 Tags []string `json:"tags,omitempty"` 1626 // Timeout: Amount of time that this build should be allowed to run, to second 1627 // granularity. If this amount of time elapses, work on the build will cease 1628 // and the build status will be `TIMEOUT`. `timeout` starts ticking from 1629 // `startTime`. Default time is 60 minutes. 1630 Timeout string `json:"timeout,omitempty"` 1631 // Timing: Output only. Stores timing information for phases of the build. 1632 // Valid keys are: * BUILD: time to execute all build steps. * PUSH: time to 1633 // push all artifacts including docker images and non docker artifacts. * 1634 // FETCHSOURCE: time to fetch source. * SETUPBUILD: time to set up build. If 1635 // the build does not specify source or images, these keys will not be 1636 // included. 1637 Timing map[string]ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"timing,omitempty"` 1638 // Warnings: Output only. Non-fatal problems encountered during the execution 1639 // of the build. 1640 Warnings []*ContaineranalysisGoogleDevtoolsCloudbuildV1BuildWarning `json:"warnings,omitempty"` 1641 // ForceSendFields is a list of field names (e.g. "Approval") to 1642 // unconditionally include in API requests. By default, fields with empty or 1643 // default values are omitted from API requests. See 1644 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1645 // details. 1646 ForceSendFields []string `json:"-"` 1647 // NullFields is a list of field names (e.g. "Approval") to include in API 1648 // requests with the JSON null value. By default, fields with empty values are 1649 // omitted from API requests. See 1650 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1651 NullFields []string `json:"-"` 1652 } 1653 1654 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1Build) MarshalJSON() ([]byte, error) { 1655 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1Build 1656 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1657 } 1658 1659 // ContaineranalysisGoogleDevtoolsCloudbuildV1BuildApproval: BuildApproval 1660 // describes a build's approval configuration, state, and result. 1661 type ContaineranalysisGoogleDevtoolsCloudbuildV1BuildApproval struct { 1662 // Config: Output only. Configuration for manual approval of this build. 1663 Config *ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalConfig `json:"config,omitempty"` 1664 // Result: Output only. Result of manual approval for this Build. 1665 Result *ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalResult `json:"result,omitempty"` 1666 // State: Output only. The state of this build's approval. 1667 // 1668 // Possible values: 1669 // "STATE_UNSPECIFIED" - Default enum type. This should not be used. 1670 // "PENDING" - Build approval is pending. 1671 // "APPROVED" - Build approval has been approved. 1672 // "REJECTED" - Build approval has been rejected. 1673 // "CANCELLED" - Build was cancelled while it was still pending approval. 1674 State string `json:"state,omitempty"` 1675 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally 1676 // include in API requests. By default, fields with empty or default values are 1677 // omitted from API requests. See 1678 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1679 // details. 1680 ForceSendFields []string `json:"-"` 1681 // NullFields is a list of field names (e.g. "Config") to include in API 1682 // requests with the JSON null value. By default, fields with empty values are 1683 // omitted from API requests. See 1684 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1685 NullFields []string `json:"-"` 1686 } 1687 1688 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildApproval) MarshalJSON() ([]byte, error) { 1689 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1BuildApproval 1690 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1691 } 1692 1693 // ContaineranalysisGoogleDevtoolsCloudbuildV1BuildFailureInfo: A fatal problem 1694 // encountered during the execution of the build. 1695 type ContaineranalysisGoogleDevtoolsCloudbuildV1BuildFailureInfo struct { 1696 // Detail: Explains the failure issue in more detail using hard-coded text. 1697 Detail string `json:"detail,omitempty"` 1698 // Type: The name of the failure. 1699 // 1700 // Possible values: 1701 // "FAILURE_TYPE_UNSPECIFIED" - Type unspecified 1702 // "PUSH_FAILED" - Unable to push the image to the repository. 1703 // "PUSH_IMAGE_NOT_FOUND" - Final image not found. 1704 // "PUSH_NOT_AUTHORIZED" - Unauthorized push of the final image. 1705 // "LOGGING_FAILURE" - Backend logging failures. Should retry. 1706 // "USER_BUILD_STEP" - A build step has failed. 1707 // "FETCH_SOURCE_FAILED" - The source fetching has failed. 1708 Type string `json:"type,omitempty"` 1709 // ForceSendFields is a list of field names (e.g. "Detail") to unconditionally 1710 // include in API requests. By default, fields with empty or default values are 1711 // omitted from API requests. See 1712 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1713 // details. 1714 ForceSendFields []string `json:"-"` 1715 // NullFields is a list of field names (e.g. "Detail") to include in API 1716 // requests with the JSON null value. By default, fields with empty values are 1717 // omitted from API requests. See 1718 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1719 NullFields []string `json:"-"` 1720 } 1721 1722 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildFailureInfo) MarshalJSON() ([]byte, error) { 1723 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1BuildFailureInfo 1724 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1725 } 1726 1727 // ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptions: Optional arguments 1728 // to enable specific features of builds. 1729 type ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptions struct { 1730 // AutomapSubstitutions: Option to include built-in and custom substitutions as 1731 // env variables for all build steps. 1732 AutomapSubstitutions bool `json:"automapSubstitutions,omitempty"` 1733 // DefaultLogsBucketBehavior: Optional. Option to specify how default logs 1734 // buckets are setup. 1735 // 1736 // Possible values: 1737 // "DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED" - Unspecified. 1738 // "REGIONAL_USER_OWNED_BUCKET" - Bucket is located in user-owned project in 1739 // the same region as the build. The builder service account must have access 1740 // to create and write to Cloud Storage buckets in the build project. 1741 DefaultLogsBucketBehavior string `json:"defaultLogsBucketBehavior,omitempty"` 1742 // DiskSizeGb: Requested disk size for the VM that runs the build. Note that 1743 // this is *NOT* "disk free"; some of the space will be used by the operating 1744 // system and build utilities. Also note that this is the minimum disk size 1745 // that will be allocated for the build -- the build may run with a larger disk 1746 // than requested. At present, the maximum disk size is 2000GB; builds that 1747 // request more than the maximum are rejected with an error. 1748 DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` 1749 // DynamicSubstitutions: Option to specify whether or not to apply bash style 1750 // string operations to the substitutions. NOTE: this is always enabled for 1751 // triggered builds and cannot be overridden in the build configuration file. 1752 DynamicSubstitutions bool `json:"dynamicSubstitutions,omitempty"` 1753 // Env: A list of global environment variable definitions that will exist for 1754 // all build steps in this build. If a variable is defined in both globally and 1755 // in a build step, the variable will use the build step value. The elements 1756 // are of the form "KEY=VALUE" for the environment variable "KEY" being given 1757 // the value "VALUE". 1758 Env []string `json:"env,omitempty"` 1759 // LogStreamingOption: Option to define build log streaming behavior to Cloud 1760 // Storage. 1761 // 1762 // Possible values: 1763 // "STREAM_DEFAULT" - Service may automatically determine build log streaming 1764 // behavior. 1765 // "STREAM_ON" - Build logs should be streamed to Cloud Storage. 1766 // "STREAM_OFF" - Build logs should not be streamed to Cloud Storage; they 1767 // will be written when the build is completed. 1768 LogStreamingOption string `json:"logStreamingOption,omitempty"` 1769 // Logging: Option to specify the logging mode, which determines if and where 1770 // build logs are stored. 1771 // 1772 // Possible values: 1773 // "LOGGING_UNSPECIFIED" - The service determines the logging mode. The 1774 // default is `LEGACY`. Do not rely on the default logging behavior as it may 1775 // change in the future. 1776 // "LEGACY" - Build logs are stored in Cloud Logging and Cloud Storage. 1777 // "GCS_ONLY" - Build logs are stored in Cloud Storage. 1778 // "STACKDRIVER_ONLY" - This option is the same as CLOUD_LOGGING_ONLY. 1779 // "CLOUD_LOGGING_ONLY" - Build logs are stored in Cloud Logging. Selecting 1780 // this option will not allow [logs 1781 // streaming](https://cloud.google.com/sdk/gcloud/reference/builds/log). 1782 // "NONE" - Turn off all logging. No build logs will be captured. 1783 Logging string `json:"logging,omitempty"` 1784 // MachineType: Compute Engine machine type on which to run the build. 1785 // 1786 // Possible values: 1787 // "UNSPECIFIED" - Standard machine type. 1788 // "N1_HIGHCPU_8" - Highcpu machine with 8 CPUs. 1789 // "N1_HIGHCPU_32" - Highcpu machine with 32 CPUs. 1790 // "E2_HIGHCPU_8" - Highcpu e2 machine with 8 CPUs. 1791 // "E2_HIGHCPU_32" - Highcpu e2 machine with 32 CPUs. 1792 // "E2_MEDIUM" - E2 machine with 1 CPU. 1793 MachineType string `json:"machineType,omitempty"` 1794 // Pool: Optional. Specification for execution on a `WorkerPool`. See running 1795 // builds in a private pool 1796 // (https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 1797 // for more information. 1798 Pool *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptionsPoolOption `json:"pool,omitempty"` 1799 // RequestedVerifyOption: Requested verifiability options. 1800 // 1801 // Possible values: 1802 // "NOT_VERIFIED" - Not a verifiable build (the default). 1803 // "VERIFIED" - Build must be verified. 1804 RequestedVerifyOption string `json:"requestedVerifyOption,omitempty"` 1805 // SecretEnv: A list of global environment variables, which are encrypted using 1806 // a Cloud Key Management Service crypto key. These values must be specified in 1807 // the build's `Secret`. These variables will be available to all build steps 1808 // in this build. 1809 SecretEnv []string `json:"secretEnv,omitempty"` 1810 // SourceProvenanceHash: Requested hash for SourceProvenance. 1811 // 1812 // Possible values: 1813 // "NONE" - No hash requested. 1814 // "SHA256" - Use a sha256 hash. 1815 // "MD5" - Use a md5 hash. 1816 // "SHA512" - Use a sha512 hash. 1817 SourceProvenanceHash []string `json:"sourceProvenanceHash,omitempty"` 1818 // SubstitutionOption: Option to specify behavior when there is an error in the 1819 // substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered 1820 // builds and cannot be overridden in the build configuration file. 1821 // 1822 // Possible values: 1823 // "MUST_MATCH" - Fails the build if error in substitutions checks, like 1824 // missing a substitution in the template or in the map. 1825 // "ALLOW_LOOSE" - Do not fail the build if error in substitutions checks. 1826 SubstitutionOption string `json:"substitutionOption,omitempty"` 1827 // Volumes: Global list of volumes to mount for ALL build steps Each volume is 1828 // created as an empty volume prior to starting the build process. Upon 1829 // completion of the build, volumes and their contents are discarded. Global 1830 // volume names and paths cannot conflict with the volumes defined a build 1831 // step. Using a global volume in a build with only one step is not valid as it 1832 // is indicative of a build request with an incorrect configuration. 1833 Volumes []*ContaineranalysisGoogleDevtoolsCloudbuildV1Volume `json:"volumes,omitempty"` 1834 // WorkerPool: This field deprecated; please use `pool.name` instead. 1835 WorkerPool string `json:"workerPool,omitempty"` 1836 // ForceSendFields is a list of field names (e.g. "AutomapSubstitutions") to 1837 // unconditionally include in API requests. By default, fields with empty or 1838 // default values are omitted from API requests. See 1839 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1840 // details. 1841 ForceSendFields []string `json:"-"` 1842 // NullFields is a list of field names (e.g. "AutomapSubstitutions") to include 1843 // in API requests with the JSON null value. By default, fields with empty 1844 // values are omitted from API requests. See 1845 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1846 NullFields []string `json:"-"` 1847 } 1848 1849 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptions) MarshalJSON() ([]byte, error) { 1850 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptions 1851 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1852 } 1853 1854 // ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptionsPoolOption: Details 1855 // about how a build should be executed on a `WorkerPool`. See running builds 1856 // in a private pool 1857 // (https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 1858 // for more information. 1859 type ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptionsPoolOption struct { 1860 // Name: The `WorkerPool` resource to execute the build on. You must have 1861 // `cloudbuild.workerpools.use` on the project hosting the WorkerPool. Format 1862 // projects/{project}/locations/{location}/workerPools/{workerPoolId} 1863 Name string `json:"name,omitempty"` 1864 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 1865 // include in API requests. By default, fields with empty or default values are 1866 // omitted from API requests. See 1867 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1868 // details. 1869 ForceSendFields []string `json:"-"` 1870 // NullFields is a list of field names (e.g. "Name") to include in API requests 1871 // with the JSON null value. By default, fields with empty values are omitted 1872 // from API requests. See 1873 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1874 NullFields []string `json:"-"` 1875 } 1876 1877 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptionsPoolOption) MarshalJSON() ([]byte, error) { 1878 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptionsPoolOption 1879 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1880 } 1881 1882 // ContaineranalysisGoogleDevtoolsCloudbuildV1BuildStep: A step in the build 1883 // pipeline. 1884 type ContaineranalysisGoogleDevtoolsCloudbuildV1BuildStep struct { 1885 // AllowExitCodes: Allow this build step to fail without failing the entire 1886 // build if and only if the exit code is one of the specified codes. If 1887 // allow_failure is also specified, this field will take precedence. 1888 AllowExitCodes []int64 `json:"allowExitCodes,omitempty"` 1889 // AllowFailure: Allow this build step to fail without failing the entire 1890 // build. If false, the entire build will fail if this step fails. Otherwise, 1891 // the build will succeed, but this step will still have a failure status. 1892 // Error information will be reported in the failure_detail field. 1893 AllowFailure bool `json:"allowFailure,omitempty"` 1894 // Args: A list of arguments that will be presented to the step when it is 1895 // started. If the image used to run the step's container has an entrypoint, 1896 // the `args` are used as arguments to that entrypoint. If the image does not 1897 // define an entrypoint, the first element in args is used as the entrypoint, 1898 // and the remainder will be used as arguments. 1899 Args []string `json:"args,omitempty"` 1900 // AutomapSubstitutions: Option to include built-in and custom substitutions as 1901 // env variables for this build step. This option will override the global 1902 // option in BuildOption. 1903 AutomapSubstitutions bool `json:"automapSubstitutions,omitempty"` 1904 // Dir: Working directory to use when running this step's container. If this 1905 // value is a relative path, it is relative to the build's working directory. 1906 // If this value is absolute, it may be outside the build's working directory, 1907 // in which case the contents of the path may not be persisted across build 1908 // step executions, unless a `volume` for that path is specified. If the build 1909 // specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies 1910 // an absolute path, the `RepoSource` `dir` is ignored for the step's 1911 // execution. 1912 Dir string `json:"dir,omitempty"` 1913 // Entrypoint: Entrypoint to be used instead of the build step image's default 1914 // entrypoint. If unset, the image's default entrypoint is used. 1915 Entrypoint string `json:"entrypoint,omitempty"` 1916 // Env: A list of environment variable definitions to be used when running a 1917 // step. The elements are of the form "KEY=VALUE" for the environment variable 1918 // "KEY" being given the value "VALUE". 1919 Env []string `json:"env,omitempty"` 1920 // ExitCode: Output only. Return code from running the step. 1921 ExitCode int64 `json:"exitCode,omitempty"` 1922 // Id: Unique identifier for this build step, used in `wait_for` to reference 1923 // this build step as a dependency. 1924 Id string `json:"id,omitempty"` 1925 // Name: Required. The name of the container image that will run this 1926 // particular build step. If the image is available in the host's Docker 1927 // daemon's cache, it will be run directly. If not, the host will attempt to 1928 // pull the image first, using the builder service account's credentials if 1929 // necessary. The Docker daemon's cache will already have the latest versions 1930 // of all of the officially supported build steps 1931 // (https://github.com/GoogleCloudPlatform/cloud-builders 1932 // (https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon 1933 // will also have cached many of the layers for some popular images, like 1934 // "ubuntu", "debian", but they will be refreshed at the time you attempt to 1935 // use them. If you built an image in a previous build step, it will be stored 1936 // in the host's Docker daemon's cache and is available to use as the name for 1937 // a later build step. 1938 Name string `json:"name,omitempty"` 1939 // PullTiming: Output only. Stores timing information for pulling this build 1940 // step's builder image only. 1941 PullTiming *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"pullTiming,omitempty"` 1942 // Script: A shell script to be executed in the step. When script is provided, 1943 // the user cannot specify the entrypoint or args. 1944 Script string `json:"script,omitempty"` 1945 // SecretEnv: A list of environment variables which are encrypted using a Cloud 1946 // Key Management Service crypto key. These values must be specified in the 1947 // build's `Secret`. 1948 SecretEnv []string `json:"secretEnv,omitempty"` 1949 // Status: Output only. Status of the build step. At this time, build step 1950 // status is only updated on build completion; step status is not updated in 1951 // real-time as the build progresses. 1952 // 1953 // Possible values: 1954 // "STATUS_UNKNOWN" - Status of the build is unknown. 1955 // "PENDING" - Build has been created and is pending execution and queuing. 1956 // It has not been queued. 1957 // "QUEUED" - Build or step is queued; work has not yet begun. 1958 // "WORKING" - Build or step is being executed. 1959 // "SUCCESS" - Build or step finished successfully. 1960 // "FAILURE" - Build or step failed to complete successfully. 1961 // "INTERNAL_ERROR" - Build or step failed due to an internal cause. 1962 // "TIMEOUT" - Build or step took longer than was allowed. 1963 // "CANCELLED" - Build or step was canceled by a user. 1964 // "EXPIRED" - Build was enqueued for longer than the value of `queue_ttl`. 1965 Status string `json:"status,omitempty"` 1966 // Timeout: Time limit for executing this build step. If not defined, the step 1967 // has no time limit and will be allowed to continue to run until either it 1968 // completes or the build itself times out. 1969 Timeout string `json:"timeout,omitempty"` 1970 // Timing: Output only. Stores timing information for executing this build 1971 // step. 1972 Timing *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"timing,omitempty"` 1973 // Volumes: List of volumes to mount into the build step. Each volume is 1974 // created as an empty volume prior to execution of the build step. Upon 1975 // completion of the build, volumes and their contents are discarded. Using a 1976 // named volume in only one step is not valid as it is indicative of a build 1977 // request with an incorrect configuration. 1978 Volumes []*ContaineranalysisGoogleDevtoolsCloudbuildV1Volume `json:"volumes,omitempty"` 1979 // WaitFor: The ID(s) of the step(s) that this build step depends on. This 1980 // build step will not start until all the build steps in `wait_for` have 1981 // completed successfully. If `wait_for` is empty, this build step will start 1982 // when all previous build steps in the `Build.Steps` list have completed 1983 // successfully. 1984 WaitFor []string `json:"waitFor,omitempty"` 1985 // ForceSendFields is a list of field names (e.g. "AllowExitCodes") to 1986 // unconditionally include in API requests. By default, fields with empty or 1987 // default values are omitted from API requests. See 1988 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1989 // details. 1990 ForceSendFields []string `json:"-"` 1991 // NullFields is a list of field names (e.g. "AllowExitCodes") to include in 1992 // API requests with the JSON null value. By default, fields with empty values 1993 // are omitted from API requests. See 1994 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1995 NullFields []string `json:"-"` 1996 } 1997 1998 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildStep) MarshalJSON() ([]byte, error) { 1999 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1BuildStep 2000 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2001 } 2002 2003 // ContaineranalysisGoogleDevtoolsCloudbuildV1BuildWarning: A non-fatal problem 2004 // encountered during the execution of the build. 2005 type ContaineranalysisGoogleDevtoolsCloudbuildV1BuildWarning struct { 2006 // Priority: The priority for this warning. 2007 // 2008 // Possible values: 2009 // "PRIORITY_UNSPECIFIED" - Should not be used. 2010 // "INFO" - e.g. deprecation warnings and alternative feature highlights. 2011 // "WARNING" - e.g. automated detection of possible issues with the build. 2012 // "ALERT" - e.g. alerts that a feature used in the build is pending removal 2013 Priority string `json:"priority,omitempty"` 2014 // Text: Explanation of the warning generated. 2015 Text string `json:"text,omitempty"` 2016 // ForceSendFields is a list of field names (e.g. "Priority") to 2017 // unconditionally include in API requests. By default, fields with empty or 2018 // default values are omitted from API requests. See 2019 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2020 // details. 2021 ForceSendFields []string `json:"-"` 2022 // NullFields is a list of field names (e.g. "Priority") to include in API 2023 // requests with the JSON null value. By default, fields with empty values are 2024 // omitted from API requests. See 2025 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2026 NullFields []string `json:"-"` 2027 } 2028 2029 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1BuildWarning) MarshalJSON() ([]byte, error) { 2030 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1BuildWarning 2031 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2032 } 2033 2034 // ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage: An image built by the 2035 // pipeline. 2036 type ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage struct { 2037 // Digest: Docker Registry 2.0 digest. 2038 Digest string `json:"digest,omitempty"` 2039 // Name: Name used to push the container image to Google Container Registry, as 2040 // presented to `docker push`. 2041 Name string `json:"name,omitempty"` 2042 // PushTiming: Output only. Stores timing information for pushing the specified 2043 // image. 2044 PushTiming *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"pushTiming,omitempty"` 2045 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally 2046 // include in API requests. By default, fields with empty or default values are 2047 // omitted from API requests. See 2048 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2049 // details. 2050 ForceSendFields []string `json:"-"` 2051 // NullFields is a list of field names (e.g. "Digest") to include in API 2052 // requests with the JSON null value. By default, fields with empty values are 2053 // omitted from API requests. See 2054 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2055 NullFields []string `json:"-"` 2056 } 2057 2058 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage) MarshalJSON() ([]byte, error) { 2059 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage 2060 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2061 } 2062 2063 // ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository: Location of 2064 // the source in a 2nd-gen Google Cloud Build repository resource. 2065 type ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository struct { 2066 // Dir: Directory, relative to the source root, in which to run the build. 2067 Dir string `json:"dir,omitempty"` 2068 // Repository: Required. Name of the Google Cloud Build repository, formatted 2069 // as `projects/*/locations/*/connections/*/repositories/*`. 2070 Repository string `json:"repository,omitempty"` 2071 // Revision: The revision to fetch from the Git repository such as a branch, a 2072 // tag, a commit SHA, or any Git ref. 2073 Revision string `json:"revision,omitempty"` 2074 // ForceSendFields is a list of field names (e.g. "Dir") to unconditionally 2075 // include in API requests. By default, fields with empty or default values are 2076 // omitted from API requests. See 2077 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2078 // details. 2079 ForceSendFields []string `json:"-"` 2080 // NullFields is a list of field names (e.g. "Dir") to include in API requests 2081 // with the JSON null value. By default, fields with empty values are omitted 2082 // from API requests. See 2083 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2084 NullFields []string `json:"-"` 2085 } 2086 2087 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository) MarshalJSON() ([]byte, error) { 2088 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository 2089 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2090 } 2091 2092 // ContaineranalysisGoogleDevtoolsCloudbuildV1DeveloperConnectConfig: This 2093 // config defines the location of a source through Developer Connect. 2094 type ContaineranalysisGoogleDevtoolsCloudbuildV1DeveloperConnectConfig struct { 2095 // Dir: Required. Directory, relative to the source root, in which to run the 2096 // build. 2097 Dir string `json:"dir,omitempty"` 2098 // GitRepositoryLink: Required. The Developer Connect Git repository link, 2099 // formatted as `projects/*/locations/*/connections/*/gitRepositoryLink/*`. 2100 GitRepositoryLink string `json:"gitRepositoryLink,omitempty"` 2101 // Revision: Required. The revision to fetch from the Git repository such as a 2102 // branch, a tag, a commit SHA, or any Git ref. 2103 Revision string `json:"revision,omitempty"` 2104 // ForceSendFields is a list of field names (e.g. "Dir") to unconditionally 2105 // include in API requests. By default, fields with empty or default values are 2106 // omitted from API requests. See 2107 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2108 // details. 2109 ForceSendFields []string `json:"-"` 2110 // NullFields is a list of field names (e.g. "Dir") to include in API requests 2111 // with the JSON null value. By default, fields with empty values are omitted 2112 // from API requests. See 2113 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2114 NullFields []string `json:"-"` 2115 } 2116 2117 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1DeveloperConnectConfig) MarshalJSON() ([]byte, error) { 2118 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1DeveloperConnectConfig 2119 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2120 } 2121 2122 // ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes: Container message for 2123 // hashes of byte content of files, used in SourceProvenance messages to verify 2124 // integrity of source input to the build. 2125 type ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes struct { 2126 // FileHash: Collection of file hashes. 2127 FileHash []*ContaineranalysisGoogleDevtoolsCloudbuildV1Hash `json:"fileHash,omitempty"` 2128 // ForceSendFields is a list of field names (e.g. "FileHash") to 2129 // unconditionally include in API requests. By default, fields with empty or 2130 // default values are omitted from API requests. See 2131 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2132 // details. 2133 ForceSendFields []string `json:"-"` 2134 // NullFields is a list of field names (e.g. "FileHash") to include in API 2135 // requests with the JSON null value. By default, fields with empty values are 2136 // omitted from API requests. See 2137 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2138 NullFields []string `json:"-"` 2139 } 2140 2141 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes) MarshalJSON() ([]byte, error) { 2142 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes 2143 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2144 } 2145 2146 // ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfig: GitConfig is a 2147 // configuration for git operations. 2148 type ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfig struct { 2149 // Http: Configuration for HTTP related git operations. 2150 Http *ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfigHttpConfig `json:"http,omitempty"` 2151 // ForceSendFields is a list of field names (e.g. "Http") to unconditionally 2152 // include in API requests. By default, fields with empty or default values are 2153 // omitted from API requests. See 2154 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2155 // details. 2156 ForceSendFields []string `json:"-"` 2157 // NullFields is a list of field names (e.g. "Http") to include in API requests 2158 // with the JSON null value. By default, fields with empty values are omitted 2159 // from API requests. See 2160 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2161 NullFields []string `json:"-"` 2162 } 2163 2164 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfig) MarshalJSON() ([]byte, error) { 2165 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfig 2166 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2167 } 2168 2169 // ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfigHttpConfig: HttpConfig 2170 // is a configuration for HTTP related git operations. 2171 type ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfigHttpConfig struct { 2172 // ProxySecretVersionName: SecretVersion resource of the HTTP proxy URL. The 2173 // proxy URL should be in format protocol://@]proxyhost[:port]. 2174 ProxySecretVersionName string `json:"proxySecretVersionName,omitempty"` 2175 // ForceSendFields is a list of field names (e.g. "ProxySecretVersionName") to 2176 // unconditionally include in API requests. By default, fields with empty or 2177 // default values are omitted from API requests. See 2178 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2179 // details. 2180 ForceSendFields []string `json:"-"` 2181 // NullFields is a list of field names (e.g. "ProxySecretVersionName") to 2182 // include in API requests with the JSON null value. By default, fields with 2183 // empty values are omitted from API requests. See 2184 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2185 NullFields []string `json:"-"` 2186 } 2187 2188 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfigHttpConfig) MarshalJSON() ([]byte, error) { 2189 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1GitConfigHttpConfig 2190 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2191 } 2192 2193 // ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource: Location of the source 2194 // in any accessible Git repository. 2195 type ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource struct { 2196 // Dir: Directory, relative to the source root, in which to run the build. This 2197 // must be a relative path. If a step's `dir` is specified and is an absolute 2198 // path, this value is ignored for that step's execution. 2199 Dir string `json:"dir,omitempty"` 2200 // Revision: The revision to fetch from the Git repository such as a branch, a 2201 // tag, a commit SHA, or any Git ref. Cloud Build uses `git fetch` to fetch the 2202 // revision from the Git repository; therefore make sure that the string you 2203 // provide for `revision` is parsable by the command. For information on string 2204 // values accepted by `git fetch`, see 2205 // https://git-scm.com/docs/gitrevisions#_specifying_revisions. For information 2206 // on `git fetch`, see https://git-scm.com/docs/git-fetch. 2207 Revision string `json:"revision,omitempty"` 2208 // Url: Location of the Git repo to build. This will be used as a `git remote`, 2209 // see https://git-scm.com/docs/git-remote. 2210 Url string `json:"url,omitempty"` 2211 // ForceSendFields is a list of field names (e.g. "Dir") to unconditionally 2212 // include in API requests. By default, fields with empty or default values are 2213 // omitted from API requests. See 2214 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2215 // details. 2216 ForceSendFields []string `json:"-"` 2217 // NullFields is a list of field names (e.g. "Dir") to include in API requests 2218 // with the JSON null value. By default, fields with empty values are omitted 2219 // from API requests. See 2220 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2221 NullFields []string `json:"-"` 2222 } 2223 2224 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource) MarshalJSON() ([]byte, error) { 2225 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource 2226 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2227 } 2228 2229 // ContaineranalysisGoogleDevtoolsCloudbuildV1Hash: Container message for hash 2230 // values. 2231 type ContaineranalysisGoogleDevtoolsCloudbuildV1Hash struct { 2232 // Type: The type of hash that was performed. 2233 // 2234 // Possible values: 2235 // "NONE" - No hash requested. 2236 // "SHA256" - Use a sha256 hash. 2237 // "MD5" - Use a md5 hash. 2238 // "SHA512" - Use a sha512 hash. 2239 Type string `json:"type,omitempty"` 2240 // Value: The hash value. 2241 Value string `json:"value,omitempty"` 2242 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 2243 // include in API requests. By default, fields with empty or default values are 2244 // omitted from API requests. See 2245 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2246 // details. 2247 ForceSendFields []string `json:"-"` 2248 // NullFields is a list of field names (e.g. "Type") to include in API requests 2249 // with the JSON null value. By default, fields with empty values are omitted 2250 // from API requests. See 2251 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2252 NullFields []string `json:"-"` 2253 } 2254 2255 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1Hash) MarshalJSON() ([]byte, error) { 2256 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1Hash 2257 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2258 } 2259 2260 // ContaineranalysisGoogleDevtoolsCloudbuildV1InlineSecret: Pairs a set of 2261 // secret environment variables mapped to encrypted values with the Cloud KMS 2262 // key to use to decrypt the value. 2263 type ContaineranalysisGoogleDevtoolsCloudbuildV1InlineSecret struct { 2264 // EnvMap: Map of environment variable name to its encrypted value. Secret 2265 // environment variables must be unique across all of a build's secrets, and 2266 // must be used by at least one build step. Values can be at most 64 KB in 2267 // size. There can be at most 100 secret values across all of a build's 2268 // secrets. 2269 EnvMap map[string]string `json:"envMap,omitempty"` 2270 // KmsKeyName: Resource name of Cloud KMS crypto key to decrypt the encrypted 2271 // value. In format: projects/*/locations/*/keyRings/*/cryptoKeys/* 2272 KmsKeyName string `json:"kmsKeyName,omitempty"` 2273 // ForceSendFields is a list of field names (e.g. "EnvMap") to unconditionally 2274 // include in API requests. By default, fields with empty or default values are 2275 // omitted from API requests. See 2276 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2277 // details. 2278 ForceSendFields []string `json:"-"` 2279 // NullFields is a list of field names (e.g. "EnvMap") to include in API 2280 // requests with the JSON null value. By default, fields with empty values are 2281 // omitted from API requests. See 2282 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2283 NullFields []string `json:"-"` 2284 } 2285 2286 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1InlineSecret) MarshalJSON() ([]byte, error) { 2287 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1InlineSecret 2288 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2289 } 2290 2291 // ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource: Location of the 2292 // source in a Google Cloud Source Repository. 2293 type ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource struct { 2294 // BranchName: Regex matching branches to build. The syntax of the regular 2295 // expressions accepted is the syntax accepted by RE2 and described at 2296 // https://github.com/google/re2/wiki/Syntax 2297 BranchName string `json:"branchName,omitempty"` 2298 // CommitSha: Explicit commit SHA to build. 2299 CommitSha string `json:"commitSha,omitempty"` 2300 // Dir: Directory, relative to the source root, in which to run the build. This 2301 // must be a relative path. If a step's `dir` is specified and is an absolute 2302 // path, this value is ignored for that step's execution. 2303 Dir string `json:"dir,omitempty"` 2304 // InvertRegex: Only trigger a build if the revision regex does NOT match the 2305 // revision regex. 2306 InvertRegex bool `json:"invertRegex,omitempty"` 2307 // ProjectId: ID of the project that owns the Cloud Source Repository. If 2308 // omitted, the project ID requesting the build is assumed. 2309 ProjectId string `json:"projectId,omitempty"` 2310 // RepoName: Name of the Cloud Source Repository. 2311 RepoName string `json:"repoName,omitempty"` 2312 // Substitutions: Substitutions to use in a triggered build. Should only be 2313 // used with RunBuildTrigger 2314 Substitutions map[string]string `json:"substitutions,omitempty"` 2315 // TagName: Regex matching tags to build. The syntax of the regular expressions 2316 // accepted is the syntax accepted by RE2 and described at 2317 // https://github.com/google/re2/wiki/Syntax 2318 TagName string `json:"tagName,omitempty"` 2319 // ForceSendFields is a list of field names (e.g. "BranchName") to 2320 // unconditionally include in API requests. By default, fields with empty or 2321 // default values are omitted from API requests. See 2322 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2323 // details. 2324 ForceSendFields []string `json:"-"` 2325 // NullFields is a list of field names (e.g. "BranchName") to include in API 2326 // requests with the JSON null value. By default, fields with empty values are 2327 // omitted from API requests. See 2328 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2329 NullFields []string `json:"-"` 2330 } 2331 2332 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource) MarshalJSON() ([]byte, error) { 2333 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource 2334 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2335 } 2336 2337 // ContaineranalysisGoogleDevtoolsCloudbuildV1Results: Artifacts created by the 2338 // build pipeline. 2339 type ContaineranalysisGoogleDevtoolsCloudbuildV1Results struct { 2340 // ArtifactManifest: Path to the artifact manifest for non-container artifacts 2341 // uploaded to Cloud Storage. Only populated when artifacts are uploaded to 2342 // Cloud Storage. 2343 ArtifactManifest string `json:"artifactManifest,omitempty"` 2344 // ArtifactTiming: Time to push all non-container artifacts to Cloud Storage. 2345 ArtifactTiming *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"artifactTiming,omitempty"` 2346 // BuildStepImages: List of build step digests, in the order corresponding to 2347 // build step indices. 2348 BuildStepImages []string `json:"buildStepImages,omitempty"` 2349 // BuildStepOutputs: List of build step outputs, produced by builder images, in 2350 // the order corresponding to build step indices. Cloud Builders 2351 // (https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this 2352 // output by writing to `$BUILDER_OUTPUT/output`. Only the first 50KB of data 2353 // is stored. Note that the `$BUILDER_OUTPUT` variable is read-only and can't 2354 // be substituted. 2355 BuildStepOutputs []string `json:"buildStepOutputs,omitempty"` 2356 // Images: Container images that were built as a part of the build. 2357 Images []*ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage `json:"images,omitempty"` 2358 // MavenArtifacts: Maven artifacts uploaded to Artifact Registry at the end of 2359 // the build. 2360 MavenArtifacts []*ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedMavenArtifact `json:"mavenArtifacts,omitempty"` 2361 // NpmPackages: Npm packages uploaded to Artifact Registry at the end of the 2362 // build. 2363 NpmPackages []*ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage `json:"npmPackages,omitempty"` 2364 // NumArtifacts: Number of non-container artifacts uploaded to Cloud Storage. 2365 // Only populated when artifacts are uploaded to Cloud Storage. 2366 NumArtifacts int64 `json:"numArtifacts,omitempty,string"` 2367 // PythonPackages: Python artifacts uploaded to Artifact Registry at the end of 2368 // the build. 2369 PythonPackages []*ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedPythonPackage `json:"pythonPackages,omitempty"` 2370 // ForceSendFields is a list of field names (e.g. "ArtifactManifest") to 2371 // unconditionally include in API requests. By default, fields with empty or 2372 // default values are omitted from API requests. See 2373 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2374 // details. 2375 ForceSendFields []string `json:"-"` 2376 // NullFields is a list of field names (e.g. "ArtifactManifest") to include in 2377 // API requests with the JSON null value. By default, fields with empty values 2378 // are omitted from API requests. See 2379 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2380 NullFields []string `json:"-"` 2381 } 2382 2383 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1Results) MarshalJSON() ([]byte, error) { 2384 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1Results 2385 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2386 } 2387 2388 // ContaineranalysisGoogleDevtoolsCloudbuildV1Secret: Pairs a set of secret 2389 // environment variables containing encrypted values with the Cloud KMS key to 2390 // use to decrypt the value. Note: Use `kmsKeyName` with `available_secrets` 2391 // instead of using `kmsKeyName` with `secret`. For instructions see: 2392 // https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials. 2393 type ContaineranalysisGoogleDevtoolsCloudbuildV1Secret struct { 2394 // KmsKeyName: Cloud KMS key name to use to decrypt these envs. 2395 KmsKeyName string `json:"kmsKeyName,omitempty"` 2396 // SecretEnv: Map of environment variable name to its encrypted value. Secret 2397 // environment variables must be unique across all of a build's secrets, and 2398 // must be used by at least one build step. Values can be at most 64 KB in 2399 // size. There can be at most 100 secret values across all of a build's 2400 // secrets. 2401 SecretEnv map[string]string `json:"secretEnv,omitempty"` 2402 // ForceSendFields is a list of field names (e.g. "KmsKeyName") to 2403 // unconditionally include in API requests. By default, fields with empty or 2404 // default values are omitted from API requests. See 2405 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2406 // details. 2407 ForceSendFields []string `json:"-"` 2408 // NullFields is a list of field names (e.g. "KmsKeyName") to include in API 2409 // requests with the JSON null value. By default, fields with empty values are 2410 // omitted from API requests. See 2411 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2412 NullFields []string `json:"-"` 2413 } 2414 2415 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1Secret) MarshalJSON() ([]byte, error) { 2416 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1Secret 2417 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2418 } 2419 2420 // ContaineranalysisGoogleDevtoolsCloudbuildV1SecretManagerSecret: Pairs a 2421 // secret environment variable with a SecretVersion in Secret Manager. 2422 type ContaineranalysisGoogleDevtoolsCloudbuildV1SecretManagerSecret struct { 2423 // Env: Environment variable name to associate with the secret. Secret 2424 // environment variables must be unique across all of a build's secrets, and 2425 // must be used by at least one build step. 2426 Env string `json:"env,omitempty"` 2427 // VersionName: Resource name of the SecretVersion. In format: 2428 // projects/*/secrets/*/versions/* 2429 VersionName string `json:"versionName,omitempty"` 2430 // ForceSendFields is a list of field names (e.g. "Env") to unconditionally 2431 // include in API requests. By default, fields with empty or default values are 2432 // omitted from API requests. See 2433 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2434 // details. 2435 ForceSendFields []string `json:"-"` 2436 // NullFields is a list of field names (e.g. "Env") to include in API requests 2437 // with the JSON null value. By default, fields with empty values are omitted 2438 // from API requests. See 2439 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2440 NullFields []string `json:"-"` 2441 } 2442 2443 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1SecretManagerSecret) MarshalJSON() ([]byte, error) { 2444 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1SecretManagerSecret 2445 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2446 } 2447 2448 // ContaineranalysisGoogleDevtoolsCloudbuildV1Secrets: Secrets and secret 2449 // environment variables. 2450 type ContaineranalysisGoogleDevtoolsCloudbuildV1Secrets struct { 2451 // Inline: Secrets encrypted with KMS key and the associated secret environment 2452 // variable. 2453 Inline []*ContaineranalysisGoogleDevtoolsCloudbuildV1InlineSecret `json:"inline,omitempty"` 2454 // SecretManager: Secrets in Secret Manager and associated secret environment 2455 // variable. 2456 SecretManager []*ContaineranalysisGoogleDevtoolsCloudbuildV1SecretManagerSecret `json:"secretManager,omitempty"` 2457 // ForceSendFields is a list of field names (e.g. "Inline") to unconditionally 2458 // include in API requests. By default, fields with empty or default values are 2459 // omitted from API requests. See 2460 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2461 // details. 2462 ForceSendFields []string `json:"-"` 2463 // NullFields is a list of field names (e.g. "Inline") to include in API 2464 // requests with the JSON null value. By default, fields with empty values are 2465 // omitted from API requests. See 2466 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2467 NullFields []string `json:"-"` 2468 } 2469 2470 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1Secrets) MarshalJSON() ([]byte, error) { 2471 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1Secrets 2472 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2473 } 2474 2475 // ContaineranalysisGoogleDevtoolsCloudbuildV1Source: Location of the source in 2476 // a supported storage service. 2477 type ContaineranalysisGoogleDevtoolsCloudbuildV1Source struct { 2478 // ConnectedRepository: Optional. If provided, get the source from this 2nd-gen 2479 // Google Cloud Build repository resource. 2480 ConnectedRepository *ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository `json:"connectedRepository,omitempty"` 2481 // DeveloperConnectConfig: If provided, get the source from this Developer 2482 // Connect config. 2483 DeveloperConnectConfig *ContaineranalysisGoogleDevtoolsCloudbuildV1DeveloperConnectConfig `json:"developerConnectConfig,omitempty"` 2484 // GitSource: If provided, get the source from this Git repository. 2485 GitSource *ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource `json:"gitSource,omitempty"` 2486 // RepoSource: If provided, get the source from this location in a Cloud Source 2487 // Repository. 2488 RepoSource *ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource `json:"repoSource,omitempty"` 2489 // StorageSource: If provided, get the source from this location in Cloud 2490 // Storage. 2491 StorageSource *ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource `json:"storageSource,omitempty"` 2492 // StorageSourceManifest: If provided, get the source from this manifest in 2493 // Cloud Storage. This feature is in Preview; see description here 2494 // (https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). 2495 StorageSourceManifest *ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest `json:"storageSourceManifest,omitempty"` 2496 // ForceSendFields is a list of field names (e.g. "ConnectedRepository") to 2497 // unconditionally include in API requests. By default, fields with empty or 2498 // default values are omitted from API requests. See 2499 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2500 // details. 2501 ForceSendFields []string `json:"-"` 2502 // NullFields is a list of field names (e.g. "ConnectedRepository") to include 2503 // in API requests with the JSON null value. By default, fields with empty 2504 // values are omitted from API requests. See 2505 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2506 NullFields []string `json:"-"` 2507 } 2508 2509 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1Source) MarshalJSON() ([]byte, error) { 2510 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1Source 2511 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2512 } 2513 2514 // ContaineranalysisGoogleDevtoolsCloudbuildV1SourceProvenance: Provenance of 2515 // the source. Ways to find the original source, or verify that some source was 2516 // used for this build. 2517 type ContaineranalysisGoogleDevtoolsCloudbuildV1SourceProvenance struct { 2518 // FileHashes: Output only. Hash(es) of the build source, which can be used to 2519 // verify that the original source integrity was maintained in the build. Note 2520 // that `FileHashes` will only be populated if `BuildOptions` has requested a 2521 // `SourceProvenanceHash`. The keys to this map are file paths used as build 2522 // source and the values contain the hash values for those files. If the build 2523 // source came in a single package such as a gzipped tarfile (`.tar.gz`), the 2524 // `FileHash` will be for the single path to that file. 2525 FileHashes map[string]ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes `json:"fileHashes,omitempty"` 2526 // ResolvedConnectedRepository: Output only. A copy of the build's 2527 // `source.connected_repository`, if exists, with any revisions resolved. 2528 ResolvedConnectedRepository *ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository `json:"resolvedConnectedRepository,omitempty"` 2529 // ResolvedGitSource: Output only. A copy of the build's `source.git_source`, 2530 // if exists, with any revisions resolved. 2531 ResolvedGitSource *ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource `json:"resolvedGitSource,omitempty"` 2532 // ResolvedRepoSource: A copy of the build's `source.repo_source`, if exists, 2533 // with any revisions resolved. 2534 ResolvedRepoSource *ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource `json:"resolvedRepoSource,omitempty"` 2535 // ResolvedStorageSource: A copy of the build's `source.storage_source`, if 2536 // exists, with any generations resolved. 2537 ResolvedStorageSource *ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource `json:"resolvedStorageSource,omitempty"` 2538 // ResolvedStorageSourceManifest: A copy of the build's 2539 // `source.storage_source_manifest`, if exists, with any revisions resolved. 2540 // This feature is in Preview. 2541 ResolvedStorageSourceManifest *ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest `json:"resolvedStorageSourceManifest,omitempty"` 2542 // ForceSendFields is a list of field names (e.g. "FileHashes") to 2543 // unconditionally include in API requests. By default, fields with empty or 2544 // default values are omitted from API requests. See 2545 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2546 // details. 2547 ForceSendFields []string `json:"-"` 2548 // NullFields is a list of field names (e.g. "FileHashes") to include in API 2549 // requests with the JSON null value. By default, fields with empty values are 2550 // omitted from API requests. See 2551 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2552 NullFields []string `json:"-"` 2553 } 2554 2555 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1SourceProvenance) MarshalJSON() ([]byte, error) { 2556 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1SourceProvenance 2557 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2558 } 2559 2560 // ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource: Location of the 2561 // source in an archive file in Cloud Storage. 2562 type ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource struct { 2563 // Bucket: Cloud Storage bucket containing the source (see Bucket Name 2564 // Requirements 2565 // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). 2566 Bucket string `json:"bucket,omitempty"` 2567 // Generation: Cloud Storage generation for the object. If the generation is 2568 // omitted, the latest generation will be used. 2569 Generation int64 `json:"generation,omitempty,string"` 2570 // Object: Cloud Storage object containing the source. This object must be a 2571 // zipped (`.zip`) or gzipped archive file (`.tar.gz`) containing source to 2572 // build. 2573 Object string `json:"object,omitempty"` 2574 // SourceFetcher: Optional. Option to specify the tool to fetch the source file 2575 // for the build. 2576 // 2577 // Possible values: 2578 // "SOURCE_FETCHER_UNSPECIFIED" - Unspecified defaults to GSUTIL. 2579 // "GSUTIL" - Use the "gsutil" tool to download the source file. 2580 // "GCS_FETCHER" - Use the Cloud Storage Fetcher tool to download the source 2581 // file. 2582 SourceFetcher string `json:"sourceFetcher,omitempty"` 2583 // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally 2584 // include in API requests. By default, fields with empty or default values are 2585 // omitted from API requests. See 2586 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2587 // details. 2588 ForceSendFields []string `json:"-"` 2589 // NullFields is a list of field names (e.g. "Bucket") to include in API 2590 // requests with the JSON null value. By default, fields with empty values are 2591 // omitted from API requests. See 2592 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2593 NullFields []string `json:"-"` 2594 } 2595 2596 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource) MarshalJSON() ([]byte, error) { 2597 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource 2598 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2599 } 2600 2601 // ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest: Location 2602 // of the source manifest in Cloud Storage. This feature is in Preview; see 2603 // description here 2604 // (https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). 2605 type ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest struct { 2606 // Bucket: Cloud Storage bucket containing the source manifest (see Bucket Name 2607 // Requirements 2608 // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). 2609 Bucket string `json:"bucket,omitempty"` 2610 // Generation: Cloud Storage generation for the object. If the generation is 2611 // omitted, the latest generation will be used. 2612 Generation int64 `json:"generation,omitempty,string"` 2613 // Object: Cloud Storage object containing the source manifest. This object 2614 // must be a JSON file. 2615 Object string `json:"object,omitempty"` 2616 // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally 2617 // include in API requests. By default, fields with empty or default values are 2618 // omitted from API requests. See 2619 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2620 // details. 2621 ForceSendFields []string `json:"-"` 2622 // NullFields is a list of field names (e.g. "Bucket") to include in API 2623 // requests with the JSON null value. By default, fields with empty values are 2624 // omitted from API requests. See 2625 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2626 NullFields []string `json:"-"` 2627 } 2628 2629 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest) MarshalJSON() ([]byte, error) { 2630 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest 2631 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2632 } 2633 2634 // ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan: Start and end times for 2635 // a build execution phase. 2636 type ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan struct { 2637 // EndTime: End of time span. 2638 EndTime string `json:"endTime,omitempty"` 2639 // StartTime: Start of time span. 2640 StartTime string `json:"startTime,omitempty"` 2641 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally 2642 // include in API requests. By default, fields with empty or default values are 2643 // omitted from API requests. See 2644 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2645 // details. 2646 ForceSendFields []string `json:"-"` 2647 // NullFields is a list of field names (e.g. "EndTime") to include in API 2648 // requests with the JSON null value. By default, fields with empty values are 2649 // omitted from API requests. See 2650 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2651 NullFields []string `json:"-"` 2652 } 2653 2654 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan) MarshalJSON() ([]byte, error) { 2655 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan 2656 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2657 } 2658 2659 // ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedMavenArtifact: A Maven 2660 // artifact uploaded using the MavenArtifact directive. 2661 type ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedMavenArtifact struct { 2662 // FileHashes: Hash types and values of the Maven Artifact. 2663 FileHashes *ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes `json:"fileHashes,omitempty"` 2664 // PushTiming: Output only. Stores timing information for pushing the specified 2665 // artifact. 2666 PushTiming *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"pushTiming,omitempty"` 2667 // Uri: URI of the uploaded artifact. 2668 Uri string `json:"uri,omitempty"` 2669 // ForceSendFields is a list of field names (e.g. "FileHashes") to 2670 // unconditionally include in API requests. By default, fields with empty or 2671 // default values are omitted from API requests. See 2672 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2673 // details. 2674 ForceSendFields []string `json:"-"` 2675 // NullFields is a list of field names (e.g. "FileHashes") to include in API 2676 // requests with the JSON null value. By default, fields with empty values are 2677 // omitted from API requests. See 2678 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2679 NullFields []string `json:"-"` 2680 } 2681 2682 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedMavenArtifact) MarshalJSON() ([]byte, error) { 2683 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedMavenArtifact 2684 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2685 } 2686 2687 // ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage: An npm 2688 // package uploaded to Artifact Registry using the NpmPackage directive. 2689 type ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage struct { 2690 // FileHashes: Hash types and values of the npm package. 2691 FileHashes *ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes `json:"fileHashes,omitempty"` 2692 // PushTiming: Output only. Stores timing information for pushing the specified 2693 // artifact. 2694 PushTiming *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"pushTiming,omitempty"` 2695 // Uri: URI of the uploaded npm package. 2696 Uri string `json:"uri,omitempty"` 2697 // ForceSendFields is a list of field names (e.g. "FileHashes") to 2698 // unconditionally include in API requests. By default, fields with empty or 2699 // default values are omitted from API requests. See 2700 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2701 // details. 2702 ForceSendFields []string `json:"-"` 2703 // NullFields is a list of field names (e.g. "FileHashes") to include in API 2704 // requests with the JSON null value. By default, fields with empty values are 2705 // omitted from API requests. See 2706 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2707 NullFields []string `json:"-"` 2708 } 2709 2710 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage) MarshalJSON() ([]byte, error) { 2711 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage 2712 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2713 } 2714 2715 // ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedPythonPackage: Artifact 2716 // uploaded using the PythonPackage directive. 2717 type ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedPythonPackage struct { 2718 // FileHashes: Hash types and values of the Python Artifact. 2719 FileHashes *ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes `json:"fileHashes,omitempty"` 2720 // PushTiming: Output only. Stores timing information for pushing the specified 2721 // artifact. 2722 PushTiming *ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan `json:"pushTiming,omitempty"` 2723 // Uri: URI of the uploaded artifact. 2724 Uri string `json:"uri,omitempty"` 2725 // ForceSendFields is a list of field names (e.g. "FileHashes") to 2726 // unconditionally include in API requests. By default, fields with empty or 2727 // default values are omitted from API requests. See 2728 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2729 // details. 2730 ForceSendFields []string `json:"-"` 2731 // NullFields is a list of field names (e.g. "FileHashes") to include in API 2732 // requests with the JSON null value. By default, fields with empty values are 2733 // omitted from API requests. See 2734 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2735 NullFields []string `json:"-"` 2736 } 2737 2738 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedPythonPackage) MarshalJSON() ([]byte, error) { 2739 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedPythonPackage 2740 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2741 } 2742 2743 // ContaineranalysisGoogleDevtoolsCloudbuildV1Volume: Volume describes a Docker 2744 // container volume which is mounted into build steps in order to persist files 2745 // across build step execution. 2746 type ContaineranalysisGoogleDevtoolsCloudbuildV1Volume struct { 2747 // Name: Name of the volume to mount. Volume names must be unique per build 2748 // step and must be valid names for Docker volumes. Each named volume must be 2749 // used by at least two build steps. 2750 Name string `json:"name,omitempty"` 2751 // Path: Path at which to mount the volume. Paths must be absolute and cannot 2752 // conflict with other volume paths on the same build step or with certain 2753 // reserved volume paths. 2754 Path string `json:"path,omitempty"` 2755 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 2756 // include in API requests. By default, fields with empty or default values are 2757 // omitted from API requests. See 2758 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2759 // details. 2760 ForceSendFields []string `json:"-"` 2761 // NullFields is a list of field names (e.g. "Name") to include in API requests 2762 // with the JSON null value. By default, fields with empty values are omitted 2763 // from API requests. See 2764 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2765 NullFields []string `json:"-"` 2766 } 2767 2768 func (s *ContaineranalysisGoogleDevtoolsCloudbuildV1Volume) MarshalJSON() ([]byte, error) { 2769 type NoMethod ContaineranalysisGoogleDevtoolsCloudbuildV1Volume 2770 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2771 } 2772 2773 // CreateOperationRequest: Request for creating an operation 2774 type CreateOperationRequest struct { 2775 // Operation: The operation to create. 2776 Operation *Operation `json:"operation,omitempty"` 2777 // OperationId: The ID to use for this operation. 2778 OperationId string `json:"operationId,omitempty"` 2779 // ForceSendFields is a list of field names (e.g. "Operation") to 2780 // unconditionally include in API requests. By default, fields with empty or 2781 // default values are omitted from API requests. See 2782 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2783 // details. 2784 ForceSendFields []string `json:"-"` 2785 // NullFields is a list of field names (e.g. "Operation") to include in API 2786 // requests with the JSON null value. By default, fields with empty values are 2787 // omitted from API requests. See 2788 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2789 NullFields []string `json:"-"` 2790 } 2791 2792 func (s *CreateOperationRequest) MarshalJSON() ([]byte, error) { 2793 type NoMethod CreateOperationRequest 2794 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2795 } 2796 2797 // DSSEAttestationNote: A note describing an attestation 2798 type DSSEAttestationNote struct { 2799 // Hint: DSSEHint hints at the purpose of the attestation authority. 2800 Hint *DSSEHint `json:"hint,omitempty"` 2801 // ForceSendFields is a list of field names (e.g. "Hint") to unconditionally 2802 // include in API requests. By default, fields with empty or default values are 2803 // omitted from API requests. See 2804 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2805 // details. 2806 ForceSendFields []string `json:"-"` 2807 // NullFields is a list of field names (e.g. "Hint") to include in API requests 2808 // with the JSON null value. By default, fields with empty values are omitted 2809 // from API requests. See 2810 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2811 NullFields []string `json:"-"` 2812 } 2813 2814 func (s *DSSEAttestationNote) MarshalJSON() ([]byte, error) { 2815 type NoMethod DSSEAttestationNote 2816 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2817 } 2818 2819 // DSSEAttestationOccurrence: An occurrence describing an attestation on a 2820 // resource 2821 type DSSEAttestationOccurrence struct { 2822 // Envelope: If doing something security critical, make sure to verify the 2823 // signatures in this metadata. 2824 Envelope *Envelope `json:"envelope,omitempty"` 2825 Statement *InTotoStatement `json:"statement,omitempty"` 2826 // ForceSendFields is a list of field names (e.g. "Envelope") to 2827 // unconditionally include in API requests. By default, fields with empty or 2828 // default values are omitted from API requests. See 2829 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2830 // details. 2831 ForceSendFields []string `json:"-"` 2832 // NullFields is a list of field names (e.g. "Envelope") to include in API 2833 // requests with the JSON null value. By default, fields with empty values are 2834 // omitted from API requests. See 2835 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2836 NullFields []string `json:"-"` 2837 } 2838 2839 func (s *DSSEAttestationOccurrence) MarshalJSON() ([]byte, error) { 2840 type NoMethod DSSEAttestationOccurrence 2841 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2842 } 2843 2844 // DSSEHint: This submessage provides human-readable hints about the purpose of 2845 // the authority. Because the name of a note acts as its resource reference, it 2846 // is important to disambiguate the canonical name of the Note (which might be 2847 // a UUID for security purposes) from "readable" names more suitable for debug 2848 // output. Note that these hints should not be used to look up authorities in 2849 // security sensitive contexts, such as when looking up attestations to verify. 2850 type DSSEHint struct { 2851 // HumanReadableName: Required. The human readable name of this attestation 2852 // authority, for example "cloudbuild-prod". 2853 HumanReadableName string `json:"humanReadableName,omitempty"` 2854 // ForceSendFields is a list of field names (e.g. "HumanReadableName") to 2855 // unconditionally include in API requests. By default, fields with empty or 2856 // default values are omitted from API requests. See 2857 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2858 // details. 2859 ForceSendFields []string `json:"-"` 2860 // NullFields is a list of field names (e.g. "HumanReadableName") to include in 2861 // API requests with the JSON null value. By default, fields with empty values 2862 // are omitted from API requests. See 2863 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2864 NullFields []string `json:"-"` 2865 } 2866 2867 func (s *DSSEHint) MarshalJSON() ([]byte, error) { 2868 type NoMethod DSSEHint 2869 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2870 } 2871 2872 // Deployable: An artifact that can be deployed in some runtime. 2873 type Deployable struct { 2874 // ResourceUri: Resource URI for the artifact being deployed. 2875 ResourceUri []string `json:"resourceUri,omitempty"` 2876 // ForceSendFields is a list of field names (e.g. "ResourceUri") to 2877 // unconditionally include in API requests. By default, fields with empty or 2878 // default values are omitted from API requests. See 2879 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2880 // details. 2881 ForceSendFields []string `json:"-"` 2882 // NullFields is a list of field names (e.g. "ResourceUri") to include in API 2883 // requests with the JSON null value. By default, fields with empty values are 2884 // omitted from API requests. See 2885 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2886 NullFields []string `json:"-"` 2887 } 2888 2889 func (s *Deployable) MarshalJSON() ([]byte, error) { 2890 type NoMethod Deployable 2891 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2892 } 2893 2894 // Deployment: The period during which some deployable was active in a runtime. 2895 type Deployment struct { 2896 // Address: Address of the runtime element hosting this deployment. 2897 Address string `json:"address,omitempty"` 2898 // Config: Configuration used to create this deployment. 2899 Config string `json:"config,omitempty"` 2900 // DeployTime: Beginning of the lifetime of this deployment. 2901 DeployTime string `json:"deployTime,omitempty"` 2902 // Platform: Platform hosting this deployment. 2903 // 2904 // Possible values: 2905 // "PLATFORM_UNSPECIFIED" - Unknown 2906 // "GKE" - Google Container Engine 2907 // "FLEX" - Google App Engine: Flexible Environment 2908 // "CUSTOM" - Custom user-defined platform 2909 Platform string `json:"platform,omitempty"` 2910 // ResourceUri: Resource URI for the artifact being deployed taken from the 2911 // deployable field with the same name. 2912 ResourceUri []string `json:"resourceUri,omitempty"` 2913 // UndeployTime: End of the lifetime of this deployment. 2914 UndeployTime string `json:"undeployTime,omitempty"` 2915 // UserEmail: Identity of the user that triggered this deployment. 2916 UserEmail string `json:"userEmail,omitempty"` 2917 // ForceSendFields is a list of field names (e.g. "Address") to unconditionally 2918 // include in API requests. By default, fields with empty or default values are 2919 // omitted from API requests. See 2920 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2921 // details. 2922 ForceSendFields []string `json:"-"` 2923 // NullFields is a list of field names (e.g. "Address") to include in API 2924 // requests with the JSON null value. By default, fields with empty values are 2925 // omitted from API requests. See 2926 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2927 NullFields []string `json:"-"` 2928 } 2929 2930 func (s *Deployment) MarshalJSON() ([]byte, error) { 2931 type NoMethod Deployment 2932 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2933 } 2934 2935 // Derived: Derived describes the derived image portion (Occurrence) of the 2936 // DockerImage relationship. This image would be produced from a Dockerfile 2937 // with FROM . 2938 type Derived struct { 2939 // BaseResourceUrl: Output only. This contains the base image URL for the 2940 // derived image occurrence. 2941 BaseResourceUrl string `json:"baseResourceUrl,omitempty"` 2942 // Distance: Output only. The number of layers by which this image differs from 2943 // the associated image basis. 2944 Distance int64 `json:"distance,omitempty"` 2945 // Fingerprint: The fingerprint of the derived image. 2946 Fingerprint *Fingerprint `json:"fingerprint,omitempty"` 2947 // LayerInfo: This contains layer-specific metadata, if populated it has length 2948 // "distance" and is ordered with [distance] being the layer immediately 2949 // following the base image and [1] being the final layer. 2950 LayerInfo []*Layer `json:"layerInfo,omitempty"` 2951 // ForceSendFields is a list of field names (e.g. "BaseResourceUrl") to 2952 // unconditionally include in API requests. By default, fields with empty or 2953 // default values are omitted from API requests. See 2954 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2955 // details. 2956 ForceSendFields []string `json:"-"` 2957 // NullFields is a list of field names (e.g. "BaseResourceUrl") to include in 2958 // API requests with the JSON null value. By default, fields with empty values 2959 // are omitted from API requests. See 2960 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2961 NullFields []string `json:"-"` 2962 } 2963 2964 func (s *Derived) MarshalJSON() ([]byte, error) { 2965 type NoMethod Derived 2966 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2967 } 2968 2969 // Detail: Identifies all occurrences of this vulnerability in the package for 2970 // a specific distro/location For example: glibc in 2971 // cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2 2972 type Detail struct { 2973 // CpeUri: The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/) 2974 // in which the vulnerability manifests. Examples include distro or storage 2975 // location for vulnerable jar. This field can be used as a filter in list 2976 // requests. 2977 CpeUri string `json:"cpeUri,omitempty"` 2978 // Description: A vendor-specific description of this note. 2979 Description string `json:"description,omitempty"` 2980 // FixedLocation: The fix for this specific package version. 2981 FixedLocation *VulnerabilityLocation `json:"fixedLocation,omitempty"` 2982 // IsObsolete: Whether this Detail is obsolete. Occurrences are expected not to 2983 // point to obsolete details. 2984 IsObsolete bool `json:"isObsolete,omitempty"` 2985 // MaxAffectedVersion: The max version of the package in which the 2986 // vulnerability exists. 2987 MaxAffectedVersion *Version `json:"maxAffectedVersion,omitempty"` 2988 // MinAffectedVersion: The min version of the package in which the 2989 // vulnerability exists. 2990 MinAffectedVersion *Version `json:"minAffectedVersion,omitempty"` 2991 // Package: The name of the package where the vulnerability was found. This 2992 // field can be used as a filter in list requests. 2993 Package string `json:"package,omitempty"` 2994 // PackageType: The type of package; whether native or non native(ruby gems, 2995 // node.js packages etc) 2996 PackageType string `json:"packageType,omitempty"` 2997 // SeverityName: The severity (eg: distro assigned severity) for this 2998 // vulnerability. 2999 SeverityName string `json:"severityName,omitempty"` 3000 // Source: The source from which the information in this Detail was obtained. 3001 Source string `json:"source,omitempty"` 3002 // Vendor: The vendor of the product. e.g. "google" 3003 Vendor string `json:"vendor,omitempty"` 3004 // ForceSendFields is a list of field names (e.g. "CpeUri") to unconditionally 3005 // include in API requests. By default, fields with empty or default values are 3006 // omitted from API requests. See 3007 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3008 // details. 3009 ForceSendFields []string `json:"-"` 3010 // NullFields is a list of field names (e.g. "CpeUri") to include in API 3011 // requests with the JSON null value. By default, fields with empty values are 3012 // omitted from API requests. See 3013 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3014 NullFields []string `json:"-"` 3015 } 3016 3017 func (s *Detail) MarshalJSON() ([]byte, error) { 3018 type NoMethod Detail 3019 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3020 } 3021 3022 // Digest: Digest information. 3023 type Digest struct { 3024 // Algo: `SHA1`, `SHA512` etc. 3025 Algo string `json:"algo,omitempty"` 3026 // DigestBytes: Value of the digest. 3027 DigestBytes string `json:"digestBytes,omitempty"` 3028 // ForceSendFields is a list of field names (e.g. "Algo") to unconditionally 3029 // include in API requests. By default, fields with empty or default values are 3030 // omitted from API requests. See 3031 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3032 // details. 3033 ForceSendFields []string `json:"-"` 3034 // NullFields is a list of field names (e.g. "Algo") to include in API requests 3035 // with the JSON null value. By default, fields with empty values are omitted 3036 // from API requests. See 3037 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3038 NullFields []string `json:"-"` 3039 } 3040 3041 func (s *Digest) MarshalJSON() ([]byte, error) { 3042 type NoMethod Digest 3043 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3044 } 3045 3046 // Discovered: Provides information about the scan status of a discovered 3047 // resource. 3048 type Discovered struct { 3049 // AnalysisCompleted: The list of analysis that were completed for a resource. 3050 AnalysisCompleted *AnalysisCompleted `json:"analysisCompleted,omitempty"` 3051 // AnalysisError: Indicates any errors encountered during analysis of a 3052 // resource. There could be 0 or more of these errors. 3053 AnalysisError []*Status `json:"analysisError,omitempty"` 3054 // AnalysisStatus: The status of discovery for the resource. 3055 // 3056 // Possible values: 3057 // "ANALYSIS_STATUS_UNSPECIFIED" - Unknown 3058 // "PENDING" - Resource is known but no action has been taken yet. 3059 // "SCANNING" - Resource is being analyzed. 3060 // "COMPLETE" - Analysis has completed 3061 // "FINISHED_SUCCESS" - Analysis has finished successfully. 3062 // "FINISHED_FAILED" - Analysis has finished unsuccessfully, the analysis 3063 // itself is in a bad state. 3064 // "FINISHED_UNSUPPORTED" - The resource is known not to be supported. 3065 AnalysisStatus string `json:"analysisStatus,omitempty"` 3066 // AnalysisStatusError: When an error is encountered this will contain a 3067 // LocalizedMessage under details to show to the user. The LocalizedMessage 3068 // output only and populated by the API. 3069 AnalysisStatusError *Status `json:"analysisStatusError,omitempty"` 3070 // ArchiveTime: The time occurrences related to this discovery occurrence were 3071 // archived. 3072 ArchiveTime string `json:"archiveTime,omitempty"` 3073 // ContinuousAnalysis: Whether the resource is continuously analyzed. 3074 // 3075 // Possible values: 3076 // "CONTINUOUS_ANALYSIS_UNSPECIFIED" - Unknown 3077 // "ACTIVE" - The resource is continuously analyzed. 3078 // "INACTIVE" - The resource is ignored for continuous analysis. 3079 ContinuousAnalysis string `json:"continuousAnalysis,omitempty"` 3080 // Cpe: The CPE of the resource being scanned. 3081 Cpe string `json:"cpe,omitempty"` 3082 // LastScanTime: The last time this resource was scanned. 3083 LastScanTime string `json:"lastScanTime,omitempty"` 3084 // Operation: Output only. An operation that indicates the status of the 3085 // current scan. This field is deprecated, do not use. 3086 Operation *Operation `json:"operation,omitempty"` 3087 // SbomStatus: Output only. The status of an SBOM generation. 3088 SbomStatus *SBOMStatus `json:"sbomStatus,omitempty"` 3089 // ForceSendFields is a list of field names (e.g. "AnalysisCompleted") to 3090 // unconditionally include in API requests. By default, fields with empty or 3091 // default values are omitted from API requests. See 3092 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3093 // details. 3094 ForceSendFields []string `json:"-"` 3095 // NullFields is a list of field names (e.g. "AnalysisCompleted") to include in 3096 // API requests with the JSON null value. By default, fields with empty values 3097 // are omitted from API requests. See 3098 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3099 NullFields []string `json:"-"` 3100 } 3101 3102 func (s *Discovered) MarshalJSON() ([]byte, error) { 3103 type NoMethod Discovered 3104 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3105 } 3106 3107 // Discovery: A note that indicates a type of analysis a provider would 3108 // perform. This note exists in a provider's project. A `Discovery` occurrence 3109 // is created in a consumer's project at the start of analysis. The 3110 // occurrence's operation will indicate the status of the analysis. Absence of 3111 // an occurrence linked to this note for a resource indicates that analysis 3112 // hasn't started. 3113 type Discovery struct { 3114 // AnalysisKind: The kind of analysis that is handled by this discovery. 3115 // 3116 // Possible values: 3117 // "KIND_UNSPECIFIED" - Unknown 3118 // "PACKAGE_VULNERABILITY" - The note and occurrence represent a package 3119 // vulnerability. 3120 // "BUILD_DETAILS" - The note and occurrence assert build provenance. 3121 // "IMAGE_BASIS" - This represents an image basis relationship. 3122 // "PACKAGE_MANAGER" - This represents a package installed via a package 3123 // manager. 3124 // "DEPLOYABLE" - The note and occurrence track deployment events. 3125 // "DISCOVERY" - The note and occurrence track the initial discovery status 3126 // of a resource. 3127 // "ATTESTATION_AUTHORITY" - This represents a logical "role" that can attest 3128 // to artifacts. 3129 // "UPGRADE" - This represents an available software upgrade. 3130 // "COMPLIANCE" - This represents a compliance check that can be applied to a 3131 // resource. 3132 // "SBOM" - This represents a software bill of materials. 3133 // "SPDX_PACKAGE" - This represents an SPDX Package. 3134 // "SPDX_FILE" - This represents an SPDX File. 3135 // "SPDX_RELATIONSHIP" - This represents an SPDX Relationship. 3136 // "DSSE_ATTESTATION" - This represents a DSSE attestation Note 3137 // "VULNERABILITY_ASSESSMENT" - This represents a Vulnerability Assessment. 3138 // "SBOM_REFERENCE" - This represents a reference to an SBOM. 3139 AnalysisKind string `json:"analysisKind,omitempty"` 3140 // ForceSendFields is a list of field names (e.g. "AnalysisKind") to 3141 // unconditionally include in API requests. By default, fields with empty or 3142 // default values are omitted from API requests. See 3143 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3144 // details. 3145 ForceSendFields []string `json:"-"` 3146 // NullFields is a list of field names (e.g. "AnalysisKind") to include in API 3147 // requests with the JSON null value. By default, fields with empty values are 3148 // omitted from API requests. See 3149 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3150 NullFields []string `json:"-"` 3151 } 3152 3153 func (s *Discovery) MarshalJSON() ([]byte, error) { 3154 type NoMethod Discovery 3155 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3156 } 3157 3158 // Distribution: This represents a particular channel of distribution for a 3159 // given package. e.g. Debian's jessie-backports dpkg mirror 3160 type Distribution struct { 3161 // Architecture: The CPU architecture for which packages in this distribution 3162 // channel were built 3163 // 3164 // Possible values: 3165 // "ARCHITECTURE_UNSPECIFIED" - Unknown architecture 3166 // "X86" - X86 architecture 3167 // "X64" - X64 architecture 3168 Architecture string `json:"architecture,omitempty"` 3169 // CpeUri: The cpe_uri in cpe format (https://cpe.mitre.org/specification/) 3170 // denoting the package manager version distributing a package. 3171 CpeUri string `json:"cpeUri,omitempty"` 3172 // Description: The distribution channel-specific description of this package. 3173 Description string `json:"description,omitempty"` 3174 // LatestVersion: The latest available version of this package in this 3175 // distribution channel. 3176 LatestVersion *Version `json:"latestVersion,omitempty"` 3177 // Maintainer: A freeform string denoting the maintainer of this package. 3178 Maintainer string `json:"maintainer,omitempty"` 3179 // Url: The distribution channel-specific homepage for this package. 3180 Url string `json:"url,omitempty"` 3181 // ForceSendFields is a list of field names (e.g. "Architecture") to 3182 // unconditionally include in API requests. By default, fields with empty or 3183 // default values are omitted from API requests. See 3184 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3185 // details. 3186 ForceSendFields []string `json:"-"` 3187 // NullFields is a list of field names (e.g. "Architecture") to include in API 3188 // requests with the JSON null value. By default, fields with empty values are 3189 // omitted from API requests. See 3190 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3191 NullFields []string `json:"-"` 3192 } 3193 3194 func (s *Distribution) MarshalJSON() ([]byte, error) { 3195 type NoMethod Distribution 3196 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3197 } 3198 3199 // DocumentNote: DocumentNote represents an SPDX Document Creation Infromation 3200 // section: https://spdx.github.io/spdx-spec/2-document-creation-information/ 3201 type DocumentNote struct { 3202 // DataLicence: Compliance with the SPDX specification includes populating the 3203 // SPDX fields therein with data related to such fields ("SPDX-Metadata") 3204 DataLicence string `json:"dataLicence,omitempty"` 3205 // SpdxVersion: Provide a reference number that can be used to understand how 3206 // to parse and interpret the rest of the file 3207 SpdxVersion string `json:"spdxVersion,omitempty"` 3208 // ForceSendFields is a list of field names (e.g. "DataLicence") to 3209 // unconditionally include in API requests. By default, fields with empty or 3210 // default values are omitted from API requests. See 3211 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3212 // details. 3213 ForceSendFields []string `json:"-"` 3214 // NullFields is a list of field names (e.g. "DataLicence") to include in API 3215 // requests with the JSON null value. By default, fields with empty values are 3216 // omitted from API requests. See 3217 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3218 NullFields []string `json:"-"` 3219 } 3220 3221 func (s *DocumentNote) MarshalJSON() ([]byte, error) { 3222 type NoMethod DocumentNote 3223 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3224 } 3225 3226 // DocumentOccurrence: DocumentOccurrence represents an SPDX Document Creation 3227 // Information section: 3228 // https://spdx.github.io/spdx-spec/2-document-creation-information/ 3229 type DocumentOccurrence struct { 3230 // CreateTime: Identify when the SPDX file was originally created. The date is 3231 // to be specified according to combined date and time in UTC format as 3232 // specified in ISO 8601 standard 3233 CreateTime string `json:"createTime,omitempty"` 3234 // CreatorComment: A field for creators of the SPDX file to provide general 3235 // comments about the creation of the SPDX file or any other relevant comment 3236 // not included in the other fields 3237 CreatorComment string `json:"creatorComment,omitempty"` 3238 // Creators: Identify who (or what, in the case of a tool) created the SPDX 3239 // file. If the SPDX file was created by an individual, indicate the person's 3240 // name 3241 Creators []string `json:"creators,omitempty"` 3242 // DocumentComment: A field for creators of the SPDX file content to provide 3243 // comments to the consumers of the SPDX document 3244 DocumentComment string `json:"documentComment,omitempty"` 3245 // ExternalDocumentRefs: Identify any external SPDX documents referenced within 3246 // this SPDX document 3247 ExternalDocumentRefs []string `json:"externalDocumentRefs,omitempty"` 3248 // Id: Identify the current SPDX document which may be referenced in 3249 // relationships by other files, packages internally and documents externally 3250 Id string `json:"id,omitempty"` 3251 // LicenseListVersion: A field for creators of the SPDX file to provide the 3252 // version of the SPDX License List used when the SPDX file was created 3253 LicenseListVersion string `json:"licenseListVersion,omitempty"` 3254 // Namespace: Provide an SPDX document specific namespace as a unique absolute 3255 // Uniform Resource Identifier (URI) as specified in RFC-3986, with the 3256 // exception of the ‘#’ delimiter 3257 Namespace string `json:"namespace,omitempty"` 3258 // Title: Identify name of this document as designated by creator 3259 Title string `json:"title,omitempty"` 3260 // ForceSendFields is a list of field names (e.g. "CreateTime") to 3261 // unconditionally include in API requests. By default, fields with empty or 3262 // default values are omitted from API requests. See 3263 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3264 // details. 3265 ForceSendFields []string `json:"-"` 3266 // NullFields is a list of field names (e.g. "CreateTime") to include in API 3267 // requests with the JSON null value. By default, fields with empty values are 3268 // omitted from API requests. See 3269 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3270 NullFields []string `json:"-"` 3271 } 3272 3273 func (s *DocumentOccurrence) MarshalJSON() ([]byte, error) { 3274 type NoMethod DocumentOccurrence 3275 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3276 } 3277 3278 // Empty: A generic empty message that you can re-use to avoid defining 3279 // duplicated empty messages in your APIs. A typical example is to use it as 3280 // the request or the response type of an API method. For instance: service Foo 3281 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } 3282 type Empty struct { 3283 // ServerResponse contains the HTTP response code and headers from the server. 3284 googleapi.ServerResponse `json:"-"` 3285 } 3286 3287 // Envelope: MUST match 3288 // https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An 3289 // authenticated message of arbitrary type. 3290 type Envelope struct { 3291 // Payload: The bytes being signed 3292 Payload string `json:"payload,omitempty"` 3293 // PayloadType: The type of payload being signed 3294 PayloadType string `json:"payloadType,omitempty"` 3295 // Signatures: The signatures over the payload 3296 Signatures []*EnvelopeSignature `json:"signatures,omitempty"` 3297 // ForceSendFields is a list of field names (e.g. "Payload") to unconditionally 3298 // include in API requests. By default, fields with empty or default values are 3299 // 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. "Payload") 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 *Envelope) MarshalJSON() ([]byte, error) { 3311 type NoMethod Envelope 3312 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3313 } 3314 3315 // EnvelopeSignature: A DSSE signature 3316 type EnvelopeSignature struct { 3317 // Keyid: A reference id to the key being used for signing 3318 Keyid string `json:"keyid,omitempty"` 3319 // Sig: The signature itself 3320 Sig string `json:"sig,omitempty"` 3321 // ForceSendFields is a list of field names (e.g. "Keyid") to unconditionally 3322 // include in API requests. By default, fields with empty or default values are 3323 // omitted from API requests. See 3324 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3325 // details. 3326 ForceSendFields []string `json:"-"` 3327 // NullFields is a list of field names (e.g. "Keyid") to include in API 3328 // requests with the JSON null value. By default, fields with empty values are 3329 // omitted from API requests. See 3330 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3331 NullFields []string `json:"-"` 3332 } 3333 3334 func (s *EnvelopeSignature) MarshalJSON() ([]byte, error) { 3335 type NoMethod EnvelopeSignature 3336 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3337 } 3338 3339 // Expr: Represents a textual expression in the Common Expression Language 3340 // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics 3341 // of CEL are documented at https://github.com/google/cel-spec. Example 3342 // (Comparison): title: "Summary size limit" description: "Determines if a 3343 // summary is less than 100 chars" expression: "document.summary.size() < 100" 3344 // Example (Equality): title: "Requestor is owner" description: "Determines if 3345 // requestor is the document owner" expression: "document.owner == 3346 // request.auth.claims.email" Example (Logic): title: "Public documents" 3347 // description: "Determine whether the document should be publicly visible" 3348 // expression: "document.type != 'private' && document.type != 'internal'" 3349 // Example (Data Manipulation): title: "Notification string" description: 3350 // "Create a notification string with a timestamp." expression: "'New message 3351 // received at ' + string(document.create_time)" The exact variables and 3352 // functions that may be referenced within an expression are determined by the 3353 // service that evaluates it. See the service documentation for additional 3354 // information. 3355 type Expr struct { 3356 // Description: Optional. Description of the expression. This is a longer text 3357 // which describes the expression, e.g. when hovered over it in a UI. 3358 Description string `json:"description,omitempty"` 3359 // Expression: Textual representation of an expression in Common Expression 3360 // Language syntax. 3361 Expression string `json:"expression,omitempty"` 3362 // Location: Optional. String indicating the location of the expression for 3363 // error reporting, e.g. a file name and a position in the file. 3364 Location string `json:"location,omitempty"` 3365 // Title: Optional. Title for the expression, i.e. a short string describing 3366 // its purpose. This can be used e.g. in UIs which allow to enter the 3367 // expression. 3368 Title string `json:"title,omitempty"` 3369 // ForceSendFields is a list of field names (e.g. "Description") to 3370 // unconditionally include in API requests. By default, fields with empty or 3371 // default values are omitted from API requests. See 3372 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3373 // details. 3374 ForceSendFields []string `json:"-"` 3375 // NullFields is a list of field names (e.g. "Description") to include in API 3376 // requests with the JSON null value. By default, fields with empty values are 3377 // omitted from API requests. See 3378 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3379 NullFields []string `json:"-"` 3380 } 3381 3382 func (s *Expr) MarshalJSON() ([]byte, error) { 3383 type NoMethod Expr 3384 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3385 } 3386 3387 // ExternalRef: An External Reference allows a Package to reference an external 3388 // source of additional information, metadata, enumerations, asset identifiers, 3389 // or downloadable content believed to be relevant to the Package 3390 type ExternalRef struct { 3391 // Category: An External Reference allows a Package to reference an external 3392 // source of additional information, metadata, enumerations, asset identifiers, 3393 // or downloadable content believed to be relevant to the Package 3394 // 3395 // Possible values: 3396 // "CATEGORY_UNSPECIFIED" - Unspecified 3397 // "SECURITY" - Security (e.g. cpe22Type, cpe23Type) 3398 // "PACKAGE_MANAGER" - Package Manager (e.g. maven-central, npm, nuget, 3399 // bower, purl) 3400 // "PERSISTENT_ID" - Persistent-Id (e.g. swh) 3401 // "OTHER" - Other 3402 Category string `json:"category,omitempty"` 3403 // Comment: Human-readable information about the purpose and target of the 3404 // reference 3405 Comment string `json:"comment,omitempty"` 3406 // Locator: The unique string with no spaces necessary to access the 3407 // package-specific information, metadata, or content within the target 3408 // location 3409 Locator string `json:"locator,omitempty"` 3410 // Type: Type of category (e.g. 'npm' for the PACKAGE_MANAGER category) 3411 Type string `json:"type,omitempty"` 3412 // ForceSendFields is a list of field names (e.g. "Category") to 3413 // unconditionally include in API requests. By default, fields with empty or 3414 // default values are omitted from API requests. See 3415 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3416 // details. 3417 ForceSendFields []string `json:"-"` 3418 // NullFields is a list of field names (e.g. "Category") to include in API 3419 // requests with the JSON null value. By default, fields with empty values are 3420 // omitted from API requests. See 3421 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3422 NullFields []string `json:"-"` 3423 } 3424 3425 func (s *ExternalRef) MarshalJSON() ([]byte, error) { 3426 type NoMethod ExternalRef 3427 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3428 } 3429 3430 // FileHashes: Container message for hashes of byte content of files, used in 3431 // Source messages to verify integrity of source input to the build. 3432 type FileHashes struct { 3433 // FileHash: Collection of file hashes. 3434 FileHash []*Hash `json:"fileHash,omitempty"` 3435 // ForceSendFields is a list of field names (e.g. "FileHash") to 3436 // unconditionally include in API requests. By default, fields with empty or 3437 // default values are omitted from API requests. See 3438 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3439 // details. 3440 ForceSendFields []string `json:"-"` 3441 // NullFields is a list of field names (e.g. "FileHash") to include in API 3442 // requests with the JSON null value. By default, fields with empty values are 3443 // omitted from API requests. See 3444 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3445 NullFields []string `json:"-"` 3446 } 3447 3448 func (s *FileHashes) MarshalJSON() ([]byte, error) { 3449 type NoMethod FileHashes 3450 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3451 } 3452 3453 // FileLocation: Indicates the location at which a package was found. 3454 type FileLocation struct { 3455 // FilePath: For jars that are contained inside .war files, this filepath can 3456 // indicate the path to war file combined with the path to jar file. 3457 FilePath string `json:"filePath,omitempty"` 3458 // ForceSendFields is a list of field names (e.g. "FilePath") to 3459 // unconditionally include in API requests. By default, fields with empty or 3460 // default values are omitted from API requests. See 3461 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3462 // details. 3463 ForceSendFields []string `json:"-"` 3464 // NullFields is a list of field names (e.g. "FilePath") to include in API 3465 // requests with the JSON null value. By default, fields with empty values are 3466 // omitted from API requests. See 3467 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3468 NullFields []string `json:"-"` 3469 } 3470 3471 func (s *FileLocation) MarshalJSON() ([]byte, error) { 3472 type NoMethod FileLocation 3473 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3474 } 3475 3476 // FileNote: FileNote represents an SPDX File Information section: 3477 // https://spdx.github.io/spdx-spec/4-file-information/ 3478 type FileNote struct { 3479 // Checksum: Provide a unique identifier to match analysis information on each 3480 // specific file in a package 3481 Checksum []string `json:"checksum,omitempty"` 3482 // FileType: This field provides information about the type of file identified 3483 // 3484 // Possible values: 3485 // "FILE_TYPE_UNSPECIFIED" - Unspecified 3486 // "SOURCE" - The file is human readable source code (.c, .html, etc.) 3487 // "BINARY" - The file is a compiled object, target image or binary 3488 // executable (.o, .a, etc.) 3489 // "ARCHIVE" - The file represents an archive (.tar, .jar, etc.) 3490 // "APPLICATION" - The file is associated with a specific application type 3491 // (MIME type of application/*) 3492 // "AUDIO" - The file is associated with an audio file (MIME type of audio/* 3493 // , e.g. .mp3) 3494 // "IMAGE" - The file is associated with an picture image file (MIME type of 3495 // image/*, e.g., .jpg, .gif) 3496 // "TEXT" - The file is human readable text file (MIME type of text/*) 3497 // "VIDEO" - The file is associated with a video file type (MIME type of 3498 // video/*) 3499 // "DOCUMENTATION" - The file serves as documentation 3500 // "SPDX" - The file is an SPDX document 3501 // "OTHER" - The file doesn't fit into the above categories (generated 3502 // artifacts, data files, etc.) 3503 FileType string `json:"fileType,omitempty"` 3504 // Title: Identify the full path and filename that corresponds to the file 3505 // information in this section 3506 Title string `json:"title,omitempty"` 3507 // ForceSendFields is a list of field names (e.g. "Checksum") to 3508 // unconditionally include in API requests. By default, fields with empty or 3509 // default values are omitted from API requests. See 3510 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3511 // details. 3512 ForceSendFields []string `json:"-"` 3513 // NullFields is a list of field names (e.g. "Checksum") to include in API 3514 // requests with the JSON null value. By default, fields with empty values are 3515 // omitted from API requests. See 3516 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3517 NullFields []string `json:"-"` 3518 } 3519 3520 func (s *FileNote) MarshalJSON() ([]byte, error) { 3521 type NoMethod FileNote 3522 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3523 } 3524 3525 // FileOccurrence: FileOccurrence represents an SPDX File Information section: 3526 // https://spdx.github.io/spdx-spec/4-file-information/ 3527 type FileOccurrence struct { 3528 // Attributions: This field provides a place for the SPDX data creator to 3529 // record, at the file level, acknowledgements that may be needed to be 3530 // communicated in some contexts 3531 Attributions []string `json:"attributions,omitempty"` 3532 // Comment: This field provides a place for the SPDX file creator to record any 3533 // general comments about the file 3534 Comment string `json:"comment,omitempty"` 3535 // Contributors: This field provides a place for the SPDX file creator to 3536 // record file contributors 3537 Contributors []string `json:"contributors,omitempty"` 3538 // Copyright: Identify the copyright holder of the file, as well as any dates 3539 // present 3540 Copyright string `json:"copyright,omitempty"` 3541 // FilesLicenseInfo: This field contains the license information actually found 3542 // in the file, if any 3543 FilesLicenseInfo []string `json:"filesLicenseInfo,omitempty"` 3544 // Id: Uniquely identify any element in an SPDX document which may be 3545 // referenced by other elements 3546 Id string `json:"id,omitempty"` 3547 // LicenseConcluded: This field contains the license the SPDX file creator has 3548 // concluded as governing the file or alternative values if the governing 3549 // license cannot be determined 3550 LicenseConcluded *License `json:"licenseConcluded,omitempty"` 3551 // Notice: This field provides a place for the SPDX file creator to record 3552 // license notices or other such related notices found in the file 3553 Notice string `json:"notice,omitempty"` 3554 // ForceSendFields is a list of field names (e.g. "Attributions") to 3555 // unconditionally include in API requests. By default, fields with empty or 3556 // default values are omitted from API requests. See 3557 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3558 // details. 3559 ForceSendFields []string `json:"-"` 3560 // NullFields is a list of field names (e.g. "Attributions") to include in API 3561 // requests with the JSON null value. By default, fields with empty values are 3562 // omitted from API requests. See 3563 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3564 NullFields []string `json:"-"` 3565 } 3566 3567 func (s *FileOccurrence) MarshalJSON() ([]byte, error) { 3568 type NoMethod FileOccurrence 3569 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3570 } 3571 3572 // Fingerprint: A set of properties that uniquely identify a given Docker 3573 // image. 3574 type Fingerprint struct { 3575 // V1Name: The layer-id of the final layer in the Docker image's v1 3576 // representation. This field can be used as a filter in list requests. 3577 V1Name string `json:"v1Name,omitempty"` 3578 // V2Blob: The ordered list of v2 blobs that represent a given image. 3579 V2Blob []string `json:"v2Blob,omitempty"` 3580 // V2Name: Output only. The name of the image's v2 blobs computed via: [bottom] 3581 // := v2_blobbottom := sha256(v2_blob[N] + " " + v2_name[N+1]) Only the name of 3582 // the final blob is kept. This field can be used as a filter in list requests. 3583 V2Name string `json:"v2Name,omitempty"` 3584 // ForceSendFields is a list of field names (e.g. "V1Name") to unconditionally 3585 // include in API requests. By default, fields with empty or default values are 3586 // omitted from API requests. See 3587 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3588 // details. 3589 ForceSendFields []string `json:"-"` 3590 // NullFields is a list of field names (e.g. "V1Name") to include in API 3591 // requests with the JSON null value. By default, fields with empty values are 3592 // omitted from API requests. See 3593 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3594 NullFields []string `json:"-"` 3595 } 3596 3597 func (s *Fingerprint) MarshalJSON() ([]byte, error) { 3598 type NoMethod Fingerprint 3599 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3600 } 3601 3602 // GetIamPolicyRequest: Request message for `GetIamPolicy` method. 3603 type GetIamPolicyRequest struct { 3604 // Options: OPTIONAL: A `GetPolicyOptions` object for specifying options to 3605 // `GetIamPolicy`. 3606 Options *GetPolicyOptions `json:"options,omitempty"` 3607 // ForceSendFields is a list of field names (e.g. "Options") to unconditionally 3608 // include in API requests. By default, fields with empty or default values are 3609 // omitted from API requests. See 3610 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3611 // details. 3612 ForceSendFields []string `json:"-"` 3613 // NullFields is a list of field names (e.g. "Options") to include in API 3614 // requests with the JSON null value. By default, fields with empty values are 3615 // omitted from API requests. See 3616 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3617 NullFields []string `json:"-"` 3618 } 3619 3620 func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) { 3621 type NoMethod GetIamPolicyRequest 3622 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3623 } 3624 3625 // GetPolicyOptions: Encapsulates settings provided to GetIamPolicy. 3626 type GetPolicyOptions struct { 3627 // RequestedPolicyVersion: Optional. The maximum policy version that will be 3628 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying 3629 // an invalid value will be rejected. Requests for policies with any 3630 // conditional role bindings must specify version 3. Policies with no 3631 // conditional role bindings may specify any valid value or leave the field 3632 // unset. The policy in the response might use the policy version that you 3633 // specified, or it might use a lower policy version. For example, if you 3634 // specify version 3, but the policy has no conditional role bindings, the 3635 // response uses version 1. To learn which resources support conditions in 3636 // their IAM policies, see the IAM documentation 3637 // (https://cloud.google.com/iam/help/conditions/resource-policies). 3638 RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"` 3639 // ForceSendFields is a list of field names (e.g. "RequestedPolicyVersion") to 3640 // unconditionally include in API requests. By default, fields with empty or 3641 // default values are omitted from API requests. See 3642 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3643 // details. 3644 ForceSendFields []string `json:"-"` 3645 // NullFields is a list of field names (e.g. "RequestedPolicyVersion") to 3646 // include in API requests with the JSON null value. By default, fields with 3647 // empty values are omitted from API requests. See 3648 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3649 NullFields []string `json:"-"` 3650 } 3651 3652 func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) { 3653 type NoMethod GetPolicyOptions 3654 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3655 } 3656 3657 // GetVulnzOccurrencesSummaryResponse: A summary of how many vulnz occurrences 3658 // there are per severity type. counts by groups, or if we should have 3659 // different summary messages like this. 3660 type GetVulnzOccurrencesSummaryResponse struct { 3661 // Counts: A map of how many occurrences were found for each severity. 3662 Counts []*SeverityCount `json:"counts,omitempty"` 3663 3664 // ServerResponse contains the HTTP response code and headers from the server. 3665 googleapi.ServerResponse `json:"-"` 3666 // ForceSendFields is a list of field names (e.g. "Counts") to unconditionally 3667 // include in API requests. By default, fields with empty or default values are 3668 // omitted from API requests. See 3669 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3670 // details. 3671 ForceSendFields []string `json:"-"` 3672 // NullFields is a list of field names (e.g. "Counts") to include in API 3673 // requests with the JSON null value. By default, fields with empty values are 3674 // omitted from API requests. See 3675 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3676 NullFields []string `json:"-"` 3677 } 3678 3679 func (s *GetVulnzOccurrencesSummaryResponse) MarshalJSON() ([]byte, error) { 3680 type NoMethod GetVulnzOccurrencesSummaryResponse 3681 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3682 } 3683 3684 // GoogleDevtoolsContaineranalysisV1alpha1AliasContext: An alias to a repo 3685 // revision. 3686 type GoogleDevtoolsContaineranalysisV1alpha1AliasContext struct { 3687 // Kind: The alias kind. 3688 // 3689 // Possible values: 3690 // "KIND_UNSPECIFIED" - Unknown. 3691 // "FIXED" - Git tag. 3692 // "MOVABLE" - Git branch. 3693 // "OTHER" - Used to specify non-standard aliases. For example, if a Git repo 3694 // has a ref named "refs/foo/bar". 3695 Kind string `json:"kind,omitempty"` 3696 // Name: The alias name. 3697 Name string `json:"name,omitempty"` 3698 // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally 3699 // include in API requests. By default, fields with empty or default values are 3700 // omitted from API requests. See 3701 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3702 // details. 3703 ForceSendFields []string `json:"-"` 3704 // NullFields is a list of field names (e.g. "Kind") to include in API requests 3705 // with the JSON null value. By default, fields with empty values are omitted 3706 // from API requests. See 3707 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3708 NullFields []string `json:"-"` 3709 } 3710 3711 func (s *GoogleDevtoolsContaineranalysisV1alpha1AliasContext) MarshalJSON() ([]byte, error) { 3712 type NoMethod GoogleDevtoolsContaineranalysisV1alpha1AliasContext 3713 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3714 } 3715 3716 // GoogleDevtoolsContaineranalysisV1alpha1CloudRepoSourceContext: A 3717 // CloudRepoSourceContext denotes a particular revision in a Google Cloud 3718 // Source Repo. 3719 type GoogleDevtoolsContaineranalysisV1alpha1CloudRepoSourceContext struct { 3720 // AliasContext: An alias, which may be a branch or tag. 3721 AliasContext *GoogleDevtoolsContaineranalysisV1alpha1AliasContext `json:"aliasContext,omitempty"` 3722 // RepoId: The ID of the repo. 3723 RepoId *GoogleDevtoolsContaineranalysisV1alpha1RepoId `json:"repoId,omitempty"` 3724 // RevisionId: A revision ID. 3725 RevisionId string `json:"revisionId,omitempty"` 3726 // ForceSendFields is a list of field names (e.g. "AliasContext") to 3727 // unconditionally include in API requests. By default, fields with empty or 3728 // default values are omitted from API requests. See 3729 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3730 // details. 3731 ForceSendFields []string `json:"-"` 3732 // NullFields is a list of field names (e.g. "AliasContext") to include in API 3733 // requests with the JSON null value. By default, fields with empty values are 3734 // omitted from API requests. See 3735 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3736 NullFields []string `json:"-"` 3737 } 3738 3739 func (s *GoogleDevtoolsContaineranalysisV1alpha1CloudRepoSourceContext) MarshalJSON() ([]byte, error) { 3740 type NoMethod GoogleDevtoolsContaineranalysisV1alpha1CloudRepoSourceContext 3741 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3742 } 3743 3744 // GoogleDevtoolsContaineranalysisV1alpha1GerritSourceContext: A SourceContext 3745 // referring to a Gerrit project. 3746 type GoogleDevtoolsContaineranalysisV1alpha1GerritSourceContext struct { 3747 // AliasContext: An alias, which may be a branch or tag. 3748 AliasContext *GoogleDevtoolsContaineranalysisV1alpha1AliasContext `json:"aliasContext,omitempty"` 3749 // GerritProject: The full project name within the host. Projects may be 3750 // nested, so "project/subproject" is a valid project name. The "repo name" is 3751 // the hostURI/project. 3752 GerritProject string `json:"gerritProject,omitempty"` 3753 // HostUri: The URI of a running Gerrit instance. 3754 HostUri string `json:"hostUri,omitempty"` 3755 // RevisionId: A revision (commit) ID. 3756 RevisionId string `json:"revisionId,omitempty"` 3757 // ForceSendFields is a list of field names (e.g. "AliasContext") to 3758 // unconditionally include in API requests. By default, fields with empty or 3759 // default values are omitted from API requests. See 3760 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3761 // details. 3762 ForceSendFields []string `json:"-"` 3763 // NullFields is a list of field names (e.g. "AliasContext") to include in API 3764 // requests with the JSON null value. By default, fields with empty values are 3765 // omitted from API requests. See 3766 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3767 NullFields []string `json:"-"` 3768 } 3769 3770 func (s *GoogleDevtoolsContaineranalysisV1alpha1GerritSourceContext) MarshalJSON() ([]byte, error) { 3771 type NoMethod GoogleDevtoolsContaineranalysisV1alpha1GerritSourceContext 3772 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3773 } 3774 3775 // GoogleDevtoolsContaineranalysisV1alpha1GitSourceContext: A GitSourceContext 3776 // denotes a particular revision in a third party Git repository (e.g., 3777 // GitHub). 3778 type GoogleDevtoolsContaineranalysisV1alpha1GitSourceContext struct { 3779 // RevisionId: Required. Git commit hash. 3780 RevisionId string `json:"revisionId,omitempty"` 3781 // Url: Git repository URL. 3782 Url string `json:"url,omitempty"` 3783 // ForceSendFields is a list of field names (e.g. "RevisionId") to 3784 // unconditionally include in API requests. By default, fields with empty or 3785 // default values are omitted from API requests. See 3786 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3787 // details. 3788 ForceSendFields []string `json:"-"` 3789 // NullFields is a list of field names (e.g. "RevisionId") to include in API 3790 // requests with the JSON null value. By default, fields with empty values are 3791 // omitted from API requests. See 3792 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3793 NullFields []string `json:"-"` 3794 } 3795 3796 func (s *GoogleDevtoolsContaineranalysisV1alpha1GitSourceContext) MarshalJSON() ([]byte, error) { 3797 type NoMethod GoogleDevtoolsContaineranalysisV1alpha1GitSourceContext 3798 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3799 } 3800 3801 // GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata: Metadata for all 3802 // operations used and required for all operations that created by Container 3803 // Analysis Providers 3804 type GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata struct { 3805 // CreateTime: Output only. The time this operation was created. 3806 CreateTime string `json:"createTime,omitempty"` 3807 // EndTime: Output only. The time that this operation was marked completed or 3808 // failed. 3809 EndTime string `json:"endTime,omitempty"` 3810 // ForceSendFields is a list of field names (e.g. "CreateTime") to 3811 // unconditionally include in API requests. By default, fields with empty or 3812 // default values are omitted from API requests. See 3813 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3814 // details. 3815 ForceSendFields []string `json:"-"` 3816 // NullFields is a list of field names (e.g. "CreateTime") to include in API 3817 // requests with the JSON null value. By default, fields with empty values are 3818 // omitted from API requests. See 3819 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3820 NullFields []string `json:"-"` 3821 } 3822 3823 func (s *GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata) MarshalJSON() ([]byte, error) { 3824 type NoMethod GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata 3825 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3826 } 3827 3828 // GoogleDevtoolsContaineranalysisV1alpha1ProjectRepoId: Selects a repo using a 3829 // Google Cloud Platform project ID (e.g., winged-cargo-31) and a repo name 3830 // within that project. 3831 type GoogleDevtoolsContaineranalysisV1alpha1ProjectRepoId struct { 3832 // ProjectId: The ID of the project. 3833 ProjectId string `json:"projectId,omitempty"` 3834 // RepoName: The name of the repo. Leave empty for the default repo. 3835 RepoName string `json:"repoName,omitempty"` 3836 // ForceSendFields is a list of field names (e.g. "ProjectId") to 3837 // unconditionally include in API requests. By default, fields with empty or 3838 // default values are omitted from API requests. See 3839 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3840 // details. 3841 ForceSendFields []string `json:"-"` 3842 // NullFields is a list of field names (e.g. "ProjectId") to include in API 3843 // requests with the JSON null value. By default, fields with empty values are 3844 // omitted from API requests. See 3845 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3846 NullFields []string `json:"-"` 3847 } 3848 3849 func (s *GoogleDevtoolsContaineranalysisV1alpha1ProjectRepoId) MarshalJSON() ([]byte, error) { 3850 type NoMethod GoogleDevtoolsContaineranalysisV1alpha1ProjectRepoId 3851 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3852 } 3853 3854 // GoogleDevtoolsContaineranalysisV1alpha1RepoId: A unique identifier for a 3855 // Cloud Repo. 3856 type GoogleDevtoolsContaineranalysisV1alpha1RepoId struct { 3857 // ProjectRepoId: A combination of a project ID and a repo name. 3858 ProjectRepoId *GoogleDevtoolsContaineranalysisV1alpha1ProjectRepoId `json:"projectRepoId,omitempty"` 3859 // Uid: A server-assigned, globally unique identifier. 3860 Uid string `json:"uid,omitempty"` 3861 // ForceSendFields is a list of field names (e.g. "ProjectRepoId") to 3862 // unconditionally include in API requests. By default, fields with empty or 3863 // default values are omitted from API requests. See 3864 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3865 // details. 3866 ForceSendFields []string `json:"-"` 3867 // NullFields is a list of field names (e.g. "ProjectRepoId") to include in API 3868 // requests with the JSON null value. By default, fields with empty values are 3869 // omitted from API requests. See 3870 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3871 NullFields []string `json:"-"` 3872 } 3873 3874 func (s *GoogleDevtoolsContaineranalysisV1alpha1RepoId) MarshalJSON() ([]byte, error) { 3875 type NoMethod GoogleDevtoolsContaineranalysisV1alpha1RepoId 3876 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3877 } 3878 3879 // GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaBuilder: 3880 // Identifies the entity that executed the recipe, which is trusted to have 3881 // correctly performed the operation and populated this provenance. 3882 type GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaBuilder struct { 3883 // Id: URI indicating the builder’s identity. 3884 Id string `json:"id,omitempty"` 3885 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 3886 // include in API requests. By default, fields with empty or default values are 3887 // omitted from API requests. See 3888 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3889 // details. 3890 ForceSendFields []string `json:"-"` 3891 // NullFields is a list of field names (e.g. "Id") to include in API requests 3892 // with the JSON null value. By default, fields with empty values are omitted 3893 // from API requests. See 3894 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3895 NullFields []string `json:"-"` 3896 } 3897 3898 func (s *GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaBuilder) MarshalJSON() ([]byte, error) { 3899 type NoMethod GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaBuilder 3900 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3901 } 3902 3903 // GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaCompleteness: 3904 // 3905 // Indicates that the builder claims certain fields in this message to be 3906 // 3907 // complete. 3908 type GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaCompleteness struct { 3909 // Environment: If true, the builder claims that invocation.environment is 3910 // complete. 3911 Environment bool `json:"environment,omitempty"` 3912 // Materials: If true, the builder claims that materials is complete. 3913 Materials bool `json:"materials,omitempty"` 3914 // Parameters: If true, the builder claims that invocation.parameters is 3915 // complete. 3916 Parameters bool `json:"parameters,omitempty"` 3917 // ForceSendFields is a list of field names (e.g. "Environment") to 3918 // unconditionally include in API requests. By default, fields with empty or 3919 // default values are omitted from API requests. See 3920 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3921 // details. 3922 ForceSendFields []string `json:"-"` 3923 // NullFields is a list of field names (e.g. "Environment") to include in API 3924 // requests with the JSON null value. By default, fields with empty values are 3925 // omitted from API requests. See 3926 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3927 NullFields []string `json:"-"` 3928 } 3929 3930 func (s *GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaCompleteness) MarshalJSON() ([]byte, error) { 3931 type NoMethod GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaCompleteness 3932 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3933 } 3934 3935 // GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaConfigSource: 3936 // 3937 // Describes where the config file that kicked off the build came from. This 3938 // 3939 // is effectively a pointer to the source where buildConfig came from. 3940 type GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaConfigSource struct { 3941 // Digest: Collection of cryptographic digests for the contents of the artifact 3942 // specified by invocation.configSource.uri. 3943 Digest map[string]string `json:"digest,omitempty"` 3944 // EntryPoint: String identifying the entry point into the build. 3945 EntryPoint string `json:"entryPoint,omitempty"` 3946 // Uri: URI indicating the identity of the source of the config. 3947 Uri string `json:"uri,omitempty"` 3948 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally 3949 // include in API requests. By default, fields with empty or default values are 3950 // omitted from API requests. See 3951 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3952 // details. 3953 ForceSendFields []string `json:"-"` 3954 // NullFields is a list of field names (e.g. "Digest") to include in API 3955 // requests with the JSON null value. By default, fields with empty values are 3956 // omitted from API requests. See 3957 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3958 NullFields []string `json:"-"` 3959 } 3960 3961 func (s *GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaConfigSource) MarshalJSON() ([]byte, error) { 3962 type NoMethod GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaConfigSource 3963 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3964 } 3965 3966 // GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaInvocation: 3967 // Identifies the event that kicked off the build. 3968 type GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaInvocation struct { 3969 // ConfigSource: Describes where the config file that kicked off the build came 3970 // from. 3971 ConfigSource *GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaConfigSource `json:"configSource,omitempty"` 3972 // Environment: Any other builder-controlled inputs necessary for correctly 3973 // evaluating the build. 3974 Environment googleapi.RawMessage `json:"environment,omitempty"` 3975 // Parameters: Collection of all external inputs that influenced the build on 3976 // top of invocation.configSource. 3977 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 3978 // ForceSendFields is a list of field names (e.g. "ConfigSource") to 3979 // unconditionally include in API requests. By default, fields with empty or 3980 // default values are omitted from API requests. See 3981 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3982 // details. 3983 ForceSendFields []string `json:"-"` 3984 // NullFields is a list of field names (e.g. "ConfigSource") to include in API 3985 // requests with the JSON null value. By default, fields with empty values are 3986 // omitted from API requests. See 3987 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3988 NullFields []string `json:"-"` 3989 } 3990 3991 func (s *GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaInvocation) MarshalJSON() ([]byte, error) { 3992 type NoMethod GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaInvocation 3993 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3994 } 3995 3996 // GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaMaterial: 3997 // The collection of artifacts that influenced the build including sources, 3998 // dependencies, build tools, base images, and so on. 3999 type GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaMaterial struct { 4000 // Digest: Collection of cryptographic digests for the contents of this 4001 // artifact. 4002 Digest map[string]string `json:"digest,omitempty"` 4003 // Uri: The method by which this artifact was referenced during the build. 4004 Uri string `json:"uri,omitempty"` 4005 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally 4006 // include in API requests. By default, fields with empty or default values are 4007 // omitted from API requests. See 4008 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4009 // details. 4010 ForceSendFields []string `json:"-"` 4011 // NullFields is a list of field names (e.g. "Digest") to include in API 4012 // requests with the JSON null value. By default, fields with empty values are 4013 // omitted from API requests. See 4014 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4015 NullFields []string `json:"-"` 4016 } 4017 4018 func (s *GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaMaterial) MarshalJSON() ([]byte, error) { 4019 type NoMethod GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaMaterial 4020 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4021 } 4022 4023 // GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaMetadata: 4024 // Other properties of the build. 4025 type GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaMetadata struct { 4026 // BuildFinishedOn: The timestamp of when the build completed. 4027 BuildFinishedOn string `json:"buildFinishedOn,omitempty"` 4028 // BuildInvocationId: Identifies this particular build invocation, which can be 4029 // useful for finding associated logs or other ad-hoc analysis. 4030 BuildInvocationId string `json:"buildInvocationId,omitempty"` 4031 // BuildStartedOn: The timestamp of when the build started. 4032 BuildStartedOn string `json:"buildStartedOn,omitempty"` 4033 // Completeness: Indicates that the builder claims certain fields in this 4034 // message to be complete. 4035 Completeness *GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaCompleteness `json:"completeness,omitempty"` 4036 // Reproducible: If true, the builder claims that running invocation on 4037 // materials will produce bit-for-bit identical output. 4038 Reproducible bool `json:"reproducible,omitempty"` 4039 // ForceSendFields is a list of field names (e.g. "BuildFinishedOn") to 4040 // unconditionally include in API requests. By default, fields with empty or 4041 // default values are omitted from API requests. See 4042 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4043 // details. 4044 ForceSendFields []string `json:"-"` 4045 // NullFields is a list of field names (e.g. "BuildFinishedOn") to include in 4046 // API requests with the JSON null value. By default, fields with empty values 4047 // are omitted from API requests. See 4048 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4049 NullFields []string `json:"-"` 4050 } 4051 4052 func (s *GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaMetadata) MarshalJSON() ([]byte, error) { 4053 type NoMethod GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaMetadata 4054 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4055 } 4056 4057 // GoogleDevtoolsContaineranalysisV1alpha1SourceContext: A SourceContext is a 4058 // reference to a tree of files. A SourceContext together with a path point to 4059 // a unique revision of a single file or directory. 4060 type GoogleDevtoolsContaineranalysisV1alpha1SourceContext struct { 4061 // CloudRepo: A SourceContext referring to a revision in a Google Cloud Source 4062 // Repo. 4063 CloudRepo *GoogleDevtoolsContaineranalysisV1alpha1CloudRepoSourceContext `json:"cloudRepo,omitempty"` 4064 // Gerrit: A SourceContext referring to a Gerrit project. 4065 Gerrit *GoogleDevtoolsContaineranalysisV1alpha1GerritSourceContext `json:"gerrit,omitempty"` 4066 // Git: A SourceContext referring to any third party Git repo (e.g., GitHub). 4067 Git *GoogleDevtoolsContaineranalysisV1alpha1GitSourceContext `json:"git,omitempty"` 4068 // Labels: Labels with user defined metadata. 4069 Labels map[string]string `json:"labels,omitempty"` 4070 // ForceSendFields is a list of field names (e.g. "CloudRepo") to 4071 // unconditionally include in API requests. By default, fields with empty or 4072 // default values are omitted from API requests. See 4073 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4074 // details. 4075 ForceSendFields []string `json:"-"` 4076 // NullFields is a list of field names (e.g. "CloudRepo") to include in API 4077 // requests with the JSON null value. By default, fields with empty values are 4078 // omitted from API requests. See 4079 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4080 NullFields []string `json:"-"` 4081 } 4082 4083 func (s *GoogleDevtoolsContaineranalysisV1alpha1SourceContext) MarshalJSON() ([]byte, error) { 4084 type NoMethod GoogleDevtoolsContaineranalysisV1alpha1SourceContext 4085 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4086 } 4087 4088 // Hash: Container message for hash values. 4089 type Hash struct { 4090 // Type: The type of hash that was performed. 4091 // 4092 // Possible values: 4093 // "NONE" - No hash requested. 4094 // "SHA256" - A sha256 hash. 4095 Type string `json:"type,omitempty"` 4096 // Value: The hash value. 4097 Value string `json:"value,omitempty"` 4098 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 4099 // include in API requests. By default, fields with empty or default values are 4100 // omitted from API requests. See 4101 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4102 // details. 4103 ForceSendFields []string `json:"-"` 4104 // NullFields is a list of field names (e.g. "Type") to include in API requests 4105 // with the JSON null value. By default, fields with empty values are omitted 4106 // from API requests. See 4107 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4108 NullFields []string `json:"-"` 4109 } 4110 4111 func (s *Hash) MarshalJSON() ([]byte, error) { 4112 type NoMethod Hash 4113 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4114 } 4115 4116 // IdentifierHelper: Helps in identifying the underlying product. This should 4117 // be treated like a one-of field. Only one field should be set in this proto. 4118 // This is a workaround because spanner indexes on one-of fields restrict 4119 // addition and deletion of fields. 4120 type IdentifierHelper struct { 4121 // Field: The field that is set in the API proto. 4122 // 4123 // Possible values: 4124 // "IDENTIFIER_HELPER_FIELD_UNSPECIFIED" - The helper isn't set. 4125 // "GENERIC_URI" - The generic_uri one-of field is set. 4126 Field string `json:"field,omitempty"` 4127 // GenericUri: Contains a URI which is vendor-specific. Example: The artifact 4128 // repository URL of an image. 4129 GenericUri string `json:"genericUri,omitempty"` 4130 // ForceSendFields is a list of field names (e.g. "Field") to unconditionally 4131 // include in API requests. By default, fields with empty or default values are 4132 // omitted from API requests. See 4133 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4134 // details. 4135 ForceSendFields []string `json:"-"` 4136 // NullFields is a list of field names (e.g. "Field") to include in API 4137 // requests with the JSON null value. By default, fields with empty values are 4138 // omitted from API requests. See 4139 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4140 NullFields []string `json:"-"` 4141 } 4142 4143 func (s *IdentifierHelper) MarshalJSON() ([]byte, error) { 4144 type NoMethod IdentifierHelper 4145 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4146 } 4147 4148 type InTotoProvenance struct { 4149 // BuilderConfig: required 4150 BuilderConfig *BuilderConfig `json:"builderConfig,omitempty"` 4151 // Materials: The collection of artifacts that influenced the build including 4152 // sources, dependencies, build tools, base images, and so on. This is 4153 // considered to be incomplete unless metadata.completeness.materials is true. 4154 // Unset or null is equivalent to empty. 4155 Materials []string `json:"materials,omitempty"` 4156 Metadata *Metadata `json:"metadata,omitempty"` 4157 // Recipe: Identifies the configuration used for the build. When combined with 4158 // materials, this SHOULD fully describe the build, such that re-running this 4159 // recipe results in bit-for-bit identical output (if the build is 4160 // reproducible). required 4161 Recipe *Recipe `json:"recipe,omitempty"` 4162 // ForceSendFields is a list of field names (e.g. "BuilderConfig") to 4163 // unconditionally include in API requests. By default, fields with empty or 4164 // default values are omitted from API requests. See 4165 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4166 // details. 4167 ForceSendFields []string `json:"-"` 4168 // NullFields is a list of field names (e.g. "BuilderConfig") to include in API 4169 // requests with the JSON null value. By default, fields with empty values are 4170 // omitted from API requests. See 4171 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4172 NullFields []string `json:"-"` 4173 } 4174 4175 func (s *InTotoProvenance) MarshalJSON() ([]byte, error) { 4176 type NoMethod InTotoProvenance 4177 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4178 } 4179 4180 type InTotoSlsaProvenanceV1 struct { 4181 // Type: InToto spec defined at 4182 // https://github.com/in-toto/attestation/tree/main/spec#statement 4183 Type string `json:"_type,omitempty"` 4184 Predicate *SlsaProvenanceV1 `json:"predicate,omitempty"` 4185 PredicateType string `json:"predicateType,omitempty"` 4186 Subject []*Subject `json:"subject,omitempty"` 4187 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 4188 // include in API requests. By default, fields with empty or default values are 4189 // omitted from API requests. See 4190 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4191 // details. 4192 ForceSendFields []string `json:"-"` 4193 // NullFields is a list of field names (e.g. "Type") to include in API requests 4194 // with the JSON null value. By default, fields with empty values are omitted 4195 // from API requests. See 4196 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4197 NullFields []string `json:"-"` 4198 } 4199 4200 func (s *InTotoSlsaProvenanceV1) MarshalJSON() ([]byte, error) { 4201 type NoMethod InTotoSlsaProvenanceV1 4202 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4203 } 4204 4205 // InTotoStatement: Spec defined at 4206 // https://github.com/in-toto/attestation/tree/main/spec#statement The 4207 // serialized InTotoStatement will be stored as Envelope.payload. 4208 // Envelope.payloadType is always "application/vnd.in-toto+json". 4209 type InTotoStatement struct { 4210 // Type: Always "https://in-toto.io/Statement/v0.1". 4211 Type string `json:"_type,omitempty"` 4212 // PredicateType: "https://slsa.dev/provenance/v0.1" for SlsaProvenance. 4213 PredicateType string `json:"predicateType,omitempty"` 4214 // Provenance: Generic Grafeas provenance. 4215 Provenance *InTotoProvenance `json:"provenance,omitempty"` 4216 // SlsaProvenance: SLSA 0.1 provenance. 4217 SlsaProvenance *SlsaProvenance `json:"slsaProvenance,omitempty"` 4218 // SlsaProvenanceZeroTwo: SLSA 0.2 provenance. 4219 SlsaProvenanceZeroTwo *SlsaProvenanceZeroTwo `json:"slsaProvenanceZeroTwo,omitempty"` 4220 // Subject: subject is the subjects of the intoto statement 4221 Subject []*Subject `json:"subject,omitempty"` 4222 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 4223 // include in API requests. By default, fields with empty or default values are 4224 // omitted from API requests. See 4225 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4226 // details. 4227 ForceSendFields []string `json:"-"` 4228 // NullFields is a list of field names (e.g. "Type") to include in API requests 4229 // with the JSON null value. By default, fields with empty values are omitted 4230 // from API requests. See 4231 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4232 NullFields []string `json:"-"` 4233 } 4234 4235 func (s *InTotoStatement) MarshalJSON() ([]byte, error) { 4236 type NoMethod InTotoStatement 4237 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4238 } 4239 4240 // Installation: This represents how a particular software package may be 4241 // installed on a system. 4242 type Installation struct { 4243 // Architecture: Output only. The CPU architecture for which packages in this 4244 // distribution channel were built. Architecture will be blank for language 4245 // packages. 4246 // 4247 // Possible values: 4248 // "ARCHITECTURE_UNSPECIFIED" - Unknown architecture 4249 // "X86" - X86 architecture 4250 // "X64" - X64 architecture 4251 Architecture string `json:"architecture,omitempty"` 4252 // CpeUri: Output only. The cpe_uri in CPE format 4253 // (https://cpe.mitre.org/specification/) denoting the package manager version 4254 // distributing a package. The cpe_uri will be blank for language packages. 4255 CpeUri string `json:"cpeUri,omitempty"` 4256 // License: Licenses that have been declared by the authors of the package. 4257 License *License `json:"license,omitempty"` 4258 // Location: All of the places within the filesystem versions of this package 4259 // have been found. 4260 Location []*Location `json:"location,omitempty"` 4261 // Name: Output only. The name of the installed package. 4262 Name string `json:"name,omitempty"` 4263 // PackageType: Output only. The type of package; whether native or non native 4264 // (e.g., ruby gems, node.js packages, etc.). 4265 PackageType string `json:"packageType,omitempty"` 4266 // Version: Output only. The version of the package. 4267 Version *Version `json:"version,omitempty"` 4268 // ForceSendFields is a list of field names (e.g. "Architecture") to 4269 // unconditionally include in API requests. By default, fields with empty or 4270 // default values are omitted from API requests. See 4271 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4272 // details. 4273 ForceSendFields []string `json:"-"` 4274 // NullFields is a list of field names (e.g. "Architecture") to include in API 4275 // requests with the JSON null value. By default, fields with empty values are 4276 // omitted from API requests. See 4277 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4278 NullFields []string `json:"-"` 4279 } 4280 4281 func (s *Installation) MarshalJSON() ([]byte, error) { 4282 type NoMethod Installation 4283 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4284 } 4285 4286 // Justification: Justification provides the justification when the state of 4287 // the assessment if NOT_AFFECTED. 4288 type Justification struct { 4289 // Details: Additional details on why this justification was chosen. 4290 Details string `json:"details,omitempty"` 4291 // JustificationType: The justification type for this vulnerability. 4292 // 4293 // Possible values: 4294 // "JUSTIFICATION_TYPE_UNSPECIFIED" - JUSTIFICATION_TYPE_UNSPECIFIED. 4295 // "COMPONENT_NOT_PRESENT" - The vulnerable component is not present in the 4296 // product. 4297 // "VULNERABLE_CODE_NOT_PRESENT" - The vulnerable code is not present. 4298 // Typically this case occurs when source code is configured or built in a way 4299 // that excludes the vulnerable code. 4300 // "VULNERABLE_CODE_NOT_IN_EXECUTE_PATH" - The vulnerable code can not be 4301 // executed. Typically this case occurs when the product includes the 4302 // vulnerable code but does not call or use the vulnerable code. 4303 // "VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY" - The vulnerable code 4304 // cannot be controlled by an attacker to exploit the vulnerability. 4305 // "INLINE_MITIGATIONS_ALREADY_EXIST" - The product includes built-in 4306 // protections or features that prevent exploitation of the vulnerability. 4307 // These built-in protections cannot be subverted by the attacker and cannot be 4308 // configured or disabled by the user. These mitigations completely prevent 4309 // exploitation based on known attack vectors. 4310 JustificationType string `json:"justificationType,omitempty"` 4311 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally 4312 // include in API requests. By default, fields with empty or default values are 4313 // omitted from API requests. See 4314 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4315 // details. 4316 ForceSendFields []string `json:"-"` 4317 // NullFields is a list of field names (e.g. "Details") to include in API 4318 // requests with the JSON null value. By default, fields with empty values are 4319 // omitted from API requests. See 4320 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4321 NullFields []string `json:"-"` 4322 } 4323 4324 func (s *Justification) MarshalJSON() ([]byte, error) { 4325 type NoMethod Justification 4326 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4327 } 4328 4329 // Layer: Layer holds metadata specific to a layer of a Docker image. 4330 type Layer struct { 4331 // Arguments: The recovered arguments to the Dockerfile directive. 4332 Arguments string `json:"arguments,omitempty"` 4333 // Directive: The recovered Dockerfile directive used to construct this layer. 4334 // 4335 // Possible values: 4336 // "DIRECTIVE_UNSPECIFIED" - Default value for unsupported/missing directive 4337 // "MAINTAINER" - https://docs.docker.com/engine/reference/builder/ 4338 // "RUN" - https://docs.docker.com/engine/reference/builder/ 4339 // "CMD" - https://docs.docker.com/engine/reference/builder/ 4340 // "LABEL" - https://docs.docker.com/engine/reference/builder/ 4341 // "EXPOSE" - https://docs.docker.com/engine/reference/builder/ 4342 // "ENV" - https://docs.docker.com/engine/reference/builder/ 4343 // "ADD" - https://docs.docker.com/engine/reference/builder/ 4344 // "COPY" - https://docs.docker.com/reference/builder/#copy 4345 // "ENTRYPOINT" - https://docs.docker.com/engine/reference/builder/ 4346 // "VOLUME" - https://docs.docker.com/engine/reference/builder/ 4347 // "USER" - https://docs.docker.com/engine/reference/builder/ 4348 // "WORKDIR" - https://docs.docker.com/engine/reference/builder/ 4349 // "ARG" - https://docs.docker.com/engine/reference/builder/ 4350 // "ONBUILD" - https://docs.docker.com/engine/reference/builder/ 4351 // "STOPSIGNAL" - https://docs.docker.com/engine/reference/builder/ 4352 // "HEALTHCHECK" - https://docs.docker.com/engine/reference/builder/ 4353 // "SHELL" - https://docs.docker.com/engine/reference/builder/ 4354 Directive string `json:"directive,omitempty"` 4355 // ForceSendFields is a list of field names (e.g. "Arguments") to 4356 // unconditionally include in API requests. By default, fields with empty or 4357 // default values are omitted from API requests. See 4358 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4359 // details. 4360 ForceSendFields []string `json:"-"` 4361 // NullFields is a list of field names (e.g. "Arguments") to include in API 4362 // requests with the JSON null value. By default, fields with empty values are 4363 // omitted from API requests. See 4364 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4365 NullFields []string `json:"-"` 4366 } 4367 4368 func (s *Layer) MarshalJSON() ([]byte, error) { 4369 type NoMethod Layer 4370 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4371 } 4372 4373 // License: License information. 4374 type License struct { 4375 // Comments: Comments 4376 Comments string `json:"comments,omitempty"` 4377 // Expression: Often a single license can be used to represent the licensing 4378 // terms. Sometimes it is necessary to include a choice of one or more licenses 4379 // or some combination of license identifiers. Examples: "LGPL-2.1-only OR 4380 // MIT", "LGPL-2.1-only AND MIT", "GPL-2.0-or-later WITH Bison-exception-2.2". 4381 Expression string `json:"expression,omitempty"` 4382 // ForceSendFields is a list of field names (e.g. "Comments") to 4383 // unconditionally include in API requests. By default, fields with empty or 4384 // default values are omitted from API requests. See 4385 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4386 // details. 4387 ForceSendFields []string `json:"-"` 4388 // NullFields is a list of field names (e.g. "Comments") to include in API 4389 // requests with the JSON null value. By default, fields with empty values are 4390 // omitted from API requests. See 4391 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4392 NullFields []string `json:"-"` 4393 } 4394 4395 func (s *License) MarshalJSON() ([]byte, error) { 4396 type NoMethod License 4397 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4398 } 4399 4400 // ListNoteOccurrencesResponse: Response including listed occurrences for a 4401 // note. 4402 type ListNoteOccurrencesResponse struct { 4403 // NextPageToken: Token to receive the next page of notes. 4404 NextPageToken string `json:"nextPageToken,omitempty"` 4405 // Occurrences: The occurrences attached to the specified note. 4406 Occurrences []*Occurrence `json:"occurrences,omitempty"` 4407 4408 // ServerResponse contains the HTTP response code and headers from the server. 4409 googleapi.ServerResponse `json:"-"` 4410 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 4411 // unconditionally include in API requests. By default, fields with empty or 4412 // default values are omitted from API requests. See 4413 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4414 // details. 4415 ForceSendFields []string `json:"-"` 4416 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 4417 // requests with the JSON null value. By default, fields with empty values are 4418 // omitted from API requests. See 4419 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4420 NullFields []string `json:"-"` 4421 } 4422 4423 func (s *ListNoteOccurrencesResponse) MarshalJSON() ([]byte, error) { 4424 type NoMethod ListNoteOccurrencesResponse 4425 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4426 } 4427 4428 // ListNotesResponse: Response including listed notes. 4429 type ListNotesResponse struct { 4430 // NextPageToken: The next pagination token in the list response. It should be 4431 // used as page_token for the following request. An empty value means no more 4432 // result. 4433 NextPageToken string `json:"nextPageToken,omitempty"` 4434 // Notes: The occurrences requested 4435 Notes []*Note `json:"notes,omitempty"` 4436 4437 // ServerResponse contains the HTTP response code and headers from the server. 4438 googleapi.ServerResponse `json:"-"` 4439 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 4440 // unconditionally include in API requests. By default, fields with empty or 4441 // default values are omitted from API requests. See 4442 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4443 // details. 4444 ForceSendFields []string `json:"-"` 4445 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 4446 // requests with the JSON null value. By default, fields with empty values are 4447 // omitted from API requests. See 4448 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4449 NullFields []string `json:"-"` 4450 } 4451 4452 func (s *ListNotesResponse) MarshalJSON() ([]byte, error) { 4453 type NoMethod ListNotesResponse 4454 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4455 } 4456 4457 // ListOccurrencesResponse: Response including listed active occurrences. 4458 type ListOccurrencesResponse struct { 4459 // NextPageToken: The next pagination token in the list response. It should be 4460 // used as `page_token` for the following request. An empty value means no more 4461 // results. 4462 NextPageToken string `json:"nextPageToken,omitempty"` 4463 // Occurrences: The occurrences requested. 4464 Occurrences []*Occurrence `json:"occurrences,omitempty"` 4465 4466 // ServerResponse contains the HTTP response code and headers from the server. 4467 googleapi.ServerResponse `json:"-"` 4468 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 4469 // unconditionally include in API requests. By default, fields with empty or 4470 // default values are omitted from API requests. See 4471 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4472 // details. 4473 ForceSendFields []string `json:"-"` 4474 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 4475 // requests with the JSON null value. By default, fields with empty values are 4476 // omitted from API requests. See 4477 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4478 NullFields []string `json:"-"` 4479 } 4480 4481 func (s *ListOccurrencesResponse) MarshalJSON() ([]byte, error) { 4482 type NoMethod ListOccurrencesResponse 4483 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4484 } 4485 4486 // ListScanConfigsResponse: A list of scan configs for the project. 4487 type ListScanConfigsResponse struct { 4488 // NextPageToken: A page token to pass in order to get more scan configs. 4489 NextPageToken string `json:"nextPageToken,omitempty"` 4490 // ScanConfigs: The set of scan configs. 4491 ScanConfigs []*ScanConfig `json:"scanConfigs,omitempty"` 4492 4493 // ServerResponse contains the HTTP response code and headers from the server. 4494 googleapi.ServerResponse `json:"-"` 4495 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 4496 // unconditionally include in API requests. By default, fields with empty or 4497 // default values are omitted from API requests. See 4498 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4499 // details. 4500 ForceSendFields []string `json:"-"` 4501 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 4502 // requests with the JSON null value. By default, fields with empty values are 4503 // omitted from API requests. See 4504 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4505 NullFields []string `json:"-"` 4506 } 4507 4508 func (s *ListScanConfigsResponse) MarshalJSON() ([]byte, error) { 4509 type NoMethod ListScanConfigsResponse 4510 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4511 } 4512 4513 // Location: An occurrence of a particular package installation found within a 4514 // system's filesystem. e.g. glibc was found in /var/lib/dpkg/status 4515 type Location struct { 4516 // CpeUri: Deprecated. The cpe_uri in cpe format 4517 // (https://cpe.mitre.org/specification/) denoting the package manager version 4518 // distributing a package. 4519 CpeUri string `json:"cpeUri,omitempty"` 4520 // Path: The path from which we gathered that this package/version is 4521 // installed. 4522 Path string `json:"path,omitempty"` 4523 // Version: Deprecated. The version installed at this location. 4524 Version *Version `json:"version,omitempty"` 4525 // ForceSendFields is a list of field names (e.g. "CpeUri") to unconditionally 4526 // include in API requests. By default, fields with empty or default values are 4527 // omitted from API requests. See 4528 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4529 // details. 4530 ForceSendFields []string `json:"-"` 4531 // NullFields is a list of field names (e.g. "CpeUri") to include in API 4532 // requests with the JSON null value. By default, fields with empty values are 4533 // omitted from API requests. See 4534 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4535 NullFields []string `json:"-"` 4536 } 4537 4538 func (s *Location) MarshalJSON() ([]byte, error) { 4539 type NoMethod Location 4540 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4541 } 4542 4543 // Material: Material is a material used in the generation of the provenance 4544 type Material struct { 4545 // Digest: digest is a map from a hash algorithm (e.g. sha256) to the value in 4546 // the material 4547 Digest map[string]string `json:"digest,omitempty"` 4548 // Uri: uri is the uri of the material 4549 Uri string `json:"uri,omitempty"` 4550 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally 4551 // include in API requests. By default, fields with empty or default values are 4552 // omitted from API requests. See 4553 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4554 // details. 4555 ForceSendFields []string `json:"-"` 4556 // NullFields is a list of field names (e.g. "Digest") to include in API 4557 // requests with the JSON null value. By default, fields with empty values are 4558 // omitted from API requests. See 4559 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4560 NullFields []string `json:"-"` 4561 } 4562 4563 func (s *Material) MarshalJSON() ([]byte, error) { 4564 type NoMethod Material 4565 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4566 } 4567 4568 // Metadata: Other properties of the build. 4569 type Metadata struct { 4570 // BuildFinishedOn: The timestamp of when the build completed. 4571 BuildFinishedOn string `json:"buildFinishedOn,omitempty"` 4572 // BuildInvocationId: Identifies the particular build invocation, which can be 4573 // useful for finding associated logs or other ad-hoc analysis. The value 4574 // SHOULD be globally unique, per in-toto Provenance spec. 4575 BuildInvocationId string `json:"buildInvocationId,omitempty"` 4576 // BuildStartedOn: The timestamp of when the build started. 4577 BuildStartedOn string `json:"buildStartedOn,omitempty"` 4578 // Completeness: Indicates that the builder claims certain fields in this 4579 // message to be complete. 4580 Completeness *Completeness `json:"completeness,omitempty"` 4581 // Reproducible: If true, the builder claims that running the recipe on 4582 // materials will produce bit-for-bit identical output. 4583 Reproducible bool `json:"reproducible,omitempty"` 4584 // ForceSendFields is a list of field names (e.g. "BuildFinishedOn") to 4585 // unconditionally include in API requests. By default, fields with empty or 4586 // default values are omitted from API requests. See 4587 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4588 // details. 4589 ForceSendFields []string `json:"-"` 4590 // NullFields is a list of field names (e.g. "BuildFinishedOn") to include in 4591 // API requests with the JSON null value. By default, fields with empty values 4592 // are omitted from API requests. See 4593 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4594 NullFields []string `json:"-"` 4595 } 4596 4597 func (s *Metadata) MarshalJSON() ([]byte, error) { 4598 type NoMethod Metadata 4599 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4600 } 4601 4602 // NonCompliantFile: Details about files that caused a compliance check to 4603 // fail. 4604 type NonCompliantFile struct { 4605 // DisplayCommand: Command to display the non-compliant files. 4606 DisplayCommand string `json:"displayCommand,omitempty"` 4607 // Path: display_command is a single command that can be used to display a list 4608 // of non compliant files. When there is no such command, we can also iterate a 4609 // list of non compliant file using 'path'. Empty if `display_command` is set. 4610 Path string `json:"path,omitempty"` 4611 // Reason: Explains why a file is non compliant for a CIS check. 4612 Reason string `json:"reason,omitempty"` 4613 // ForceSendFields is a list of field names (e.g. "DisplayCommand") to 4614 // unconditionally include in API requests. By default, fields with empty or 4615 // default values are omitted from API requests. See 4616 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4617 // details. 4618 ForceSendFields []string `json:"-"` 4619 // NullFields is a list of field names (e.g. "DisplayCommand") to include in 4620 // API requests with the JSON null value. By default, fields with empty values 4621 // are omitted from API requests. See 4622 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4623 NullFields []string `json:"-"` 4624 } 4625 4626 func (s *NonCompliantFile) MarshalJSON() ([]byte, error) { 4627 type NoMethod NonCompliantFile 4628 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4629 } 4630 4631 // Note: Provides a detailed description of a `Note`. 4632 type Note struct { 4633 // AttestationAuthority: A note describing an attestation role. 4634 AttestationAuthority *AttestationAuthority `json:"attestationAuthority,omitempty"` 4635 // BaseImage: A note describing a base image. 4636 BaseImage *Basis `json:"baseImage,omitempty"` 4637 // BuildType: Build provenance type for a verifiable build. 4638 BuildType *BuildType `json:"buildType,omitempty"` 4639 // Compliance: A note describing a compliance check. 4640 Compliance *ComplianceNote `json:"compliance,omitempty"` 4641 // CreateTime: Output only. The time this note was created. This field can be 4642 // used as a filter in list requests. 4643 CreateTime string `json:"createTime,omitempty"` 4644 // Deployable: A note describing something that can be deployed. 4645 Deployable *Deployable `json:"deployable,omitempty"` 4646 // Discovery: A note describing a provider/analysis type. 4647 Discovery *Discovery `json:"discovery,omitempty"` 4648 // DsseAttestation: A note describing a dsse attestation note. 4649 DsseAttestation *DSSEAttestationNote `json:"dsseAttestation,omitempty"` 4650 // ExpirationTime: Time of expiration for this note, null if note does not 4651 // expire. 4652 ExpirationTime string `json:"expirationTime,omitempty"` 4653 // Kind: Output only. This explicitly denotes which kind of note is specified. 4654 // This field can be used as a filter in list requests. 4655 // 4656 // Possible values: 4657 // "KIND_UNSPECIFIED" - Unknown 4658 // "PACKAGE_VULNERABILITY" - The note and occurrence represent a package 4659 // vulnerability. 4660 // "BUILD_DETAILS" - The note and occurrence assert build provenance. 4661 // "IMAGE_BASIS" - This represents an image basis relationship. 4662 // "PACKAGE_MANAGER" - This represents a package installed via a package 4663 // manager. 4664 // "DEPLOYABLE" - The note and occurrence track deployment events. 4665 // "DISCOVERY" - The note and occurrence track the initial discovery status 4666 // of a resource. 4667 // "ATTESTATION_AUTHORITY" - This represents a logical "role" that can attest 4668 // to artifacts. 4669 // "UPGRADE" - This represents an available software upgrade. 4670 // "COMPLIANCE" - This represents a compliance check that can be applied to a 4671 // resource. 4672 // "SBOM" - This represents a software bill of materials. 4673 // "SPDX_PACKAGE" - This represents an SPDX Package. 4674 // "SPDX_FILE" - This represents an SPDX File. 4675 // "SPDX_RELATIONSHIP" - This represents an SPDX Relationship. 4676 // "DSSE_ATTESTATION" - This represents a DSSE attestation Note 4677 // "VULNERABILITY_ASSESSMENT" - This represents a Vulnerability Assessment. 4678 // "SBOM_REFERENCE" - This represents a reference to an SBOM. 4679 Kind string `json:"kind,omitempty"` 4680 // LongDescription: A detailed description of this `Note`. 4681 LongDescription string `json:"longDescription,omitempty"` 4682 // Name: The name of the note in the form 4683 // "projects/{provider_project_id}/notes/{NOTE_ID}" 4684 Name string `json:"name,omitempty"` 4685 // Package: A note describing a package hosted by various package managers. 4686 Package *Package `json:"package,omitempty"` 4687 // RelatedUrl: URLs associated with this note 4688 RelatedUrl []*RelatedUrl `json:"relatedUrl,omitempty"` 4689 // Sbom: A note describing a software bill of materials. 4690 Sbom *DocumentNote `json:"sbom,omitempty"` 4691 // SbomReference: A note describing a reference to an SBOM. 4692 SbomReference *SBOMReferenceNote `json:"sbomReference,omitempty"` 4693 // ShortDescription: A one sentence description of this `Note`. 4694 ShortDescription string `json:"shortDescription,omitempty"` 4695 // SpdxFile: A note describing an SPDX File. 4696 SpdxFile *FileNote `json:"spdxFile,omitempty"` 4697 // SpdxPackage: A note describing an SPDX Package. 4698 SpdxPackage *PackageInfoNote `json:"spdxPackage,omitempty"` 4699 // SpdxRelationship: A note describing a relationship between SPDX elements. 4700 SpdxRelationship *RelationshipNote `json:"spdxRelationship,omitempty"` 4701 // UpdateTime: Output only. The time this note was last updated. This field can 4702 // be used as a filter in list requests. 4703 UpdateTime string `json:"updateTime,omitempty"` 4704 // Upgrade: A note describing an upgrade. 4705 Upgrade *UpgradeNote `json:"upgrade,omitempty"` 4706 // VulnerabilityAssessment: A note describing a vulnerability assessment. 4707 VulnerabilityAssessment *VulnerabilityAssessmentNote `json:"vulnerabilityAssessment,omitempty"` 4708 // VulnerabilityType: A package vulnerability type of note. 4709 VulnerabilityType *VulnerabilityType `json:"vulnerabilityType,omitempty"` 4710 4711 // ServerResponse contains the HTTP response code and headers from the server. 4712 googleapi.ServerResponse `json:"-"` 4713 // ForceSendFields is a list of field names (e.g. "AttestationAuthority") to 4714 // unconditionally include in API requests. By default, fields with empty or 4715 // default values are omitted from API requests. See 4716 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4717 // details. 4718 ForceSendFields []string `json:"-"` 4719 // NullFields is a list of field names (e.g. "AttestationAuthority") to include 4720 // in API requests with the JSON null value. By default, fields with empty 4721 // values are omitted from API requests. See 4722 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4723 NullFields []string `json:"-"` 4724 } 4725 4726 func (s *Note) MarshalJSON() ([]byte, error) { 4727 type NoMethod Note 4728 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4729 } 4730 4731 // Occurrence: `Occurrence` includes information about analysis occurrences for 4732 // an image. 4733 type Occurrence struct { 4734 // Attestation: Describes an attestation of an artifact. 4735 Attestation *Attestation `json:"attestation,omitempty"` 4736 // BuildDetails: Build details for a verifiable build. 4737 BuildDetails *BuildDetails `json:"buildDetails,omitempty"` 4738 // Compliance: Describes whether or not a resource passes compliance checks. 4739 Compliance *ComplianceOccurrence `json:"compliance,omitempty"` 4740 // CreateTime: Output only. The time this `Occurrence` was created. 4741 CreateTime string `json:"createTime,omitempty"` 4742 // Deployment: Describes the deployment of an artifact on a runtime. 4743 Deployment *Deployment `json:"deployment,omitempty"` 4744 // DerivedImage: Describes how this resource derives from the basis in the 4745 // associated note. 4746 DerivedImage *Derived `json:"derivedImage,omitempty"` 4747 // Discovered: Describes the initial scan status for this resource. 4748 Discovered *Discovered `json:"discovered,omitempty"` 4749 // DsseAttestation: This represents a DSSE attestation occurrence 4750 DsseAttestation *DSSEAttestationOccurrence `json:"dsseAttestation,omitempty"` 4751 // Envelope: https://github.com/secure-systems-lab/dsse 4752 Envelope *Envelope `json:"envelope,omitempty"` 4753 // Installation: Describes the installation of a package on the linked 4754 // resource. 4755 Installation *Installation `json:"installation,omitempty"` 4756 // Kind: Output only. This explicitly denotes which of the `Occurrence` details 4757 // are specified. This field can be used as a filter in list requests. 4758 // 4759 // Possible values: 4760 // "KIND_UNSPECIFIED" - Unknown 4761 // "PACKAGE_VULNERABILITY" - The note and occurrence represent a package 4762 // vulnerability. 4763 // "BUILD_DETAILS" - The note and occurrence assert build provenance. 4764 // "IMAGE_BASIS" - This represents an image basis relationship. 4765 // "PACKAGE_MANAGER" - This represents a package installed via a package 4766 // manager. 4767 // "DEPLOYABLE" - The note and occurrence track deployment events. 4768 // "DISCOVERY" - The note and occurrence track the initial discovery status 4769 // of a resource. 4770 // "ATTESTATION_AUTHORITY" - This represents a logical "role" that can attest 4771 // to artifacts. 4772 // "UPGRADE" - This represents an available software upgrade. 4773 // "COMPLIANCE" - This represents a compliance check that can be applied to a 4774 // resource. 4775 // "SBOM" - This represents a software bill of materials. 4776 // "SPDX_PACKAGE" - This represents an SPDX Package. 4777 // "SPDX_FILE" - This represents an SPDX File. 4778 // "SPDX_RELATIONSHIP" - This represents an SPDX Relationship. 4779 // "DSSE_ATTESTATION" - This represents a DSSE attestation Note 4780 // "VULNERABILITY_ASSESSMENT" - This represents a Vulnerability Assessment. 4781 // "SBOM_REFERENCE" - This represents a reference to an SBOM. 4782 Kind string `json:"kind,omitempty"` 4783 // Name: Output only. The name of the `Occurrence` in the form 4784 // "projects/{project_id}/occurrences/{OCCURRENCE_ID}" 4785 Name string `json:"name,omitempty"` 4786 // NoteName: An analysis note associated with this image, in the form 4787 // "providers/{provider_id}/notes/{NOTE_ID}" This field can be used as a filter 4788 // in list requests. 4789 NoteName string `json:"noteName,omitempty"` 4790 // Remediation: A description of actions that can be taken to remedy the `Note` 4791 Remediation string `json:"remediation,omitempty"` 4792 // Resource: The resource for which the `Occurrence` applies. 4793 Resource *Resource `json:"resource,omitempty"` 4794 // ResourceUrl: The unique URL of the image or the container for which the 4795 // `Occurrence` applies. For example, https://gcr.io/project/image@sha256:foo 4796 // This field can be used as a filter in list requests. 4797 ResourceUrl string `json:"resourceUrl,omitempty"` 4798 // Sbom: Describes a specific software bill of materials document. 4799 Sbom *DocumentOccurrence `json:"sbom,omitempty"` 4800 // SbomReference: This represents an SBOM reference occurrence 4801 SbomReference *SBOMReferenceOccurrence `json:"sbomReference,omitempty"` 4802 // SpdxFile: Describes a specific SPDX File. 4803 SpdxFile *FileOccurrence `json:"spdxFile,omitempty"` 4804 // SpdxPackage: Describes a specific SPDX Package. 4805 SpdxPackage *PackageInfoOccurrence `json:"spdxPackage,omitempty"` 4806 // SpdxRelationship: Describes a specific relationship between SPDX elements. 4807 SpdxRelationship *RelationshipOccurrence `json:"spdxRelationship,omitempty"` 4808 // UpdateTime: Output only. The time this `Occurrence` was last updated. 4809 UpdateTime string `json:"updateTime,omitempty"` 4810 // Upgrade: Describes an upgrade. 4811 Upgrade *UpgradeOccurrence `json:"upgrade,omitempty"` 4812 // VulnerabilityDetails: Details of a security vulnerability note. 4813 VulnerabilityDetails *VulnerabilityDetails `json:"vulnerabilityDetails,omitempty"` 4814 4815 // ServerResponse contains the HTTP response code and headers from the server. 4816 googleapi.ServerResponse `json:"-"` 4817 // ForceSendFields is a list of field names (e.g. "Attestation") to 4818 // unconditionally include in API requests. By default, fields with empty or 4819 // default values are omitted from API requests. See 4820 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4821 // details. 4822 ForceSendFields []string `json:"-"` 4823 // NullFields is a list of field names (e.g. "Attestation") to include in API 4824 // requests with the JSON null value. By default, fields with empty values are 4825 // omitted from API requests. See 4826 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4827 NullFields []string `json:"-"` 4828 } 4829 4830 func (s *Occurrence) MarshalJSON() ([]byte, error) { 4831 type NoMethod Occurrence 4832 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4833 } 4834 4835 // Operation: This resource represents a long-running operation that is the 4836 // result of a network API call. 4837 type Operation struct { 4838 // Done: If the value is `false`, it means the operation is still in progress. 4839 // If `true`, the operation is completed, and either `error` or `response` is 4840 // available. 4841 Done bool `json:"done,omitempty"` 4842 // Error: The error result of the operation in case of failure or cancellation. 4843 Error *Status `json:"error,omitempty"` 4844 // Metadata: Service-specific metadata associated with the operation. It 4845 // typically contains progress information and common metadata such as create 4846 // time. Some services might not provide such metadata. Any method that returns 4847 // a long-running operation should document the metadata type, if any. 4848 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 4849 // Name: The server-assigned name, which is only unique within the same service 4850 // that originally returns it. If you use the default HTTP mapping, the `name` 4851 // should be a resource name ending with `operations/{unique_id}`. 4852 Name string `json:"name,omitempty"` 4853 // Response: The normal, successful response of the operation. If the original 4854 // method returns no data on success, such as `Delete`, the response is 4855 // `google.protobuf.Empty`. If the original method is standard 4856 // `Get`/`Create`/`Update`, the response should be the resource. For other 4857 // methods, the response should have the type `XxxResponse`, where `Xxx` is the 4858 // original method name. For example, if the original method name is 4859 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. 4860 Response googleapi.RawMessage `json:"response,omitempty"` 4861 4862 // ServerResponse contains the HTTP response code and headers from the server. 4863 googleapi.ServerResponse `json:"-"` 4864 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally 4865 // include in API requests. By default, fields with empty or default values are 4866 // omitted from API requests. See 4867 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4868 // details. 4869 ForceSendFields []string `json:"-"` 4870 // NullFields is a list of field names (e.g. "Done") to include in API requests 4871 // with the JSON null value. By default, fields with empty values are omitted 4872 // from API requests. See 4873 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4874 NullFields []string `json:"-"` 4875 } 4876 4877 func (s *Operation) MarshalJSON() ([]byte, error) { 4878 type NoMethod Operation 4879 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4880 } 4881 4882 // Package: This represents a particular package that is distributed over 4883 // various channels. e.g. glibc (aka libc6) is distributed by many, at various 4884 // versions. 4885 type Package struct { 4886 // Architecture: The CPU architecture for which packages in this distribution 4887 // channel were built. Architecture will be blank for language packages. 4888 // 4889 // Possible values: 4890 // "ARCHITECTURE_UNSPECIFIED" - Unknown architecture 4891 // "X86" - X86 architecture 4892 // "X64" - X64 architecture 4893 Architecture string `json:"architecture,omitempty"` 4894 // CpeUri: The cpe_uri in CPE format (https://cpe.mitre.org/specification/) 4895 // denoting the package manager version distributing a package. The cpe_uri 4896 // will be blank for language packages. 4897 CpeUri string `json:"cpeUri,omitempty"` 4898 // Description: The description of this package. 4899 Description string `json:"description,omitempty"` 4900 // Digest: Hash value, typically a file digest, that allows unique 4901 // identification a specific package. 4902 Digest []*Digest `json:"digest,omitempty"` 4903 // Distribution: The various channels by which a package is distributed. 4904 Distribution []*Distribution `json:"distribution,omitempty"` 4905 // License: Licenses that have been declared by the authors of the package. 4906 License *License `json:"license,omitempty"` 4907 // Maintainer: A freeform text denoting the maintainer of this package. 4908 Maintainer string `json:"maintainer,omitempty"` 4909 // Name: The name of the package. 4910 Name string `json:"name,omitempty"` 4911 // PackageType: The type of package; whether native or non native (e.g., ruby 4912 // gems, node.js packages, etc.). 4913 PackageType string `json:"packageType,omitempty"` 4914 // Url: The homepage for this package. 4915 Url string `json:"url,omitempty"` 4916 // Version: The version of the package. 4917 Version *Version `json:"version,omitempty"` 4918 // ForceSendFields is a list of field names (e.g. "Architecture") to 4919 // unconditionally include in API requests. By default, fields with empty or 4920 // default values are omitted from API requests. See 4921 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4922 // details. 4923 ForceSendFields []string `json:"-"` 4924 // NullFields is a list of field names (e.g. "Architecture") to include in API 4925 // requests with the JSON null value. By default, fields with empty values are 4926 // omitted from API requests. See 4927 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4928 NullFields []string `json:"-"` 4929 } 4930 4931 func (s *Package) MarshalJSON() ([]byte, error) { 4932 type NoMethod Package 4933 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4934 } 4935 4936 // PackageInfoNote: PackageInfoNote represents an SPDX Package Information 4937 // section: https://spdx.github.io/spdx-spec/3-package-information/ 4938 type PackageInfoNote struct { 4939 // Analyzed: Indicates whether the file content of this package has been 4940 // available for or subjected to analysis when creating the SPDX document 4941 Analyzed bool `json:"analyzed,omitempty"` 4942 // Attribution: A place for the SPDX data creator to record, at the package 4943 // level, acknowledgements that may be needed to be communicated in some 4944 // contexts 4945 Attribution string `json:"attribution,omitempty"` 4946 // Checksum: Provide an independently reproducible mechanism that permits 4947 // unique identification of a specific package that correlates to the data in 4948 // this SPDX file 4949 Checksum string `json:"checksum,omitempty"` 4950 // Copyright: Identify the copyright holders of the package, as well as any 4951 // dates present 4952 Copyright string `json:"copyright,omitempty"` 4953 // DetailedDescription: A more detailed description of the package 4954 DetailedDescription string `json:"detailedDescription,omitempty"` 4955 // DownloadLocation: This section identifies the download Universal Resource 4956 // Locator (URL), or a specific location within a version control system (VCS) 4957 // for the package at the time that the SPDX file was created 4958 DownloadLocation string `json:"downloadLocation,omitempty"` 4959 // ExternalRefs: ExternalRef 4960 ExternalRefs []*ExternalRef `json:"externalRefs,omitempty"` 4961 // FilesLicenseInfo: Contain the license the SPDX file creator has concluded as 4962 // governing the This field is to contain a list of all licenses found in the 4963 // package. The relationship between licenses (i.e., conjunctive, disjunctive) 4964 // is not specified in this field – it is simply a listing of all licenses 4965 // found 4966 FilesLicenseInfo []string `json:"filesLicenseInfo,omitempty"` 4967 // HomePage: Provide a place for the SPDX file creator to record a web site 4968 // that serves as the package's home page 4969 HomePage string `json:"homePage,omitempty"` 4970 // LicenseDeclared: List the licenses that have been declared by the authors of 4971 // the package 4972 LicenseDeclared *License `json:"licenseDeclared,omitempty"` 4973 // Originator: If the package identified in the SPDX file originated from a 4974 // different person or organization than identified as Package Supplier, this 4975 // field identifies from where or whom the package originally came 4976 Originator string `json:"originator,omitempty"` 4977 // PackageType: The type of package: OS, MAVEN, GO, GO_STDLIB, etc. 4978 PackageType string `json:"packageType,omitempty"` 4979 // SummaryDescription: A short description of the package 4980 SummaryDescription string `json:"summaryDescription,omitempty"` 4981 // Supplier: Identify the actual distribution source for the package/directory 4982 // identified in the SPDX file 4983 Supplier string `json:"supplier,omitempty"` 4984 // Title: Identify the full name of the package as given by the Package 4985 // Originator 4986 Title string `json:"title,omitempty"` 4987 // VerificationCode: This field provides an independently reproducible 4988 // mechanism identifying specific contents of a package based on the actual 4989 // files (except the SPDX file itself, if it is included in the package) that 4990 // make up each package and that correlates to the data in this SPDX file 4991 VerificationCode string `json:"verificationCode,omitempty"` 4992 // Version: Identify the version of the package 4993 Version string `json:"version,omitempty"` 4994 // ForceSendFields is a list of field names (e.g. "Analyzed") to 4995 // unconditionally include in API requests. By default, fields with empty or 4996 // default values are omitted from API requests. See 4997 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4998 // details. 4999 ForceSendFields []string `json:"-"` 5000 // NullFields is a list of field names (e.g. "Analyzed") to include in API 5001 // requests with the JSON null value. By default, fields with empty values are 5002 // omitted from API requests. See 5003 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5004 NullFields []string `json:"-"` 5005 } 5006 5007 func (s *PackageInfoNote) MarshalJSON() ([]byte, error) { 5008 type NoMethod PackageInfoNote 5009 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5010 } 5011 5012 // PackageInfoOccurrence: PackageInfoOccurrence represents an SPDX Package 5013 // Information section: https://spdx.github.io/spdx-spec/3-package-information/ 5014 type PackageInfoOccurrence struct { 5015 // Comment: A place for the SPDX file creator to record any general comments 5016 // about the package being described 5017 Comment string `json:"comment,omitempty"` 5018 // Filename: Provide the actual file name of the package, or path of the 5019 // directory being treated as a package 5020 Filename string `json:"filename,omitempty"` 5021 // HomePage: Output only. Provide a place for the SPDX file creator to record a 5022 // web site that serves as the package's home page 5023 HomePage string `json:"homePage,omitempty"` 5024 // Id: Uniquely identify any element in an SPDX document which may be 5025 // referenced by other elements 5026 Id string `json:"id,omitempty"` 5027 // LicenseConcluded: package or alternative values, if the governing license 5028 // cannot be determined 5029 LicenseConcluded *License `json:"licenseConcluded,omitempty"` 5030 // PackageType: Output only. The type of package: OS, MAVEN, GO, GO_STDLIB, 5031 // etc. 5032 PackageType string `json:"packageType,omitempty"` 5033 // SourceInfo: Provide a place for the SPDX file creator to record any relevant 5034 // background information or additional comments about the origin of the 5035 // package 5036 SourceInfo string `json:"sourceInfo,omitempty"` 5037 // SummaryDescription: Output only. A short description of the package 5038 SummaryDescription string `json:"summaryDescription,omitempty"` 5039 // Title: Output only. Identify the full name of the package as given by the 5040 // Package Originator 5041 Title string `json:"title,omitempty"` 5042 // Version: Output only. Identify the version of the package 5043 Version string `json:"version,omitempty"` 5044 // ForceSendFields is a list of field names (e.g. "Comment") to unconditionally 5045 // include in API requests. By default, fields with empty or default values are 5046 // omitted from API requests. See 5047 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5048 // details. 5049 ForceSendFields []string `json:"-"` 5050 // NullFields is a list of field names (e.g. "Comment") to include in API 5051 // requests with the JSON null value. By default, fields with empty values are 5052 // omitted from API requests. See 5053 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5054 NullFields []string `json:"-"` 5055 } 5056 5057 func (s *PackageInfoOccurrence) MarshalJSON() ([]byte, error) { 5058 type NoMethod PackageInfoOccurrence 5059 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5060 } 5061 5062 // PackageIssue: This message wraps a location affected by a vulnerability and 5063 // its associated fix (if one is available). 5064 type PackageIssue struct { 5065 // AffectedLocation: The location of the vulnerability. 5066 AffectedLocation *VulnerabilityLocation `json:"affectedLocation,omitempty"` 5067 // EffectiveSeverity: Output only. The distro or language system assigned 5068 // severity for this vulnerability when that is available and note provider 5069 // assigned severity when distro or language system has not yet assigned a 5070 // severity for this vulnerability. 5071 // 5072 // Possible values: 5073 // "SEVERITY_UNSPECIFIED" - Unknown Impact 5074 // "MINIMAL" - Minimal Impact 5075 // "LOW" - Low Impact 5076 // "MEDIUM" - Medium Impact 5077 // "HIGH" - High Impact 5078 // "CRITICAL" - Critical Impact 5079 EffectiveSeverity string `json:"effectiveSeverity,omitempty"` 5080 // FixedLocation: The location of the available fix for vulnerability. 5081 FixedLocation *VulnerabilityLocation `json:"fixedLocation,omitempty"` 5082 // PackageType: The type of package (e.g. OS, MAVEN, GO). 5083 PackageType string `json:"packageType,omitempty"` 5084 SeverityName string `json:"severityName,omitempty"` 5085 // ForceSendFields is a list of field names (e.g. "AffectedLocation") to 5086 // unconditionally include in API requests. By default, fields with empty or 5087 // default values are omitted from API requests. See 5088 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5089 // details. 5090 ForceSendFields []string `json:"-"` 5091 // NullFields is a list of field names (e.g. "AffectedLocation") to include in 5092 // API requests with the JSON null value. By default, fields with empty values 5093 // are omitted from API requests. See 5094 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5095 NullFields []string `json:"-"` 5096 } 5097 5098 func (s *PackageIssue) MarshalJSON() ([]byte, error) { 5099 type NoMethod PackageIssue 5100 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5101 } 5102 5103 // PgpSignedAttestation: An attestation wrapper with a PGP-compatible 5104 // signature. This message only supports `ATTACHED` signatures, where the 5105 // payload that is signed is included alongside the signature itself in the 5106 // same file. 5107 type PgpSignedAttestation struct { 5108 // ContentType: Type (for example schema) of the attestation payload that was 5109 // signed. The verifier must ensure that the provided type is one that the 5110 // verifier supports, and that the attestation payload is a valid instantiation 5111 // of that type (for example by validating a JSON schema). 5112 // 5113 // Possible values: 5114 // "CONTENT_TYPE_UNSPECIFIED" - `ContentType` is not set. 5115 // "SIMPLE_SIGNING_JSON" - Atomic format attestation signature. See 5116 // https://github.com/containers/image/blob/8a5d2f82a6e3263290c8e0276c3e0f64e77723e7/docs/atomic-signature.md 5117 // The payload extracted from `signature` is a JSON blob conforming to the 5118 // linked schema. 5119 ContentType string `json:"contentType,omitempty"` 5120 // PgpKeyId: The cryptographic fingerprint of the key used to generate the 5121 // signature, as output by, e.g. `gpg --list-keys`. This should be the version 5122 // 4, full 160-bit fingerprint, expressed as a 40 character hexadecimal string. 5123 // See https://tools.ietf.org/html/rfc4880#section-12.2 for details. 5124 // Implementations may choose to acknowledge "LONG", "SHORT", or other 5125 // abbreviated key IDs, but only the full fingerprint is guaranteed to work. In 5126 // gpg, the full fingerprint can be retrieved from the `fpr` field returned 5127 // when calling --list-keys with --with-colons. For example: ``` gpg 5128 // --with-colons --with-fingerprint --force-v4-certs \ --list-keys 5129 // attester@example.com tru::1:1513631572:0:3:1:5 pub:...... 5130 // fpr:::::::::24FF6481B76AC91E66A00AC657A93A81EF3AE6FB: ``` Above, the 5131 // fingerprint is `24FF6481B76AC91E66A00AC657A93A81EF3AE6FB`. 5132 PgpKeyId string `json:"pgpKeyId,omitempty"` 5133 // Signature: The raw content of the signature, as output by GNU Privacy Guard 5134 // (GPG) or equivalent. Since this message only supports attached signatures, 5135 // the payload that was signed must be attached. While the signature format 5136 // supported is dependent on the verification implementation, currently only 5137 // ASCII-armored (`--armor` to gpg), non-clearsigned (`--sign` rather than 5138 // `--clearsign` to gpg) are supported. Concretely, `gpg --sign --armor 5139 // --output=signature.gpg payload.json` will create the signature content 5140 // expected in this field in `signature.gpg` for the `payload.json` attestation 5141 // payload. 5142 Signature string `json:"signature,omitempty"` 5143 // ForceSendFields is a list of field names (e.g. "ContentType") to 5144 // unconditionally include in API requests. By default, fields with empty or 5145 // default values are omitted from API requests. See 5146 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5147 // details. 5148 ForceSendFields []string `json:"-"` 5149 // NullFields is a list of field names (e.g. "ContentType") to include in API 5150 // requests with the JSON null value. By default, fields with empty values are 5151 // omitted from API requests. See 5152 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5153 NullFields []string `json:"-"` 5154 } 5155 5156 func (s *PgpSignedAttestation) MarshalJSON() ([]byte, error) { 5157 type NoMethod PgpSignedAttestation 5158 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5159 } 5160 5161 // Policy: An Identity and Access Management (IAM) policy, which specifies 5162 // access controls for Google Cloud resources. A `Policy` is a collection of 5163 // `bindings`. A `binding` binds one or more `members`, or principals, to a 5164 // single `role`. Principals can be user accounts, service accounts, Google 5165 // groups, and domains (such as G Suite). A `role` is a named list of 5166 // permissions; each `role` can be an IAM predefined role or a user-created 5167 // custom role. For some types of Google Cloud resources, a `binding` can also 5168 // specify a `condition`, which is a logical expression that allows access to a 5169 // resource only if the expression evaluates to `true`. A condition can add 5170 // constraints based on attributes of the request, the resource, or both. To 5171 // learn which resources support conditions in their IAM policies, see the IAM 5172 // documentation 5173 // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON 5174 // example:** ``` { "bindings": [ { "role": 5175 // "roles/resourcemanager.organizationAdmin", "members": [ 5176 // "user:mike@example.com", "group:admins@example.com", "domain:google.com", 5177 // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": 5178 // "roles/resourcemanager.organizationViewer", "members": [ 5179 // "user:eve@example.com" ], "condition": { "title": "expirable access", 5180 // "description": "Does not grant access after Sep 2020", "expression": 5181 // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": 5182 // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - 5183 // members: - user:mike@example.com - group:admins@example.com - 5184 // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com 5185 // role: roles/resourcemanager.organizationAdmin - members: - 5186 // user:eve@example.com role: roles/resourcemanager.organizationViewer 5187 // condition: title: expirable access description: Does not grant access after 5188 // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') 5189 // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, 5190 // see the IAM documentation (https://cloud.google.com/iam/docs/). 5191 type Policy struct { 5192 // Bindings: Associates a list of `members`, or principals, with a `role`. 5193 // Optionally, may specify a `condition` that determines how and when the 5194 // `bindings` are applied. Each of the `bindings` must contain at least one 5195 // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; 5196 // up to 250 of these principals can be Google groups. Each occurrence of a 5197 // principal counts towards these limits. For example, if the `bindings` grant 5198 // 50 different roles to `user:alice@example.com`, and not to any other 5199 // principal, then you can add another 1,450 principals to the `bindings` in 5200 // the `Policy`. 5201 Bindings []*Binding `json:"bindings,omitempty"` 5202 // Etag: `etag` is used for optimistic concurrency control as a way to help 5203 // prevent simultaneous updates of a policy from overwriting each other. It is 5204 // strongly suggested that systems make use of the `etag` in the 5205 // read-modify-write cycle to perform policy updates in order to avoid race 5206 // conditions: An `etag` is returned in the response to `getIamPolicy`, and 5207 // systems are expected to put that etag in the request to `setIamPolicy` to 5208 // ensure that their change will be applied to the same version of the policy. 5209 // **Important:** If you use IAM Conditions, you must include the `etag` field 5210 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows 5211 // you to overwrite a version `3` policy with a version `1` policy, and all of 5212 // the conditions in the version `3` policy are lost. 5213 Etag string `json:"etag,omitempty"` 5214 // Version: Specifies the format of the policy. Valid values are `0`, `1`, and 5215 // `3`. Requests that specify an invalid value are rejected. Any operation that 5216 // affects conditional role bindings must specify version `3`. This requirement 5217 // applies to the following operations: * Getting a policy that includes a 5218 // conditional role binding * Adding a conditional role binding to a policy * 5219 // Changing a conditional role binding in a policy * Removing any role binding, 5220 // with or without a condition, from a policy that includes conditions 5221 // **Important:** If you use IAM Conditions, you must include the `etag` field 5222 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows 5223 // you to overwrite a version `3` policy with a version `1` policy, and all of 5224 // the conditions in the version `3` policy are lost. If a policy does not 5225 // include any conditions, operations on that policy may specify any valid 5226 // version or leave the field unset. To learn which resources support 5227 // conditions in their IAM policies, see the IAM documentation 5228 // (https://cloud.google.com/iam/help/conditions/resource-policies). 5229 Version int64 `json:"version,omitempty"` 5230 5231 // ServerResponse contains the HTTP response code and headers from the server. 5232 googleapi.ServerResponse `json:"-"` 5233 // ForceSendFields is a list of field names (e.g. "Bindings") to 5234 // unconditionally include in API requests. By default, fields with empty or 5235 // default values are omitted from API requests. See 5236 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5237 // details. 5238 ForceSendFields []string `json:"-"` 5239 // NullFields is a list of field names (e.g. "Bindings") to include in API 5240 // requests with the JSON null value. By default, fields with empty values are 5241 // omitted from API requests. See 5242 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5243 NullFields []string `json:"-"` 5244 } 5245 5246 func (s *Policy) MarshalJSON() ([]byte, error) { 5247 type NoMethod Policy 5248 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5249 } 5250 5251 // Product: Product contains information about a product and how to uniquely 5252 // identify it. 5253 type Product struct { 5254 // Id: Token that identifies a product so that it can be referred to from other 5255 // parts in the document. There is no predefined format as long as it uniquely 5256 // identifies a group in the context of the current document. 5257 Id string `json:"id,omitempty"` 5258 // IdentifierHelper: Helps in identifying the underlying product. 5259 IdentifierHelper *IdentifierHelper `json:"identifierHelper,omitempty"` 5260 // Name: Name of the product. 5261 Name string `json:"name,omitempty"` 5262 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 5263 // include in API requests. By default, fields with empty or default values are 5264 // omitted from API requests. See 5265 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5266 // details. 5267 ForceSendFields []string `json:"-"` 5268 // NullFields is a list of field names (e.g. "Id") to include in API requests 5269 // with the JSON null value. By default, fields with empty values are omitted 5270 // from API requests. See 5271 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5272 NullFields []string `json:"-"` 5273 } 5274 5275 func (s *Product) MarshalJSON() ([]byte, error) { 5276 type NoMethod Product 5277 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5278 } 5279 5280 type ProvenanceBuilder struct { 5281 BuilderDependencies []*ResourceDescriptor `json:"builderDependencies,omitempty"` 5282 Id string `json:"id,omitempty"` 5283 Version map[string]string `json:"version,omitempty"` 5284 // ForceSendFields is a list of field names (e.g. "BuilderDependencies") to 5285 // unconditionally include in API requests. By default, fields with empty or 5286 // default values are omitted from API requests. See 5287 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5288 // details. 5289 ForceSendFields []string `json:"-"` 5290 // NullFields is a list of field names (e.g. "BuilderDependencies") to include 5291 // in API requests with the JSON null value. By default, fields with empty 5292 // values are omitted from API requests. See 5293 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5294 NullFields []string `json:"-"` 5295 } 5296 5297 func (s *ProvenanceBuilder) MarshalJSON() ([]byte, error) { 5298 type NoMethod ProvenanceBuilder 5299 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5300 } 5301 5302 // Publisher: Publisher contains information about the publisher of this Note. 5303 type Publisher struct { 5304 // IssuingAuthority: Provides information about the authority of the issuing 5305 // party to release the document, in particular, the party's constituency and 5306 // responsibilities or other obligations. 5307 IssuingAuthority string `json:"issuingAuthority,omitempty"` 5308 // Name: Name of the publisher. Examples: 'Google', 'Google Cloud Platform'. 5309 Name string `json:"name,omitempty"` 5310 // PublisherNamespace: The context or namespace. Contains a URL which is under 5311 // control of the issuing party and can be used as a globally unique identifier 5312 // for that issuing party. Example: https://csaf.io 5313 PublisherNamespace string `json:"publisherNamespace,omitempty"` 5314 // ForceSendFields is a list of field names (e.g. "IssuingAuthority") to 5315 // unconditionally include in API requests. By default, fields with empty or 5316 // default values are omitted from API requests. See 5317 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5318 // details. 5319 ForceSendFields []string `json:"-"` 5320 // NullFields is a list of field names (e.g. "IssuingAuthority") to include in 5321 // API requests with the JSON null value. By default, fields with empty values 5322 // are omitted from API requests. See 5323 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5324 NullFields []string `json:"-"` 5325 } 5326 5327 func (s *Publisher) MarshalJSON() ([]byte, error) { 5328 type NoMethod Publisher 5329 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5330 } 5331 5332 // Recipe: Steps taken to build the artifact. For a TaskRun, typically each 5333 // container corresponds to one step in the recipe. 5334 type Recipe struct { 5335 // Arguments: Collection of all external inputs that influenced the build on 5336 // top of recipe.definedInMaterial and recipe.entryPoint. For example, if the 5337 // recipe type were "make", then this might be the flags passed to make aside 5338 // from the target, which is captured in recipe.entryPoint. 5339 Arguments []googleapi.RawMessage `json:"arguments,omitempty"` 5340 // DefinedInMaterial: Index in materials containing the recipe steps that are 5341 // not implied by recipe.type. For example, if the recipe type were "make", 5342 // then this would point to the source containing the Makefile, not the make 5343 // program itself. Set to -1 if the recipe doesn't come from a material, as 5344 // zero is default unset value for int64. 5345 DefinedInMaterial int64 `json:"definedInMaterial,omitempty,string"` 5346 // EntryPoint: String identifying the entry point into the build. This is often 5347 // a path to a configuration file and/or a target label within that file. The 5348 // syntax and meaning are defined by recipe.type. For example, if the recipe 5349 // type were "make", then this would reference the directory in which to run 5350 // make as well as which target to use. 5351 EntryPoint string `json:"entryPoint,omitempty"` 5352 // Environment: Any other builder-controlled inputs necessary for correctly 5353 // evaluating the recipe. Usually only needed for reproducing the build but not 5354 // evaluated as part of policy. 5355 Environment []googleapi.RawMessage `json:"environment,omitempty"` 5356 // Type: URI indicating what type of recipe was performed. It determines the 5357 // meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and 5358 // materials. 5359 Type string `json:"type,omitempty"` 5360 // ForceSendFields is a list of field names (e.g. "Arguments") to 5361 // unconditionally include in API requests. By default, fields with empty or 5362 // default values are omitted from API requests. See 5363 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5364 // details. 5365 ForceSendFields []string `json:"-"` 5366 // NullFields is a list of field names (e.g. "Arguments") to include in API 5367 // requests with the JSON null value. By default, fields with empty values are 5368 // omitted from API requests. See 5369 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5370 NullFields []string `json:"-"` 5371 } 5372 5373 func (s *Recipe) MarshalJSON() ([]byte, error) { 5374 type NoMethod Recipe 5375 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5376 } 5377 5378 // RelatedUrl: Metadata for any related URL information 5379 type RelatedUrl struct { 5380 // Label: Label to describe usage of the URL 5381 Label string `json:"label,omitempty"` 5382 // Url: Specific URL to associate with the note 5383 Url string `json:"url,omitempty"` 5384 // ForceSendFields is a list of field names (e.g. "Label") to unconditionally 5385 // include in API requests. By default, fields with empty or default values are 5386 // omitted from API requests. See 5387 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5388 // details. 5389 ForceSendFields []string `json:"-"` 5390 // NullFields is a list of field names (e.g. "Label") to include in API 5391 // requests with the JSON null value. By default, fields with empty values are 5392 // omitted from API requests. See 5393 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5394 NullFields []string `json:"-"` 5395 } 5396 5397 func (s *RelatedUrl) MarshalJSON() ([]byte, error) { 5398 type NoMethod RelatedUrl 5399 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5400 } 5401 5402 // RelationshipNote: RelationshipNote represents an SPDX Relationship section: 5403 // https://spdx.github.io/spdx-spec/7-relationships-between-SPDX-elements/ 5404 type RelationshipNote struct { 5405 // Type: The type of relationship between the source and target SPDX elements 5406 // 5407 // Possible values: 5408 // "RELATIONSHIP_TYPE_UNSPECIFIED" - Unspecified 5409 // "DESCRIBES" - Is to be used when SPDXRef-DOCUMENT describes SPDXRef-A 5410 // "DESCRIBED_BY" - Is to be used when SPDXRef-A is described by 5411 // SPDXREF-Document 5412 // "CONTAINS" - Is to be used when SPDXRef-A contains SPDXRef-B 5413 // "CONTAINED_BY" - Is to be used when SPDXRef-A is contained by SPDXRef-B 5414 // "DEPENDS_ON" - Is to be used when SPDXRef-A depends on SPDXRef-B 5415 // "DEPENDENCY_OF" - Is to be used when SPDXRef-A is dependency of SPDXRef-B 5416 // "DEPENDENCY_MANIFEST_OF" - Is to be used when SPDXRef-A is a manifest file 5417 // that lists a set of dependencies for SPDXRef-B 5418 // "BUILD_DEPENDENCY_OF" - Is to be used when SPDXRef-A is a build dependency 5419 // of SPDXRef-B 5420 // "DEV_DEPENDENCY_OF" - Is to be used when SPDXRef-A is a development 5421 // dependency of SPDXRef-B 5422 // "OPTIONAL_DEPENDENCY_OF" - Is to be used when SPDXRef-A is an optional 5423 // dependency of SPDXRef-B 5424 // "PROVIDED_DEPENDENCY_OF" - Is to be used when SPDXRef-A is a to be 5425 // provided dependency of SPDXRef-B 5426 // "TEST_DEPENDENCY_OF" - Is to be used when SPDXRef-A is a test dependency 5427 // of SPDXRef-B 5428 // "RUNTIME_DEPENDENCY_OF" - Is to be used when SPDXRef-A is a dependency 5429 // required for the execution of SPDXRef-B 5430 // "EXAMPLE_OF" - Is to be used when SPDXRef-A is an example of SPDXRef-B 5431 // "GENERATES" - Is to be used when SPDXRef-A generates SPDXRef-B 5432 // "GENERATED_FROM" - Is to be used when SPDXRef-A was generated from 5433 // SPDXRef-B 5434 // "ANCESTOR_OF" - Is to be used when SPDXRef-A is an ancestor (same lineage 5435 // but pre-dates) SPDXRef-B 5436 // "DESCENDANT_OF" - Is to be used when SPDXRef-A is a descendant of (same 5437 // lineage but postdates) SPDXRef-B 5438 // "VARIANT_OF" - Is to be used when SPDXRef-A is a variant of (same lineage 5439 // but not clear which came first) SPDXRef-B 5440 // "DISTRIBUTION_ARTIFACT" - Is to be used when distributing SPDXRef-A 5441 // requires that SPDXRef-B also be distributed 5442 // "PATCH_FOR" - Is to be used when SPDXRef-A is a patch file for (to be 5443 // applied to) SPDXRef-B 5444 // "PATCH_APPLIED" - Is to be used when SPDXRef-A is a patch file that has 5445 // been applied to SPDXRef-B 5446 // "COPY_OF" - Is to be used when SPDXRef-A is an exact copy of SPDXRef-B 5447 // "FILE_ADDED" - Is to be used when SPDXRef-A is a file that was added to 5448 // SPDXRef-B 5449 // "FILE_DELETED" - Is to be used when SPDXRef-A is a file that was deleted 5450 // from SPDXRef-B 5451 // "FILE_MODIFIED" - Is to be used when SPDXRef-A is a file that was modified 5452 // from SPDXRef-B 5453 // "EXPANDED_FROM_ARCHIVE" - Is to be used when SPDXRef-A is expanded from 5454 // the archive SPDXRef-B 5455 // "DYNAMIC_LINK" - Is to be used when SPDXRef-A dynamically links to 5456 // SPDXRef-B 5457 // "STATIC_LINK" - Is to be used when SPDXRef-A statically links to SPDXRef-B 5458 // "DATA_FILE_OF" - Is to be used when SPDXRef-A is a data file used in 5459 // SPDXRef-B 5460 // "TEST_CASE_OF" - Is to be used when SPDXRef-A is a test case used in 5461 // testing SPDXRef-B 5462 // "BUILD_TOOL_OF" - Is to be used when SPDXRef-A is used to build SPDXRef-B 5463 // "DEV_TOOL_OF" - Is to be used when SPDXRef-A is used as a development tool 5464 // for SPDXRef-B 5465 // "TEST_OF" - Is to be used when SPDXRef-A is used for testing SPDXRef-B 5466 // "TEST_TOOL_OF" - Is to be used when SPDXRef-A is used as a test tool for 5467 // SPDXRef-B 5468 // "DOCUMENTATION_OF" - Is to be used when SPDXRef-A provides documentation 5469 // of SPDXRef-B 5470 // "OPTIONAL_COMPONENT_OF" - Is to be used when SPDXRef-A is an optional 5471 // component of SPDXRef-B 5472 // "METAFILE_OF" - Is to be used when SPDXRef-A is a metafile of SPDXRef-B 5473 // "PACKAGE_OF" - Is to be used when SPDXRef-A is used as a package as part 5474 // of SPDXRef-B 5475 // "AMENDS" - Is to be used when (current) SPDXRef-DOCUMENT amends the SPDX 5476 // information in SPDXRef-B 5477 // "PREREQUISITE_FOR" - Is to be used when SPDXRef-A is a prerequisite for 5478 // SPDXRef-B 5479 // "HAS_PREREQUISITE" - Is to be used when SPDXRef-A has as a prerequisite 5480 // SPDXRef-B 5481 // "OTHER" - Is to be used for a relationship which has not been defined in 5482 // the formal SPDX specification. A description of the relationship should be 5483 // included in the Relationship comments field 5484 Type string `json:"type,omitempty"` 5485 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 5486 // include in API requests. By default, fields with empty or default values are 5487 // omitted from API requests. See 5488 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5489 // details. 5490 ForceSendFields []string `json:"-"` 5491 // NullFields is a list of field names (e.g. "Type") to include in API requests 5492 // with the JSON null value. By default, fields with empty values are omitted 5493 // from API requests. See 5494 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5495 NullFields []string `json:"-"` 5496 } 5497 5498 func (s *RelationshipNote) MarshalJSON() ([]byte, error) { 5499 type NoMethod RelationshipNote 5500 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5501 } 5502 5503 // RelationshipOccurrence: RelationshipOccurrence represents an SPDX 5504 // Relationship section: 5505 // https://spdx.github.io/spdx-spec/7-relationships-between-SPDX-elements/ 5506 type RelationshipOccurrence struct { 5507 // Comment: A place for the SPDX file creator to record any general comments 5508 // about the relationship 5509 Comment string `json:"comment,omitempty"` 5510 // Source: Also referred to as SPDXRef-A The source SPDX element (file, 5511 // package, etc) 5512 Source string `json:"source,omitempty"` 5513 // Target: Also referred to as SPDXRef-B The target SPDC element (file, 5514 // package, etc) In cases where there are "known unknowns", the use of the 5515 // keyword NOASSERTION can be used The keywords NONE can be used to indicate 5516 // that an SPDX element (package/file/snippet) has no other elements connected 5517 // by some relationship to it 5518 Target string `json:"target,omitempty"` 5519 // Type: Output only. The type of relationship between the source and target 5520 // SPDX elements 5521 // 5522 // Possible values: 5523 // "RELATIONSHIP_TYPE_UNSPECIFIED" - Unspecified 5524 // "DESCRIBES" - Is to be used when SPDXRef-DOCUMENT describes SPDXRef-A 5525 // "DESCRIBED_BY" - Is to be used when SPDXRef-A is described by 5526 // SPDXREF-Document 5527 // "CONTAINS" - Is to be used when SPDXRef-A contains SPDXRef-B 5528 // "CONTAINED_BY" - Is to be used when SPDXRef-A is contained by SPDXRef-B 5529 // "DEPENDS_ON" - Is to be used when SPDXRef-A depends on SPDXRef-B 5530 // "DEPENDENCY_OF" - Is to be used when SPDXRef-A is dependency of SPDXRef-B 5531 // "DEPENDENCY_MANIFEST_OF" - Is to be used when SPDXRef-A is a manifest file 5532 // that lists a set of dependencies for SPDXRef-B 5533 // "BUILD_DEPENDENCY_OF" - Is to be used when SPDXRef-A is a build dependency 5534 // of SPDXRef-B 5535 // "DEV_DEPENDENCY_OF" - Is to be used when SPDXRef-A is a development 5536 // dependency of SPDXRef-B 5537 // "OPTIONAL_DEPENDENCY_OF" - Is to be used when SPDXRef-A is an optional 5538 // dependency of SPDXRef-B 5539 // "PROVIDED_DEPENDENCY_OF" - Is to be used when SPDXRef-A is a to be 5540 // provided dependency of SPDXRef-B 5541 // "TEST_DEPENDENCY_OF" - Is to be used when SPDXRef-A is a test dependency 5542 // of SPDXRef-B 5543 // "RUNTIME_DEPENDENCY_OF" - Is to be used when SPDXRef-A is a dependency 5544 // required for the execution of SPDXRef-B 5545 // "EXAMPLE_OF" - Is to be used when SPDXRef-A is an example of SPDXRef-B 5546 // "GENERATES" - Is to be used when SPDXRef-A generates SPDXRef-B 5547 // "GENERATED_FROM" - Is to be used when SPDXRef-A was generated from 5548 // SPDXRef-B 5549 // "ANCESTOR_OF" - Is to be used when SPDXRef-A is an ancestor (same lineage 5550 // but pre-dates) SPDXRef-B 5551 // "DESCENDANT_OF" - Is to be used when SPDXRef-A is a descendant of (same 5552 // lineage but postdates) SPDXRef-B 5553 // "VARIANT_OF" - Is to be used when SPDXRef-A is a variant of (same lineage 5554 // but not clear which came first) SPDXRef-B 5555 // "DISTRIBUTION_ARTIFACT" - Is to be used when distributing SPDXRef-A 5556 // requires that SPDXRef-B also be distributed 5557 // "PATCH_FOR" - Is to be used when SPDXRef-A is a patch file for (to be 5558 // applied to) SPDXRef-B 5559 // "PATCH_APPLIED" - Is to be used when SPDXRef-A is a patch file that has 5560 // been applied to SPDXRef-B 5561 // "COPY_OF" - Is to be used when SPDXRef-A is an exact copy of SPDXRef-B 5562 // "FILE_ADDED" - Is to be used when SPDXRef-A is a file that was added to 5563 // SPDXRef-B 5564 // "FILE_DELETED" - Is to be used when SPDXRef-A is a file that was deleted 5565 // from SPDXRef-B 5566 // "FILE_MODIFIED" - Is to be used when SPDXRef-A is a file that was modified 5567 // from SPDXRef-B 5568 // "EXPANDED_FROM_ARCHIVE" - Is to be used when SPDXRef-A is expanded from 5569 // the archive SPDXRef-B 5570 // "DYNAMIC_LINK" - Is to be used when SPDXRef-A dynamically links to 5571 // SPDXRef-B 5572 // "STATIC_LINK" - Is to be used when SPDXRef-A statically links to SPDXRef-B 5573 // "DATA_FILE_OF" - Is to be used when SPDXRef-A is a data file used in 5574 // SPDXRef-B 5575 // "TEST_CASE_OF" - Is to be used when SPDXRef-A is a test case used in 5576 // testing SPDXRef-B 5577 // "BUILD_TOOL_OF" - Is to be used when SPDXRef-A is used to build SPDXRef-B 5578 // "DEV_TOOL_OF" - Is to be used when SPDXRef-A is used as a development tool 5579 // for SPDXRef-B 5580 // "TEST_OF" - Is to be used when SPDXRef-A is used for testing SPDXRef-B 5581 // "TEST_TOOL_OF" - Is to be used when SPDXRef-A is used as a test tool for 5582 // SPDXRef-B 5583 // "DOCUMENTATION_OF" - Is to be used when SPDXRef-A provides documentation 5584 // of SPDXRef-B 5585 // "OPTIONAL_COMPONENT_OF" - Is to be used when SPDXRef-A is an optional 5586 // component of SPDXRef-B 5587 // "METAFILE_OF" - Is to be used when SPDXRef-A is a metafile of SPDXRef-B 5588 // "PACKAGE_OF" - Is to be used when SPDXRef-A is used as a package as part 5589 // of SPDXRef-B 5590 // "AMENDS" - Is to be used when (current) SPDXRef-DOCUMENT amends the SPDX 5591 // information in SPDXRef-B 5592 // "PREREQUISITE_FOR" - Is to be used when SPDXRef-A is a prerequisite for 5593 // SPDXRef-B 5594 // "HAS_PREREQUISITE" - Is to be used when SPDXRef-A has as a prerequisite 5595 // SPDXRef-B 5596 // "OTHER" - Is to be used for a relationship which has not been defined in 5597 // the formal SPDX specification. A description of the relationship should be 5598 // included in the Relationship comments field 5599 Type string `json:"type,omitempty"` 5600 // ForceSendFields is a list of field names (e.g. "Comment") to unconditionally 5601 // include in API requests. By default, fields with empty or default values are 5602 // omitted from API requests. See 5603 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5604 // details. 5605 ForceSendFields []string `json:"-"` 5606 // NullFields is a list of field names (e.g. "Comment") to include in API 5607 // requests with the JSON null value. By default, fields with empty values are 5608 // omitted from API requests. See 5609 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5610 NullFields []string `json:"-"` 5611 } 5612 5613 func (s *RelationshipOccurrence) MarshalJSON() ([]byte, error) { 5614 type NoMethod RelationshipOccurrence 5615 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5616 } 5617 5618 // Remediation: Specifies details on how to handle (and presumably, fix) a 5619 // vulnerability. 5620 type Remediation struct { 5621 // Details: Contains a comprehensive human-readable discussion of the 5622 // remediation. 5623 Details string `json:"details,omitempty"` 5624 // RemediationType: The type of remediation that can be applied. 5625 // 5626 // Possible values: 5627 // "REMEDIATION_TYPE_UNSPECIFIED" - No remediation type specified. 5628 // "MITIGATION" - A MITIGATION is available. 5629 // "NO_FIX_PLANNED" - No fix is planned. 5630 // "NONE_AVAILABLE" - Not available. 5631 // "VENDOR_FIX" - A vendor fix is available. 5632 // "WORKAROUND" - A workaround is available. 5633 RemediationType string `json:"remediationType,omitempty"` 5634 // RemediationUri: Contains the URL where to obtain the remediation. 5635 RemediationUri *URI `json:"remediationUri,omitempty"` 5636 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally 5637 // include in API requests. By default, fields with empty or default values are 5638 // omitted from API requests. See 5639 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5640 // details. 5641 ForceSendFields []string `json:"-"` 5642 // NullFields is a list of field names (e.g. "Details") to include in API 5643 // requests with the JSON null value. By default, fields with empty values are 5644 // omitted from API requests. See 5645 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5646 NullFields []string `json:"-"` 5647 } 5648 5649 func (s *Remediation) MarshalJSON() ([]byte, error) { 5650 type NoMethod Remediation 5651 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5652 } 5653 5654 // RepoSource: RepoSource describes the location of the source in a Google 5655 // Cloud Source Repository. 5656 type RepoSource struct { 5657 // BranchName: Name of the branch to build. 5658 BranchName string `json:"branchName,omitempty"` 5659 // CommitSha: Explicit commit SHA to build. 5660 CommitSha string `json:"commitSha,omitempty"` 5661 // ProjectId: ID of the project that owns the repo. 5662 ProjectId string `json:"projectId,omitempty"` 5663 // RepoName: Name of the repo. 5664 RepoName string `json:"repoName,omitempty"` 5665 // TagName: Name of the tag to build. 5666 TagName string `json:"tagName,omitempty"` 5667 // ForceSendFields is a list of field names (e.g. "BranchName") to 5668 // unconditionally include in API requests. By default, fields with empty or 5669 // default values are omitted from API requests. See 5670 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5671 // details. 5672 ForceSendFields []string `json:"-"` 5673 // NullFields is a list of field names (e.g. "BranchName") to include in API 5674 // requests with the JSON null value. By default, fields with empty values are 5675 // omitted from API requests. See 5676 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5677 NullFields []string `json:"-"` 5678 } 5679 5680 func (s *RepoSource) MarshalJSON() ([]byte, error) { 5681 type NoMethod RepoSource 5682 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5683 } 5684 5685 // Resource: Resource is an entity that can have metadata. E.g., a Docker 5686 // image. 5687 type Resource struct { 5688 // ContentHash: The hash of the resource content. E.g., the Docker digest. 5689 ContentHash *Hash `json:"contentHash,omitempty"` 5690 // Name: The name of the resource. E.g., the name of a Docker image - "Debian". 5691 Name string `json:"name,omitempty"` 5692 // Uri: The unique URI of the resource. E.g., 5693 // "https://gcr.io/project/image@sha256:foo" for a Docker image. 5694 Uri string `json:"uri,omitempty"` 5695 // ForceSendFields is a list of field names (e.g. "ContentHash") to 5696 // unconditionally include in API requests. By default, fields with empty or 5697 // default values are 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. "ContentHash") 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 *Resource) MarshalJSON() ([]byte, error) { 5709 type NoMethod Resource 5710 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5711 } 5712 5713 type ResourceDescriptor struct { 5714 Annotations googleapi.RawMessage `json:"annotations,omitempty"` 5715 Content string `json:"content,omitempty"` 5716 Digest map[string]string `json:"digest,omitempty"` 5717 DownloadLocation string `json:"downloadLocation,omitempty"` 5718 MediaType string `json:"mediaType,omitempty"` 5719 Name string `json:"name,omitempty"` 5720 Uri string `json:"uri,omitempty"` 5721 // ForceSendFields is a list of field names (e.g. "Annotations") to 5722 // unconditionally include in API requests. By default, fields with empty or 5723 // default values are omitted from API requests. See 5724 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5725 // details. 5726 ForceSendFields []string `json:"-"` 5727 // NullFields is a list of field names (e.g. "Annotations") to include in API 5728 // requests with the JSON null value. By default, fields with empty values are 5729 // omitted from API requests. See 5730 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5731 NullFields []string `json:"-"` 5732 } 5733 5734 func (s *ResourceDescriptor) MarshalJSON() ([]byte, error) { 5735 type NoMethod ResourceDescriptor 5736 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5737 } 5738 5739 type RunDetails struct { 5740 Builder *ProvenanceBuilder `json:"builder,omitempty"` 5741 Byproducts []*ResourceDescriptor `json:"byproducts,omitempty"` 5742 Metadata *BuildMetadata `json:"metadata,omitempty"` 5743 // ForceSendFields is a list of field names (e.g. "Builder") to unconditionally 5744 // include in API requests. By default, fields with empty or default values are 5745 // omitted from API requests. See 5746 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5747 // details. 5748 ForceSendFields []string `json:"-"` 5749 // NullFields is a list of field names (e.g. "Builder") to include in API 5750 // requests with the JSON null value. By default, fields with empty values are 5751 // omitted from API requests. See 5752 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5753 NullFields []string `json:"-"` 5754 } 5755 5756 func (s *RunDetails) MarshalJSON() ([]byte, error) { 5757 type NoMethod RunDetails 5758 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5759 } 5760 5761 // SBOMReferenceNote: The note representing an SBOM reference. 5762 type SBOMReferenceNote struct { 5763 // Format: The format that SBOM takes. E.g. may be spdx, cyclonedx, etc... 5764 Format string `json:"format,omitempty"` 5765 // Version: The version of the format that the SBOM takes. E.g. if the format 5766 // is spdx, the version may be 2.3. 5767 Version string `json:"version,omitempty"` 5768 // ForceSendFields is a list of field names (e.g. "Format") to unconditionally 5769 // include in API requests. By default, fields with empty or default values are 5770 // omitted from API requests. See 5771 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5772 // details. 5773 ForceSendFields []string `json:"-"` 5774 // NullFields is a list of field names (e.g. "Format") to include in API 5775 // requests with the JSON null value. By default, fields with empty values are 5776 // omitted from API requests. See 5777 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5778 NullFields []string `json:"-"` 5779 } 5780 5781 func (s *SBOMReferenceNote) MarshalJSON() ([]byte, error) { 5782 type NoMethod SBOMReferenceNote 5783 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5784 } 5785 5786 // SBOMReferenceOccurrence: The occurrence representing an SBOM reference as 5787 // applied to a specific resource. The occurrence follows the DSSE 5788 // specification. See 5789 // https://github.com/secure-systems-lab/dsse/blob/master/envelope.md for more 5790 // details. 5791 type SBOMReferenceOccurrence struct { 5792 // Payload: The actual payload that contains the SBOM reference data. 5793 Payload *SbomReferenceIntotoPayload `json:"payload,omitempty"` 5794 // PayloadType: The kind of payload that SbomReferenceIntotoPayload takes. 5795 // Since it's in the intoto format, this value is expected to be 5796 // 'application/vnd.in-toto+json'. 5797 PayloadType string `json:"payloadType,omitempty"` 5798 // Signatures: The signatures over the payload. 5799 Signatures []*EnvelopeSignature `json:"signatures,omitempty"` 5800 // ForceSendFields is a list of field names (e.g. "Payload") to unconditionally 5801 // include in API requests. By default, fields with empty or default values are 5802 // omitted from API requests. See 5803 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5804 // details. 5805 ForceSendFields []string `json:"-"` 5806 // NullFields is a list of field names (e.g. "Payload") to include in API 5807 // requests with the JSON null value. By default, fields with empty values are 5808 // omitted from API requests. See 5809 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5810 NullFields []string `json:"-"` 5811 } 5812 5813 func (s *SBOMReferenceOccurrence) MarshalJSON() ([]byte, error) { 5814 type NoMethod SBOMReferenceOccurrence 5815 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5816 } 5817 5818 // SBOMStatus: The status of an SBOM generation. 5819 type SBOMStatus struct { 5820 // Error: Output only. If there was an error generating an SBOM, this will 5821 // indicate what that error was. 5822 Error string `json:"error,omitempty"` 5823 // SbomState: Output only. The progress of the SBOM generation. 5824 // 5825 // Possible values: 5826 // "SBOM_STATE_UNSPECIFIED" - Default unknown state. 5827 // "PENDING" - SBOM scanning is pending. 5828 // "COMPLETE" - SBOM scanning has completed. 5829 SbomState string `json:"sbomState,omitempty"` 5830 // ForceSendFields is a list of field names (e.g. "Error") to unconditionally 5831 // include in API requests. By default, fields with empty or default values are 5832 // omitted from API requests. See 5833 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5834 // details. 5835 ForceSendFields []string `json:"-"` 5836 // NullFields is a list of field names (e.g. "Error") to include in API 5837 // requests with the JSON null value. By default, fields with empty values are 5838 // omitted from API requests. See 5839 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5840 NullFields []string `json:"-"` 5841 } 5842 5843 func (s *SBOMStatus) MarshalJSON() ([]byte, error) { 5844 type NoMethod SBOMStatus 5845 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5846 } 5847 5848 // SbomReferenceIntotoPayload: The actual payload that contains the SBOM 5849 // Reference data. The payload follows the intoto statement specification. See 5850 // https://github.com/in-toto/attestation/blob/main/spec/v1.0/statement.md for 5851 // more details. 5852 type SbomReferenceIntotoPayload struct { 5853 // Type: Identifier for the schema of the Statement. 5854 Type string `json:"_type,omitempty"` 5855 // Predicate: Additional parameters of the Predicate. Includes the actual data 5856 // about the SBOM. 5857 Predicate *SbomReferenceIntotoPredicate `json:"predicate,omitempty"` 5858 // PredicateType: URI identifying the type of the Predicate. 5859 PredicateType string `json:"predicateType,omitempty"` 5860 // Subject: Set of software artifacts that the attestation applies to. Each 5861 // element represents a single software artifact. 5862 Subject []*Subject `json:"subject,omitempty"` 5863 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 5864 // include in API requests. By default, fields with empty or default values are 5865 // omitted from API requests. See 5866 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5867 // details. 5868 ForceSendFields []string `json:"-"` 5869 // NullFields is a list of field names (e.g. "Type") to include in API requests 5870 // with the JSON null value. By default, fields with empty values are omitted 5871 // from API requests. See 5872 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5873 NullFields []string `json:"-"` 5874 } 5875 5876 func (s *SbomReferenceIntotoPayload) MarshalJSON() ([]byte, error) { 5877 type NoMethod SbomReferenceIntotoPayload 5878 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5879 } 5880 5881 // SbomReferenceIntotoPredicate: A predicate which describes the SBOM being 5882 // referenced. 5883 type SbomReferenceIntotoPredicate struct { 5884 // Digest: A map of algorithm to digest of the contents of the SBOM. 5885 Digest map[string]string `json:"digest,omitempty"` 5886 // Location: The location of the SBOM. 5887 Location string `json:"location,omitempty"` 5888 // MimeType: The mime type of the SBOM. 5889 MimeType string `json:"mimeType,omitempty"` 5890 // ReferrerId: The person or system referring this predicate to the consumer. 5891 ReferrerId string `json:"referrerId,omitempty"` 5892 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally 5893 // include in API requests. By default, fields with empty or default values are 5894 // omitted from API requests. See 5895 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5896 // details. 5897 ForceSendFields []string `json:"-"` 5898 // NullFields is a list of field names (e.g. "Digest") to include in API 5899 // requests with the JSON null value. By default, fields with empty values are 5900 // omitted from API requests. See 5901 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5902 NullFields []string `json:"-"` 5903 } 5904 5905 func (s *SbomReferenceIntotoPredicate) MarshalJSON() ([]byte, error) { 5906 type NoMethod SbomReferenceIntotoPredicate 5907 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5908 } 5909 5910 // ScanConfig: Indicates various scans and whether they are turned on or off. 5911 type ScanConfig struct { 5912 // CreateTime: Output only. The time this scan config was created. 5913 CreateTime string `json:"createTime,omitempty"` 5914 // Description: Output only. A human-readable description of what the 5915 // `ScanConfig` does. 5916 Description string `json:"description,omitempty"` 5917 // Enabled: Indicates whether the Scan is enabled. 5918 Enabled bool `json:"enabled,omitempty"` 5919 // Name: Output only. The name of the ScanConfig in the form 5920 // “projects/{project_id}/scanConfigs/{scan_config_id}". 5921 Name string `json:"name,omitempty"` 5922 // UpdateTime: Output only. The time this scan config was last updated. 5923 UpdateTime string `json:"updateTime,omitempty"` 5924 5925 // ServerResponse contains the HTTP response code and headers from the server. 5926 googleapi.ServerResponse `json:"-"` 5927 // ForceSendFields is a list of field names (e.g. "CreateTime") to 5928 // unconditionally include in API requests. By default, fields with empty or 5929 // default values are omitted from API requests. See 5930 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5931 // details. 5932 ForceSendFields []string `json:"-"` 5933 // NullFields is a list of field names (e.g. "CreateTime") to include in API 5934 // requests with the JSON null value. By default, fields with empty values are 5935 // omitted from API requests. See 5936 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5937 NullFields []string `json:"-"` 5938 } 5939 5940 func (s *ScanConfig) MarshalJSON() ([]byte, error) { 5941 type NoMethod ScanConfig 5942 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5943 } 5944 5945 // SetIamPolicyRequest: Request message for `SetIamPolicy` method. 5946 type SetIamPolicyRequest struct { 5947 // Policy: REQUIRED: The complete policy to be applied to the `resource`. The 5948 // size of the policy is limited to a few 10s of KB. An empty policy is a valid 5949 // policy but certain Google Cloud services (such as Projects) might reject 5950 // them. 5951 Policy *Policy `json:"policy,omitempty"` 5952 // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally 5953 // include in API requests. By default, fields with empty or default values are 5954 // omitted from API requests. See 5955 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5956 // details. 5957 ForceSendFields []string `json:"-"` 5958 // NullFields is a list of field names (e.g. "Policy") to include in API 5959 // requests with the JSON null value. By default, fields with empty values are 5960 // omitted from API requests. See 5961 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5962 NullFields []string `json:"-"` 5963 } 5964 5965 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 5966 type NoMethod SetIamPolicyRequest 5967 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5968 } 5969 5970 // SeverityCount: The number of occurrences created for a specific severity. 5971 type SeverityCount struct { 5972 // Count: The number of occurrences with the severity. 5973 Count int64 `json:"count,omitempty,string"` 5974 // Severity: The severity of the occurrences. 5975 // 5976 // Possible values: 5977 // "SEVERITY_UNSPECIFIED" - Unknown Impact 5978 // "MINIMAL" - Minimal Impact 5979 // "LOW" - Low Impact 5980 // "MEDIUM" - Medium Impact 5981 // "HIGH" - High Impact 5982 // "CRITICAL" - Critical Impact 5983 Severity string `json:"severity,omitempty"` 5984 // ForceSendFields is a list of field names (e.g. "Count") to unconditionally 5985 // include in API requests. By default, fields with empty or default values are 5986 // omitted from API requests. See 5987 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5988 // details. 5989 ForceSendFields []string `json:"-"` 5990 // NullFields is a list of field names (e.g. "Count") to include in API 5991 // requests with the JSON null value. By default, fields with empty values are 5992 // omitted from API requests. See 5993 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5994 NullFields []string `json:"-"` 5995 } 5996 5997 func (s *SeverityCount) MarshalJSON() ([]byte, error) { 5998 type NoMethod SeverityCount 5999 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6000 } 6001 6002 // SlsaBuilder: SlsaBuilder encapsulates the identity of the builder of this 6003 // provenance. 6004 type SlsaBuilder struct { 6005 // Id: id is the id of the slsa provenance builder 6006 Id string `json:"id,omitempty"` 6007 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 6008 // include in API requests. By default, fields with empty or default values are 6009 // omitted from API requests. See 6010 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6011 // details. 6012 ForceSendFields []string `json:"-"` 6013 // NullFields is a list of field names (e.g. "Id") to include in API requests 6014 // with the JSON null value. By default, fields with empty values are omitted 6015 // from API requests. See 6016 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6017 NullFields []string `json:"-"` 6018 } 6019 6020 func (s *SlsaBuilder) MarshalJSON() ([]byte, error) { 6021 type NoMethod SlsaBuilder 6022 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6023 } 6024 6025 // SlsaCompleteness: Indicates that the builder claims certain fields in this 6026 // message to be complete. 6027 type SlsaCompleteness struct { 6028 // Arguments: If true, the builder claims that recipe.arguments is complete, 6029 // meaning that all external inputs are properly captured in the recipe. 6030 Arguments bool `json:"arguments,omitempty"` 6031 // Environment: If true, the builder claims that recipe.environment is claimed 6032 // to be complete. 6033 Environment bool `json:"environment,omitempty"` 6034 // Materials: If true, the builder claims that materials are complete, usually 6035 // through some controls to prevent network access. Sometimes called 6036 // "hermetic". 6037 Materials bool `json:"materials,omitempty"` 6038 // ForceSendFields is a list of field names (e.g. "Arguments") to 6039 // unconditionally include in API requests. By default, fields with empty or 6040 // default values are omitted from API requests. See 6041 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6042 // details. 6043 ForceSendFields []string `json:"-"` 6044 // NullFields is a list of field names (e.g. "Arguments") to include in API 6045 // requests with the JSON null value. By default, fields with empty values are 6046 // omitted from API requests. See 6047 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6048 NullFields []string `json:"-"` 6049 } 6050 6051 func (s *SlsaCompleteness) MarshalJSON() ([]byte, error) { 6052 type NoMethod SlsaCompleteness 6053 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6054 } 6055 6056 // SlsaMetadata: Other properties of the build. 6057 type SlsaMetadata struct { 6058 // BuildFinishedOn: The timestamp of when the build completed. 6059 BuildFinishedOn string `json:"buildFinishedOn,omitempty"` 6060 // BuildInvocationId: Identifies the particular build invocation, which can be 6061 // useful for finding associated logs or other ad-hoc analysis. The value 6062 // SHOULD be globally unique, per in-toto Provenance spec. 6063 BuildInvocationId string `json:"buildInvocationId,omitempty"` 6064 // BuildStartedOn: The timestamp of when the build started. 6065 BuildStartedOn string `json:"buildStartedOn,omitempty"` 6066 // Completeness: Indicates that the builder claims certain fields in this 6067 // message to be complete. 6068 Completeness *SlsaCompleteness `json:"completeness,omitempty"` 6069 // Reproducible: If true, the builder claims that running the recipe on 6070 // materials will produce bit-for-bit identical output. 6071 Reproducible bool `json:"reproducible,omitempty"` 6072 // ForceSendFields is a list of field names (e.g. "BuildFinishedOn") to 6073 // unconditionally include in API requests. By default, fields with empty or 6074 // default values are omitted from API requests. See 6075 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6076 // details. 6077 ForceSendFields []string `json:"-"` 6078 // NullFields is a list of field names (e.g. "BuildFinishedOn") to include in 6079 // API requests with the JSON null value. By default, fields with empty values 6080 // are omitted from API requests. See 6081 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6082 NullFields []string `json:"-"` 6083 } 6084 6085 func (s *SlsaMetadata) MarshalJSON() ([]byte, error) { 6086 type NoMethod SlsaMetadata 6087 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6088 } 6089 6090 // SlsaProvenance: SlsaProvenance is the slsa provenance as defined by the slsa 6091 // spec. 6092 type SlsaProvenance struct { 6093 // Builder: builder is the builder of this provenance 6094 Builder *SlsaBuilder `json:"builder,omitempty"` 6095 // Materials: The collection of artifacts that influenced the build including 6096 // sources, dependencies, build tools, base images, and so on. This is 6097 // considered to be incomplete unless metadata.completeness.materials is true. 6098 // Unset or null is equivalent to empty. 6099 Materials []*Material `json:"materials,omitempty"` 6100 // Metadata: metadata is the metadata of the provenance 6101 Metadata *SlsaMetadata `json:"metadata,omitempty"` 6102 // Recipe: Identifies the configuration used for the build. When combined with 6103 // materials, this SHOULD fully describe the build, such that re-running this 6104 // recipe results in bit-for-bit identical output (if the build is 6105 // reproducible). 6106 Recipe *SlsaRecipe `json:"recipe,omitempty"` 6107 // ForceSendFields is a list of field names (e.g. "Builder") to unconditionally 6108 // include in API requests. By default, fields with empty or default values are 6109 // omitted from API requests. See 6110 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6111 // details. 6112 ForceSendFields []string `json:"-"` 6113 // NullFields is a list of field names (e.g. "Builder") to include in API 6114 // requests with the JSON null value. By default, fields with empty values are 6115 // omitted from API requests. See 6116 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6117 NullFields []string `json:"-"` 6118 } 6119 6120 func (s *SlsaProvenance) MarshalJSON() ([]byte, error) { 6121 type NoMethod SlsaProvenance 6122 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6123 } 6124 6125 // SlsaProvenanceV1: Keep in sync with schema at 6126 // https://github.com/slsa-framework/slsa/blob/main/docs/provenance/schema/v1/provenance.proto 6127 // Builder renamed to ProvenanceBuilder because of Java conflicts. 6128 type SlsaProvenanceV1 struct { 6129 BuildDefinition *BuildDefinition `json:"buildDefinition,omitempty"` 6130 RunDetails *RunDetails `json:"runDetails,omitempty"` 6131 // ForceSendFields is a list of field names (e.g. "BuildDefinition") to 6132 // unconditionally include in API requests. By default, fields with empty or 6133 // default values are omitted from API requests. See 6134 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6135 // details. 6136 ForceSendFields []string `json:"-"` 6137 // NullFields is a list of field names (e.g. "BuildDefinition") to include in 6138 // API requests with the JSON null value. By default, fields with empty values 6139 // are omitted from API requests. See 6140 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6141 NullFields []string `json:"-"` 6142 } 6143 6144 func (s *SlsaProvenanceV1) MarshalJSON() ([]byte, error) { 6145 type NoMethod SlsaProvenanceV1 6146 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6147 } 6148 6149 // SlsaProvenanceZeroTwo: SlsaProvenanceZeroTwo is the slsa provenance as 6150 // defined by the slsa spec. See full explanation of fields at 6151 // slsa.dev/provenance/v0.2. 6152 type SlsaProvenanceZeroTwo struct { 6153 // BuildConfig: Lists the steps in the build. 6154 BuildConfig googleapi.RawMessage `json:"buildConfig,omitempty"` 6155 // BuildType: URI indicating what type of build was performed. 6156 BuildType string `json:"buildType,omitempty"` 6157 // Builder: Identifies the entity that executed the recipe, which is trusted to 6158 // have correctly performed the operation and populated this provenance. 6159 Builder *GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaBuilder `json:"builder,omitempty"` 6160 // Invocation: Identifies the event that kicked off the build. 6161 Invocation *GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaInvocation `json:"invocation,omitempty"` 6162 // Materials: The collection of artifacts that influenced the build including 6163 // sources, dependencies, build tools, base images, and so on. 6164 Materials []*GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaMaterial `json:"materials,omitempty"` 6165 // Metadata: Other properties of the build. 6166 Metadata *GoogleDevtoolsContaineranalysisV1alpha1SlsaProvenanceZeroTwoSlsaMetadata `json:"metadata,omitempty"` 6167 // ForceSendFields is a list of field names (e.g. "BuildConfig") to 6168 // unconditionally include in API requests. By default, fields with empty or 6169 // default values are omitted from API requests. See 6170 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6171 // details. 6172 ForceSendFields []string `json:"-"` 6173 // NullFields is a list of field names (e.g. "BuildConfig") to include in API 6174 // requests with the JSON null value. By default, fields with empty values are 6175 // omitted from API requests. See 6176 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6177 NullFields []string `json:"-"` 6178 } 6179 6180 func (s *SlsaProvenanceZeroTwo) MarshalJSON() ([]byte, error) { 6181 type NoMethod SlsaProvenanceZeroTwo 6182 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6183 } 6184 6185 // SlsaRecipe: Steps taken to build the artifact. For a TaskRun, typically each 6186 // container corresponds to one step in the recipe. 6187 type SlsaRecipe struct { 6188 // Arguments: Collection of all external inputs that influenced the build on 6189 // top of recipe.definedInMaterial and recipe.entryPoint. For example, if the 6190 // recipe type were "make", then this might be the flags passed to make aside 6191 // from the target, which is captured in recipe.entryPoint. Depending on the 6192 // recipe Type, the structure may be different. 6193 Arguments googleapi.RawMessage `json:"arguments,omitempty"` 6194 // DefinedInMaterial: Index in materials containing the recipe steps that are 6195 // not implied by recipe.type. For example, if the recipe type were "make", 6196 // then this would point to the source containing the Makefile, not the make 6197 // program itself. Set to -1 if the recipe doesn't come from a material, as 6198 // zero is default unset value for int64. 6199 DefinedInMaterial int64 `json:"definedInMaterial,omitempty,string"` 6200 // EntryPoint: String identifying the entry point into the build. This is often 6201 // a path to a configuration file and/or a target label within that file. The 6202 // syntax and meaning are defined by recipe.type. For example, if the recipe 6203 // type were "make", then this would reference the directory in which to run 6204 // make as well as which target to use. 6205 EntryPoint string `json:"entryPoint,omitempty"` 6206 // Environment: Any other builder-controlled inputs necessary for correctly 6207 // evaluating the recipe. Usually only needed for reproducing the build but not 6208 // evaluated as part of policy. Depending on the recipe Type, the structure may 6209 // be different. 6210 Environment googleapi.RawMessage `json:"environment,omitempty"` 6211 // Type: URI indicating what type of recipe was performed. It determines the 6212 // meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and 6213 // materials. 6214 Type string `json:"type,omitempty"` 6215 // ForceSendFields is a list of field names (e.g. "Arguments") to 6216 // unconditionally include in API requests. By default, fields with empty or 6217 // default values are omitted from API requests. See 6218 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6219 // details. 6220 ForceSendFields []string `json:"-"` 6221 // NullFields is a list of field names (e.g. "Arguments") to include in API 6222 // requests with the JSON null value. By default, fields with empty values are 6223 // omitted from API requests. See 6224 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6225 NullFields []string `json:"-"` 6226 } 6227 6228 func (s *SlsaRecipe) MarshalJSON() ([]byte, error) { 6229 type NoMethod SlsaRecipe 6230 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6231 } 6232 6233 // Source: Source describes the location of the source used for the build. 6234 type Source struct { 6235 // AdditionalContexts: If provided, some of the source code used for the build 6236 // may be found in these locations, in the case where the source repository had 6237 // multiple remotes or submodules. This list will not include the context 6238 // specified in the context field. 6239 AdditionalContexts []*GoogleDevtoolsContaineranalysisV1alpha1SourceContext `json:"additionalContexts,omitempty"` 6240 // ArtifactStorageSource: If provided, the input binary artifacts for the build 6241 // came from this location. 6242 ArtifactStorageSource *StorageSource `json:"artifactStorageSource,omitempty"` 6243 // Context: If provided, the source code used for the build came from this 6244 // location. 6245 Context *GoogleDevtoolsContaineranalysisV1alpha1SourceContext `json:"context,omitempty"` 6246 // FileHashes: Hash(es) of the build source, which can be used to verify that 6247 // the original source integrity was maintained in the build. The keys to this 6248 // map are file paths used as build source and the values contain the hash 6249 // values for those files. If the build source came in a single package such as 6250 // a gzipped tarfile (.tar.gz), the FileHash will be for the single path to 6251 // that file. 6252 FileHashes map[string]FileHashes `json:"fileHashes,omitempty"` 6253 // RepoSource: If provided, get source from this location in a Cloud Repo. 6254 RepoSource *RepoSource `json:"repoSource,omitempty"` 6255 // StorageSource: If provided, get the source from this location in Google 6256 // Cloud Storage. 6257 StorageSource *StorageSource `json:"storageSource,omitempty"` 6258 // ForceSendFields is a list of field names (e.g. "AdditionalContexts") to 6259 // unconditionally include in API requests. By default, fields with empty or 6260 // default values are omitted from API requests. See 6261 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6262 // details. 6263 ForceSendFields []string `json:"-"` 6264 // NullFields is a list of field names (e.g. "AdditionalContexts") to include 6265 // in API requests with the JSON null value. By default, fields with empty 6266 // values are omitted from API requests. See 6267 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6268 NullFields []string `json:"-"` 6269 } 6270 6271 func (s *Source) MarshalJSON() ([]byte, error) { 6272 type NoMethod Source 6273 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6274 } 6275 6276 // Status: The `Status` type defines a logical error model that is suitable for 6277 // different programming environments, including REST APIs and RPC APIs. It is 6278 // used by gRPC (https://github.com/grpc). Each `Status` message contains three 6279 // pieces of data: error code, error message, and error details. You can find 6280 // out more about this error model and how to work with it in the API Design 6281 // Guide (https://cloud.google.com/apis/design/errors). 6282 type Status struct { 6283 // Code: The status code, which should be an enum value of google.rpc.Code. 6284 Code int64 `json:"code,omitempty"` 6285 // Details: A list of messages that carry the error details. There is a common 6286 // set of message types for APIs to use. 6287 Details []googleapi.RawMessage `json:"details,omitempty"` 6288 // Message: A developer-facing error message, which should be in English. Any 6289 // user-facing error message should be localized and sent in the 6290 // google.rpc.Status.details field, or localized by the client. 6291 Message string `json:"message,omitempty"` 6292 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 6293 // include in API requests. By default, fields with empty or default values are 6294 // omitted from API requests. See 6295 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6296 // details. 6297 ForceSendFields []string `json:"-"` 6298 // NullFields is a list of field names (e.g. "Code") to include in API requests 6299 // with the JSON null value. By default, fields with empty values are omitted 6300 // from API requests. See 6301 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6302 NullFields []string `json:"-"` 6303 } 6304 6305 func (s *Status) MarshalJSON() ([]byte, error) { 6306 type NoMethod Status 6307 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6308 } 6309 6310 // StorageSource: StorageSource describes the location of the source in an 6311 // archive file in Google Cloud Storage. 6312 type StorageSource struct { 6313 // Bucket: Google Cloud Storage bucket containing source (see [Bucket Name 6314 // Requirements] 6315 // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). 6316 Bucket string `json:"bucket,omitempty"` 6317 // Generation: Google Cloud Storage generation for the object. 6318 Generation int64 `json:"generation,omitempty,string"` 6319 // Object: Google Cloud Storage object containing source. 6320 Object string `json:"object,omitempty"` 6321 // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally 6322 // include in API requests. By default, fields with empty or default values are 6323 // omitted from API requests. See 6324 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6325 // details. 6326 ForceSendFields []string `json:"-"` 6327 // NullFields is a list of field names (e.g. "Bucket") to include in API 6328 // requests with the JSON null value. By default, fields with empty values are 6329 // omitted from API requests. See 6330 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6331 NullFields []string `json:"-"` 6332 } 6333 6334 func (s *StorageSource) MarshalJSON() ([]byte, error) { 6335 type NoMethod StorageSource 6336 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6337 } 6338 6339 // Subject: Subject refers to the subject of the intoto statement 6340 type Subject struct { 6341 // Digest: "": "" Algorithms can be e.g. sha256, sha512 See 6342 // https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet 6343 Digest map[string]string `json:"digest,omitempty"` 6344 // Name: name is the name of the Subject used here 6345 Name string `json:"name,omitempty"` 6346 // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally 6347 // include in API requests. By default, fields with empty or default values are 6348 // omitted from API requests. See 6349 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6350 // details. 6351 ForceSendFields []string `json:"-"` 6352 // NullFields is a list of field names (e.g. "Digest") to include in API 6353 // requests with the JSON null value. By default, fields with empty values are 6354 // omitted from API requests. See 6355 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6356 NullFields []string `json:"-"` 6357 } 6358 6359 func (s *Subject) MarshalJSON() ([]byte, error) { 6360 type NoMethod Subject 6361 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6362 } 6363 6364 // TestIamPermissionsRequest: Request message for `TestIamPermissions` method. 6365 type TestIamPermissionsRequest struct { 6366 // Permissions: The set of permissions to check for the `resource`. Permissions 6367 // with wildcards (such as `*` or `storage.*`) are not allowed. For more 6368 // information see IAM Overview 6369 // (https://cloud.google.com/iam/docs/overview#permissions). 6370 Permissions []string `json:"permissions,omitempty"` 6371 // ForceSendFields is a list of field names (e.g. "Permissions") to 6372 // unconditionally include in API requests. By default, fields with empty or 6373 // default values are omitted from API requests. See 6374 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6375 // details. 6376 ForceSendFields []string `json:"-"` 6377 // NullFields is a list of field names (e.g. "Permissions") to include in API 6378 // requests with the JSON null value. By default, fields with empty values are 6379 // omitted from API requests. See 6380 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6381 NullFields []string `json:"-"` 6382 } 6383 6384 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 6385 type NoMethod TestIamPermissionsRequest 6386 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6387 } 6388 6389 // TestIamPermissionsResponse: Response message for `TestIamPermissions` 6390 // method. 6391 type TestIamPermissionsResponse struct { 6392 // Permissions: A subset of `TestPermissionsRequest.permissions` that the 6393 // caller is allowed. 6394 Permissions []string `json:"permissions,omitempty"` 6395 6396 // ServerResponse contains the HTTP response code and headers from the server. 6397 googleapi.ServerResponse `json:"-"` 6398 // ForceSendFields is a list of field names (e.g. "Permissions") to 6399 // unconditionally include in API requests. By default, fields with empty or 6400 // default values are omitted from API requests. See 6401 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6402 // details. 6403 ForceSendFields []string `json:"-"` 6404 // NullFields is a list of field names (e.g. "Permissions") to include in API 6405 // requests with the JSON null value. By default, fields with empty values are 6406 // omitted from API requests. See 6407 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6408 NullFields []string `json:"-"` 6409 } 6410 6411 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 6412 type NoMethod TestIamPermissionsResponse 6413 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6414 } 6415 6416 // TimeSpan: Start and end times for a build execution phase. Next ID: 3 6417 type TimeSpan struct { 6418 // EndTime: End of time span. 6419 EndTime string `json:"endTime,omitempty"` 6420 // StartTime: Start of time span. 6421 StartTime string `json:"startTime,omitempty"` 6422 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally 6423 // include in API requests. By default, fields with empty or default values are 6424 // omitted from API requests. See 6425 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6426 // details. 6427 ForceSendFields []string `json:"-"` 6428 // NullFields is a list of field names (e.g. "EndTime") to include in API 6429 // requests with the JSON null value. By default, fields with empty values are 6430 // omitted from API requests. See 6431 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6432 NullFields []string `json:"-"` 6433 } 6434 6435 func (s *TimeSpan) MarshalJSON() ([]byte, error) { 6436 type NoMethod TimeSpan 6437 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6438 } 6439 6440 // URI: An URI message. 6441 type URI struct { 6442 // Label: A label for the URI. 6443 Label string `json:"label,omitempty"` 6444 // Uri: The unique resource identifier. 6445 Uri string `json:"uri,omitempty"` 6446 // ForceSendFields is a list of field names (e.g. "Label") to unconditionally 6447 // include in API requests. By default, fields with empty or default values are 6448 // omitted from API requests. See 6449 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6450 // details. 6451 ForceSendFields []string `json:"-"` 6452 // NullFields is a list of field names (e.g. "Label") to include in API 6453 // requests with the JSON null value. By default, fields with empty values are 6454 // omitted from API requests. See 6455 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6456 NullFields []string `json:"-"` 6457 } 6458 6459 func (s *URI) MarshalJSON() ([]byte, error) { 6460 type NoMethod URI 6461 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6462 } 6463 6464 // UpdateOperationRequest: Request for updating an existing operation 6465 type UpdateOperationRequest struct { 6466 // Operation: The operation to create. 6467 Operation *Operation `json:"operation,omitempty"` 6468 // UpdateMask: The fields to update. 6469 UpdateMask string `json:"updateMask,omitempty"` 6470 // ForceSendFields is a list of field names (e.g. "Operation") to 6471 // unconditionally include in API requests. By default, fields with empty or 6472 // default values are omitted from API requests. See 6473 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6474 // details. 6475 ForceSendFields []string `json:"-"` 6476 // NullFields is a list of field names (e.g. "Operation") to include in API 6477 // requests with the JSON null value. By default, fields with empty values are 6478 // omitted from API requests. See 6479 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6480 NullFields []string `json:"-"` 6481 } 6482 6483 func (s *UpdateOperationRequest) MarshalJSON() ([]byte, error) { 6484 type NoMethod UpdateOperationRequest 6485 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6486 } 6487 6488 // UpgradeDistribution: The Upgrade Distribution represents metadata about the 6489 // Upgrade for each operating system (CPE). Some distributions have additional 6490 // metadata around updates, classifying them into various categories and 6491 // severities. 6492 type UpgradeDistribution struct { 6493 // Classification: The operating system classification of this Upgrade, as 6494 // specified by the upstream operating system upgrade feed. 6495 Classification string `json:"classification,omitempty"` 6496 // CpeUri: Required - The specific operating system this metadata applies to. 6497 // See https://cpe.mitre.org/specification/. 6498 CpeUri string `json:"cpeUri,omitempty"` 6499 // Cve: The cve that would be resolved by this upgrade. 6500 Cve []string `json:"cve,omitempty"` 6501 // Severity: The severity as specified by the upstream operating system. 6502 Severity string `json:"severity,omitempty"` 6503 // ForceSendFields is a list of field names (e.g. "Classification") to 6504 // unconditionally include in API requests. By default, fields with empty or 6505 // default values are omitted from API requests. See 6506 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6507 // details. 6508 ForceSendFields []string `json:"-"` 6509 // NullFields is a list of field names (e.g. "Classification") to include in 6510 // API requests with the JSON null value. By default, fields with empty values 6511 // are omitted from API requests. See 6512 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6513 NullFields []string `json:"-"` 6514 } 6515 6516 func (s *UpgradeDistribution) MarshalJSON() ([]byte, error) { 6517 type NoMethod UpgradeDistribution 6518 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6519 } 6520 6521 // UpgradeNote: An Upgrade Note represents a potential upgrade of a package to 6522 // a given version. For each package version combination (i.e. bash 4.0, bash 6523 // 4.1, bash 4.1.2), there will be a Upgrade Note. 6524 type UpgradeNote struct { 6525 // Distributions: Metadata about the upgrade for each specific operating 6526 // system. 6527 Distributions []*UpgradeDistribution `json:"distributions,omitempty"` 6528 // Package: Required - The package this Upgrade is for. 6529 Package string `json:"package,omitempty"` 6530 // Version: Required - The version of the package in machine + human readable 6531 // form. 6532 Version *Version `json:"version,omitempty"` 6533 // ForceSendFields is a list of field names (e.g. "Distributions") to 6534 // unconditionally include in API requests. By default, fields with empty or 6535 // default values are omitted from API requests. See 6536 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6537 // details. 6538 ForceSendFields []string `json:"-"` 6539 // NullFields is a list of field names (e.g. "Distributions") to include in API 6540 // requests with the JSON null value. By default, fields with empty values are 6541 // omitted from API requests. See 6542 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6543 NullFields []string `json:"-"` 6544 } 6545 6546 func (s *UpgradeNote) MarshalJSON() ([]byte, error) { 6547 type NoMethod UpgradeNote 6548 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6549 } 6550 6551 // UpgradeOccurrence: An Upgrade Occurrence represents that a specific 6552 // resource_url could install a specific upgrade. This presence is supplied via 6553 // local sources (i.e. it is present in the mirror and the running system has 6554 // noticed its availability). 6555 type UpgradeOccurrence struct { 6556 // Distribution: Metadata about the upgrade for available for the specific 6557 // operating system for the resource_url. This allows efficient filtering, as 6558 // well as making it easier to use the occurrence. 6559 Distribution *UpgradeDistribution `json:"distribution,omitempty"` 6560 // Package: Required - The package this Upgrade is for. 6561 Package string `json:"package,omitempty"` 6562 // ParsedVersion: Required - The version of the package in a machine + human 6563 // readable form. 6564 ParsedVersion *Version `json:"parsedVersion,omitempty"` 6565 // ForceSendFields is a list of field names (e.g. "Distribution") to 6566 // unconditionally include in API requests. By default, fields with empty or 6567 // default values are omitted from API requests. See 6568 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6569 // details. 6570 ForceSendFields []string `json:"-"` 6571 // NullFields is a list of field names (e.g. "Distribution") to include in API 6572 // requests with the JSON null value. By default, fields with empty values are 6573 // omitted from API requests. See 6574 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6575 NullFields []string `json:"-"` 6576 } 6577 6578 func (s *UpgradeOccurrence) MarshalJSON() ([]byte, error) { 6579 type NoMethod UpgradeOccurrence 6580 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6581 } 6582 6583 // Version: Version contains structured information about the version of the 6584 // package. For a discussion of this in Debian/Ubuntu: 6585 // http://serverfault.com/questions/604541/debian-packages-version-convention 6586 // For a discussion of this in Redhat/Fedora/Centos: 6587 // http://blog.jasonantman.com/2014/07/how-yum-and-rpm-compare-versions/ 6588 type Version struct { 6589 // Epoch: Used to correct mistakes in the version numbering scheme. 6590 Epoch int64 `json:"epoch,omitempty"` 6591 // Inclusive: Whether this version is vulnerable, when defining the version 6592 // bounds. For example, if the minimum version is 2.0, inclusive=true would say 6593 // 2.0 is vulnerable, while inclusive=false would say it's not 6594 Inclusive bool `json:"inclusive,omitempty"` 6595 // Kind: Distinguish between sentinel MIN/MAX versions and normal versions. If 6596 // kind is not NORMAL, then the other fields are ignored. 6597 // 6598 // Possible values: 6599 // "NORMAL" - A standard package version, defined by the other fields. 6600 // "MINIMUM" - A special version representing negative infinity, other fields 6601 // are ignored. 6602 // "MAXIMUM" - A special version representing positive infinity, other fields 6603 // are ignored. 6604 Kind string `json:"kind,omitempty"` 6605 // Name: The main part of the version name. 6606 Name string `json:"name,omitempty"` 6607 // Revision: The iteration of the package build from the above version. 6608 Revision string `json:"revision,omitempty"` 6609 // ForceSendFields is a list of field names (e.g. "Epoch") to unconditionally 6610 // include in API requests. By default, fields with empty or default values are 6611 // omitted from API requests. See 6612 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6613 // details. 6614 ForceSendFields []string `json:"-"` 6615 // NullFields is a list of field names (e.g. "Epoch") to include in API 6616 // requests with the JSON null value. By default, fields with empty values are 6617 // omitted from API requests. See 6618 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6619 NullFields []string `json:"-"` 6620 } 6621 6622 func (s *Version) MarshalJSON() ([]byte, error) { 6623 type NoMethod Version 6624 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6625 } 6626 6627 // VexAssessment: VexAssessment provides all publisher provided Vex information 6628 // that is related to this vulnerability. 6629 type VexAssessment struct { 6630 // Cve: Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) 6631 // tracking number for the vulnerability. 6632 Cve string `json:"cve,omitempty"` 6633 // Impacts: Contains information about the impact of this vulnerability, this 6634 // will change with time. 6635 Impacts []string `json:"impacts,omitempty"` 6636 // Justification: Justification provides the justification when the state of 6637 // the assessment if NOT_AFFECTED. 6638 Justification *Justification `json:"justification,omitempty"` 6639 // NoteName: The VulnerabilityAssessment note from which this VexAssessment was 6640 // generated. This will be of the form: 6641 // `projects/[PROJECT_ID]/notes/[NOTE_ID]`. 6642 NoteName string `json:"noteName,omitempty"` 6643 // RelatedUris: Holds a list of references associated with this vulnerability 6644 // item and assessment. These uris have additional information about the 6645 // vulnerability and the assessment itself. E.g. Link to a document which 6646 // details how this assessment concluded the state of this vulnerability. 6647 RelatedUris []*URI `json:"relatedUris,omitempty"` 6648 // Remediations: Specifies details on how to handle (and presumably, fix) a 6649 // vulnerability. 6650 Remediations []*Remediation `json:"remediations,omitempty"` 6651 // State: Provides the state of this Vulnerability assessment. 6652 // 6653 // Possible values: 6654 // "STATE_UNSPECIFIED" - No state is specified. 6655 // "AFFECTED" - This product is known to be affected by this vulnerability. 6656 // "NOT_AFFECTED" - This product is known to be not affected by this 6657 // vulnerability. 6658 // "FIXED" - This product contains a fix for this vulnerability. 6659 // "UNDER_INVESTIGATION" - It is not known yet whether these versions are or 6660 // are not affected by the vulnerability. However, it is still under 6661 // investigation. 6662 State string `json:"state,omitempty"` 6663 // VulnerabilityId: The vulnerability identifier for this Assessment. Will hold 6664 // one of common identifiers e.g. CVE, GHSA etc. 6665 VulnerabilityId string `json:"vulnerabilityId,omitempty"` 6666 // ForceSendFields is a list of field names (e.g. "Cve") to unconditionally 6667 // include in API requests. By default, fields with empty or default values are 6668 // omitted from API requests. See 6669 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6670 // details. 6671 ForceSendFields []string `json:"-"` 6672 // NullFields is a list of field names (e.g. "Cve") to include in API requests 6673 // with the JSON null value. By default, fields with empty values are omitted 6674 // from API requests. See 6675 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6676 NullFields []string `json:"-"` 6677 } 6678 6679 func (s *VexAssessment) MarshalJSON() ([]byte, error) { 6680 type NoMethod VexAssessment 6681 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6682 } 6683 6684 // Volume: Volume describes a Docker container volume which is mounted into 6685 // build steps in order to persist files across build step execution. Next ID: 6686 // 3 6687 type Volume struct { 6688 // Name: Name of the volume to mount. Volume names must be unique per build 6689 // step and must be valid names for Docker volumes. Each named volume must be 6690 // used by at least two build steps. 6691 Name string `json:"name,omitempty"` 6692 // Path: Path at which to mount the volume. Paths must be absolute and cannot 6693 // conflict with other volume paths on the same build step or with certain 6694 // reserved volume paths. 6695 Path string `json:"path,omitempty"` 6696 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 6697 // include in API requests. By default, fields with empty or default values are 6698 // omitted from API requests. See 6699 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6700 // details. 6701 ForceSendFields []string `json:"-"` 6702 // NullFields is a list of field names (e.g. "Name") to include in API requests 6703 // with the JSON null value. By default, fields with empty values are omitted 6704 // from API requests. See 6705 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6706 NullFields []string `json:"-"` 6707 } 6708 6709 func (s *Volume) MarshalJSON() ([]byte, error) { 6710 type NoMethod Volume 6711 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6712 } 6713 6714 // VulnerabilityAssessmentNote: A single VulnerabilityAssessmentNote represents 6715 // one particular product's vulnerability assessment for one CVE. Multiple 6716 // VulnerabilityAssessmentNotes together form a Vex statement. Please 6717 // go/sds-vex-example for a sample Vex statement in the CSAF format. 6718 type VulnerabilityAssessmentNote struct { 6719 // Assessment: Represents a vulnerability assessment for the product. 6720 Assessment *Assessment `json:"assessment,omitempty"` 6721 // LanguageCode: Identifies the language used by this document, corresponding 6722 // to IETF BCP 47 / RFC 5646. 6723 LanguageCode string `json:"languageCode,omitempty"` 6724 // LongDescription: A detailed description of this Vex. 6725 LongDescription string `json:"longDescription,omitempty"` 6726 // Product: The product affected by this vex. 6727 Product *Product `json:"product,omitempty"` 6728 // Publisher: Publisher details of this Note. 6729 Publisher *Publisher `json:"publisher,omitempty"` 6730 // ShortDescription: A one sentence description of this Vex. 6731 ShortDescription string `json:"shortDescription,omitempty"` 6732 // Title: The title of the note. E.g. `Vex-Debian-11.4` 6733 Title string `json:"title,omitempty"` 6734 // ForceSendFields is a list of field names (e.g. "Assessment") to 6735 // unconditionally include in API requests. By default, fields with empty or 6736 // default values are omitted from API requests. See 6737 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6738 // details. 6739 ForceSendFields []string `json:"-"` 6740 // NullFields is a list of field names (e.g. "Assessment") to include in API 6741 // requests with the JSON null value. By default, fields with empty values are 6742 // omitted from API requests. See 6743 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6744 NullFields []string `json:"-"` 6745 } 6746 6747 func (s *VulnerabilityAssessmentNote) MarshalJSON() ([]byte, error) { 6748 type NoMethod VulnerabilityAssessmentNote 6749 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6750 } 6751 6752 // VulnerabilityDetails: Used by Occurrence to point to where the vulnerability 6753 // exists and how to fix it. 6754 type VulnerabilityDetails struct { 6755 // CvssScore: Output only. The CVSS score of this vulnerability. CVSS score is 6756 // on a scale of 0-10 where 0 indicates low severity and 10 indicates high 6757 // severity. 6758 CvssScore float64 `json:"cvssScore,omitempty"` 6759 // CvssV2: The CVSS v2 score of this vulnerability. 6760 CvssV2 *CVSS `json:"cvssV2,omitempty"` 6761 // CvssV3: The CVSS v3 score of this vulnerability. 6762 CvssV3 *CVSS `json:"cvssV3,omitempty"` 6763 // CvssVersion: Output only. CVSS version used to populate cvss_score and 6764 // severity. 6765 // 6766 // Possible values: 6767 // "CVSS_VERSION_UNSPECIFIED" - CVSS Version unspecified. 6768 // "CVSS_VERSION_2" - CVSS v2. 6769 // "CVSS_VERSION_3" - CVSS v3. 6770 CvssVersion string `json:"cvssVersion,omitempty"` 6771 // EffectiveSeverity: The distro assigned severity for this vulnerability when 6772 // that is available and note provider assigned severity when distro has not 6773 // yet assigned a severity for this vulnerability. When there are multiple 6774 // package issues for this vulnerability, they can have different effective 6775 // severities because some might come from the distro and some might come from 6776 // installed language packs (e.g. Maven JARs or Go binaries). For this reason, 6777 // it is advised to use the effective severity on the PackageIssue level, as 6778 // this field may eventually be deprecated. In the case where multiple 6779 // PackageIssues have different effective severities, the one set here will be 6780 // the highest severity of any of the PackageIssues. 6781 // 6782 // Possible values: 6783 // "SEVERITY_UNSPECIFIED" - Unknown Impact 6784 // "MINIMAL" - Minimal Impact 6785 // "LOW" - Low Impact 6786 // "MEDIUM" - Medium Impact 6787 // "HIGH" - High Impact 6788 // "CRITICAL" - Critical Impact 6789 EffectiveSeverity string `json:"effectiveSeverity,omitempty"` 6790 // ExtraDetails: Occurrence-specific extra details about the vulnerability. 6791 ExtraDetails string `json:"extraDetails,omitempty"` 6792 // PackageIssue: The set of affected locations and their fixes (if available) 6793 // within the associated resource. 6794 PackageIssue []*PackageIssue `json:"packageIssue,omitempty"` 6795 // Severity: Output only. The note provider assigned Severity of the 6796 // vulnerability. 6797 // 6798 // Possible values: 6799 // "SEVERITY_UNSPECIFIED" - Unknown Impact 6800 // "MINIMAL" - Minimal Impact 6801 // "LOW" - Low Impact 6802 // "MEDIUM" - Medium Impact 6803 // "HIGH" - High Impact 6804 // "CRITICAL" - Critical Impact 6805 Severity string `json:"severity,omitempty"` 6806 // Type: The type of package; whether native or non native(ruby gems, node.js 6807 // packages etc). This may be deprecated in the future because we can have 6808 // multiple PackageIssues with different package types. 6809 Type string `json:"type,omitempty"` 6810 // VexAssessment: VexAssessment provides all publisher provided Vex information 6811 // that is related to this vulnerability for this resource. 6812 VexAssessment *VexAssessment `json:"vexAssessment,omitempty"` 6813 // ForceSendFields is a list of field names (e.g. "CvssScore") to 6814 // unconditionally include in API requests. By default, fields with empty or 6815 // default values are omitted from API requests. See 6816 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6817 // details. 6818 ForceSendFields []string `json:"-"` 6819 // NullFields is a list of field names (e.g. "CvssScore") to include in API 6820 // requests with the JSON null value. By default, fields with empty values are 6821 // omitted from API requests. See 6822 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6823 NullFields []string `json:"-"` 6824 } 6825 6826 func (s *VulnerabilityDetails) MarshalJSON() ([]byte, error) { 6827 type NoMethod VulnerabilityDetails 6828 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6829 } 6830 6831 func (s *VulnerabilityDetails) UnmarshalJSON(data []byte) error { 6832 type NoMethod VulnerabilityDetails 6833 var s1 struct { 6834 CvssScore gensupport.JSONFloat64 `json:"cvssScore"` 6835 *NoMethod 6836 } 6837 s1.NoMethod = (*NoMethod)(s) 6838 if err := json.Unmarshal(data, &s1); err != nil { 6839 return err 6840 } 6841 s.CvssScore = float64(s1.CvssScore) 6842 return nil 6843 } 6844 6845 // VulnerabilityLocation: The location of the vulnerability 6846 type VulnerabilityLocation struct { 6847 // CpeUri: The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/) 6848 // format. Examples include distro or storage location for vulnerable jar. This 6849 // field can be used as a filter in list requests. 6850 CpeUri string `json:"cpeUri,omitempty"` 6851 // FileLocation: The file location at which this package was found. 6852 FileLocation []*FileLocation `json:"fileLocation,omitempty"` 6853 // Package: The package being described. 6854 Package string `json:"package,omitempty"` 6855 // Version: The version of the package being described. This field can be used 6856 // as a filter in list requests. 6857 Version *Version `json:"version,omitempty"` 6858 // ForceSendFields is a list of field names (e.g. "CpeUri") to unconditionally 6859 // include in API requests. By default, fields with empty or default values are 6860 // omitted from API requests. See 6861 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6862 // details. 6863 ForceSendFields []string `json:"-"` 6864 // NullFields is a list of field names (e.g. "CpeUri") to include in API 6865 // requests with the JSON null value. By default, fields with empty values are 6866 // omitted from API requests. See 6867 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6868 NullFields []string `json:"-"` 6869 } 6870 6871 func (s *VulnerabilityLocation) MarshalJSON() ([]byte, error) { 6872 type NoMethod VulnerabilityLocation 6873 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6874 } 6875 6876 // VulnerabilityType: VulnerabilityType provides metadata about a security 6877 // vulnerability. 6878 type VulnerabilityType struct { 6879 // CvssScore: The CVSS score for this Vulnerability. 6880 CvssScore float64 `json:"cvssScore,omitempty"` 6881 // CvssV2: The full description of the CVSS for version 2. 6882 CvssV2 *CVSS `json:"cvssV2,omitempty"` 6883 // CvssVersion: CVSS version used to populate cvss_score and severity. 6884 // 6885 // Possible values: 6886 // "CVSS_VERSION_UNSPECIFIED" - CVSS Version unspecified. 6887 // "CVSS_VERSION_2" - CVSS v2. 6888 // "CVSS_VERSION_3" - CVSS v3. 6889 CvssVersion string `json:"cvssVersion,omitempty"` 6890 // Cwe: A list of CWE for this vulnerability. For details, see: 6891 // https://cwe.mitre.org/index.html 6892 Cwe []string `json:"cwe,omitempty"` 6893 // Details: All information about the package to specifically identify this 6894 // vulnerability. One entry per (version range and cpe_uri) the package 6895 // vulnerability has manifested in. 6896 Details []*Detail `json:"details,omitempty"` 6897 // Severity: Note provider assigned impact of the vulnerability 6898 // 6899 // Possible values: 6900 // "SEVERITY_UNSPECIFIED" - Unknown Impact 6901 // "MINIMAL" - Minimal Impact 6902 // "LOW" - Low Impact 6903 // "MEDIUM" - Medium Impact 6904 // "HIGH" - High Impact 6905 // "CRITICAL" - Critical Impact 6906 Severity string `json:"severity,omitempty"` 6907 // ForceSendFields is a list of field names (e.g. "CvssScore") to 6908 // unconditionally include in API requests. By default, fields with empty or 6909 // default values are omitted from API requests. See 6910 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6911 // details. 6912 ForceSendFields []string `json:"-"` 6913 // NullFields is a list of field names (e.g. "CvssScore") to include in API 6914 // requests with the JSON null value. By default, fields with empty values are 6915 // omitted from API requests. See 6916 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6917 NullFields []string `json:"-"` 6918 } 6919 6920 func (s *VulnerabilityType) MarshalJSON() ([]byte, error) { 6921 type NoMethod VulnerabilityType 6922 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6923 } 6924 6925 func (s *VulnerabilityType) UnmarshalJSON(data []byte) error { 6926 type NoMethod VulnerabilityType 6927 var s1 struct { 6928 CvssScore gensupport.JSONFloat64 `json:"cvssScore"` 6929 *NoMethod 6930 } 6931 s1.NoMethod = (*NoMethod)(s) 6932 if err := json.Unmarshal(data, &s1); err != nil { 6933 return err 6934 } 6935 s.CvssScore = float64(s1.CvssScore) 6936 return nil 6937 } 6938 6939 type ProjectsNotesCreateCall struct { 6940 s *Service 6941 parent string 6942 note *Note 6943 urlParams_ gensupport.URLParams 6944 ctx_ context.Context 6945 header_ http.Header 6946 } 6947 6948 // Create: Creates a new `Note`. 6949 // 6950 // - parent: This field contains the project Id for example: 6951 // "projects/{project_id}. 6952 func (r *ProjectsNotesService) Create(parent string, note *Note) *ProjectsNotesCreateCall { 6953 c := &ProjectsNotesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6954 c.parent = parent 6955 c.note = note 6956 return c 6957 } 6958 6959 // Name sets the optional parameter "name": The name of the project. Should be 6960 // of the form "providers/{provider_id}". @Deprecated 6961 func (c *ProjectsNotesCreateCall) Name(name string) *ProjectsNotesCreateCall { 6962 c.urlParams_.Set("name", name) 6963 return c 6964 } 6965 6966 // NoteId sets the optional parameter "noteId": The ID to use for this note. 6967 func (c *ProjectsNotesCreateCall) NoteId(noteId string) *ProjectsNotesCreateCall { 6968 c.urlParams_.Set("noteId", noteId) 6969 return c 6970 } 6971 6972 // Fields allows partial responses to be retrieved. See 6973 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6974 // details. 6975 func (c *ProjectsNotesCreateCall) Fields(s ...googleapi.Field) *ProjectsNotesCreateCall { 6976 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6977 return c 6978 } 6979 6980 // Context sets the context to be used in this call's Do method. 6981 func (c *ProjectsNotesCreateCall) Context(ctx context.Context) *ProjectsNotesCreateCall { 6982 c.ctx_ = ctx 6983 return c 6984 } 6985 6986 // Header returns a http.Header that can be modified by the caller to add 6987 // headers to the request. 6988 func (c *ProjectsNotesCreateCall) Header() http.Header { 6989 if c.header_ == nil { 6990 c.header_ = make(http.Header) 6991 } 6992 return c.header_ 6993 } 6994 6995 func (c *ProjectsNotesCreateCall) doRequest(alt string) (*http.Response, error) { 6996 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 6997 var body io.Reader = nil 6998 body, err := googleapi.WithoutDataWrapper.JSONReader(c.note) 6999 if err != nil { 7000 return nil, err 7001 } 7002 c.urlParams_.Set("alt", alt) 7003 c.urlParams_.Set("prettyPrint", "false") 7004 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/notes") 7005 urls += "?" + c.urlParams_.Encode() 7006 req, err := http.NewRequest("POST", urls, body) 7007 if err != nil { 7008 return nil, err 7009 } 7010 req.Header = reqHeaders 7011 googleapi.Expand(req.URL, map[string]string{ 7012 "parent": c.parent, 7013 }) 7014 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7015 } 7016 7017 // Do executes the "containeranalysis.projects.notes.create" call. 7018 // Any non-2xx status code is an error. Response headers are in either 7019 // *Note.ServerResponse.Header or (if a response was returned at all) in 7020 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7021 // whether the returned error was because http.StatusNotModified was returned. 7022 func (c *ProjectsNotesCreateCall) Do(opts ...googleapi.CallOption) (*Note, error) { 7023 gensupport.SetOptions(c.urlParams_, opts...) 7024 res, err := c.doRequest("json") 7025 if res != nil && res.StatusCode == http.StatusNotModified { 7026 if res.Body != nil { 7027 res.Body.Close() 7028 } 7029 return nil, gensupport.WrapError(&googleapi.Error{ 7030 Code: res.StatusCode, 7031 Header: res.Header, 7032 }) 7033 } 7034 if err != nil { 7035 return nil, err 7036 } 7037 defer googleapi.CloseBody(res) 7038 if err := googleapi.CheckResponse(res); err != nil { 7039 return nil, gensupport.WrapError(err) 7040 } 7041 ret := &Note{ 7042 ServerResponse: googleapi.ServerResponse{ 7043 Header: res.Header, 7044 HTTPStatusCode: res.StatusCode, 7045 }, 7046 } 7047 target := &ret 7048 if err := gensupport.DecodeResponse(target, res); err != nil { 7049 return nil, err 7050 } 7051 return ret, nil 7052 } 7053 7054 type ProjectsNotesDeleteCall struct { 7055 s *Service 7056 name string 7057 urlParams_ gensupport.URLParams 7058 ctx_ context.Context 7059 header_ http.Header 7060 } 7061 7062 // Delete: Deletes the given `Note` from the system. 7063 // 7064 // - name: The name of the note in the form of 7065 // "providers/{provider_id}/notes/{NOTE_ID}". 7066 func (r *ProjectsNotesService) Delete(name string) *ProjectsNotesDeleteCall { 7067 c := &ProjectsNotesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7068 c.name = name 7069 return c 7070 } 7071 7072 // Fields allows partial responses to be retrieved. See 7073 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7074 // details. 7075 func (c *ProjectsNotesDeleteCall) Fields(s ...googleapi.Field) *ProjectsNotesDeleteCall { 7076 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7077 return c 7078 } 7079 7080 // Context sets the context to be used in this call's Do method. 7081 func (c *ProjectsNotesDeleteCall) Context(ctx context.Context) *ProjectsNotesDeleteCall { 7082 c.ctx_ = ctx 7083 return c 7084 } 7085 7086 // Header returns a http.Header that can be modified by the caller to add 7087 // headers to the request. 7088 func (c *ProjectsNotesDeleteCall) Header() http.Header { 7089 if c.header_ == nil { 7090 c.header_ = make(http.Header) 7091 } 7092 return c.header_ 7093 } 7094 7095 func (c *ProjectsNotesDeleteCall) doRequest(alt string) (*http.Response, error) { 7096 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7097 var body io.Reader = nil 7098 c.urlParams_.Set("alt", alt) 7099 c.urlParams_.Set("prettyPrint", "false") 7100 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 7101 urls += "?" + c.urlParams_.Encode() 7102 req, err := http.NewRequest("DELETE", urls, body) 7103 if err != nil { 7104 return nil, err 7105 } 7106 req.Header = reqHeaders 7107 googleapi.Expand(req.URL, map[string]string{ 7108 "name": c.name, 7109 }) 7110 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7111 } 7112 7113 // Do executes the "containeranalysis.projects.notes.delete" call. 7114 // Any non-2xx status code is an error. Response headers are in either 7115 // *Empty.ServerResponse.Header or (if a response was returned at all) in 7116 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7117 // whether the returned error was because http.StatusNotModified was returned. 7118 func (c *ProjectsNotesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 7119 gensupport.SetOptions(c.urlParams_, opts...) 7120 res, err := c.doRequest("json") 7121 if res != nil && res.StatusCode == http.StatusNotModified { 7122 if res.Body != nil { 7123 res.Body.Close() 7124 } 7125 return nil, gensupport.WrapError(&googleapi.Error{ 7126 Code: res.StatusCode, 7127 Header: res.Header, 7128 }) 7129 } 7130 if err != nil { 7131 return nil, err 7132 } 7133 defer googleapi.CloseBody(res) 7134 if err := googleapi.CheckResponse(res); err != nil { 7135 return nil, gensupport.WrapError(err) 7136 } 7137 ret := &Empty{ 7138 ServerResponse: googleapi.ServerResponse{ 7139 Header: res.Header, 7140 HTTPStatusCode: res.StatusCode, 7141 }, 7142 } 7143 target := &ret 7144 if err := gensupport.DecodeResponse(target, res); err != nil { 7145 return nil, err 7146 } 7147 return ret, nil 7148 } 7149 7150 type ProjectsNotesGetCall struct { 7151 s *Service 7152 name string 7153 urlParams_ gensupport.URLParams 7154 ifNoneMatch_ string 7155 ctx_ context.Context 7156 header_ http.Header 7157 } 7158 7159 // Get: Returns the requested `Note`. 7160 // 7161 // - name: The name of the note in the form of 7162 // "providers/{provider_id}/notes/{NOTE_ID}". 7163 func (r *ProjectsNotesService) Get(name string) *ProjectsNotesGetCall { 7164 c := &ProjectsNotesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7165 c.name = name 7166 return c 7167 } 7168 7169 // Fields allows partial responses to be retrieved. See 7170 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7171 // details. 7172 func (c *ProjectsNotesGetCall) Fields(s ...googleapi.Field) *ProjectsNotesGetCall { 7173 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7174 return c 7175 } 7176 7177 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7178 // object's ETag matches the given value. This is useful for getting updates 7179 // only after the object has changed since the last request. 7180 func (c *ProjectsNotesGetCall) IfNoneMatch(entityTag string) *ProjectsNotesGetCall { 7181 c.ifNoneMatch_ = entityTag 7182 return c 7183 } 7184 7185 // Context sets the context to be used in this call's Do method. 7186 func (c *ProjectsNotesGetCall) Context(ctx context.Context) *ProjectsNotesGetCall { 7187 c.ctx_ = ctx 7188 return c 7189 } 7190 7191 // Header returns a http.Header that can be modified by the caller to add 7192 // headers to the request. 7193 func (c *ProjectsNotesGetCall) Header() http.Header { 7194 if c.header_ == nil { 7195 c.header_ = make(http.Header) 7196 } 7197 return c.header_ 7198 } 7199 7200 func (c *ProjectsNotesGetCall) doRequest(alt string) (*http.Response, error) { 7201 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7202 if c.ifNoneMatch_ != "" { 7203 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7204 } 7205 var body io.Reader = nil 7206 c.urlParams_.Set("alt", alt) 7207 c.urlParams_.Set("prettyPrint", "false") 7208 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 7209 urls += "?" + c.urlParams_.Encode() 7210 req, err := http.NewRequest("GET", urls, body) 7211 if err != nil { 7212 return nil, err 7213 } 7214 req.Header = reqHeaders 7215 googleapi.Expand(req.URL, map[string]string{ 7216 "name": c.name, 7217 }) 7218 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7219 } 7220 7221 // Do executes the "containeranalysis.projects.notes.get" call. 7222 // Any non-2xx status code is an error. Response headers are in either 7223 // *Note.ServerResponse.Header or (if a response was returned at all) in 7224 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7225 // whether the returned error was because http.StatusNotModified was returned. 7226 func (c *ProjectsNotesGetCall) Do(opts ...googleapi.CallOption) (*Note, error) { 7227 gensupport.SetOptions(c.urlParams_, opts...) 7228 res, err := c.doRequest("json") 7229 if res != nil && res.StatusCode == http.StatusNotModified { 7230 if res.Body != nil { 7231 res.Body.Close() 7232 } 7233 return nil, gensupport.WrapError(&googleapi.Error{ 7234 Code: res.StatusCode, 7235 Header: res.Header, 7236 }) 7237 } 7238 if err != nil { 7239 return nil, err 7240 } 7241 defer googleapi.CloseBody(res) 7242 if err := googleapi.CheckResponse(res); err != nil { 7243 return nil, gensupport.WrapError(err) 7244 } 7245 ret := &Note{ 7246 ServerResponse: googleapi.ServerResponse{ 7247 Header: res.Header, 7248 HTTPStatusCode: res.StatusCode, 7249 }, 7250 } 7251 target := &ret 7252 if err := gensupport.DecodeResponse(target, res); err != nil { 7253 return nil, err 7254 } 7255 return ret, nil 7256 } 7257 7258 type ProjectsNotesGetIamPolicyCall struct { 7259 s *Service 7260 resource string 7261 getiampolicyrequest *GetIamPolicyRequest 7262 urlParams_ gensupport.URLParams 7263 ctx_ context.Context 7264 header_ http.Header 7265 } 7266 7267 // GetIamPolicy: Gets the access control policy for a note or an `Occurrence` 7268 // resource. Requires `containeranalysis.notes.setIamPolicy` or 7269 // `containeranalysis.occurrences.setIamPolicy` permission if the resource is a 7270 // note or occurrence, respectively. Attempting to call this method on a 7271 // resource without the required permission will result in a 7272 // `PERMISSION_DENIED` error. Attempting to call this method on a non-existent 7273 // resource will result in a `NOT_FOUND` error if the user has list permission 7274 // on the project, or a `PERMISSION_DENIED` error otherwise. The resource takes 7275 // the following formats: `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` 7276 // for occurrences and projects/{PROJECT_ID}/notes/{NOTE_ID} for notes 7277 // 7278 // - resource: REQUIRED: The resource for which the policy is being requested. 7279 // See Resource names (https://cloud.google.com/apis/design/resource_names) 7280 // for the appropriate value for this field. 7281 func (r *ProjectsNotesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsNotesGetIamPolicyCall { 7282 c := &ProjectsNotesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7283 c.resource = resource 7284 c.getiampolicyrequest = getiampolicyrequest 7285 return c 7286 } 7287 7288 // Fields allows partial responses to be retrieved. See 7289 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7290 // details. 7291 func (c *ProjectsNotesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsNotesGetIamPolicyCall { 7292 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7293 return c 7294 } 7295 7296 // Context sets the context to be used in this call's Do method. 7297 func (c *ProjectsNotesGetIamPolicyCall) Context(ctx context.Context) *ProjectsNotesGetIamPolicyCall { 7298 c.ctx_ = ctx 7299 return c 7300 } 7301 7302 // Header returns a http.Header that can be modified by the caller to add 7303 // headers to the request. 7304 func (c *ProjectsNotesGetIamPolicyCall) Header() http.Header { 7305 if c.header_ == nil { 7306 c.header_ = make(http.Header) 7307 } 7308 return c.header_ 7309 } 7310 7311 func (c *ProjectsNotesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 7312 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7313 var body io.Reader = nil 7314 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 7315 if err != nil { 7316 return nil, err 7317 } 7318 c.urlParams_.Set("alt", alt) 7319 c.urlParams_.Set("prettyPrint", "false") 7320 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:getIamPolicy") 7321 urls += "?" + c.urlParams_.Encode() 7322 req, err := http.NewRequest("POST", urls, body) 7323 if err != nil { 7324 return nil, err 7325 } 7326 req.Header = reqHeaders 7327 googleapi.Expand(req.URL, map[string]string{ 7328 "resource": c.resource, 7329 }) 7330 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7331 } 7332 7333 // Do executes the "containeranalysis.projects.notes.getIamPolicy" call. 7334 // Any non-2xx status code is an error. Response headers are in either 7335 // *Policy.ServerResponse.Header or (if a response was returned at all) in 7336 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7337 // whether the returned error was because http.StatusNotModified was returned. 7338 func (c *ProjectsNotesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 7339 gensupport.SetOptions(c.urlParams_, opts...) 7340 res, err := c.doRequest("json") 7341 if res != nil && res.StatusCode == http.StatusNotModified { 7342 if res.Body != nil { 7343 res.Body.Close() 7344 } 7345 return nil, gensupport.WrapError(&googleapi.Error{ 7346 Code: res.StatusCode, 7347 Header: res.Header, 7348 }) 7349 } 7350 if err != nil { 7351 return nil, err 7352 } 7353 defer googleapi.CloseBody(res) 7354 if err := googleapi.CheckResponse(res); err != nil { 7355 return nil, gensupport.WrapError(err) 7356 } 7357 ret := &Policy{ 7358 ServerResponse: googleapi.ServerResponse{ 7359 Header: res.Header, 7360 HTTPStatusCode: res.StatusCode, 7361 }, 7362 } 7363 target := &ret 7364 if err := gensupport.DecodeResponse(target, res); err != nil { 7365 return nil, err 7366 } 7367 return ret, nil 7368 } 7369 7370 type ProjectsNotesListCall struct { 7371 s *Service 7372 parent string 7373 urlParams_ gensupport.URLParams 7374 ifNoneMatch_ string 7375 ctx_ context.Context 7376 header_ http.Header 7377 } 7378 7379 // List: Lists all `Notes` for a given project. 7380 // 7381 // - parent: This field contains the project Id for example: 7382 // "projects/{PROJECT_ID}". 7383 func (r *ProjectsNotesService) List(parent string) *ProjectsNotesListCall { 7384 c := &ProjectsNotesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7385 c.parent = parent 7386 return c 7387 } 7388 7389 // Filter sets the optional parameter "filter": The filter expression. 7390 func (c *ProjectsNotesListCall) Filter(filter string) *ProjectsNotesListCall { 7391 c.urlParams_.Set("filter", filter) 7392 return c 7393 } 7394 7395 // Name sets the optional parameter "name": The name field will contain the 7396 // project Id for example: "providers/{provider_id} @Deprecated 7397 func (c *ProjectsNotesListCall) Name(name string) *ProjectsNotesListCall { 7398 c.urlParams_.Set("name", name) 7399 return c 7400 } 7401 7402 // PageSize sets the optional parameter "pageSize": Number of notes to return 7403 // in the list. 7404 func (c *ProjectsNotesListCall) PageSize(pageSize int64) *ProjectsNotesListCall { 7405 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7406 return c 7407 } 7408 7409 // PageToken sets the optional parameter "pageToken": Token to provide to skip 7410 // to a particular spot in the list. 7411 func (c *ProjectsNotesListCall) PageToken(pageToken string) *ProjectsNotesListCall { 7412 c.urlParams_.Set("pageToken", pageToken) 7413 return c 7414 } 7415 7416 // Fields allows partial responses to be retrieved. See 7417 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7418 // details. 7419 func (c *ProjectsNotesListCall) Fields(s ...googleapi.Field) *ProjectsNotesListCall { 7420 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7421 return c 7422 } 7423 7424 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7425 // object's ETag matches the given value. This is useful for getting updates 7426 // only after the object has changed since the last request. 7427 func (c *ProjectsNotesListCall) IfNoneMatch(entityTag string) *ProjectsNotesListCall { 7428 c.ifNoneMatch_ = entityTag 7429 return c 7430 } 7431 7432 // Context sets the context to be used in this call's Do method. 7433 func (c *ProjectsNotesListCall) Context(ctx context.Context) *ProjectsNotesListCall { 7434 c.ctx_ = ctx 7435 return c 7436 } 7437 7438 // Header returns a http.Header that can be modified by the caller to add 7439 // headers to the request. 7440 func (c *ProjectsNotesListCall) Header() http.Header { 7441 if c.header_ == nil { 7442 c.header_ = make(http.Header) 7443 } 7444 return c.header_ 7445 } 7446 7447 func (c *ProjectsNotesListCall) doRequest(alt string) (*http.Response, error) { 7448 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7449 if c.ifNoneMatch_ != "" { 7450 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7451 } 7452 var body io.Reader = nil 7453 c.urlParams_.Set("alt", alt) 7454 c.urlParams_.Set("prettyPrint", "false") 7455 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/notes") 7456 urls += "?" + c.urlParams_.Encode() 7457 req, err := http.NewRequest("GET", urls, body) 7458 if err != nil { 7459 return nil, err 7460 } 7461 req.Header = reqHeaders 7462 googleapi.Expand(req.URL, map[string]string{ 7463 "parent": c.parent, 7464 }) 7465 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7466 } 7467 7468 // Do executes the "containeranalysis.projects.notes.list" call. 7469 // Any non-2xx status code is an error. Response headers are in either 7470 // *ListNotesResponse.ServerResponse.Header or (if a response was returned at 7471 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7472 // check whether the returned error was because http.StatusNotModified was 7473 // returned. 7474 func (c *ProjectsNotesListCall) Do(opts ...googleapi.CallOption) (*ListNotesResponse, error) { 7475 gensupport.SetOptions(c.urlParams_, opts...) 7476 res, err := c.doRequest("json") 7477 if res != nil && res.StatusCode == http.StatusNotModified { 7478 if res.Body != nil { 7479 res.Body.Close() 7480 } 7481 return nil, gensupport.WrapError(&googleapi.Error{ 7482 Code: res.StatusCode, 7483 Header: res.Header, 7484 }) 7485 } 7486 if err != nil { 7487 return nil, err 7488 } 7489 defer googleapi.CloseBody(res) 7490 if err := googleapi.CheckResponse(res); err != nil { 7491 return nil, gensupport.WrapError(err) 7492 } 7493 ret := &ListNotesResponse{ 7494 ServerResponse: googleapi.ServerResponse{ 7495 Header: res.Header, 7496 HTTPStatusCode: res.StatusCode, 7497 }, 7498 } 7499 target := &ret 7500 if err := gensupport.DecodeResponse(target, res); err != nil { 7501 return nil, err 7502 } 7503 return ret, nil 7504 } 7505 7506 // Pages invokes f for each page of results. 7507 // A non-nil error returned from f will halt the iteration. 7508 // The provided context supersedes any context provided to the Context method. 7509 func (c *ProjectsNotesListCall) Pages(ctx context.Context, f func(*ListNotesResponse) error) error { 7510 c.ctx_ = ctx 7511 defer c.PageToken(c.urlParams_.Get("pageToken")) 7512 for { 7513 x, err := c.Do() 7514 if err != nil { 7515 return err 7516 } 7517 if err := f(x); err != nil { 7518 return err 7519 } 7520 if x.NextPageToken == "" { 7521 return nil 7522 } 7523 c.PageToken(x.NextPageToken) 7524 } 7525 } 7526 7527 type ProjectsNotesPatchCall struct { 7528 s *Service 7529 name string 7530 note *Note 7531 urlParams_ gensupport.URLParams 7532 ctx_ context.Context 7533 header_ http.Header 7534 } 7535 7536 // Patch: Updates an existing `Note`. 7537 // 7538 // - name: The name of the note. Should be of the form 7539 // "projects/{provider_id}/notes/{note_id}". 7540 func (r *ProjectsNotesService) Patch(name string, note *Note) *ProjectsNotesPatchCall { 7541 c := &ProjectsNotesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7542 c.name = name 7543 c.note = note 7544 return c 7545 } 7546 7547 // UpdateMask sets the optional parameter "updateMask": The fields to update. 7548 func (c *ProjectsNotesPatchCall) UpdateMask(updateMask string) *ProjectsNotesPatchCall { 7549 c.urlParams_.Set("updateMask", updateMask) 7550 return c 7551 } 7552 7553 // Fields allows partial responses to be retrieved. See 7554 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7555 // details. 7556 func (c *ProjectsNotesPatchCall) Fields(s ...googleapi.Field) *ProjectsNotesPatchCall { 7557 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7558 return c 7559 } 7560 7561 // Context sets the context to be used in this call's Do method. 7562 func (c *ProjectsNotesPatchCall) Context(ctx context.Context) *ProjectsNotesPatchCall { 7563 c.ctx_ = ctx 7564 return c 7565 } 7566 7567 // Header returns a http.Header that can be modified by the caller to add 7568 // headers to the request. 7569 func (c *ProjectsNotesPatchCall) Header() http.Header { 7570 if c.header_ == nil { 7571 c.header_ = make(http.Header) 7572 } 7573 return c.header_ 7574 } 7575 7576 func (c *ProjectsNotesPatchCall) doRequest(alt string) (*http.Response, error) { 7577 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7578 var body io.Reader = nil 7579 body, err := googleapi.WithoutDataWrapper.JSONReader(c.note) 7580 if err != nil { 7581 return nil, err 7582 } 7583 c.urlParams_.Set("alt", alt) 7584 c.urlParams_.Set("prettyPrint", "false") 7585 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 7586 urls += "?" + c.urlParams_.Encode() 7587 req, err := http.NewRequest("PATCH", 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.patch" call. 7599 // Any non-2xx status code is an error. Response headers are in either 7600 // *Note.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 *ProjectsNotesPatchCall) Do(opts ...googleapi.CallOption) (*Note, 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 := &Note{ 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 ProjectsNotesSetIamPolicyCall struct { 7636 s *Service 7637 resource string 7638 setiampolicyrequest *SetIamPolicyRequest 7639 urlParams_ gensupport.URLParams 7640 ctx_ context.Context 7641 header_ http.Header 7642 } 7643 7644 // SetIamPolicy: Sets the access control policy on the specified `Note` or 7645 // `Occurrence`. Requires `containeranalysis.notes.setIamPolicy` or 7646 // `containeranalysis.occurrences.setIamPolicy` permission if the resource is a 7647 // `Note` or an `Occurrence`, respectively. Attempting to call this method 7648 // without these permissions will result in a ` `PERMISSION_DENIED` error. 7649 // Attempting to call this method on a non-existent resource will result in a 7650 // `NOT_FOUND` error if the user has `containeranalysis.notes.list` permission 7651 // on a `Note` or `containeranalysis.occurrences.list` on an `Occurrence`, or a 7652 // `PERMISSION_DENIED` error otherwise. The resource takes the following 7653 // formats: `projects/{projectid}/occurrences/{occurrenceid}` for occurrences 7654 // and projects/{projectid}/notes/{noteid} for notes 7655 // 7656 // - resource: REQUIRED: The resource for which the policy is being specified. 7657 // See Resource names (https://cloud.google.com/apis/design/resource_names) 7658 // for the appropriate value for this field. 7659 func (r *ProjectsNotesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsNotesSetIamPolicyCall { 7660 c := &ProjectsNotesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7661 c.resource = resource 7662 c.setiampolicyrequest = setiampolicyrequest 7663 return c 7664 } 7665 7666 // Fields allows partial responses to be retrieved. See 7667 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7668 // details. 7669 func (c *ProjectsNotesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsNotesSetIamPolicyCall { 7670 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7671 return c 7672 } 7673 7674 // Context sets the context to be used in this call's Do method. 7675 func (c *ProjectsNotesSetIamPolicyCall) Context(ctx context.Context) *ProjectsNotesSetIamPolicyCall { 7676 c.ctx_ = ctx 7677 return c 7678 } 7679 7680 // Header returns a http.Header that can be modified by the caller to add 7681 // headers to the request. 7682 func (c *ProjectsNotesSetIamPolicyCall) Header() http.Header { 7683 if c.header_ == nil { 7684 c.header_ = make(http.Header) 7685 } 7686 return c.header_ 7687 } 7688 7689 func (c *ProjectsNotesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 7690 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7691 var body io.Reader = nil 7692 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 7693 if err != nil { 7694 return nil, err 7695 } 7696 c.urlParams_.Set("alt", alt) 7697 c.urlParams_.Set("prettyPrint", "false") 7698 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:setIamPolicy") 7699 urls += "?" + c.urlParams_.Encode() 7700 req, err := http.NewRequest("POST", urls, body) 7701 if err != nil { 7702 return nil, err 7703 } 7704 req.Header = reqHeaders 7705 googleapi.Expand(req.URL, map[string]string{ 7706 "resource": c.resource, 7707 }) 7708 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7709 } 7710 7711 // Do executes the "containeranalysis.projects.notes.setIamPolicy" call. 7712 // Any non-2xx status code is an error. Response headers are in either 7713 // *Policy.ServerResponse.Header or (if a response was returned at all) in 7714 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7715 // whether the returned error was because http.StatusNotModified was returned. 7716 func (c *ProjectsNotesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 7717 gensupport.SetOptions(c.urlParams_, opts...) 7718 res, err := c.doRequest("json") 7719 if res != nil && res.StatusCode == http.StatusNotModified { 7720 if res.Body != nil { 7721 res.Body.Close() 7722 } 7723 return nil, gensupport.WrapError(&googleapi.Error{ 7724 Code: res.StatusCode, 7725 Header: res.Header, 7726 }) 7727 } 7728 if err != nil { 7729 return nil, err 7730 } 7731 defer googleapi.CloseBody(res) 7732 if err := googleapi.CheckResponse(res); err != nil { 7733 return nil, gensupport.WrapError(err) 7734 } 7735 ret := &Policy{ 7736 ServerResponse: googleapi.ServerResponse{ 7737 Header: res.Header, 7738 HTTPStatusCode: res.StatusCode, 7739 }, 7740 } 7741 target := &ret 7742 if err := gensupport.DecodeResponse(target, res); err != nil { 7743 return nil, err 7744 } 7745 return ret, nil 7746 } 7747 7748 type ProjectsNotesTestIamPermissionsCall struct { 7749 s *Service 7750 resource string 7751 testiampermissionsrequest *TestIamPermissionsRequest 7752 urlParams_ gensupport.URLParams 7753 ctx_ context.Context 7754 header_ http.Header 7755 } 7756 7757 // TestIamPermissions: Returns the permissions that a caller has on the 7758 // specified note or occurrence resource. Requires list permission on the 7759 // project (for example, "storage.objects.list" on the containing bucket for 7760 // testing permission of an object). Attempting to call this method on a 7761 // non-existent resource will result in a `NOT_FOUND` error if the user has 7762 // list permission on the project, or a `PERMISSION_DENIED` error otherwise. 7763 // The resource takes the following formats: 7764 // `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for `Occurrences` and 7765 // `projects/{PROJECT_ID}/notes/{NOTE_ID}` for `Notes` 7766 // 7767 // - resource: REQUIRED: The resource for which the policy detail is being 7768 // requested. See Resource names 7769 // (https://cloud.google.com/apis/design/resource_names) for the appropriate 7770 // value for this field. 7771 func (r *ProjectsNotesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsNotesTestIamPermissionsCall { 7772 c := &ProjectsNotesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7773 c.resource = resource 7774 c.testiampermissionsrequest = testiampermissionsrequest 7775 return c 7776 } 7777 7778 // Fields allows partial responses to be retrieved. See 7779 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7780 // details. 7781 func (c *ProjectsNotesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsNotesTestIamPermissionsCall { 7782 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7783 return c 7784 } 7785 7786 // Context sets the context to be used in this call's Do method. 7787 func (c *ProjectsNotesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsNotesTestIamPermissionsCall { 7788 c.ctx_ = ctx 7789 return c 7790 } 7791 7792 // Header returns a http.Header that can be modified by the caller to add 7793 // headers to the request. 7794 func (c *ProjectsNotesTestIamPermissionsCall) Header() http.Header { 7795 if c.header_ == nil { 7796 c.header_ = make(http.Header) 7797 } 7798 return c.header_ 7799 } 7800 7801 func (c *ProjectsNotesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 7802 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7803 var body io.Reader = nil 7804 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 7805 if err != nil { 7806 return nil, err 7807 } 7808 c.urlParams_.Set("alt", alt) 7809 c.urlParams_.Set("prettyPrint", "false") 7810 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:testIamPermissions") 7811 urls += "?" + c.urlParams_.Encode() 7812 req, err := http.NewRequest("POST", urls, body) 7813 if err != nil { 7814 return nil, err 7815 } 7816 req.Header = reqHeaders 7817 googleapi.Expand(req.URL, map[string]string{ 7818 "resource": c.resource, 7819 }) 7820 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7821 } 7822 7823 // Do executes the "containeranalysis.projects.notes.testIamPermissions" call. 7824 // Any non-2xx status code is an error. Response headers are in either 7825 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was 7826 // returned at all) in error.(*googleapi.Error).Header. Use 7827 // googleapi.IsNotModified to check whether the returned error was because 7828 // http.StatusNotModified was returned. 7829 func (c *ProjectsNotesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 7830 gensupport.SetOptions(c.urlParams_, opts...) 7831 res, err := c.doRequest("json") 7832 if res != nil && res.StatusCode == http.StatusNotModified { 7833 if res.Body != nil { 7834 res.Body.Close() 7835 } 7836 return nil, gensupport.WrapError(&googleapi.Error{ 7837 Code: res.StatusCode, 7838 Header: res.Header, 7839 }) 7840 } 7841 if err != nil { 7842 return nil, err 7843 } 7844 defer googleapi.CloseBody(res) 7845 if err := googleapi.CheckResponse(res); err != nil { 7846 return nil, gensupport.WrapError(err) 7847 } 7848 ret := &TestIamPermissionsResponse{ 7849 ServerResponse: googleapi.ServerResponse{ 7850 Header: res.Header, 7851 HTTPStatusCode: res.StatusCode, 7852 }, 7853 } 7854 target := &ret 7855 if err := gensupport.DecodeResponse(target, res); err != nil { 7856 return nil, err 7857 } 7858 return ret, nil 7859 } 7860 7861 type ProjectsNotesOccurrencesListCall struct { 7862 s *Service 7863 name string 7864 urlParams_ gensupport.URLParams 7865 ifNoneMatch_ string 7866 ctx_ context.Context 7867 header_ http.Header 7868 } 7869 7870 // List: Lists `Occurrences` referencing the specified `Note`. Use this method 7871 // to get all occurrences referencing your `Note` across all your customer 7872 // projects. 7873 // 7874 // - name: The name field will contain the note name for example: 7875 // "provider/{provider_id}/notes/{note_id}". 7876 func (r *ProjectsNotesOccurrencesService) List(name string) *ProjectsNotesOccurrencesListCall { 7877 c := &ProjectsNotesOccurrencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7878 c.name = name 7879 return c 7880 } 7881 7882 // Filter sets the optional parameter "filter": The filter expression. 7883 func (c *ProjectsNotesOccurrencesListCall) Filter(filter string) *ProjectsNotesOccurrencesListCall { 7884 c.urlParams_.Set("filter", filter) 7885 return c 7886 } 7887 7888 // PageSize sets the optional parameter "pageSize": Number of notes to return 7889 // in the list. 7890 func (c *ProjectsNotesOccurrencesListCall) PageSize(pageSize int64) *ProjectsNotesOccurrencesListCall { 7891 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7892 return c 7893 } 7894 7895 // PageToken sets the optional parameter "pageToken": Token to provide to skip 7896 // to a particular spot in the list. 7897 func (c *ProjectsNotesOccurrencesListCall) PageToken(pageToken string) *ProjectsNotesOccurrencesListCall { 7898 c.urlParams_.Set("pageToken", pageToken) 7899 return c 7900 } 7901 7902 // Fields allows partial responses to be retrieved. See 7903 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7904 // details. 7905 func (c *ProjectsNotesOccurrencesListCall) Fields(s ...googleapi.Field) *ProjectsNotesOccurrencesListCall { 7906 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7907 return c 7908 } 7909 7910 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7911 // object's ETag matches the given value. This is useful for getting updates 7912 // only after the object has changed since the last request. 7913 func (c *ProjectsNotesOccurrencesListCall) IfNoneMatch(entityTag string) *ProjectsNotesOccurrencesListCall { 7914 c.ifNoneMatch_ = entityTag 7915 return c 7916 } 7917 7918 // Context sets the context to be used in this call's Do method. 7919 func (c *ProjectsNotesOccurrencesListCall) Context(ctx context.Context) *ProjectsNotesOccurrencesListCall { 7920 c.ctx_ = ctx 7921 return c 7922 } 7923 7924 // Header returns a http.Header that can be modified by the caller to add 7925 // headers to the request. 7926 func (c *ProjectsNotesOccurrencesListCall) Header() http.Header { 7927 if c.header_ == nil { 7928 c.header_ = make(http.Header) 7929 } 7930 return c.header_ 7931 } 7932 7933 func (c *ProjectsNotesOccurrencesListCall) doRequest(alt string) (*http.Response, error) { 7934 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7935 if c.ifNoneMatch_ != "" { 7936 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7937 } 7938 var body io.Reader = nil 7939 c.urlParams_.Set("alt", alt) 7940 c.urlParams_.Set("prettyPrint", "false") 7941 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/occurrences") 7942 urls += "?" + c.urlParams_.Encode() 7943 req, err := http.NewRequest("GET", urls, body) 7944 if err != nil { 7945 return nil, err 7946 } 7947 req.Header = reqHeaders 7948 googleapi.Expand(req.URL, map[string]string{ 7949 "name": c.name, 7950 }) 7951 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7952 } 7953 7954 // Do executes the "containeranalysis.projects.notes.occurrences.list" call. 7955 // Any non-2xx status code is an error. Response headers are in either 7956 // *ListNoteOccurrencesResponse.ServerResponse.Header or (if a response was 7957 // returned at all) in error.(*googleapi.Error).Header. Use 7958 // googleapi.IsNotModified to check whether the returned error was because 7959 // http.StatusNotModified was returned. 7960 func (c *ProjectsNotesOccurrencesListCall) Do(opts ...googleapi.CallOption) (*ListNoteOccurrencesResponse, error) { 7961 gensupport.SetOptions(c.urlParams_, opts...) 7962 res, err := c.doRequest("json") 7963 if res != nil && res.StatusCode == http.StatusNotModified { 7964 if res.Body != nil { 7965 res.Body.Close() 7966 } 7967 return nil, gensupport.WrapError(&googleapi.Error{ 7968 Code: res.StatusCode, 7969 Header: res.Header, 7970 }) 7971 } 7972 if err != nil { 7973 return nil, err 7974 } 7975 defer googleapi.CloseBody(res) 7976 if err := googleapi.CheckResponse(res); err != nil { 7977 return nil, gensupport.WrapError(err) 7978 } 7979 ret := &ListNoteOccurrencesResponse{ 7980 ServerResponse: googleapi.ServerResponse{ 7981 Header: res.Header, 7982 HTTPStatusCode: res.StatusCode, 7983 }, 7984 } 7985 target := &ret 7986 if err := gensupport.DecodeResponse(target, res); err != nil { 7987 return nil, err 7988 } 7989 return ret, nil 7990 } 7991 7992 // Pages invokes f for each page of results. 7993 // A non-nil error returned from f will halt the iteration. 7994 // The provided context supersedes any context provided to the Context method. 7995 func (c *ProjectsNotesOccurrencesListCall) Pages(ctx context.Context, f func(*ListNoteOccurrencesResponse) error) error { 7996 c.ctx_ = ctx 7997 defer c.PageToken(c.urlParams_.Get("pageToken")) 7998 for { 7999 x, err := c.Do() 8000 if err != nil { 8001 return err 8002 } 8003 if err := f(x); err != nil { 8004 return err 8005 } 8006 if x.NextPageToken == "" { 8007 return nil 8008 } 8009 c.PageToken(x.NextPageToken) 8010 } 8011 } 8012 8013 type ProjectsOccurrencesCreateCall struct { 8014 s *Service 8015 parent string 8016 occurrence *Occurrence 8017 urlParams_ gensupport.URLParams 8018 ctx_ context.Context 8019 header_ http.Header 8020 } 8021 8022 // Create: Creates a new `Occurrence`. Use this method to create `Occurrences` 8023 // for a resource. 8024 // 8025 // - parent: This field contains the project Id for example: 8026 // "projects/{project_id}". 8027 func (r *ProjectsOccurrencesService) Create(parent string, occurrence *Occurrence) *ProjectsOccurrencesCreateCall { 8028 c := &ProjectsOccurrencesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8029 c.parent = parent 8030 c.occurrence = occurrence 8031 return c 8032 } 8033 8034 // Name sets the optional parameter "name": The name of the project. Should be 8035 // of the form "projects/{project_id}". @Deprecated 8036 func (c *ProjectsOccurrencesCreateCall) Name(name string) *ProjectsOccurrencesCreateCall { 8037 c.urlParams_.Set("name", name) 8038 return c 8039 } 8040 8041 // Fields allows partial responses to be retrieved. See 8042 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8043 // details. 8044 func (c *ProjectsOccurrencesCreateCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesCreateCall { 8045 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8046 return c 8047 } 8048 8049 // Context sets the context to be used in this call's Do method. 8050 func (c *ProjectsOccurrencesCreateCall) Context(ctx context.Context) *ProjectsOccurrencesCreateCall { 8051 c.ctx_ = ctx 8052 return c 8053 } 8054 8055 // Header returns a http.Header that can be modified by the caller to add 8056 // headers to the request. 8057 func (c *ProjectsOccurrencesCreateCall) Header() http.Header { 8058 if c.header_ == nil { 8059 c.header_ = make(http.Header) 8060 } 8061 return c.header_ 8062 } 8063 8064 func (c *ProjectsOccurrencesCreateCall) doRequest(alt string) (*http.Response, error) { 8065 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8066 var body io.Reader = nil 8067 body, err := googleapi.WithoutDataWrapper.JSONReader(c.occurrence) 8068 if err != nil { 8069 return nil, err 8070 } 8071 c.urlParams_.Set("alt", alt) 8072 c.urlParams_.Set("prettyPrint", "false") 8073 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/occurrences") 8074 urls += "?" + c.urlParams_.Encode() 8075 req, err := http.NewRequest("POST", urls, body) 8076 if err != nil { 8077 return nil, err 8078 } 8079 req.Header = reqHeaders 8080 googleapi.Expand(req.URL, map[string]string{ 8081 "parent": c.parent, 8082 }) 8083 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8084 } 8085 8086 // Do executes the "containeranalysis.projects.occurrences.create" call. 8087 // Any non-2xx status code is an error. Response headers are in either 8088 // *Occurrence.ServerResponse.Header or (if a response was returned at all) in 8089 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8090 // whether the returned error was because http.StatusNotModified was returned. 8091 func (c *ProjectsOccurrencesCreateCall) Do(opts ...googleapi.CallOption) (*Occurrence, error) { 8092 gensupport.SetOptions(c.urlParams_, opts...) 8093 res, err := c.doRequest("json") 8094 if res != nil && res.StatusCode == http.StatusNotModified { 8095 if res.Body != nil { 8096 res.Body.Close() 8097 } 8098 return nil, gensupport.WrapError(&googleapi.Error{ 8099 Code: res.StatusCode, 8100 Header: res.Header, 8101 }) 8102 } 8103 if err != nil { 8104 return nil, err 8105 } 8106 defer googleapi.CloseBody(res) 8107 if err := googleapi.CheckResponse(res); err != nil { 8108 return nil, gensupport.WrapError(err) 8109 } 8110 ret := &Occurrence{ 8111 ServerResponse: googleapi.ServerResponse{ 8112 Header: res.Header, 8113 HTTPStatusCode: res.StatusCode, 8114 }, 8115 } 8116 target := &ret 8117 if err := gensupport.DecodeResponse(target, res); err != nil { 8118 return nil, err 8119 } 8120 return ret, nil 8121 } 8122 8123 type ProjectsOccurrencesDeleteCall struct { 8124 s *Service 8125 name string 8126 urlParams_ gensupport.URLParams 8127 ctx_ context.Context 8128 header_ http.Header 8129 } 8130 8131 // Delete: Deletes the given `Occurrence` from the system. Use this when an 8132 // `Occurrence` is no longer applicable for the given resource. 8133 // 8134 // - name: The name of the occurrence in the form of 8135 // "projects/{project_id}/occurrences/{OCCURRENCE_ID}". 8136 func (r *ProjectsOccurrencesService) Delete(name string) *ProjectsOccurrencesDeleteCall { 8137 c := &ProjectsOccurrencesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8138 c.name = name 8139 return c 8140 } 8141 8142 // Fields allows partial responses to be retrieved. See 8143 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8144 // details. 8145 func (c *ProjectsOccurrencesDeleteCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesDeleteCall { 8146 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8147 return c 8148 } 8149 8150 // Context sets the context to be used in this call's Do method. 8151 func (c *ProjectsOccurrencesDeleteCall) Context(ctx context.Context) *ProjectsOccurrencesDeleteCall { 8152 c.ctx_ = ctx 8153 return c 8154 } 8155 8156 // Header returns a http.Header that can be modified by the caller to add 8157 // headers to the request. 8158 func (c *ProjectsOccurrencesDeleteCall) Header() http.Header { 8159 if c.header_ == nil { 8160 c.header_ = make(http.Header) 8161 } 8162 return c.header_ 8163 } 8164 8165 func (c *ProjectsOccurrencesDeleteCall) doRequest(alt string) (*http.Response, error) { 8166 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8167 var body io.Reader = nil 8168 c.urlParams_.Set("alt", alt) 8169 c.urlParams_.Set("prettyPrint", "false") 8170 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 8171 urls += "?" + c.urlParams_.Encode() 8172 req, err := http.NewRequest("DELETE", urls, body) 8173 if err != nil { 8174 return nil, err 8175 } 8176 req.Header = reqHeaders 8177 googleapi.Expand(req.URL, map[string]string{ 8178 "name": c.name, 8179 }) 8180 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8181 } 8182 8183 // Do executes the "containeranalysis.projects.occurrences.delete" call. 8184 // Any non-2xx status code is an error. Response headers are in either 8185 // *Empty.ServerResponse.Header or (if a response was returned at all) in 8186 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8187 // whether the returned error was because http.StatusNotModified was returned. 8188 func (c *ProjectsOccurrencesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 8189 gensupport.SetOptions(c.urlParams_, opts...) 8190 res, err := c.doRequest("json") 8191 if res != nil && res.StatusCode == http.StatusNotModified { 8192 if res.Body != nil { 8193 res.Body.Close() 8194 } 8195 return nil, gensupport.WrapError(&googleapi.Error{ 8196 Code: res.StatusCode, 8197 Header: res.Header, 8198 }) 8199 } 8200 if err != nil { 8201 return nil, err 8202 } 8203 defer googleapi.CloseBody(res) 8204 if err := googleapi.CheckResponse(res); err != nil { 8205 return nil, gensupport.WrapError(err) 8206 } 8207 ret := &Empty{ 8208 ServerResponse: googleapi.ServerResponse{ 8209 Header: res.Header, 8210 HTTPStatusCode: res.StatusCode, 8211 }, 8212 } 8213 target := &ret 8214 if err := gensupport.DecodeResponse(target, res); err != nil { 8215 return nil, err 8216 } 8217 return ret, nil 8218 } 8219 8220 type ProjectsOccurrencesGetCall struct { 8221 s *Service 8222 name string 8223 urlParams_ gensupport.URLParams 8224 ifNoneMatch_ string 8225 ctx_ context.Context 8226 header_ http.Header 8227 } 8228 8229 // Get: Returns the requested `Occurrence`. 8230 // 8231 // - name: The name of the occurrence of the form 8232 // "projects/{project_id}/occurrences/{OCCURRENCE_ID}". 8233 func (r *ProjectsOccurrencesService) Get(name string) *ProjectsOccurrencesGetCall { 8234 c := &ProjectsOccurrencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8235 c.name = name 8236 return c 8237 } 8238 8239 // Fields allows partial responses to be retrieved. See 8240 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8241 // details. 8242 func (c *ProjectsOccurrencesGetCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesGetCall { 8243 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8244 return c 8245 } 8246 8247 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8248 // object's ETag matches the given value. This is useful for getting updates 8249 // only after the object has changed since the last request. 8250 func (c *ProjectsOccurrencesGetCall) IfNoneMatch(entityTag string) *ProjectsOccurrencesGetCall { 8251 c.ifNoneMatch_ = entityTag 8252 return c 8253 } 8254 8255 // Context sets the context to be used in this call's Do method. 8256 func (c *ProjectsOccurrencesGetCall) Context(ctx context.Context) *ProjectsOccurrencesGetCall { 8257 c.ctx_ = ctx 8258 return c 8259 } 8260 8261 // Header returns a http.Header that can be modified by the caller to add 8262 // headers to the request. 8263 func (c *ProjectsOccurrencesGetCall) Header() http.Header { 8264 if c.header_ == nil { 8265 c.header_ = make(http.Header) 8266 } 8267 return c.header_ 8268 } 8269 8270 func (c *ProjectsOccurrencesGetCall) doRequest(alt string) (*http.Response, error) { 8271 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8272 if c.ifNoneMatch_ != "" { 8273 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8274 } 8275 var body io.Reader = nil 8276 c.urlParams_.Set("alt", alt) 8277 c.urlParams_.Set("prettyPrint", "false") 8278 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 8279 urls += "?" + c.urlParams_.Encode() 8280 req, err := http.NewRequest("GET", urls, body) 8281 if err != nil { 8282 return nil, err 8283 } 8284 req.Header = reqHeaders 8285 googleapi.Expand(req.URL, map[string]string{ 8286 "name": c.name, 8287 }) 8288 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8289 } 8290 8291 // Do executes the "containeranalysis.projects.occurrences.get" call. 8292 // Any non-2xx status code is an error. Response headers are in either 8293 // *Occurrence.ServerResponse.Header or (if a response was returned at all) in 8294 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8295 // whether the returned error was because http.StatusNotModified was returned. 8296 func (c *ProjectsOccurrencesGetCall) Do(opts ...googleapi.CallOption) (*Occurrence, error) { 8297 gensupport.SetOptions(c.urlParams_, opts...) 8298 res, err := c.doRequest("json") 8299 if res != nil && res.StatusCode == http.StatusNotModified { 8300 if res.Body != nil { 8301 res.Body.Close() 8302 } 8303 return nil, gensupport.WrapError(&googleapi.Error{ 8304 Code: res.StatusCode, 8305 Header: res.Header, 8306 }) 8307 } 8308 if err != nil { 8309 return nil, err 8310 } 8311 defer googleapi.CloseBody(res) 8312 if err := googleapi.CheckResponse(res); err != nil { 8313 return nil, gensupport.WrapError(err) 8314 } 8315 ret := &Occurrence{ 8316 ServerResponse: googleapi.ServerResponse{ 8317 Header: res.Header, 8318 HTTPStatusCode: res.StatusCode, 8319 }, 8320 } 8321 target := &ret 8322 if err := gensupport.DecodeResponse(target, res); err != nil { 8323 return nil, err 8324 } 8325 return ret, nil 8326 } 8327 8328 type ProjectsOccurrencesGetIamPolicyCall struct { 8329 s *Service 8330 resource string 8331 getiampolicyrequest *GetIamPolicyRequest 8332 urlParams_ gensupport.URLParams 8333 ctx_ context.Context 8334 header_ http.Header 8335 } 8336 8337 // GetIamPolicy: Gets the access control policy for a note or an `Occurrence` 8338 // resource. Requires `containeranalysis.notes.setIamPolicy` or 8339 // `containeranalysis.occurrences.setIamPolicy` permission if the resource is a 8340 // note or occurrence, respectively. Attempting to call this method on a 8341 // resource without the required permission will result in a 8342 // `PERMISSION_DENIED` error. Attempting to call this method on a non-existent 8343 // resource will result in a `NOT_FOUND` error if the user has list permission 8344 // on the project, or a `PERMISSION_DENIED` error otherwise. The resource takes 8345 // the following formats: `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` 8346 // for occurrences and projects/{PROJECT_ID}/notes/{NOTE_ID} for notes 8347 // 8348 // - resource: REQUIRED: The resource for which the policy is being requested. 8349 // See Resource names (https://cloud.google.com/apis/design/resource_names) 8350 // for the appropriate value for this field. 8351 func (r *ProjectsOccurrencesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsOccurrencesGetIamPolicyCall { 8352 c := &ProjectsOccurrencesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8353 c.resource = resource 8354 c.getiampolicyrequest = getiampolicyrequest 8355 return c 8356 } 8357 8358 // Fields allows partial responses to be retrieved. See 8359 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8360 // details. 8361 func (c *ProjectsOccurrencesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesGetIamPolicyCall { 8362 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8363 return c 8364 } 8365 8366 // Context sets the context to be used in this call's Do method. 8367 func (c *ProjectsOccurrencesGetIamPolicyCall) Context(ctx context.Context) *ProjectsOccurrencesGetIamPolicyCall { 8368 c.ctx_ = ctx 8369 return c 8370 } 8371 8372 // Header returns a http.Header that can be modified by the caller to add 8373 // headers to the request. 8374 func (c *ProjectsOccurrencesGetIamPolicyCall) Header() http.Header { 8375 if c.header_ == nil { 8376 c.header_ = make(http.Header) 8377 } 8378 return c.header_ 8379 } 8380 8381 func (c *ProjectsOccurrencesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 8382 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8383 var body io.Reader = nil 8384 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 8385 if err != nil { 8386 return nil, err 8387 } 8388 c.urlParams_.Set("alt", alt) 8389 c.urlParams_.Set("prettyPrint", "false") 8390 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:getIamPolicy") 8391 urls += "?" + c.urlParams_.Encode() 8392 req, err := http.NewRequest("POST", urls, body) 8393 if err != nil { 8394 return nil, err 8395 } 8396 req.Header = reqHeaders 8397 googleapi.Expand(req.URL, map[string]string{ 8398 "resource": c.resource, 8399 }) 8400 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8401 } 8402 8403 // Do executes the "containeranalysis.projects.occurrences.getIamPolicy" call. 8404 // Any non-2xx status code is an error. Response headers are in either 8405 // *Policy.ServerResponse.Header or (if a response was returned at all) in 8406 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8407 // whether the returned error was because http.StatusNotModified was returned. 8408 func (c *ProjectsOccurrencesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 8409 gensupport.SetOptions(c.urlParams_, opts...) 8410 res, err := c.doRequest("json") 8411 if res != nil && res.StatusCode == http.StatusNotModified { 8412 if res.Body != nil { 8413 res.Body.Close() 8414 } 8415 return nil, gensupport.WrapError(&googleapi.Error{ 8416 Code: res.StatusCode, 8417 Header: res.Header, 8418 }) 8419 } 8420 if err != nil { 8421 return nil, err 8422 } 8423 defer googleapi.CloseBody(res) 8424 if err := googleapi.CheckResponse(res); err != nil { 8425 return nil, gensupport.WrapError(err) 8426 } 8427 ret := &Policy{ 8428 ServerResponse: googleapi.ServerResponse{ 8429 Header: res.Header, 8430 HTTPStatusCode: res.StatusCode, 8431 }, 8432 } 8433 target := &ret 8434 if err := gensupport.DecodeResponse(target, res); err != nil { 8435 return nil, err 8436 } 8437 return ret, nil 8438 } 8439 8440 type ProjectsOccurrencesGetNotesCall struct { 8441 s *Service 8442 name string 8443 urlParams_ gensupport.URLParams 8444 ifNoneMatch_ string 8445 ctx_ context.Context 8446 header_ http.Header 8447 } 8448 8449 // GetNotes: Gets the `Note` attached to the given `Occurrence`. 8450 // 8451 // - name: The name of the occurrence in the form 8452 // "projects/{project_id}/occurrences/{OCCURRENCE_ID}". 8453 func (r *ProjectsOccurrencesService) GetNotes(name string) *ProjectsOccurrencesGetNotesCall { 8454 c := &ProjectsOccurrencesGetNotesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8455 c.name = name 8456 return c 8457 } 8458 8459 // Fields allows partial responses to be retrieved. See 8460 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8461 // details. 8462 func (c *ProjectsOccurrencesGetNotesCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesGetNotesCall { 8463 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8464 return c 8465 } 8466 8467 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8468 // object's ETag matches the given value. This is useful for getting updates 8469 // only after the object has changed since the last request. 8470 func (c *ProjectsOccurrencesGetNotesCall) IfNoneMatch(entityTag string) *ProjectsOccurrencesGetNotesCall { 8471 c.ifNoneMatch_ = entityTag 8472 return c 8473 } 8474 8475 // Context sets the context to be used in this call's Do method. 8476 func (c *ProjectsOccurrencesGetNotesCall) Context(ctx context.Context) *ProjectsOccurrencesGetNotesCall { 8477 c.ctx_ = ctx 8478 return c 8479 } 8480 8481 // Header returns a http.Header that can be modified by the caller to add 8482 // headers to the request. 8483 func (c *ProjectsOccurrencesGetNotesCall) Header() http.Header { 8484 if c.header_ == nil { 8485 c.header_ = make(http.Header) 8486 } 8487 return c.header_ 8488 } 8489 8490 func (c *ProjectsOccurrencesGetNotesCall) doRequest(alt string) (*http.Response, error) { 8491 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8492 if c.ifNoneMatch_ != "" { 8493 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8494 } 8495 var body io.Reader = nil 8496 c.urlParams_.Set("alt", alt) 8497 c.urlParams_.Set("prettyPrint", "false") 8498 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/notes") 8499 urls += "?" + c.urlParams_.Encode() 8500 req, err := http.NewRequest("GET", urls, body) 8501 if err != nil { 8502 return nil, err 8503 } 8504 req.Header = reqHeaders 8505 googleapi.Expand(req.URL, map[string]string{ 8506 "name": c.name, 8507 }) 8508 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8509 } 8510 8511 // Do executes the "containeranalysis.projects.occurrences.getNotes" call. 8512 // Any non-2xx status code is an error. Response headers are in either 8513 // *Note.ServerResponse.Header or (if a response was returned at all) in 8514 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8515 // whether the returned error was because http.StatusNotModified was returned. 8516 func (c *ProjectsOccurrencesGetNotesCall) Do(opts ...googleapi.CallOption) (*Note, error) { 8517 gensupport.SetOptions(c.urlParams_, opts...) 8518 res, err := c.doRequest("json") 8519 if res != nil && res.StatusCode == http.StatusNotModified { 8520 if res.Body != nil { 8521 res.Body.Close() 8522 } 8523 return nil, gensupport.WrapError(&googleapi.Error{ 8524 Code: res.StatusCode, 8525 Header: res.Header, 8526 }) 8527 } 8528 if err != nil { 8529 return nil, err 8530 } 8531 defer googleapi.CloseBody(res) 8532 if err := googleapi.CheckResponse(res); err != nil { 8533 return nil, gensupport.WrapError(err) 8534 } 8535 ret := &Note{ 8536 ServerResponse: googleapi.ServerResponse{ 8537 Header: res.Header, 8538 HTTPStatusCode: res.StatusCode, 8539 }, 8540 } 8541 target := &ret 8542 if err := gensupport.DecodeResponse(target, res); err != nil { 8543 return nil, err 8544 } 8545 return ret, nil 8546 } 8547 8548 type ProjectsOccurrencesGetVulnerabilitySummaryCall struct { 8549 s *Service 8550 parent string 8551 urlParams_ gensupport.URLParams 8552 ifNoneMatch_ string 8553 ctx_ context.Context 8554 header_ http.Header 8555 } 8556 8557 // GetVulnerabilitySummary: Gets a summary of the number and severity of 8558 // occurrences. 8559 // 8560 // - parent: This contains the project Id for example: projects/{project_id}. 8561 func (r *ProjectsOccurrencesService) GetVulnerabilitySummary(parent string) *ProjectsOccurrencesGetVulnerabilitySummaryCall { 8562 c := &ProjectsOccurrencesGetVulnerabilitySummaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8563 c.parent = parent 8564 return c 8565 } 8566 8567 // Filter sets the optional parameter "filter": The filter expression. 8568 func (c *ProjectsOccurrencesGetVulnerabilitySummaryCall) Filter(filter string) *ProjectsOccurrencesGetVulnerabilitySummaryCall { 8569 c.urlParams_.Set("filter", filter) 8570 return c 8571 } 8572 8573 // Fields allows partial responses to be retrieved. See 8574 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8575 // details. 8576 func (c *ProjectsOccurrencesGetVulnerabilitySummaryCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesGetVulnerabilitySummaryCall { 8577 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8578 return c 8579 } 8580 8581 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8582 // object's ETag matches the given value. This is useful for getting updates 8583 // only after the object has changed since the last request. 8584 func (c *ProjectsOccurrencesGetVulnerabilitySummaryCall) IfNoneMatch(entityTag string) *ProjectsOccurrencesGetVulnerabilitySummaryCall { 8585 c.ifNoneMatch_ = entityTag 8586 return c 8587 } 8588 8589 // Context sets the context to be used in this call's Do method. 8590 func (c *ProjectsOccurrencesGetVulnerabilitySummaryCall) Context(ctx context.Context) *ProjectsOccurrencesGetVulnerabilitySummaryCall { 8591 c.ctx_ = ctx 8592 return c 8593 } 8594 8595 // Header returns a http.Header that can be modified by the caller to add 8596 // headers to the request. 8597 func (c *ProjectsOccurrencesGetVulnerabilitySummaryCall) Header() http.Header { 8598 if c.header_ == nil { 8599 c.header_ = make(http.Header) 8600 } 8601 return c.header_ 8602 } 8603 8604 func (c *ProjectsOccurrencesGetVulnerabilitySummaryCall) doRequest(alt string) (*http.Response, error) { 8605 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8606 if c.ifNoneMatch_ != "" { 8607 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8608 } 8609 var body io.Reader = nil 8610 c.urlParams_.Set("alt", alt) 8611 c.urlParams_.Set("prettyPrint", "false") 8612 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/occurrences:vulnerabilitySummary") 8613 urls += "?" + c.urlParams_.Encode() 8614 req, err := http.NewRequest("GET", urls, body) 8615 if err != nil { 8616 return nil, err 8617 } 8618 req.Header = reqHeaders 8619 googleapi.Expand(req.URL, map[string]string{ 8620 "parent": c.parent, 8621 }) 8622 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8623 } 8624 8625 // Do executes the "containeranalysis.projects.occurrences.getVulnerabilitySummary" call. 8626 // Any non-2xx status code is an error. Response headers are in either 8627 // *GetVulnzOccurrencesSummaryResponse.ServerResponse.Header or (if a response 8628 // was returned at all) in error.(*googleapi.Error).Header. Use 8629 // googleapi.IsNotModified to check whether the returned error was because 8630 // http.StatusNotModified was returned. 8631 func (c *ProjectsOccurrencesGetVulnerabilitySummaryCall) Do(opts ...googleapi.CallOption) (*GetVulnzOccurrencesSummaryResponse, error) { 8632 gensupport.SetOptions(c.urlParams_, opts...) 8633 res, err := c.doRequest("json") 8634 if res != nil && res.StatusCode == http.StatusNotModified { 8635 if res.Body != nil { 8636 res.Body.Close() 8637 } 8638 return nil, gensupport.WrapError(&googleapi.Error{ 8639 Code: res.StatusCode, 8640 Header: res.Header, 8641 }) 8642 } 8643 if err != nil { 8644 return nil, err 8645 } 8646 defer googleapi.CloseBody(res) 8647 if err := googleapi.CheckResponse(res); err != nil { 8648 return nil, gensupport.WrapError(err) 8649 } 8650 ret := &GetVulnzOccurrencesSummaryResponse{ 8651 ServerResponse: googleapi.ServerResponse{ 8652 Header: res.Header, 8653 HTTPStatusCode: res.StatusCode, 8654 }, 8655 } 8656 target := &ret 8657 if err := gensupport.DecodeResponse(target, res); err != nil { 8658 return nil, err 8659 } 8660 return ret, nil 8661 } 8662 8663 type ProjectsOccurrencesListCall struct { 8664 s *Service 8665 parent string 8666 urlParams_ gensupport.URLParams 8667 ifNoneMatch_ string 8668 ctx_ context.Context 8669 header_ http.Header 8670 } 8671 8672 // List: Lists active `Occurrences` for a given project matching the filters. 8673 // 8674 // - parent: This contains the project Id for example: projects/{project_id}. 8675 func (r *ProjectsOccurrencesService) List(parent string) *ProjectsOccurrencesListCall { 8676 c := &ProjectsOccurrencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8677 c.parent = parent 8678 return c 8679 } 8680 8681 // Filter sets the optional parameter "filter": The filter expression. 8682 func (c *ProjectsOccurrencesListCall) Filter(filter string) *ProjectsOccurrencesListCall { 8683 c.urlParams_.Set("filter", filter) 8684 return c 8685 } 8686 8687 // Kind sets the optional parameter "kind": The kind of occurrences to filter 8688 // on. 8689 // 8690 // Possible values: 8691 // 8692 // "KIND_UNSPECIFIED" - Unknown 8693 // "PACKAGE_VULNERABILITY" - The note and occurrence represent a package 8694 // 8695 // vulnerability. 8696 // 8697 // "BUILD_DETAILS" - The note and occurrence assert build provenance. 8698 // "IMAGE_BASIS" - This represents an image basis relationship. 8699 // "PACKAGE_MANAGER" - This represents a package installed via a package 8700 // 8701 // manager. 8702 // 8703 // "DEPLOYABLE" - The note and occurrence track deployment events. 8704 // "DISCOVERY" - The note and occurrence track the initial discovery status 8705 // 8706 // of a resource. 8707 // 8708 // "ATTESTATION_AUTHORITY" - This represents a logical "role" that can attest 8709 // 8710 // to artifacts. 8711 // 8712 // "UPGRADE" - This represents an available software upgrade. 8713 // "COMPLIANCE" - This represents a compliance check that can be applied to a 8714 // 8715 // resource. 8716 // 8717 // "SBOM" - This represents a software bill of materials. 8718 // "SPDX_PACKAGE" - This represents an SPDX Package. 8719 // "SPDX_FILE" - This represents an SPDX File. 8720 // "SPDX_RELATIONSHIP" - This represents an SPDX Relationship. 8721 // "DSSE_ATTESTATION" - This represents a DSSE attestation Note 8722 // "VULNERABILITY_ASSESSMENT" - This represents a Vulnerability Assessment. 8723 // "SBOM_REFERENCE" - This represents a reference to an SBOM. 8724 func (c *ProjectsOccurrencesListCall) Kind(kind string) *ProjectsOccurrencesListCall { 8725 c.urlParams_.Set("kind", kind) 8726 return c 8727 } 8728 8729 // Name sets the optional parameter "name": The name field contains the project 8730 // Id. For example: "projects/{project_id} @Deprecated 8731 func (c *ProjectsOccurrencesListCall) Name(name string) *ProjectsOccurrencesListCall { 8732 c.urlParams_.Set("name", name) 8733 return c 8734 } 8735 8736 // PageSize sets the optional parameter "pageSize": Number of occurrences to 8737 // return in the list. 8738 func (c *ProjectsOccurrencesListCall) PageSize(pageSize int64) *ProjectsOccurrencesListCall { 8739 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8740 return c 8741 } 8742 8743 // PageToken sets the optional parameter "pageToken": Token to provide to skip 8744 // to a particular spot in the list. 8745 func (c *ProjectsOccurrencesListCall) PageToken(pageToken string) *ProjectsOccurrencesListCall { 8746 c.urlParams_.Set("pageToken", pageToken) 8747 return c 8748 } 8749 8750 // Fields allows partial responses to be retrieved. See 8751 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8752 // details. 8753 func (c *ProjectsOccurrencesListCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesListCall { 8754 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8755 return c 8756 } 8757 8758 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8759 // object's ETag matches the given value. This is useful for getting updates 8760 // only after the object has changed since the last request. 8761 func (c *ProjectsOccurrencesListCall) IfNoneMatch(entityTag string) *ProjectsOccurrencesListCall { 8762 c.ifNoneMatch_ = entityTag 8763 return c 8764 } 8765 8766 // Context sets the context to be used in this call's Do method. 8767 func (c *ProjectsOccurrencesListCall) Context(ctx context.Context) *ProjectsOccurrencesListCall { 8768 c.ctx_ = ctx 8769 return c 8770 } 8771 8772 // Header returns a http.Header that can be modified by the caller to add 8773 // headers to the request. 8774 func (c *ProjectsOccurrencesListCall) Header() http.Header { 8775 if c.header_ == nil { 8776 c.header_ = make(http.Header) 8777 } 8778 return c.header_ 8779 } 8780 8781 func (c *ProjectsOccurrencesListCall) doRequest(alt string) (*http.Response, error) { 8782 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8783 if c.ifNoneMatch_ != "" { 8784 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8785 } 8786 var body io.Reader = nil 8787 c.urlParams_.Set("alt", alt) 8788 c.urlParams_.Set("prettyPrint", "false") 8789 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/occurrences") 8790 urls += "?" + c.urlParams_.Encode() 8791 req, err := http.NewRequest("GET", urls, body) 8792 if err != nil { 8793 return nil, err 8794 } 8795 req.Header = reqHeaders 8796 googleapi.Expand(req.URL, map[string]string{ 8797 "parent": c.parent, 8798 }) 8799 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8800 } 8801 8802 // Do executes the "containeranalysis.projects.occurrences.list" call. 8803 // Any non-2xx status code is an error. Response headers are in either 8804 // *ListOccurrencesResponse.ServerResponse.Header or (if a response was 8805 // returned at all) in error.(*googleapi.Error).Header. Use 8806 // googleapi.IsNotModified to check whether the returned error was because 8807 // http.StatusNotModified was returned. 8808 func (c *ProjectsOccurrencesListCall) Do(opts ...googleapi.CallOption) (*ListOccurrencesResponse, error) { 8809 gensupport.SetOptions(c.urlParams_, opts...) 8810 res, err := c.doRequest("json") 8811 if res != nil && res.StatusCode == http.StatusNotModified { 8812 if res.Body != nil { 8813 res.Body.Close() 8814 } 8815 return nil, gensupport.WrapError(&googleapi.Error{ 8816 Code: res.StatusCode, 8817 Header: res.Header, 8818 }) 8819 } 8820 if err != nil { 8821 return nil, err 8822 } 8823 defer googleapi.CloseBody(res) 8824 if err := googleapi.CheckResponse(res); err != nil { 8825 return nil, gensupport.WrapError(err) 8826 } 8827 ret := &ListOccurrencesResponse{ 8828 ServerResponse: googleapi.ServerResponse{ 8829 Header: res.Header, 8830 HTTPStatusCode: res.StatusCode, 8831 }, 8832 } 8833 target := &ret 8834 if err := gensupport.DecodeResponse(target, res); err != nil { 8835 return nil, err 8836 } 8837 return ret, nil 8838 } 8839 8840 // Pages invokes f for each page of results. 8841 // A non-nil error returned from f will halt the iteration. 8842 // The provided context supersedes any context provided to the Context method. 8843 func (c *ProjectsOccurrencesListCall) Pages(ctx context.Context, f func(*ListOccurrencesResponse) error) error { 8844 c.ctx_ = ctx 8845 defer c.PageToken(c.urlParams_.Get("pageToken")) 8846 for { 8847 x, err := c.Do() 8848 if err != nil { 8849 return err 8850 } 8851 if err := f(x); err != nil { 8852 return err 8853 } 8854 if x.NextPageToken == "" { 8855 return nil 8856 } 8857 c.PageToken(x.NextPageToken) 8858 } 8859 } 8860 8861 type ProjectsOccurrencesPatchCall struct { 8862 s *Service 8863 name string 8864 occurrence *Occurrence 8865 urlParams_ gensupport.URLParams 8866 ctx_ context.Context 8867 header_ http.Header 8868 } 8869 8870 // Patch: Updates an existing occurrence. 8871 // 8872 // - name: The name of the occurrence. Should be of the form 8873 // "projects/{project_id}/occurrences/{OCCURRENCE_ID}". 8874 func (r *ProjectsOccurrencesService) Patch(name string, occurrence *Occurrence) *ProjectsOccurrencesPatchCall { 8875 c := &ProjectsOccurrencesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8876 c.name = name 8877 c.occurrence = occurrence 8878 return c 8879 } 8880 8881 // UpdateMask sets the optional parameter "updateMask": The fields to update. 8882 func (c *ProjectsOccurrencesPatchCall) UpdateMask(updateMask string) *ProjectsOccurrencesPatchCall { 8883 c.urlParams_.Set("updateMask", updateMask) 8884 return c 8885 } 8886 8887 // Fields allows partial responses to be retrieved. See 8888 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8889 // details. 8890 func (c *ProjectsOccurrencesPatchCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesPatchCall { 8891 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8892 return c 8893 } 8894 8895 // Context sets the context to be used in this call's Do method. 8896 func (c *ProjectsOccurrencesPatchCall) Context(ctx context.Context) *ProjectsOccurrencesPatchCall { 8897 c.ctx_ = ctx 8898 return c 8899 } 8900 8901 // Header returns a http.Header that can be modified by the caller to add 8902 // headers to the request. 8903 func (c *ProjectsOccurrencesPatchCall) Header() http.Header { 8904 if c.header_ == nil { 8905 c.header_ = make(http.Header) 8906 } 8907 return c.header_ 8908 } 8909 8910 func (c *ProjectsOccurrencesPatchCall) doRequest(alt string) (*http.Response, error) { 8911 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8912 var body io.Reader = nil 8913 body, err := googleapi.WithoutDataWrapper.JSONReader(c.occurrence) 8914 if err != nil { 8915 return nil, err 8916 } 8917 c.urlParams_.Set("alt", alt) 8918 c.urlParams_.Set("prettyPrint", "false") 8919 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 8920 urls += "?" + c.urlParams_.Encode() 8921 req, err := http.NewRequest("PATCH", urls, body) 8922 if err != nil { 8923 return nil, err 8924 } 8925 req.Header = reqHeaders 8926 googleapi.Expand(req.URL, map[string]string{ 8927 "name": c.name, 8928 }) 8929 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8930 } 8931 8932 // Do executes the "containeranalysis.projects.occurrences.patch" call. 8933 // Any non-2xx status code is an error. Response headers are in either 8934 // *Occurrence.ServerResponse.Header or (if a response was returned at all) in 8935 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8936 // whether the returned error was because http.StatusNotModified was returned. 8937 func (c *ProjectsOccurrencesPatchCall) Do(opts ...googleapi.CallOption) (*Occurrence, error) { 8938 gensupport.SetOptions(c.urlParams_, opts...) 8939 res, err := c.doRequest("json") 8940 if res != nil && res.StatusCode == http.StatusNotModified { 8941 if res.Body != nil { 8942 res.Body.Close() 8943 } 8944 return nil, gensupport.WrapError(&googleapi.Error{ 8945 Code: res.StatusCode, 8946 Header: res.Header, 8947 }) 8948 } 8949 if err != nil { 8950 return nil, err 8951 } 8952 defer googleapi.CloseBody(res) 8953 if err := googleapi.CheckResponse(res); err != nil { 8954 return nil, gensupport.WrapError(err) 8955 } 8956 ret := &Occurrence{ 8957 ServerResponse: googleapi.ServerResponse{ 8958 Header: res.Header, 8959 HTTPStatusCode: res.StatusCode, 8960 }, 8961 } 8962 target := &ret 8963 if err := gensupport.DecodeResponse(target, res); err != nil { 8964 return nil, err 8965 } 8966 return ret, nil 8967 } 8968 8969 type ProjectsOccurrencesSetIamPolicyCall struct { 8970 s *Service 8971 resource string 8972 setiampolicyrequest *SetIamPolicyRequest 8973 urlParams_ gensupport.URLParams 8974 ctx_ context.Context 8975 header_ http.Header 8976 } 8977 8978 // SetIamPolicy: Sets the access control policy on the specified `Note` or 8979 // `Occurrence`. Requires `containeranalysis.notes.setIamPolicy` or 8980 // `containeranalysis.occurrences.setIamPolicy` permission if the resource is a 8981 // `Note` or an `Occurrence`, respectively. Attempting to call this method 8982 // without these permissions will result in a ` `PERMISSION_DENIED` error. 8983 // Attempting to call this method on a non-existent resource will result in a 8984 // `NOT_FOUND` error if the user has `containeranalysis.notes.list` permission 8985 // on a `Note` or `containeranalysis.occurrences.list` on an `Occurrence`, or a 8986 // `PERMISSION_DENIED` error otherwise. The resource takes the following 8987 // formats: `projects/{projectid}/occurrences/{occurrenceid}` for occurrences 8988 // and projects/{projectid}/notes/{noteid} for notes 8989 // 8990 // - resource: REQUIRED: The resource for which the policy is being specified. 8991 // See Resource names (https://cloud.google.com/apis/design/resource_names) 8992 // for the appropriate value for this field. 8993 func (r *ProjectsOccurrencesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsOccurrencesSetIamPolicyCall { 8994 c := &ProjectsOccurrencesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8995 c.resource = resource 8996 c.setiampolicyrequest = setiampolicyrequest 8997 return c 8998 } 8999 9000 // Fields allows partial responses to be retrieved. See 9001 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9002 // details. 9003 func (c *ProjectsOccurrencesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesSetIamPolicyCall { 9004 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9005 return c 9006 } 9007 9008 // Context sets the context to be used in this call's Do method. 9009 func (c *ProjectsOccurrencesSetIamPolicyCall) Context(ctx context.Context) *ProjectsOccurrencesSetIamPolicyCall { 9010 c.ctx_ = ctx 9011 return c 9012 } 9013 9014 // Header returns a http.Header that can be modified by the caller to add 9015 // headers to the request. 9016 func (c *ProjectsOccurrencesSetIamPolicyCall) Header() http.Header { 9017 if c.header_ == nil { 9018 c.header_ = make(http.Header) 9019 } 9020 return c.header_ 9021 } 9022 9023 func (c *ProjectsOccurrencesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 9024 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9025 var body io.Reader = nil 9026 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 9027 if err != nil { 9028 return nil, err 9029 } 9030 c.urlParams_.Set("alt", alt) 9031 c.urlParams_.Set("prettyPrint", "false") 9032 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:setIamPolicy") 9033 urls += "?" + c.urlParams_.Encode() 9034 req, err := http.NewRequest("POST", urls, body) 9035 if err != nil { 9036 return nil, err 9037 } 9038 req.Header = reqHeaders 9039 googleapi.Expand(req.URL, map[string]string{ 9040 "resource": c.resource, 9041 }) 9042 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9043 } 9044 9045 // Do executes the "containeranalysis.projects.occurrences.setIamPolicy" call. 9046 // Any non-2xx status code is an error. Response headers are in either 9047 // *Policy.ServerResponse.Header or (if a response was returned at all) in 9048 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9049 // whether the returned error was because http.StatusNotModified was returned. 9050 func (c *ProjectsOccurrencesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 9051 gensupport.SetOptions(c.urlParams_, opts...) 9052 res, err := c.doRequest("json") 9053 if res != nil && res.StatusCode == http.StatusNotModified { 9054 if res.Body != nil { 9055 res.Body.Close() 9056 } 9057 return nil, gensupport.WrapError(&googleapi.Error{ 9058 Code: res.StatusCode, 9059 Header: res.Header, 9060 }) 9061 } 9062 if err != nil { 9063 return nil, err 9064 } 9065 defer googleapi.CloseBody(res) 9066 if err := googleapi.CheckResponse(res); err != nil { 9067 return nil, gensupport.WrapError(err) 9068 } 9069 ret := &Policy{ 9070 ServerResponse: googleapi.ServerResponse{ 9071 Header: res.Header, 9072 HTTPStatusCode: res.StatusCode, 9073 }, 9074 } 9075 target := &ret 9076 if err := gensupport.DecodeResponse(target, res); err != nil { 9077 return nil, err 9078 } 9079 return ret, nil 9080 } 9081 9082 type ProjectsOccurrencesTestIamPermissionsCall struct { 9083 s *Service 9084 resource string 9085 testiampermissionsrequest *TestIamPermissionsRequest 9086 urlParams_ gensupport.URLParams 9087 ctx_ context.Context 9088 header_ http.Header 9089 } 9090 9091 // TestIamPermissions: Returns the permissions that a caller has on the 9092 // specified note or occurrence resource. Requires list permission on the 9093 // project (for example, "storage.objects.list" on the containing bucket for 9094 // testing permission of an object). Attempting to call this method on a 9095 // non-existent resource will result in a `NOT_FOUND` error if the user has 9096 // list permission on the project, or a `PERMISSION_DENIED` error otherwise. 9097 // The resource takes the following formats: 9098 // `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for `Occurrences` and 9099 // `projects/{PROJECT_ID}/notes/{NOTE_ID}` for `Notes` 9100 // 9101 // - resource: REQUIRED: The resource for which the policy detail is being 9102 // requested. See Resource names 9103 // (https://cloud.google.com/apis/design/resource_names) for the appropriate 9104 // value for this field. 9105 func (r *ProjectsOccurrencesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsOccurrencesTestIamPermissionsCall { 9106 c := &ProjectsOccurrencesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9107 c.resource = resource 9108 c.testiampermissionsrequest = testiampermissionsrequest 9109 return c 9110 } 9111 9112 // Fields allows partial responses to be retrieved. See 9113 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9114 // details. 9115 func (c *ProjectsOccurrencesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsOccurrencesTestIamPermissionsCall { 9116 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9117 return c 9118 } 9119 9120 // Context sets the context to be used in this call's Do method. 9121 func (c *ProjectsOccurrencesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsOccurrencesTestIamPermissionsCall { 9122 c.ctx_ = ctx 9123 return c 9124 } 9125 9126 // Header returns a http.Header that can be modified by the caller to add 9127 // headers to the request. 9128 func (c *ProjectsOccurrencesTestIamPermissionsCall) Header() http.Header { 9129 if c.header_ == nil { 9130 c.header_ = make(http.Header) 9131 } 9132 return c.header_ 9133 } 9134 9135 func (c *ProjectsOccurrencesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 9136 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9137 var body io.Reader = nil 9138 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 9139 if err != nil { 9140 return nil, err 9141 } 9142 c.urlParams_.Set("alt", alt) 9143 c.urlParams_.Set("prettyPrint", "false") 9144 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:testIamPermissions") 9145 urls += "?" + c.urlParams_.Encode() 9146 req, err := http.NewRequest("POST", urls, body) 9147 if err != nil { 9148 return nil, err 9149 } 9150 req.Header = reqHeaders 9151 googleapi.Expand(req.URL, map[string]string{ 9152 "resource": c.resource, 9153 }) 9154 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9155 } 9156 9157 // Do executes the "containeranalysis.projects.occurrences.testIamPermissions" call. 9158 // Any non-2xx status code is an error. Response headers are in either 9159 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was 9160 // returned at all) in error.(*googleapi.Error).Header. Use 9161 // googleapi.IsNotModified to check whether the returned error was because 9162 // http.StatusNotModified was returned. 9163 func (c *ProjectsOccurrencesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 9164 gensupport.SetOptions(c.urlParams_, opts...) 9165 res, err := c.doRequest("json") 9166 if res != nil && res.StatusCode == http.StatusNotModified { 9167 if res.Body != nil { 9168 res.Body.Close() 9169 } 9170 return nil, gensupport.WrapError(&googleapi.Error{ 9171 Code: res.StatusCode, 9172 Header: res.Header, 9173 }) 9174 } 9175 if err != nil { 9176 return nil, err 9177 } 9178 defer googleapi.CloseBody(res) 9179 if err := googleapi.CheckResponse(res); err != nil { 9180 return nil, gensupport.WrapError(err) 9181 } 9182 ret := &TestIamPermissionsResponse{ 9183 ServerResponse: googleapi.ServerResponse{ 9184 Header: res.Header, 9185 HTTPStatusCode: res.StatusCode, 9186 }, 9187 } 9188 target := &ret 9189 if err := gensupport.DecodeResponse(target, res); err != nil { 9190 return nil, err 9191 } 9192 return ret, nil 9193 } 9194 9195 type ProjectsOperationsCreateCall struct { 9196 s *Service 9197 parent string 9198 createoperationrequest *CreateOperationRequest 9199 urlParams_ gensupport.URLParams 9200 ctx_ context.Context 9201 header_ http.Header 9202 } 9203 9204 // Create: Creates a new `Operation`. 9205 // 9206 // - parent: The project Id that this operation should be created under. 9207 func (r *ProjectsOperationsService) Create(parent string, createoperationrequest *CreateOperationRequest) *ProjectsOperationsCreateCall { 9208 c := &ProjectsOperationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9209 c.parent = parent 9210 c.createoperationrequest = createoperationrequest 9211 return c 9212 } 9213 9214 // Fields allows partial responses to be retrieved. See 9215 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9216 // details. 9217 func (c *ProjectsOperationsCreateCall) Fields(s ...googleapi.Field) *ProjectsOperationsCreateCall { 9218 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9219 return c 9220 } 9221 9222 // Context sets the context to be used in this call's Do method. 9223 func (c *ProjectsOperationsCreateCall) Context(ctx context.Context) *ProjectsOperationsCreateCall { 9224 c.ctx_ = ctx 9225 return c 9226 } 9227 9228 // Header returns a http.Header that can be modified by the caller to add 9229 // headers to the request. 9230 func (c *ProjectsOperationsCreateCall) Header() http.Header { 9231 if c.header_ == nil { 9232 c.header_ = make(http.Header) 9233 } 9234 return c.header_ 9235 } 9236 9237 func (c *ProjectsOperationsCreateCall) doRequest(alt string) (*http.Response, error) { 9238 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9239 var body io.Reader = nil 9240 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createoperationrequest) 9241 if err != nil { 9242 return nil, err 9243 } 9244 c.urlParams_.Set("alt", alt) 9245 c.urlParams_.Set("prettyPrint", "false") 9246 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/operations") 9247 urls += "?" + c.urlParams_.Encode() 9248 req, err := http.NewRequest("POST", urls, body) 9249 if err != nil { 9250 return nil, err 9251 } 9252 req.Header = reqHeaders 9253 googleapi.Expand(req.URL, map[string]string{ 9254 "parent": c.parent, 9255 }) 9256 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9257 } 9258 9259 // Do executes the "containeranalysis.projects.operations.create" call. 9260 // Any non-2xx status code is an error. Response headers are in either 9261 // *Operation.ServerResponse.Header or (if a response was returned at all) in 9262 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9263 // whether the returned error was because http.StatusNotModified was returned. 9264 func (c *ProjectsOperationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9265 gensupport.SetOptions(c.urlParams_, opts...) 9266 res, err := c.doRequest("json") 9267 if res != nil && res.StatusCode == http.StatusNotModified { 9268 if res.Body != nil { 9269 res.Body.Close() 9270 } 9271 return nil, gensupport.WrapError(&googleapi.Error{ 9272 Code: res.StatusCode, 9273 Header: res.Header, 9274 }) 9275 } 9276 if err != nil { 9277 return nil, err 9278 } 9279 defer googleapi.CloseBody(res) 9280 if err := googleapi.CheckResponse(res); err != nil { 9281 return nil, gensupport.WrapError(err) 9282 } 9283 ret := &Operation{ 9284 ServerResponse: googleapi.ServerResponse{ 9285 Header: res.Header, 9286 HTTPStatusCode: res.StatusCode, 9287 }, 9288 } 9289 target := &ret 9290 if err := gensupport.DecodeResponse(target, res); err != nil { 9291 return nil, err 9292 } 9293 return ret, nil 9294 } 9295 9296 type ProjectsOperationsPatchCall struct { 9297 s *Service 9298 name string 9299 updateoperationrequest *UpdateOperationRequest 9300 urlParams_ gensupport.URLParams 9301 ctx_ context.Context 9302 header_ http.Header 9303 } 9304 9305 // Patch: Updates an existing operation returns an error if operation does not 9306 // exist. The only valid operations are to update mark the done bit change the 9307 // result. 9308 // 9309 // - name: The name of the Operation. Should be of the form 9310 // "projects/{provider_id}/operations/{operation_id}". 9311 func (r *ProjectsOperationsService) Patch(name string, updateoperationrequest *UpdateOperationRequest) *ProjectsOperationsPatchCall { 9312 c := &ProjectsOperationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9313 c.name = name 9314 c.updateoperationrequest = updateoperationrequest 9315 return c 9316 } 9317 9318 // Fields allows partial responses to be retrieved. See 9319 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9320 // details. 9321 func (c *ProjectsOperationsPatchCall) Fields(s ...googleapi.Field) *ProjectsOperationsPatchCall { 9322 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9323 return c 9324 } 9325 9326 // Context sets the context to be used in this call's Do method. 9327 func (c *ProjectsOperationsPatchCall) Context(ctx context.Context) *ProjectsOperationsPatchCall { 9328 c.ctx_ = ctx 9329 return c 9330 } 9331 9332 // Header returns a http.Header that can be modified by the caller to add 9333 // headers to the request. 9334 func (c *ProjectsOperationsPatchCall) Header() http.Header { 9335 if c.header_ == nil { 9336 c.header_ = make(http.Header) 9337 } 9338 return c.header_ 9339 } 9340 9341 func (c *ProjectsOperationsPatchCall) doRequest(alt string) (*http.Response, error) { 9342 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9343 var body io.Reader = nil 9344 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateoperationrequest) 9345 if err != nil { 9346 return nil, err 9347 } 9348 c.urlParams_.Set("alt", alt) 9349 c.urlParams_.Set("prettyPrint", "false") 9350 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 9351 urls += "?" + c.urlParams_.Encode() 9352 req, err := http.NewRequest("PATCH", urls, body) 9353 if err != nil { 9354 return nil, err 9355 } 9356 req.Header = reqHeaders 9357 googleapi.Expand(req.URL, map[string]string{ 9358 "name": c.name, 9359 }) 9360 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9361 } 9362 9363 // Do executes the "containeranalysis.projects.operations.patch" call. 9364 // Any non-2xx status code is an error. Response headers are in either 9365 // *Operation.ServerResponse.Header or (if a response was returned at all) in 9366 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9367 // whether the returned error was because http.StatusNotModified was returned. 9368 func (c *ProjectsOperationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9369 gensupport.SetOptions(c.urlParams_, opts...) 9370 res, err := c.doRequest("json") 9371 if res != nil && res.StatusCode == http.StatusNotModified { 9372 if res.Body != nil { 9373 res.Body.Close() 9374 } 9375 return nil, gensupport.WrapError(&googleapi.Error{ 9376 Code: res.StatusCode, 9377 Header: res.Header, 9378 }) 9379 } 9380 if err != nil { 9381 return nil, err 9382 } 9383 defer googleapi.CloseBody(res) 9384 if err := googleapi.CheckResponse(res); err != nil { 9385 return nil, gensupport.WrapError(err) 9386 } 9387 ret := &Operation{ 9388 ServerResponse: googleapi.ServerResponse{ 9389 Header: res.Header, 9390 HTTPStatusCode: res.StatusCode, 9391 }, 9392 } 9393 target := &ret 9394 if err := gensupport.DecodeResponse(target, res); err != nil { 9395 return nil, err 9396 } 9397 return ret, nil 9398 } 9399 9400 type ProjectsScanConfigsGetCall struct { 9401 s *Service 9402 name string 9403 urlParams_ gensupport.URLParams 9404 ifNoneMatch_ string 9405 ctx_ context.Context 9406 header_ http.Header 9407 } 9408 9409 // Get: Gets a specific scan configuration for a project. 9410 // 9411 // - name: The name of the ScanConfig in the form 9412 // projects/{project_id}/scanConfigs/{scan_config_id}. 9413 func (r *ProjectsScanConfigsService) Get(name string) *ProjectsScanConfigsGetCall { 9414 c := &ProjectsScanConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9415 c.name = name 9416 return c 9417 } 9418 9419 // Fields allows partial responses to be retrieved. See 9420 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9421 // details. 9422 func (c *ProjectsScanConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsGetCall { 9423 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9424 return c 9425 } 9426 9427 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9428 // object's ETag matches the given value. This is useful for getting updates 9429 // only after the object has changed since the last request. 9430 func (c *ProjectsScanConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsScanConfigsGetCall { 9431 c.ifNoneMatch_ = entityTag 9432 return c 9433 } 9434 9435 // Context sets the context to be used in this call's Do method. 9436 func (c *ProjectsScanConfigsGetCall) Context(ctx context.Context) *ProjectsScanConfigsGetCall { 9437 c.ctx_ = ctx 9438 return c 9439 } 9440 9441 // Header returns a http.Header that can be modified by the caller to add 9442 // headers to the request. 9443 func (c *ProjectsScanConfigsGetCall) Header() http.Header { 9444 if c.header_ == nil { 9445 c.header_ = make(http.Header) 9446 } 9447 return c.header_ 9448 } 9449 9450 func (c *ProjectsScanConfigsGetCall) doRequest(alt string) (*http.Response, error) { 9451 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9452 if c.ifNoneMatch_ != "" { 9453 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9454 } 9455 var body io.Reader = nil 9456 c.urlParams_.Set("alt", alt) 9457 c.urlParams_.Set("prettyPrint", "false") 9458 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 9459 urls += "?" + c.urlParams_.Encode() 9460 req, err := http.NewRequest("GET", urls, body) 9461 if err != nil { 9462 return nil, err 9463 } 9464 req.Header = reqHeaders 9465 googleapi.Expand(req.URL, map[string]string{ 9466 "name": c.name, 9467 }) 9468 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9469 } 9470 9471 // Do executes the "containeranalysis.projects.scanConfigs.get" call. 9472 // Any non-2xx status code is an error. Response headers are in either 9473 // *ScanConfig.ServerResponse.Header or (if a response was returned at all) in 9474 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9475 // whether the returned error was because http.StatusNotModified was returned. 9476 func (c *ProjectsScanConfigsGetCall) Do(opts ...googleapi.CallOption) (*ScanConfig, error) { 9477 gensupport.SetOptions(c.urlParams_, opts...) 9478 res, err := c.doRequest("json") 9479 if res != nil && res.StatusCode == http.StatusNotModified { 9480 if res.Body != nil { 9481 res.Body.Close() 9482 } 9483 return nil, gensupport.WrapError(&googleapi.Error{ 9484 Code: res.StatusCode, 9485 Header: res.Header, 9486 }) 9487 } 9488 if err != nil { 9489 return nil, err 9490 } 9491 defer googleapi.CloseBody(res) 9492 if err := googleapi.CheckResponse(res); err != nil { 9493 return nil, gensupport.WrapError(err) 9494 } 9495 ret := &ScanConfig{ 9496 ServerResponse: googleapi.ServerResponse{ 9497 Header: res.Header, 9498 HTTPStatusCode: res.StatusCode, 9499 }, 9500 } 9501 target := &ret 9502 if err := gensupport.DecodeResponse(target, res); err != nil { 9503 return nil, err 9504 } 9505 return ret, nil 9506 } 9507 9508 type ProjectsScanConfigsListCall struct { 9509 s *Service 9510 parent string 9511 urlParams_ gensupport.URLParams 9512 ifNoneMatch_ string 9513 ctx_ context.Context 9514 header_ http.Header 9515 } 9516 9517 // List: Lists scan configurations for a project. 9518 // 9519 // - parent: This containers the project Id i.e.: projects/{project_id}. 9520 func (r *ProjectsScanConfigsService) List(parent string) *ProjectsScanConfigsListCall { 9521 c := &ProjectsScanConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9522 c.parent = parent 9523 return c 9524 } 9525 9526 // Filter sets the optional parameter "filter": The filter expression. 9527 func (c *ProjectsScanConfigsListCall) Filter(filter string) *ProjectsScanConfigsListCall { 9528 c.urlParams_.Set("filter", filter) 9529 return c 9530 } 9531 9532 // PageSize sets the optional parameter "pageSize": The number of items to 9533 // return. 9534 func (c *ProjectsScanConfigsListCall) PageSize(pageSize int64) *ProjectsScanConfigsListCall { 9535 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9536 return c 9537 } 9538 9539 // PageToken sets the optional parameter "pageToken": The page token to use for 9540 // the next request. 9541 func (c *ProjectsScanConfigsListCall) PageToken(pageToken string) *ProjectsScanConfigsListCall { 9542 c.urlParams_.Set("pageToken", pageToken) 9543 return c 9544 } 9545 9546 // Fields allows partial responses to be retrieved. See 9547 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9548 // details. 9549 func (c *ProjectsScanConfigsListCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsListCall { 9550 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9551 return c 9552 } 9553 9554 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9555 // object's ETag matches the given value. This is useful for getting updates 9556 // only after the object has changed since the last request. 9557 func (c *ProjectsScanConfigsListCall) IfNoneMatch(entityTag string) *ProjectsScanConfigsListCall { 9558 c.ifNoneMatch_ = entityTag 9559 return c 9560 } 9561 9562 // Context sets the context to be used in this call's Do method. 9563 func (c *ProjectsScanConfigsListCall) Context(ctx context.Context) *ProjectsScanConfigsListCall { 9564 c.ctx_ = ctx 9565 return c 9566 } 9567 9568 // Header returns a http.Header that can be modified by the caller to add 9569 // headers to the request. 9570 func (c *ProjectsScanConfigsListCall) Header() http.Header { 9571 if c.header_ == nil { 9572 c.header_ = make(http.Header) 9573 } 9574 return c.header_ 9575 } 9576 9577 func (c *ProjectsScanConfigsListCall) doRequest(alt string) (*http.Response, error) { 9578 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9579 if c.ifNoneMatch_ != "" { 9580 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9581 } 9582 var body io.Reader = nil 9583 c.urlParams_.Set("alt", alt) 9584 c.urlParams_.Set("prettyPrint", "false") 9585 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/scanConfigs") 9586 urls += "?" + c.urlParams_.Encode() 9587 req, err := http.NewRequest("GET", urls, body) 9588 if err != nil { 9589 return nil, err 9590 } 9591 req.Header = reqHeaders 9592 googleapi.Expand(req.URL, map[string]string{ 9593 "parent": c.parent, 9594 }) 9595 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9596 } 9597 9598 // Do executes the "containeranalysis.projects.scanConfigs.list" call. 9599 // Any non-2xx status code is an error. Response headers are in either 9600 // *ListScanConfigsResponse.ServerResponse.Header or (if a response was 9601 // returned at all) in error.(*googleapi.Error).Header. Use 9602 // googleapi.IsNotModified to check whether the returned error was because 9603 // http.StatusNotModified was returned. 9604 func (c *ProjectsScanConfigsListCall) Do(opts ...googleapi.CallOption) (*ListScanConfigsResponse, error) { 9605 gensupport.SetOptions(c.urlParams_, opts...) 9606 res, err := c.doRequest("json") 9607 if res != nil && res.StatusCode == http.StatusNotModified { 9608 if res.Body != nil { 9609 res.Body.Close() 9610 } 9611 return nil, gensupport.WrapError(&googleapi.Error{ 9612 Code: res.StatusCode, 9613 Header: res.Header, 9614 }) 9615 } 9616 if err != nil { 9617 return nil, err 9618 } 9619 defer googleapi.CloseBody(res) 9620 if err := googleapi.CheckResponse(res); err != nil { 9621 return nil, gensupport.WrapError(err) 9622 } 9623 ret := &ListScanConfigsResponse{ 9624 ServerResponse: googleapi.ServerResponse{ 9625 Header: res.Header, 9626 HTTPStatusCode: res.StatusCode, 9627 }, 9628 } 9629 target := &ret 9630 if err := gensupport.DecodeResponse(target, res); err != nil { 9631 return nil, err 9632 } 9633 return ret, nil 9634 } 9635 9636 // Pages invokes f for each page of results. 9637 // A non-nil error returned from f will halt the iteration. 9638 // The provided context supersedes any context provided to the Context method. 9639 func (c *ProjectsScanConfigsListCall) Pages(ctx context.Context, f func(*ListScanConfigsResponse) error) error { 9640 c.ctx_ = ctx 9641 defer c.PageToken(c.urlParams_.Get("pageToken")) 9642 for { 9643 x, err := c.Do() 9644 if err != nil { 9645 return err 9646 } 9647 if err := f(x); err != nil { 9648 return err 9649 } 9650 if x.NextPageToken == "" { 9651 return nil 9652 } 9653 c.PageToken(x.NextPageToken) 9654 } 9655 } 9656 9657 type ProjectsScanConfigsPatchCall struct { 9658 s *Service 9659 name string 9660 scanconfig *ScanConfig 9661 urlParams_ gensupport.URLParams 9662 ctx_ context.Context 9663 header_ http.Header 9664 } 9665 9666 // Patch: Updates the scan configuration to a new value. 9667 // 9668 // - name: The scan config to update of the form 9669 // projects/{project_id}/scanConfigs/{scan_config_id}. 9670 func (r *ProjectsScanConfigsService) Patch(name string, scanconfig *ScanConfig) *ProjectsScanConfigsPatchCall { 9671 c := &ProjectsScanConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9672 c.name = name 9673 c.scanconfig = scanconfig 9674 return c 9675 } 9676 9677 // UpdateMask sets the optional parameter "updateMask": The fields to update. 9678 func (c *ProjectsScanConfigsPatchCall) UpdateMask(updateMask string) *ProjectsScanConfigsPatchCall { 9679 c.urlParams_.Set("updateMask", updateMask) 9680 return c 9681 } 9682 9683 // Fields allows partial responses to be retrieved. See 9684 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9685 // details. 9686 func (c *ProjectsScanConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsScanConfigsPatchCall { 9687 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9688 return c 9689 } 9690 9691 // Context sets the context to be used in this call's Do method. 9692 func (c *ProjectsScanConfigsPatchCall) Context(ctx context.Context) *ProjectsScanConfigsPatchCall { 9693 c.ctx_ = ctx 9694 return c 9695 } 9696 9697 // Header returns a http.Header that can be modified by the caller to add 9698 // headers to the request. 9699 func (c *ProjectsScanConfigsPatchCall) Header() http.Header { 9700 if c.header_ == nil { 9701 c.header_ = make(http.Header) 9702 } 9703 return c.header_ 9704 } 9705 9706 func (c *ProjectsScanConfigsPatchCall) doRequest(alt string) (*http.Response, error) { 9707 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9708 var body io.Reader = nil 9709 body, err := googleapi.WithoutDataWrapper.JSONReader(c.scanconfig) 9710 if err != nil { 9711 return nil, err 9712 } 9713 c.urlParams_.Set("alt", alt) 9714 c.urlParams_.Set("prettyPrint", "false") 9715 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 9716 urls += "?" + c.urlParams_.Encode() 9717 req, err := http.NewRequest("PATCH", urls, body) 9718 if err != nil { 9719 return nil, err 9720 } 9721 req.Header = reqHeaders 9722 googleapi.Expand(req.URL, map[string]string{ 9723 "name": c.name, 9724 }) 9725 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9726 } 9727 9728 // Do executes the "containeranalysis.projects.scanConfigs.patch" call. 9729 // Any non-2xx status code is an error. Response headers are in either 9730 // *ScanConfig.ServerResponse.Header or (if a response was returned at all) in 9731 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9732 // whether the returned error was because http.StatusNotModified was returned. 9733 func (c *ProjectsScanConfigsPatchCall) Do(opts ...googleapi.CallOption) (*ScanConfig, error) { 9734 gensupport.SetOptions(c.urlParams_, opts...) 9735 res, err := c.doRequest("json") 9736 if res != nil && res.StatusCode == http.StatusNotModified { 9737 if res.Body != nil { 9738 res.Body.Close() 9739 } 9740 return nil, gensupport.WrapError(&googleapi.Error{ 9741 Code: res.StatusCode, 9742 Header: res.Header, 9743 }) 9744 } 9745 if err != nil { 9746 return nil, err 9747 } 9748 defer googleapi.CloseBody(res) 9749 if err := googleapi.CheckResponse(res); err != nil { 9750 return nil, gensupport.WrapError(err) 9751 } 9752 ret := &ScanConfig{ 9753 ServerResponse: googleapi.ServerResponse{ 9754 Header: res.Header, 9755 HTTPStatusCode: res.StatusCode, 9756 }, 9757 } 9758 target := &ret 9759 if err := gensupport.DecodeResponse(target, res); err != nil { 9760 return nil, err 9761 } 9762 return ret, nil 9763 } 9764 9765 type ProvidersNotesCreateCall struct { 9766 s *Service 9767 name string 9768 note *Note 9769 urlParams_ gensupport.URLParams 9770 ctx_ context.Context 9771 header_ http.Header 9772 } 9773 9774 // Create: Creates a new `Note`. 9775 // 9776 // - name: The name of the project. Should be of the form 9777 // "providers/{provider_id}". @Deprecated. 9778 func (r *ProvidersNotesService) Create(name string, note *Note) *ProvidersNotesCreateCall { 9779 c := &ProvidersNotesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9780 c.name = name 9781 c.note = note 9782 return c 9783 } 9784 9785 // NoteId sets the optional parameter "noteId": The ID to use for this note. 9786 func (c *ProvidersNotesCreateCall) NoteId(noteId string) *ProvidersNotesCreateCall { 9787 c.urlParams_.Set("noteId", noteId) 9788 return c 9789 } 9790 9791 // Parent sets the optional parameter "parent": This field contains the project 9792 // Id for example: "projects/{project_id} 9793 func (c *ProvidersNotesCreateCall) Parent(parent string) *ProvidersNotesCreateCall { 9794 c.urlParams_.Set("parent", parent) 9795 return c 9796 } 9797 9798 // Fields allows partial responses to be retrieved. See 9799 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9800 // details. 9801 func (c *ProvidersNotesCreateCall) Fields(s ...googleapi.Field) *ProvidersNotesCreateCall { 9802 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9803 return c 9804 } 9805 9806 // Context sets the context to be used in this call's Do method. 9807 func (c *ProvidersNotesCreateCall) Context(ctx context.Context) *ProvidersNotesCreateCall { 9808 c.ctx_ = ctx 9809 return c 9810 } 9811 9812 // Header returns a http.Header that can be modified by the caller to add 9813 // headers to the request. 9814 func (c *ProvidersNotesCreateCall) Header() http.Header { 9815 if c.header_ == nil { 9816 c.header_ = make(http.Header) 9817 } 9818 return c.header_ 9819 } 9820 9821 func (c *ProvidersNotesCreateCall) doRequest(alt string) (*http.Response, error) { 9822 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9823 var body io.Reader = nil 9824 body, err := googleapi.WithoutDataWrapper.JSONReader(c.note) 9825 if err != nil { 9826 return nil, err 9827 } 9828 c.urlParams_.Set("alt", alt) 9829 c.urlParams_.Set("prettyPrint", "false") 9830 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/notes") 9831 urls += "?" + c.urlParams_.Encode() 9832 req, err := http.NewRequest("POST", urls, body) 9833 if err != nil { 9834 return nil, err 9835 } 9836 req.Header = reqHeaders 9837 googleapi.Expand(req.URL, map[string]string{ 9838 "name": c.name, 9839 }) 9840 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9841 } 9842 9843 // Do executes the "containeranalysis.providers.notes.create" call. 9844 // Any non-2xx status code is an error. Response headers are in either 9845 // *Note.ServerResponse.Header or (if a response was returned at all) in 9846 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9847 // whether the returned error was because http.StatusNotModified was returned. 9848 func (c *ProvidersNotesCreateCall) Do(opts ...googleapi.CallOption) (*Note, error) { 9849 gensupport.SetOptions(c.urlParams_, opts...) 9850 res, err := c.doRequest("json") 9851 if res != nil && res.StatusCode == http.StatusNotModified { 9852 if res.Body != nil { 9853 res.Body.Close() 9854 } 9855 return nil, gensupport.WrapError(&googleapi.Error{ 9856 Code: res.StatusCode, 9857 Header: res.Header, 9858 }) 9859 } 9860 if err != nil { 9861 return nil, err 9862 } 9863 defer googleapi.CloseBody(res) 9864 if err := googleapi.CheckResponse(res); err != nil { 9865 return nil, gensupport.WrapError(err) 9866 } 9867 ret := &Note{ 9868 ServerResponse: googleapi.ServerResponse{ 9869 Header: res.Header, 9870 HTTPStatusCode: res.StatusCode, 9871 }, 9872 } 9873 target := &ret 9874 if err := gensupport.DecodeResponse(target, res); err != nil { 9875 return nil, err 9876 } 9877 return ret, nil 9878 } 9879 9880 type ProvidersNotesDeleteCall struct { 9881 s *Service 9882 name string 9883 urlParams_ gensupport.URLParams 9884 ctx_ context.Context 9885 header_ http.Header 9886 } 9887 9888 // Delete: Deletes the given `Note` from the system. 9889 // 9890 // - name: The name of the note in the form of 9891 // "providers/{provider_id}/notes/{NOTE_ID}". 9892 func (r *ProvidersNotesService) Delete(name string) *ProvidersNotesDeleteCall { 9893 c := &ProvidersNotesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9894 c.name = name 9895 return c 9896 } 9897 9898 // Fields allows partial responses to be retrieved. See 9899 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9900 // details. 9901 func (c *ProvidersNotesDeleteCall) Fields(s ...googleapi.Field) *ProvidersNotesDeleteCall { 9902 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9903 return c 9904 } 9905 9906 // Context sets the context to be used in this call's Do method. 9907 func (c *ProvidersNotesDeleteCall) Context(ctx context.Context) *ProvidersNotesDeleteCall { 9908 c.ctx_ = ctx 9909 return c 9910 } 9911 9912 // Header returns a http.Header that can be modified by the caller to add 9913 // headers to the request. 9914 func (c *ProvidersNotesDeleteCall) Header() http.Header { 9915 if c.header_ == nil { 9916 c.header_ = make(http.Header) 9917 } 9918 return c.header_ 9919 } 9920 9921 func (c *ProvidersNotesDeleteCall) doRequest(alt string) (*http.Response, error) { 9922 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9923 var body io.Reader = nil 9924 c.urlParams_.Set("alt", alt) 9925 c.urlParams_.Set("prettyPrint", "false") 9926 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 9927 urls += "?" + c.urlParams_.Encode() 9928 req, err := http.NewRequest("DELETE", urls, body) 9929 if err != nil { 9930 return nil, err 9931 } 9932 req.Header = reqHeaders 9933 googleapi.Expand(req.URL, map[string]string{ 9934 "name": c.name, 9935 }) 9936 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9937 } 9938 9939 // Do executes the "containeranalysis.providers.notes.delete" call. 9940 // Any non-2xx status code is an error. Response headers are in either 9941 // *Empty.ServerResponse.Header or (if a response was returned at all) in 9942 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9943 // whether the returned error was because http.StatusNotModified was returned. 9944 func (c *ProvidersNotesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 9945 gensupport.SetOptions(c.urlParams_, opts...) 9946 res, err := c.doRequest("json") 9947 if res != nil && res.StatusCode == http.StatusNotModified { 9948 if res.Body != nil { 9949 res.Body.Close() 9950 } 9951 return nil, gensupport.WrapError(&googleapi.Error{ 9952 Code: res.StatusCode, 9953 Header: res.Header, 9954 }) 9955 } 9956 if err != nil { 9957 return nil, err 9958 } 9959 defer googleapi.CloseBody(res) 9960 if err := googleapi.CheckResponse(res); err != nil { 9961 return nil, gensupport.WrapError(err) 9962 } 9963 ret := &Empty{ 9964 ServerResponse: googleapi.ServerResponse{ 9965 Header: res.Header, 9966 HTTPStatusCode: res.StatusCode, 9967 }, 9968 } 9969 target := &ret 9970 if err := gensupport.DecodeResponse(target, res); err != nil { 9971 return nil, err 9972 } 9973 return ret, nil 9974 } 9975 9976 type ProvidersNotesGetCall struct { 9977 s *Service 9978 name string 9979 urlParams_ gensupport.URLParams 9980 ifNoneMatch_ string 9981 ctx_ context.Context 9982 header_ http.Header 9983 } 9984 9985 // Get: Returns the requested `Note`. 9986 // 9987 // - name: The name of the note in the form of 9988 // "providers/{provider_id}/notes/{NOTE_ID}". 9989 func (r *ProvidersNotesService) Get(name string) *ProvidersNotesGetCall { 9990 c := &ProvidersNotesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9991 c.name = name 9992 return c 9993 } 9994 9995 // Fields allows partial responses to be retrieved. See 9996 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9997 // details. 9998 func (c *ProvidersNotesGetCall) Fields(s ...googleapi.Field) *ProvidersNotesGetCall { 9999 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10000 return c 10001 } 10002 10003 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10004 // object's ETag matches the given value. This is useful for getting updates 10005 // only after the object has changed since the last request. 10006 func (c *ProvidersNotesGetCall) IfNoneMatch(entityTag string) *ProvidersNotesGetCall { 10007 c.ifNoneMatch_ = entityTag 10008 return c 10009 } 10010 10011 // Context sets the context to be used in this call's Do method. 10012 func (c *ProvidersNotesGetCall) Context(ctx context.Context) *ProvidersNotesGetCall { 10013 c.ctx_ = ctx 10014 return c 10015 } 10016 10017 // Header returns a http.Header that can be modified by the caller to add 10018 // headers to the request. 10019 func (c *ProvidersNotesGetCall) Header() http.Header { 10020 if c.header_ == nil { 10021 c.header_ = make(http.Header) 10022 } 10023 return c.header_ 10024 } 10025 10026 func (c *ProvidersNotesGetCall) doRequest(alt string) (*http.Response, error) { 10027 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10028 if c.ifNoneMatch_ != "" { 10029 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10030 } 10031 var body io.Reader = nil 10032 c.urlParams_.Set("alt", alt) 10033 c.urlParams_.Set("prettyPrint", "false") 10034 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 10035 urls += "?" + c.urlParams_.Encode() 10036 req, err := http.NewRequest("GET", urls, body) 10037 if err != nil { 10038 return nil, err 10039 } 10040 req.Header = reqHeaders 10041 googleapi.Expand(req.URL, map[string]string{ 10042 "name": c.name, 10043 }) 10044 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10045 } 10046 10047 // Do executes the "containeranalysis.providers.notes.get" call. 10048 // Any non-2xx status code is an error. Response headers are in either 10049 // *Note.ServerResponse.Header or (if a response was returned at all) in 10050 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10051 // whether the returned error was because http.StatusNotModified was returned. 10052 func (c *ProvidersNotesGetCall) Do(opts ...googleapi.CallOption) (*Note, error) { 10053 gensupport.SetOptions(c.urlParams_, opts...) 10054 res, err := c.doRequest("json") 10055 if res != nil && res.StatusCode == http.StatusNotModified { 10056 if res.Body != nil { 10057 res.Body.Close() 10058 } 10059 return nil, gensupport.WrapError(&googleapi.Error{ 10060 Code: res.StatusCode, 10061 Header: res.Header, 10062 }) 10063 } 10064 if err != nil { 10065 return nil, err 10066 } 10067 defer googleapi.CloseBody(res) 10068 if err := googleapi.CheckResponse(res); err != nil { 10069 return nil, gensupport.WrapError(err) 10070 } 10071 ret := &Note{ 10072 ServerResponse: googleapi.ServerResponse{ 10073 Header: res.Header, 10074 HTTPStatusCode: res.StatusCode, 10075 }, 10076 } 10077 target := &ret 10078 if err := gensupport.DecodeResponse(target, res); err != nil { 10079 return nil, err 10080 } 10081 return ret, nil 10082 } 10083 10084 type ProvidersNotesGetIamPolicyCall struct { 10085 s *Service 10086 resource string 10087 getiampolicyrequest *GetIamPolicyRequest 10088 urlParams_ gensupport.URLParams 10089 ctx_ context.Context 10090 header_ http.Header 10091 } 10092 10093 // GetIamPolicy: Gets the access control policy for a note or an `Occurrence` 10094 // resource. Requires `containeranalysis.notes.setIamPolicy` or 10095 // `containeranalysis.occurrences.setIamPolicy` permission if the resource is a 10096 // note or occurrence, respectively. Attempting to call this method on a 10097 // resource without the required permission will result in a 10098 // `PERMISSION_DENIED` error. Attempting to call this method on a non-existent 10099 // resource will result in a `NOT_FOUND` error if the user has list permission 10100 // on the project, or a `PERMISSION_DENIED` error otherwise. The resource takes 10101 // the following formats: `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` 10102 // for occurrences and projects/{PROJECT_ID}/notes/{NOTE_ID} for notes 10103 // 10104 // - resource: REQUIRED: The resource for which the policy is being requested. 10105 // See Resource names (https://cloud.google.com/apis/design/resource_names) 10106 // for the appropriate value for this field. 10107 func (r *ProvidersNotesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProvidersNotesGetIamPolicyCall { 10108 c := &ProvidersNotesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10109 c.resource = resource 10110 c.getiampolicyrequest = getiampolicyrequest 10111 return c 10112 } 10113 10114 // Fields allows partial responses to be retrieved. See 10115 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10116 // details. 10117 func (c *ProvidersNotesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProvidersNotesGetIamPolicyCall { 10118 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10119 return c 10120 } 10121 10122 // Context sets the context to be used in this call's Do method. 10123 func (c *ProvidersNotesGetIamPolicyCall) Context(ctx context.Context) *ProvidersNotesGetIamPolicyCall { 10124 c.ctx_ = ctx 10125 return c 10126 } 10127 10128 // Header returns a http.Header that can be modified by the caller to add 10129 // headers to the request. 10130 func (c *ProvidersNotesGetIamPolicyCall) Header() http.Header { 10131 if c.header_ == nil { 10132 c.header_ = make(http.Header) 10133 } 10134 return c.header_ 10135 } 10136 10137 func (c *ProvidersNotesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 10138 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10139 var body io.Reader = nil 10140 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) 10141 if err != nil { 10142 return nil, err 10143 } 10144 c.urlParams_.Set("alt", alt) 10145 c.urlParams_.Set("prettyPrint", "false") 10146 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:getIamPolicy") 10147 urls += "?" + c.urlParams_.Encode() 10148 req, err := http.NewRequest("POST", urls, body) 10149 if err != nil { 10150 return nil, err 10151 } 10152 req.Header = reqHeaders 10153 googleapi.Expand(req.URL, map[string]string{ 10154 "resource": c.resource, 10155 }) 10156 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10157 } 10158 10159 // Do executes the "containeranalysis.providers.notes.getIamPolicy" call. 10160 // Any non-2xx status code is an error. Response headers are in either 10161 // *Policy.ServerResponse.Header or (if a response was returned at all) in 10162 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10163 // whether the returned error was because http.StatusNotModified was returned. 10164 func (c *ProvidersNotesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 10165 gensupport.SetOptions(c.urlParams_, opts...) 10166 res, err := c.doRequest("json") 10167 if res != nil && res.StatusCode == http.StatusNotModified { 10168 if res.Body != nil { 10169 res.Body.Close() 10170 } 10171 return nil, gensupport.WrapError(&googleapi.Error{ 10172 Code: res.StatusCode, 10173 Header: res.Header, 10174 }) 10175 } 10176 if err != nil { 10177 return nil, err 10178 } 10179 defer googleapi.CloseBody(res) 10180 if err := googleapi.CheckResponse(res); err != nil { 10181 return nil, gensupport.WrapError(err) 10182 } 10183 ret := &Policy{ 10184 ServerResponse: googleapi.ServerResponse{ 10185 Header: res.Header, 10186 HTTPStatusCode: res.StatusCode, 10187 }, 10188 } 10189 target := &ret 10190 if err := gensupport.DecodeResponse(target, res); err != nil { 10191 return nil, err 10192 } 10193 return ret, nil 10194 } 10195 10196 type ProvidersNotesListCall struct { 10197 s *Service 10198 name string 10199 urlParams_ gensupport.URLParams 10200 ifNoneMatch_ string 10201 ctx_ context.Context 10202 header_ http.Header 10203 } 10204 10205 // List: Lists all `Notes` for a given project. 10206 // 10207 // - name: The name field will contain the project Id for example: 10208 // "providers/{provider_id} @Deprecated. 10209 func (r *ProvidersNotesService) List(name string) *ProvidersNotesListCall { 10210 c := &ProvidersNotesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10211 c.name = name 10212 return c 10213 } 10214 10215 // Filter sets the optional parameter "filter": The filter expression. 10216 func (c *ProvidersNotesListCall) Filter(filter string) *ProvidersNotesListCall { 10217 c.urlParams_.Set("filter", filter) 10218 return c 10219 } 10220 10221 // PageSize sets the optional parameter "pageSize": Number of notes to return 10222 // in the list. 10223 func (c *ProvidersNotesListCall) PageSize(pageSize int64) *ProvidersNotesListCall { 10224 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10225 return c 10226 } 10227 10228 // PageToken sets the optional parameter "pageToken": Token to provide to skip 10229 // to a particular spot in the list. 10230 func (c *ProvidersNotesListCall) PageToken(pageToken string) *ProvidersNotesListCall { 10231 c.urlParams_.Set("pageToken", pageToken) 10232 return c 10233 } 10234 10235 // Parent sets the optional parameter "parent": This field contains the project 10236 // Id for example: "projects/{PROJECT_ID}". 10237 func (c *ProvidersNotesListCall) Parent(parent string) *ProvidersNotesListCall { 10238 c.urlParams_.Set("parent", parent) 10239 return c 10240 } 10241 10242 // Fields allows partial responses to be retrieved. See 10243 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10244 // details. 10245 func (c *ProvidersNotesListCall) Fields(s ...googleapi.Field) *ProvidersNotesListCall { 10246 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10247 return c 10248 } 10249 10250 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10251 // object's ETag matches the given value. This is useful for getting updates 10252 // only after the object has changed since the last request. 10253 func (c *ProvidersNotesListCall) IfNoneMatch(entityTag string) *ProvidersNotesListCall { 10254 c.ifNoneMatch_ = entityTag 10255 return c 10256 } 10257 10258 // Context sets the context to be used in this call's Do method. 10259 func (c *ProvidersNotesListCall) Context(ctx context.Context) *ProvidersNotesListCall { 10260 c.ctx_ = ctx 10261 return c 10262 } 10263 10264 // Header returns a http.Header that can be modified by the caller to add 10265 // headers to the request. 10266 func (c *ProvidersNotesListCall) Header() http.Header { 10267 if c.header_ == nil { 10268 c.header_ = make(http.Header) 10269 } 10270 return c.header_ 10271 } 10272 10273 func (c *ProvidersNotesListCall) doRequest(alt string) (*http.Response, error) { 10274 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10275 if c.ifNoneMatch_ != "" { 10276 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10277 } 10278 var body io.Reader = nil 10279 c.urlParams_.Set("alt", alt) 10280 c.urlParams_.Set("prettyPrint", "false") 10281 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/notes") 10282 urls += "?" + c.urlParams_.Encode() 10283 req, err := http.NewRequest("GET", urls, body) 10284 if err != nil { 10285 return nil, err 10286 } 10287 req.Header = reqHeaders 10288 googleapi.Expand(req.URL, map[string]string{ 10289 "name": c.name, 10290 }) 10291 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10292 } 10293 10294 // Do executes the "containeranalysis.providers.notes.list" call. 10295 // Any non-2xx status code is an error. Response headers are in either 10296 // *ListNotesResponse.ServerResponse.Header or (if a response was returned at 10297 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10298 // check whether the returned error was because http.StatusNotModified was 10299 // returned. 10300 func (c *ProvidersNotesListCall) Do(opts ...googleapi.CallOption) (*ListNotesResponse, error) { 10301 gensupport.SetOptions(c.urlParams_, opts...) 10302 res, err := c.doRequest("json") 10303 if res != nil && res.StatusCode == http.StatusNotModified { 10304 if res.Body != nil { 10305 res.Body.Close() 10306 } 10307 return nil, gensupport.WrapError(&googleapi.Error{ 10308 Code: res.StatusCode, 10309 Header: res.Header, 10310 }) 10311 } 10312 if err != nil { 10313 return nil, err 10314 } 10315 defer googleapi.CloseBody(res) 10316 if err := googleapi.CheckResponse(res); err != nil { 10317 return nil, gensupport.WrapError(err) 10318 } 10319 ret := &ListNotesResponse{ 10320 ServerResponse: googleapi.ServerResponse{ 10321 Header: res.Header, 10322 HTTPStatusCode: res.StatusCode, 10323 }, 10324 } 10325 target := &ret 10326 if err := gensupport.DecodeResponse(target, res); err != nil { 10327 return nil, err 10328 } 10329 return ret, nil 10330 } 10331 10332 // Pages invokes f for each page of results. 10333 // A non-nil error returned from f will halt the iteration. 10334 // The provided context supersedes any context provided to the Context method. 10335 func (c *ProvidersNotesListCall) Pages(ctx context.Context, f func(*ListNotesResponse) error) error { 10336 c.ctx_ = ctx 10337 defer c.PageToken(c.urlParams_.Get("pageToken")) 10338 for { 10339 x, err := c.Do() 10340 if err != nil { 10341 return err 10342 } 10343 if err := f(x); err != nil { 10344 return err 10345 } 10346 if x.NextPageToken == "" { 10347 return nil 10348 } 10349 c.PageToken(x.NextPageToken) 10350 } 10351 } 10352 10353 type ProvidersNotesPatchCall struct { 10354 s *Service 10355 name string 10356 note *Note 10357 urlParams_ gensupport.URLParams 10358 ctx_ context.Context 10359 header_ http.Header 10360 } 10361 10362 // Patch: Updates an existing `Note`. 10363 // 10364 // - name: The name of the note. Should be of the form 10365 // "projects/{provider_id}/notes/{note_id}". 10366 func (r *ProvidersNotesService) Patch(name string, note *Note) *ProvidersNotesPatchCall { 10367 c := &ProvidersNotesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10368 c.name = name 10369 c.note = note 10370 return c 10371 } 10372 10373 // UpdateMask sets the optional parameter "updateMask": The fields to update. 10374 func (c *ProvidersNotesPatchCall) UpdateMask(updateMask string) *ProvidersNotesPatchCall { 10375 c.urlParams_.Set("updateMask", updateMask) 10376 return c 10377 } 10378 10379 // Fields allows partial responses to be retrieved. See 10380 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10381 // details. 10382 func (c *ProvidersNotesPatchCall) Fields(s ...googleapi.Field) *ProvidersNotesPatchCall { 10383 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10384 return c 10385 } 10386 10387 // Context sets the context to be used in this call's Do method. 10388 func (c *ProvidersNotesPatchCall) Context(ctx context.Context) *ProvidersNotesPatchCall { 10389 c.ctx_ = ctx 10390 return c 10391 } 10392 10393 // Header returns a http.Header that can be modified by the caller to add 10394 // headers to the request. 10395 func (c *ProvidersNotesPatchCall) Header() http.Header { 10396 if c.header_ == nil { 10397 c.header_ = make(http.Header) 10398 } 10399 return c.header_ 10400 } 10401 10402 func (c *ProvidersNotesPatchCall) doRequest(alt string) (*http.Response, error) { 10403 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10404 var body io.Reader = nil 10405 body, err := googleapi.WithoutDataWrapper.JSONReader(c.note) 10406 if err != nil { 10407 return nil, err 10408 } 10409 c.urlParams_.Set("alt", alt) 10410 c.urlParams_.Set("prettyPrint", "false") 10411 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 10412 urls += "?" + c.urlParams_.Encode() 10413 req, err := http.NewRequest("PATCH", urls, body) 10414 if err != nil { 10415 return nil, err 10416 } 10417 req.Header = reqHeaders 10418 googleapi.Expand(req.URL, map[string]string{ 10419 "name": c.name, 10420 }) 10421 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10422 } 10423 10424 // Do executes the "containeranalysis.providers.notes.patch" call. 10425 // Any non-2xx status code is an error. Response headers are in either 10426 // *Note.ServerResponse.Header or (if a response was returned at all) in 10427 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10428 // whether the returned error was because http.StatusNotModified was returned. 10429 func (c *ProvidersNotesPatchCall) Do(opts ...googleapi.CallOption) (*Note, error) { 10430 gensupport.SetOptions(c.urlParams_, opts...) 10431 res, err := c.doRequest("json") 10432 if res != nil && res.StatusCode == http.StatusNotModified { 10433 if res.Body != nil { 10434 res.Body.Close() 10435 } 10436 return nil, gensupport.WrapError(&googleapi.Error{ 10437 Code: res.StatusCode, 10438 Header: res.Header, 10439 }) 10440 } 10441 if err != nil { 10442 return nil, err 10443 } 10444 defer googleapi.CloseBody(res) 10445 if err := googleapi.CheckResponse(res); err != nil { 10446 return nil, gensupport.WrapError(err) 10447 } 10448 ret := &Note{ 10449 ServerResponse: googleapi.ServerResponse{ 10450 Header: res.Header, 10451 HTTPStatusCode: res.StatusCode, 10452 }, 10453 } 10454 target := &ret 10455 if err := gensupport.DecodeResponse(target, res); err != nil { 10456 return nil, err 10457 } 10458 return ret, nil 10459 } 10460 10461 type ProvidersNotesSetIamPolicyCall struct { 10462 s *Service 10463 resource string 10464 setiampolicyrequest *SetIamPolicyRequest 10465 urlParams_ gensupport.URLParams 10466 ctx_ context.Context 10467 header_ http.Header 10468 } 10469 10470 // SetIamPolicy: Sets the access control policy on the specified `Note` or 10471 // `Occurrence`. Requires `containeranalysis.notes.setIamPolicy` or 10472 // `containeranalysis.occurrences.setIamPolicy` permission if the resource is a 10473 // `Note` or an `Occurrence`, respectively. Attempting to call this method 10474 // without these permissions will result in a ` `PERMISSION_DENIED` error. 10475 // Attempting to call this method on a non-existent resource will result in a 10476 // `NOT_FOUND` error if the user has `containeranalysis.notes.list` permission 10477 // on a `Note` or `containeranalysis.occurrences.list` on an `Occurrence`, or a 10478 // `PERMISSION_DENIED` error otherwise. The resource takes the following 10479 // formats: `projects/{projectid}/occurrences/{occurrenceid}` for occurrences 10480 // and projects/{projectid}/notes/{noteid} for notes 10481 // 10482 // - resource: REQUIRED: The resource for which the policy is being specified. 10483 // See Resource names (https://cloud.google.com/apis/design/resource_names) 10484 // for the appropriate value for this field. 10485 func (r *ProvidersNotesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProvidersNotesSetIamPolicyCall { 10486 c := &ProvidersNotesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10487 c.resource = resource 10488 c.setiampolicyrequest = setiampolicyrequest 10489 return c 10490 } 10491 10492 // Fields allows partial responses to be retrieved. See 10493 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10494 // details. 10495 func (c *ProvidersNotesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProvidersNotesSetIamPolicyCall { 10496 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10497 return c 10498 } 10499 10500 // Context sets the context to be used in this call's Do method. 10501 func (c *ProvidersNotesSetIamPolicyCall) Context(ctx context.Context) *ProvidersNotesSetIamPolicyCall { 10502 c.ctx_ = ctx 10503 return c 10504 } 10505 10506 // Header returns a http.Header that can be modified by the caller to add 10507 // headers to the request. 10508 func (c *ProvidersNotesSetIamPolicyCall) Header() http.Header { 10509 if c.header_ == nil { 10510 c.header_ = make(http.Header) 10511 } 10512 return c.header_ 10513 } 10514 10515 func (c *ProvidersNotesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 10516 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10517 var body io.Reader = nil 10518 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 10519 if err != nil { 10520 return nil, err 10521 } 10522 c.urlParams_.Set("alt", alt) 10523 c.urlParams_.Set("prettyPrint", "false") 10524 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:setIamPolicy") 10525 urls += "?" + c.urlParams_.Encode() 10526 req, err := http.NewRequest("POST", urls, body) 10527 if err != nil { 10528 return nil, err 10529 } 10530 req.Header = reqHeaders 10531 googleapi.Expand(req.URL, map[string]string{ 10532 "resource": c.resource, 10533 }) 10534 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10535 } 10536 10537 // Do executes the "containeranalysis.providers.notes.setIamPolicy" call. 10538 // Any non-2xx status code is an error. Response headers are in either 10539 // *Policy.ServerResponse.Header or (if a response was returned at all) in 10540 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10541 // whether the returned error was because http.StatusNotModified was returned. 10542 func (c *ProvidersNotesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 10543 gensupport.SetOptions(c.urlParams_, opts...) 10544 res, err := c.doRequest("json") 10545 if res != nil && res.StatusCode == http.StatusNotModified { 10546 if res.Body != nil { 10547 res.Body.Close() 10548 } 10549 return nil, gensupport.WrapError(&googleapi.Error{ 10550 Code: res.StatusCode, 10551 Header: res.Header, 10552 }) 10553 } 10554 if err != nil { 10555 return nil, err 10556 } 10557 defer googleapi.CloseBody(res) 10558 if err := googleapi.CheckResponse(res); err != nil { 10559 return nil, gensupport.WrapError(err) 10560 } 10561 ret := &Policy{ 10562 ServerResponse: googleapi.ServerResponse{ 10563 Header: res.Header, 10564 HTTPStatusCode: res.StatusCode, 10565 }, 10566 } 10567 target := &ret 10568 if err := gensupport.DecodeResponse(target, res); err != nil { 10569 return nil, err 10570 } 10571 return ret, nil 10572 } 10573 10574 type ProvidersNotesTestIamPermissionsCall struct { 10575 s *Service 10576 resource string 10577 testiampermissionsrequest *TestIamPermissionsRequest 10578 urlParams_ gensupport.URLParams 10579 ctx_ context.Context 10580 header_ http.Header 10581 } 10582 10583 // TestIamPermissions: Returns the permissions that a caller has on the 10584 // specified note or occurrence resource. Requires list permission on the 10585 // project (for example, "storage.objects.list" on the containing bucket for 10586 // testing permission of an object). Attempting to call this method on a 10587 // non-existent resource will result in a `NOT_FOUND` error if the user has 10588 // list permission on the project, or a `PERMISSION_DENIED` error otherwise. 10589 // The resource takes the following formats: 10590 // `projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID}` for `Occurrences` and 10591 // `projects/{PROJECT_ID}/notes/{NOTE_ID}` for `Notes` 10592 // 10593 // - resource: REQUIRED: The resource for which the policy detail is being 10594 // requested. See Resource names 10595 // (https://cloud.google.com/apis/design/resource_names) for the appropriate 10596 // value for this field. 10597 func (r *ProvidersNotesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProvidersNotesTestIamPermissionsCall { 10598 c := &ProvidersNotesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10599 c.resource = resource 10600 c.testiampermissionsrequest = testiampermissionsrequest 10601 return c 10602 } 10603 10604 // Fields allows partial responses to be retrieved. See 10605 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10606 // details. 10607 func (c *ProvidersNotesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProvidersNotesTestIamPermissionsCall { 10608 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10609 return c 10610 } 10611 10612 // Context sets the context to be used in this call's Do method. 10613 func (c *ProvidersNotesTestIamPermissionsCall) Context(ctx context.Context) *ProvidersNotesTestIamPermissionsCall { 10614 c.ctx_ = ctx 10615 return c 10616 } 10617 10618 // Header returns a http.Header that can be modified by the caller to add 10619 // headers to the request. 10620 func (c *ProvidersNotesTestIamPermissionsCall) Header() http.Header { 10621 if c.header_ == nil { 10622 c.header_ = make(http.Header) 10623 } 10624 return c.header_ 10625 } 10626 10627 func (c *ProvidersNotesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 10628 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10629 var body io.Reader = nil 10630 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 10631 if err != nil { 10632 return nil, err 10633 } 10634 c.urlParams_.Set("alt", alt) 10635 c.urlParams_.Set("prettyPrint", "false") 10636 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:testIamPermissions") 10637 urls += "?" + c.urlParams_.Encode() 10638 req, err := http.NewRequest("POST", urls, body) 10639 if err != nil { 10640 return nil, err 10641 } 10642 req.Header = reqHeaders 10643 googleapi.Expand(req.URL, map[string]string{ 10644 "resource": c.resource, 10645 }) 10646 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10647 } 10648 10649 // Do executes the "containeranalysis.providers.notes.testIamPermissions" call. 10650 // Any non-2xx status code is an error. Response headers are in either 10651 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was 10652 // returned at all) in error.(*googleapi.Error).Header. Use 10653 // googleapi.IsNotModified to check whether the returned error was because 10654 // http.StatusNotModified was returned. 10655 func (c *ProvidersNotesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 10656 gensupport.SetOptions(c.urlParams_, opts...) 10657 res, err := c.doRequest("json") 10658 if res != nil && res.StatusCode == http.StatusNotModified { 10659 if res.Body != nil { 10660 res.Body.Close() 10661 } 10662 return nil, gensupport.WrapError(&googleapi.Error{ 10663 Code: res.StatusCode, 10664 Header: res.Header, 10665 }) 10666 } 10667 if err != nil { 10668 return nil, err 10669 } 10670 defer googleapi.CloseBody(res) 10671 if err := googleapi.CheckResponse(res); err != nil { 10672 return nil, gensupport.WrapError(err) 10673 } 10674 ret := &TestIamPermissionsResponse{ 10675 ServerResponse: googleapi.ServerResponse{ 10676 Header: res.Header, 10677 HTTPStatusCode: res.StatusCode, 10678 }, 10679 } 10680 target := &ret 10681 if err := gensupport.DecodeResponse(target, res); err != nil { 10682 return nil, err 10683 } 10684 return ret, nil 10685 } 10686 10687 type ProvidersNotesOccurrencesListCall struct { 10688 s *Service 10689 name string 10690 urlParams_ gensupport.URLParams 10691 ifNoneMatch_ string 10692 ctx_ context.Context 10693 header_ http.Header 10694 } 10695 10696 // List: Lists `Occurrences` referencing the specified `Note`. Use this method 10697 // to get all occurrences referencing your `Note` across all your customer 10698 // projects. 10699 // 10700 // - name: The name field will contain the note name for example: 10701 // "provider/{provider_id}/notes/{note_id}". 10702 func (r *ProvidersNotesOccurrencesService) List(name string) *ProvidersNotesOccurrencesListCall { 10703 c := &ProvidersNotesOccurrencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10704 c.name = name 10705 return c 10706 } 10707 10708 // Filter sets the optional parameter "filter": The filter expression. 10709 func (c *ProvidersNotesOccurrencesListCall) Filter(filter string) *ProvidersNotesOccurrencesListCall { 10710 c.urlParams_.Set("filter", filter) 10711 return c 10712 } 10713 10714 // PageSize sets the optional parameter "pageSize": Number of notes to return 10715 // in the list. 10716 func (c *ProvidersNotesOccurrencesListCall) PageSize(pageSize int64) *ProvidersNotesOccurrencesListCall { 10717 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10718 return c 10719 } 10720 10721 // PageToken sets the optional parameter "pageToken": Token to provide to skip 10722 // to a particular spot in the list. 10723 func (c *ProvidersNotesOccurrencesListCall) PageToken(pageToken string) *ProvidersNotesOccurrencesListCall { 10724 c.urlParams_.Set("pageToken", pageToken) 10725 return c 10726 } 10727 10728 // Fields allows partial responses to be retrieved. See 10729 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10730 // details. 10731 func (c *ProvidersNotesOccurrencesListCall) Fields(s ...googleapi.Field) *ProvidersNotesOccurrencesListCall { 10732 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10733 return c 10734 } 10735 10736 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10737 // object's ETag matches the given value. This is useful for getting updates 10738 // only after the object has changed since the last request. 10739 func (c *ProvidersNotesOccurrencesListCall) IfNoneMatch(entityTag string) *ProvidersNotesOccurrencesListCall { 10740 c.ifNoneMatch_ = entityTag 10741 return c 10742 } 10743 10744 // Context sets the context to be used in this call's Do method. 10745 func (c *ProvidersNotesOccurrencesListCall) Context(ctx context.Context) *ProvidersNotesOccurrencesListCall { 10746 c.ctx_ = ctx 10747 return c 10748 } 10749 10750 // Header returns a http.Header that can be modified by the caller to add 10751 // headers to the request. 10752 func (c *ProvidersNotesOccurrencesListCall) Header() http.Header { 10753 if c.header_ == nil { 10754 c.header_ = make(http.Header) 10755 } 10756 return c.header_ 10757 } 10758 10759 func (c *ProvidersNotesOccurrencesListCall) doRequest(alt string) (*http.Response, error) { 10760 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10761 if c.ifNoneMatch_ != "" { 10762 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10763 } 10764 var body io.Reader = nil 10765 c.urlParams_.Set("alt", alt) 10766 c.urlParams_.Set("prettyPrint", "false") 10767 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/occurrences") 10768 urls += "?" + c.urlParams_.Encode() 10769 req, err := http.NewRequest("GET", urls, body) 10770 if err != nil { 10771 return nil, err 10772 } 10773 req.Header = reqHeaders 10774 googleapi.Expand(req.URL, map[string]string{ 10775 "name": c.name, 10776 }) 10777 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10778 } 10779 10780 // Do executes the "containeranalysis.providers.notes.occurrences.list" call. 10781 // Any non-2xx status code is an error. Response headers are in either 10782 // *ListNoteOccurrencesResponse.ServerResponse.Header or (if a response was 10783 // returned at all) in error.(*googleapi.Error).Header. Use 10784 // googleapi.IsNotModified to check whether the returned error was because 10785 // http.StatusNotModified was returned. 10786 func (c *ProvidersNotesOccurrencesListCall) Do(opts ...googleapi.CallOption) (*ListNoteOccurrencesResponse, error) { 10787 gensupport.SetOptions(c.urlParams_, opts...) 10788 res, err := c.doRequest("json") 10789 if res != nil && res.StatusCode == http.StatusNotModified { 10790 if res.Body != nil { 10791 res.Body.Close() 10792 } 10793 return nil, gensupport.WrapError(&googleapi.Error{ 10794 Code: res.StatusCode, 10795 Header: res.Header, 10796 }) 10797 } 10798 if err != nil { 10799 return nil, err 10800 } 10801 defer googleapi.CloseBody(res) 10802 if err := googleapi.CheckResponse(res); err != nil { 10803 return nil, gensupport.WrapError(err) 10804 } 10805 ret := &ListNoteOccurrencesResponse{ 10806 ServerResponse: googleapi.ServerResponse{ 10807 Header: res.Header, 10808 HTTPStatusCode: res.StatusCode, 10809 }, 10810 } 10811 target := &ret 10812 if err := gensupport.DecodeResponse(target, res); err != nil { 10813 return nil, err 10814 } 10815 return ret, nil 10816 } 10817 10818 // Pages invokes f for each page of results. 10819 // A non-nil error returned from f will halt the iteration. 10820 // The provided context supersedes any context provided to the Context method. 10821 func (c *ProvidersNotesOccurrencesListCall) Pages(ctx context.Context, f func(*ListNoteOccurrencesResponse) error) error { 10822 c.ctx_ = ctx 10823 defer c.PageToken(c.urlParams_.Get("pageToken")) 10824 for { 10825 x, err := c.Do() 10826 if err != nil { 10827 return err 10828 } 10829 if err := f(x); err != nil { 10830 return err 10831 } 10832 if x.NextPageToken == "" { 10833 return nil 10834 } 10835 c.PageToken(x.NextPageToken) 10836 } 10837 } 10838