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