1 // Copyright 2024 Google LLC. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Code generated file. DO NOT EDIT. 6 7 // Package securitycenter provides access to the Security Command Center API. 8 // 9 // For product documentation, see: https://cloud.google.com/security-command-center 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/securitycenter/v1beta2" 27 // ... 28 // ctx := context.Background() 29 // securitycenterService, err := securitycenter.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 // securitycenterService, err := securitycenter.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 // securitycenterService, err := securitycenter.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 49 // 50 // See [google.golang.org/api/option.ClientOption] for details on options. 51 package securitycenter // import "google.golang.org/api/securitycenter/v1beta2" 52 53 import ( 54 "bytes" 55 "context" 56 "encoding/json" 57 "errors" 58 "fmt" 59 "io" 60 "net/http" 61 "net/url" 62 "strconv" 63 "strings" 64 65 googleapi "google.golang.org/api/googleapi" 66 internal "google.golang.org/api/internal" 67 gensupport "google.golang.org/api/internal/gensupport" 68 option "google.golang.org/api/option" 69 internaloption "google.golang.org/api/option/internaloption" 70 htransport "google.golang.org/api/transport/http" 71 ) 72 73 // Always reference these packages, just in case the auto-generated code 74 // below doesn't. 75 var _ = bytes.NewBuffer 76 var _ = strconv.Itoa 77 var _ = fmt.Sprintf 78 var _ = json.NewDecoder 79 var _ = io.Copy 80 var _ = url.Parse 81 var _ = gensupport.MarshalJSON 82 var _ = googleapi.Version 83 var _ = errors.New 84 var _ = strings.Replace 85 var _ = context.Canceled 86 var _ = internaloption.WithDefaultEndpoint 87 var _ = internal.Version 88 89 const apiId = "securitycenter:v1beta2" 90 const apiName = "securitycenter" 91 const apiVersion = "v1beta2" 92 const basePath = "https://securitycenter.googleapis.com/" 93 const basePathTemplate = "https://securitycenter.UNIVERSE_DOMAIN/" 94 const mtlsBasePath = "https://securitycenter.mtls.googleapis.com/" 95 96 // OAuth2 scopes used by this API. 97 const ( 98 // See, edit, configure, and delete your Google Cloud data and see the email 99 // address for your Google Account. 100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 101 ) 102 103 // NewService creates a new Service. 104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 105 scopesOption := internaloption.WithDefaultScopes( 106 "https://www.googleapis.com/auth/cloud-platform", 107 ) 108 // NOTE: prepend, so we don't override user-specified scopes. 109 opts = append([]option.ClientOption{scopesOption}, opts...) 110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) 112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 113 opts = append(opts, internaloption.EnableNewAuthLibrary()) 114 client, endpoint, err := htransport.NewClient(ctx, opts...) 115 if err != nil { 116 return nil, err 117 } 118 s, err := New(client) 119 if err != nil { 120 return nil, err 121 } 122 if endpoint != "" { 123 s.BasePath = endpoint 124 } 125 return s, nil 126 } 127 128 // New creates a new Service. It uses the provided http.Client for requests. 129 // 130 // Deprecated: please use NewService instead. 131 // To provide a custom HTTP client, use option.WithHTTPClient. 132 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 133 func New(client *http.Client) (*Service, error) { 134 if client == nil { 135 return nil, errors.New("client is nil") 136 } 137 s := &Service{client: client, BasePath: basePath} 138 s.Folders = NewFoldersService(s) 139 s.Organizations = NewOrganizationsService(s) 140 s.Projects = NewProjectsService(s) 141 return s, nil 142 } 143 144 type Service struct { 145 client *http.Client 146 BasePath string // API endpoint base URL 147 UserAgent string // optional additional User-Agent fragment 148 149 Folders *FoldersService 150 151 Organizations *OrganizationsService 152 153 Projects *ProjectsService 154 } 155 156 func (s *Service) userAgent() string { 157 if s.UserAgent == "" { 158 return googleapi.UserAgent 159 } 160 return googleapi.UserAgent + " " + s.UserAgent 161 } 162 163 func NewFoldersService(s *Service) *FoldersService { 164 rs := &FoldersService{s: s} 165 rs.ContainerThreatDetectionSettings = NewFoldersContainerThreatDetectionSettingsService(s) 166 rs.EventThreatDetectionSettings = NewFoldersEventThreatDetectionSettingsService(s) 167 rs.RapidVulnerabilityDetectionSettings = NewFoldersRapidVulnerabilityDetectionSettingsService(s) 168 rs.SecurityHealthAnalyticsSettings = NewFoldersSecurityHealthAnalyticsSettingsService(s) 169 rs.VirtualMachineThreatDetectionSettings = NewFoldersVirtualMachineThreatDetectionSettingsService(s) 170 rs.WebSecurityScannerSettings = NewFoldersWebSecurityScannerSettingsService(s) 171 return rs 172 } 173 174 type FoldersService struct { 175 s *Service 176 177 ContainerThreatDetectionSettings *FoldersContainerThreatDetectionSettingsService 178 179 EventThreatDetectionSettings *FoldersEventThreatDetectionSettingsService 180 181 RapidVulnerabilityDetectionSettings *FoldersRapidVulnerabilityDetectionSettingsService 182 183 SecurityHealthAnalyticsSettings *FoldersSecurityHealthAnalyticsSettingsService 184 185 VirtualMachineThreatDetectionSettings *FoldersVirtualMachineThreatDetectionSettingsService 186 187 WebSecurityScannerSettings *FoldersWebSecurityScannerSettingsService 188 } 189 190 func NewFoldersContainerThreatDetectionSettingsService(s *Service) *FoldersContainerThreatDetectionSettingsService { 191 rs := &FoldersContainerThreatDetectionSettingsService{s: s} 192 return rs 193 } 194 195 type FoldersContainerThreatDetectionSettingsService struct { 196 s *Service 197 } 198 199 func NewFoldersEventThreatDetectionSettingsService(s *Service) *FoldersEventThreatDetectionSettingsService { 200 rs := &FoldersEventThreatDetectionSettingsService{s: s} 201 return rs 202 } 203 204 type FoldersEventThreatDetectionSettingsService struct { 205 s *Service 206 } 207 208 func NewFoldersRapidVulnerabilityDetectionSettingsService(s *Service) *FoldersRapidVulnerabilityDetectionSettingsService { 209 rs := &FoldersRapidVulnerabilityDetectionSettingsService{s: s} 210 return rs 211 } 212 213 type FoldersRapidVulnerabilityDetectionSettingsService struct { 214 s *Service 215 } 216 217 func NewFoldersSecurityHealthAnalyticsSettingsService(s *Service) *FoldersSecurityHealthAnalyticsSettingsService { 218 rs := &FoldersSecurityHealthAnalyticsSettingsService{s: s} 219 return rs 220 } 221 222 type FoldersSecurityHealthAnalyticsSettingsService struct { 223 s *Service 224 } 225 226 func NewFoldersVirtualMachineThreatDetectionSettingsService(s *Service) *FoldersVirtualMachineThreatDetectionSettingsService { 227 rs := &FoldersVirtualMachineThreatDetectionSettingsService{s: s} 228 return rs 229 } 230 231 type FoldersVirtualMachineThreatDetectionSettingsService struct { 232 s *Service 233 } 234 235 func NewFoldersWebSecurityScannerSettingsService(s *Service) *FoldersWebSecurityScannerSettingsService { 236 rs := &FoldersWebSecurityScannerSettingsService{s: s} 237 return rs 238 } 239 240 type FoldersWebSecurityScannerSettingsService struct { 241 s *Service 242 } 243 244 func NewOrganizationsService(s *Service) *OrganizationsService { 245 rs := &OrganizationsService{s: s} 246 rs.ContainerThreatDetectionSettings = NewOrganizationsContainerThreatDetectionSettingsService(s) 247 rs.EventThreatDetectionSettings = NewOrganizationsEventThreatDetectionSettingsService(s) 248 rs.RapidVulnerabilityDetectionSettings = NewOrganizationsRapidVulnerabilityDetectionSettingsService(s) 249 rs.SecurityHealthAnalyticsSettings = NewOrganizationsSecurityHealthAnalyticsSettingsService(s) 250 rs.VirtualMachineThreatDetectionSettings = NewOrganizationsVirtualMachineThreatDetectionSettingsService(s) 251 rs.WebSecurityScannerSettings = NewOrganizationsWebSecurityScannerSettingsService(s) 252 return rs 253 } 254 255 type OrganizationsService struct { 256 s *Service 257 258 ContainerThreatDetectionSettings *OrganizationsContainerThreatDetectionSettingsService 259 260 EventThreatDetectionSettings *OrganizationsEventThreatDetectionSettingsService 261 262 RapidVulnerabilityDetectionSettings *OrganizationsRapidVulnerabilityDetectionSettingsService 263 264 SecurityHealthAnalyticsSettings *OrganizationsSecurityHealthAnalyticsSettingsService 265 266 VirtualMachineThreatDetectionSettings *OrganizationsVirtualMachineThreatDetectionSettingsService 267 268 WebSecurityScannerSettings *OrganizationsWebSecurityScannerSettingsService 269 } 270 271 func NewOrganizationsContainerThreatDetectionSettingsService(s *Service) *OrganizationsContainerThreatDetectionSettingsService { 272 rs := &OrganizationsContainerThreatDetectionSettingsService{s: s} 273 return rs 274 } 275 276 type OrganizationsContainerThreatDetectionSettingsService struct { 277 s *Service 278 } 279 280 func NewOrganizationsEventThreatDetectionSettingsService(s *Service) *OrganizationsEventThreatDetectionSettingsService { 281 rs := &OrganizationsEventThreatDetectionSettingsService{s: s} 282 return rs 283 } 284 285 type OrganizationsEventThreatDetectionSettingsService struct { 286 s *Service 287 } 288 289 func NewOrganizationsRapidVulnerabilityDetectionSettingsService(s *Service) *OrganizationsRapidVulnerabilityDetectionSettingsService { 290 rs := &OrganizationsRapidVulnerabilityDetectionSettingsService{s: s} 291 return rs 292 } 293 294 type OrganizationsRapidVulnerabilityDetectionSettingsService struct { 295 s *Service 296 } 297 298 func NewOrganizationsSecurityHealthAnalyticsSettingsService(s *Service) *OrganizationsSecurityHealthAnalyticsSettingsService { 299 rs := &OrganizationsSecurityHealthAnalyticsSettingsService{s: s} 300 return rs 301 } 302 303 type OrganizationsSecurityHealthAnalyticsSettingsService struct { 304 s *Service 305 } 306 307 func NewOrganizationsVirtualMachineThreatDetectionSettingsService(s *Service) *OrganizationsVirtualMachineThreatDetectionSettingsService { 308 rs := &OrganizationsVirtualMachineThreatDetectionSettingsService{s: s} 309 return rs 310 } 311 312 type OrganizationsVirtualMachineThreatDetectionSettingsService struct { 313 s *Service 314 } 315 316 func NewOrganizationsWebSecurityScannerSettingsService(s *Service) *OrganizationsWebSecurityScannerSettingsService { 317 rs := &OrganizationsWebSecurityScannerSettingsService{s: s} 318 return rs 319 } 320 321 type OrganizationsWebSecurityScannerSettingsService struct { 322 s *Service 323 } 324 325 func NewProjectsService(s *Service) *ProjectsService { 326 rs := &ProjectsService{s: s} 327 rs.ContainerThreatDetectionSettings = NewProjectsContainerThreatDetectionSettingsService(s) 328 rs.EventThreatDetectionSettings = NewProjectsEventThreatDetectionSettingsService(s) 329 rs.Locations = NewProjectsLocationsService(s) 330 rs.RapidVulnerabilityDetectionSettings = NewProjectsRapidVulnerabilityDetectionSettingsService(s) 331 rs.SecurityHealthAnalyticsSettings = NewProjectsSecurityHealthAnalyticsSettingsService(s) 332 rs.VirtualMachineThreatDetectionSettings = NewProjectsVirtualMachineThreatDetectionSettingsService(s) 333 rs.WebSecurityScannerSettings = NewProjectsWebSecurityScannerSettingsService(s) 334 return rs 335 } 336 337 type ProjectsService struct { 338 s *Service 339 340 ContainerThreatDetectionSettings *ProjectsContainerThreatDetectionSettingsService 341 342 EventThreatDetectionSettings *ProjectsEventThreatDetectionSettingsService 343 344 Locations *ProjectsLocationsService 345 346 RapidVulnerabilityDetectionSettings *ProjectsRapidVulnerabilityDetectionSettingsService 347 348 SecurityHealthAnalyticsSettings *ProjectsSecurityHealthAnalyticsSettingsService 349 350 VirtualMachineThreatDetectionSettings *ProjectsVirtualMachineThreatDetectionSettingsService 351 352 WebSecurityScannerSettings *ProjectsWebSecurityScannerSettingsService 353 } 354 355 func NewProjectsContainerThreatDetectionSettingsService(s *Service) *ProjectsContainerThreatDetectionSettingsService { 356 rs := &ProjectsContainerThreatDetectionSettingsService{s: s} 357 return rs 358 } 359 360 type ProjectsContainerThreatDetectionSettingsService struct { 361 s *Service 362 } 363 364 func NewProjectsEventThreatDetectionSettingsService(s *Service) *ProjectsEventThreatDetectionSettingsService { 365 rs := &ProjectsEventThreatDetectionSettingsService{s: s} 366 return rs 367 } 368 369 type ProjectsEventThreatDetectionSettingsService struct { 370 s *Service 371 } 372 373 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 374 rs := &ProjectsLocationsService{s: s} 375 rs.Clusters = NewProjectsLocationsClustersService(s) 376 return rs 377 } 378 379 type ProjectsLocationsService struct { 380 s *Service 381 382 Clusters *ProjectsLocationsClustersService 383 } 384 385 func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService { 386 rs := &ProjectsLocationsClustersService{s: s} 387 rs.ContainerThreatDetectionSettings = NewProjectsLocationsClustersContainerThreatDetectionSettingsService(s) 388 return rs 389 } 390 391 type ProjectsLocationsClustersService struct { 392 s *Service 393 394 ContainerThreatDetectionSettings *ProjectsLocationsClustersContainerThreatDetectionSettingsService 395 } 396 397 func NewProjectsLocationsClustersContainerThreatDetectionSettingsService(s *Service) *ProjectsLocationsClustersContainerThreatDetectionSettingsService { 398 rs := &ProjectsLocationsClustersContainerThreatDetectionSettingsService{s: s} 399 return rs 400 } 401 402 type ProjectsLocationsClustersContainerThreatDetectionSettingsService struct { 403 s *Service 404 } 405 406 func NewProjectsRapidVulnerabilityDetectionSettingsService(s *Service) *ProjectsRapidVulnerabilityDetectionSettingsService { 407 rs := &ProjectsRapidVulnerabilityDetectionSettingsService{s: s} 408 return rs 409 } 410 411 type ProjectsRapidVulnerabilityDetectionSettingsService struct { 412 s *Service 413 } 414 415 func NewProjectsSecurityHealthAnalyticsSettingsService(s *Service) *ProjectsSecurityHealthAnalyticsSettingsService { 416 rs := &ProjectsSecurityHealthAnalyticsSettingsService{s: s} 417 return rs 418 } 419 420 type ProjectsSecurityHealthAnalyticsSettingsService struct { 421 s *Service 422 } 423 424 func NewProjectsVirtualMachineThreatDetectionSettingsService(s *Service) *ProjectsVirtualMachineThreatDetectionSettingsService { 425 rs := &ProjectsVirtualMachineThreatDetectionSettingsService{s: s} 426 return rs 427 } 428 429 type ProjectsVirtualMachineThreatDetectionSettingsService struct { 430 s *Service 431 } 432 433 func NewProjectsWebSecurityScannerSettingsService(s *Service) *ProjectsWebSecurityScannerSettingsService { 434 rs := &ProjectsWebSecurityScannerSettingsService{s: s} 435 return rs 436 } 437 438 type ProjectsWebSecurityScannerSettingsService struct { 439 s *Service 440 } 441 442 // Access: Represents an access event. 443 type Access struct { 444 // CallerIp: Caller's IP address, such as "1.1.1.1". 445 CallerIp string `json:"callerIp,omitempty"` 446 // CallerIpGeo: The caller IP's geolocation, which identifies where the call 447 // came from. 448 CallerIpGeo *Geolocation `json:"callerIpGeo,omitempty"` 449 // MethodName: The method that the service account called, e.g. "SetIamPolicy". 450 MethodName string `json:"methodName,omitempty"` 451 // PrincipalEmail: Associated email, such as "foo@google.com". The email 452 // address of the authenticated user or a service account acting on behalf of a 453 // third party principal making the request. For third party identity callers, 454 // the `principal_subject` field is populated instead of this field. For 455 // privacy reasons, the principal email address is sometimes redacted. For more 456 // information, see Caller identities in audit logs 457 // (https://cloud.google.com/logging/docs/audit#user-id). 458 PrincipalEmail string `json:"principalEmail,omitempty"` 459 // PrincipalSubject: A string that represents the principal_subject that is 460 // associated with the identity. Unlike `principal_email`, `principal_subject` 461 // supports principals that aren't associated with email addresses, such as 462 // third party principals. For most identities, the format is 463 // `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. 464 // Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, 465 // still use the legacy format `serviceAccount:{identity pool 466 // name}[{subject}]`. 467 PrincipalSubject string `json:"principalSubject,omitempty"` 468 // ServiceAccountDelegationInfo: The identity delegation history of an 469 // authenticated service account that made the request. The 470 // `serviceAccountDelegationInfo[]` object contains information about the real 471 // authorities that try to access Google Cloud resources by delegating on a 472 // service account. When multiple authorities are present, they are guaranteed 473 // to be sorted based on the original ordering of the identity delegation 474 // events. 475 ServiceAccountDelegationInfo []*ServiceAccountDelegationInfo `json:"serviceAccountDelegationInfo,omitempty"` 476 // ServiceAccountKeyName: The name of the service account key that was used to 477 // create or exchange credentials when authenticating the service account that 478 // made the request. This is a scheme-less URI full resource name. For example: 479 // "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{k 480 // ey}". 481 ServiceAccountKeyName string `json:"serviceAccountKeyName,omitempty"` 482 // ServiceName: This is the API service that the service account made a call 483 // to, e.g. "iam.googleapis.com" 484 ServiceName string `json:"serviceName,omitempty"` 485 // UserAgent: The caller's user agent string associated with the finding. 486 UserAgent string `json:"userAgent,omitempty"` 487 // UserAgentFamily: Type of user agent associated with the finding. For 488 // example, an operating system shell or an embedded or standalone application. 489 UserAgentFamily string `json:"userAgentFamily,omitempty"` 490 // UserName: A string that represents a username. The username provided depends 491 // on the type of the finding and is likely not an IAM principal. For example, 492 // this can be a system username if the finding is related to a virtual 493 // machine, or it can be an application login username. 494 UserName string `json:"userName,omitempty"` 495 // ForceSendFields is a list of field names (e.g. "CallerIp") to 496 // unconditionally include in API requests. By default, fields with empty or 497 // default values are omitted from API requests. See 498 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 499 // details. 500 ForceSendFields []string `json:"-"` 501 // NullFields is a list of field names (e.g. "CallerIp") to include in API 502 // requests with the JSON null value. By default, fields with empty values are 503 // omitted from API requests. See 504 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 505 NullFields []string `json:"-"` 506 } 507 508 func (s *Access) MarshalJSON() ([]byte, error) { 509 type NoMethod Access 510 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 511 } 512 513 // AccessReview: Conveys information about a Kubernetes access review (such as 514 // one returned by a `kubectl auth can-i` 515 // (https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access) 516 // command) that was involved in a finding. 517 type AccessReview struct { 518 // Group: The API group of the resource. "*" means all. 519 Group string `json:"group,omitempty"` 520 // Name: The name of the resource being requested. Empty means all. 521 Name string `json:"name,omitempty"` 522 // Ns: Namespace of the action being requested. Currently, there is no 523 // distinction between no namespace and all namespaces. Both are represented by 524 // "" (empty). 525 Ns string `json:"ns,omitempty"` 526 // Resource: The optional resource type requested. "*" means all. 527 Resource string `json:"resource,omitempty"` 528 // Subresource: The optional subresource type. 529 Subresource string `json:"subresource,omitempty"` 530 // Verb: A Kubernetes resource API verb, like get, list, watch, create, update, 531 // delete, proxy. "*" means all. 532 Verb string `json:"verb,omitempty"` 533 // Version: The API version of the resource. "*" means all. 534 Version string `json:"version,omitempty"` 535 // ForceSendFields is a list of field names (e.g. "Group") to unconditionally 536 // include in API requests. By default, fields with empty or default values are 537 // 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. "Group") 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 *AccessReview) MarshalJSON() ([]byte, error) { 549 type NoMethod AccessReview 550 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 551 } 552 553 // AdaptiveProtection: Information about Google Cloud Armor Adaptive Protection 554 // (https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection). 555 type AdaptiveProtection struct { 556 // Confidence: A score of 0 means that there is low confidence that the 557 // detected event is an actual attack. A score of 1 means that there is high 558 // confidence that the detected event is an attack. See the Adaptive Protection 559 // documentation 560 // (https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) 561 // for further explanation. 562 Confidence float64 `json:"confidence,omitempty"` 563 // ForceSendFields is a list of field names (e.g. "Confidence") to 564 // unconditionally include in API requests. By default, fields with empty or 565 // default values are omitted from API requests. See 566 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 567 // details. 568 ForceSendFields []string `json:"-"` 569 // NullFields is a list of field names (e.g. "Confidence") to include in API 570 // requests with the JSON null value. By default, fields with empty values are 571 // omitted from API requests. See 572 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 573 NullFields []string `json:"-"` 574 } 575 576 func (s *AdaptiveProtection) MarshalJSON() ([]byte, error) { 577 type NoMethod AdaptiveProtection 578 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 579 } 580 581 func (s *AdaptiveProtection) UnmarshalJSON(data []byte) error { 582 type NoMethod AdaptiveProtection 583 var s1 struct { 584 Confidence gensupport.JSONFloat64 `json:"confidence"` 585 *NoMethod 586 } 587 s1.NoMethod = (*NoMethod)(s) 588 if err := json.Unmarshal(data, &s1); err != nil { 589 return err 590 } 591 s.Confidence = float64(s1.Confidence) 592 return nil 593 } 594 595 // Application: Represents an application associated with a finding. 596 type Application struct { 597 // BaseUri: The base URI that identifies the network location of the 598 // application in which the vulnerability was detected. For example, 599 // `http://example.com`. 600 BaseUri string `json:"baseUri,omitempty"` 601 // FullUri: The full URI with payload that can be used to reproduce the 602 // vulnerability. For example, `http://example.com?p=aMmYgI6H`. 603 FullUri string `json:"fullUri,omitempty"` 604 // ForceSendFields is a list of field names (e.g. "BaseUri") to unconditionally 605 // include in API requests. By default, fields with empty or default values are 606 // omitted from API requests. See 607 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 608 // details. 609 ForceSendFields []string `json:"-"` 610 // NullFields is a list of field names (e.g. "BaseUri") to include in API 611 // requests with the JSON null value. By default, fields with empty values are 612 // omitted from API requests. See 613 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 614 NullFields []string `json:"-"` 615 } 616 617 func (s *Application) MarshalJSON() ([]byte, error) { 618 type NoMethod Application 619 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 620 } 621 622 // Attack: Information about DDoS attack volume and classification. 623 type Attack struct { 624 // Classification: Type of attack, for example, 'SYN-flood', 'NTP-udp', or 625 // 'CHARGEN-udp'. 626 Classification string `json:"classification,omitempty"` 627 // VolumeBps: Total BPS (bytes per second) volume of attack. 628 VolumeBps int64 `json:"volumeBps,omitempty"` 629 // VolumePps: Total PPS (packets per second) volume of attack. 630 VolumePps int64 `json:"volumePps,omitempty"` 631 // ForceSendFields is a list of field names (e.g. "Classification") to 632 // unconditionally include in API requests. By default, fields with empty or 633 // default values are omitted from API requests. See 634 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 635 // details. 636 ForceSendFields []string `json:"-"` 637 // NullFields is a list of field names (e.g. "Classification") to include in 638 // API requests with the JSON null value. By default, fields with empty values 639 // are omitted from API requests. See 640 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 641 NullFields []string `json:"-"` 642 } 643 644 func (s *Attack) MarshalJSON() ([]byte, error) { 645 type NoMethod Attack 646 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 647 } 648 649 // AttackExposure: An attack exposure contains the results of an attack path 650 // simulation run. 651 type AttackExposure struct { 652 // AttackExposureResult: The resource name of the attack path simulation result 653 // that contains the details regarding this attack exposure score. Example: 654 // organizations/123/simulations/456/attackExposureResults/789 655 AttackExposureResult string `json:"attackExposureResult,omitempty"` 656 // ExposedHighValueResourcesCount: The number of high value resources that are 657 // exposed as a result of this finding. 658 ExposedHighValueResourcesCount int64 `json:"exposedHighValueResourcesCount,omitempty"` 659 // ExposedLowValueResourcesCount: The number of high value resources that are 660 // exposed as a result of this finding. 661 ExposedLowValueResourcesCount int64 `json:"exposedLowValueResourcesCount,omitempty"` 662 // ExposedMediumValueResourcesCount: The number of medium value resources that 663 // are exposed as a result of this finding. 664 ExposedMediumValueResourcesCount int64 `json:"exposedMediumValueResourcesCount,omitempty"` 665 // LatestCalculationTime: The most recent time the attack exposure was updated 666 // on this finding. 667 LatestCalculationTime string `json:"latestCalculationTime,omitempty"` 668 // Score: A number between 0 (inclusive) and infinity that represents how 669 // important this finding is to remediate. The higher the score, the more 670 // important it is to remediate. 671 Score float64 `json:"score,omitempty"` 672 // State: What state this AttackExposure is in. This captures whether or not an 673 // attack exposure has been calculated or not. 674 // 675 // Possible values: 676 // "STATE_UNSPECIFIED" - The state is not specified. 677 // "CALCULATED" - The attack exposure has been calculated. 678 // "NOT_CALCULATED" - The attack exposure has not been calculated. 679 State string `json:"state,omitempty"` 680 // ForceSendFields is a list of field names (e.g. "AttackExposureResult") to 681 // unconditionally include in API requests. By default, fields with empty or 682 // default values are omitted from API requests. See 683 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 684 // details. 685 ForceSendFields []string `json:"-"` 686 // NullFields is a list of field names (e.g. "AttackExposureResult") to include 687 // in API requests with the JSON null value. By default, fields with empty 688 // values are omitted from API requests. See 689 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 690 NullFields []string `json:"-"` 691 } 692 693 func (s *AttackExposure) MarshalJSON() ([]byte, error) { 694 type NoMethod AttackExposure 695 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 696 } 697 698 func (s *AttackExposure) UnmarshalJSON(data []byte) error { 699 type NoMethod AttackExposure 700 var s1 struct { 701 Score gensupport.JSONFloat64 `json:"score"` 702 *NoMethod 703 } 704 s1.NoMethod = (*NoMethod)(s) 705 if err := json.Unmarshal(data, &s1); err != nil { 706 return err 707 } 708 s.Score = float64(s1.Score) 709 return nil 710 } 711 712 // AwsAccount: An AWS account that is a member of an organization. 713 type AwsAccount struct { 714 // Id: The unique identifier (ID) of the account, containing exactly 12 digits. 715 Id string `json:"id,omitempty"` 716 // Name: The friendly name of this account. 717 Name string `json:"name,omitempty"` 718 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 719 // include in API requests. By default, fields with empty or default values are 720 // 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. "Id") to include in API requests 725 // with the JSON null value. By default, fields with empty values are omitted 726 // 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 *AwsAccount) MarshalJSON() ([]byte, error) { 732 type NoMethod AwsAccount 733 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 734 } 735 736 // AwsMetadata: AWS metadata associated with the resource, only applicable if 737 // the finding's cloud provider is Amazon Web Services. 738 type AwsMetadata struct { 739 // Account: The AWS account associated with the resource. 740 Account *AwsAccount `json:"account,omitempty"` 741 // Organization: The AWS organization associated with the resource. 742 Organization *AwsOrganization `json:"organization,omitempty"` 743 // OrganizationalUnits: A list of AWS organizational units associated with the 744 // resource, ordered from lowest level (closest to the account) to highest 745 // level. 746 OrganizationalUnits []*AwsOrganizationalUnit `json:"organizationalUnits,omitempty"` 747 // ForceSendFields is a list of field names (e.g. "Account") to unconditionally 748 // include in API requests. By default, fields with empty or default values are 749 // omitted from API requests. See 750 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 751 // details. 752 ForceSendFields []string `json:"-"` 753 // NullFields is a list of field names (e.g. "Account") to include in API 754 // requests with the JSON null value. By default, fields with empty values are 755 // omitted from API requests. See 756 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 757 NullFields []string `json:"-"` 758 } 759 760 func (s *AwsMetadata) MarshalJSON() ([]byte, error) { 761 type NoMethod AwsMetadata 762 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 763 } 764 765 // AwsOrganization: An organization is a collection of accounts that are 766 // centrally managed together using consolidated billing, organized 767 // hierarchically with organizational units (OUs), and controlled with 768 // policies. 769 type AwsOrganization struct { 770 // Id: The unique identifier (ID) for the organization. The regex pattern for 771 // an organization ID string requires "o-" followed by from 10 to 32 lowercase 772 // letters or digits. 773 Id string `json:"id,omitempty"` 774 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 775 // include in API requests. By default, fields with empty or default values are 776 // omitted from API requests. See 777 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 778 // details. 779 ForceSendFields []string `json:"-"` 780 // NullFields is a list of field names (e.g. "Id") to include in API requests 781 // with the JSON null value. By default, fields with empty values are omitted 782 // from API requests. See 783 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 784 NullFields []string `json:"-"` 785 } 786 787 func (s *AwsOrganization) MarshalJSON() ([]byte, error) { 788 type NoMethod AwsOrganization 789 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 790 } 791 792 // AwsOrganizationalUnit: An Organizational Unit (OU) is a container of AWS 793 // accounts within a root of an organization. Policies that are attached to an 794 // OU apply to all accounts contained in that OU and in any child OUs. 795 type AwsOrganizationalUnit struct { 796 // Id: The unique identifier (ID) associated with this OU. The regex pattern 797 // for an organizational unit ID string requires "ou-" followed by from 4 to 32 798 // lowercase letters or digits (the ID of the root that contains the OU). This 799 // string is followed by a second "-" dash and from 8 to 32 additional 800 // lowercase letters or digits. For example, "ou-ab12-cd34ef56". 801 Id string `json:"id,omitempty"` 802 // Name: The friendly name of the OU. 803 Name string `json:"name,omitempty"` 804 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 805 // include in API requests. By default, fields with empty or default values are 806 // omitted from API requests. See 807 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 808 // details. 809 ForceSendFields []string `json:"-"` 810 // NullFields is a list of field names (e.g. "Id") to include in API requests 811 // with the JSON null value. By default, fields with empty values are omitted 812 // from API requests. See 813 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 814 NullFields []string `json:"-"` 815 } 816 817 func (s *AwsOrganizationalUnit) MarshalJSON() ([]byte, error) { 818 type NoMethod AwsOrganizationalUnit 819 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 820 } 821 822 // BackupDisasterRecovery: Information related to Google Cloud Backup and DR 823 // Service findings. 824 type BackupDisasterRecovery struct { 825 // Appliance: The name of the Backup and DR appliance that captures, moves, and 826 // manages the lifecycle of backup data. For example, `backup-server-57137`. 827 Appliance string `json:"appliance,omitempty"` 828 // Applications: The names of Backup and DR applications. An application is a 829 // VM, database, or file system on a managed host monitored by a backup and 830 // recovery appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`, 831 // `centos7-01-vol02`. 832 Applications []string `json:"applications,omitempty"` 833 // BackupCreateTime: The timestamp at which the Backup and DR backup was 834 // created. 835 BackupCreateTime string `json:"backupCreateTime,omitempty"` 836 // BackupTemplate: The name of a Backup and DR template which comprises one or 837 // more backup policies. See the Backup and DR documentation 838 // (https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp) 839 // for more information. For example, `snap-ov`. 840 BackupTemplate string `json:"backupTemplate,omitempty"` 841 // BackupType: The backup type of the Backup and DR image. For example, 842 // `Snapshot`, `Remote Snapshot`, `OnVault`. 843 BackupType string `json:"backupType,omitempty"` 844 // Host: The name of a Backup and DR host, which is managed by the backup and 845 // recovery appliance and known to the management console. The host can be of 846 // type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file 847 // system, etc.), vCenter, or an ESX server. See the Backup and DR 848 // documentation on hosts 849 // (https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications) 850 // for more information. For example, `centos7-01`. 851 Host string `json:"host,omitempty"` 852 // Policies: The names of Backup and DR policies that are associated with a 853 // template and that define when to run a backup, how frequently to run a 854 // backup, and how long to retain the backup image. For example, `onvaults`. 855 Policies []string `json:"policies,omitempty"` 856 // PolicyOptions: The names of Backup and DR advanced policy options of a 857 // policy applying to an application. See the Backup and DR documentation on 858 // policy options 859 // (https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings). 860 // For example, `skipofflineappsincongrp, nounmap`. 861 PolicyOptions []string `json:"policyOptions,omitempty"` 862 // Profile: The name of the Backup and DR resource profile that specifies the 863 // storage media for backups of application and VM data. See the Backup and DR 864 // documentation on profiles 865 // (https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile). 866 // For example, `GCP`. 867 Profile string `json:"profile,omitempty"` 868 // StoragePool: The name of the Backup and DR storage pool that the backup and 869 // recovery appliance is storing data in. The storage pool could be of type 870 // Cloud, Primary, Snapshot, or OnVault. See the Backup and DR documentation on 871 // storage pools 872 // (https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools). 873 // For example, `DiskPoolOne`. 874 StoragePool string `json:"storagePool,omitempty"` 875 // ForceSendFields is a list of field names (e.g. "Appliance") to 876 // unconditionally include in API requests. By default, fields with empty or 877 // default values are omitted from API requests. See 878 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 879 // details. 880 ForceSendFields []string `json:"-"` 881 // NullFields is a list of field names (e.g. "Appliance") to include in API 882 // requests with the JSON null value. By default, fields with empty values are 883 // omitted from API requests. See 884 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 885 NullFields []string `json:"-"` 886 } 887 888 func (s *BackupDisasterRecovery) MarshalJSON() ([]byte, error) { 889 type NoMethod BackupDisasterRecovery 890 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 891 } 892 893 // CloudArmor: Fields related to Google Cloud Armor findings. 894 type CloudArmor struct { 895 // AdaptiveProtection: Information about potential Layer 7 DDoS attacks 896 // identified by Google Cloud Armor Adaptive Protection 897 // (https://cloud.google.com/armor/docs/adaptive-protection-overview). 898 AdaptiveProtection *AdaptiveProtection `json:"adaptiveProtection,omitempty"` 899 // Attack: Information about DDoS attack volume and classification. 900 Attack *Attack `json:"attack,omitempty"` 901 // Duration: Duration of attack from the start until the current moment 902 // (updated every 5 minutes). 903 Duration string `json:"duration,omitempty"` 904 // Requests: Information about incoming requests evaluated by Google Cloud 905 // Armor security policies 906 // (https://cloud.google.com/armor/docs/security-policy-overview). 907 Requests *Requests `json:"requests,omitempty"` 908 // SecurityPolicy: Information about the Google Cloud Armor security policy 909 // (https://cloud.google.com/armor/docs/security-policy-overview) relevant to 910 // the finding. 911 SecurityPolicy *SecurityPolicy `json:"securityPolicy,omitempty"` 912 // ThreatVector: Distinguish between volumetric & protocol DDoS attack and 913 // application layer attacks. For example, "L3_4" for Layer 3 and Layer 4 DDoS 914 // attacks, or "L_7" for Layer 7 DDoS attacks. 915 ThreatVector string `json:"threatVector,omitempty"` 916 // ForceSendFields is a list of field names (e.g. "AdaptiveProtection") to 917 // unconditionally include in API requests. By default, fields with empty or 918 // default values are omitted from API requests. See 919 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 920 // details. 921 ForceSendFields []string `json:"-"` 922 // NullFields is a list of field names (e.g. "AdaptiveProtection") to include 923 // in API requests with the JSON null value. By default, fields with empty 924 // values are omitted from API requests. See 925 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 926 NullFields []string `json:"-"` 927 } 928 929 func (s *CloudArmor) MarshalJSON() ([]byte, error) { 930 type NoMethod CloudArmor 931 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 932 } 933 934 // CloudDlpDataProfile: The data profile 935 // (https://cloud.google.com/dlp/docs/data-profiles) associated with the 936 // finding. 937 type CloudDlpDataProfile struct { 938 // DataProfile: Name of the data profile, for example, 939 // `projects/123/locations/europe/tableProfiles/8383929`. 940 DataProfile string `json:"dataProfile,omitempty"` 941 // ParentType: The resource hierarchy level at which the data profile was 942 // generated. 943 // 944 // Possible values: 945 // "PARENT_TYPE_UNSPECIFIED" - Unspecified parent type. 946 // "ORGANIZATION" - Organization-level configurations. 947 // "PROJECT" - Project-level configurations. 948 ParentType string `json:"parentType,omitempty"` 949 // ForceSendFields is a list of field names (e.g. "DataProfile") to 950 // unconditionally include in API requests. By default, fields with empty or 951 // default values are omitted from API requests. See 952 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 953 // details. 954 ForceSendFields []string `json:"-"` 955 // NullFields is a list of field names (e.g. "DataProfile") to include in API 956 // requests with the JSON null value. By default, fields with empty values are 957 // omitted from API requests. See 958 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 959 NullFields []string `json:"-"` 960 } 961 962 func (s *CloudDlpDataProfile) MarshalJSON() ([]byte, error) { 963 type NoMethod CloudDlpDataProfile 964 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 965 } 966 967 // CloudDlpInspection: Details about the Cloud Data Loss Prevention (Cloud DLP) 968 // inspection job (https://cloud.google.com/dlp/docs/concepts-job-triggers) 969 // that produced the finding. 970 type CloudDlpInspection struct { 971 // FullScan: Whether Cloud DLP scanned the complete resource or a sampled 972 // subset. 973 FullScan bool `json:"fullScan,omitempty"` 974 // InfoType: The type of information (or *infoType 975 // (https://cloud.google.com/dlp/docs/infotypes-reference)*) found, for 976 // example, `EMAIL_ADDRESS` or `STREET_ADDRESS`. 977 InfoType string `json:"infoType,omitempty"` 978 // InfoTypeCount: The number of times Cloud DLP found this infoType within this 979 // job and resource. 980 InfoTypeCount int64 `json:"infoTypeCount,omitempty,string"` 981 // InspectJob: Name of the inspection job, for example, 982 // `projects/123/locations/europe/dlpJobs/i-8383929`. 983 InspectJob string `json:"inspectJob,omitempty"` 984 // ForceSendFields is a list of field names (e.g. "FullScan") to 985 // unconditionally include in API requests. By default, fields with empty or 986 // default values are omitted from API requests. See 987 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 988 // details. 989 ForceSendFields []string `json:"-"` 990 // NullFields is a list of field names (e.g. "FullScan") to include in API 991 // requests with the JSON null value. By default, fields with empty values are 992 // omitted from API requests. See 993 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 994 NullFields []string `json:"-"` 995 } 996 997 func (s *CloudDlpInspection) MarshalJSON() ([]byte, error) { 998 type NoMethod CloudDlpInspection 999 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1000 } 1001 1002 // CloudLoggingEntry: Metadata taken from a Cloud Logging LogEntry 1003 // (https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) 1004 type CloudLoggingEntry struct { 1005 // InsertId: A unique identifier for the log entry. 1006 InsertId string `json:"insertId,omitempty"` 1007 // LogId: The type of the log (part of `log_name`. `log_name` is the resource 1008 // name of the log to which this log entry belongs). For example: 1009 // `cloudresourcemanager.googleapis.com/activity`. Note that this field is not 1010 // URL-encoded, unlike the `LOG_ID` field in `LogEntry`. 1011 LogId string `json:"logId,omitempty"` 1012 // ResourceContainer: The organization, folder, or project of the monitored 1013 // resource that produced this log entry. 1014 ResourceContainer string `json:"resourceContainer,omitempty"` 1015 // Timestamp: The time the event described by the log entry occurred. 1016 Timestamp string `json:"timestamp,omitempty"` 1017 // ForceSendFields is a list of field names (e.g. "InsertId") to 1018 // unconditionally include in API requests. By default, fields with empty or 1019 // default values are omitted from API requests. See 1020 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1021 // details. 1022 ForceSendFields []string `json:"-"` 1023 // NullFields is a list of field names (e.g. "InsertId") to include in API 1024 // requests with the JSON null value. By default, fields with empty values are 1025 // omitted from API requests. See 1026 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1027 NullFields []string `json:"-"` 1028 } 1029 1030 func (s *CloudLoggingEntry) MarshalJSON() ([]byte, error) { 1031 type NoMethod CloudLoggingEntry 1032 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1033 } 1034 1035 // Compliance: Contains compliance information about a security standard 1036 // indicating unmet recommendations. 1037 type Compliance struct { 1038 // Ids: Policies within the standard or benchmark, for example, A.12.4.1 1039 Ids []string `json:"ids,omitempty"` 1040 // Standard: Industry-wide compliance standards or benchmarks, such as CIS, 1041 // PCI, and OWASP. 1042 Standard string `json:"standard,omitempty"` 1043 // Version: Version of the standard or benchmark, for example, 1.1 1044 Version string `json:"version,omitempty"` 1045 // ForceSendFields is a list of field names (e.g. "Ids") to unconditionally 1046 // include in API requests. By default, fields with empty or default values are 1047 // omitted from API requests. See 1048 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1049 // details. 1050 ForceSendFields []string `json:"-"` 1051 // NullFields is a list of field names (e.g. "Ids") to include in API requests 1052 // with the JSON null value. By default, fields with empty values are omitted 1053 // from API requests. See 1054 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1055 NullFields []string `json:"-"` 1056 } 1057 1058 func (s *Compliance) MarshalJSON() ([]byte, error) { 1059 type NoMethod Compliance 1060 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1061 } 1062 1063 // ComplianceSnapshot: Result containing the properties and count of a 1064 // ComplianceSnapshot request. 1065 type ComplianceSnapshot struct { 1066 // Category: The category of Findings matching. 1067 Category string `json:"category,omitempty"` 1068 // CloudProvider: The cloud provider for the compliance snapshot. 1069 // 1070 // Possible values: 1071 // "CLOUD_PROVIDER_UNSPECIFIED" - The cloud provider is unspecified. 1072 // "GOOGLE_CLOUD_PLATFORM" - The cloud provider is Google Cloud Platform. 1073 // "AMAZON_WEB_SERVICES" - The cloud provider is Amazon Web Services. 1074 // "MICROSOFT_AZURE" - The cloud provider is Microsoft Azure. 1075 CloudProvider string `json:"cloudProvider,omitempty"` 1076 // ComplianceStandard: The compliance standard (ie CIS). 1077 ComplianceStandard string `json:"complianceStandard,omitempty"` 1078 // ComplianceVersion: The compliance version (ie 1.3) in CIS 1.3. 1079 ComplianceVersion string `json:"complianceVersion,omitempty"` 1080 // Count: Total count of findings for the given properties. 1081 Count int64 `json:"count,omitempty,string"` 1082 // LeafContainerResource: The leaf container resource name that is closest to 1083 // the snapshot. 1084 LeafContainerResource string `json:"leafContainerResource,omitempty"` 1085 // Name: The compliance snapshot name. Format: //sources//complianceSnapshots/ 1086 Name string `json:"name,omitempty"` 1087 // SnapshotTime: The snapshot time of the snapshot. 1088 SnapshotTime string `json:"snapshotTime,omitempty"` 1089 // ForceSendFields is a list of field names (e.g. "Category") to 1090 // unconditionally include in API requests. By default, fields with empty or 1091 // default values are omitted from API requests. See 1092 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1093 // details. 1094 ForceSendFields []string `json:"-"` 1095 // NullFields is a list of field names (e.g. "Category") to include in API 1096 // requests with the JSON null value. By default, fields with empty values are 1097 // omitted from API requests. See 1098 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1099 NullFields []string `json:"-"` 1100 } 1101 1102 func (s *ComplianceSnapshot) MarshalJSON() ([]byte, error) { 1103 type NoMethod ComplianceSnapshot 1104 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1105 } 1106 1107 // Config: Configuration of a module. 1108 type Config struct { 1109 // ModuleEnablementState: The state of enablement for the module at its level 1110 // of the resource hierarchy. 1111 // 1112 // Possible values: 1113 // "ENABLEMENT_STATE_UNSPECIFIED" - Default value. This value is unused. 1114 // "INHERITED" - State is inherited from the parent resource. 1115 // "ENABLED" - State is enabled. 1116 // "DISABLED" - State is disabled. 1117 ModuleEnablementState string `json:"moduleEnablementState,omitempty"` 1118 // Value: The configuration value for the module. The absence of this field 1119 // implies its inheritance from the parent. 1120 Value googleapi.RawMessage `json:"value,omitempty"` 1121 // ForceSendFields is a list of field names (e.g. "ModuleEnablementState") to 1122 // unconditionally include in API requests. By default, fields with empty or 1123 // default values are omitted from API requests. See 1124 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1125 // details. 1126 ForceSendFields []string `json:"-"` 1127 // NullFields is a list of field names (e.g. "ModuleEnablementState") to 1128 // include in API requests with the JSON null value. By default, fields with 1129 // empty values are omitted from API requests. See 1130 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1131 NullFields []string `json:"-"` 1132 } 1133 1134 func (s *Config) MarshalJSON() ([]byte, error) { 1135 type NoMethod Config 1136 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1137 } 1138 1139 // Connection: Contains information about the IP connection associated with the 1140 // finding. 1141 type Connection struct { 1142 // DestinationIp: Destination IP address. Not present for sockets that are 1143 // listening and not connected. 1144 DestinationIp string `json:"destinationIp,omitempty"` 1145 // DestinationPort: Destination port. Not present for sockets that are 1146 // listening and not connected. 1147 DestinationPort int64 `json:"destinationPort,omitempty"` 1148 // Protocol: IANA Internet Protocol Number such as TCP(6) and UDP(17). 1149 // 1150 // Possible values: 1151 // "PROTOCOL_UNSPECIFIED" - Unspecified protocol (not HOPOPT). 1152 // "ICMP" - Internet Control Message Protocol. 1153 // "TCP" - Transmission Control Protocol. 1154 // "UDP" - User Datagram Protocol. 1155 // "GRE" - Generic Routing Encapsulation. 1156 // "ESP" - Encap Security Payload. 1157 Protocol string `json:"protocol,omitempty"` 1158 // SourceIp: Source IP address. 1159 SourceIp string `json:"sourceIp,omitempty"` 1160 // SourcePort: Source port. 1161 SourcePort int64 `json:"sourcePort,omitempty"` 1162 // ForceSendFields is a list of field names (e.g. "DestinationIp") to 1163 // unconditionally include in API requests. By default, fields with empty or 1164 // default values are 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. "DestinationIp") 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 *Connection) MarshalJSON() ([]byte, error) { 1176 type NoMethod Connection 1177 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1178 } 1179 1180 // Contact: The email address of a contact. 1181 type Contact struct { 1182 // Email: An email address. For example, "person123@company.com". 1183 Email string `json:"email,omitempty"` 1184 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally 1185 // include in API requests. By default, fields with empty or default values are 1186 // omitted from API requests. See 1187 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1188 // details. 1189 ForceSendFields []string `json:"-"` 1190 // NullFields is a list of field names (e.g. "Email") to include in API 1191 // requests with the JSON null value. By default, fields with empty values are 1192 // omitted from API requests. See 1193 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1194 NullFields []string `json:"-"` 1195 } 1196 1197 func (s *Contact) MarshalJSON() ([]byte, error) { 1198 type NoMethod Contact 1199 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1200 } 1201 1202 // ContactDetails: Details about specific contacts 1203 type ContactDetails struct { 1204 // Contacts: A list of contacts 1205 Contacts []*Contact `json:"contacts,omitempty"` 1206 // ForceSendFields is a list of field names (e.g. "Contacts") to 1207 // unconditionally include in API requests. By default, fields with empty or 1208 // default values are omitted from API requests. See 1209 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1210 // details. 1211 ForceSendFields []string `json:"-"` 1212 // NullFields is a list of field names (e.g. "Contacts") to include in API 1213 // requests with the JSON null value. By default, fields with empty values are 1214 // omitted from API requests. See 1215 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1216 NullFields []string `json:"-"` 1217 } 1218 1219 func (s *ContactDetails) MarshalJSON() ([]byte, error) { 1220 type NoMethod ContactDetails 1221 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1222 } 1223 1224 // Container: Container associated with the finding. 1225 type Container struct { 1226 // CreateTime: The time that the container was created. 1227 CreateTime string `json:"createTime,omitempty"` 1228 // ImageId: Optional container image ID, if provided by the container runtime. 1229 // Uniquely identifies the container image launched using a container image 1230 // digest. 1231 ImageId string `json:"imageId,omitempty"` 1232 // Labels: Container labels, as provided by the container runtime. 1233 Labels []*Label `json:"labels,omitempty"` 1234 // Name: Name of the container. 1235 Name string `json:"name,omitempty"` 1236 // Uri: Container image URI provided when configuring a pod or container. This 1237 // string can identify a container image version using mutable tags. 1238 Uri string `json:"uri,omitempty"` 1239 // ForceSendFields is a list of field names (e.g. "CreateTime") to 1240 // unconditionally include in API requests. By default, fields with empty or 1241 // default values are omitted from API requests. See 1242 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1243 // details. 1244 ForceSendFields []string `json:"-"` 1245 // NullFields is a list of field names (e.g. "CreateTime") to include in API 1246 // requests with the JSON null value. By default, fields with empty values are 1247 // omitted from API requests. See 1248 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1249 NullFields []string `json:"-"` 1250 } 1251 1252 func (s *Container) MarshalJSON() ([]byte, error) { 1253 type NoMethod Container 1254 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1255 } 1256 1257 // ContainerThreatDetectionSettings: Resource capturing the settings for the 1258 // Container Threat Detection service. 1259 type ContainerThreatDetectionSettings struct { 1260 // Modules: The configurations including the state of enablement for the 1261 // service's different modules. The absence of a module in the map implies its 1262 // configuration is inherited from its parent's. 1263 Modules map[string]Config `json:"modules,omitempty"` 1264 // Name: The resource name of the ContainerThreatDetectionSettings. Formats: * 1265 // organizations/{organization}/containerThreatDetectionSettings * 1266 // folders/{folder}/containerThreatDetectionSettings * 1267 // projects/{project}/containerThreatDetectionSettings * 1268 // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDet 1269 // ectionSettings 1270 Name string `json:"name,omitempty"` 1271 // ServiceAccount: Output only. The service account used by Container Threat 1272 // Detection for scanning. Service accounts are scoped at the project level 1273 // meaning this field will be empty at any level above a project. 1274 ServiceAccount string `json:"serviceAccount,omitempty"` 1275 // ServiceEnablementState: The state of enablement for the service at its level 1276 // of the resource hierarchy. A DISABLED state will override all module 1277 // enablement_states to DISABLED. 1278 // 1279 // Possible values: 1280 // "ENABLEMENT_STATE_UNSPECIFIED" - Default value. This value is unused. 1281 // "INHERITED" - State is inherited from the parent resource. 1282 // "ENABLED" - State is enabled. 1283 // "DISABLED" - State is disabled. 1284 ServiceEnablementState string `json:"serviceEnablementState,omitempty"` 1285 // UpdateTime: Output only. The time the settings were last updated. 1286 UpdateTime string `json:"updateTime,omitempty"` 1287 1288 // ServerResponse contains the HTTP response code and headers from the server. 1289 googleapi.ServerResponse `json:"-"` 1290 // ForceSendFields is a list of field names (e.g. "Modules") to unconditionally 1291 // include in API requests. By default, fields with empty or default values are 1292 // omitted from API requests. See 1293 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1294 // details. 1295 ForceSendFields []string `json:"-"` 1296 // NullFields is a list of field names (e.g. "Modules") to include in API 1297 // requests with the JSON null value. By default, fields with empty values are 1298 // omitted from API requests. See 1299 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1300 NullFields []string `json:"-"` 1301 } 1302 1303 func (s *ContainerThreatDetectionSettings) MarshalJSON() ([]byte, error) { 1304 type NoMethod ContainerThreatDetectionSettings 1305 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1306 } 1307 1308 // Cve: CVE stands for Common Vulnerabilities and Exposures. Information from 1309 // the CVE record (https://www.cve.org/ResourcesSupport/Glossary) that 1310 // describes this vulnerability. 1311 type Cve struct { 1312 // Cvssv3: Describe Common Vulnerability Scoring System specified at 1313 // https://www.first.org/cvss/v3.1/specification-document 1314 Cvssv3 *Cvssv3 `json:"cvssv3,omitempty"` 1315 // ExploitationActivity: The exploitation activity of the vulnerability in the 1316 // wild. 1317 // 1318 // Possible values: 1319 // "EXPLOITATION_ACTIVITY_UNSPECIFIED" - Invalid or empty value. 1320 // "WIDE" - Exploitation has been reported or confirmed to widely occur. 1321 // "CONFIRMED" - Limited reported or confirmed exploitation activities. 1322 // "AVAILABLE" - Exploit is publicly available. 1323 // "ANTICIPATED" - No known exploitation activity, but has a high potential 1324 // for exploitation. 1325 // "NO_KNOWN" - No known exploitation activity. 1326 ExploitationActivity string `json:"exploitationActivity,omitempty"` 1327 // Id: The unique identifier for the vulnerability. e.g. CVE-2021-34527 1328 Id string `json:"id,omitempty"` 1329 // Impact: The potential impact of the vulnerability if it was to be exploited. 1330 // 1331 // Possible values: 1332 // "RISK_RATING_UNSPECIFIED" - Invalid or empty value. 1333 // "LOW" - Exploitation would have little to no security impact. 1334 // "MEDIUM" - Exploitation would enable attackers to perform activities, or 1335 // could allow attackers to have a direct impact, but would require additional 1336 // steps. 1337 // "HIGH" - Exploitation would enable attackers to have a notable direct 1338 // impact without needing to overcome any major mitigating factors. 1339 // "CRITICAL" - Exploitation would fundamentally undermine the security of 1340 // affected systems, enable actors to perform significant attacks with minimal 1341 // effort, with little to no mitigating factors to overcome. 1342 Impact string `json:"impact,omitempty"` 1343 // ObservedInTheWild: Whether or not the vulnerability has been observed in the 1344 // wild. 1345 ObservedInTheWild bool `json:"observedInTheWild,omitempty"` 1346 // References: Additional information about the CVE. e.g. 1347 // https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 1348 References []*Reference `json:"references,omitempty"` 1349 // UpstreamFixAvailable: Whether upstream fix is available for the CVE. 1350 UpstreamFixAvailable bool `json:"upstreamFixAvailable,omitempty"` 1351 // ZeroDay: Whether or not the vulnerability was zero day when the finding was 1352 // published. 1353 ZeroDay bool `json:"zeroDay,omitempty"` 1354 // ForceSendFields is a list of field names (e.g. "Cvssv3") to unconditionally 1355 // include in API requests. By default, fields with empty or default values are 1356 // omitted from API requests. See 1357 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1358 // details. 1359 ForceSendFields []string `json:"-"` 1360 // NullFields is a list of field names (e.g. "Cvssv3") to include in API 1361 // requests with the JSON null value. By default, fields with empty values are 1362 // omitted from API requests. See 1363 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1364 NullFields []string `json:"-"` 1365 } 1366 1367 func (s *Cve) MarshalJSON() ([]byte, error) { 1368 type NoMethod Cve 1369 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1370 } 1371 1372 // Cvssv3: Common Vulnerability Scoring System version 3. 1373 type Cvssv3 struct { 1374 // AttackComplexity: This metric describes the conditions beyond the attacker's 1375 // control that must exist in order to exploit the vulnerability. 1376 // 1377 // Possible values: 1378 // "ATTACK_COMPLEXITY_UNSPECIFIED" - Invalid value. 1379 // "ATTACK_COMPLEXITY_LOW" - Specialized access conditions or extenuating 1380 // circumstances do not exist. An attacker can expect repeatable success when 1381 // attacking the vulnerable component. 1382 // "ATTACK_COMPLEXITY_HIGH" - A successful attack depends on conditions 1383 // beyond the attacker's control. That is, a successful attack cannot be 1384 // accomplished at will, but requires the attacker to invest in some measurable 1385 // amount of effort in preparation or execution against the vulnerable 1386 // component before a successful attack can be expected. 1387 AttackComplexity string `json:"attackComplexity,omitempty"` 1388 // AttackVector: Base Metrics Represents the intrinsic characteristics of a 1389 // vulnerability that are constant over time and across user environments. This 1390 // metric reflects the context by which vulnerability exploitation is possible. 1391 // 1392 // Possible values: 1393 // "ATTACK_VECTOR_UNSPECIFIED" - Invalid value. 1394 // "ATTACK_VECTOR_NETWORK" - The vulnerable component is bound to the network 1395 // stack and the set of possible attackers extends beyond the other options 1396 // listed below, up to and including the entire Internet. 1397 // "ATTACK_VECTOR_ADJACENT" - The vulnerable component is bound to the 1398 // network stack, but the attack is limited at the protocol level to a 1399 // logically adjacent topology. 1400 // "ATTACK_VECTOR_LOCAL" - The vulnerable component is not bound to the 1401 // network stack and the attacker's path is via read/write/execute 1402 // capabilities. 1403 // "ATTACK_VECTOR_PHYSICAL" - The attack requires the attacker to physically 1404 // touch or manipulate the vulnerable component. 1405 AttackVector string `json:"attackVector,omitempty"` 1406 // AvailabilityImpact: This metric measures the impact to the availability of 1407 // the impacted component resulting from a successfully exploited 1408 // vulnerability. 1409 // 1410 // Possible values: 1411 // "IMPACT_UNSPECIFIED" - Invalid value. 1412 // "IMPACT_HIGH" - High impact. 1413 // "IMPACT_LOW" - Low impact. 1414 // "IMPACT_NONE" - No impact. 1415 AvailabilityImpact string `json:"availabilityImpact,omitempty"` 1416 // BaseScore: The base score is a function of the base metric scores. 1417 BaseScore float64 `json:"baseScore,omitempty"` 1418 // ConfidentialityImpact: This metric measures the impact to the 1419 // confidentiality of the information resources managed by a software component 1420 // due to a successfully exploited vulnerability. 1421 // 1422 // Possible values: 1423 // "IMPACT_UNSPECIFIED" - Invalid value. 1424 // "IMPACT_HIGH" - High impact. 1425 // "IMPACT_LOW" - Low impact. 1426 // "IMPACT_NONE" - No impact. 1427 ConfidentialityImpact string `json:"confidentialityImpact,omitempty"` 1428 // IntegrityImpact: This metric measures the impact to integrity of a 1429 // successfully exploited vulnerability. 1430 // 1431 // Possible values: 1432 // "IMPACT_UNSPECIFIED" - Invalid value. 1433 // "IMPACT_HIGH" - High impact. 1434 // "IMPACT_LOW" - Low impact. 1435 // "IMPACT_NONE" - No impact. 1436 IntegrityImpact string `json:"integrityImpact,omitempty"` 1437 // PrivilegesRequired: This metric describes the level of privileges an 1438 // attacker must possess before successfully exploiting the vulnerability. 1439 // 1440 // Possible values: 1441 // "PRIVILEGES_REQUIRED_UNSPECIFIED" - Invalid value. 1442 // "PRIVILEGES_REQUIRED_NONE" - The attacker is unauthorized prior to attack, 1443 // and therefore does not require any access to settings or files of the 1444 // vulnerable system to carry out an attack. 1445 // "PRIVILEGES_REQUIRED_LOW" - The attacker requires privileges that provide 1446 // basic user capabilities that could normally affect only settings and files 1447 // owned by a user. Alternatively, an attacker with Low privileges has the 1448 // ability to access only non-sensitive resources. 1449 // "PRIVILEGES_REQUIRED_HIGH" - The attacker requires privileges that provide 1450 // significant (e.g., administrative) control over the vulnerable component 1451 // allowing access to component-wide settings and files. 1452 PrivilegesRequired string `json:"privilegesRequired,omitempty"` 1453 // Scope: The Scope metric captures whether a vulnerability in one vulnerable 1454 // component impacts resources in components beyond its security scope. 1455 // 1456 // Possible values: 1457 // "SCOPE_UNSPECIFIED" - Invalid value. 1458 // "SCOPE_UNCHANGED" - An exploited vulnerability can only affect resources 1459 // managed by the same security authority. 1460 // "SCOPE_CHANGED" - An exploited vulnerability can affect resources beyond 1461 // the security scope managed by the security authority of the vulnerable 1462 // component. 1463 Scope string `json:"scope,omitempty"` 1464 // UserInteraction: This metric captures the requirement for a human user, 1465 // other than the attacker, to participate in the successful compromise of the 1466 // vulnerable component. 1467 // 1468 // Possible values: 1469 // "USER_INTERACTION_UNSPECIFIED" - Invalid value. 1470 // "USER_INTERACTION_NONE" - The vulnerable system can be exploited without 1471 // interaction from any user. 1472 // "USER_INTERACTION_REQUIRED" - Successful exploitation of this 1473 // vulnerability requires a user to take some action before the vulnerability 1474 // can be exploited. 1475 UserInteraction string `json:"userInteraction,omitempty"` 1476 // ForceSendFields is a list of field names (e.g. "AttackComplexity") to 1477 // unconditionally include in API requests. By default, fields with empty or 1478 // default values are omitted from API requests. See 1479 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1480 // details. 1481 ForceSendFields []string `json:"-"` 1482 // NullFields is a list of field names (e.g. "AttackComplexity") to include in 1483 // API requests with the JSON null value. By default, fields with empty values 1484 // are omitted from API requests. See 1485 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1486 NullFields []string `json:"-"` 1487 } 1488 1489 func (s *Cvssv3) MarshalJSON() ([]byte, error) { 1490 type NoMethod Cvssv3 1491 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1492 } 1493 1494 func (s *Cvssv3) UnmarshalJSON(data []byte) error { 1495 type NoMethod Cvssv3 1496 var s1 struct { 1497 BaseScore gensupport.JSONFloat64 `json:"baseScore"` 1498 *NoMethod 1499 } 1500 s1.NoMethod = (*NoMethod)(s) 1501 if err := json.Unmarshal(data, &s1); err != nil { 1502 return err 1503 } 1504 s.BaseScore = float64(s1.BaseScore) 1505 return nil 1506 } 1507 1508 // Database: Represents database access information, such as queries. A 1509 // database may be a sub-resource of an instance (as in the case of Cloud SQL 1510 // instances or Cloud Spanner instances), or the database instance itself. Some 1511 // database resources might not have the full resource name 1512 // (https://google.aip.dev/122#full-resource-names) populated because these 1513 // resource types, such as Cloud SQL databases, are not yet supported by Cloud 1514 // Asset Inventory. In these cases only the display name is provided. 1515 type Database struct { 1516 // DisplayName: The human-readable name of the database that the user connected 1517 // to. 1518 DisplayName string `json:"displayName,omitempty"` 1519 // Grantees: The target usernames, roles, or groups of an SQL privilege grant, 1520 // which is not an IAM policy change. 1521 Grantees []string `json:"grantees,omitempty"` 1522 // Name: Some database resources may not have the full resource name 1523 // (https://google.aip.dev/122#full-resource-names) populated because these 1524 // resource types are not yet supported by Cloud Asset Inventory (e.g. Cloud 1525 // SQL databases). In these cases only the display name will be provided. The 1526 // full resource name (https://google.aip.dev/122#full-resource-names) of the 1527 // database that the user connected to, if it is supported by Cloud Asset 1528 // Inventory. 1529 Name string `json:"name,omitempty"` 1530 // Query: The SQL statement that is associated with the database access. 1531 Query string `json:"query,omitempty"` 1532 // UserName: The username used to connect to the database. The username might 1533 // not be an IAM principal and does not have a set format. 1534 UserName string `json:"userName,omitempty"` 1535 // Version: The version of the database, for example, POSTGRES_14. See the 1536 // complete list 1537 // (https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). 1538 Version string `json:"version,omitempty"` 1539 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1540 // unconditionally include in API requests. By default, fields with empty or 1541 // default values are omitted from API requests. See 1542 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1543 // details. 1544 ForceSendFields []string `json:"-"` 1545 // NullFields is a list of field names (e.g. "DisplayName") to include in API 1546 // requests with the JSON null value. By default, fields with empty values are 1547 // omitted from API requests. See 1548 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1549 NullFields []string `json:"-"` 1550 } 1551 1552 func (s *Database) MarshalJSON() ([]byte, error) { 1553 type NoMethod Database 1554 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1555 } 1556 1557 // Details: Details of a subscription. 1558 type Details struct { 1559 // EndTime: The time the subscription has or will end. 1560 EndTime string `json:"endTime,omitempty"` 1561 // StartTime: The time the subscription has or will start. 1562 StartTime string `json:"startTime,omitempty"` 1563 // Type: The type of subscription 1564 // 1565 // Possible values: 1566 // "TYPE_UNSPECIFIED" - Default value. This value is unused. 1567 // "STANDARD" - The standard subscription. 1568 // "TRIAL" - The trial subscription. 1569 // "ALPHA" - The alpha subscription. 1570 // "DEMO" - The demo subscription for channel partners. 1571 // "PAY_AS_YOU_GO" - Pay-as-you-go subscription. 1572 Type string `json:"type,omitempty"` 1573 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally 1574 // include in API requests. By default, fields with empty or default values are 1575 // omitted from API requests. See 1576 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1577 // details. 1578 ForceSendFields []string `json:"-"` 1579 // NullFields is a list of field names (e.g. "EndTime") to include in API 1580 // requests with the JSON null value. By default, fields with empty values are 1581 // omitted from API requests. See 1582 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1583 NullFields []string `json:"-"` 1584 } 1585 1586 func (s *Details) MarshalJSON() ([]byte, error) { 1587 type NoMethod Details 1588 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1589 } 1590 1591 // Detection: Memory hash detection contributing to the binary family match. 1592 type Detection struct { 1593 // Binary: The name of the binary associated with the memory hash signature 1594 // detection. 1595 Binary string `json:"binary,omitempty"` 1596 // PercentPagesMatched: The percentage of memory page hashes in the signature 1597 // that were matched. 1598 PercentPagesMatched float64 `json:"percentPagesMatched,omitempty"` 1599 // ForceSendFields is a list of field names (e.g. "Binary") to unconditionally 1600 // include in API requests. By default, fields with empty or default values are 1601 // 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. "Binary") 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 *Detection) MarshalJSON() ([]byte, error) { 1613 type NoMethod Detection 1614 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1615 } 1616 1617 func (s *Detection) UnmarshalJSON(data []byte) error { 1618 type NoMethod Detection 1619 var s1 struct { 1620 PercentPagesMatched gensupport.JSONFloat64 `json:"percentPagesMatched"` 1621 *NoMethod 1622 } 1623 s1.NoMethod = (*NoMethod)(s) 1624 if err := json.Unmarshal(data, &s1); err != nil { 1625 return err 1626 } 1627 s.PercentPagesMatched = float64(s1.PercentPagesMatched) 1628 return nil 1629 } 1630 1631 // DiskPath: Path of the file in terms of underlying disk/partition 1632 // identifiers. 1633 type DiskPath struct { 1634 // PartitionUuid: UUID of the partition (format 1635 // https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid) 1636 PartitionUuid string `json:"partitionUuid,omitempty"` 1637 // RelativePath: Relative path of the file in the partition as a JSON encoded 1638 // string. Example: /home/user1/executable_file.sh 1639 RelativePath string `json:"relativePath,omitempty"` 1640 // ForceSendFields is a list of field names (e.g. "PartitionUuid") to 1641 // unconditionally include in API requests. By default, fields with empty or 1642 // default values are omitted from API requests. See 1643 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1644 // details. 1645 ForceSendFields []string `json:"-"` 1646 // NullFields is a list of field names (e.g. "PartitionUuid") to include in API 1647 // requests with the JSON null value. By default, fields with empty values are 1648 // omitted from API requests. See 1649 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1650 NullFields []string `json:"-"` 1651 } 1652 1653 func (s *DiskPath) MarshalJSON() ([]byte, error) { 1654 type NoMethod DiskPath 1655 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1656 } 1657 1658 // EnvironmentVariable: A name-value pair representing an environment variable 1659 // used in an operating system process. 1660 type EnvironmentVariable struct { 1661 // Name: Environment variable name as a JSON encoded string. 1662 Name string `json:"name,omitempty"` 1663 // Val: Environment variable value as a JSON encoded string. 1664 Val string `json:"val,omitempty"` 1665 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 1666 // include in API requests. By default, fields with empty or default values are 1667 // omitted from API requests. See 1668 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1669 // details. 1670 ForceSendFields []string `json:"-"` 1671 // NullFields is a list of field names (e.g. "Name") to include in API requests 1672 // with the JSON null value. By default, fields with empty values are omitted 1673 // from API requests. See 1674 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1675 NullFields []string `json:"-"` 1676 } 1677 1678 func (s *EnvironmentVariable) MarshalJSON() ([]byte, error) { 1679 type NoMethod EnvironmentVariable 1680 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1681 } 1682 1683 // EventThreatDetectionSettings: Resource capturing the settings for the Event 1684 // Threat Detection service. 1685 type EventThreatDetectionSettings struct { 1686 // Modules: The configurations including the state of enablement for the 1687 // service's different modules. The absence of a module in the map implies its 1688 // configuration is inherited from its parent's. 1689 Modules map[string]Config `json:"modules,omitempty"` 1690 // Name: The resource name of the EventThreatDetectionSettings. Formats: * 1691 // organizations/{organization}/eventThreatDetectionSettings * 1692 // folders/{folder}/eventThreatDetectionSettings * 1693 // projects/{project}/eventThreatDetectionSettings 1694 Name string `json:"name,omitempty"` 1695 // ServiceEnablementState: The state of enablement for the service at its level 1696 // of the resource hierarchy. A DISABLED state will override all module 1697 // enablement_states to DISABLED. 1698 // 1699 // Possible values: 1700 // "ENABLEMENT_STATE_UNSPECIFIED" - Default value. This value is unused. 1701 // "INHERITED" - State is inherited from the parent resource. 1702 // "ENABLED" - State is enabled. 1703 // "DISABLED" - State is disabled. 1704 ServiceEnablementState string `json:"serviceEnablementState,omitempty"` 1705 // UpdateTime: Output only. The time the settings were last updated. 1706 UpdateTime string `json:"updateTime,omitempty"` 1707 1708 // ServerResponse contains the HTTP response code and headers from the server. 1709 googleapi.ServerResponse `json:"-"` 1710 // ForceSendFields is a list of field names (e.g. "Modules") to unconditionally 1711 // include in API requests. By default, fields with empty or default values are 1712 // omitted from API requests. See 1713 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1714 // details. 1715 ForceSendFields []string `json:"-"` 1716 // NullFields is a list of field names (e.g. "Modules") to include in API 1717 // requests with the JSON null value. By default, fields with empty values are 1718 // omitted from API requests. See 1719 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1720 NullFields []string `json:"-"` 1721 } 1722 1723 func (s *EventThreatDetectionSettings) MarshalJSON() ([]byte, error) { 1724 type NoMethod EventThreatDetectionSettings 1725 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1726 } 1727 1728 // ExfilResource: Resource where data was exfiltrated from or exfiltrated to. 1729 type ExfilResource struct { 1730 // Components: Subcomponents of the asset that was exfiltrated, like URIs used 1731 // during exfiltration, table names, databases, and filenames. For example, 1732 // multiple tables might have been exfiltrated from the same Cloud SQL 1733 // instance, or multiple files might have been exfiltrated from the same Cloud 1734 // Storage bucket. 1735 Components []string `json:"components,omitempty"` 1736 // Name: The resource's full resource name 1737 // (https://cloud.google.com/apis/design/resource_names#full_resource_name). 1738 Name string `json:"name,omitempty"` 1739 // ForceSendFields is a list of field names (e.g. "Components") to 1740 // unconditionally include in API requests. By default, fields with empty or 1741 // default values are omitted from API requests. See 1742 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1743 // details. 1744 ForceSendFields []string `json:"-"` 1745 // NullFields is a list of field names (e.g. "Components") to include in API 1746 // requests with the JSON null value. By default, fields with empty values are 1747 // omitted from API requests. See 1748 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1749 NullFields []string `json:"-"` 1750 } 1751 1752 func (s *ExfilResource) MarshalJSON() ([]byte, error) { 1753 type NoMethod ExfilResource 1754 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1755 } 1756 1757 // Exfiltration: Exfiltration represents a data exfiltration attempt from one 1758 // or more sources to one or more targets. The `sources` attribute lists the 1759 // sources of the exfiltrated data. The `targets` attribute lists the 1760 // destinations the data was copied to. 1761 type Exfiltration struct { 1762 // Sources: If there are multiple sources, then the data is considered "joined" 1763 // between them. For instance, BigQuery can join multiple tables, and each 1764 // table would be considered a source. 1765 Sources []*ExfilResource `json:"sources,omitempty"` 1766 // Targets: If there are multiple targets, each target would get a complete 1767 // copy of the "joined" source data. 1768 Targets []*ExfilResource `json:"targets,omitempty"` 1769 // TotalExfiltratedBytes: Total exfiltrated bytes processed for the entire job. 1770 TotalExfiltratedBytes int64 `json:"totalExfiltratedBytes,omitempty,string"` 1771 // ForceSendFields is a list of field names (e.g. "Sources") to unconditionally 1772 // include in API requests. By default, fields with empty or default values are 1773 // omitted from API requests. See 1774 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1775 // details. 1776 ForceSendFields []string `json:"-"` 1777 // NullFields is a list of field names (e.g. "Sources") to include in API 1778 // requests with the JSON null value. By default, fields with empty values are 1779 // omitted from API requests. See 1780 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1781 NullFields []string `json:"-"` 1782 } 1783 1784 func (s *Exfiltration) MarshalJSON() ([]byte, error) { 1785 type NoMethod Exfiltration 1786 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1787 } 1788 1789 // Expr: Represents a textual expression in the Common Expression Language 1790 // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics 1791 // of CEL are documented at https://github.com/google/cel-spec. Example 1792 // (Comparison): title: "Summary size limit" description: "Determines if a 1793 // summary is less than 100 chars" expression: "document.summary.size() < 100" 1794 // Example (Equality): title: "Requestor is owner" description: "Determines if 1795 // requestor is the document owner" expression: "document.owner == 1796 // request.auth.claims.email" Example (Logic): title: "Public documents" 1797 // description: "Determine whether the document should be publicly visible" 1798 // expression: "document.type != 'private' && document.type != 'internal'" 1799 // Example (Data Manipulation): title: "Notification string" description: 1800 // "Create a notification string with a timestamp." expression: "'New message 1801 // received at ' + string(document.create_time)" The exact variables and 1802 // functions that may be referenced within an expression are determined by the 1803 // service that evaluates it. See the service documentation for additional 1804 // information. 1805 type Expr struct { 1806 // Description: Optional. Description of the expression. This is a longer text 1807 // which describes the expression, e.g. when hovered over it in a UI. 1808 Description string `json:"description,omitempty"` 1809 // Expression: Textual representation of an expression in Common Expression 1810 // Language syntax. 1811 Expression string `json:"expression,omitempty"` 1812 // Location: Optional. String indicating the location of the expression for 1813 // error reporting, e.g. a file name and a position in the file. 1814 Location string `json:"location,omitempty"` 1815 // Title: Optional. Title for the expression, i.e. a short string describing 1816 // its purpose. This can be used e.g. in UIs which allow to enter the 1817 // expression. 1818 Title string `json:"title,omitempty"` 1819 // ForceSendFields is a list of field names (e.g. "Description") to 1820 // unconditionally include in API requests. By default, fields with empty or 1821 // default values are omitted from API requests. See 1822 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1823 // details. 1824 ForceSendFields []string `json:"-"` 1825 // NullFields is a list of field names (e.g. "Description") to include in API 1826 // requests with the JSON null value. By default, fields with empty values are 1827 // omitted from API requests. See 1828 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1829 NullFields []string `json:"-"` 1830 } 1831 1832 func (s *Expr) MarshalJSON() ([]byte, error) { 1833 type NoMethod Expr 1834 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1835 } 1836 1837 // File: File information about the related binary/library used by an 1838 // executable, or the script used by a script interpreter 1839 type File struct { 1840 // Contents: Prefix of the file contents as a JSON-encoded string. 1841 Contents string `json:"contents,omitempty"` 1842 // DiskPath: Path of the file in terms of underlying disk/partition 1843 // identifiers. 1844 DiskPath *DiskPath `json:"diskPath,omitempty"` 1845 // HashedSize: The length in bytes of the file prefix that was hashed. If 1846 // hashed_size == size, any hashes reported represent the entire file. 1847 HashedSize int64 `json:"hashedSize,omitempty,string"` 1848 // PartiallyHashed: True when the hash covers only a prefix of the file. 1849 PartiallyHashed bool `json:"partiallyHashed,omitempty"` 1850 // Path: Absolute path of the file as a JSON encoded string. 1851 Path string `json:"path,omitempty"` 1852 // Sha256: SHA256 hash of the first hashed_size bytes of the file encoded as a 1853 // hex string. If hashed_size == size, sha256 represents the SHA256 hash of the 1854 // entire file. 1855 Sha256 string `json:"sha256,omitempty"` 1856 // Size: Size of the file in bytes. 1857 Size int64 `json:"size,omitempty,string"` 1858 // ForceSendFields is a list of field names (e.g. "Contents") to 1859 // unconditionally include in API requests. By default, fields with empty or 1860 // default values are omitted from API requests. See 1861 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1862 // details. 1863 ForceSendFields []string `json:"-"` 1864 // NullFields is a list of field names (e.g. "Contents") to include in API 1865 // requests with the JSON null value. By default, fields with empty values are 1866 // omitted from API requests. See 1867 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1868 NullFields []string `json:"-"` 1869 } 1870 1871 func (s *File) MarshalJSON() ([]byte, error) { 1872 type NoMethod File 1873 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1874 } 1875 1876 // Finding: Security Command Center finding. A finding is a record of 1877 // assessment data like security, risk, health, or privacy, that is ingested 1878 // into Security Command Center for presentation, notification, analysis, 1879 // policy testing, and enforcement. For example, a cross-site scripting (XSS) 1880 // vulnerability in an App Engine application is a finding. 1881 type Finding struct { 1882 // Access: Access details associated with the finding, such as more information 1883 // on the caller, which method was accessed, and from where. 1884 Access *Access `json:"access,omitempty"` 1885 // Application: Represents an application associated with the finding. 1886 Application *Application `json:"application,omitempty"` 1887 // AttackExposure: The results of an attack path simulation relevant to this 1888 // finding. 1889 AttackExposure *AttackExposure `json:"attackExposure,omitempty"` 1890 // BackupDisasterRecovery: Fields related to Backup and DR findings. 1891 BackupDisasterRecovery *BackupDisasterRecovery `json:"backupDisasterRecovery,omitempty"` 1892 // CanonicalName: The canonical name of the finding. It's either 1893 // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", 1894 // "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or 1895 // "projects/{project_number}/sources/{source_id}/findings/{finding_id}", 1896 // depending on the closest CRM ancestor of the resource associated with the 1897 // finding. 1898 CanonicalName string `json:"canonicalName,omitempty"` 1899 // Category: The additional taxonomy group within findings from a given source. 1900 // This field is immutable after creation time. Example: "XSS_FLASH_INJECTION" 1901 Category string `json:"category,omitempty"` 1902 // CloudArmor: Fields related to Cloud Armor findings. 1903 CloudArmor *CloudArmor `json:"cloudArmor,omitempty"` 1904 // CloudDlpDataProfile: Cloud DLP data profile that is associated with the 1905 // finding. 1906 CloudDlpDataProfile *CloudDlpDataProfile `json:"cloudDlpDataProfile,omitempty"` 1907 // CloudDlpInspection: Cloud Data Loss Prevention (Cloud DLP) inspection 1908 // results that are associated with the finding. 1909 CloudDlpInspection *CloudDlpInspection `json:"cloudDlpInspection,omitempty"` 1910 // Compliances: Contains compliance information for security standards 1911 // associated to the finding. 1912 Compliances []*Compliance `json:"compliances,omitempty"` 1913 // Connections: Contains information about the IP connection associated with 1914 // the finding. 1915 Connections []*Connection `json:"connections,omitempty"` 1916 // Contacts: Output only. Map containing the points of contact for the given 1917 // finding. The key represents the type of contact, while the value contains a 1918 // list of all the contacts that pertain. Please refer to: 1919 // https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories 1920 // { "security": { "contacts": [ { "email": "person1@company.com" }, { "email": 1921 // "person2@company.com" } ] } } 1922 Contacts map[string]ContactDetails `json:"contacts,omitempty"` 1923 // Containers: Containers associated with the finding. This field provides 1924 // information for both Kubernetes and non-Kubernetes containers. 1925 Containers []*Container `json:"containers,omitempty"` 1926 // CreateTime: The time at which the finding was created in Security Command 1927 // Center. 1928 CreateTime string `json:"createTime,omitempty"` 1929 // Database: Database associated with the finding. 1930 Database *Database `json:"database,omitempty"` 1931 // Description: Contains more details about the finding. 1932 Description string `json:"description,omitempty"` 1933 // EventTime: The time the finding was first detected. If an existing finding 1934 // is updated, then this is the time the update occurred. For example, if the 1935 // finding represents an open firewall, this property captures the time the 1936 // detector believes the firewall became open. The accuracy is determined by 1937 // the detector. If the finding is later resolved, then this time reflects when 1938 // the finding was resolved. This must not be set to a value greater than the 1939 // current timestamp. 1940 EventTime string `json:"eventTime,omitempty"` 1941 // Exfiltration: Represents exfiltrations associated with the finding. 1942 Exfiltration *Exfiltration `json:"exfiltration,omitempty"` 1943 // ExternalSystems: Output only. Third party SIEM/SOAR fields within SCC, 1944 // contains external system information and external system finding fields. 1945 ExternalSystems map[string]GoogleCloudSecuritycenterV1ExternalSystem `json:"externalSystems,omitempty"` 1946 // ExternalUri: The URI that, if available, points to a web page outside of 1947 // Security Command Center where additional information about the finding can 1948 // be found. This field is guaranteed to be either empty or a well formed URL. 1949 ExternalUri string `json:"externalUri,omitempty"` 1950 // Files: File associated with the finding. 1951 Files []*File `json:"files,omitempty"` 1952 // FindingClass: The class of the finding. 1953 // 1954 // Possible values: 1955 // "FINDING_CLASS_UNSPECIFIED" - Unspecified finding class. 1956 // "THREAT" - Describes unwanted or malicious activity. 1957 // "VULNERABILITY" - Describes a potential weakness in software that 1958 // increases risk to Confidentiality & Integrity & Availability. 1959 // "MISCONFIGURATION" - Describes a potential weakness in cloud 1960 // resource/asset configuration that increases risk. 1961 // "OBSERVATION" - Describes a security observation that is for informational 1962 // purposes. 1963 // "SCC_ERROR" - Describes an error that prevents some SCC functionality. 1964 // "POSTURE_VIOLATION" - Describes a potential security risk due to a change 1965 // in the security posture. 1966 FindingClass string `json:"findingClass,omitempty"` 1967 // IamBindings: Represents IAM bindings associated with the finding. 1968 IamBindings []*IamBinding `json:"iamBindings,omitempty"` 1969 // Indicator: Represents what's commonly known as an *indicator of compromise* 1970 // (IoC) in computer forensics. This is an artifact observed on a network or in 1971 // an operating system that, with high confidence, indicates a computer 1972 // intrusion. For more information, see Indicator of compromise 1973 // (https://en.wikipedia.org/wiki/Indicator_of_compromise). 1974 Indicator *Indicator `json:"indicator,omitempty"` 1975 // KernelRootkit: Signature of the kernel rootkit. 1976 KernelRootkit *KernelRootkit `json:"kernelRootkit,omitempty"` 1977 // Kubernetes: Kubernetes resources associated with the finding. 1978 Kubernetes *Kubernetes `json:"kubernetes,omitempty"` 1979 // LoadBalancers: The load balancers associated with the finding. 1980 LoadBalancers []*LoadBalancer `json:"loadBalancers,omitempty"` 1981 // LogEntries: Log entries that are relevant to the finding. 1982 LogEntries []*LogEntry `json:"logEntries,omitempty"` 1983 // MitreAttack: MITRE ATT&CK tactics and techniques related to this finding. 1984 // See: https://attack.mitre.org 1985 MitreAttack *MitreAttack `json:"mitreAttack,omitempty"` 1986 // ModuleName: Unique identifier of the module which generated the finding. 1987 // Example: 1988 // folders/598186756061/securityHealthAnalyticsSettings/customModules/5679944116 1989 // 1885 1990 ModuleName string `json:"moduleName,omitempty"` 1991 // Mute: Indicates the mute state of a finding (either muted, unmuted or 1992 // undefined). Unlike other attributes of a finding, a finding provider 1993 // shouldn't set the value of mute. 1994 // 1995 // Possible values: 1996 // "MUTE_UNSPECIFIED" - Unspecified. 1997 // "MUTED" - Finding has been muted. 1998 // "UNMUTED" - Finding has been unmuted. 1999 // "UNDEFINED" - Finding has never been muted/unmuted. 2000 Mute string `json:"mute,omitempty"` 2001 // MuteInitiator: Records additional information about the mute operation, for 2002 // example, the mute configuration 2003 // (/security-command-center/docs/how-to-mute-findings) that muted the finding 2004 // and the user who muted the finding. 2005 MuteInitiator string `json:"muteInitiator,omitempty"` 2006 // MuteUpdateTime: Output only. The most recent time this finding was muted or 2007 // unmuted. 2008 MuteUpdateTime string `json:"muteUpdateTime,omitempty"` 2009 // Name: The relative resource name 2010 // (https://cloud.google.com/apis/design/resource_names#relative_resource_name) 2011 // of the finding. Example: 2012 // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", 2013 // "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", 2014 // "projects/{project_id}/sources/{source_id}/findings/{finding_id}". 2015 Name string `json:"name,omitempty"` 2016 // NextSteps: Steps to address the finding. 2017 NextSteps string `json:"nextSteps,omitempty"` 2018 // Notebook: Notebook associated with the finding. 2019 Notebook *Notebook `json:"notebook,omitempty"` 2020 // OrgPolicies: Contains information about the org policies associated with the 2021 // finding. 2022 OrgPolicies []*OrgPolicy `json:"orgPolicies,omitempty"` 2023 // Parent: The relative resource name of the source the finding belongs to. 2024 // See: 2025 // https://cloud.google.com/apis/design/resource_names#relative_resource_name 2026 // This field is immutable after creation time. For example: 2027 // "organizations/{organization_id}/sources/{source_id}" 2028 Parent string `json:"parent,omitempty"` 2029 // ParentDisplayName: Output only. The human readable display name of the 2030 // finding source such as "Event Threat Detection" or "Security Health 2031 // Analytics". 2032 ParentDisplayName string `json:"parentDisplayName,omitempty"` 2033 // Processes: Represents operating system processes associated with the 2034 // Finding. 2035 Processes []*Process `json:"processes,omitempty"` 2036 // ResourceName: For findings on Google Cloud resources, the full resource name 2037 // of the Google Cloud resource this finding is for. See: 2038 // https://cloud.google.com/apis/design/resource_names#full_resource_name When 2039 // the finding is for a non-Google Cloud resource, the resourceName can be a 2040 // customer or partner defined string. This field is immutable after creation 2041 // time. 2042 ResourceName string `json:"resourceName,omitempty"` 2043 // SecurityMarks: Output only. User specified security marks. These marks are 2044 // entirely managed by the user and come from the SecurityMarks resource that 2045 // belongs to the finding. 2046 SecurityMarks *SecurityMarks `json:"securityMarks,omitempty"` 2047 // SecurityPosture: The security posture associated with the finding. 2048 SecurityPosture *SecurityPosture `json:"securityPosture,omitempty"` 2049 // Severity: The severity of the finding. This field is managed by the source 2050 // that writes the finding. 2051 // 2052 // Possible values: 2053 // "SEVERITY_UNSPECIFIED" - This value is used for findings when a source 2054 // doesn't write a severity value. 2055 // "CRITICAL" - Vulnerability: A critical vulnerability is easily 2056 // discoverable by an external actor, exploitable, and results in the direct 2057 // ability to execute arbitrary code, exfiltrate data, and otherwise gain 2058 // additional access and privileges to cloud resources and workloads. Examples 2059 // include publicly accessible unprotected user data and public SSH access with 2060 // weak or no passwords. Threat: Indicates a threat that is able to access, 2061 // modify, or delete data or execute unauthorized code within existing 2062 // resources. 2063 // "HIGH" - Vulnerability: A high risk vulnerability can be easily discovered 2064 // and exploited in combination with other vulnerabilities in order to gain 2065 // direct access and the ability to execute arbitrary code, exfiltrate data, 2066 // and otherwise gain additional access and privileges to cloud resources and 2067 // workloads. An example is a database with weak or no passwords that is only 2068 // accessible internally. This database could easily be compromised by an actor 2069 // that had access to the internal network. Threat: Indicates a threat that is 2070 // able to create new computational resources in an environment but not able to 2071 // access data or execute code in existing resources. 2072 // "MEDIUM" - Vulnerability: A medium risk vulnerability could be used by an 2073 // actor to gain access to resources or privileges that enable them to 2074 // eventually (through multiple steps or a complex exploit) gain access and the 2075 // ability to execute arbitrary code or exfiltrate data. An example is a 2076 // service account with access to more projects than it should have. If an 2077 // actor gains access to the service account, they could potentially use that 2078 // access to manipulate a project the service account was not intended to. 2079 // Threat: Indicates a threat that is able to cause operational impact but may 2080 // not access data or execute unauthorized code. 2081 // "LOW" - Vulnerability: A low risk vulnerability hampers a security 2082 // organization's ability to detect vulnerabilities or active threats in their 2083 // deployment, or prevents the root cause investigation of security issues. An 2084 // example is monitoring and logs being disabled for resource configurations 2085 // and access. Threat: Indicates a threat that has obtained minimal access to 2086 // an environment but is not able to access data, execute code, or create 2087 // resources. 2088 Severity string `json:"severity,omitempty"` 2089 // SourceProperties: Source specific properties. These properties are managed 2090 // by the source that writes the finding. The key names in the 2091 // source_properties map must be between 1 and 255 characters, and must start 2092 // with a letter and contain alphanumeric characters or underscores only. 2093 SourceProperties googleapi.RawMessage `json:"sourceProperties,omitempty"` 2094 // State: The state of the finding. 2095 // 2096 // Possible values: 2097 // "STATE_UNSPECIFIED" - Unspecified state. 2098 // "ACTIVE" - The finding requires attention and has not been addressed yet. 2099 // "INACTIVE" - The finding has been fixed, triaged as a non-issue or 2100 // otherwise addressed and is no longer active. 2101 State string `json:"state,omitempty"` 2102 // Vulnerability: Represents vulnerability-specific fields like CVE and CVSS 2103 // scores. CVE stands for Common Vulnerabilities and Exposures 2104 // (https://cve.mitre.org/about/) 2105 Vulnerability *Vulnerability `json:"vulnerability,omitempty"` 2106 // ForceSendFields is a list of field names (e.g. "Access") 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. "Access") 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 *Finding) MarshalJSON() ([]byte, error) { 2120 type NoMethod Finding 2121 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2122 } 2123 2124 // Folder: Message that contains the resource name and display name of a folder 2125 // resource. 2126 type Folder struct { 2127 // ResourceFolder: Full resource name of this folder. See: 2128 // https://cloud.google.com/apis/design/resource_names#full_resource_name 2129 ResourceFolder string `json:"resourceFolder,omitempty"` 2130 // ResourceFolderDisplayName: The user defined display name for this folder. 2131 ResourceFolderDisplayName string `json:"resourceFolderDisplayName,omitempty"` 2132 // ForceSendFields is a list of field names (e.g. "ResourceFolder") to 2133 // unconditionally include in API requests. By default, fields with empty or 2134 // default values are omitted from API requests. See 2135 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2136 // details. 2137 ForceSendFields []string `json:"-"` 2138 // NullFields is a list of field names (e.g. "ResourceFolder") to include in 2139 // API requests with the JSON null value. By default, fields with empty values 2140 // are omitted from API requests. See 2141 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2142 NullFields []string `json:"-"` 2143 } 2144 2145 func (s *Folder) MarshalJSON() ([]byte, error) { 2146 type NoMethod Folder 2147 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2148 } 2149 2150 // GcpMetadata: GCP metadata associated with the resource, only applicable if 2151 // the finding's cloud provider is Google Cloud Platform. 2152 type GcpMetadata struct { 2153 // Folders: Output only. Contains a Folder message for each folder in the 2154 // assets ancestry. The first folder is the deepest nested folder, and the last 2155 // folder is the folder directly under the Organization. 2156 Folders []*GoogleCloudSecuritycenterV2Folder `json:"folders,omitempty"` 2157 // Organization: The name of the organization that the resource belongs to. 2158 Organization string `json:"organization,omitempty"` 2159 // Parent: The full resource name of resource's parent. 2160 Parent string `json:"parent,omitempty"` 2161 // ParentDisplayName: The human readable name of resource's parent. 2162 ParentDisplayName string `json:"parentDisplayName,omitempty"` 2163 // Project: The full resource name of project that the resource belongs to. 2164 Project string `json:"project,omitempty"` 2165 // ProjectDisplayName: The project ID that the resource belongs to. 2166 ProjectDisplayName string `json:"projectDisplayName,omitempty"` 2167 // ForceSendFields is a list of field names (e.g. "Folders") to unconditionally 2168 // include in API requests. By default, fields with empty or default values are 2169 // omitted from API requests. See 2170 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2171 // details. 2172 ForceSendFields []string `json:"-"` 2173 // NullFields is a list of field names (e.g. "Folders") to include in API 2174 // requests with the JSON null value. By default, fields with empty values are 2175 // omitted from API requests. See 2176 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2177 NullFields []string `json:"-"` 2178 } 2179 2180 func (s *GcpMetadata) MarshalJSON() ([]byte, error) { 2181 type NoMethod GcpMetadata 2182 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2183 } 2184 2185 // Geolocation: Represents a geographical location for a given access. 2186 type Geolocation struct { 2187 // RegionCode: A CLDR. 2188 RegionCode string `json:"regionCode,omitempty"` 2189 // ForceSendFields is a list of field names (e.g. "RegionCode") to 2190 // unconditionally include in API requests. By default, fields with empty or 2191 // default values are omitted from API requests. See 2192 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2193 // details. 2194 ForceSendFields []string `json:"-"` 2195 // NullFields is a list of field names (e.g. "RegionCode") to include in API 2196 // requests with the JSON null value. By default, fields with empty values are 2197 // omitted from API requests. See 2198 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2199 NullFields []string `json:"-"` 2200 } 2201 2202 func (s *Geolocation) MarshalJSON() ([]byte, error) { 2203 type NoMethod Geolocation 2204 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2205 } 2206 2207 // GoogleCloudSecuritycenterV1BigQueryExport: Configures how to deliver 2208 // Findings to BigQuery Instance. 2209 type GoogleCloudSecuritycenterV1BigQueryExport struct { 2210 // CreateTime: Output only. The time at which the BigQuery export was created. 2211 // This field is set by the server and will be ignored if provided on export on 2212 // creation. 2213 CreateTime string `json:"createTime,omitempty"` 2214 // Dataset: The dataset to write findings' updates to. Its format is 2215 // "projects/[project_id]/datasets/[bigquery_dataset_id]". BigQuery Dataset 2216 // unique ID must contain only letters (a-z, A-Z), numbers (0-9), or 2217 // underscores (_). 2218 Dataset string `json:"dataset,omitempty"` 2219 // Description: The description of the export (max of 1024 characters). 2220 Description string `json:"description,omitempty"` 2221 // Filter: Expression that defines the filter to apply across create/update 2222 // events of findings. The expression is a list of zero or more restrictions 2223 // combined via logical operators `AND` and `OR`. Parentheses are supported, 2224 // and `OR` has higher precedence than `AND`. Restrictions have the form ` ` 2225 // and may have a `-` character in front of them to indicate negation. The 2226 // fields map to those defined in the corresponding resource. The supported 2227 // operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer 2228 // values. * `:`, meaning substring matching, for strings. The supported value 2229 // types are: * string literals in quotes. * integer literals without quotes. * 2230 // boolean literals `true` and `false` without quotes. 2231 Filter string `json:"filter,omitempty"` 2232 // MostRecentEditor: Output only. Email address of the user who last edited the 2233 // BigQuery export. This field is set by the server and will be ignored if 2234 // provided on export creation or update. 2235 MostRecentEditor string `json:"mostRecentEditor,omitempty"` 2236 // Name: The relative resource name of this export. See: 2237 // https://cloud.google.com/apis/design/resource_names#relative_resource_name. 2238 // Example format: 2239 // "organizations/{organization_id}/bigQueryExports/{export_id}" Example 2240 // format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format: 2241 // "projects/{project_id}/bigQueryExports/{export_id}" This field is provided 2242 // in responses, and is ignored when provided in create requests. 2243 Name string `json:"name,omitempty"` 2244 // Principal: Output only. The service account that needs permission to create 2245 // table and upload data to the BigQuery dataset. 2246 Principal string `json:"principal,omitempty"` 2247 // UpdateTime: Output only. The most recent time at which the BigQuery export 2248 // was updated. This field is set by the server and will be ignored if provided 2249 // on export creation or update. 2250 UpdateTime string `json:"updateTime,omitempty"` 2251 // ForceSendFields is a list of field names (e.g. "CreateTime") to 2252 // unconditionally include in API requests. By default, fields with empty or 2253 // default values are omitted from API requests. See 2254 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2255 // details. 2256 ForceSendFields []string `json:"-"` 2257 // NullFields is a list of field names (e.g. "CreateTime") to include in API 2258 // requests with the JSON null value. By default, fields with empty values are 2259 // omitted from API requests. See 2260 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2261 NullFields []string `json:"-"` 2262 } 2263 2264 func (s *GoogleCloudSecuritycenterV1BigQueryExport) MarshalJSON() ([]byte, error) { 2265 type NoMethod GoogleCloudSecuritycenterV1BigQueryExport 2266 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2267 } 2268 2269 // GoogleCloudSecuritycenterV1Binding: Represents a Kubernetes RoleBinding or 2270 // ClusterRoleBinding. 2271 type GoogleCloudSecuritycenterV1Binding struct { 2272 // Name: Name for the binding. 2273 Name string `json:"name,omitempty"` 2274 // Ns: Namespace for the binding. 2275 Ns string `json:"ns,omitempty"` 2276 // Role: The Role or ClusterRole referenced by the binding. 2277 Role *Role `json:"role,omitempty"` 2278 // Subjects: Represents one or more subjects that are bound to the role. Not 2279 // always available for PATCH requests. 2280 Subjects []*Subject `json:"subjects,omitempty"` 2281 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 2282 // include in API requests. By default, fields with empty or default values are 2283 // omitted from API requests. See 2284 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2285 // details. 2286 ForceSendFields []string `json:"-"` 2287 // NullFields is a list of field names (e.g. "Name") to include in API requests 2288 // with the JSON null value. By default, fields with empty values are omitted 2289 // from API requests. See 2290 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2291 NullFields []string `json:"-"` 2292 } 2293 2294 func (s *GoogleCloudSecuritycenterV1Binding) MarshalJSON() ([]byte, error) { 2295 type NoMethod GoogleCloudSecuritycenterV1Binding 2296 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2297 } 2298 2299 // GoogleCloudSecuritycenterV1BulkMuteFindingsResponse: The response to a 2300 // BulkMute request. Contains the LRO information. 2301 type GoogleCloudSecuritycenterV1BulkMuteFindingsResponse struct { 2302 } 2303 2304 // GoogleCloudSecuritycenterV1CustomConfig: Defines the properties in a custom 2305 // module configuration for Security Health Analytics. Use the custom module 2306 // configuration to create custom detectors that generate custom findings for 2307 // resources that you specify. 2308 type GoogleCloudSecuritycenterV1CustomConfig struct { 2309 // CustomOutput: Custom output properties. 2310 CustomOutput *GoogleCloudSecuritycenterV1CustomOutputSpec `json:"customOutput,omitempty"` 2311 // Description: Text that describes the vulnerability or misconfiguration that 2312 // the custom module detects. This explanation is returned with each finding 2313 // instance to help investigators understand the detected issue. The text must 2314 // be enclosed in quotation marks. 2315 Description string `json:"description,omitempty"` 2316 // Predicate: The CEL expression to evaluate to produce findings. When the 2317 // expression evaluates to true against a resource, a finding is generated. 2318 Predicate *Expr `json:"predicate,omitempty"` 2319 // Recommendation: An explanation of the recommended steps that security teams 2320 // can take to resolve the detected issue. This explanation is returned with 2321 // each finding generated by this module in the `nextSteps` property of the 2322 // finding JSON. 2323 Recommendation string `json:"recommendation,omitempty"` 2324 // ResourceSelector: The resource types that the custom module operates on. 2325 // Each custom module can specify up to 5 resource types. 2326 ResourceSelector *GoogleCloudSecuritycenterV1ResourceSelector `json:"resourceSelector,omitempty"` 2327 // Severity: The severity to assign to findings generated by the module. 2328 // 2329 // Possible values: 2330 // "SEVERITY_UNSPECIFIED" - Unspecified severity. 2331 // "CRITICAL" - Critical severity. 2332 // "HIGH" - High severity. 2333 // "MEDIUM" - Medium severity. 2334 // "LOW" - Low severity. 2335 Severity string `json:"severity,omitempty"` 2336 // ForceSendFields is a list of field names (e.g. "CustomOutput") to 2337 // unconditionally include in API requests. By default, fields with empty or 2338 // default values are omitted from API requests. See 2339 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2340 // details. 2341 ForceSendFields []string `json:"-"` 2342 // NullFields is a list of field names (e.g. "CustomOutput") to include in API 2343 // requests with the JSON null value. By default, fields with empty values are 2344 // omitted from API requests. See 2345 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2346 NullFields []string `json:"-"` 2347 } 2348 2349 func (s *GoogleCloudSecuritycenterV1CustomConfig) MarshalJSON() ([]byte, error) { 2350 type NoMethod GoogleCloudSecuritycenterV1CustomConfig 2351 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2352 } 2353 2354 // GoogleCloudSecuritycenterV1CustomOutputSpec: A set of optional name-value 2355 // pairs that define custom source properties to return with each finding that 2356 // is generated by the custom module. The custom source properties that are 2357 // defined here are included in the finding JSON under `sourceProperties`. 2358 type GoogleCloudSecuritycenterV1CustomOutputSpec struct { 2359 // Properties: A list of custom output properties to add to the finding. 2360 Properties []*GoogleCloudSecuritycenterV1Property `json:"properties,omitempty"` 2361 // ForceSendFields is a list of field names (e.g. "Properties") to 2362 // unconditionally include in API requests. By default, fields with empty or 2363 // default values are omitted from API requests. See 2364 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2365 // details. 2366 ForceSendFields []string `json:"-"` 2367 // NullFields is a list of field names (e.g. "Properties") to include in API 2368 // requests with the JSON null value. By default, fields with empty values are 2369 // omitted from API requests. See 2370 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2371 NullFields []string `json:"-"` 2372 } 2373 2374 func (s *GoogleCloudSecuritycenterV1CustomOutputSpec) MarshalJSON() ([]byte, error) { 2375 type NoMethod GoogleCloudSecuritycenterV1CustomOutputSpec 2376 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2377 } 2378 2379 // GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule: An 2380 // EffectiveSecurityHealthAnalyticsCustomModule is the representation of a 2381 // Security Health Analytics custom module at a specified level of the resource 2382 // hierarchy: organization, folder, or project. If a custom module is inherited 2383 // from a parent organization or folder, the value of the `enablementState` 2384 // property in EffectiveSecurityHealthAnalyticsCustomModule is set to the value 2385 // that is effective in the parent, instead of `INHERITED`. For example, if the 2386 // module is enabled in a parent organization or folder, the effective 2387 // enablement_state for the module in all child folders or projects is also 2388 // `enabled`. EffectiveSecurityHealthAnalyticsCustomModule is read-only. 2389 type GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule struct { 2390 // CustomConfig: Output only. The user-specified configuration for the module. 2391 CustomConfig *GoogleCloudSecuritycenterV1CustomConfig `json:"customConfig,omitempty"` 2392 // DisplayName: Output only. The display name for the custom module. The name 2393 // must be between 1 and 128 characters, start with a lowercase letter, and 2394 // contain alphanumeric characters or underscores only. 2395 DisplayName string `json:"displayName,omitempty"` 2396 // EnablementState: Output only. The effective state of enablement for the 2397 // module at the given level of the hierarchy. 2398 // 2399 // Possible values: 2400 // "ENABLEMENT_STATE_UNSPECIFIED" - Unspecified enablement state. 2401 // "ENABLED" - The module is enabled at the given level. 2402 // "DISABLED" - The module is disabled at the given level. 2403 EnablementState string `json:"enablementState,omitempty"` 2404 // Name: Output only. The resource name of the custom module. Its format is 2405 // "organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustom 2406 // Modules/{customModule}", or 2407 // "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{cus 2408 // tomModule}", or 2409 // "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{c 2410 // ustomModule}" 2411 Name string `json:"name,omitempty"` 2412 // ForceSendFields is a list of field names (e.g. "CustomConfig") to 2413 // unconditionally include in API requests. By default, fields with empty or 2414 // default values are omitted from API requests. See 2415 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2416 // details. 2417 ForceSendFields []string `json:"-"` 2418 // NullFields is a list of field names (e.g. "CustomConfig") to include in API 2419 // requests with the JSON null value. By default, fields with empty values are 2420 // omitted from API requests. See 2421 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2422 NullFields []string `json:"-"` 2423 } 2424 2425 func (s *GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule) MarshalJSON() ([]byte, error) { 2426 type NoMethod GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule 2427 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2428 } 2429 2430 // GoogleCloudSecuritycenterV1ExternalSystem: Representation of third party 2431 // SIEM/SOAR fields within SCC. 2432 type GoogleCloudSecuritycenterV1ExternalSystem struct { 2433 // Assignees: References primary/secondary etc assignees in the external 2434 // system. 2435 Assignees []string `json:"assignees,omitempty"` 2436 // CaseCloseTime: The time when the case was closed, as reported by the 2437 // external system. 2438 CaseCloseTime string `json:"caseCloseTime,omitempty"` 2439 // CaseCreateTime: The time when the case was created, as reported by the 2440 // external system. 2441 CaseCreateTime string `json:"caseCreateTime,omitempty"` 2442 // CasePriority: The priority of the finding's corresponding case in the 2443 // external system. 2444 CasePriority string `json:"casePriority,omitempty"` 2445 // CaseSla: The SLA of the finding's corresponding case in the external system. 2446 CaseSla string `json:"caseSla,omitempty"` 2447 // CaseUri: The link to the finding's corresponding case in the external 2448 // system. 2449 CaseUri string `json:"caseUri,omitempty"` 2450 // ExternalSystemUpdateTime: The time when the case was last updated, as 2451 // reported by the external system. 2452 ExternalSystemUpdateTime string `json:"externalSystemUpdateTime,omitempty"` 2453 // ExternalUid: The identifier that's used to track the finding's corresponding 2454 // case in the external system. 2455 ExternalUid string `json:"externalUid,omitempty"` 2456 // Name: Full resource name of the external system, for example: 2457 // "organizations/1234/sources/5678/findings/123456/externalSystems/jira", 2458 // "folders/1234/sources/5678/findings/123456/externalSystems/jira", 2459 // "projects/1234/sources/5678/findings/123456/externalSystems/jira" 2460 Name string `json:"name,omitempty"` 2461 // Status: The most recent status of the finding's corresponding case, as 2462 // reported by the external system. 2463 Status string `json:"status,omitempty"` 2464 // TicketInfo: Information about the ticket, if any, that is being used to 2465 // track the resolution of the issue that is identified by this finding. 2466 TicketInfo *TicketInfo `json:"ticketInfo,omitempty"` 2467 // ForceSendFields is a list of field names (e.g. "Assignees") to 2468 // unconditionally include in API requests. By default, fields with empty or 2469 // default values are omitted from API requests. See 2470 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2471 // details. 2472 ForceSendFields []string `json:"-"` 2473 // NullFields is a list of field names (e.g. "Assignees") to include in API 2474 // requests with the JSON null value. By default, fields with empty values are 2475 // omitted from API requests. See 2476 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2477 NullFields []string `json:"-"` 2478 } 2479 2480 func (s *GoogleCloudSecuritycenterV1ExternalSystem) MarshalJSON() ([]byte, error) { 2481 type NoMethod GoogleCloudSecuritycenterV1ExternalSystem 2482 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2483 } 2484 2485 // GoogleCloudSecuritycenterV1MuteConfig: A mute config is a Cloud SCC resource 2486 // that contains the configuration to mute create/update events of findings. 2487 type GoogleCloudSecuritycenterV1MuteConfig struct { 2488 // CreateTime: Output only. The time at which the mute config was created. This 2489 // field is set by the server and will be ignored if provided on config 2490 // creation. 2491 CreateTime string `json:"createTime,omitempty"` 2492 // Description: A description of the mute config. 2493 Description string `json:"description,omitempty"` 2494 // DisplayName: The human readable name to be displayed for the mute config. 2495 DisplayName string `json:"displayName,omitempty"` 2496 // Filter: Required. An expression that defines the filter to apply across 2497 // create/update events of findings. While creating a filter string, be mindful 2498 // of the scope in which the mute configuration is being created. E.g., If a 2499 // filter contains project = X but is created under the project = Y scope, it 2500 // might not match any findings. The following field and operator combinations 2501 // are supported: * severity: `=`, `:` * category: `=`, `:` * resource.name: 2502 // `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: 2503 // `=`, `:` * resource.folders.resource_folder: `=`, `:` * 2504 // resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * 2505 // resource.type: `=`, `:` * finding_class: `=`, `:` * indicator.ip_addresses: 2506 // `=`, `:` * indicator.domains: `=`, `:` 2507 Filter string `json:"filter,omitempty"` 2508 // MostRecentEditor: Output only. Email address of the user who last edited the 2509 // mute config. This field is set by the server and will be ignored if provided 2510 // on config creation or update. 2511 MostRecentEditor string `json:"mostRecentEditor,omitempty"` 2512 // Name: This field will be ignored if provided on config creation. Format 2513 // "organizations/{organization}/muteConfigs/{mute_config}" 2514 // "folders/{folder}/muteConfigs/{mute_config}" 2515 // "projects/{project}/muteConfigs/{mute_config}" 2516 // "organizations/{organization}/locations/global/muteConfigs/{mute_config}" 2517 // "folders/{folder}/locations/global/muteConfigs/{mute_config}" 2518 // "projects/{project}/locations/global/muteConfigs/{mute_config}" 2519 Name string `json:"name,omitempty"` 2520 // UpdateTime: Output only. The most recent time at which the mute config was 2521 // updated. This field is set by the server and will be ignored if provided on 2522 // config creation or update. 2523 UpdateTime string `json:"updateTime,omitempty"` 2524 // ForceSendFields is a list of field names (e.g. "CreateTime") to 2525 // unconditionally include in API requests. By default, fields with empty or 2526 // default values are omitted from API requests. See 2527 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2528 // details. 2529 ForceSendFields []string `json:"-"` 2530 // NullFields is a list of field names (e.g. "CreateTime") to include in API 2531 // requests with the JSON null value. By default, fields with empty values are 2532 // omitted from API requests. See 2533 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2534 NullFields []string `json:"-"` 2535 } 2536 2537 func (s *GoogleCloudSecuritycenterV1MuteConfig) MarshalJSON() ([]byte, error) { 2538 type NoMethod GoogleCloudSecuritycenterV1MuteConfig 2539 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2540 } 2541 2542 // GoogleCloudSecuritycenterV1NotificationMessage: Cloud SCC's Notification 2543 type GoogleCloudSecuritycenterV1NotificationMessage struct { 2544 // Finding: If it's a Finding based notification config, this field will be 2545 // populated. 2546 Finding *Finding `json:"finding,omitempty"` 2547 // NotificationConfigName: Name of the notification config that generated 2548 // current notification. 2549 NotificationConfigName string `json:"notificationConfigName,omitempty"` 2550 // Resource: The Cloud resource tied to this notification's Finding. 2551 Resource *GoogleCloudSecuritycenterV1Resource `json:"resource,omitempty"` 2552 // ForceSendFields is a list of field names (e.g. "Finding") to unconditionally 2553 // include in API requests. By default, fields with empty or default values are 2554 // omitted from API requests. See 2555 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2556 // details. 2557 ForceSendFields []string `json:"-"` 2558 // NullFields is a list of field names (e.g. "Finding") to include in API 2559 // requests with the JSON null value. By default, fields with empty values are 2560 // omitted from API requests. See 2561 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2562 NullFields []string `json:"-"` 2563 } 2564 2565 func (s *GoogleCloudSecuritycenterV1NotificationMessage) MarshalJSON() ([]byte, error) { 2566 type NoMethod GoogleCloudSecuritycenterV1NotificationMessage 2567 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2568 } 2569 2570 // GoogleCloudSecuritycenterV1Property: An individual name-value pair that 2571 // defines a custom source property. 2572 type GoogleCloudSecuritycenterV1Property struct { 2573 // Name: Name of the property for the custom output. 2574 Name string `json:"name,omitempty"` 2575 // ValueExpression: The CEL expression for the custom output. A resource 2576 // property can be specified to return the value of the property or a text 2577 // string enclosed in quotation marks. 2578 ValueExpression *Expr `json:"valueExpression,omitempty"` 2579 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 2580 // include in API requests. By default, fields with empty or default values are 2581 // omitted from API requests. See 2582 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2583 // details. 2584 ForceSendFields []string `json:"-"` 2585 // NullFields is a list of field names (e.g. "Name") to include in API requests 2586 // with the JSON null value. By default, fields with empty values are omitted 2587 // from API requests. See 2588 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2589 NullFields []string `json:"-"` 2590 } 2591 2592 func (s *GoogleCloudSecuritycenterV1Property) MarshalJSON() ([]byte, error) { 2593 type NoMethod GoogleCloudSecuritycenterV1Property 2594 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2595 } 2596 2597 // GoogleCloudSecuritycenterV1Resource: Information related to the Google Cloud 2598 // resource. 2599 type GoogleCloudSecuritycenterV1Resource struct { 2600 // AwsMetadata: The AWS metadata associated with the finding. 2601 AwsMetadata *AwsMetadata `json:"awsMetadata,omitempty"` 2602 // CloudProvider: Indicates which cloud provider the resource resides in. 2603 // 2604 // Possible values: 2605 // "CLOUD_PROVIDER_UNSPECIFIED" - The cloud provider is unspecified. 2606 // "GOOGLE_CLOUD_PLATFORM" - The cloud provider is Google Cloud Platform. 2607 // "AMAZON_WEB_SERVICES" - The cloud provider is Amazon Web Services. 2608 // "MICROSOFT_AZURE" - The cloud provider is Microsoft Azure. 2609 CloudProvider string `json:"cloudProvider,omitempty"` 2610 // DisplayName: The human readable name of the resource. 2611 DisplayName string `json:"displayName,omitempty"` 2612 // Folders: Output only. Contains a Folder message for each folder in the 2613 // assets ancestry. The first folder is the deepest nested folder, and the last 2614 // folder is the folder directly under the Organization. 2615 Folders []*Folder `json:"folders,omitempty"` 2616 // Location: The region or location of the service (if applicable). 2617 Location string `json:"location,omitempty"` 2618 // Name: The full resource name of the resource. See: 2619 // https://cloud.google.com/apis/design/resource_names#full_resource_name 2620 Name string `json:"name,omitempty"` 2621 // Organization: Indicates which organization or tenant in the cloud provider 2622 // the finding applies to. 2623 Organization string `json:"organization,omitempty"` 2624 // Parent: The full resource name of resource's parent. 2625 Parent string `json:"parent,omitempty"` 2626 // ParentDisplayName: The human readable name of resource's parent. 2627 ParentDisplayName string `json:"parentDisplayName,omitempty"` 2628 // Project: The full resource name of project that the resource belongs to. 2629 Project string `json:"project,omitempty"` 2630 // ProjectDisplayName: The project ID that the resource belongs to. 2631 ProjectDisplayName string `json:"projectDisplayName,omitempty"` 2632 // ResourcePath: Provides the path to the resource within the resource 2633 // hierarchy. 2634 ResourcePath *ResourcePath `json:"resourcePath,omitempty"` 2635 // ResourcePathString: A string representation of the resource path. For Google 2636 // Cloud, it has the format of 2637 // organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/proje 2638 // cts/{project_id} where there can be any number of folders. For AWS, it has 2639 // the format of 2640 // org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id} 2641 // /account/{account_id} where there can be any number of organizational units. 2642 // For Azure, it has the format of 2643 // mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_ 2644 // id}/rg/{resource_group_name} where there can be any number of management 2645 // groups. 2646 ResourcePathString string `json:"resourcePathString,omitempty"` 2647 // Service: The parent service or product from which the resource is provided, 2648 // for example, GKE or SNS. 2649 Service string `json:"service,omitempty"` 2650 // Type: The full resource type of the resource. 2651 Type string `json:"type,omitempty"` 2652 // ForceSendFields is a list of field names (e.g. "AwsMetadata") to 2653 // unconditionally include in API requests. By default, fields with empty or 2654 // default values are omitted from API requests. See 2655 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2656 // details. 2657 ForceSendFields []string `json:"-"` 2658 // NullFields is a list of field names (e.g. "AwsMetadata") to include in API 2659 // requests with the JSON null value. By default, fields with empty values are 2660 // omitted from API requests. See 2661 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2662 NullFields []string `json:"-"` 2663 } 2664 2665 func (s *GoogleCloudSecuritycenterV1Resource) MarshalJSON() ([]byte, error) { 2666 type NoMethod GoogleCloudSecuritycenterV1Resource 2667 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2668 } 2669 2670 // GoogleCloudSecuritycenterV1ResourceSelector: Resource for selecting resource 2671 // type. 2672 type GoogleCloudSecuritycenterV1ResourceSelector struct { 2673 // ResourceTypes: The resource types to run the detector on. 2674 ResourceTypes []string `json:"resourceTypes,omitempty"` 2675 // ForceSendFields is a list of field names (e.g. "ResourceTypes") to 2676 // unconditionally include in API requests. By default, fields with empty or 2677 // default values are omitted from API requests. See 2678 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2679 // details. 2680 ForceSendFields []string `json:"-"` 2681 // NullFields is a list of field names (e.g. "ResourceTypes") to include in API 2682 // requests with the JSON null value. By default, fields with empty values are 2683 // omitted from API requests. See 2684 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2685 NullFields []string `json:"-"` 2686 } 2687 2688 func (s *GoogleCloudSecuritycenterV1ResourceSelector) MarshalJSON() ([]byte, error) { 2689 type NoMethod GoogleCloudSecuritycenterV1ResourceSelector 2690 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2691 } 2692 2693 // GoogleCloudSecuritycenterV1ResourceValueConfig: A resource value config 2694 // (RVC) is a mapping configuration of user's resources to resource values. 2695 // Used in Attack path simulations. 2696 type GoogleCloudSecuritycenterV1ResourceValueConfig struct { 2697 // CloudProvider: Cloud provider this configuration applies to 2698 // 2699 // Possible values: 2700 // "CLOUD_PROVIDER_UNSPECIFIED" - The cloud provider is unspecified. 2701 // "GOOGLE_CLOUD_PLATFORM" - The cloud provider is Google Cloud Platform. 2702 // "AMAZON_WEB_SERVICES" - The cloud provider is Amazon Web Services. 2703 // "MICROSOFT_AZURE" - The cloud provider is Microsoft Azure. 2704 CloudProvider string `json:"cloudProvider,omitempty"` 2705 // CreateTime: Output only. Timestamp this resource value config was created. 2706 CreateTime string `json:"createTime,omitempty"` 2707 // Description: Description of the resource value config. 2708 Description string `json:"description,omitempty"` 2709 // Name: Name for the resource value config 2710 Name string `json:"name,omitempty"` 2711 // ResourceLabelsSelector: List of resource labels to search for, evaluated 2712 // with AND. E.g. "resource_labels_selector": {"key": "value", "env": "prod"} 2713 // will match resources with labels "key": "value" AND "env": "prod" 2714 // https://cloud.google.com/resource-manager/docs/creating-managing-labels 2715 ResourceLabelsSelector map[string]string `json:"resourceLabelsSelector,omitempty"` 2716 // ResourceType: Apply resource_value only to resources that match 2717 // resource_type. resource_type will be checked with "AND" of other resources. 2718 // E.g. "storage.googleapis.com/Bucket" with resource_value "HIGH" will apply 2719 // "HIGH" value only to "storage.googleapis.com/Bucket" resources. 2720 ResourceType string `json:"resourceType,omitempty"` 2721 // ResourceValue: Required. Resource value level this expression represents 2722 // 2723 // Possible values: 2724 // "RESOURCE_VALUE_UNSPECIFIED" - Unspecific value 2725 // "HIGH" - High resource value 2726 // "MEDIUM" - Medium resource value 2727 // "LOW" - Low resource value 2728 // "NONE" - No resource value, e.g. ignore these resources 2729 ResourceValue string `json:"resourceValue,omitempty"` 2730 // Scope: Project or folder to scope this config to. For example, "project/456" 2731 // would apply this config only to resources in "project/456" scope will be 2732 // checked with "AND" of other resources. 2733 Scope string `json:"scope,omitempty"` 2734 // SensitiveDataProtectionMapping: A mapping of the sensitivity on Sensitive 2735 // Data Protection finding to resource values. This mapping can only be used in 2736 // combination with a resource_type that is related to BigQuery, e.g. 2737 // "bigquery.googleapis.com/Dataset". 2738 SensitiveDataProtectionMapping *GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping `json:"sensitiveDataProtectionMapping,omitempty"` 2739 // TagValues: Required. Tag values combined with AND to check against. Values 2740 // in the form "tagValues/123" E.g. [ "tagValues/123", "tagValues/456", 2741 // "tagValues/789" ] 2742 // https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing 2743 TagValues []string `json:"tagValues,omitempty"` 2744 // UpdateTime: Output only. Timestamp this resource value config was last 2745 // updated. 2746 UpdateTime string `json:"updateTime,omitempty"` 2747 // ForceSendFields is a list of field names (e.g. "CloudProvider") to 2748 // unconditionally include in API requests. By default, fields with empty or 2749 // default values are omitted from API requests. See 2750 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2751 // details. 2752 ForceSendFields []string `json:"-"` 2753 // NullFields is a list of field names (e.g. "CloudProvider") to include in API 2754 // requests with the JSON null value. By default, fields with empty values are 2755 // omitted from API requests. See 2756 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2757 NullFields []string `json:"-"` 2758 } 2759 2760 func (s *GoogleCloudSecuritycenterV1ResourceValueConfig) MarshalJSON() ([]byte, error) { 2761 type NoMethod GoogleCloudSecuritycenterV1ResourceValueConfig 2762 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2763 } 2764 2765 // GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse: Response of asset 2766 // discovery run 2767 type GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse struct { 2768 // Duration: The duration between asset discovery run start and end 2769 Duration string `json:"duration,omitempty"` 2770 // State: The state of an asset discovery run. 2771 // 2772 // Possible values: 2773 // "STATE_UNSPECIFIED" - Asset discovery run state was unspecified. 2774 // "COMPLETED" - Asset discovery run completed successfully. 2775 // "SUPERSEDED" - Asset discovery run was cancelled with tasks still pending, 2776 // as another run for the same organization was started with a higher priority. 2777 // "TERMINATED" - Asset discovery run was killed and terminated. 2778 State string `json:"state,omitempty"` 2779 // ForceSendFields is a list of field names (e.g. "Duration") to 2780 // unconditionally include in API requests. By default, fields with empty or 2781 // default values are omitted from API requests. See 2782 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2783 // details. 2784 ForceSendFields []string `json:"-"` 2785 // NullFields is a list of field names (e.g. "Duration") to include in API 2786 // requests with the JSON null value. By default, fields with empty values are 2787 // omitted from API requests. See 2788 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2789 NullFields []string `json:"-"` 2790 } 2791 2792 func (s *GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse) MarshalJSON() ([]byte, error) { 2793 type NoMethod GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse 2794 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2795 } 2796 2797 // GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule: Represents 2798 // an instance of a Security Health Analytics custom module, including its full 2799 // module name, display name, enablement state, and last updated time. You can 2800 // create a custom module at the organization, folder, or project level. Custom 2801 // modules that you create at the organization or folder level are inherited by 2802 // the child folders and projects. 2803 type GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule struct { 2804 // AncestorModule: Output only. If empty, indicates that the custom module was 2805 // created in the organization, folder, or project in which you are viewing the 2806 // custom module. Otherwise, `ancestor_module` specifies the organization or 2807 // folder from which the custom module is inherited. 2808 AncestorModule string `json:"ancestorModule,omitempty"` 2809 // CustomConfig: The user specified custom configuration for the module. 2810 CustomConfig *GoogleCloudSecuritycenterV1CustomConfig `json:"customConfig,omitempty"` 2811 // DisplayName: The display name of the Security Health Analytics custom 2812 // module. This display name becomes the finding category for all findings that 2813 // are returned by this custom module. The display name must be between 1 and 2814 // 128 characters, start with a lowercase letter, and contain alphanumeric 2815 // characters or underscores only. 2816 DisplayName string `json:"displayName,omitempty"` 2817 // EnablementState: The enablement state of the custom module. 2818 // 2819 // Possible values: 2820 // "ENABLEMENT_STATE_UNSPECIFIED" - Unspecified enablement state. 2821 // "ENABLED" - The module is enabled at the given CRM resource. 2822 // "DISABLED" - The module is disabled at the given CRM resource. 2823 // "INHERITED" - State is inherited from an ancestor module. The module will 2824 // either be effectively ENABLED or DISABLED based on its closest non-inherited 2825 // ancestor module in the CRM hierarchy. 2826 EnablementState string `json:"enablementState,omitempty"` 2827 // LastEditor: Output only. The editor that last updated the custom module. 2828 LastEditor string `json:"lastEditor,omitempty"` 2829 // Name: Immutable. The resource name of the custom module. Its format is 2830 // "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{ 2831 // customModule}", or 2832 // "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule 2833 // }", or 2834 // "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModu 2835 // le}" The id {customModule} is server-generated and is not user settable. It 2836 // will be a numeric id containing 1-20 digits. 2837 Name string `json:"name,omitempty"` 2838 // UpdateTime: Output only. The time at which the custom module was last 2839 // updated. 2840 UpdateTime string `json:"updateTime,omitempty"` 2841 // ForceSendFields is a list of field names (e.g. "AncestorModule") to 2842 // unconditionally include in API requests. By default, fields with empty or 2843 // default values are omitted from API requests. See 2844 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2845 // details. 2846 ForceSendFields []string `json:"-"` 2847 // NullFields is a list of field names (e.g. "AncestorModule") to include in 2848 // API requests with the JSON null value. By default, fields with empty values 2849 // are omitted from API requests. See 2850 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2851 NullFields []string `json:"-"` 2852 } 2853 2854 func (s *GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule) MarshalJSON() ([]byte, error) { 2855 type NoMethod GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule 2856 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2857 } 2858 2859 // GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping: Resource value 2860 // mapping for Sensitive Data Protection findings. If any of these mappings 2861 // have a resource value that is not unspecified, the resource_value field will 2862 // be ignored when reading this configuration. 2863 type GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping struct { 2864 // HighSensitivityMapping: Resource value mapping for high-sensitivity 2865 // Sensitive Data Protection findings 2866 // 2867 // Possible values: 2868 // "RESOURCE_VALUE_UNSPECIFIED" - Unspecific value 2869 // "HIGH" - High resource value 2870 // "MEDIUM" - Medium resource value 2871 // "LOW" - Low resource value 2872 // "NONE" - No resource value, e.g. ignore these resources 2873 HighSensitivityMapping string `json:"highSensitivityMapping,omitempty"` 2874 // MediumSensitivityMapping: Resource value mapping for medium-sensitivity 2875 // Sensitive Data Protection findings 2876 // 2877 // Possible values: 2878 // "RESOURCE_VALUE_UNSPECIFIED" - Unspecific value 2879 // "HIGH" - High resource value 2880 // "MEDIUM" - Medium resource value 2881 // "LOW" - Low resource value 2882 // "NONE" - No resource value, e.g. ignore these resources 2883 MediumSensitivityMapping string `json:"mediumSensitivityMapping,omitempty"` 2884 // ForceSendFields is a list of field names (e.g. "HighSensitivityMapping") to 2885 // unconditionally include in API requests. By default, fields with empty or 2886 // default values are omitted from API requests. See 2887 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2888 // details. 2889 ForceSendFields []string `json:"-"` 2890 // NullFields is a list of field names (e.g. "HighSensitivityMapping") to 2891 // include in API requests with the JSON null value. By default, fields with 2892 // empty values are omitted from API requests. See 2893 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2894 NullFields []string `json:"-"` 2895 } 2896 2897 func (s *GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping) MarshalJSON() ([]byte, error) { 2898 type NoMethod GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping 2899 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2900 } 2901 2902 // GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse: Response of asset 2903 // discovery run 2904 type GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse struct { 2905 // Duration: The duration between asset discovery run start and end 2906 Duration string `json:"duration,omitempty"` 2907 // State: The state of an asset discovery run. 2908 // 2909 // Possible values: 2910 // "STATE_UNSPECIFIED" - Asset discovery run state was unspecified. 2911 // "COMPLETED" - Asset discovery run completed successfully. 2912 // "SUPERSEDED" - Asset discovery run was cancelled with tasks still pending, 2913 // as another run for the same organization was started with a higher priority. 2914 // "TERMINATED" - Asset discovery run was killed and terminated. 2915 State string `json:"state,omitempty"` 2916 // ForceSendFields is a list of field names (e.g. "Duration") to 2917 // unconditionally include in API requests. By default, fields with empty or 2918 // default values are 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. "Duration") 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 *GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse) MarshalJSON() ([]byte, error) { 2930 type NoMethod GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse 2931 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2932 } 2933 2934 // GoogleCloudSecuritycenterV1p1beta1Finding: Security Command Center finding. 2935 // A finding is a record of assessment data (security, risk, health or privacy) 2936 // ingested into Security Command Center for presentation, notification, 2937 // analysis, policy testing, and enforcement. For example, an XSS vulnerability 2938 // in an App Engine application is a finding. 2939 type GoogleCloudSecuritycenterV1p1beta1Finding struct { 2940 // CanonicalName: The canonical name of the finding. It's either 2941 // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", 2942 // "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or 2943 // "projects/{project_number}/sources/{source_id}/findings/{finding_id}", 2944 // depending on the closest CRM ancestor of the resource associated with the 2945 // finding. 2946 CanonicalName string `json:"canonicalName,omitempty"` 2947 // Category: The additional taxonomy group within findings from a given source. 2948 // This field is immutable after creation time. Example: "XSS_FLASH_INJECTION" 2949 Category string `json:"category,omitempty"` 2950 // CreateTime: The time at which the finding was created in Security Command 2951 // Center. 2952 CreateTime string `json:"createTime,omitempty"` 2953 // EventTime: The time at which the event took place, or when an update to the 2954 // finding occurred. For example, if the finding represents an open firewall it 2955 // would capture the time the detector believes the firewall became open. The 2956 // accuracy is determined by the detector. If the finding were to be resolved 2957 // afterward, this time would reflect when the finding was resolved. Must not 2958 // be set to a value greater than the current timestamp. 2959 EventTime string `json:"eventTime,omitempty"` 2960 // ExternalUri: The URI that, if available, points to a web page outside of 2961 // Security Command Center where additional information about the finding can 2962 // be found. This field is guaranteed to be either empty or a well formed URL. 2963 ExternalUri string `json:"externalUri,omitempty"` 2964 // Name: The relative resource name of this finding. See: 2965 // https://cloud.google.com/apis/design/resource_names#relative_resource_name 2966 // Example: 2967 // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" 2968 Name string `json:"name,omitempty"` 2969 // Parent: The relative resource name of the source the finding belongs to. 2970 // See: 2971 // https://cloud.google.com/apis/design/resource_names#relative_resource_name 2972 // This field is immutable after creation time. For example: 2973 // "organizations/{organization_id}/sources/{source_id}" 2974 Parent string `json:"parent,omitempty"` 2975 // ResourceName: For findings on Google Cloud resources, the full resource name 2976 // of the Google Cloud resource this finding is for. See: 2977 // https://cloud.google.com/apis/design/resource_names#full_resource_name When 2978 // the finding is for a non-Google Cloud resource, the resourceName can be a 2979 // customer or partner defined string. This field is immutable after creation 2980 // time. 2981 ResourceName string `json:"resourceName,omitempty"` 2982 // SecurityMarks: Output only. User specified security marks. These marks are 2983 // entirely managed by the user and come from the SecurityMarks resource that 2984 // belongs to the finding. 2985 SecurityMarks *GoogleCloudSecuritycenterV1p1beta1SecurityMarks `json:"securityMarks,omitempty"` 2986 // Severity: The severity of the finding. This field is managed by the source 2987 // that writes the finding. 2988 // 2989 // Possible values: 2990 // "SEVERITY_UNSPECIFIED" - No severity specified. The default value. 2991 // "CRITICAL" - Critical severity. 2992 // "HIGH" - High severity. 2993 // "MEDIUM" - Medium severity. 2994 // "LOW" - Low severity. 2995 Severity string `json:"severity,omitempty"` 2996 // SourceProperties: Source specific properties. These properties are managed 2997 // by the source that writes the finding. The key names in the 2998 // source_properties map must be between 1 and 255 characters, and must start 2999 // with a letter and contain alphanumeric characters or underscores only. 3000 SourceProperties googleapi.RawMessage `json:"sourceProperties,omitempty"` 3001 // State: The state of the finding. 3002 // 3003 // Possible values: 3004 // "STATE_UNSPECIFIED" - Unspecified state. 3005 // "ACTIVE" - The finding requires attention and has not been addressed yet. 3006 // "INACTIVE" - The finding has been fixed, triaged as a non-issue or 3007 // otherwise addressed and is no longer active. 3008 State string `json:"state,omitempty"` 3009 // ForceSendFields is a list of field names (e.g. "CanonicalName") to 3010 // unconditionally include in API requests. By default, fields with empty or 3011 // default values are omitted from API requests. See 3012 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3013 // details. 3014 ForceSendFields []string `json:"-"` 3015 // NullFields is a list of field names (e.g. "CanonicalName") to include in API 3016 // requests with the JSON null value. By default, fields with empty values are 3017 // omitted from API requests. See 3018 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3019 NullFields []string `json:"-"` 3020 } 3021 3022 func (s *GoogleCloudSecuritycenterV1p1beta1Finding) MarshalJSON() ([]byte, error) { 3023 type NoMethod GoogleCloudSecuritycenterV1p1beta1Finding 3024 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3025 } 3026 3027 // GoogleCloudSecuritycenterV1p1beta1Folder: Message that contains the resource 3028 // name and display name of a folder resource. 3029 type GoogleCloudSecuritycenterV1p1beta1Folder struct { 3030 // ResourceFolder: Full resource name of this folder. See: 3031 // https://cloud.google.com/apis/design/resource_names#full_resource_name 3032 ResourceFolder string `json:"resourceFolder,omitempty"` 3033 // ResourceFolderDisplayName: The user defined display name for this folder. 3034 ResourceFolderDisplayName string `json:"resourceFolderDisplayName,omitempty"` 3035 // ForceSendFields is a list of field names (e.g. "ResourceFolder") to 3036 // unconditionally include in API requests. By default, fields with empty or 3037 // default values are omitted from API requests. See 3038 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3039 // details. 3040 ForceSendFields []string `json:"-"` 3041 // NullFields is a list of field names (e.g. "ResourceFolder") to include in 3042 // API requests with the JSON null value. By default, fields with empty values 3043 // are omitted from API requests. See 3044 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3045 NullFields []string `json:"-"` 3046 } 3047 3048 func (s *GoogleCloudSecuritycenterV1p1beta1Folder) MarshalJSON() ([]byte, error) { 3049 type NoMethod GoogleCloudSecuritycenterV1p1beta1Folder 3050 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3051 } 3052 3053 // GoogleCloudSecuritycenterV1p1beta1NotificationMessage: Security Command 3054 // Center's Notification 3055 type GoogleCloudSecuritycenterV1p1beta1NotificationMessage struct { 3056 // Finding: If it's a Finding based notification config, this field will be 3057 // populated. 3058 Finding *GoogleCloudSecuritycenterV1p1beta1Finding `json:"finding,omitempty"` 3059 // NotificationConfigName: Name of the notification config that generated 3060 // current notification. 3061 NotificationConfigName string `json:"notificationConfigName,omitempty"` 3062 // Resource: The Cloud resource tied to the notification. 3063 Resource *GoogleCloudSecuritycenterV1p1beta1Resource `json:"resource,omitempty"` 3064 // ForceSendFields is a list of field names (e.g. "Finding") to unconditionally 3065 // include in API requests. By default, fields with empty or default values are 3066 // omitted from API requests. See 3067 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3068 // details. 3069 ForceSendFields []string `json:"-"` 3070 // NullFields is a list of field names (e.g. "Finding") to include in API 3071 // requests with the JSON null value. By default, fields with empty values are 3072 // omitted from API requests. See 3073 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3074 NullFields []string `json:"-"` 3075 } 3076 3077 func (s *GoogleCloudSecuritycenterV1p1beta1NotificationMessage) MarshalJSON() ([]byte, error) { 3078 type NoMethod GoogleCloudSecuritycenterV1p1beta1NotificationMessage 3079 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3080 } 3081 3082 // GoogleCloudSecuritycenterV1p1beta1Resource: Information related to the 3083 // Google Cloud resource. 3084 type GoogleCloudSecuritycenterV1p1beta1Resource struct { 3085 // Folders: Output only. Contains a Folder message for each folder in the 3086 // assets ancestry. The first folder is the deepest nested folder, and the last 3087 // folder is the folder directly under the Organization. 3088 Folders []*GoogleCloudSecuritycenterV1p1beta1Folder `json:"folders,omitempty"` 3089 // Name: The full resource name of the resource. See: 3090 // https://cloud.google.com/apis/design/resource_names#full_resource_name 3091 Name string `json:"name,omitempty"` 3092 // Parent: The full resource name of resource's parent. 3093 Parent string `json:"parent,omitempty"` 3094 // ParentDisplayName: The human readable name of resource's parent. 3095 ParentDisplayName string `json:"parentDisplayName,omitempty"` 3096 // Project: The full resource name of project that the resource belongs to. 3097 Project string `json:"project,omitempty"` 3098 // ProjectDisplayName: The project id that the resource belongs to. 3099 ProjectDisplayName string `json:"projectDisplayName,omitempty"` 3100 // ForceSendFields is a list of field names (e.g. "Folders") to unconditionally 3101 // include in API requests. By default, fields with empty or default values are 3102 // omitted from API requests. See 3103 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3104 // details. 3105 ForceSendFields []string `json:"-"` 3106 // NullFields is a list of field names (e.g. "Folders") to include in API 3107 // requests with the JSON null value. By default, fields with empty values are 3108 // omitted from API requests. See 3109 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3110 NullFields []string `json:"-"` 3111 } 3112 3113 func (s *GoogleCloudSecuritycenterV1p1beta1Resource) MarshalJSON() ([]byte, error) { 3114 type NoMethod GoogleCloudSecuritycenterV1p1beta1Resource 3115 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3116 } 3117 3118 // GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse: Response of 3119 // asset discovery run 3120 type GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse struct { 3121 // Duration: The duration between asset discovery run start and end 3122 Duration string `json:"duration,omitempty"` 3123 // State: The state of an asset discovery run. 3124 // 3125 // Possible values: 3126 // "STATE_UNSPECIFIED" - Asset discovery run state was unspecified. 3127 // "COMPLETED" - Asset discovery run completed successfully. 3128 // "SUPERSEDED" - Asset discovery run was cancelled with tasks still pending, 3129 // as another run for the same organization was started with a higher priority. 3130 // "TERMINATED" - Asset discovery run was killed and terminated. 3131 State string `json:"state,omitempty"` 3132 // ForceSendFields is a list of field names (e.g. "Duration") to 3133 // unconditionally include in API requests. By default, fields with empty or 3134 // default values are omitted from API requests. See 3135 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3136 // details. 3137 ForceSendFields []string `json:"-"` 3138 // NullFields is a list of field names (e.g. "Duration") to include in API 3139 // requests with the JSON null value. By default, fields with empty values are 3140 // omitted from API requests. See 3141 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3142 NullFields []string `json:"-"` 3143 } 3144 3145 func (s *GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse) MarshalJSON() ([]byte, error) { 3146 type NoMethod GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse 3147 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3148 } 3149 3150 // GoogleCloudSecuritycenterV1p1beta1SecurityMarks: User specified security 3151 // marks that are attached to the parent Security Command Center resource. 3152 // Security marks are scoped within a Security Command Center organization -- 3153 // they can be modified and viewed by all users who have proper permissions on 3154 // the organization. 3155 type GoogleCloudSecuritycenterV1p1beta1SecurityMarks struct { 3156 // CanonicalName: The canonical name of the marks. Examples: 3157 // "organizations/{organization_id}/assets/{asset_id}/securityMarks" 3158 // "folders/{folder_id}/assets/{asset_id}/securityMarks" 3159 // "projects/{project_number}/assets/{asset_id}/securityMarks" 3160 // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/se 3161 // curityMarks" 3162 // "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" 3163 // 3164 // "projects/{project_number}/sources/{source_id}/findings/{finding_id}/security 3165 // Marks" 3166 CanonicalName string `json:"canonicalName,omitempty"` 3167 // Marks: Mutable user specified security marks belonging to the parent 3168 // resource. Constraints are as follows: * Keys and values are treated as case 3169 // insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys 3170 // must be letters, numbers, underscores, or dashes * Values have leading and 3171 // trailing whitespace trimmed, remaining characters must be between 1 - 4096 3172 // characters (inclusive) 3173 Marks map[string]string `json:"marks,omitempty"` 3174 // Name: The relative resource name of the SecurityMarks. See: 3175 // https://cloud.google.com/apis/design/resource_names#relative_resource_name 3176 // Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks" 3177 // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/se 3178 // curityMarks". 3179 Name string `json:"name,omitempty"` 3180 // ForceSendFields is a list of field names (e.g. "CanonicalName") to 3181 // unconditionally include in API requests. By default, fields with empty or 3182 // default values are omitted from API requests. See 3183 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3184 // details. 3185 ForceSendFields []string `json:"-"` 3186 // NullFields is a list of field names (e.g. "CanonicalName") to include in API 3187 // requests with the JSON null value. By default, fields with empty values are 3188 // omitted from API requests. See 3189 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3190 NullFields []string `json:"-"` 3191 } 3192 3193 func (s *GoogleCloudSecuritycenterV1p1beta1SecurityMarks) MarshalJSON() ([]byte, error) { 3194 type NoMethod GoogleCloudSecuritycenterV1p1beta1SecurityMarks 3195 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3196 } 3197 3198 // GoogleCloudSecuritycenterV2Access: Represents an access event. 3199 type GoogleCloudSecuritycenterV2Access struct { 3200 // CallerIp: Caller's IP address, such as "1.1.1.1". 3201 CallerIp string `json:"callerIp,omitempty"` 3202 // CallerIpGeo: The caller IP's geolocation, which identifies where the call 3203 // came from. 3204 CallerIpGeo *GoogleCloudSecuritycenterV2Geolocation `json:"callerIpGeo,omitempty"` 3205 // MethodName: The method that the service account called, e.g. "SetIamPolicy". 3206 MethodName string `json:"methodName,omitempty"` 3207 // PrincipalEmail: Associated email, such as "foo@google.com". The email 3208 // address of the authenticated user or a service account acting on behalf of a 3209 // third party principal making the request. For third party identity callers, 3210 // the `principal_subject` field is populated instead of this field. For 3211 // privacy reasons, the principal email address is sometimes redacted. For more 3212 // information, see Caller identities in audit logs 3213 // (https://cloud.google.com/logging/docs/audit#user-id). 3214 PrincipalEmail string `json:"principalEmail,omitempty"` 3215 // PrincipalSubject: A string that represents the principal_subject that is 3216 // associated with the identity. Unlike `principal_email`, `principal_subject` 3217 // supports principals that aren't associated with email addresses, such as 3218 // third party principals. For most identities, the format is 3219 // `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. 3220 // Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, 3221 // still use the legacy format `serviceAccount:{identity pool 3222 // name}[{subject}]`. 3223 PrincipalSubject string `json:"principalSubject,omitempty"` 3224 // ServiceAccountDelegationInfo: The identity delegation history of an 3225 // authenticated service account that made the request. The 3226 // `serviceAccountDelegationInfo[]` object contains information about the real 3227 // authorities that try to access Google Cloud resources by delegating on a 3228 // service account. When multiple authorities are present, they are guaranteed 3229 // to be sorted based on the original ordering of the identity delegation 3230 // events. 3231 ServiceAccountDelegationInfo []*GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo `json:"serviceAccountDelegationInfo,omitempty"` 3232 // ServiceAccountKeyName: The name of the service account key that was used to 3233 // create or exchange credentials when authenticating the service account that 3234 // made the request. This is a scheme-less URI full resource name. For example: 3235 // "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{k 3236 // ey}". 3237 ServiceAccountKeyName string `json:"serviceAccountKeyName,omitempty"` 3238 // ServiceName: This is the API service that the service account made a call 3239 // to, e.g. "iam.googleapis.com" 3240 ServiceName string `json:"serviceName,omitempty"` 3241 // UserAgent: The caller's user agent string associated with the finding. 3242 UserAgent string `json:"userAgent,omitempty"` 3243 // UserAgentFamily: Type of user agent associated with the finding. For 3244 // example, an operating system shell or an embedded or standalone application. 3245 UserAgentFamily string `json:"userAgentFamily,omitempty"` 3246 // UserName: A string that represents a username. The username provided depends 3247 // on the type of the finding and is likely not an IAM principal. For example, 3248 // this can be a system username if the finding is related to a virtual 3249 // machine, or it can be an application login username. 3250 UserName string `json:"userName,omitempty"` 3251 // ForceSendFields is a list of field names (e.g. "CallerIp") to 3252 // unconditionally include in API requests. By default, fields with empty or 3253 // default values are omitted from API requests. See 3254 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3255 // details. 3256 ForceSendFields []string `json:"-"` 3257 // NullFields is a list of field names (e.g. "CallerIp") to include in API 3258 // requests with the JSON null value. By default, fields with empty values are 3259 // omitted from API requests. See 3260 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3261 NullFields []string `json:"-"` 3262 } 3263 3264 func (s *GoogleCloudSecuritycenterV2Access) MarshalJSON() ([]byte, error) { 3265 type NoMethod GoogleCloudSecuritycenterV2Access 3266 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3267 } 3268 3269 // GoogleCloudSecuritycenterV2AccessReview: Conveys information about a 3270 // Kubernetes access review (such as one returned by a `kubectl auth can-i` 3271 // (https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access) 3272 // command) that was involved in a finding. 3273 type GoogleCloudSecuritycenterV2AccessReview struct { 3274 // Group: The API group of the resource. "*" means all. 3275 Group string `json:"group,omitempty"` 3276 // Name: The name of the resource being requested. Empty means all. 3277 Name string `json:"name,omitempty"` 3278 // Ns: Namespace of the action being requested. Currently, there is no 3279 // distinction between no namespace and all namespaces. Both are represented by 3280 // "" (empty). 3281 Ns string `json:"ns,omitempty"` 3282 // Resource: The optional resource type requested. "*" means all. 3283 Resource string `json:"resource,omitempty"` 3284 // Subresource: The optional subresource type. 3285 Subresource string `json:"subresource,omitempty"` 3286 // Verb: A Kubernetes resource API verb, like get, list, watch, create, update, 3287 // delete, proxy. "*" means all. 3288 Verb string `json:"verb,omitempty"` 3289 // Version: The API version of the resource. "*" means all. 3290 Version string `json:"version,omitempty"` 3291 // ForceSendFields is a list of field names (e.g. "Group") to unconditionally 3292 // include in API requests. By default, fields with empty or default values are 3293 // omitted from API requests. See 3294 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3295 // details. 3296 ForceSendFields []string `json:"-"` 3297 // NullFields is a list of field names (e.g. "Group") to include in API 3298 // requests with the JSON null value. By default, fields with empty values are 3299 // omitted from API requests. See 3300 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3301 NullFields []string `json:"-"` 3302 } 3303 3304 func (s *GoogleCloudSecuritycenterV2AccessReview) MarshalJSON() ([]byte, error) { 3305 type NoMethod GoogleCloudSecuritycenterV2AccessReview 3306 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3307 } 3308 3309 // GoogleCloudSecuritycenterV2AdaptiveProtection: Information about Google 3310 // Cloud Armor Adaptive Protection 3311 // (https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection). 3312 type GoogleCloudSecuritycenterV2AdaptiveProtection struct { 3313 // Confidence: A score of 0 means that there is low confidence that the 3314 // detected event is an actual attack. A score of 1 means that there is high 3315 // confidence that the detected event is an attack. See the Adaptive Protection 3316 // documentation 3317 // (https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) 3318 // for further explanation. 3319 Confidence float64 `json:"confidence,omitempty"` 3320 // ForceSendFields is a list of field names (e.g. "Confidence") to 3321 // unconditionally include in API requests. By default, fields with empty or 3322 // default values are omitted from API requests. See 3323 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3324 // details. 3325 ForceSendFields []string `json:"-"` 3326 // NullFields is a list of field names (e.g. "Confidence") to include in API 3327 // requests with the JSON null value. By default, fields with empty values are 3328 // omitted from API requests. See 3329 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3330 NullFields []string `json:"-"` 3331 } 3332 3333 func (s *GoogleCloudSecuritycenterV2AdaptiveProtection) MarshalJSON() ([]byte, error) { 3334 type NoMethod GoogleCloudSecuritycenterV2AdaptiveProtection 3335 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3336 } 3337 3338 func (s *GoogleCloudSecuritycenterV2AdaptiveProtection) UnmarshalJSON(data []byte) error { 3339 type NoMethod GoogleCloudSecuritycenterV2AdaptiveProtection 3340 var s1 struct { 3341 Confidence gensupport.JSONFloat64 `json:"confidence"` 3342 *NoMethod 3343 } 3344 s1.NoMethod = (*NoMethod)(s) 3345 if err := json.Unmarshal(data, &s1); err != nil { 3346 return err 3347 } 3348 s.Confidence = float64(s1.Confidence) 3349 return nil 3350 } 3351 3352 // GoogleCloudSecuritycenterV2Application: Represents an application associated 3353 // with a finding. 3354 type GoogleCloudSecuritycenterV2Application struct { 3355 // BaseUri: The base URI that identifies the network location of the 3356 // application in which the vulnerability was detected. For example, 3357 // `http://example.com`. 3358 BaseUri string `json:"baseUri,omitempty"` 3359 // FullUri: The full URI with payload that could be used to reproduce the 3360 // vulnerability. For example, `http://example.com?p=aMmYgI6H`. 3361 FullUri string `json:"fullUri,omitempty"` 3362 // ForceSendFields is a list of field names (e.g. "BaseUri") to unconditionally 3363 // include in API requests. By default, fields with empty or default values are 3364 // omitted from API requests. See 3365 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3366 // details. 3367 ForceSendFields []string `json:"-"` 3368 // NullFields is a list of field names (e.g. "BaseUri") to include in API 3369 // requests with the JSON null value. By default, fields with empty values are 3370 // omitted from API requests. See 3371 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3372 NullFields []string `json:"-"` 3373 } 3374 3375 func (s *GoogleCloudSecuritycenterV2Application) MarshalJSON() ([]byte, error) { 3376 type NoMethod GoogleCloudSecuritycenterV2Application 3377 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3378 } 3379 3380 // GoogleCloudSecuritycenterV2Attack: Information about DDoS attack volume and 3381 // classification. 3382 type GoogleCloudSecuritycenterV2Attack struct { 3383 // Classification: Type of attack, for example, 'SYN-flood', 'NTP-udp', or 3384 // 'CHARGEN-udp'. 3385 Classification string `json:"classification,omitempty"` 3386 // VolumeBps: Total BPS (bytes per second) volume of attack. 3387 VolumeBps int64 `json:"volumeBps,omitempty"` 3388 // VolumePps: Total PPS (packets per second) volume of attack. 3389 VolumePps int64 `json:"volumePps,omitempty"` 3390 // ForceSendFields is a list of field names (e.g. "Classification") to 3391 // unconditionally include in API requests. By default, fields with empty or 3392 // default values are omitted from API requests. See 3393 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3394 // details. 3395 ForceSendFields []string `json:"-"` 3396 // NullFields is a list of field names (e.g. "Classification") to include in 3397 // API requests with the JSON null value. By default, fields with empty values 3398 // are omitted from API requests. See 3399 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3400 NullFields []string `json:"-"` 3401 } 3402 3403 func (s *GoogleCloudSecuritycenterV2Attack) MarshalJSON() ([]byte, error) { 3404 type NoMethod GoogleCloudSecuritycenterV2Attack 3405 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3406 } 3407 3408 // GoogleCloudSecuritycenterV2AttackExposure: An attack exposure contains the 3409 // results of an attack path simulation run. 3410 type GoogleCloudSecuritycenterV2AttackExposure struct { 3411 // AttackExposureResult: The resource name of the attack path simulation result 3412 // that contains the details regarding this attack exposure score. Example: 3413 // organizations/123/simulations/456/attackExposureResults/789 3414 AttackExposureResult string `json:"attackExposureResult,omitempty"` 3415 // ExposedHighValueResourcesCount: The number of high value resources that are 3416 // exposed as a result of this finding. 3417 ExposedHighValueResourcesCount int64 `json:"exposedHighValueResourcesCount,omitempty"` 3418 // ExposedLowValueResourcesCount: The number of high value resources that are 3419 // exposed as a result of this finding. 3420 ExposedLowValueResourcesCount int64 `json:"exposedLowValueResourcesCount,omitempty"` 3421 // ExposedMediumValueResourcesCount: The number of medium value resources that 3422 // are exposed as a result of this finding. 3423 ExposedMediumValueResourcesCount int64 `json:"exposedMediumValueResourcesCount,omitempty"` 3424 // LatestCalculationTime: The most recent time the attack exposure was updated 3425 // on this finding. 3426 LatestCalculationTime string `json:"latestCalculationTime,omitempty"` 3427 // Score: A number between 0 (inclusive) and infinity that represents how 3428 // important this finding is to remediate. The higher the score, the more 3429 // important it is to remediate. 3430 Score float64 `json:"score,omitempty"` 3431 // State: Output only. What state this AttackExposure is in. This captures 3432 // whether or not an attack exposure has been calculated or not. 3433 // 3434 // Possible values: 3435 // "STATE_UNSPECIFIED" - The state is not specified. 3436 // "CALCULATED" - The attack exposure has been calculated. 3437 // "NOT_CALCULATED" - The attack exposure has not been calculated. 3438 State string `json:"state,omitempty"` 3439 // ForceSendFields is a list of field names (e.g. "AttackExposureResult") to 3440 // unconditionally include in API requests. By default, fields with empty or 3441 // default values are omitted from API requests. See 3442 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3443 // details. 3444 ForceSendFields []string `json:"-"` 3445 // NullFields is a list of field names (e.g. "AttackExposureResult") to include 3446 // in API requests with the JSON null value. By default, fields with empty 3447 // values are omitted from API requests. See 3448 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3449 NullFields []string `json:"-"` 3450 } 3451 3452 func (s *GoogleCloudSecuritycenterV2AttackExposure) MarshalJSON() ([]byte, error) { 3453 type NoMethod GoogleCloudSecuritycenterV2AttackExposure 3454 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3455 } 3456 3457 func (s *GoogleCloudSecuritycenterV2AttackExposure) UnmarshalJSON(data []byte) error { 3458 type NoMethod GoogleCloudSecuritycenterV2AttackExposure 3459 var s1 struct { 3460 Score gensupport.JSONFloat64 `json:"score"` 3461 *NoMethod 3462 } 3463 s1.NoMethod = (*NoMethod)(s) 3464 if err := json.Unmarshal(data, &s1); err != nil { 3465 return err 3466 } 3467 s.Score = float64(s1.Score) 3468 return nil 3469 } 3470 3471 // GoogleCloudSecuritycenterV2AwsAccount: An AWS account that is a member of an 3472 // organization. 3473 type GoogleCloudSecuritycenterV2AwsAccount struct { 3474 // Id: The unique identifier (ID) of the account, containing exactly 12 digits. 3475 Id string `json:"id,omitempty"` 3476 // Name: The friendly name of this account. 3477 Name string `json:"name,omitempty"` 3478 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 3479 // include in API requests. By default, fields with empty or default values are 3480 // omitted from API requests. See 3481 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3482 // details. 3483 ForceSendFields []string `json:"-"` 3484 // NullFields is a list of field names (e.g. "Id") to include in API requests 3485 // with the JSON null value. By default, fields with empty values are omitted 3486 // from API requests. See 3487 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3488 NullFields []string `json:"-"` 3489 } 3490 3491 func (s *GoogleCloudSecuritycenterV2AwsAccount) MarshalJSON() ([]byte, error) { 3492 type NoMethod GoogleCloudSecuritycenterV2AwsAccount 3493 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3494 } 3495 3496 // GoogleCloudSecuritycenterV2AwsMetadata: AWS metadata associated with the 3497 // resource, only applicable if the finding's cloud provider is Amazon Web 3498 // Services. 3499 type GoogleCloudSecuritycenterV2AwsMetadata struct { 3500 // Account: The AWS account associated with the resource. 3501 Account *GoogleCloudSecuritycenterV2AwsAccount `json:"account,omitempty"` 3502 // Organization: The AWS organization associated with the resource. 3503 Organization *GoogleCloudSecuritycenterV2AwsOrganization `json:"organization,omitempty"` 3504 // OrganizationalUnits: A list of AWS organizational units associated with the 3505 // resource, ordered from lowest level (closest to the account) to highest 3506 // level. 3507 OrganizationalUnits []*GoogleCloudSecuritycenterV2AwsOrganizationalUnit `json:"organizationalUnits,omitempty"` 3508 // ForceSendFields is a list of field names (e.g. "Account") to unconditionally 3509 // include in API requests. By default, fields with empty or default values are 3510 // omitted from API requests. See 3511 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3512 // details. 3513 ForceSendFields []string `json:"-"` 3514 // NullFields is a list of field names (e.g. "Account") to include in API 3515 // requests with the JSON null value. By default, fields with empty values are 3516 // omitted from API requests. See 3517 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3518 NullFields []string `json:"-"` 3519 } 3520 3521 func (s *GoogleCloudSecuritycenterV2AwsMetadata) MarshalJSON() ([]byte, error) { 3522 type NoMethod GoogleCloudSecuritycenterV2AwsMetadata 3523 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3524 } 3525 3526 // GoogleCloudSecuritycenterV2AwsOrganization: An organization is a collection 3527 // of accounts that are centrally managed together using consolidated billing, 3528 // organized hierarchically with organizational units (OUs), and controlled 3529 // with policies. 3530 type GoogleCloudSecuritycenterV2AwsOrganization struct { 3531 // Id: The unique identifier (ID) for the organization. The regex pattern for 3532 // an organization ID string requires "o-" followed by from 10 to 32 lowercase 3533 // letters or digits. 3534 Id string `json:"id,omitempty"` 3535 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 3536 // include in API requests. By default, fields with empty or default values are 3537 // omitted from API requests. See 3538 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3539 // details. 3540 ForceSendFields []string `json:"-"` 3541 // NullFields is a list of field names (e.g. "Id") to include in API requests 3542 // with the JSON null value. By default, fields with empty values are omitted 3543 // from API requests. See 3544 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3545 NullFields []string `json:"-"` 3546 } 3547 3548 func (s *GoogleCloudSecuritycenterV2AwsOrganization) MarshalJSON() ([]byte, error) { 3549 type NoMethod GoogleCloudSecuritycenterV2AwsOrganization 3550 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3551 } 3552 3553 // GoogleCloudSecuritycenterV2AwsOrganizationalUnit: An Organizational Unit 3554 // (OU) is a container of AWS accounts within a root of an organization. 3555 // Policies that are attached to an OU apply to all accounts contained in that 3556 // OU and in any child OUs. 3557 type GoogleCloudSecuritycenterV2AwsOrganizationalUnit struct { 3558 // Id: The unique identifier (ID) associated with this OU. The regex pattern 3559 // for an organizational unit ID string requires "ou-" followed by from 4 to 32 3560 // lowercase letters or digits (the ID of the root that contains the OU). This 3561 // string is followed by a second "-" dash and from 8 to 32 additional 3562 // lowercase letters or digits. For example, "ou-ab12-cd34ef56". 3563 Id string `json:"id,omitempty"` 3564 // Name: The friendly name of the OU. 3565 Name string `json:"name,omitempty"` 3566 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 3567 // include in API requests. By default, fields with empty or default values are 3568 // omitted from API requests. See 3569 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3570 // details. 3571 ForceSendFields []string `json:"-"` 3572 // NullFields is a list of field names (e.g. "Id") to include in API requests 3573 // with the JSON null value. By default, fields with empty values are omitted 3574 // from API requests. See 3575 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3576 NullFields []string `json:"-"` 3577 } 3578 3579 func (s *GoogleCloudSecuritycenterV2AwsOrganizationalUnit) MarshalJSON() ([]byte, error) { 3580 type NoMethod GoogleCloudSecuritycenterV2AwsOrganizationalUnit 3581 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3582 } 3583 3584 // GoogleCloudSecuritycenterV2BackupDisasterRecovery: Information related to 3585 // Google Cloud Backup and DR Service findings. 3586 type GoogleCloudSecuritycenterV2BackupDisasterRecovery struct { 3587 // Appliance: The name of the Backup and DR appliance that captures, moves, and 3588 // manages the lifecycle of backup data. For example, `backup-server-57137`. 3589 Appliance string `json:"appliance,omitempty"` 3590 // Applications: The names of Backup and DR applications. An application is a 3591 // VM, database, or file system on a managed host monitored by a backup and 3592 // recovery appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`, 3593 // `centos7-01-vol02`. 3594 Applications []string `json:"applications,omitempty"` 3595 // BackupCreateTime: The timestamp at which the Backup and DR backup was 3596 // created. 3597 BackupCreateTime string `json:"backupCreateTime,omitempty"` 3598 // BackupTemplate: The name of a Backup and DR template which comprises one or 3599 // more backup policies. See the Backup and DR documentation 3600 // (https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp) 3601 // for more information. For example, `snap-ov`. 3602 BackupTemplate string `json:"backupTemplate,omitempty"` 3603 // BackupType: The backup type of the Backup and DR image. For example, 3604 // `Snapshot`, `Remote Snapshot`, `OnVault`. 3605 BackupType string `json:"backupType,omitempty"` 3606 // Host: The name of a Backup and DR host, which is managed by the backup and 3607 // recovery appliance and known to the management console. The host can be of 3608 // type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file 3609 // system, etc.), vCenter, or an ESX server. See the Backup and DR 3610 // documentation on hosts 3611 // (https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications) 3612 // for more information. For example, `centos7-01`. 3613 Host string `json:"host,omitempty"` 3614 // Policies: The names of Backup and DR policies that are associated with a 3615 // template and that define when to run a backup, how frequently to run a 3616 // backup, and how long to retain the backup image. For example, `onvaults`. 3617 Policies []string `json:"policies,omitempty"` 3618 // PolicyOptions: The names of Backup and DR advanced policy options of a 3619 // policy applying to an application. See the Backup and DR documentation on 3620 // policy options 3621 // (https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings). 3622 // For example, `skipofflineappsincongrp, nounmap`. 3623 PolicyOptions []string `json:"policyOptions,omitempty"` 3624 // Profile: The name of the Backup and DR resource profile that specifies the 3625 // storage media for backups of application and VM data. See the Backup and DR 3626 // documentation on profiles 3627 // (https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile). 3628 // For example, `GCP`. 3629 Profile string `json:"profile,omitempty"` 3630 // StoragePool: The name of the Backup and DR storage pool that the backup and 3631 // recovery appliance is storing data in. The storage pool could be of type 3632 // Cloud, Primary, Snapshot, or OnVault. See the Backup and DR documentation on 3633 // storage pools 3634 // (https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools). 3635 // For example, `DiskPoolOne`. 3636 StoragePool string `json:"storagePool,omitempty"` 3637 // ForceSendFields is a list of field names (e.g. "Appliance") to 3638 // unconditionally include in API requests. By default, fields with empty or 3639 // default values are omitted from API requests. See 3640 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3641 // details. 3642 ForceSendFields []string `json:"-"` 3643 // NullFields is a list of field names (e.g. "Appliance") to include in API 3644 // requests with the JSON null value. By default, fields with empty values are 3645 // omitted from API requests. See 3646 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3647 NullFields []string `json:"-"` 3648 } 3649 3650 func (s *GoogleCloudSecuritycenterV2BackupDisasterRecovery) MarshalJSON() ([]byte, error) { 3651 type NoMethod GoogleCloudSecuritycenterV2BackupDisasterRecovery 3652 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3653 } 3654 3655 // GoogleCloudSecuritycenterV2BigQueryExport: Configures how to deliver 3656 // Findings to BigQuery Instance. 3657 type GoogleCloudSecuritycenterV2BigQueryExport struct { 3658 // CreateTime: Output only. The time at which the BigQuery export was created. 3659 // This field is set by the server and will be ignored if provided on export on 3660 // creation. 3661 CreateTime string `json:"createTime,omitempty"` 3662 // Dataset: The dataset to write findings' updates to. Its format is 3663 // "projects/[project_id]/datasets/[bigquery_dataset_id]". BigQuery Dataset 3664 // unique ID must contain only letters (a-z, A-Z), numbers (0-9), or 3665 // underscores (_). 3666 Dataset string `json:"dataset,omitempty"` 3667 // Description: The description of the export (max of 1024 characters). 3668 Description string `json:"description,omitempty"` 3669 // Filter: Expression that defines the filter to apply across create/update 3670 // events of findings. The expression is a list of zero or more restrictions 3671 // combined via logical operators `AND` and `OR`. Parentheses are supported, 3672 // and `OR` has higher precedence than `AND`. Restrictions have the form ` ` 3673 // and may have a `-` character in front of them to indicate negation. The 3674 // fields map to those defined in the corresponding resource. The supported 3675 // operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer 3676 // values. * `:`, meaning substring matching, for strings. The supported value 3677 // types are: * string literals in quotes. * integer literals without quotes. * 3678 // boolean literals `true` and `false` without quotes. 3679 Filter string `json:"filter,omitempty"` 3680 // MostRecentEditor: Output only. Email address of the user who last edited the 3681 // BigQuery export. This field is set by the server and will be ignored if 3682 // provided on export creation or update. 3683 MostRecentEditor string `json:"mostRecentEditor,omitempty"` 3684 // Name: The relative resource name of this export. See: 3685 // https://cloud.google.com/apis/design/resource_names#relative_resource_name. 3686 // The following list shows some examples: + 3687 // `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{exp 3688 // ort_id}` + 3689 // `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}` + 3690 // `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}` 3691 // This field is provided in responses, and is ignored when provided in create 3692 // requests. 3693 Name string `json:"name,omitempty"` 3694 // Principal: Output only. The service account that needs permission to create 3695 // table and upload data to the BigQuery dataset. 3696 Principal string `json:"principal,omitempty"` 3697 // UpdateTime: Output only. The most recent time at which the BigQuery export 3698 // was updated. This field is set by the server and will be ignored if provided 3699 // on export creation or update. 3700 UpdateTime string `json:"updateTime,omitempty"` 3701 // ForceSendFields is a list of field names (e.g. "CreateTime") to 3702 // unconditionally include in API requests. By default, fields with empty or 3703 // default values are omitted from API requests. See 3704 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3705 // details. 3706 ForceSendFields []string `json:"-"` 3707 // NullFields is a list of field names (e.g. "CreateTime") to include in API 3708 // requests with the JSON null value. By default, fields with empty values are 3709 // omitted from API requests. See 3710 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3711 NullFields []string `json:"-"` 3712 } 3713 3714 func (s *GoogleCloudSecuritycenterV2BigQueryExport) MarshalJSON() ([]byte, error) { 3715 type NoMethod GoogleCloudSecuritycenterV2BigQueryExport 3716 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3717 } 3718 3719 // GoogleCloudSecuritycenterV2Binding: Represents a Kubernetes RoleBinding or 3720 // ClusterRoleBinding. 3721 type GoogleCloudSecuritycenterV2Binding struct { 3722 // Name: Name for the binding. 3723 Name string `json:"name,omitempty"` 3724 // Ns: Namespace for the binding. 3725 Ns string `json:"ns,omitempty"` 3726 // Role: The Role or ClusterRole referenced by the binding. 3727 Role *GoogleCloudSecuritycenterV2Role `json:"role,omitempty"` 3728 // Subjects: Represents one or more subjects that are bound to the role. Not 3729 // always available for PATCH requests. 3730 Subjects []*GoogleCloudSecuritycenterV2Subject `json:"subjects,omitempty"` 3731 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 3732 // include in API requests. By default, fields with empty or default values are 3733 // omitted from API requests. See 3734 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3735 // details. 3736 ForceSendFields []string `json:"-"` 3737 // NullFields is a list of field names (e.g. "Name") to include in API requests 3738 // with the JSON null value. By default, fields with empty values are omitted 3739 // from API requests. See 3740 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3741 NullFields []string `json:"-"` 3742 } 3743 3744 func (s *GoogleCloudSecuritycenterV2Binding) MarshalJSON() ([]byte, error) { 3745 type NoMethod GoogleCloudSecuritycenterV2Binding 3746 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3747 } 3748 3749 // GoogleCloudSecuritycenterV2BulkMuteFindingsResponse: The response to a 3750 // BulkMute request. Contains the LRO information. 3751 type GoogleCloudSecuritycenterV2BulkMuteFindingsResponse struct { 3752 } 3753 3754 // GoogleCloudSecuritycenterV2CloudArmor: Fields related to Google Cloud Armor 3755 // findings. 3756 type GoogleCloudSecuritycenterV2CloudArmor struct { 3757 // AdaptiveProtection: Information about potential Layer 7 DDoS attacks 3758 // identified by Google Cloud Armor Adaptive Protection 3759 // (https://cloud.google.com/armor/docs/adaptive-protection-overview). 3760 AdaptiveProtection *GoogleCloudSecuritycenterV2AdaptiveProtection `json:"adaptiveProtection,omitempty"` 3761 // Attack: Information about DDoS attack volume and classification. 3762 Attack *GoogleCloudSecuritycenterV2Attack `json:"attack,omitempty"` 3763 // Duration: Duration of attack from the start until the current moment 3764 // (updated every 5 minutes). 3765 Duration string `json:"duration,omitempty"` 3766 // Requests: Information about incoming requests evaluated by Google Cloud 3767 // Armor security policies 3768 // (https://cloud.google.com/armor/docs/security-policy-overview). 3769 Requests *GoogleCloudSecuritycenterV2Requests `json:"requests,omitempty"` 3770 // SecurityPolicy: Information about the Google Cloud Armor security policy 3771 // (https://cloud.google.com/armor/docs/security-policy-overview) relevant to 3772 // the finding. 3773 SecurityPolicy *GoogleCloudSecuritycenterV2SecurityPolicy `json:"securityPolicy,omitempty"` 3774 // ThreatVector: Distinguish between volumetric & protocol DDoS attack and 3775 // application layer attacks. For example, "L3_4" for Layer 3 and Layer 4 DDoS 3776 // attacks, or "L_7" for Layer 7 DDoS attacks. 3777 ThreatVector string `json:"threatVector,omitempty"` 3778 // ForceSendFields is a list of field names (e.g. "AdaptiveProtection") to 3779 // unconditionally include in API requests. By default, fields with empty or 3780 // default values are omitted from API requests. See 3781 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3782 // details. 3783 ForceSendFields []string `json:"-"` 3784 // NullFields is a list of field names (e.g. "AdaptiveProtection") to include 3785 // in API requests with the JSON null value. By default, fields with empty 3786 // values are omitted from API requests. See 3787 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3788 NullFields []string `json:"-"` 3789 } 3790 3791 func (s *GoogleCloudSecuritycenterV2CloudArmor) MarshalJSON() ([]byte, error) { 3792 type NoMethod GoogleCloudSecuritycenterV2CloudArmor 3793 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3794 } 3795 3796 // GoogleCloudSecuritycenterV2CloudDlpDataProfile: The data profile 3797 // (https://cloud.google.com/dlp/docs/data-profiles) associated with the 3798 // finding. 3799 type GoogleCloudSecuritycenterV2CloudDlpDataProfile struct { 3800 // DataProfile: Name of the data profile, for example, 3801 // `projects/123/locations/europe/tableProfiles/8383929`. 3802 DataProfile string `json:"dataProfile,omitempty"` 3803 // ParentType: The resource hierarchy level at which the data profile was 3804 // generated. 3805 // 3806 // Possible values: 3807 // "PARENT_TYPE_UNSPECIFIED" - Unspecified parent type. 3808 // "ORGANIZATION" - Organization-level configurations. 3809 // "PROJECT" - Project-level configurations. 3810 ParentType string `json:"parentType,omitempty"` 3811 // ForceSendFields is a list of field names (e.g. "DataProfile") to 3812 // unconditionally include in API requests. By default, fields with empty or 3813 // default values are omitted from API requests. See 3814 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3815 // details. 3816 ForceSendFields []string `json:"-"` 3817 // NullFields is a list of field names (e.g. "DataProfile") to include in API 3818 // requests with the JSON null value. By default, fields with empty values are 3819 // omitted from API requests. See 3820 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3821 NullFields []string `json:"-"` 3822 } 3823 3824 func (s *GoogleCloudSecuritycenterV2CloudDlpDataProfile) MarshalJSON() ([]byte, error) { 3825 type NoMethod GoogleCloudSecuritycenterV2CloudDlpDataProfile 3826 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3827 } 3828 3829 // GoogleCloudSecuritycenterV2CloudDlpInspection: Details about the Cloud Data 3830 // Loss Prevention (Cloud DLP) inspection job 3831 // (https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced the 3832 // finding. 3833 type GoogleCloudSecuritycenterV2CloudDlpInspection struct { 3834 // FullScan: Whether Cloud DLP scanned the complete resource or a sampled 3835 // subset. 3836 FullScan bool `json:"fullScan,omitempty"` 3837 // InfoType: The type of information (or *infoType 3838 // (https://cloud.google.com/dlp/docs/infotypes-reference)*) found, for 3839 // example, `EMAIL_ADDRESS` or `STREET_ADDRESS`. 3840 InfoType string `json:"infoType,omitempty"` 3841 // InfoTypeCount: The number of times Cloud DLP found this infoType within this 3842 // job and resource. 3843 InfoTypeCount int64 `json:"infoTypeCount,omitempty,string"` 3844 // InspectJob: Name of the inspection job, for example, 3845 // `projects/123/locations/europe/dlpJobs/i-8383929`. 3846 InspectJob string `json:"inspectJob,omitempty"` 3847 // ForceSendFields is a list of field names (e.g. "FullScan") to 3848 // unconditionally include in API requests. By default, fields with empty or 3849 // default values are omitted from API requests. See 3850 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3851 // details. 3852 ForceSendFields []string `json:"-"` 3853 // NullFields is a list of field names (e.g. "FullScan") to include in API 3854 // requests with the JSON null value. By default, fields with empty values are 3855 // omitted from API requests. See 3856 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3857 NullFields []string `json:"-"` 3858 } 3859 3860 func (s *GoogleCloudSecuritycenterV2CloudDlpInspection) MarshalJSON() ([]byte, error) { 3861 type NoMethod GoogleCloudSecuritycenterV2CloudDlpInspection 3862 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3863 } 3864 3865 // GoogleCloudSecuritycenterV2CloudLoggingEntry: Metadata taken from a Cloud 3866 // Logging LogEntry 3867 // (https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) 3868 type GoogleCloudSecuritycenterV2CloudLoggingEntry struct { 3869 // InsertId: A unique identifier for the log entry. 3870 InsertId string `json:"insertId,omitempty"` 3871 // LogId: The type of the log (part of `log_name`. `log_name` is the resource 3872 // name of the log to which this log entry belongs). For example: 3873 // `cloudresourcemanager.googleapis.com/activity` Note that this field is not 3874 // URL-encoded, unlike in `LogEntry`. 3875 LogId string `json:"logId,omitempty"` 3876 // ResourceContainer: The organization, folder, or project of the monitored 3877 // resource that produced this log entry. 3878 ResourceContainer string `json:"resourceContainer,omitempty"` 3879 // Timestamp: The time the event described by the log entry occurred. 3880 Timestamp string `json:"timestamp,omitempty"` 3881 // ForceSendFields is a list of field names (e.g. "InsertId") to 3882 // unconditionally include in API requests. By default, fields with empty or 3883 // default values are omitted from API requests. See 3884 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3885 // details. 3886 ForceSendFields []string `json:"-"` 3887 // NullFields is a list of field names (e.g. "InsertId") to include in API 3888 // requests with the JSON null value. By default, fields with empty values are 3889 // omitted from API requests. See 3890 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3891 NullFields []string `json:"-"` 3892 } 3893 3894 func (s *GoogleCloudSecuritycenterV2CloudLoggingEntry) MarshalJSON() ([]byte, error) { 3895 type NoMethod GoogleCloudSecuritycenterV2CloudLoggingEntry 3896 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3897 } 3898 3899 // GoogleCloudSecuritycenterV2Compliance: Contains compliance information about 3900 // a security standard indicating unmet recommendations. 3901 type GoogleCloudSecuritycenterV2Compliance struct { 3902 // Ids: Policies within the standard or benchmark, for example, A.12.4.1 3903 Ids []string `json:"ids,omitempty"` 3904 // Standard: Industry-wide compliance standards or benchmarks, such as CIS, 3905 // PCI, and OWASP. 3906 Standard string `json:"standard,omitempty"` 3907 // Version: Version of the standard or benchmark, for example, 1.1 3908 Version string `json:"version,omitempty"` 3909 // ForceSendFields is a list of field names (e.g. "Ids") to unconditionally 3910 // include in API requests. By default, fields with empty or default values are 3911 // omitted from API requests. See 3912 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3913 // details. 3914 ForceSendFields []string `json:"-"` 3915 // NullFields is a list of field names (e.g. "Ids") to include in API requests 3916 // with the JSON null value. By default, fields with empty values are omitted 3917 // from API requests. See 3918 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3919 NullFields []string `json:"-"` 3920 } 3921 3922 func (s *GoogleCloudSecuritycenterV2Compliance) MarshalJSON() ([]byte, error) { 3923 type NoMethod GoogleCloudSecuritycenterV2Compliance 3924 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3925 } 3926 3927 // GoogleCloudSecuritycenterV2Connection: Contains information about the IP 3928 // connection associated with the finding. 3929 type GoogleCloudSecuritycenterV2Connection struct { 3930 // DestinationIp: Destination IP address. Not present for sockets that are 3931 // listening and not connected. 3932 DestinationIp string `json:"destinationIp,omitempty"` 3933 // DestinationPort: Destination port. Not present for sockets that are 3934 // listening and not connected. 3935 DestinationPort int64 `json:"destinationPort,omitempty"` 3936 // Protocol: IANA Internet Protocol Number such as TCP(6) and UDP(17). 3937 // 3938 // Possible values: 3939 // "PROTOCOL_UNSPECIFIED" - Unspecified protocol (not HOPOPT). 3940 // "ICMP" - Internet Control Message Protocol. 3941 // "TCP" - Transmission Control Protocol. 3942 // "UDP" - User Datagram Protocol. 3943 // "GRE" - Generic Routing Encapsulation. 3944 // "ESP" - Encap Security Payload. 3945 Protocol string `json:"protocol,omitempty"` 3946 // SourceIp: Source IP address. 3947 SourceIp string `json:"sourceIp,omitempty"` 3948 // SourcePort: Source port. 3949 SourcePort int64 `json:"sourcePort,omitempty"` 3950 // ForceSendFields is a list of field names (e.g. "DestinationIp") to 3951 // unconditionally include in API requests. By default, fields with empty or 3952 // default values are omitted from API requests. See 3953 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3954 // details. 3955 ForceSendFields []string `json:"-"` 3956 // NullFields is a list of field names (e.g. "DestinationIp") to include in API 3957 // requests with the JSON null value. By default, fields with empty values are 3958 // omitted from API requests. See 3959 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3960 NullFields []string `json:"-"` 3961 } 3962 3963 func (s *GoogleCloudSecuritycenterV2Connection) MarshalJSON() ([]byte, error) { 3964 type NoMethod GoogleCloudSecuritycenterV2Connection 3965 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3966 } 3967 3968 // GoogleCloudSecuritycenterV2Contact: The email address of a contact. 3969 type GoogleCloudSecuritycenterV2Contact struct { 3970 // Email: An email address. For example, "person123@company.com". 3971 Email string `json:"email,omitempty"` 3972 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally 3973 // include in API requests. By default, fields with empty or default values are 3974 // omitted from API requests. See 3975 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3976 // details. 3977 ForceSendFields []string `json:"-"` 3978 // NullFields is a list of field names (e.g. "Email") to include in API 3979 // requests with the JSON null value. By default, fields with empty values are 3980 // omitted from API requests. See 3981 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3982 NullFields []string `json:"-"` 3983 } 3984 3985 func (s *GoogleCloudSecuritycenterV2Contact) MarshalJSON() ([]byte, error) { 3986 type NoMethod GoogleCloudSecuritycenterV2Contact 3987 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3988 } 3989 3990 // GoogleCloudSecuritycenterV2ContactDetails: Details about specific contacts 3991 type GoogleCloudSecuritycenterV2ContactDetails struct { 3992 // Contacts: A list of contacts 3993 Contacts []*GoogleCloudSecuritycenterV2Contact `json:"contacts,omitempty"` 3994 // ForceSendFields is a list of field names (e.g. "Contacts") to 3995 // unconditionally include in API requests. By default, fields with empty or 3996 // default values are omitted from API requests. See 3997 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3998 // details. 3999 ForceSendFields []string `json:"-"` 4000 // NullFields is a list of field names (e.g. "Contacts") to include in API 4001 // requests with the JSON null value. By default, fields with empty values are 4002 // omitted from API requests. See 4003 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4004 NullFields []string `json:"-"` 4005 } 4006 4007 func (s *GoogleCloudSecuritycenterV2ContactDetails) MarshalJSON() ([]byte, error) { 4008 type NoMethod GoogleCloudSecuritycenterV2ContactDetails 4009 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4010 } 4011 4012 // GoogleCloudSecuritycenterV2Container: Container associated with the finding. 4013 type GoogleCloudSecuritycenterV2Container struct { 4014 // CreateTime: The time that the container was created. 4015 CreateTime string `json:"createTime,omitempty"` 4016 // ImageId: Optional container image ID, if provided by the container runtime. 4017 // Uniquely identifies the container image launched using a container image 4018 // digest. 4019 ImageId string `json:"imageId,omitempty"` 4020 // Labels: Container labels, as provided by the container runtime. 4021 Labels []*GoogleCloudSecuritycenterV2Label `json:"labels,omitempty"` 4022 // Name: Name of the container. 4023 Name string `json:"name,omitempty"` 4024 // Uri: Container image URI provided when configuring a pod or container. This 4025 // string can identify a container image version using mutable tags. 4026 Uri string `json:"uri,omitempty"` 4027 // ForceSendFields is a list of field names (e.g. "CreateTime") to 4028 // unconditionally include in API requests. By default, fields with empty or 4029 // default values are omitted from API requests. See 4030 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4031 // details. 4032 ForceSendFields []string `json:"-"` 4033 // NullFields is a list of field names (e.g. "CreateTime") to include in API 4034 // requests with the JSON null value. By default, fields with empty values are 4035 // omitted from API requests. See 4036 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4037 NullFields []string `json:"-"` 4038 } 4039 4040 func (s *GoogleCloudSecuritycenterV2Container) MarshalJSON() ([]byte, error) { 4041 type NoMethod GoogleCloudSecuritycenterV2Container 4042 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4043 } 4044 4045 // GoogleCloudSecuritycenterV2Cve: CVE stands for Common Vulnerabilities and 4046 // Exposures. Information from the CVE record 4047 // (https://www.cve.org/ResourcesSupport/Glossary) that describes this 4048 // vulnerability. 4049 type GoogleCloudSecuritycenterV2Cve struct { 4050 // Cvssv3: Describe Common Vulnerability Scoring System specified at 4051 // https://www.first.org/cvss/v3.1/specification-document 4052 Cvssv3 *GoogleCloudSecuritycenterV2Cvssv3 `json:"cvssv3,omitempty"` 4053 // ExploitationActivity: The exploitation activity of the vulnerability in the 4054 // wild. 4055 // 4056 // Possible values: 4057 // "EXPLOITATION_ACTIVITY_UNSPECIFIED" - Invalid or empty value. 4058 // "WIDE" - Exploitation has been reported or confirmed to widely occur. 4059 // "CONFIRMED" - Limited reported or confirmed exploitation activities. 4060 // "AVAILABLE" - Exploit is publicly available. 4061 // "ANTICIPATED" - No known exploitation activity, but has a high potential 4062 // for exploitation. 4063 // "NO_KNOWN" - No known exploitation activity. 4064 ExploitationActivity string `json:"exploitationActivity,omitempty"` 4065 // Id: The unique identifier for the vulnerability. e.g. CVE-2021-34527 4066 Id string `json:"id,omitempty"` 4067 // Impact: The potential impact of the vulnerability if it was to be exploited. 4068 // 4069 // Possible values: 4070 // "RISK_RATING_UNSPECIFIED" - Invalid or empty value. 4071 // "LOW" - Exploitation would have little to no security impact. 4072 // "MEDIUM" - Exploitation would enable attackers to perform activities, or 4073 // could allow attackers to have a direct impact, but would require additional 4074 // steps. 4075 // "HIGH" - Exploitation would enable attackers to have a notable direct 4076 // impact without needing to overcome any major mitigating factors. 4077 // "CRITICAL" - Exploitation would fundamentally undermine the security of 4078 // affected systems, enable actors to perform significant attacks with minimal 4079 // effort, with little to no mitigating factors to overcome. 4080 Impact string `json:"impact,omitempty"` 4081 // ObservedInTheWild: Whether or not the vulnerability has been observed in the 4082 // wild. 4083 ObservedInTheWild bool `json:"observedInTheWild,omitempty"` 4084 // References: Additional information about the CVE. e.g. 4085 // https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 4086 References []*GoogleCloudSecuritycenterV2Reference `json:"references,omitempty"` 4087 // UpstreamFixAvailable: Whether upstream fix is available for the CVE. 4088 UpstreamFixAvailable bool `json:"upstreamFixAvailable,omitempty"` 4089 // ZeroDay: Whether or not the vulnerability was zero day when the finding was 4090 // published. 4091 ZeroDay bool `json:"zeroDay,omitempty"` 4092 // ForceSendFields is a list of field names (e.g. "Cvssv3") to unconditionally 4093 // include in API requests. By default, fields with empty or default values are 4094 // omitted from API requests. See 4095 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4096 // details. 4097 ForceSendFields []string `json:"-"` 4098 // NullFields is a list of field names (e.g. "Cvssv3") to include in API 4099 // requests with the JSON null value. By default, fields with empty values are 4100 // omitted from API requests. See 4101 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4102 NullFields []string `json:"-"` 4103 } 4104 4105 func (s *GoogleCloudSecuritycenterV2Cve) MarshalJSON() ([]byte, error) { 4106 type NoMethod GoogleCloudSecuritycenterV2Cve 4107 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4108 } 4109 4110 // GoogleCloudSecuritycenterV2Cvssv3: Common Vulnerability Scoring System 4111 // version 3. 4112 type GoogleCloudSecuritycenterV2Cvssv3 struct { 4113 // AttackComplexity: This metric describes the conditions beyond the attacker's 4114 // control that must exist in order to exploit the vulnerability. 4115 // 4116 // Possible values: 4117 // "ATTACK_COMPLEXITY_UNSPECIFIED" - Invalid value. 4118 // "ATTACK_COMPLEXITY_LOW" - Specialized access conditions or extenuating 4119 // circumstances do not exist. An attacker can expect repeatable success when 4120 // attacking the vulnerable component. 4121 // "ATTACK_COMPLEXITY_HIGH" - A successful attack depends on conditions 4122 // beyond the attacker's control. That is, a successful attack cannot be 4123 // accomplished at will, but requires the attacker to invest in some measurable 4124 // amount of effort in preparation or execution against the vulnerable 4125 // component before a successful attack can be expected. 4126 AttackComplexity string `json:"attackComplexity,omitempty"` 4127 // AttackVector: Base Metrics Represents the intrinsic characteristics of a 4128 // vulnerability that are constant over time and across user environments. This 4129 // metric reflects the context by which vulnerability exploitation is possible. 4130 // 4131 // Possible values: 4132 // "ATTACK_VECTOR_UNSPECIFIED" - Invalid value. 4133 // "ATTACK_VECTOR_NETWORK" - The vulnerable component is bound to the network 4134 // stack and the set of possible attackers extends beyond the other options 4135 // listed below, up to and including the entire Internet. 4136 // "ATTACK_VECTOR_ADJACENT" - The vulnerable component is bound to the 4137 // network stack, but the attack is limited at the protocol level to a 4138 // logically adjacent topology. 4139 // "ATTACK_VECTOR_LOCAL" - The vulnerable component is not bound to the 4140 // network stack and the attacker's path is via read/write/execute 4141 // capabilities. 4142 // "ATTACK_VECTOR_PHYSICAL" - The attack requires the attacker to physically 4143 // touch or manipulate the vulnerable component. 4144 AttackVector string `json:"attackVector,omitempty"` 4145 // AvailabilityImpact: This metric measures the impact to the availability of 4146 // the impacted component resulting from a successfully exploited 4147 // vulnerability. 4148 // 4149 // Possible values: 4150 // "IMPACT_UNSPECIFIED" - Invalid value. 4151 // "IMPACT_HIGH" - High impact. 4152 // "IMPACT_LOW" - Low impact. 4153 // "IMPACT_NONE" - No impact. 4154 AvailabilityImpact string `json:"availabilityImpact,omitempty"` 4155 // BaseScore: The base score is a function of the base metric scores. 4156 BaseScore float64 `json:"baseScore,omitempty"` 4157 // ConfidentialityImpact: This metric measures the impact to the 4158 // confidentiality of the information resources managed by a software component 4159 // due to a successfully exploited vulnerability. 4160 // 4161 // Possible values: 4162 // "IMPACT_UNSPECIFIED" - Invalid value. 4163 // "IMPACT_HIGH" - High impact. 4164 // "IMPACT_LOW" - Low impact. 4165 // "IMPACT_NONE" - No impact. 4166 ConfidentialityImpact string `json:"confidentialityImpact,omitempty"` 4167 // IntegrityImpact: This metric measures the impact to integrity of a 4168 // successfully exploited vulnerability. 4169 // 4170 // Possible values: 4171 // "IMPACT_UNSPECIFIED" - Invalid value. 4172 // "IMPACT_HIGH" - High impact. 4173 // "IMPACT_LOW" - Low impact. 4174 // "IMPACT_NONE" - No impact. 4175 IntegrityImpact string `json:"integrityImpact,omitempty"` 4176 // PrivilegesRequired: This metric describes the level of privileges an 4177 // attacker must possess before successfully exploiting the vulnerability. 4178 // 4179 // Possible values: 4180 // "PRIVILEGES_REQUIRED_UNSPECIFIED" - Invalid value. 4181 // "PRIVILEGES_REQUIRED_NONE" - The attacker is unauthorized prior to attack, 4182 // and therefore does not require any access to settings or files of the 4183 // vulnerable system to carry out an attack. 4184 // "PRIVILEGES_REQUIRED_LOW" - The attacker requires privileges that provide 4185 // basic user capabilities that could normally affect only settings and files 4186 // owned by a user. Alternatively, an attacker with Low privileges has the 4187 // ability to access only non-sensitive resources. 4188 // "PRIVILEGES_REQUIRED_HIGH" - The attacker requires privileges that provide 4189 // significant (e.g., administrative) control over the vulnerable component 4190 // allowing access to component-wide settings and files. 4191 PrivilegesRequired string `json:"privilegesRequired,omitempty"` 4192 // Scope: The Scope metric captures whether a vulnerability in one vulnerable 4193 // component impacts resources in components beyond its security scope. 4194 // 4195 // Possible values: 4196 // "SCOPE_UNSPECIFIED" - Invalid value. 4197 // "SCOPE_UNCHANGED" - An exploited vulnerability can only affect resources 4198 // managed by the same security authority. 4199 // "SCOPE_CHANGED" - An exploited vulnerability can affect resources beyond 4200 // the security scope managed by the security authority of the vulnerable 4201 // component. 4202 Scope string `json:"scope,omitempty"` 4203 // UserInteraction: This metric captures the requirement for a human user, 4204 // other than the attacker, to participate in the successful compromise of the 4205 // vulnerable component. 4206 // 4207 // Possible values: 4208 // "USER_INTERACTION_UNSPECIFIED" - Invalid value. 4209 // "USER_INTERACTION_NONE" - The vulnerable system can be exploited without 4210 // interaction from any user. 4211 // "USER_INTERACTION_REQUIRED" - Successful exploitation of this 4212 // vulnerability requires a user to take some action before the vulnerability 4213 // can be exploited. 4214 UserInteraction string `json:"userInteraction,omitempty"` 4215 // ForceSendFields is a list of field names (e.g. "AttackComplexity") to 4216 // unconditionally include in API requests. By default, fields with empty or 4217 // default values are omitted from API requests. See 4218 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4219 // details. 4220 ForceSendFields []string `json:"-"` 4221 // NullFields is a list of field names (e.g. "AttackComplexity") to include in 4222 // API requests with the JSON null value. By default, fields with empty values 4223 // are omitted from API requests. See 4224 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4225 NullFields []string `json:"-"` 4226 } 4227 4228 func (s *GoogleCloudSecuritycenterV2Cvssv3) MarshalJSON() ([]byte, error) { 4229 type NoMethod GoogleCloudSecuritycenterV2Cvssv3 4230 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4231 } 4232 4233 func (s *GoogleCloudSecuritycenterV2Cvssv3) UnmarshalJSON(data []byte) error { 4234 type NoMethod GoogleCloudSecuritycenterV2Cvssv3 4235 var s1 struct { 4236 BaseScore gensupport.JSONFloat64 `json:"baseScore"` 4237 *NoMethod 4238 } 4239 s1.NoMethod = (*NoMethod)(s) 4240 if err := json.Unmarshal(data, &s1); err != nil { 4241 return err 4242 } 4243 s.BaseScore = float64(s1.BaseScore) 4244 return nil 4245 } 4246 4247 // GoogleCloudSecuritycenterV2Database: Represents database access information, 4248 // such as queries. A database may be a sub-resource of an instance (as in the 4249 // case of Cloud SQL instances or Cloud Spanner instances), or the database 4250 // instance itself. Some database resources might not have the full resource 4251 // name (https://google.aip.dev/122#full-resource-names) populated because 4252 // these resource types, such as Cloud SQL databases, are not yet supported by 4253 // Cloud Asset Inventory. In these cases only the display name is provided. 4254 type GoogleCloudSecuritycenterV2Database struct { 4255 // DisplayName: The human-readable name of the database that the user connected 4256 // to. 4257 DisplayName string `json:"displayName,omitempty"` 4258 // Grantees: The target usernames, roles, or groups of an SQL privilege grant, 4259 // which is not an IAM policy change. 4260 Grantees []string `json:"grantees,omitempty"` 4261 // Name: Some database resources may not have the full resource name 4262 // (https://google.aip.dev/122#full-resource-names) populated because these 4263 // resource types are not yet supported by Cloud Asset Inventory (e.g. Cloud 4264 // SQL databases). In these cases only the display name will be provided. The 4265 // full resource name (https://google.aip.dev/122#full-resource-names) of the 4266 // database that the user connected to, if it is supported by Cloud Asset 4267 // Inventory. 4268 Name string `json:"name,omitempty"` 4269 // Query: The SQL statement that is associated with the database access. 4270 Query string `json:"query,omitempty"` 4271 // UserName: The username used to connect to the database. The username might 4272 // not be an IAM principal and does not have a set format. 4273 UserName string `json:"userName,omitempty"` 4274 // Version: The version of the database, for example, POSTGRES_14. See the 4275 // complete list 4276 // (https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). 4277 Version string `json:"version,omitempty"` 4278 // ForceSendFields is a list of field names (e.g. "DisplayName") to 4279 // unconditionally include in API requests. By default, fields with empty or 4280 // default values are omitted from API requests. See 4281 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4282 // details. 4283 ForceSendFields []string `json:"-"` 4284 // NullFields is a list of field names (e.g. "DisplayName") to include in API 4285 // requests with the JSON null value. By default, fields with empty values are 4286 // omitted from API requests. See 4287 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4288 NullFields []string `json:"-"` 4289 } 4290 4291 func (s *GoogleCloudSecuritycenterV2Database) MarshalJSON() ([]byte, error) { 4292 type NoMethod GoogleCloudSecuritycenterV2Database 4293 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4294 } 4295 4296 // GoogleCloudSecuritycenterV2Detection: Memory hash detection contributing to 4297 // the binary family match. 4298 type GoogleCloudSecuritycenterV2Detection struct { 4299 // Binary: The name of the binary associated with the memory hash signature 4300 // detection. 4301 Binary string `json:"binary,omitempty"` 4302 // PercentPagesMatched: The percentage of memory page hashes in the signature 4303 // that were matched. 4304 PercentPagesMatched float64 `json:"percentPagesMatched,omitempty"` 4305 // ForceSendFields is a list of field names (e.g. "Binary") to unconditionally 4306 // include in API requests. By default, fields with empty or default values are 4307 // omitted from API requests. See 4308 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4309 // details. 4310 ForceSendFields []string `json:"-"` 4311 // NullFields is a list of field names (e.g. "Binary") to include in API 4312 // requests with the JSON null value. By default, fields with empty values are 4313 // omitted from API requests. See 4314 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4315 NullFields []string `json:"-"` 4316 } 4317 4318 func (s *GoogleCloudSecuritycenterV2Detection) MarshalJSON() ([]byte, error) { 4319 type NoMethod GoogleCloudSecuritycenterV2Detection 4320 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4321 } 4322 4323 func (s *GoogleCloudSecuritycenterV2Detection) UnmarshalJSON(data []byte) error { 4324 type NoMethod GoogleCloudSecuritycenterV2Detection 4325 var s1 struct { 4326 PercentPagesMatched gensupport.JSONFloat64 `json:"percentPagesMatched"` 4327 *NoMethod 4328 } 4329 s1.NoMethod = (*NoMethod)(s) 4330 if err := json.Unmarshal(data, &s1); err != nil { 4331 return err 4332 } 4333 s.PercentPagesMatched = float64(s1.PercentPagesMatched) 4334 return nil 4335 } 4336 4337 // GoogleCloudSecuritycenterV2DiskPath: Path of the file in terms of underlying 4338 // disk/partition identifiers. 4339 type GoogleCloudSecuritycenterV2DiskPath struct { 4340 // PartitionUuid: UUID of the partition (format 4341 // https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid) 4342 PartitionUuid string `json:"partitionUuid,omitempty"` 4343 // RelativePath: Relative path of the file in the partition as a JSON encoded 4344 // string. Example: /home/user1/executable_file.sh 4345 RelativePath string `json:"relativePath,omitempty"` 4346 // ForceSendFields is a list of field names (e.g. "PartitionUuid") to 4347 // unconditionally include in API requests. By default, fields with empty or 4348 // default values are omitted from API requests. See 4349 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4350 // details. 4351 ForceSendFields []string `json:"-"` 4352 // NullFields is a list of field names (e.g. "PartitionUuid") to include in API 4353 // requests with the JSON null value. By default, fields with empty values are 4354 // omitted from API requests. See 4355 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4356 NullFields []string `json:"-"` 4357 } 4358 4359 func (s *GoogleCloudSecuritycenterV2DiskPath) MarshalJSON() ([]byte, error) { 4360 type NoMethod GoogleCloudSecuritycenterV2DiskPath 4361 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4362 } 4363 4364 // GoogleCloudSecuritycenterV2EnvironmentVariable: A name-value pair 4365 // representing an environment variable used in an operating system process. 4366 type GoogleCloudSecuritycenterV2EnvironmentVariable struct { 4367 // Name: Environment variable name as a JSON encoded string. 4368 Name string `json:"name,omitempty"` 4369 // Val: Environment variable value as a JSON encoded string. 4370 Val string `json:"val,omitempty"` 4371 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 4372 // include in API requests. By default, fields with empty or default values are 4373 // omitted from API requests. See 4374 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4375 // details. 4376 ForceSendFields []string `json:"-"` 4377 // NullFields is a list of field names (e.g. "Name") to include in API requests 4378 // with the JSON null value. By default, fields with empty values are omitted 4379 // from API requests. See 4380 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4381 NullFields []string `json:"-"` 4382 } 4383 4384 func (s *GoogleCloudSecuritycenterV2EnvironmentVariable) MarshalJSON() ([]byte, error) { 4385 type NoMethod GoogleCloudSecuritycenterV2EnvironmentVariable 4386 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4387 } 4388 4389 // GoogleCloudSecuritycenterV2ExfilResource: Resource where data was 4390 // exfiltrated from or exfiltrated to. 4391 type GoogleCloudSecuritycenterV2ExfilResource struct { 4392 // Components: Subcomponents of the asset that was exfiltrated, like URIs used 4393 // during exfiltration, table names, databases, and filenames. For example, 4394 // multiple tables might have been exfiltrated from the same Cloud SQL 4395 // instance, or multiple files might have been exfiltrated from the same Cloud 4396 // Storage bucket. 4397 Components []string `json:"components,omitempty"` 4398 // Name: The resource's full resource name 4399 // (https://cloud.google.com/apis/design/resource_names#full_resource_name). 4400 Name string `json:"name,omitempty"` 4401 // ForceSendFields is a list of field names (e.g. "Components") to 4402 // unconditionally include in API requests. By default, fields with empty or 4403 // default values are omitted from API requests. See 4404 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4405 // details. 4406 ForceSendFields []string `json:"-"` 4407 // NullFields is a list of field names (e.g. "Components") to include in API 4408 // requests with the JSON null value. By default, fields with empty values are 4409 // omitted from API requests. See 4410 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4411 NullFields []string `json:"-"` 4412 } 4413 4414 func (s *GoogleCloudSecuritycenterV2ExfilResource) MarshalJSON() ([]byte, error) { 4415 type NoMethod GoogleCloudSecuritycenterV2ExfilResource 4416 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4417 } 4418 4419 // GoogleCloudSecuritycenterV2Exfiltration: Exfiltration represents a data 4420 // exfiltration attempt from one or more sources to one or more targets. The 4421 // `sources` attribute lists the sources of the exfiltrated data. The `targets` 4422 // attribute lists the destinations the data was copied to. 4423 type GoogleCloudSecuritycenterV2Exfiltration struct { 4424 // Sources: If there are multiple sources, then the data is considered "joined" 4425 // between them. For instance, BigQuery can join multiple tables, and each 4426 // table would be considered a source. 4427 Sources []*GoogleCloudSecuritycenterV2ExfilResource `json:"sources,omitempty"` 4428 // Targets: If there are multiple targets, each target would get a complete 4429 // copy of the "joined" source data. 4430 Targets []*GoogleCloudSecuritycenterV2ExfilResource `json:"targets,omitempty"` 4431 // TotalExfiltratedBytes: Total exfiltrated bytes processed for the entire job. 4432 TotalExfiltratedBytes int64 `json:"totalExfiltratedBytes,omitempty,string"` 4433 // ForceSendFields is a list of field names (e.g. "Sources") to unconditionally 4434 // include in API requests. By default, fields with empty or default values are 4435 // omitted from API requests. See 4436 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4437 // details. 4438 ForceSendFields []string `json:"-"` 4439 // NullFields is a list of field names (e.g. "Sources") to include in API 4440 // requests with the JSON null value. By default, fields with empty values are 4441 // omitted from API requests. See 4442 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4443 NullFields []string `json:"-"` 4444 } 4445 4446 func (s *GoogleCloudSecuritycenterV2Exfiltration) MarshalJSON() ([]byte, error) { 4447 type NoMethod GoogleCloudSecuritycenterV2Exfiltration 4448 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4449 } 4450 4451 // GoogleCloudSecuritycenterV2ExternalSystem: Representation of third party 4452 // SIEM/SOAR fields within SCC. 4453 type GoogleCloudSecuritycenterV2ExternalSystem struct { 4454 // Assignees: References primary/secondary etc assignees in the external 4455 // system. 4456 Assignees []string `json:"assignees,omitempty"` 4457 // CaseCloseTime: The time when the case was closed, as reported by the 4458 // external system. 4459 CaseCloseTime string `json:"caseCloseTime,omitempty"` 4460 // CaseCreateTime: The time when the case was created, as reported by the 4461 // external system. 4462 CaseCreateTime string `json:"caseCreateTime,omitempty"` 4463 // CasePriority: The priority of the finding's corresponding case in the 4464 // external system. 4465 CasePriority string `json:"casePriority,omitempty"` 4466 // CaseSla: The SLA of the finding's corresponding case in the external system. 4467 CaseSla string `json:"caseSla,omitempty"` 4468 // CaseUri: The link to the finding's corresponding case in the external 4469 // system. 4470 CaseUri string `json:"caseUri,omitempty"` 4471 // ExternalSystemUpdateTime: The time when the case was last updated, as 4472 // reported by the external system. 4473 ExternalSystemUpdateTime string `json:"externalSystemUpdateTime,omitempty"` 4474 // ExternalUid: The identifier that's used to track the finding's corresponding 4475 // case in the external system. 4476 ExternalUid string `json:"externalUid,omitempty"` 4477 // Name: Full resource name of the external system. The following list shows 4478 // some examples: + 4479 // `organizations/1234/sources/5678/findings/123456/externalSystems/jira` + 4480 // `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems 4481 // /jira` + `folders/1234/sources/5678/findings/123456/externalSystems/jira` + 4482 // `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` 4483 // + `projects/1234/sources/5678/findings/123456/externalSystems/jira` + 4484 // `projects/1234/sources/5678/locations/us/findings/123456/externalSystems/jira 4485 // ` 4486 Name string `json:"name,omitempty"` 4487 // Status: The most recent status of the finding's corresponding case, as 4488 // reported by the external system. 4489 Status string `json:"status,omitempty"` 4490 // TicketInfo: Information about the ticket, if any, that is being used to 4491 // track the resolution of the issue that is identified by this finding. 4492 TicketInfo *GoogleCloudSecuritycenterV2TicketInfo `json:"ticketInfo,omitempty"` 4493 // ForceSendFields is a list of field names (e.g. "Assignees") to 4494 // unconditionally include in API requests. By default, fields with empty or 4495 // default values are omitted from API requests. See 4496 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4497 // details. 4498 ForceSendFields []string `json:"-"` 4499 // NullFields is a list of field names (e.g. "Assignees") to include in API 4500 // requests with the JSON null value. By default, fields with empty values are 4501 // omitted from API requests. See 4502 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4503 NullFields []string `json:"-"` 4504 } 4505 4506 func (s *GoogleCloudSecuritycenterV2ExternalSystem) MarshalJSON() ([]byte, error) { 4507 type NoMethod GoogleCloudSecuritycenterV2ExternalSystem 4508 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4509 } 4510 4511 // GoogleCloudSecuritycenterV2File: File information about the related 4512 // binary/library used by an executable, or the script used by a script 4513 // interpreter 4514 type GoogleCloudSecuritycenterV2File struct { 4515 // Contents: Prefix of the file contents as a JSON-encoded string. 4516 Contents string `json:"contents,omitempty"` 4517 // DiskPath: Path of the file in terms of underlying disk/partition 4518 // identifiers. 4519 DiskPath *GoogleCloudSecuritycenterV2DiskPath `json:"diskPath,omitempty"` 4520 // HashedSize: The length in bytes of the file prefix that was hashed. If 4521 // hashed_size == size, any hashes reported represent the entire file. 4522 HashedSize int64 `json:"hashedSize,omitempty,string"` 4523 // PartiallyHashed: True when the hash covers only a prefix of the file. 4524 PartiallyHashed bool `json:"partiallyHashed,omitempty"` 4525 // Path: Absolute path of the file as a JSON encoded string. 4526 Path string `json:"path,omitempty"` 4527 // Sha256: SHA256 hash of the first hashed_size bytes of the file encoded as a 4528 // hex string. If hashed_size == size, sha256 represents the SHA256 hash of the 4529 // entire file. 4530 Sha256 string `json:"sha256,omitempty"` 4531 // Size: Size of the file in bytes. 4532 Size int64 `json:"size,omitempty,string"` 4533 // ForceSendFields is a list of field names (e.g. "Contents") to 4534 // unconditionally include in API requests. By default, fields with empty or 4535 // default values are omitted from API requests. See 4536 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4537 // details. 4538 ForceSendFields []string `json:"-"` 4539 // NullFields is a list of field names (e.g. "Contents") to include in API 4540 // requests with the JSON null value. By default, fields with empty values are 4541 // omitted from API requests. See 4542 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4543 NullFields []string `json:"-"` 4544 } 4545 4546 func (s *GoogleCloudSecuritycenterV2File) MarshalJSON() ([]byte, error) { 4547 type NoMethod GoogleCloudSecuritycenterV2File 4548 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4549 } 4550 4551 // GoogleCloudSecuritycenterV2Finding: Security Command Center finding. A 4552 // finding is a record of assessment data like security, risk, health, or 4553 // privacy, that is ingested into Security Command Center for presentation, 4554 // notification, analysis, policy testing, and enforcement. For example, a 4555 // cross-site scripting (XSS) vulnerability in an App Engine application is a 4556 // finding. 4557 type GoogleCloudSecuritycenterV2Finding struct { 4558 // Access: Access details associated with the finding, such as more information 4559 // on the caller, which method was accessed, and from where. 4560 Access *GoogleCloudSecuritycenterV2Access `json:"access,omitempty"` 4561 // Application: Represents an application associated with the finding. 4562 Application *GoogleCloudSecuritycenterV2Application `json:"application,omitempty"` 4563 // AttackExposure: The results of an attack path simulation relevant to this 4564 // finding. 4565 AttackExposure *GoogleCloudSecuritycenterV2AttackExposure `json:"attackExposure,omitempty"` 4566 // BackupDisasterRecovery: Fields related to Backup and DR findings. 4567 BackupDisasterRecovery *GoogleCloudSecuritycenterV2BackupDisasterRecovery `json:"backupDisasterRecovery,omitempty"` 4568 // CanonicalName: Output only. The canonical name of the finding. The following 4569 // list shows some examples: + 4570 // `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` 4571 // + 4572 // `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/ 4573 // findings/{finding_id}` + 4574 // `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + 4575 // `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{fi 4576 // nding_id}` + 4577 // `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + 4578 // `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{ 4579 // finding_id}` The prefix is the closest CRM ancestor of the resource 4580 // associated with the finding. 4581 CanonicalName string `json:"canonicalName,omitempty"` 4582 // Category: Immutable. The additional taxonomy group within findings from a 4583 // given source. Example: "XSS_FLASH_INJECTION" 4584 Category string `json:"category,omitempty"` 4585 // CloudArmor: Fields related to Cloud Armor findings. 4586 CloudArmor *GoogleCloudSecuritycenterV2CloudArmor `json:"cloudArmor,omitempty"` 4587 // CloudDlpDataProfile: Cloud DLP data profile that is associated with the 4588 // finding. 4589 CloudDlpDataProfile *GoogleCloudSecuritycenterV2CloudDlpDataProfile `json:"cloudDlpDataProfile,omitempty"` 4590 // CloudDlpInspection: Cloud Data Loss Prevention (Cloud DLP) inspection 4591 // results that are associated with the finding. 4592 CloudDlpInspection *GoogleCloudSecuritycenterV2CloudDlpInspection `json:"cloudDlpInspection,omitempty"` 4593 // Compliances: Contains compliance information for security standards 4594 // associated to the finding. 4595 Compliances []*GoogleCloudSecuritycenterV2Compliance `json:"compliances,omitempty"` 4596 // Connections: Contains information about the IP connection associated with 4597 // the finding. 4598 Connections []*GoogleCloudSecuritycenterV2Connection `json:"connections,omitempty"` 4599 // Contacts: Output only. Map containing the points of contact for the given 4600 // finding. The key represents the type of contact, while the value contains a 4601 // list of all the contacts that pertain. Please refer to: 4602 // https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories 4603 // { "security": { "contacts": [ { "email": "person1@company.com" }, { "email": 4604 // "person2@company.com" } ] } } 4605 Contacts map[string]GoogleCloudSecuritycenterV2ContactDetails `json:"contacts,omitempty"` 4606 // Containers: Containers associated with the finding. This field provides 4607 // information for both Kubernetes and non-Kubernetes containers. 4608 Containers []*GoogleCloudSecuritycenterV2Container `json:"containers,omitempty"` 4609 // CreateTime: Output only. The time at which the finding was created in 4610 // Security Command Center. 4611 CreateTime string `json:"createTime,omitempty"` 4612 // Database: Database associated with the finding. 4613 Database *GoogleCloudSecuritycenterV2Database `json:"database,omitempty"` 4614 // Description: Contains more details about the finding. 4615 Description string `json:"description,omitempty"` 4616 // EventTime: The time the finding was first detected. If an existing finding 4617 // is updated, then this is the time the update occurred. For example, if the 4618 // finding represents an open firewall, this property captures the time the 4619 // detector believes the firewall became open. The accuracy is determined by 4620 // the detector. If the finding is later resolved, then this time reflects when 4621 // the finding was resolved. This must not be set to a value greater than the 4622 // current timestamp. 4623 EventTime string `json:"eventTime,omitempty"` 4624 // Exfiltration: Represents exfiltrations associated with the finding. 4625 Exfiltration *GoogleCloudSecuritycenterV2Exfiltration `json:"exfiltration,omitempty"` 4626 // ExternalSystems: Output only. Third party SIEM/SOAR fields within SCC, 4627 // contains external system information and external system finding fields. 4628 ExternalSystems map[string]GoogleCloudSecuritycenterV2ExternalSystem `json:"externalSystems,omitempty"` 4629 // ExternalUri: The URI that, if available, points to a web page outside of 4630 // Security Command Center where additional information about the finding can 4631 // be found. This field is guaranteed to be either empty or a well formed URL. 4632 ExternalUri string `json:"externalUri,omitempty"` 4633 // Files: File associated with the finding. 4634 Files []*GoogleCloudSecuritycenterV2File `json:"files,omitempty"` 4635 // FindingClass: The class of the finding. 4636 // 4637 // Possible values: 4638 // "FINDING_CLASS_UNSPECIFIED" - Unspecified finding class. 4639 // "THREAT" - Describes unwanted or malicious activity. 4640 // "VULNERABILITY" - Describes a potential weakness in software that 4641 // increases risk to Confidentiality & Integrity & Availability. 4642 // "MISCONFIGURATION" - Describes a potential weakness in cloud 4643 // resource/asset configuration that increases risk. 4644 // "OBSERVATION" - Describes a security observation that is for informational 4645 // purposes. 4646 // "SCC_ERROR" - Describes an error that prevents some SCC functionality. 4647 // "POSTURE_VIOLATION" - Describes a potential security risk due to a change 4648 // in the security posture. 4649 FindingClass string `json:"findingClass,omitempty"` 4650 // IamBindings: Represents IAM bindings associated with the finding. 4651 IamBindings []*GoogleCloudSecuritycenterV2IamBinding `json:"iamBindings,omitempty"` 4652 // Indicator: Represents what's commonly known as an *indicator of compromise* 4653 // (IoC) in computer forensics. This is an artifact observed on a network or in 4654 // an operating system that, with high confidence, indicates a computer 4655 // intrusion. For more information, see Indicator of compromise 4656 // (https://en.wikipedia.org/wiki/Indicator_of_compromise). 4657 Indicator *GoogleCloudSecuritycenterV2Indicator `json:"indicator,omitempty"` 4658 // KernelRootkit: Signature of the kernel rootkit. 4659 KernelRootkit *GoogleCloudSecuritycenterV2KernelRootkit `json:"kernelRootkit,omitempty"` 4660 // Kubernetes: Kubernetes resources associated with the finding. 4661 Kubernetes *GoogleCloudSecuritycenterV2Kubernetes `json:"kubernetes,omitempty"` 4662 // LoadBalancers: The load balancers associated with the finding. 4663 LoadBalancers []*GoogleCloudSecuritycenterV2LoadBalancer `json:"loadBalancers,omitempty"` 4664 // LogEntries: Log entries that are relevant to the finding. 4665 LogEntries []*GoogleCloudSecuritycenterV2LogEntry `json:"logEntries,omitempty"` 4666 // MitreAttack: MITRE ATT&CK tactics and techniques related to this finding. 4667 // See: https://attack.mitre.org 4668 MitreAttack *GoogleCloudSecuritycenterV2MitreAttack `json:"mitreAttack,omitempty"` 4669 // ModuleName: Unique identifier of the module which generated the finding. 4670 // Example: 4671 // folders/598186756061/securityHealthAnalyticsSettings/customModules/5679944116 4672 // 1885 4673 ModuleName string `json:"moduleName,omitempty"` 4674 // Mute: Indicates the mute state of a finding (either muted, unmuted or 4675 // undefined). Unlike other attributes of a finding, a finding provider 4676 // shouldn't set the value of mute. 4677 // 4678 // Possible values: 4679 // "MUTE_UNSPECIFIED" - Unspecified. 4680 // "MUTED" - Finding has been muted. 4681 // "UNMUTED" - Finding has been unmuted. 4682 // "UNDEFINED" - Finding has never been muted/unmuted. 4683 Mute string `json:"mute,omitempty"` 4684 // MuteInitiator: Records additional information about the mute operation, for 4685 // example, the mute configuration 4686 // (https://cloud.google.com/security-command-center/docs/how-to-mute-findings) 4687 // that muted the finding and the user who muted the finding. 4688 MuteInitiator string `json:"muteInitiator,omitempty"` 4689 // MuteUpdateTime: Output only. The most recent time this finding was muted or 4690 // unmuted. 4691 MuteUpdateTime string `json:"muteUpdateTime,omitempty"` 4692 // Name: The relative resource name 4693 // (https://cloud.google.com/apis/design/resource_names#relative_resource_name) 4694 // of the finding. The following list shows some examples: + 4695 // `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` 4696 // + 4697 // `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/ 4698 // findings/{finding_id}` + 4699 // `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + 4700 // `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{fi 4701 // nding_id}` + 4702 // `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + 4703 // `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{ 4704 // finding_id}` 4705 Name string `json:"name,omitempty"` 4706 // NextSteps: Steps to address the finding. 4707 NextSteps string `json:"nextSteps,omitempty"` 4708 // Notebook: Notebook associated with the finding. 4709 Notebook *GoogleCloudSecuritycenterV2Notebook `json:"notebook,omitempty"` 4710 // OrgPolicies: Contains information about the org policies associated with the 4711 // finding. 4712 OrgPolicies []*GoogleCloudSecuritycenterV2OrgPolicy `json:"orgPolicies,omitempty"` 4713 // Parent: The relative resource name of the source and location the finding 4714 // belongs to. See: 4715 // https://cloud.google.com/apis/design/resource_names#relative_resource_name 4716 // This field is immutable after creation time. The following list shows some 4717 // examples: + `organizations/{organization_id}/sources/{source_id}` + 4718 // `folders/{folders_id}/sources/{source_id}` + 4719 // `projects/{projects_id}/sources/{source_id}` + 4720 // `organizations/{organization_id}/sources/{source_id}/locations/{location_id}` 4721 // + `folders/{folders_id}/sources/{source_id}/locations/{location_id}` + 4722 // `projects/{projects_id}/sources/{source_id}/locations/{location_id}` 4723 Parent string `json:"parent,omitempty"` 4724 // ParentDisplayName: Output only. The human readable display name of the 4725 // finding source such as "Event Threat Detection" or "Security Health 4726 // Analytics". 4727 ParentDisplayName string `json:"parentDisplayName,omitempty"` 4728 // Processes: Represents operating system processes associated with the 4729 // Finding. 4730 Processes []*GoogleCloudSecuritycenterV2Process `json:"processes,omitempty"` 4731 // ResourceName: Immutable. For findings on Google Cloud resources, the full 4732 // resource name of the Google Cloud resource this finding is for. See: 4733 // https://cloud.google.com/apis/design/resource_names#full_resource_name When 4734 // the finding is for a non-Google Cloud resource, the resourceName can be a 4735 // customer or partner defined string. 4736 ResourceName string `json:"resourceName,omitempty"` 4737 // SecurityMarks: Output only. User specified security marks. These marks are 4738 // entirely managed by the user and come from the SecurityMarks resource that 4739 // belongs to the finding. 4740 SecurityMarks *GoogleCloudSecuritycenterV2SecurityMarks `json:"securityMarks,omitempty"` 4741 // SecurityPosture: The security posture associated with the finding. 4742 SecurityPosture *GoogleCloudSecuritycenterV2SecurityPosture `json:"securityPosture,omitempty"` 4743 // Severity: The severity of the finding. This field is managed by the source 4744 // that writes the finding. 4745 // 4746 // Possible values: 4747 // "SEVERITY_UNSPECIFIED" - This value is used for findings when a source 4748 // doesn't write a severity value. 4749 // "CRITICAL" - Vulnerability: A critical vulnerability is easily 4750 // discoverable by an external actor, exploitable, and results in the direct 4751 // ability to execute arbitrary code, exfiltrate data, and otherwise gain 4752 // additional access and privileges to cloud resources and workloads. Examples 4753 // include publicly accessible unprotected user data and public SSH access with 4754 // weak or no passwords. Threat: Indicates a threat that is able to access, 4755 // modify, or delete data or execute unauthorized code within existing 4756 // resources. 4757 // "HIGH" - Vulnerability: A high risk vulnerability can be easily discovered 4758 // and exploited in combination with other vulnerabilities in order to gain 4759 // direct access and the ability to execute arbitrary code, exfiltrate data, 4760 // and otherwise gain additional access and privileges to cloud resources and 4761 // workloads. An example is a database with weak or no passwords that is only 4762 // accessible internally. This database could easily be compromised by an actor 4763 // that had access to the internal network. Threat: Indicates a threat that is 4764 // able to create new computational resources in an environment but not able to 4765 // access data or execute code in existing resources. 4766 // "MEDIUM" - Vulnerability: A medium risk vulnerability could be used by an 4767 // actor to gain access to resources or privileges that enable them to 4768 // eventually (through multiple steps or a complex exploit) gain access and the 4769 // ability to execute arbitrary code or exfiltrate data. An example is a 4770 // service account with access to more projects than it should have. If an 4771 // actor gains access to the service account, they could potentially use that 4772 // access to manipulate a project the service account was not intended to. 4773 // Threat: Indicates a threat that is able to cause operational impact but may 4774 // not access data or execute unauthorized code. 4775 // "LOW" - Vulnerability: A low risk vulnerability hampers a security 4776 // organization's ability to detect vulnerabilities or active threats in their 4777 // deployment, or prevents the root cause investigation of security issues. An 4778 // example is monitoring and logs being disabled for resource configurations 4779 // and access. Threat: Indicates a threat that has obtained minimal access to 4780 // an environment but is not able to access data, execute code, or create 4781 // resources. 4782 Severity string `json:"severity,omitempty"` 4783 // SourceProperties: Source specific properties. These properties are managed 4784 // by the source that writes the finding. The key names in the 4785 // source_properties map must be between 1 and 255 characters, and must start 4786 // with a letter and contain alphanumeric characters or underscores only. 4787 SourceProperties googleapi.RawMessage `json:"sourceProperties,omitempty"` 4788 // State: Output only. The state of the finding. 4789 // 4790 // Possible values: 4791 // "STATE_UNSPECIFIED" - Unspecified state. 4792 // "ACTIVE" - The finding requires attention and has not been addressed yet. 4793 // "INACTIVE" - The finding has been fixed, triaged as a non-issue or 4794 // otherwise addressed and is no longer active. 4795 State string `json:"state,omitempty"` 4796 // Vulnerability: Represents vulnerability-specific fields like CVE and CVSS 4797 // scores. CVE stands for Common Vulnerabilities and Exposures 4798 // (https://cve.mitre.org/about/) 4799 Vulnerability *GoogleCloudSecuritycenterV2Vulnerability `json:"vulnerability,omitempty"` 4800 // ForceSendFields is a list of field names (e.g. "Access") to unconditionally 4801 // include in API requests. By default, fields with empty or default values are 4802 // omitted from API requests. See 4803 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4804 // details. 4805 ForceSendFields []string `json:"-"` 4806 // NullFields is a list of field names (e.g. "Access") to include in API 4807 // requests with the JSON null value. By default, fields with empty values are 4808 // omitted from API requests. See 4809 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4810 NullFields []string `json:"-"` 4811 } 4812 4813 func (s *GoogleCloudSecuritycenterV2Finding) MarshalJSON() ([]byte, error) { 4814 type NoMethod GoogleCloudSecuritycenterV2Finding 4815 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4816 } 4817 4818 // GoogleCloudSecuritycenterV2Folder: Message that contains the resource name 4819 // and display name of a folder resource. 4820 type GoogleCloudSecuritycenterV2Folder struct { 4821 // ResourceFolder: Full resource name of this folder. See: 4822 // https://cloud.google.com/apis/design/resource_names#full_resource_name 4823 ResourceFolder string `json:"resourceFolder,omitempty"` 4824 // ResourceFolderDisplayName: The user defined display name for this folder. 4825 ResourceFolderDisplayName string `json:"resourceFolderDisplayName,omitempty"` 4826 // ForceSendFields is a list of field names (e.g. "ResourceFolder") to 4827 // unconditionally include in API requests. By default, fields with empty or 4828 // default values are omitted from API requests. See 4829 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4830 // details. 4831 ForceSendFields []string `json:"-"` 4832 // NullFields is a list of field names (e.g. "ResourceFolder") to include in 4833 // API requests with the JSON null value. By default, fields with empty values 4834 // are omitted from API requests. See 4835 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4836 NullFields []string `json:"-"` 4837 } 4838 4839 func (s *GoogleCloudSecuritycenterV2Folder) MarshalJSON() ([]byte, error) { 4840 type NoMethod GoogleCloudSecuritycenterV2Folder 4841 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4842 } 4843 4844 // GoogleCloudSecuritycenterV2Geolocation: Represents a geographical location 4845 // for a given access. 4846 type GoogleCloudSecuritycenterV2Geolocation struct { 4847 // RegionCode: A CLDR. 4848 RegionCode string `json:"regionCode,omitempty"` 4849 // ForceSendFields is a list of field names (e.g. "RegionCode") to 4850 // unconditionally include in API requests. By default, fields with empty or 4851 // default values are omitted from API requests. See 4852 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4853 // details. 4854 ForceSendFields []string `json:"-"` 4855 // NullFields is a list of field names (e.g. "RegionCode") to include in API 4856 // requests with the JSON null value. By default, fields with empty values are 4857 // omitted from API requests. See 4858 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4859 NullFields []string `json:"-"` 4860 } 4861 4862 func (s *GoogleCloudSecuritycenterV2Geolocation) MarshalJSON() ([]byte, error) { 4863 type NoMethod GoogleCloudSecuritycenterV2Geolocation 4864 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4865 } 4866 4867 // GoogleCloudSecuritycenterV2IamBinding: Represents a particular IAM binding, 4868 // which captures a member's role addition, removal, or state. 4869 type GoogleCloudSecuritycenterV2IamBinding struct { 4870 // Action: The action that was performed on a Binding. 4871 // 4872 // Possible values: 4873 // "ACTION_UNSPECIFIED" - Unspecified. 4874 // "ADD" - Addition of a Binding. 4875 // "REMOVE" - Removal of a Binding. 4876 Action string `json:"action,omitempty"` 4877 // Member: A single identity requesting access for a Cloud Platform resource, 4878 // for example, "foo@google.com". 4879 Member string `json:"member,omitempty"` 4880 // Role: Role that is assigned to "members". For example, "roles/viewer", 4881 // "roles/editor", or "roles/owner". 4882 Role string `json:"role,omitempty"` 4883 // ForceSendFields is a list of field names (e.g. "Action") to unconditionally 4884 // include in API requests. By default, fields with empty or default values are 4885 // omitted from API requests. See 4886 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4887 // details. 4888 ForceSendFields []string `json:"-"` 4889 // NullFields is a list of field names (e.g. "Action") to include in API 4890 // requests with the JSON null value. By default, fields with empty values are 4891 // omitted from API requests. See 4892 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4893 NullFields []string `json:"-"` 4894 } 4895 4896 func (s *GoogleCloudSecuritycenterV2IamBinding) MarshalJSON() ([]byte, error) { 4897 type NoMethod GoogleCloudSecuritycenterV2IamBinding 4898 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4899 } 4900 4901 // GoogleCloudSecuritycenterV2Indicator: Represents what's commonly known as an 4902 // _indicator of compromise_ (IoC) in computer forensics. This is an artifact 4903 // observed on a network or in an operating system that, with high confidence, 4904 // indicates a computer intrusion. For more information, see Indicator of 4905 // compromise (https://en.wikipedia.org/wiki/Indicator_of_compromise). 4906 type GoogleCloudSecuritycenterV2Indicator struct { 4907 // Domains: List of domains associated to the Finding. 4908 Domains []string `json:"domains,omitempty"` 4909 // IpAddresses: The list of IP addresses that are associated with the finding. 4910 IpAddresses []string `json:"ipAddresses,omitempty"` 4911 // Signatures: The list of matched signatures indicating that the given process 4912 // is present in the environment. 4913 Signatures []*GoogleCloudSecuritycenterV2ProcessSignature `json:"signatures,omitempty"` 4914 // Uris: The list of URIs associated to the Findings. 4915 Uris []string `json:"uris,omitempty"` 4916 // ForceSendFields is a list of field names (e.g. "Domains") to unconditionally 4917 // include in API requests. By default, fields with empty or default values are 4918 // omitted from API requests. See 4919 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4920 // details. 4921 ForceSendFields []string `json:"-"` 4922 // NullFields is a list of field names (e.g. "Domains") to include in API 4923 // requests with the JSON null value. By default, fields with empty values are 4924 // omitted from API requests. See 4925 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4926 NullFields []string `json:"-"` 4927 } 4928 4929 func (s *GoogleCloudSecuritycenterV2Indicator) MarshalJSON() ([]byte, error) { 4930 type NoMethod GoogleCloudSecuritycenterV2Indicator 4931 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4932 } 4933 4934 // GoogleCloudSecuritycenterV2KernelRootkit: Kernel mode rootkit signatures. 4935 type GoogleCloudSecuritycenterV2KernelRootkit struct { 4936 // Name: Rootkit name, when available. 4937 Name string `json:"name,omitempty"` 4938 // UnexpectedCodeModification: True if unexpected modifications of kernel code 4939 // memory are present. 4940 UnexpectedCodeModification bool `json:"unexpectedCodeModification,omitempty"` 4941 // UnexpectedFtraceHandler: True if `ftrace` points are present with callbacks 4942 // pointing to regions that are not in the expected kernel or module code 4943 // range. 4944 UnexpectedFtraceHandler bool `json:"unexpectedFtraceHandler,omitempty"` 4945 // UnexpectedInterruptHandler: True if interrupt handlers that are are not in 4946 // the expected kernel or module code regions are present. 4947 UnexpectedInterruptHandler bool `json:"unexpectedInterruptHandler,omitempty"` 4948 // UnexpectedKernelCodePages: True if kernel code pages that are not in the 4949 // expected kernel or module code regions are present. 4950 UnexpectedKernelCodePages bool `json:"unexpectedKernelCodePages,omitempty"` 4951 // UnexpectedKprobeHandler: True if `kprobe` points are present with callbacks 4952 // pointing to regions that are not in the expected kernel or module code 4953 // range. 4954 UnexpectedKprobeHandler bool `json:"unexpectedKprobeHandler,omitempty"` 4955 // UnexpectedProcessesInRunqueue: True if unexpected processes in the scheduler 4956 // run queue are present. Such processes are in the run queue, but not in the 4957 // process task list. 4958 UnexpectedProcessesInRunqueue bool `json:"unexpectedProcessesInRunqueue,omitempty"` 4959 // UnexpectedReadOnlyDataModification: True if unexpected modifications of 4960 // kernel read-only data memory are present. 4961 UnexpectedReadOnlyDataModification bool `json:"unexpectedReadOnlyDataModification,omitempty"` 4962 // UnexpectedSystemCallHandler: True if system call handlers that are are not 4963 // in the expected kernel or module code regions are present. 4964 UnexpectedSystemCallHandler bool `json:"unexpectedSystemCallHandler,omitempty"` 4965 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 4966 // include in API requests. By default, fields with empty or default values are 4967 // omitted from API requests. See 4968 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4969 // details. 4970 ForceSendFields []string `json:"-"` 4971 // NullFields is a list of field names (e.g. "Name") to include in API requests 4972 // with the JSON null value. By default, fields with empty values are omitted 4973 // from API requests. See 4974 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4975 NullFields []string `json:"-"` 4976 } 4977 4978 func (s *GoogleCloudSecuritycenterV2KernelRootkit) MarshalJSON() ([]byte, error) { 4979 type NoMethod GoogleCloudSecuritycenterV2KernelRootkit 4980 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4981 } 4982 4983 // GoogleCloudSecuritycenterV2Kubernetes: Kubernetes-related attributes. 4984 type GoogleCloudSecuritycenterV2Kubernetes struct { 4985 // AccessReviews: Provides information on any Kubernetes access reviews 4986 // (privilege checks) relevant to the finding. 4987 AccessReviews []*GoogleCloudSecuritycenterV2AccessReview `json:"accessReviews,omitempty"` 4988 // Bindings: Provides Kubernetes role binding information for findings that 4989 // involve RoleBindings or ClusterRoleBindings 4990 // (https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). 4991 Bindings []*GoogleCloudSecuritycenterV2Binding `json:"bindings,omitempty"` 4992 // NodePools: GKE node pools 4993 // (https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) 4994 // associated with the finding. This field contains node pool information for 4995 // each node, when it is available. 4996 NodePools []*GoogleCloudSecuritycenterV2NodePool `json:"nodePools,omitempty"` 4997 // Nodes: Provides Kubernetes node 4998 // (https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) 4999 // information. 5000 Nodes []*GoogleCloudSecuritycenterV2Node `json:"nodes,omitempty"` 5001 // Objects: Kubernetes objects related to the finding. 5002 Objects []*GoogleCloudSecuritycenterV2Object `json:"objects,omitempty"` 5003 // Pods: Kubernetes Pods 5004 // (https://cloud.google.com/kubernetes-engine/docs/concepts/pod) associated 5005 // with the finding. This field contains Pod records for each container that is 5006 // owned by a Pod. 5007 Pods []*GoogleCloudSecuritycenterV2Pod `json:"pods,omitempty"` 5008 // Roles: Provides Kubernetes role information for findings that involve Roles 5009 // or ClusterRoles 5010 // (https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). 5011 Roles []*GoogleCloudSecuritycenterV2Role `json:"roles,omitempty"` 5012 // ForceSendFields is a list of field names (e.g. "AccessReviews") to 5013 // unconditionally include in API requests. By default, fields with empty or 5014 // default values are omitted from API requests. See 5015 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5016 // details. 5017 ForceSendFields []string `json:"-"` 5018 // NullFields is a list of field names (e.g. "AccessReviews") to include in API 5019 // requests with the JSON null value. By default, fields with empty values are 5020 // omitted from API requests. See 5021 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5022 NullFields []string `json:"-"` 5023 } 5024 5025 func (s *GoogleCloudSecuritycenterV2Kubernetes) MarshalJSON() ([]byte, error) { 5026 type NoMethod GoogleCloudSecuritycenterV2Kubernetes 5027 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5028 } 5029 5030 // GoogleCloudSecuritycenterV2Label: Represents a generic name-value label. A 5031 // label has separate name and value fields to support filtering with the 5032 // `contains()` function. For more information, see Filtering on array-type 5033 // fields 5034 // (https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering). 5035 type GoogleCloudSecuritycenterV2Label struct { 5036 // Name: Name of the label. 5037 Name string `json:"name,omitempty"` 5038 // Value: Value that corresponds to the label's name. 5039 Value string `json:"value,omitempty"` 5040 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 5041 // include in API requests. By default, fields with empty or default values are 5042 // omitted from API requests. See 5043 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5044 // details. 5045 ForceSendFields []string `json:"-"` 5046 // NullFields is a list of field names (e.g. "Name") to include in API requests 5047 // with the JSON null value. By default, fields with empty values are omitted 5048 // from API requests. See 5049 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5050 NullFields []string `json:"-"` 5051 } 5052 5053 func (s *GoogleCloudSecuritycenterV2Label) MarshalJSON() ([]byte, error) { 5054 type NoMethod GoogleCloudSecuritycenterV2Label 5055 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5056 } 5057 5058 // GoogleCloudSecuritycenterV2LoadBalancer: Contains information related to the 5059 // load balancer associated with the finding. 5060 type GoogleCloudSecuritycenterV2LoadBalancer struct { 5061 // Name: The name of the load balancer associated with the finding. 5062 Name string `json:"name,omitempty"` 5063 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 5064 // include in API requests. By default, fields with empty or default values are 5065 // omitted from API requests. See 5066 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5067 // details. 5068 ForceSendFields []string `json:"-"` 5069 // NullFields is a list of field names (e.g. "Name") to include in API requests 5070 // with the JSON null value. By default, fields with empty values are omitted 5071 // from API requests. See 5072 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5073 NullFields []string `json:"-"` 5074 } 5075 5076 func (s *GoogleCloudSecuritycenterV2LoadBalancer) MarshalJSON() ([]byte, error) { 5077 type NoMethod GoogleCloudSecuritycenterV2LoadBalancer 5078 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5079 } 5080 5081 // GoogleCloudSecuritycenterV2LogEntry: An individual entry in a log. 5082 type GoogleCloudSecuritycenterV2LogEntry struct { 5083 // CloudLoggingEntry: An individual entry in a log stored in Cloud Logging. 5084 CloudLoggingEntry *GoogleCloudSecuritycenterV2CloudLoggingEntry `json:"cloudLoggingEntry,omitempty"` 5085 // ForceSendFields is a list of field names (e.g. "CloudLoggingEntry") to 5086 // unconditionally include in API requests. By default, fields with empty or 5087 // default values are omitted from API requests. See 5088 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5089 // details. 5090 ForceSendFields []string `json:"-"` 5091 // NullFields is a list of field names (e.g. "CloudLoggingEntry") to include in 5092 // API requests with the JSON null value. By default, fields with empty values 5093 // are omitted from API requests. See 5094 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5095 NullFields []string `json:"-"` 5096 } 5097 5098 func (s *GoogleCloudSecuritycenterV2LogEntry) MarshalJSON() ([]byte, error) { 5099 type NoMethod GoogleCloudSecuritycenterV2LogEntry 5100 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5101 } 5102 5103 // GoogleCloudSecuritycenterV2MemoryHashSignature: A signature corresponding to 5104 // memory page hashes. 5105 type GoogleCloudSecuritycenterV2MemoryHashSignature struct { 5106 // BinaryFamily: The binary family. 5107 BinaryFamily string `json:"binaryFamily,omitempty"` 5108 // Detections: The list of memory hash detections contributing to the binary 5109 // family match. 5110 Detections []*GoogleCloudSecuritycenterV2Detection `json:"detections,omitempty"` 5111 // ForceSendFields is a list of field names (e.g. "BinaryFamily") to 5112 // unconditionally include in API requests. By default, fields with empty or 5113 // default values are omitted from API requests. See 5114 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5115 // details. 5116 ForceSendFields []string `json:"-"` 5117 // NullFields is a list of field names (e.g. "BinaryFamily") to include in API 5118 // requests with the JSON null value. By default, fields with empty values are 5119 // omitted from API requests. See 5120 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5121 NullFields []string `json:"-"` 5122 } 5123 5124 func (s *GoogleCloudSecuritycenterV2MemoryHashSignature) MarshalJSON() ([]byte, error) { 5125 type NoMethod GoogleCloudSecuritycenterV2MemoryHashSignature 5126 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5127 } 5128 5129 // GoogleCloudSecuritycenterV2MitreAttack: MITRE ATT&CK tactics and techniques 5130 // related to this finding. See: https://attack.mitre.org 5131 type GoogleCloudSecuritycenterV2MitreAttack struct { 5132 // AdditionalTactics: Additional MITRE ATT&CK tactics related to this finding, 5133 // if any. 5134 // 5135 // Possible values: 5136 // "TACTIC_UNSPECIFIED" - Unspecified value. 5137 // "RECONNAISSANCE" - TA0043 5138 // "RESOURCE_DEVELOPMENT" - TA0042 5139 // "INITIAL_ACCESS" - TA0001 5140 // "EXECUTION" - TA0002 5141 // "PERSISTENCE" - TA0003 5142 // "PRIVILEGE_ESCALATION" - TA0004 5143 // "DEFENSE_EVASION" - TA0005 5144 // "CREDENTIAL_ACCESS" - TA0006 5145 // "DISCOVERY" - TA0007 5146 // "LATERAL_MOVEMENT" - TA0008 5147 // "COLLECTION" - TA0009 5148 // "COMMAND_AND_CONTROL" - TA0011 5149 // "EXFILTRATION" - TA0010 5150 // "IMPACT" - TA0040 5151 AdditionalTactics []string `json:"additionalTactics,omitempty"` 5152 // AdditionalTechniques: Additional MITRE ATT&CK techniques related to this 5153 // finding, if any, along with any of their respective parent techniques. 5154 // 5155 // Possible values: 5156 // "TECHNIQUE_UNSPECIFIED" - Unspecified value. 5157 // "MASQUERADING" - T1036 5158 // "MATCH_LEGITIMATE_NAME_OR_LOCATION" - T1036.005 5159 // "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS" - T1037 5160 // "STARTUP_ITEMS" - T1037.005 5161 // "NETWORK_SERVICE_DISCOVERY" - T1046 5162 // "PROCESS_DISCOVERY" - T1057 5163 // "COMMAND_AND_SCRIPTING_INTERPRETER" - T1059 5164 // "UNIX_SHELL" - T1059.004 5165 // "PYTHON" - T1059.006 5166 // "PERMISSION_GROUPS_DISCOVERY" - T1069 5167 // "CLOUD_GROUPS" - T1069.003 5168 // "APPLICATION_LAYER_PROTOCOL" - T1071 5169 // "DNS" - T1071.004 5170 // "SOFTWARE_DEPLOYMENT_TOOLS" - T1072 5171 // "VALID_ACCOUNTS" - T1078 5172 // "DEFAULT_ACCOUNTS" - T1078.001 5173 // "LOCAL_ACCOUNTS" - T1078.003 5174 // "CLOUD_ACCOUNTS" - T1078.004 5175 // "PROXY" - T1090 5176 // "EXTERNAL_PROXY" - T1090.002 5177 // "MULTI_HOP_PROXY" - T1090.003 5178 // "ACCOUNT_MANIPULATION" - T1098 5179 // "ADDITIONAL_CLOUD_CREDENTIALS" - T1098.001 5180 // "SSH_AUTHORIZED_KEYS" - T1098.004 5181 // "ADDITIONAL_CONTAINER_CLUSTER_ROLES" - T1098.006 5182 // "INGRESS_TOOL_TRANSFER" - T1105 5183 // "NATIVE_API" - T1106 5184 // "BRUTE_FORCE" - T1110 5185 // "SHARED_MODULES" - T1129 5186 // "ACCESS_TOKEN_MANIPULATION" - T1134 5187 // "TOKEN_IMPERSONATION_OR_THEFT" - T1134.001 5188 // "EXPLOIT_PUBLIC_FACING_APPLICATION" - T1190 5189 // "DOMAIN_POLICY_MODIFICATION" - T1484 5190 // "DATA_DESTRUCTION" - T1485 5191 // "SERVICE_STOP" - T1489 5192 // "INHIBIT_SYSTEM_RECOVERY" - T1490 5193 // "RESOURCE_HIJACKING" - T1496 5194 // "NETWORK_DENIAL_OF_SERVICE" - T1498 5195 // "CLOUD_SERVICE_DISCOVERY" - T1526 5196 // "STEAL_APPLICATION_ACCESS_TOKEN" - T1528 5197 // "ACCOUNT_ACCESS_REMOVAL" - T1531 5198 // "STEAL_WEB_SESSION_COOKIE" - T1539 5199 // "CREATE_OR_MODIFY_SYSTEM_PROCESS" - T1543 5200 // "ABUSE_ELEVATION_CONTROL_MECHANISM" - T1548 5201 // "UNSECURED_CREDENTIALS" - T1552 5202 // "MODIFY_AUTHENTICATION_PROCESS" - T1556 5203 // "IMPAIR_DEFENSES" - T1562 5204 // "DISABLE_OR_MODIFY_TOOLS" - T1562.001 5205 // "EXFILTRATION_OVER_WEB_SERVICE" - T1567 5206 // "EXFILTRATION_TO_CLOUD_STORAGE" - T1567.002 5207 // "DYNAMIC_RESOLUTION" - T1568 5208 // "LATERAL_TOOL_TRANSFER" - T1570 5209 // "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" - T1578 5210 // "CREATE_SNAPSHOT" - T1578.001 5211 // "CLOUD_INFRASTRUCTURE_DISCOVERY" - T1580 5212 // "OBTAIN_CAPABILITIES" - T1588 5213 // "ACTIVE_SCANNING" - T1595 5214 // "SCANNING_IP_BLOCKS" - T1595.001 5215 // "CONTAINER_AND_RESOURCE_DISCOVERY" - T1613 5216 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` 5217 // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by this 5218 // finding, if any. 5219 // 5220 // Possible values: 5221 // "TACTIC_UNSPECIFIED" - Unspecified value. 5222 // "RECONNAISSANCE" - TA0043 5223 // "RESOURCE_DEVELOPMENT" - TA0042 5224 // "INITIAL_ACCESS" - TA0001 5225 // "EXECUTION" - TA0002 5226 // "PERSISTENCE" - TA0003 5227 // "PRIVILEGE_ESCALATION" - TA0004 5228 // "DEFENSE_EVASION" - TA0005 5229 // "CREDENTIAL_ACCESS" - TA0006 5230 // "DISCOVERY" - TA0007 5231 // "LATERAL_MOVEMENT" - TA0008 5232 // "COLLECTION" - TA0009 5233 // "COMMAND_AND_CONTROL" - TA0011 5234 // "EXFILTRATION" - TA0010 5235 // "IMPACT" - TA0040 5236 PrimaryTactic string `json:"primaryTactic,omitempty"` 5237 // PrimaryTechniques: The MITRE ATT&CK technique most closely represented by 5238 // this finding, if any. primary_techniques is a repeated field because there 5239 // are multiple levels of MITRE ATT&CK techniques. If the technique most 5240 // closely represented by this finding is a sub-technique (e.g. 5241 // `SCANNING_IP_BLOCKS`), both the sub-technique and its parent technique(s) 5242 // will be listed (e.g. `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). 5243 // 5244 // Possible values: 5245 // "TECHNIQUE_UNSPECIFIED" - Unspecified value. 5246 // "MASQUERADING" - T1036 5247 // "MATCH_LEGITIMATE_NAME_OR_LOCATION" - T1036.005 5248 // "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS" - T1037 5249 // "STARTUP_ITEMS" - T1037.005 5250 // "NETWORK_SERVICE_DISCOVERY" - T1046 5251 // "PROCESS_DISCOVERY" - T1057 5252 // "COMMAND_AND_SCRIPTING_INTERPRETER" - T1059 5253 // "UNIX_SHELL" - T1059.004 5254 // "PYTHON" - T1059.006 5255 // "PERMISSION_GROUPS_DISCOVERY" - T1069 5256 // "CLOUD_GROUPS" - T1069.003 5257 // "APPLICATION_LAYER_PROTOCOL" - T1071 5258 // "DNS" - T1071.004 5259 // "SOFTWARE_DEPLOYMENT_TOOLS" - T1072 5260 // "VALID_ACCOUNTS" - T1078 5261 // "DEFAULT_ACCOUNTS" - T1078.001 5262 // "LOCAL_ACCOUNTS" - T1078.003 5263 // "CLOUD_ACCOUNTS" - T1078.004 5264 // "PROXY" - T1090 5265 // "EXTERNAL_PROXY" - T1090.002 5266 // "MULTI_HOP_PROXY" - T1090.003 5267 // "ACCOUNT_MANIPULATION" - T1098 5268 // "ADDITIONAL_CLOUD_CREDENTIALS" - T1098.001 5269 // "SSH_AUTHORIZED_KEYS" - T1098.004 5270 // "ADDITIONAL_CONTAINER_CLUSTER_ROLES" - T1098.006 5271 // "INGRESS_TOOL_TRANSFER" - T1105 5272 // "NATIVE_API" - T1106 5273 // "BRUTE_FORCE" - T1110 5274 // "SHARED_MODULES" - T1129 5275 // "ACCESS_TOKEN_MANIPULATION" - T1134 5276 // "TOKEN_IMPERSONATION_OR_THEFT" - T1134.001 5277 // "EXPLOIT_PUBLIC_FACING_APPLICATION" - T1190 5278 // "DOMAIN_POLICY_MODIFICATION" - T1484 5279 // "DATA_DESTRUCTION" - T1485 5280 // "SERVICE_STOP" - T1489 5281 // "INHIBIT_SYSTEM_RECOVERY" - T1490 5282 // "RESOURCE_HIJACKING" - T1496 5283 // "NETWORK_DENIAL_OF_SERVICE" - T1498 5284 // "CLOUD_SERVICE_DISCOVERY" - T1526 5285 // "STEAL_APPLICATION_ACCESS_TOKEN" - T1528 5286 // "ACCOUNT_ACCESS_REMOVAL" - T1531 5287 // "STEAL_WEB_SESSION_COOKIE" - T1539 5288 // "CREATE_OR_MODIFY_SYSTEM_PROCESS" - T1543 5289 // "ABUSE_ELEVATION_CONTROL_MECHANISM" - T1548 5290 // "UNSECURED_CREDENTIALS" - T1552 5291 // "MODIFY_AUTHENTICATION_PROCESS" - T1556 5292 // "IMPAIR_DEFENSES" - T1562 5293 // "DISABLE_OR_MODIFY_TOOLS" - T1562.001 5294 // "EXFILTRATION_OVER_WEB_SERVICE" - T1567 5295 // "EXFILTRATION_TO_CLOUD_STORAGE" - T1567.002 5296 // "DYNAMIC_RESOLUTION" - T1568 5297 // "LATERAL_TOOL_TRANSFER" - T1570 5298 // "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" - T1578 5299 // "CREATE_SNAPSHOT" - T1578.001 5300 // "CLOUD_INFRASTRUCTURE_DISCOVERY" - T1580 5301 // "OBTAIN_CAPABILITIES" - T1588 5302 // "ACTIVE_SCANNING" - T1595 5303 // "SCANNING_IP_BLOCKS" - T1595.001 5304 // "CONTAINER_AND_RESOURCE_DISCOVERY" - T1613 5305 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` 5306 // Version: The MITRE ATT&CK version referenced by the above fields. E.g. "8". 5307 Version string `json:"version,omitempty"` 5308 // ForceSendFields is a list of field names (e.g. "AdditionalTactics") to 5309 // unconditionally include in API requests. By default, fields with empty or 5310 // default values are omitted from API requests. See 5311 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5312 // details. 5313 ForceSendFields []string `json:"-"` 5314 // NullFields is a list of field names (e.g. "AdditionalTactics") to include in 5315 // API requests with the JSON null value. By default, fields with empty values 5316 // are omitted from API requests. See 5317 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5318 NullFields []string `json:"-"` 5319 } 5320 5321 func (s *GoogleCloudSecuritycenterV2MitreAttack) MarshalJSON() ([]byte, error) { 5322 type NoMethod GoogleCloudSecuritycenterV2MitreAttack 5323 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5324 } 5325 5326 // GoogleCloudSecuritycenterV2MuteConfig: A mute config is a Cloud SCC resource 5327 // that contains the configuration to mute create/update events of findings. 5328 type GoogleCloudSecuritycenterV2MuteConfig struct { 5329 // CreateTime: Output only. The time at which the mute config was created. This 5330 // field is set by the server and will be ignored if provided on config 5331 // creation. 5332 CreateTime string `json:"createTime,omitempty"` 5333 // Description: A description of the mute config. 5334 Description string `json:"description,omitempty"` 5335 // Filter: Required. An expression that defines the filter to apply across 5336 // create/update events of findings. While creating a filter string, be mindful 5337 // of the scope in which the mute configuration is being created. E.g., If a 5338 // filter contains project = X but is created under the project = Y scope, it 5339 // might not match any findings. The following field and operator combinations 5340 // are supported: * severity: `=`, `:` * category: `=`, `:` * resource.name: 5341 // `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: 5342 // `=`, `:` * resource.folders.resource_folder: `=`, `:` * 5343 // resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * 5344 // resource.type: `=`, `:` * finding_class: `=`, `:` * indicator.ip_addresses: 5345 // `=`, `:` * indicator.domains: `=`, `:` 5346 Filter string `json:"filter,omitempty"` 5347 // MostRecentEditor: Output only. Email address of the user who last edited the 5348 // mute config. This field is set by the server and will be ignored if provided 5349 // on config creation or update. 5350 MostRecentEditor string `json:"mostRecentEditor,omitempty"` 5351 // Name: This field will be ignored if provided on config creation. The 5352 // following list shows some examples of the format: + 5353 // `organizations/{organization}/muteConfigs/{mute_config}` + 5354 // `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` 5355 // + `folders/{folder}/muteConfigs/{mute_config}` + 5356 // `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` + 5357 // `projects/{project}/muteConfigs/{mute_config}` + 5358 // `projects/{project}/locations/{location}/muteConfigs/{mute_config}` 5359 Name string `json:"name,omitempty"` 5360 // Type: Required. The type of the mute config, which determines what type of 5361 // mute state the config affects. Immutable after creation. 5362 // 5363 // Possible values: 5364 // "MUTE_CONFIG_TYPE_UNSPECIFIED" - Unused. 5365 // "STATIC" - A static mute config, which sets the static mute state of 5366 // future matching findings to muted. Once the static mute state has been set, 5367 // finding or config modifications will not affect the state. 5368 Type string `json:"type,omitempty"` 5369 // UpdateTime: Output only. The most recent time at which the mute config was 5370 // updated. This field is set by the server and will be ignored if provided on 5371 // config creation or update. 5372 UpdateTime string `json:"updateTime,omitempty"` 5373 // ForceSendFields is a list of field names (e.g. "CreateTime") to 5374 // unconditionally include in API requests. By default, fields with empty or 5375 // default values are omitted from API requests. See 5376 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5377 // details. 5378 ForceSendFields []string `json:"-"` 5379 // NullFields is a list of field names (e.g. "CreateTime") to include in API 5380 // requests with the JSON null value. By default, fields with empty values are 5381 // omitted from API requests. See 5382 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5383 NullFields []string `json:"-"` 5384 } 5385 5386 func (s *GoogleCloudSecuritycenterV2MuteConfig) MarshalJSON() ([]byte, error) { 5387 type NoMethod GoogleCloudSecuritycenterV2MuteConfig 5388 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5389 } 5390 5391 // GoogleCloudSecuritycenterV2Node: Kubernetes nodes associated with the 5392 // finding. 5393 type GoogleCloudSecuritycenterV2Node struct { 5394 // Name: Full resource name (https://google.aip.dev/122#full-resource-names) of 5395 // the Compute Engine VM running the cluster node. 5396 Name string `json:"name,omitempty"` 5397 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 5398 // include in API requests. By default, fields with empty or default values are 5399 // omitted from API requests. See 5400 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5401 // details. 5402 ForceSendFields []string `json:"-"` 5403 // NullFields is a list of field names (e.g. "Name") to include in API requests 5404 // with the JSON null value. By default, fields with empty values are omitted 5405 // from API requests. See 5406 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5407 NullFields []string `json:"-"` 5408 } 5409 5410 func (s *GoogleCloudSecuritycenterV2Node) MarshalJSON() ([]byte, error) { 5411 type NoMethod GoogleCloudSecuritycenterV2Node 5412 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5413 } 5414 5415 // GoogleCloudSecuritycenterV2NodePool: Provides GKE node pool information. 5416 type GoogleCloudSecuritycenterV2NodePool struct { 5417 // Name: Kubernetes node pool name. 5418 Name string `json:"name,omitempty"` 5419 // Nodes: Nodes associated with the finding. 5420 Nodes []*GoogleCloudSecuritycenterV2Node `json:"nodes,omitempty"` 5421 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 5422 // include in API requests. By default, fields with empty or default values are 5423 // omitted from API requests. See 5424 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5425 // details. 5426 ForceSendFields []string `json:"-"` 5427 // NullFields is a list of field names (e.g. "Name") to include in API requests 5428 // with the JSON null value. By default, fields with empty values are omitted 5429 // from API requests. See 5430 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5431 NullFields []string `json:"-"` 5432 } 5433 5434 func (s *GoogleCloudSecuritycenterV2NodePool) MarshalJSON() ([]byte, error) { 5435 type NoMethod GoogleCloudSecuritycenterV2NodePool 5436 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5437 } 5438 5439 // GoogleCloudSecuritycenterV2Notebook: Represents a Jupyter notebook IPYNB 5440 // file, such as a Colab Enterprise notebook 5441 // (https://cloud.google.com/colab/docs/introduction) file, that is associated 5442 // with a finding. 5443 type GoogleCloudSecuritycenterV2Notebook struct { 5444 // LastAuthor: The user ID of the latest author to modify the notebook. 5445 LastAuthor string `json:"lastAuthor,omitempty"` 5446 // Name: The name of the notebook. 5447 Name string `json:"name,omitempty"` 5448 // NotebookUpdateTime: The most recent time the notebook was updated. 5449 NotebookUpdateTime string `json:"notebookUpdateTime,omitempty"` 5450 // Service: The source notebook service, for example, "Colab Enterprise". 5451 Service string `json:"service,omitempty"` 5452 // ForceSendFields is a list of field names (e.g. "LastAuthor") to 5453 // unconditionally include in API requests. By default, fields with empty or 5454 // default values are omitted from API requests. See 5455 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5456 // details. 5457 ForceSendFields []string `json:"-"` 5458 // NullFields is a list of field names (e.g. "LastAuthor") to include in API 5459 // requests with the JSON null value. By default, fields with empty values are 5460 // omitted from API requests. See 5461 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5462 NullFields []string `json:"-"` 5463 } 5464 5465 func (s *GoogleCloudSecuritycenterV2Notebook) MarshalJSON() ([]byte, error) { 5466 type NoMethod GoogleCloudSecuritycenterV2Notebook 5467 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5468 } 5469 5470 // GoogleCloudSecuritycenterV2NotificationMessage: Cloud SCC's Notification 5471 type GoogleCloudSecuritycenterV2NotificationMessage struct { 5472 // Finding: If it's a Finding based notification config, this field will be 5473 // populated. 5474 Finding *GoogleCloudSecuritycenterV2Finding `json:"finding,omitempty"` 5475 // NotificationConfigName: Name of the notification config that generated 5476 // current notification. 5477 NotificationConfigName string `json:"notificationConfigName,omitempty"` 5478 // Resource: The Cloud resource tied to this notification's Finding. 5479 Resource *GoogleCloudSecuritycenterV2Resource `json:"resource,omitempty"` 5480 // ForceSendFields is a list of field names (e.g. "Finding") to unconditionally 5481 // include in API requests. By default, fields with empty or default values are 5482 // omitted from API requests. See 5483 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5484 // details. 5485 ForceSendFields []string `json:"-"` 5486 // NullFields is a list of field names (e.g. "Finding") to include in API 5487 // requests with the JSON null value. By default, fields with empty values are 5488 // omitted from API requests. See 5489 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5490 NullFields []string `json:"-"` 5491 } 5492 5493 func (s *GoogleCloudSecuritycenterV2NotificationMessage) MarshalJSON() ([]byte, error) { 5494 type NoMethod GoogleCloudSecuritycenterV2NotificationMessage 5495 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5496 } 5497 5498 // GoogleCloudSecuritycenterV2Object: Kubernetes object related to the finding, 5499 // uniquely identified by GKNN. Used if the object Kind is not one of Pod, 5500 // Node, NodePool, Binding, or AccessReview. 5501 type GoogleCloudSecuritycenterV2Object struct { 5502 // Containers: Pod containers associated with this finding, if any. 5503 Containers []*GoogleCloudSecuritycenterV2Container `json:"containers,omitempty"` 5504 // Group: Kubernetes object group, such as "policy.k8s.io/v1". 5505 Group string `json:"group,omitempty"` 5506 // Kind: Kubernetes object kind, such as "Namespace". 5507 Kind string `json:"kind,omitempty"` 5508 // Name: Kubernetes object name. For details see 5509 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names/. 5510 Name string `json:"name,omitempty"` 5511 // Ns: Kubernetes object namespace. Must be a valid DNS label. Named "ns" to 5512 // avoid collision with C++ namespace keyword. For details see 5513 // https://kubernetes.io/docs/tasks/administer-cluster/namespaces/. 5514 Ns string `json:"ns,omitempty"` 5515 // ForceSendFields is a list of field names (e.g. "Containers") to 5516 // unconditionally include in API requests. By default, fields with empty or 5517 // default values are omitted from API requests. See 5518 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5519 // details. 5520 ForceSendFields []string `json:"-"` 5521 // NullFields is a list of field names (e.g. "Containers") to include in API 5522 // requests with the JSON null value. By default, fields with empty values are 5523 // omitted from API requests. See 5524 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5525 NullFields []string `json:"-"` 5526 } 5527 5528 func (s *GoogleCloudSecuritycenterV2Object) MarshalJSON() ([]byte, error) { 5529 type NoMethod GoogleCloudSecuritycenterV2Object 5530 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5531 } 5532 5533 // GoogleCloudSecuritycenterV2OrgPolicy: Contains information about the org 5534 // policies associated with the finding. 5535 type GoogleCloudSecuritycenterV2OrgPolicy struct { 5536 // Name: The resource name of the org policy. Example: 5537 // "organizations/{organization_id}/policies/{constraint_name}" 5538 Name string `json:"name,omitempty"` 5539 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 5540 // include in API requests. By default, fields with empty or default values are 5541 // omitted from API requests. See 5542 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5543 // details. 5544 ForceSendFields []string `json:"-"` 5545 // NullFields is a list of field names (e.g. "Name") to include in API requests 5546 // with the JSON null value. By default, fields with empty values are omitted 5547 // from API requests. See 5548 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5549 NullFields []string `json:"-"` 5550 } 5551 5552 func (s *GoogleCloudSecuritycenterV2OrgPolicy) MarshalJSON() ([]byte, error) { 5553 type NoMethod GoogleCloudSecuritycenterV2OrgPolicy 5554 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5555 } 5556 5557 // GoogleCloudSecuritycenterV2Package: Package is a generic definition of a 5558 // package. 5559 type GoogleCloudSecuritycenterV2Package struct { 5560 // CpeUri: The CPE URI where the vulnerability was detected. 5561 CpeUri string `json:"cpeUri,omitempty"` 5562 // PackageName: The name of the package where the vulnerability was detected. 5563 PackageName string `json:"packageName,omitempty"` 5564 // PackageType: Type of package, for example, os, maven, or go. 5565 PackageType string `json:"packageType,omitempty"` 5566 // PackageVersion: The version of the package. 5567 PackageVersion string `json:"packageVersion,omitempty"` 5568 // ForceSendFields is a list of field names (e.g. "CpeUri") to unconditionally 5569 // include in API requests. By default, fields with empty or default values are 5570 // omitted from API requests. See 5571 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5572 // details. 5573 ForceSendFields []string `json:"-"` 5574 // NullFields is a list of field names (e.g. "CpeUri") to include in API 5575 // requests with the JSON null value. By default, fields with empty values are 5576 // omitted from API requests. See 5577 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5578 NullFields []string `json:"-"` 5579 } 5580 5581 func (s *GoogleCloudSecuritycenterV2Package) MarshalJSON() ([]byte, error) { 5582 type NoMethod GoogleCloudSecuritycenterV2Package 5583 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5584 } 5585 5586 // GoogleCloudSecuritycenterV2Pod: A Kubernetes Pod. 5587 type GoogleCloudSecuritycenterV2Pod struct { 5588 // Containers: Pod containers associated with this finding, if any. 5589 Containers []*GoogleCloudSecuritycenterV2Container `json:"containers,omitempty"` 5590 // Labels: Pod labels. For Kubernetes containers, these are applied to the 5591 // container. 5592 Labels []*GoogleCloudSecuritycenterV2Label `json:"labels,omitempty"` 5593 // Name: Kubernetes Pod name. 5594 Name string `json:"name,omitempty"` 5595 // Ns: Kubernetes Pod namespace. 5596 Ns string `json:"ns,omitempty"` 5597 // ForceSendFields is a list of field names (e.g. "Containers") to 5598 // unconditionally include in API requests. By default, fields with empty or 5599 // default values are omitted from API requests. See 5600 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5601 // details. 5602 ForceSendFields []string `json:"-"` 5603 // NullFields is a list of field names (e.g. "Containers") to include in API 5604 // requests with the JSON null value. By default, fields with empty values are 5605 // omitted from API requests. See 5606 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5607 NullFields []string `json:"-"` 5608 } 5609 5610 func (s *GoogleCloudSecuritycenterV2Pod) MarshalJSON() ([]byte, error) { 5611 type NoMethod GoogleCloudSecuritycenterV2Pod 5612 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5613 } 5614 5615 // GoogleCloudSecuritycenterV2PolicyDriftDetails: The policy field that 5616 // violates the deployed posture and its expected and detected values. 5617 type GoogleCloudSecuritycenterV2PolicyDriftDetails struct { 5618 // DetectedValue: The detected value that violates the deployed posture, for 5619 // example, `false` or `allowed_values={"projects/22831892"}`. 5620 DetectedValue string `json:"detectedValue,omitempty"` 5621 // ExpectedValue: The value of this field that was configured in a posture, for 5622 // example, `true` or `allowed_values={"projects/29831892"}`. 5623 ExpectedValue string `json:"expectedValue,omitempty"` 5624 // Field: The name of the updated field, for example 5625 // constraint.implementation.policy_rules[0].enforce 5626 Field string `json:"field,omitempty"` 5627 // ForceSendFields is a list of field names (e.g. "DetectedValue") to 5628 // unconditionally include in API requests. By default, fields with empty or 5629 // default values are omitted from API requests. See 5630 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5631 // details. 5632 ForceSendFields []string `json:"-"` 5633 // NullFields is a list of field names (e.g. "DetectedValue") to include in API 5634 // requests with the JSON null value. By default, fields with empty values are 5635 // omitted from API requests. See 5636 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5637 NullFields []string `json:"-"` 5638 } 5639 5640 func (s *GoogleCloudSecuritycenterV2PolicyDriftDetails) MarshalJSON() ([]byte, error) { 5641 type NoMethod GoogleCloudSecuritycenterV2PolicyDriftDetails 5642 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5643 } 5644 5645 // GoogleCloudSecuritycenterV2Process: Represents an operating system process. 5646 type GoogleCloudSecuritycenterV2Process struct { 5647 // Args: Process arguments as JSON encoded strings. 5648 Args []string `json:"args,omitempty"` 5649 // ArgumentsTruncated: True if `args` is incomplete. 5650 ArgumentsTruncated bool `json:"argumentsTruncated,omitempty"` 5651 // Binary: File information for the process executable. 5652 Binary *GoogleCloudSecuritycenterV2File `json:"binary,omitempty"` 5653 // EnvVariables: Process environment variables. 5654 EnvVariables []*GoogleCloudSecuritycenterV2EnvironmentVariable `json:"envVariables,omitempty"` 5655 // EnvVariablesTruncated: True if `env_variables` is incomplete. 5656 EnvVariablesTruncated bool `json:"envVariablesTruncated,omitempty"` 5657 // Libraries: File information for libraries loaded by the process. 5658 Libraries []*GoogleCloudSecuritycenterV2File `json:"libraries,omitempty"` 5659 // Name: The process name, as displayed in utilities like `top` and `ps`. This 5660 // name can be accessed through `/proc/[pid]/comm` and changed with 5661 // `prctl(PR_SET_NAME)`. 5662 Name string `json:"name,omitempty"` 5663 // ParentPid: The parent process ID. 5664 ParentPid int64 `json:"parentPid,omitempty,string"` 5665 // Pid: The process ID. 5666 Pid int64 `json:"pid,omitempty,string"` 5667 // Script: When the process represents the invocation of a script, `binary` 5668 // provides information about the interpreter, while `script` provides 5669 // information about the script file provided to the interpreter. 5670 Script *GoogleCloudSecuritycenterV2File `json:"script,omitempty"` 5671 // ForceSendFields is a list of field names (e.g. "Args") to unconditionally 5672 // include in API requests. By default, fields with empty or default values are 5673 // omitted from API requests. See 5674 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5675 // details. 5676 ForceSendFields []string `json:"-"` 5677 // NullFields is a list of field names (e.g. "Args") to include in API requests 5678 // with the JSON null value. By default, fields with empty values are omitted 5679 // from API requests. See 5680 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5681 NullFields []string `json:"-"` 5682 } 5683 5684 func (s *GoogleCloudSecuritycenterV2Process) MarshalJSON() ([]byte, error) { 5685 type NoMethod GoogleCloudSecuritycenterV2Process 5686 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5687 } 5688 5689 // GoogleCloudSecuritycenterV2ProcessSignature: Indicates what signature 5690 // matched this process. 5691 type GoogleCloudSecuritycenterV2ProcessSignature struct { 5692 // MemoryHashSignature: Signature indicating that a binary family was matched. 5693 MemoryHashSignature *GoogleCloudSecuritycenterV2MemoryHashSignature `json:"memoryHashSignature,omitempty"` 5694 // SignatureType: Describes the type of resource associated with the signature. 5695 // 5696 // Possible values: 5697 // "SIGNATURE_TYPE_UNSPECIFIED" - The default signature type. 5698 // "SIGNATURE_TYPE_PROCESS" - Used for signatures concerning processes. 5699 // "SIGNATURE_TYPE_FILE" - Used for signatures concerning disks. 5700 SignatureType string `json:"signatureType,omitempty"` 5701 // YaraRuleSignature: Signature indicating that a YARA rule was matched. 5702 YaraRuleSignature *GoogleCloudSecuritycenterV2YaraRuleSignature `json:"yaraRuleSignature,omitempty"` 5703 // ForceSendFields is a list of field names (e.g. "MemoryHashSignature") to 5704 // unconditionally include in API requests. By default, fields with empty or 5705 // default values are omitted from API requests. See 5706 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5707 // details. 5708 ForceSendFields []string `json:"-"` 5709 // NullFields is a list of field names (e.g. "MemoryHashSignature") to include 5710 // in API requests with the JSON null value. By default, fields with empty 5711 // values are omitted from API requests. See 5712 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5713 NullFields []string `json:"-"` 5714 } 5715 5716 func (s *GoogleCloudSecuritycenterV2ProcessSignature) MarshalJSON() ([]byte, error) { 5717 type NoMethod GoogleCloudSecuritycenterV2ProcessSignature 5718 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5719 } 5720 5721 // GoogleCloudSecuritycenterV2Reference: Additional Links 5722 type GoogleCloudSecuritycenterV2Reference struct { 5723 // Source: Source of the reference e.g. NVD 5724 Source string `json:"source,omitempty"` 5725 // Uri: Uri for the mentioned source e.g. 5726 // https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. 5727 Uri string `json:"uri,omitempty"` 5728 // ForceSendFields is a list of field names (e.g. "Source") to unconditionally 5729 // include in API requests. By default, fields with empty or default values are 5730 // omitted from API requests. See 5731 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5732 // details. 5733 ForceSendFields []string `json:"-"` 5734 // NullFields is a list of field names (e.g. "Source") to include in API 5735 // requests with the JSON null value. By default, fields with empty values are 5736 // omitted from API requests. See 5737 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5738 NullFields []string `json:"-"` 5739 } 5740 5741 func (s *GoogleCloudSecuritycenterV2Reference) MarshalJSON() ([]byte, error) { 5742 type NoMethod GoogleCloudSecuritycenterV2Reference 5743 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5744 } 5745 5746 // GoogleCloudSecuritycenterV2Requests: Information about the requests relevant 5747 // to the finding. 5748 type GoogleCloudSecuritycenterV2Requests struct { 5749 // LongTermAllowed: Allowed RPS (requests per second) over the long term. 5750 LongTermAllowed int64 `json:"longTermAllowed,omitempty"` 5751 // LongTermDenied: Denied RPS (requests per second) over the long term. 5752 LongTermDenied int64 `json:"longTermDenied,omitempty"` 5753 // Ratio: For 'Increasing deny ratio', the ratio is the denied traffic divided 5754 // by the allowed traffic. For 'Allowed traffic spike', the ratio is the 5755 // allowed traffic in the short term divided by allowed traffic in the long 5756 // term. 5757 Ratio float64 `json:"ratio,omitempty"` 5758 // ShortTermAllowed: Allowed RPS (requests per second) in the short term. 5759 ShortTermAllowed int64 `json:"shortTermAllowed,omitempty"` 5760 // ForceSendFields is a list of field names (e.g. "LongTermAllowed") to 5761 // unconditionally include in API requests. By default, fields with empty or 5762 // default values are omitted from API requests. See 5763 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5764 // details. 5765 ForceSendFields []string `json:"-"` 5766 // NullFields is a list of field names (e.g. "LongTermAllowed") to include in 5767 // API requests with the JSON null value. By default, fields with empty values 5768 // are omitted from API requests. See 5769 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5770 NullFields []string `json:"-"` 5771 } 5772 5773 func (s *GoogleCloudSecuritycenterV2Requests) MarshalJSON() ([]byte, error) { 5774 type NoMethod GoogleCloudSecuritycenterV2Requests 5775 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5776 } 5777 5778 func (s *GoogleCloudSecuritycenterV2Requests) UnmarshalJSON(data []byte) error { 5779 type NoMethod GoogleCloudSecuritycenterV2Requests 5780 var s1 struct { 5781 Ratio gensupport.JSONFloat64 `json:"ratio"` 5782 *NoMethod 5783 } 5784 s1.NoMethod = (*NoMethod)(s) 5785 if err := json.Unmarshal(data, &s1); err != nil { 5786 return err 5787 } 5788 s.Ratio = float64(s1.Ratio) 5789 return nil 5790 } 5791 5792 // GoogleCloudSecuritycenterV2Resource: Information related to the Google Cloud 5793 // resource. 5794 type GoogleCloudSecuritycenterV2Resource struct { 5795 // AwsMetadata: The AWS metadata associated with the finding. 5796 AwsMetadata *GoogleCloudSecuritycenterV2AwsMetadata `json:"awsMetadata,omitempty"` 5797 // CloudProvider: Indicates which cloud provider the finding is from. 5798 // 5799 // Possible values: 5800 // "CLOUD_PROVIDER_UNSPECIFIED" - The cloud provider is unspecified. 5801 // "GOOGLE_CLOUD_PLATFORM" - The cloud provider is Google Cloud Platform. 5802 // "AMAZON_WEB_SERVICES" - The cloud provider is Amazon Web Services. 5803 // "MICROSOFT_AZURE" - The cloud provider is Microsoft Azure. 5804 CloudProvider string `json:"cloudProvider,omitempty"` 5805 // DisplayName: The human readable name of the resource. 5806 DisplayName string `json:"displayName,omitempty"` 5807 // GcpMetadata: The GCP metadata associated with the finding. 5808 GcpMetadata *GcpMetadata `json:"gcpMetadata,omitempty"` 5809 // Location: The region or location of the service (if applicable). 5810 Location string `json:"location,omitempty"` 5811 // Name: The full resource name of the resource. See: 5812 // https://cloud.google.com/apis/design/resource_names#full_resource_name 5813 Name string `json:"name,omitempty"` 5814 // ResourcePath: Provides the path to the resource within the resource 5815 // hierarchy. 5816 ResourcePath *GoogleCloudSecuritycenterV2ResourcePath `json:"resourcePath,omitempty"` 5817 // ResourcePathString: A string representation of the resource path. For Google 5818 // Cloud, it has the format of 5819 // organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/proje 5820 // cts/{project_id} where there can be any number of folders. For AWS, it has 5821 // the format of 5822 // org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id} 5823 // /account/{account_id} where there can be any number of organizational units. 5824 // For Azure, it has the format of 5825 // mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_ 5826 // id}/rg/{resource_group_name} where there can be any number of management 5827 // groups. 5828 ResourcePathString string `json:"resourcePathString,omitempty"` 5829 // Service: The service or resource provider associated with the resource. 5830 Service string `json:"service,omitempty"` 5831 // Type: The full resource type of the resource. 5832 Type string `json:"type,omitempty"` 5833 // ForceSendFields is a list of field names (e.g. "AwsMetadata") to 5834 // unconditionally include in API requests. By default, fields with empty or 5835 // default values are omitted from API requests. See 5836 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5837 // details. 5838 ForceSendFields []string `json:"-"` 5839 // NullFields is a list of field names (e.g. "AwsMetadata") to include in API 5840 // requests with the JSON null value. By default, fields with empty values are 5841 // omitted from API requests. See 5842 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5843 NullFields []string `json:"-"` 5844 } 5845 5846 func (s *GoogleCloudSecuritycenterV2Resource) MarshalJSON() ([]byte, error) { 5847 type NoMethod GoogleCloudSecuritycenterV2Resource 5848 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5849 } 5850 5851 // GoogleCloudSecuritycenterV2ResourcePath: Represents the path of resources 5852 // leading up to the resource this finding is about. 5853 type GoogleCloudSecuritycenterV2ResourcePath struct { 5854 // Nodes: The list of nodes that make the up resource path, ordered from lowest 5855 // level to highest level. 5856 Nodes []*GoogleCloudSecuritycenterV2ResourcePathNode `json:"nodes,omitempty"` 5857 // ForceSendFields is a list of field names (e.g. "Nodes") to unconditionally 5858 // include in API requests. By default, fields with empty or default values are 5859 // omitted from API requests. See 5860 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5861 // details. 5862 ForceSendFields []string `json:"-"` 5863 // NullFields is a list of field names (e.g. "Nodes") to include in API 5864 // requests with the JSON null value. By default, fields with empty values are 5865 // omitted from API requests. See 5866 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5867 NullFields []string `json:"-"` 5868 } 5869 5870 func (s *GoogleCloudSecuritycenterV2ResourcePath) MarshalJSON() ([]byte, error) { 5871 type NoMethod GoogleCloudSecuritycenterV2ResourcePath 5872 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5873 } 5874 5875 // GoogleCloudSecuritycenterV2ResourcePathNode: A node within the resource 5876 // path. Each node represents a resource within the resource hierarchy. 5877 type GoogleCloudSecuritycenterV2ResourcePathNode struct { 5878 // DisplayName: The display name of the resource this node represents. 5879 DisplayName string `json:"displayName,omitempty"` 5880 // Id: The ID of the resource this node represents. 5881 Id string `json:"id,omitempty"` 5882 // NodeType: The type of resource this node represents. 5883 // 5884 // Possible values: 5885 // "RESOURCE_PATH_NODE_TYPE_UNSPECIFIED" - Node type is unspecified. 5886 // "GCP_ORGANIZATION" - The node represents a Google Cloud organization. 5887 // "GCP_FOLDER" - The node represents a Google Cloud folder. 5888 // "GCP_PROJECT" - The node represents a Google Cloud project. 5889 // "AWS_ORGANIZATION" - The node represents an AWS organization. 5890 // "AWS_ORGANIZATIONAL_UNIT" - The node represents an AWS organizational 5891 // unit. 5892 // "AWS_ACCOUNT" - The node represents an AWS account. 5893 // "AZURE_MANAGEMENT_GROUP" - The node represents an Azure management group. 5894 // "AZURE_SUBSCRIPTION" - The node represents an Azure subscription. 5895 // "AZURE_RESOURCE_GROUP" - The node represents an Azure resource group. 5896 NodeType string `json:"nodeType,omitempty"` 5897 // ForceSendFields is a list of field names (e.g. "DisplayName") to 5898 // unconditionally include in API requests. By default, fields with empty or 5899 // default values are omitted from API requests. See 5900 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5901 // details. 5902 ForceSendFields []string `json:"-"` 5903 // NullFields is a list of field names (e.g. "DisplayName") to include in API 5904 // requests with the JSON null value. By default, fields with empty values are 5905 // omitted from API requests. See 5906 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5907 NullFields []string `json:"-"` 5908 } 5909 5910 func (s *GoogleCloudSecuritycenterV2ResourcePathNode) MarshalJSON() ([]byte, error) { 5911 type NoMethod GoogleCloudSecuritycenterV2ResourcePathNode 5912 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5913 } 5914 5915 // GoogleCloudSecuritycenterV2ResourceValueConfig: A resource value config 5916 // (RVC) is a mapping configuration of user's resources to resource values. 5917 // Used in Attack path simulations. 5918 type GoogleCloudSecuritycenterV2ResourceValueConfig struct { 5919 // CloudProvider: Cloud provider this configuration applies to 5920 // 5921 // Possible values: 5922 // "CLOUD_PROVIDER_UNSPECIFIED" - The cloud provider is unspecified. 5923 // "GOOGLE_CLOUD_PLATFORM" - The cloud provider is Google Cloud Platform. 5924 // "AMAZON_WEB_SERVICES" - The cloud provider is Amazon Web Services. 5925 // "MICROSOFT_AZURE" - The cloud provider is Microsoft Azure. 5926 CloudProvider string `json:"cloudProvider,omitempty"` 5927 // CreateTime: Output only. Timestamp this resource value config was created. 5928 CreateTime string `json:"createTime,omitempty"` 5929 // Description: Description of the resource value config. 5930 Description string `json:"description,omitempty"` 5931 // Name: Name for the resource value config 5932 Name string `json:"name,omitempty"` 5933 // ResourceLabelsSelector: List of resource labels to search for, evaluated 5934 // with AND. E.g. "resource_labels_selector": {"key": "value", "env": "prod"} 5935 // will match resources with labels "key": "value" AND "env": "prod" 5936 // https://cloud.google.com/resource-manager/docs/creating-managing-labels 5937 ResourceLabelsSelector map[string]string `json:"resourceLabelsSelector,omitempty"` 5938 // ResourceType: Apply resource_value only to resources that match 5939 // resource_type. resource_type will be checked with "AND" of other resources. 5940 // E.g. "storage.googleapis.com/Bucket" with resource_value "HIGH" will apply 5941 // "HIGH" value only to "storage.googleapis.com/Bucket" resources. 5942 ResourceType string `json:"resourceType,omitempty"` 5943 // ResourceValue: Resource value level this expression represents Only required 5944 // when there is no SDP mapping in the request 5945 // 5946 // Possible values: 5947 // "RESOURCE_VALUE_UNSPECIFIED" - Unspecific value 5948 // "HIGH" - High resource value 5949 // "MEDIUM" - Medium resource value 5950 // "LOW" - Low resource value 5951 // "NONE" - No resource value, e.g. ignore these resources 5952 ResourceValue string `json:"resourceValue,omitempty"` 5953 // Scope: Project or folder to scope this config to. For example, "project/456" 5954 // would apply this config only to resources in "project/456" scope will be 5955 // checked with "AND" of other resources. 5956 Scope string `json:"scope,omitempty"` 5957 // SensitiveDataProtectionMapping: A mapping of the sensitivity on Sensitive 5958 // Data Protection finding to resource values. This mapping can only be used in 5959 // combination with a resource_type that is related to BigQuery, e.g. 5960 // "bigquery.googleapis.com/Dataset". 5961 SensitiveDataProtectionMapping *GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping `json:"sensitiveDataProtectionMapping,omitempty"` 5962 // TagValues: Required. Tag values combined with AND to check against. Values 5963 // in the form "tagValues/123" E.g. [ "tagValues/123", "tagValues/456", 5964 // "tagValues/789" ] 5965 // https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing 5966 TagValues []string `json:"tagValues,omitempty"` 5967 // UpdateTime: Output only. Timestamp this resource value config was last 5968 // updated. 5969 UpdateTime string `json:"updateTime,omitempty"` 5970 // ForceSendFields is a list of field names (e.g. "CloudProvider") to 5971 // unconditionally include in API requests. By default, fields with empty or 5972 // default values are omitted from API requests. See 5973 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5974 // details. 5975 ForceSendFields []string `json:"-"` 5976 // NullFields is a list of field names (e.g. "CloudProvider") to include in API 5977 // requests with the JSON null value. By default, fields with empty values are 5978 // omitted from API requests. See 5979 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5980 NullFields []string `json:"-"` 5981 } 5982 5983 func (s *GoogleCloudSecuritycenterV2ResourceValueConfig) MarshalJSON() ([]byte, error) { 5984 type NoMethod GoogleCloudSecuritycenterV2ResourceValueConfig 5985 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5986 } 5987 5988 // GoogleCloudSecuritycenterV2Role: Kubernetes Role or ClusterRole. 5989 type GoogleCloudSecuritycenterV2Role struct { 5990 // Kind: Role type. 5991 // 5992 // Possible values: 5993 // "KIND_UNSPECIFIED" - Role type is not specified. 5994 // "ROLE" - Kubernetes Role. 5995 // "CLUSTER_ROLE" - Kubernetes ClusterRole. 5996 Kind string `json:"kind,omitempty"` 5997 // Name: Role name. 5998 Name string `json:"name,omitempty"` 5999 // Ns: Role namespace. 6000 Ns string `json:"ns,omitempty"` 6001 // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally 6002 // include in API requests. By default, fields with empty or default values are 6003 // omitted from API requests. See 6004 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6005 // details. 6006 ForceSendFields []string `json:"-"` 6007 // NullFields is a list of field names (e.g. "Kind") to include in API requests 6008 // with the JSON null value. By default, fields with empty values are omitted 6009 // from API requests. See 6010 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6011 NullFields []string `json:"-"` 6012 } 6013 6014 func (s *GoogleCloudSecuritycenterV2Role) MarshalJSON() ([]byte, error) { 6015 type NoMethod GoogleCloudSecuritycenterV2Role 6016 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6017 } 6018 6019 // GoogleCloudSecuritycenterV2SecurityBulletin: SecurityBulletin are 6020 // notifications of vulnerabilities of Google products. 6021 type GoogleCloudSecuritycenterV2SecurityBulletin struct { 6022 // BulletinId: ID of the bulletin corresponding to the vulnerability. 6023 BulletinId string `json:"bulletinId,omitempty"` 6024 // SubmissionTime: Submission time of this Security Bulletin. 6025 SubmissionTime string `json:"submissionTime,omitempty"` 6026 // SuggestedUpgradeVersion: This represents a version that the cluster 6027 // receiving this notification should be upgraded to, based on its current 6028 // version. For example, 1.15.0 6029 SuggestedUpgradeVersion string `json:"suggestedUpgradeVersion,omitempty"` 6030 // ForceSendFields is a list of field names (e.g. "BulletinId") to 6031 // unconditionally include in API requests. By default, fields with empty or 6032 // default values are omitted from API requests. See 6033 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6034 // details. 6035 ForceSendFields []string `json:"-"` 6036 // NullFields is a list of field names (e.g. "BulletinId") to include in API 6037 // requests with the JSON null value. By default, fields with empty values are 6038 // omitted from API requests. See 6039 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6040 NullFields []string `json:"-"` 6041 } 6042 6043 func (s *GoogleCloudSecuritycenterV2SecurityBulletin) MarshalJSON() ([]byte, error) { 6044 type NoMethod GoogleCloudSecuritycenterV2SecurityBulletin 6045 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6046 } 6047 6048 // GoogleCloudSecuritycenterV2SecurityMarks: User specified security marks that 6049 // are attached to the parent Security Command Center resource. Security marks 6050 // are scoped within a Security Command Center organization -- they can be 6051 // modified and viewed by all users who have proper permissions on the 6052 // organization. 6053 type GoogleCloudSecuritycenterV2SecurityMarks struct { 6054 // CanonicalName: The canonical name of the marks. The following list shows 6055 // some examples: + 6056 // `organizations/{organization_id}/assets/{asset_id}/securityMarks` + 6057 // `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/se 6058 // curityMarks` + 6059 // `organizations/{organization_id}/sources/{source_id}/locations/{location}/fin 6060 // dings/{finding_id}/securityMarks` + 6061 // `folders/{folder_id}/assets/{asset_id}/securityMarks` + 6062 // `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks` 6063 // + 6064 // `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{findi 6065 // ng_id}/securityMarks` + 6066 // `projects/{project_number}/assets/{asset_id}/securityMarks` + 6067 // `projects/{project_number}/sources/{source_id}/findings/{finding_id}/security 6068 // Marks` + 6069 // `projects/{project_number}/sources/{source_id}/locations/{location}/findings/ 6070 // {finding_id}/securityMarks` 6071 CanonicalName string `json:"canonicalName,omitempty"` 6072 // Marks: Mutable user specified security marks belonging to the parent 6073 // resource. Constraints are as follows: * Keys and values are treated as case 6074 // insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys 6075 // must be letters, numbers, underscores, or dashes * Values have leading and 6076 // trailing whitespace trimmed, remaining characters must be between 1 - 4096 6077 // characters (inclusive) 6078 Marks map[string]string `json:"marks,omitempty"` 6079 // Name: The relative resource name of the SecurityMarks. See: 6080 // https://cloud.google.com/apis/design/resource_names#relative_resource_name 6081 // The following list shows some examples: + 6082 // `organizations/{organization_id}/assets/{asset_id}/securityMarks` + 6083 // `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/se 6084 // curityMarks` + 6085 // `organizations/{organization_id}/sources/{source_id}/locations/{location}/fin 6086 // dings/{finding_id}/securityMarks` 6087 Name string `json:"name,omitempty"` 6088 // ForceSendFields is a list of field names (e.g. "CanonicalName") to 6089 // unconditionally include in API requests. By default, fields with empty or 6090 // default values are omitted from API requests. See 6091 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6092 // details. 6093 ForceSendFields []string `json:"-"` 6094 // NullFields is a list of field names (e.g. "CanonicalName") to include in API 6095 // requests with the JSON null value. By default, fields with empty values are 6096 // omitted from API requests. See 6097 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6098 NullFields []string `json:"-"` 6099 } 6100 6101 func (s *GoogleCloudSecuritycenterV2SecurityMarks) MarshalJSON() ([]byte, error) { 6102 type NoMethod GoogleCloudSecuritycenterV2SecurityMarks 6103 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6104 } 6105 6106 // GoogleCloudSecuritycenterV2SecurityPolicy: Information about the Google 6107 // Cloud Armor security policy 6108 // (https://cloud.google.com/armor/docs/security-policy-overview) relevant to 6109 // the finding. 6110 type GoogleCloudSecuritycenterV2SecurityPolicy struct { 6111 // Name: The name of the Google Cloud Armor security policy, for example, 6112 // "my-security-policy". 6113 Name string `json:"name,omitempty"` 6114 // Preview: Whether or not the associated rule or policy is in preview mode. 6115 Preview bool `json:"preview,omitempty"` 6116 // Type: The type of Google Cloud Armor security policy for example, 'backend 6117 // security policy', 'edge security policy', 'network edge security policy', or 6118 // 'always-on DDoS protection'. 6119 Type string `json:"type,omitempty"` 6120 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 6121 // include in API requests. By default, fields with empty or default values are 6122 // omitted from API requests. See 6123 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6124 // details. 6125 ForceSendFields []string `json:"-"` 6126 // NullFields is a list of field names (e.g. "Name") to include in API requests 6127 // with the JSON null value. By default, fields with empty values are omitted 6128 // from API requests. See 6129 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6130 NullFields []string `json:"-"` 6131 } 6132 6133 func (s *GoogleCloudSecuritycenterV2SecurityPolicy) MarshalJSON() ([]byte, error) { 6134 type NoMethod GoogleCloudSecuritycenterV2SecurityPolicy 6135 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6136 } 6137 6138 // GoogleCloudSecuritycenterV2SecurityPosture: Represents a posture that is 6139 // deployed on Google Cloud by the Security Command Center Posture Management 6140 // service. A posture contains one or more policy sets. A policy set is a group 6141 // of policies that enforce a set of security rules on Google Cloud. 6142 type GoogleCloudSecuritycenterV2SecurityPosture struct { 6143 // ChangedPolicy: The name of the updated policy, for example, 6144 // `projects/{project_id}/policies/{constraint_name}`. 6145 ChangedPolicy string `json:"changedPolicy,omitempty"` 6146 // Name: Name of the posture, for example, `CIS-Posture`. 6147 Name string `json:"name,omitempty"` 6148 // Policy: The ID of the updated policy, for example, `compute-policy-1`. 6149 Policy string `json:"policy,omitempty"` 6150 // PolicyDriftDetails: The details about a change in an updated policy that 6151 // violates the deployed posture. 6152 PolicyDriftDetails []*GoogleCloudSecuritycenterV2PolicyDriftDetails `json:"policyDriftDetails,omitempty"` 6153 // PolicySet: The name of the updated policy set, for example, `cis-policyset`. 6154 PolicySet string `json:"policySet,omitempty"` 6155 // PostureDeployment: The name of the posture deployment, for example, 6156 // `organizations/{org_id}/posturedeployments/{posture_deployment_id}`. 6157 PostureDeployment string `json:"postureDeployment,omitempty"` 6158 // PostureDeploymentResource: The project, folder, or organization on which the 6159 // posture is deployed, for example, `projects/{project_number}`. 6160 PostureDeploymentResource string `json:"postureDeploymentResource,omitempty"` 6161 // RevisionId: The version of the posture, for example, `c7cfa2a8`. 6162 RevisionId string `json:"revisionId,omitempty"` 6163 // ForceSendFields is a list of field names (e.g. "ChangedPolicy") to 6164 // unconditionally include in API requests. By default, fields with empty or 6165 // default values are omitted from API requests. See 6166 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6167 // details. 6168 ForceSendFields []string `json:"-"` 6169 // NullFields is a list of field names (e.g. "ChangedPolicy") to include in API 6170 // requests with the JSON null value. By default, fields with empty values are 6171 // omitted from API requests. See 6172 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6173 NullFields []string `json:"-"` 6174 } 6175 6176 func (s *GoogleCloudSecuritycenterV2SecurityPosture) MarshalJSON() ([]byte, error) { 6177 type NoMethod GoogleCloudSecuritycenterV2SecurityPosture 6178 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6179 } 6180 6181 // GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping: Resource value 6182 // mapping for Sensitive Data Protection findings If any of these mappings have 6183 // a resource value that is not unspecified, the resource_value field will be 6184 // ignored when reading this configuration. 6185 type GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping struct { 6186 // HighSensitivityMapping: Resource value mapping for high-sensitivity 6187 // Sensitive Data Protection findings 6188 // 6189 // Possible values: 6190 // "RESOURCE_VALUE_UNSPECIFIED" - Unspecific value 6191 // "HIGH" - High resource value 6192 // "MEDIUM" - Medium resource value 6193 // "LOW" - Low resource value 6194 // "NONE" - No resource value, e.g. ignore these resources 6195 HighSensitivityMapping string `json:"highSensitivityMapping,omitempty"` 6196 // MediumSensitivityMapping: Resource value mapping for medium-sensitivity 6197 // Sensitive Data Protection findings 6198 // 6199 // Possible values: 6200 // "RESOURCE_VALUE_UNSPECIFIED" - Unspecific value 6201 // "HIGH" - High resource value 6202 // "MEDIUM" - Medium resource value 6203 // "LOW" - Low resource value 6204 // "NONE" - No resource value, e.g. ignore these resources 6205 MediumSensitivityMapping string `json:"mediumSensitivityMapping,omitempty"` 6206 // ForceSendFields is a list of field names (e.g. "HighSensitivityMapping") to 6207 // unconditionally include in API requests. By default, fields with empty or 6208 // default values are omitted from API requests. See 6209 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6210 // details. 6211 ForceSendFields []string `json:"-"` 6212 // NullFields is a list of field names (e.g. "HighSensitivityMapping") to 6213 // include in API requests with the JSON null value. By default, fields with 6214 // empty values are omitted from API requests. See 6215 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6216 NullFields []string `json:"-"` 6217 } 6218 6219 func (s *GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping) MarshalJSON() ([]byte, error) { 6220 type NoMethod GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping 6221 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6222 } 6223 6224 // GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo: Identity delegation 6225 // history of an authenticated service account. 6226 type GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo struct { 6227 // PrincipalEmail: The email address of a Google account. 6228 PrincipalEmail string `json:"principalEmail,omitempty"` 6229 // PrincipalSubject: A string representing the principal_subject associated 6230 // with the identity. As compared to `principal_email`, supports principals 6231 // that aren't associated with email addresses, such as third party principals. 6232 // For most identities, the format will be 6233 // `principal://iam.googleapis.com/{identity pool name}/subjects/{subject}` 6234 // except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) 6235 // that are still in the legacy format `serviceAccount:{identity pool 6236 // name}[{subject}]` 6237 PrincipalSubject string `json:"principalSubject,omitempty"` 6238 // ForceSendFields is a list of field names (e.g. "PrincipalEmail") to 6239 // unconditionally include in API requests. By default, fields with empty or 6240 // default values are omitted from API requests. See 6241 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6242 // details. 6243 ForceSendFields []string `json:"-"` 6244 // NullFields is a list of field names (e.g. "PrincipalEmail") to include in 6245 // API requests with the JSON null value. By default, fields with empty values 6246 // are omitted from API requests. See 6247 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6248 NullFields []string `json:"-"` 6249 } 6250 6251 func (s *GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo) MarshalJSON() ([]byte, error) { 6252 type NoMethod GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo 6253 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6254 } 6255 6256 // GoogleCloudSecuritycenterV2Subject: Represents a Kubernetes subject. 6257 type GoogleCloudSecuritycenterV2Subject struct { 6258 // Kind: Authentication type for the subject. 6259 // 6260 // Possible values: 6261 // "AUTH_TYPE_UNSPECIFIED" - Authentication is not specified. 6262 // "USER" - User with valid certificate. 6263 // "SERVICEACCOUNT" - Users managed by Kubernetes API with credentials stored 6264 // as secrets. 6265 // "GROUP" - Collection of users. 6266 Kind string `json:"kind,omitempty"` 6267 // Name: Name for the subject. 6268 Name string `json:"name,omitempty"` 6269 // Ns: Namespace for the subject. 6270 Ns string `json:"ns,omitempty"` 6271 // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally 6272 // include in API requests. By default, fields with empty or default values are 6273 // omitted from API requests. See 6274 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6275 // details. 6276 ForceSendFields []string `json:"-"` 6277 // NullFields is a list of field names (e.g. "Kind") to include in API requests 6278 // with the JSON null value. By default, fields with empty values are omitted 6279 // from API requests. See 6280 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6281 NullFields []string `json:"-"` 6282 } 6283 6284 func (s *GoogleCloudSecuritycenterV2Subject) MarshalJSON() ([]byte, error) { 6285 type NoMethod GoogleCloudSecuritycenterV2Subject 6286 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6287 } 6288 6289 // GoogleCloudSecuritycenterV2TicketInfo: Information about the ticket, if any, 6290 // that is being used to track the resolution of the issue that is identified 6291 // by this finding. 6292 type GoogleCloudSecuritycenterV2TicketInfo struct { 6293 // Assignee: The assignee of the ticket in the ticket system. 6294 Assignee string `json:"assignee,omitempty"` 6295 // Description: The description of the ticket in the ticket system. 6296 Description string `json:"description,omitempty"` 6297 // Id: The identifier of the ticket in the ticket system. 6298 Id string `json:"id,omitempty"` 6299 // Status: The latest status of the ticket, as reported by the ticket system. 6300 Status string `json:"status,omitempty"` 6301 // UpdateTime: The time when the ticket was last updated, as reported by the 6302 // ticket system. 6303 UpdateTime string `json:"updateTime,omitempty"` 6304 // Uri: The link to the ticket in the ticket system. 6305 Uri string `json:"uri,omitempty"` 6306 // ForceSendFields is a list of field names (e.g. "Assignee") to 6307 // unconditionally include in API requests. By default, fields with empty or 6308 // default values are omitted from API requests. See 6309 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6310 // details. 6311 ForceSendFields []string `json:"-"` 6312 // NullFields is a list of field names (e.g. "Assignee") to include in API 6313 // requests with the JSON null value. By default, fields with empty values are 6314 // omitted from API requests. See 6315 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6316 NullFields []string `json:"-"` 6317 } 6318 6319 func (s *GoogleCloudSecuritycenterV2TicketInfo) MarshalJSON() ([]byte, error) { 6320 type NoMethod GoogleCloudSecuritycenterV2TicketInfo 6321 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6322 } 6323 6324 // GoogleCloudSecuritycenterV2Vulnerability: Refers to common vulnerability 6325 // fields e.g. cve, cvss, cwe etc. 6326 type GoogleCloudSecuritycenterV2Vulnerability struct { 6327 // Cve: CVE stands for Common Vulnerabilities and Exposures 6328 // (https://cve.mitre.org/about/) 6329 Cve *GoogleCloudSecuritycenterV2Cve `json:"cve,omitempty"` 6330 // FixedPackage: The fixed package is relevant to the finding. 6331 FixedPackage *GoogleCloudSecuritycenterV2Package `json:"fixedPackage,omitempty"` 6332 // OffendingPackage: The offending package is relevant to the finding. 6333 OffendingPackage *GoogleCloudSecuritycenterV2Package `json:"offendingPackage,omitempty"` 6334 // SecurityBulletin: The security bulletin is relevant to this finding. 6335 SecurityBulletin *GoogleCloudSecuritycenterV2SecurityBulletin `json:"securityBulletin,omitempty"` 6336 // ForceSendFields is a list of field names (e.g. "Cve") to unconditionally 6337 // include in API requests. By default, fields with empty or default values are 6338 // omitted from API requests. See 6339 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6340 // details. 6341 ForceSendFields []string `json:"-"` 6342 // NullFields is a list of field names (e.g. "Cve") to include in API requests 6343 // with the JSON null value. By default, fields with empty values are omitted 6344 // from API requests. See 6345 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6346 NullFields []string `json:"-"` 6347 } 6348 6349 func (s *GoogleCloudSecuritycenterV2Vulnerability) MarshalJSON() ([]byte, error) { 6350 type NoMethod GoogleCloudSecuritycenterV2Vulnerability 6351 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6352 } 6353 6354 // GoogleCloudSecuritycenterV2YaraRuleSignature: A signature corresponding to a 6355 // YARA rule. 6356 type GoogleCloudSecuritycenterV2YaraRuleSignature struct { 6357 // YaraRule: The name of the YARA rule. 6358 YaraRule string `json:"yaraRule,omitempty"` 6359 // ForceSendFields is a list of field names (e.g. "YaraRule") to 6360 // unconditionally include in API requests. By default, fields with empty or 6361 // default values are omitted from API requests. See 6362 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6363 // details. 6364 ForceSendFields []string `json:"-"` 6365 // NullFields is a list of field names (e.g. "YaraRule") to include in API 6366 // requests with the JSON null value. By default, fields with empty values are 6367 // omitted from API requests. See 6368 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6369 NullFields []string `json:"-"` 6370 } 6371 6372 func (s *GoogleCloudSecuritycenterV2YaraRuleSignature) MarshalJSON() ([]byte, error) { 6373 type NoMethod GoogleCloudSecuritycenterV2YaraRuleSignature 6374 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6375 } 6376 6377 // IamBinding: Represents a particular IAM binding, which captures a member's 6378 // role addition, removal, or state. 6379 type IamBinding struct { 6380 // Action: The action that was performed on a Binding. 6381 // 6382 // Possible values: 6383 // "ACTION_UNSPECIFIED" - Unspecified. 6384 // "ADD" - Addition of a Binding. 6385 // "REMOVE" - Removal of a Binding. 6386 Action string `json:"action,omitempty"` 6387 // Member: A single identity requesting access for a Cloud Platform resource, 6388 // for example, "foo@google.com". 6389 Member string `json:"member,omitempty"` 6390 // Role: Role that is assigned to "members". For example, "roles/viewer", 6391 // "roles/editor", or "roles/owner". 6392 Role string `json:"role,omitempty"` 6393 // ForceSendFields is a list of field names (e.g. "Action") to unconditionally 6394 // include in API requests. By default, fields with empty or default values are 6395 // omitted from API requests. See 6396 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6397 // details. 6398 ForceSendFields []string `json:"-"` 6399 // NullFields is a list of field names (e.g. "Action") to include in API 6400 // requests with the JSON null value. By default, fields with empty values are 6401 // omitted from API requests. See 6402 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6403 NullFields []string `json:"-"` 6404 } 6405 6406 func (s *IamBinding) MarshalJSON() ([]byte, error) { 6407 type NoMethod IamBinding 6408 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6409 } 6410 6411 // Indicator: Represents what's commonly known as an _indicator of compromise_ 6412 // (IoC) in computer forensics. This is an artifact observed on a network or in 6413 // an operating system that, with high confidence, indicates a computer 6414 // intrusion. For more information, see Indicator of compromise 6415 // (https://en.wikipedia.org/wiki/Indicator_of_compromise). 6416 type Indicator struct { 6417 // Domains: List of domains associated to the Finding. 6418 Domains []string `json:"domains,omitempty"` 6419 // IpAddresses: The list of IP addresses that are associated with the finding. 6420 IpAddresses []string `json:"ipAddresses,omitempty"` 6421 // Signatures: The list of matched signatures indicating that the given process 6422 // is present in the environment. 6423 Signatures []*ProcessSignature `json:"signatures,omitempty"` 6424 // Uris: The list of URIs associated to the Findings. 6425 Uris []string `json:"uris,omitempty"` 6426 // ForceSendFields is a list of field names (e.g. "Domains") to unconditionally 6427 // include in API requests. By default, fields with empty or default values are 6428 // omitted from API requests. See 6429 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6430 // details. 6431 ForceSendFields []string `json:"-"` 6432 // NullFields is a list of field names (e.g. "Domains") to include in API 6433 // requests with the JSON null value. By default, fields with empty values are 6434 // omitted from API requests. See 6435 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6436 NullFields []string `json:"-"` 6437 } 6438 6439 func (s *Indicator) MarshalJSON() ([]byte, error) { 6440 type NoMethod Indicator 6441 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6442 } 6443 6444 // KernelRootkit: Kernel mode rootkit signatures. 6445 type KernelRootkit struct { 6446 // Name: Rootkit name, when available. 6447 Name string `json:"name,omitempty"` 6448 // UnexpectedCodeModification: True if unexpected modifications of kernel code 6449 // memory are present. 6450 UnexpectedCodeModification bool `json:"unexpectedCodeModification,omitempty"` 6451 // UnexpectedFtraceHandler: True if `ftrace` points are present with callbacks 6452 // pointing to regions that are not in the expected kernel or module code 6453 // range. 6454 UnexpectedFtraceHandler bool `json:"unexpectedFtraceHandler,omitempty"` 6455 // UnexpectedInterruptHandler: True if interrupt handlers that are are not in 6456 // the expected kernel or module code regions are present. 6457 UnexpectedInterruptHandler bool `json:"unexpectedInterruptHandler,omitempty"` 6458 // UnexpectedKernelCodePages: True if kernel code pages that are not in the 6459 // expected kernel or module code regions are present. 6460 UnexpectedKernelCodePages bool `json:"unexpectedKernelCodePages,omitempty"` 6461 // UnexpectedKprobeHandler: True if `kprobe` points are present with callbacks 6462 // pointing to regions that are not in the expected kernel or module code 6463 // range. 6464 UnexpectedKprobeHandler bool `json:"unexpectedKprobeHandler,omitempty"` 6465 // UnexpectedProcessesInRunqueue: True if unexpected processes in the scheduler 6466 // run queue are present. Such processes are in the run queue, but not in the 6467 // process task list. 6468 UnexpectedProcessesInRunqueue bool `json:"unexpectedProcessesInRunqueue,omitempty"` 6469 // UnexpectedReadOnlyDataModification: True if unexpected modifications of 6470 // kernel read-only data memory are present. 6471 UnexpectedReadOnlyDataModification bool `json:"unexpectedReadOnlyDataModification,omitempty"` 6472 // UnexpectedSystemCallHandler: True if system call handlers that are are not 6473 // in the expected kernel or module code regions are present. 6474 UnexpectedSystemCallHandler bool `json:"unexpectedSystemCallHandler,omitempty"` 6475 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 6476 // include in API requests. By default, fields with empty or default values are 6477 // omitted from API requests. See 6478 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6479 // details. 6480 ForceSendFields []string `json:"-"` 6481 // NullFields is a list of field names (e.g. "Name") to include in API requests 6482 // with the JSON null value. By default, fields with empty values are omitted 6483 // from API requests. See 6484 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6485 NullFields []string `json:"-"` 6486 } 6487 6488 func (s *KernelRootkit) MarshalJSON() ([]byte, error) { 6489 type NoMethod KernelRootkit 6490 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6491 } 6492 6493 // Kubernetes: Kubernetes-related attributes. 6494 type Kubernetes struct { 6495 // AccessReviews: Provides information on any Kubernetes access reviews 6496 // (privilege checks) relevant to the finding. 6497 AccessReviews []*AccessReview `json:"accessReviews,omitempty"` 6498 // Bindings: Provides Kubernetes role binding information for findings that 6499 // involve RoleBindings or ClusterRoleBindings 6500 // (https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). 6501 Bindings []*GoogleCloudSecuritycenterV1Binding `json:"bindings,omitempty"` 6502 // NodePools: GKE node pools 6503 // (https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) 6504 // associated with the finding. This field contains node pool information for 6505 // each node, when it is available. 6506 NodePools []*NodePool `json:"nodePools,omitempty"` 6507 // Nodes: Provides Kubernetes node 6508 // (https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) 6509 // information. 6510 Nodes []*Node `json:"nodes,omitempty"` 6511 // Objects: Kubernetes objects related to the finding. 6512 Objects []*Object `json:"objects,omitempty"` 6513 // Pods: Kubernetes Pods 6514 // (https://cloud.google.com/kubernetes-engine/docs/concepts/pod) associated 6515 // with the finding. This field contains Pod records for each container that is 6516 // owned by a Pod. 6517 Pods []*Pod `json:"pods,omitempty"` 6518 // Roles: Provides Kubernetes role information for findings that involve Roles 6519 // or ClusterRoles 6520 // (https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). 6521 Roles []*Role `json:"roles,omitempty"` 6522 // ForceSendFields is a list of field names (e.g. "AccessReviews") to 6523 // unconditionally include in API requests. By default, fields with empty or 6524 // default values are omitted from API requests. See 6525 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6526 // details. 6527 ForceSendFields []string `json:"-"` 6528 // NullFields is a list of field names (e.g. "AccessReviews") to include in API 6529 // requests with the JSON null value. By default, fields with empty values are 6530 // omitted from API requests. See 6531 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6532 NullFields []string `json:"-"` 6533 } 6534 6535 func (s *Kubernetes) MarshalJSON() ([]byte, error) { 6536 type NoMethod Kubernetes 6537 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6538 } 6539 6540 // Label: Represents a generic name-value label. A label has separate name and 6541 // value fields to support filtering with the `contains()` function. For more 6542 // information, see Filtering on array-type fields 6543 // (https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering). 6544 type Label struct { 6545 // Name: Name of the label. 6546 Name string `json:"name,omitempty"` 6547 // Value: Value that corresponds to the label's name. 6548 Value string `json:"value,omitempty"` 6549 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 6550 // include in API requests. By default, fields with empty or default values are 6551 // omitted from API requests. See 6552 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6553 // details. 6554 ForceSendFields []string `json:"-"` 6555 // NullFields is a list of field names (e.g. "Name") to include in API requests 6556 // with the JSON null value. By default, fields with empty values are omitted 6557 // from API requests. See 6558 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6559 NullFields []string `json:"-"` 6560 } 6561 6562 func (s *Label) MarshalJSON() ([]byte, error) { 6563 type NoMethod Label 6564 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6565 } 6566 6567 // LoadBalancer: Contains information related to the load balancer associated 6568 // with the finding. 6569 type LoadBalancer struct { 6570 // Name: The name of the load balancer associated with the finding. 6571 Name string `json:"name,omitempty"` 6572 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 6573 // include in API requests. By default, fields with empty or default values are 6574 // omitted from API requests. See 6575 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6576 // details. 6577 ForceSendFields []string `json:"-"` 6578 // NullFields is a list of field names (e.g. "Name") to include in API requests 6579 // with the JSON null value. By default, fields with empty values are omitted 6580 // from API requests. See 6581 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6582 NullFields []string `json:"-"` 6583 } 6584 6585 func (s *LoadBalancer) MarshalJSON() ([]byte, error) { 6586 type NoMethod LoadBalancer 6587 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6588 } 6589 6590 // LogEntry: An individual entry in a log. 6591 type LogEntry struct { 6592 // CloudLoggingEntry: An individual entry in a log stored in Cloud Logging. 6593 CloudLoggingEntry *CloudLoggingEntry `json:"cloudLoggingEntry,omitempty"` 6594 // ForceSendFields is a list of field names (e.g. "CloudLoggingEntry") to 6595 // unconditionally include in API requests. By default, fields with empty or 6596 // default values are omitted from API requests. See 6597 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6598 // details. 6599 ForceSendFields []string `json:"-"` 6600 // NullFields is a list of field names (e.g. "CloudLoggingEntry") to include in 6601 // API requests with the JSON null value. By default, fields with empty values 6602 // are omitted from API requests. See 6603 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6604 NullFields []string `json:"-"` 6605 } 6606 6607 func (s *LogEntry) MarshalJSON() ([]byte, error) { 6608 type NoMethod LogEntry 6609 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6610 } 6611 6612 // MemoryHashSignature: A signature corresponding to memory page hashes. 6613 type MemoryHashSignature struct { 6614 // BinaryFamily: The binary family. 6615 BinaryFamily string `json:"binaryFamily,omitempty"` 6616 // Detections: The list of memory hash detections contributing to the binary 6617 // family match. 6618 Detections []*Detection `json:"detections,omitempty"` 6619 // ForceSendFields is a list of field names (e.g. "BinaryFamily") to 6620 // unconditionally include in API requests. By default, fields with empty or 6621 // default values are omitted from API requests. See 6622 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6623 // details. 6624 ForceSendFields []string `json:"-"` 6625 // NullFields is a list of field names (e.g. "BinaryFamily") to include in API 6626 // requests with the JSON null value. By default, fields with empty values are 6627 // omitted from API requests. See 6628 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6629 NullFields []string `json:"-"` 6630 } 6631 6632 func (s *MemoryHashSignature) MarshalJSON() ([]byte, error) { 6633 type NoMethod MemoryHashSignature 6634 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6635 } 6636 6637 // MitreAttack: MITRE ATT&CK tactics and techniques related to this finding. 6638 // See: https://attack.mitre.org 6639 type MitreAttack struct { 6640 // AdditionalTactics: Additional MITRE ATT&CK tactics related to this finding, 6641 // if any. 6642 // 6643 // Possible values: 6644 // "TACTIC_UNSPECIFIED" - Unspecified value. 6645 // "RECONNAISSANCE" - TA0043 6646 // "RESOURCE_DEVELOPMENT" - TA0042 6647 // "INITIAL_ACCESS" - TA0001 6648 // "EXECUTION" - TA0002 6649 // "PERSISTENCE" - TA0003 6650 // "PRIVILEGE_ESCALATION" - TA0004 6651 // "DEFENSE_EVASION" - TA0005 6652 // "CREDENTIAL_ACCESS" - TA0006 6653 // "DISCOVERY" - TA0007 6654 // "LATERAL_MOVEMENT" - TA0008 6655 // "COLLECTION" - TA0009 6656 // "COMMAND_AND_CONTROL" - TA0011 6657 // "EXFILTRATION" - TA0010 6658 // "IMPACT" - TA0040 6659 AdditionalTactics []string `json:"additionalTactics,omitempty"` 6660 // AdditionalTechniques: Additional MITRE ATT&CK techniques related to this 6661 // finding, if any, along with any of their respective parent techniques. 6662 // 6663 // Possible values: 6664 // "TECHNIQUE_UNSPECIFIED" - Unspecified value. 6665 // "MASQUERADING" - T1036 6666 // "MATCH_LEGITIMATE_NAME_OR_LOCATION" - T1036.005 6667 // "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS" - T1037 6668 // "STARTUP_ITEMS" - T1037.005 6669 // "NETWORK_SERVICE_DISCOVERY" - T1046 6670 // "PROCESS_DISCOVERY" - T1057 6671 // "COMMAND_AND_SCRIPTING_INTERPRETER" - T1059 6672 // "UNIX_SHELL" - T1059.004 6673 // "PYTHON" - T1059.006 6674 // "PERMISSION_GROUPS_DISCOVERY" - T1069 6675 // "CLOUD_GROUPS" - T1069.003 6676 // "APPLICATION_LAYER_PROTOCOL" - T1071 6677 // "DNS" - T1071.004 6678 // "SOFTWARE_DEPLOYMENT_TOOLS" - T1072 6679 // "VALID_ACCOUNTS" - T1078 6680 // "DEFAULT_ACCOUNTS" - T1078.001 6681 // "LOCAL_ACCOUNTS" - T1078.003 6682 // "CLOUD_ACCOUNTS" - T1078.004 6683 // "PROXY" - T1090 6684 // "EXTERNAL_PROXY" - T1090.002 6685 // "MULTI_HOP_PROXY" - T1090.003 6686 // "ACCOUNT_MANIPULATION" - T1098 6687 // "ADDITIONAL_CLOUD_CREDENTIALS" - T1098.001 6688 // "SSH_AUTHORIZED_KEYS" - T1098.004 6689 // "ADDITIONAL_CONTAINER_CLUSTER_ROLES" - T1098.006 6690 // "INGRESS_TOOL_TRANSFER" - T1105 6691 // "NATIVE_API" - T1106 6692 // "BRUTE_FORCE" - T1110 6693 // "SHARED_MODULES" - T1129 6694 // "ACCESS_TOKEN_MANIPULATION" - T1134 6695 // "TOKEN_IMPERSONATION_OR_THEFT" - T1134.001 6696 // "EXPLOIT_PUBLIC_FACING_APPLICATION" - T1190 6697 // "DOMAIN_POLICY_MODIFICATION" - T1484 6698 // "DATA_DESTRUCTION" - T1485 6699 // "SERVICE_STOP" - T1489 6700 // "INHIBIT_SYSTEM_RECOVERY" - T1490 6701 // "RESOURCE_HIJACKING" - T1496 6702 // "NETWORK_DENIAL_OF_SERVICE" - T1498 6703 // "CLOUD_SERVICE_DISCOVERY" - T1526 6704 // "STEAL_APPLICATION_ACCESS_TOKEN" - T1528 6705 // "ACCOUNT_ACCESS_REMOVAL" - T1531 6706 // "STEAL_WEB_SESSION_COOKIE" - T1539 6707 // "CREATE_OR_MODIFY_SYSTEM_PROCESS" - T1543 6708 // "ABUSE_ELEVATION_CONTROL_MECHANISM" - T1548 6709 // "UNSECURED_CREDENTIALS" - T1552 6710 // "MODIFY_AUTHENTICATION_PROCESS" - T1556 6711 // "IMPAIR_DEFENSES" - T1562 6712 // "DISABLE_OR_MODIFY_TOOLS" - T1562.001 6713 // "EXFILTRATION_OVER_WEB_SERVICE" - T1567 6714 // "EXFILTRATION_TO_CLOUD_STORAGE" - T1567.002 6715 // "DYNAMIC_RESOLUTION" - T1568 6716 // "LATERAL_TOOL_TRANSFER" - T1570 6717 // "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" - T1578 6718 // "CREATE_SNAPSHOT" - T1578.001 6719 // "CLOUD_INFRASTRUCTURE_DISCOVERY" - T1580 6720 // "OBTAIN_CAPABILITIES" - T1588 6721 // "ACTIVE_SCANNING" - T1595 6722 // "SCANNING_IP_BLOCKS" - T1595.001 6723 // "CONTAINER_AND_RESOURCE_DISCOVERY" - T1613 6724 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` 6725 // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by this 6726 // finding, if any. 6727 // 6728 // Possible values: 6729 // "TACTIC_UNSPECIFIED" - Unspecified value. 6730 // "RECONNAISSANCE" - TA0043 6731 // "RESOURCE_DEVELOPMENT" - TA0042 6732 // "INITIAL_ACCESS" - TA0001 6733 // "EXECUTION" - TA0002 6734 // "PERSISTENCE" - TA0003 6735 // "PRIVILEGE_ESCALATION" - TA0004 6736 // "DEFENSE_EVASION" - TA0005 6737 // "CREDENTIAL_ACCESS" - TA0006 6738 // "DISCOVERY" - TA0007 6739 // "LATERAL_MOVEMENT" - TA0008 6740 // "COLLECTION" - TA0009 6741 // "COMMAND_AND_CONTROL" - TA0011 6742 // "EXFILTRATION" - TA0010 6743 // "IMPACT" - TA0040 6744 PrimaryTactic string `json:"primaryTactic,omitempty"` 6745 // PrimaryTechniques: The MITRE ATT&CK technique most closely represented by 6746 // this finding, if any. primary_techniques is a repeated field because there 6747 // are multiple levels of MITRE ATT&CK techniques. If the technique most 6748 // closely represented by this finding is a sub-technique (e.g. 6749 // `SCANNING_IP_BLOCKS`), both the sub-technique and its parent technique(s) 6750 // will be listed (e.g. `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). 6751 // 6752 // Possible values: 6753 // "TECHNIQUE_UNSPECIFIED" - Unspecified value. 6754 // "MASQUERADING" - T1036 6755 // "MATCH_LEGITIMATE_NAME_OR_LOCATION" - T1036.005 6756 // "BOOT_OR_LOGON_INITIALIZATION_SCRIPTS" - T1037 6757 // "STARTUP_ITEMS" - T1037.005 6758 // "NETWORK_SERVICE_DISCOVERY" - T1046 6759 // "PROCESS_DISCOVERY" - T1057 6760 // "COMMAND_AND_SCRIPTING_INTERPRETER" - T1059 6761 // "UNIX_SHELL" - T1059.004 6762 // "PYTHON" - T1059.006 6763 // "PERMISSION_GROUPS_DISCOVERY" - T1069 6764 // "CLOUD_GROUPS" - T1069.003 6765 // "APPLICATION_LAYER_PROTOCOL" - T1071 6766 // "DNS" - T1071.004 6767 // "SOFTWARE_DEPLOYMENT_TOOLS" - T1072 6768 // "VALID_ACCOUNTS" - T1078 6769 // "DEFAULT_ACCOUNTS" - T1078.001 6770 // "LOCAL_ACCOUNTS" - T1078.003 6771 // "CLOUD_ACCOUNTS" - T1078.004 6772 // "PROXY" - T1090 6773 // "EXTERNAL_PROXY" - T1090.002 6774 // "MULTI_HOP_PROXY" - T1090.003 6775 // "ACCOUNT_MANIPULATION" - T1098 6776 // "ADDITIONAL_CLOUD_CREDENTIALS" - T1098.001 6777 // "SSH_AUTHORIZED_KEYS" - T1098.004 6778 // "ADDITIONAL_CONTAINER_CLUSTER_ROLES" - T1098.006 6779 // "INGRESS_TOOL_TRANSFER" - T1105 6780 // "NATIVE_API" - T1106 6781 // "BRUTE_FORCE" - T1110 6782 // "SHARED_MODULES" - T1129 6783 // "ACCESS_TOKEN_MANIPULATION" - T1134 6784 // "TOKEN_IMPERSONATION_OR_THEFT" - T1134.001 6785 // "EXPLOIT_PUBLIC_FACING_APPLICATION" - T1190 6786 // "DOMAIN_POLICY_MODIFICATION" - T1484 6787 // "DATA_DESTRUCTION" - T1485 6788 // "SERVICE_STOP" - T1489 6789 // "INHIBIT_SYSTEM_RECOVERY" - T1490 6790 // "RESOURCE_HIJACKING" - T1496 6791 // "NETWORK_DENIAL_OF_SERVICE" - T1498 6792 // "CLOUD_SERVICE_DISCOVERY" - T1526 6793 // "STEAL_APPLICATION_ACCESS_TOKEN" - T1528 6794 // "ACCOUNT_ACCESS_REMOVAL" - T1531 6795 // "STEAL_WEB_SESSION_COOKIE" - T1539 6796 // "CREATE_OR_MODIFY_SYSTEM_PROCESS" - T1543 6797 // "ABUSE_ELEVATION_CONTROL_MECHANISM" - T1548 6798 // "UNSECURED_CREDENTIALS" - T1552 6799 // "MODIFY_AUTHENTICATION_PROCESS" - T1556 6800 // "IMPAIR_DEFENSES" - T1562 6801 // "DISABLE_OR_MODIFY_TOOLS" - T1562.001 6802 // "EXFILTRATION_OVER_WEB_SERVICE" - T1567 6803 // "EXFILTRATION_TO_CLOUD_STORAGE" - T1567.002 6804 // "DYNAMIC_RESOLUTION" - T1568 6805 // "LATERAL_TOOL_TRANSFER" - T1570 6806 // "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" - T1578 6807 // "CREATE_SNAPSHOT" - T1578.001 6808 // "CLOUD_INFRASTRUCTURE_DISCOVERY" - T1580 6809 // "OBTAIN_CAPABILITIES" - T1588 6810 // "ACTIVE_SCANNING" - T1595 6811 // "SCANNING_IP_BLOCKS" - T1595.001 6812 // "CONTAINER_AND_RESOURCE_DISCOVERY" - T1613 6813 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` 6814 // Version: The MITRE ATT&CK version referenced by the above fields. E.g. "8". 6815 Version string `json:"version,omitempty"` 6816 // ForceSendFields is a list of field names (e.g. "AdditionalTactics") to 6817 // unconditionally include in API requests. By default, fields with empty or 6818 // default values are omitted from API requests. See 6819 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6820 // details. 6821 ForceSendFields []string `json:"-"` 6822 // NullFields is a list of field names (e.g. "AdditionalTactics") to include in 6823 // API requests with the JSON null value. By default, fields with empty values 6824 // are omitted from API requests. See 6825 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6826 NullFields []string `json:"-"` 6827 } 6828 6829 func (s *MitreAttack) MarshalJSON() ([]byte, error) { 6830 type NoMethod MitreAttack 6831 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6832 } 6833 6834 // Node: Kubernetes nodes associated with the finding. 6835 type Node struct { 6836 // Name: Full resource name (https://google.aip.dev/122#full-resource-names) of 6837 // the Compute Engine VM running the cluster node. 6838 Name string `json:"name,omitempty"` 6839 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 6840 // include in API requests. By default, fields with empty or default values are 6841 // omitted from API requests. See 6842 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6843 // details. 6844 ForceSendFields []string `json:"-"` 6845 // NullFields is a list of field names (e.g. "Name") to include in API requests 6846 // with the JSON null value. By default, fields with empty values are omitted 6847 // from API requests. See 6848 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6849 NullFields []string `json:"-"` 6850 } 6851 6852 func (s *Node) MarshalJSON() ([]byte, error) { 6853 type NoMethod Node 6854 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6855 } 6856 6857 // NodePool: Provides GKE node pool information. 6858 type NodePool struct { 6859 // Name: Kubernetes node pool name. 6860 Name string `json:"name,omitempty"` 6861 // Nodes: Nodes associated with the finding. 6862 Nodes []*Node `json:"nodes,omitempty"` 6863 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 6864 // include in API requests. By default, fields with empty or default values are 6865 // omitted from API requests. See 6866 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6867 // details. 6868 ForceSendFields []string `json:"-"` 6869 // NullFields is a list of field names (e.g. "Name") to include in API requests 6870 // with the JSON null value. By default, fields with empty values are omitted 6871 // from API requests. See 6872 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6873 NullFields []string `json:"-"` 6874 } 6875 6876 func (s *NodePool) MarshalJSON() ([]byte, error) { 6877 type NoMethod NodePool 6878 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6879 } 6880 6881 // Notebook: Represents a Jupyter notebook IPYNB file, such as a Colab 6882 // Enterprise notebook (https://cloud.google.com/colab/docs/introduction) file, 6883 // that is associated with a finding. 6884 type Notebook struct { 6885 // LastAuthor: The user ID of the latest author to modify the notebook. 6886 LastAuthor string `json:"lastAuthor,omitempty"` 6887 // Name: The name of the notebook. 6888 Name string `json:"name,omitempty"` 6889 // NotebookUpdateTime: The most recent time the notebook was updated. 6890 NotebookUpdateTime string `json:"notebookUpdateTime,omitempty"` 6891 // Service: The source notebook service, for example, "Colab Enterprise". 6892 Service string `json:"service,omitempty"` 6893 // ForceSendFields is a list of field names (e.g. "LastAuthor") to 6894 // unconditionally include in API requests. By default, fields with empty or 6895 // default values are omitted from API requests. See 6896 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6897 // details. 6898 ForceSendFields []string `json:"-"` 6899 // NullFields is a list of field names (e.g. "LastAuthor") to include in API 6900 // requests with the JSON null value. By default, fields with empty values are 6901 // omitted from API requests. See 6902 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6903 NullFields []string `json:"-"` 6904 } 6905 6906 func (s *Notebook) MarshalJSON() ([]byte, error) { 6907 type NoMethod Notebook 6908 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6909 } 6910 6911 // Object: Kubernetes object related to the finding, uniquely identified by 6912 // GKNN. Used if the object Kind is not one of Pod, Node, NodePool, Binding, or 6913 // AccessReview. 6914 type Object struct { 6915 // Containers: Pod containers associated with this finding, if any. 6916 Containers []*Container `json:"containers,omitempty"` 6917 // Group: Kubernetes object group, such as "policy.k8s.io/v1". 6918 Group string `json:"group,omitempty"` 6919 // Kind: Kubernetes object kind, such as "Namespace". 6920 Kind string `json:"kind,omitempty"` 6921 // Name: Kubernetes object name. For details see 6922 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names/. 6923 Name string `json:"name,omitempty"` 6924 // Ns: Kubernetes object namespace. Must be a valid DNS label. Named "ns" to 6925 // avoid collision with C++ namespace keyword. For details see 6926 // https://kubernetes.io/docs/tasks/administer-cluster/namespaces/. 6927 Ns string `json:"ns,omitempty"` 6928 // ForceSendFields is a list of field names (e.g. "Containers") to 6929 // unconditionally include in API requests. By default, fields with empty or 6930 // default values are omitted from API requests. See 6931 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6932 // details. 6933 ForceSendFields []string `json:"-"` 6934 // NullFields is a list of field names (e.g. "Containers") to include in API 6935 // requests with the JSON null value. By default, fields with empty values are 6936 // omitted from API requests. See 6937 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6938 NullFields []string `json:"-"` 6939 } 6940 6941 func (s *Object) MarshalJSON() ([]byte, error) { 6942 type NoMethod Object 6943 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6944 } 6945 6946 // OrgPolicy: Contains information about the org policies associated with the 6947 // finding. 6948 type OrgPolicy struct { 6949 // Name: The resource name of the org policy. Example: 6950 // "organizations/{organization_id}/policies/{constraint_name}" 6951 Name string `json:"name,omitempty"` 6952 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 6953 // include in API requests. By default, fields with empty or default values are 6954 // omitted from API requests. See 6955 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6956 // details. 6957 ForceSendFields []string `json:"-"` 6958 // NullFields is a list of field names (e.g. "Name") to include in API requests 6959 // with the JSON null value. By default, fields with empty values are omitted 6960 // from API requests. See 6961 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6962 NullFields []string `json:"-"` 6963 } 6964 6965 func (s *OrgPolicy) MarshalJSON() ([]byte, error) { 6966 type NoMethod OrgPolicy 6967 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6968 } 6969 6970 // Package: Package is a generic definition of a package. 6971 type Package struct { 6972 // CpeUri: The CPE URI where the vulnerability was detected. 6973 CpeUri string `json:"cpeUri,omitempty"` 6974 // PackageName: The name of the package where the vulnerability was detected. 6975 PackageName string `json:"packageName,omitempty"` 6976 // PackageType: Type of package, for example, os, maven, or go. 6977 PackageType string `json:"packageType,omitempty"` 6978 // PackageVersion: The version of the package. 6979 PackageVersion string `json:"packageVersion,omitempty"` 6980 // ForceSendFields is a list of field names (e.g. "CpeUri") to unconditionally 6981 // include in API requests. By default, fields with empty or default values are 6982 // omitted from API requests. See 6983 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6984 // details. 6985 ForceSendFields []string `json:"-"` 6986 // NullFields is a list of field names (e.g. "CpeUri") to include in API 6987 // requests with the JSON null value. By default, fields with empty values are 6988 // omitted from API requests. See 6989 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6990 NullFields []string `json:"-"` 6991 } 6992 6993 func (s *Package) MarshalJSON() ([]byte, error) { 6994 type NoMethod Package 6995 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6996 } 6997 6998 // Pod: A Kubernetes Pod. 6999 type Pod struct { 7000 // Containers: Pod containers associated with this finding, if any. 7001 Containers []*Container `json:"containers,omitempty"` 7002 // Labels: Pod labels. For Kubernetes containers, these are applied to the 7003 // container. 7004 Labels []*Label `json:"labels,omitempty"` 7005 // Name: Kubernetes Pod name. 7006 Name string `json:"name,omitempty"` 7007 // Ns: Kubernetes Pod namespace. 7008 Ns string `json:"ns,omitempty"` 7009 // ForceSendFields is a list of field names (e.g. "Containers") to 7010 // unconditionally include in API requests. By default, fields with empty or 7011 // default values are omitted from API requests. See 7012 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7013 // details. 7014 ForceSendFields []string `json:"-"` 7015 // NullFields is a list of field names (e.g. "Containers") to include in API 7016 // requests with the JSON null value. By default, fields with empty values are 7017 // omitted from API requests. See 7018 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7019 NullFields []string `json:"-"` 7020 } 7021 7022 func (s *Pod) MarshalJSON() ([]byte, error) { 7023 type NoMethod Pod 7024 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7025 } 7026 7027 // PolicyDriftDetails: The policy field that violates the deployed posture and 7028 // its expected and detected values. 7029 type PolicyDriftDetails struct { 7030 // DetectedValue: The detected value that violates the deployed posture, for 7031 // example, `false` or `allowed_values={"projects/22831892"}`. 7032 DetectedValue string `json:"detectedValue,omitempty"` 7033 // ExpectedValue: The value of this field that was configured in a posture, for 7034 // example, `true` or `allowed_values={"projects/29831892"}`. 7035 ExpectedValue string `json:"expectedValue,omitempty"` 7036 // Field: The name of the updated field, for example 7037 // constraint.implementation.policy_rules[0].enforce 7038 Field string `json:"field,omitempty"` 7039 // ForceSendFields is a list of field names (e.g. "DetectedValue") to 7040 // unconditionally include in API requests. By default, fields with empty or 7041 // default values are omitted from API requests. See 7042 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7043 // details. 7044 ForceSendFields []string `json:"-"` 7045 // NullFields is a list of field names (e.g. "DetectedValue") to include in API 7046 // requests with the JSON null value. By default, fields with empty values are 7047 // omitted from API requests. See 7048 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7049 NullFields []string `json:"-"` 7050 } 7051 7052 func (s *PolicyDriftDetails) MarshalJSON() ([]byte, error) { 7053 type NoMethod PolicyDriftDetails 7054 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7055 } 7056 7057 // Process: Represents an operating system process. 7058 type Process struct { 7059 // Args: Process arguments as JSON encoded strings. 7060 Args []string `json:"args,omitempty"` 7061 // ArgumentsTruncated: True if `args` is incomplete. 7062 ArgumentsTruncated bool `json:"argumentsTruncated,omitempty"` 7063 // Binary: File information for the process executable. 7064 Binary *File `json:"binary,omitempty"` 7065 // EnvVariables: Process environment variables. 7066 EnvVariables []*EnvironmentVariable `json:"envVariables,omitempty"` 7067 // EnvVariablesTruncated: True if `env_variables` is incomplete. 7068 EnvVariablesTruncated bool `json:"envVariablesTruncated,omitempty"` 7069 // Libraries: File information for libraries loaded by the process. 7070 Libraries []*File `json:"libraries,omitempty"` 7071 // Name: The process name, as displayed in utilities like `top` and `ps`. This 7072 // name can be accessed through `/proc/[pid]/comm` and changed with 7073 // `prctl(PR_SET_NAME)`. 7074 Name string `json:"name,omitempty"` 7075 // ParentPid: The parent process ID. 7076 ParentPid int64 `json:"parentPid,omitempty,string"` 7077 // Pid: The process ID. 7078 Pid int64 `json:"pid,omitempty,string"` 7079 // Script: When the process represents the invocation of a script, `binary` 7080 // provides information about the interpreter, while `script` provides 7081 // information about the script file provided to the interpreter. 7082 Script *File `json:"script,omitempty"` 7083 // ForceSendFields is a list of field names (e.g. "Args") to unconditionally 7084 // include in API requests. By default, fields with empty or default values are 7085 // omitted from API requests. See 7086 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7087 // details. 7088 ForceSendFields []string `json:"-"` 7089 // NullFields is a list of field names (e.g. "Args") to include in API requests 7090 // with the JSON null value. By default, fields with empty values are omitted 7091 // from API requests. See 7092 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7093 NullFields []string `json:"-"` 7094 } 7095 7096 func (s *Process) MarshalJSON() ([]byte, error) { 7097 type NoMethod Process 7098 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7099 } 7100 7101 // ProcessSignature: Indicates what signature matched this process. 7102 type ProcessSignature struct { 7103 // MemoryHashSignature: Signature indicating that a binary family was matched. 7104 MemoryHashSignature *MemoryHashSignature `json:"memoryHashSignature,omitempty"` 7105 // SignatureType: Describes the type of resource associated with the signature. 7106 // 7107 // Possible values: 7108 // "SIGNATURE_TYPE_UNSPECIFIED" - The default signature type. 7109 // "SIGNATURE_TYPE_PROCESS" - Used for signatures concerning processes. 7110 // "SIGNATURE_TYPE_FILE" - Used for signatures concerning disks. 7111 SignatureType string `json:"signatureType,omitempty"` 7112 // YaraRuleSignature: Signature indicating that a YARA rule was matched. 7113 YaraRuleSignature *YaraRuleSignature `json:"yaraRuleSignature,omitempty"` 7114 // ForceSendFields is a list of field names (e.g. "MemoryHashSignature") to 7115 // unconditionally include in API requests. By default, fields with empty or 7116 // default values are omitted from API requests. See 7117 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7118 // details. 7119 ForceSendFields []string `json:"-"` 7120 // NullFields is a list of field names (e.g. "MemoryHashSignature") to include 7121 // in API requests with the JSON null value. By default, fields with empty 7122 // values are omitted from API requests. See 7123 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7124 NullFields []string `json:"-"` 7125 } 7126 7127 func (s *ProcessSignature) MarshalJSON() ([]byte, error) { 7128 type NoMethod ProcessSignature 7129 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7130 } 7131 7132 // RapidVulnerabilityDetectionSettings: Resource capturing the settings for the 7133 // Rapid Vulnerability Detection service. 7134 type RapidVulnerabilityDetectionSettings struct { 7135 // Modules: The configurations including the state of enablement for the 7136 // service's different modules. The absence of a module in the map implies its 7137 // configuration is inherited from its parent's. 7138 Modules map[string]Config `json:"modules,omitempty"` 7139 // Name: The resource name of the RapidVulnerabilityDetectionSettings. Formats: 7140 // * organizations/{organization}/rapidVulnerabilityDetectionSettings * 7141 // folders/{folder}/rapidVulnerabilityDetectionSettings * 7142 // projects/{project}/rapidVulnerabilityDetectionSettings 7143 Name string `json:"name,omitempty"` 7144 // ServiceEnablementState: The state of enablement for the service at its level 7145 // of the resource hierarchy. A DISABLED state will override all module 7146 // enablement_states to DISABLED. 7147 // 7148 // Possible values: 7149 // "ENABLEMENT_STATE_UNSPECIFIED" - Default value. This value is unused. 7150 // "INHERITED" - State is inherited from the parent resource. 7151 // "ENABLED" - State is enabled. 7152 // "DISABLED" - State is disabled. 7153 ServiceEnablementState string `json:"serviceEnablementState,omitempty"` 7154 // UpdateTime: Output only. The time the settings were last updated. 7155 UpdateTime string `json:"updateTime,omitempty"` 7156 7157 // ServerResponse contains the HTTP response code and headers from the server. 7158 googleapi.ServerResponse `json:"-"` 7159 // ForceSendFields is a list of field names (e.g. "Modules") to unconditionally 7160 // include in API requests. By default, fields with empty or default values are 7161 // omitted from API requests. See 7162 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7163 // details. 7164 ForceSendFields []string `json:"-"` 7165 // NullFields is a list of field names (e.g. "Modules") to include in API 7166 // requests with the JSON null value. By default, fields with empty values are 7167 // omitted from API requests. See 7168 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7169 NullFields []string `json:"-"` 7170 } 7171 7172 func (s *RapidVulnerabilityDetectionSettings) MarshalJSON() ([]byte, error) { 7173 type NoMethod RapidVulnerabilityDetectionSettings 7174 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7175 } 7176 7177 // Reference: Additional Links 7178 type Reference struct { 7179 // Source: Source of the reference e.g. NVD 7180 Source string `json:"source,omitempty"` 7181 // Uri: Uri for the mentioned source e.g. 7182 // https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. 7183 Uri string `json:"uri,omitempty"` 7184 // ForceSendFields is a list of field names (e.g. "Source") to unconditionally 7185 // include in API requests. By default, fields with empty or default values are 7186 // omitted from API requests. See 7187 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7188 // details. 7189 ForceSendFields []string `json:"-"` 7190 // NullFields is a list of field names (e.g. "Source") to include in API 7191 // requests with the JSON null value. By default, fields with empty values are 7192 // omitted from API requests. See 7193 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7194 NullFields []string `json:"-"` 7195 } 7196 7197 func (s *Reference) MarshalJSON() ([]byte, error) { 7198 type NoMethod Reference 7199 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7200 } 7201 7202 // Requests: Information about the requests relevant to the finding. 7203 type Requests struct { 7204 // LongTermAllowed: Allowed RPS (requests per second) over the long term. 7205 LongTermAllowed int64 `json:"longTermAllowed,omitempty"` 7206 // LongTermDenied: Denied RPS (requests per second) over the long term. 7207 LongTermDenied int64 `json:"longTermDenied,omitempty"` 7208 // Ratio: For 'Increasing deny ratio', the ratio is the denied traffic divided 7209 // by the allowed traffic. For 'Allowed traffic spike', the ratio is the 7210 // allowed traffic in the short term divided by allowed traffic in the long 7211 // term. 7212 Ratio float64 `json:"ratio,omitempty"` 7213 // ShortTermAllowed: Allowed RPS (requests per second) in the short term. 7214 ShortTermAllowed int64 `json:"shortTermAllowed,omitempty"` 7215 // ForceSendFields is a list of field names (e.g. "LongTermAllowed") to 7216 // unconditionally include in API requests. By default, fields with empty or 7217 // default values are omitted from API requests. See 7218 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7219 // details. 7220 ForceSendFields []string `json:"-"` 7221 // NullFields is a list of field names (e.g. "LongTermAllowed") to include in 7222 // API requests with the JSON null value. By default, fields with empty values 7223 // are omitted from API requests. See 7224 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7225 NullFields []string `json:"-"` 7226 } 7227 7228 func (s *Requests) MarshalJSON() ([]byte, error) { 7229 type NoMethod Requests 7230 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7231 } 7232 7233 func (s *Requests) UnmarshalJSON(data []byte) error { 7234 type NoMethod Requests 7235 var s1 struct { 7236 Ratio gensupport.JSONFloat64 `json:"ratio"` 7237 *NoMethod 7238 } 7239 s1.NoMethod = (*NoMethod)(s) 7240 if err := json.Unmarshal(data, &s1); err != nil { 7241 return err 7242 } 7243 s.Ratio = float64(s1.Ratio) 7244 return nil 7245 } 7246 7247 // ResourcePath: Represents the path of resources leading up to the resource 7248 // this finding is about. 7249 type ResourcePath struct { 7250 // Nodes: The list of nodes that make the up resource path, ordered from lowest 7251 // level to highest level. 7252 Nodes []*ResourcePathNode `json:"nodes,omitempty"` 7253 // ForceSendFields is a list of field names (e.g. "Nodes") to unconditionally 7254 // include in API requests. By default, fields with empty or default values are 7255 // omitted from API requests. See 7256 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7257 // details. 7258 ForceSendFields []string `json:"-"` 7259 // NullFields is a list of field names (e.g. "Nodes") to include in API 7260 // requests with the JSON null value. By default, fields with empty values are 7261 // omitted from API requests. See 7262 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7263 NullFields []string `json:"-"` 7264 } 7265 7266 func (s *ResourcePath) MarshalJSON() ([]byte, error) { 7267 type NoMethod ResourcePath 7268 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7269 } 7270 7271 // ResourcePathNode: A node within the resource path. Each node represents a 7272 // resource within the resource hierarchy. 7273 type ResourcePathNode struct { 7274 // DisplayName: The display name of the resource this node represents. 7275 DisplayName string `json:"displayName,omitempty"` 7276 // Id: The ID of the resource this node represents. 7277 Id string `json:"id,omitempty"` 7278 // NodeType: The type of resource this node represents. 7279 // 7280 // Possible values: 7281 // "RESOURCE_PATH_NODE_TYPE_UNSPECIFIED" - Node type is unspecified. 7282 // "GCP_ORGANIZATION" - The node represents a Google Cloud organization. 7283 // "GCP_FOLDER" - The node represents a Google Cloud folder. 7284 // "GCP_PROJECT" - The node represents a Google Cloud project. 7285 // "AWS_ORGANIZATION" - The node represents an AWS organization. 7286 // "AWS_ORGANIZATIONAL_UNIT" - The node represents an AWS organizational 7287 // unit. 7288 // "AWS_ACCOUNT" - The node represents an AWS account. 7289 // "AZURE_MANAGEMENT_GROUP" - The node represents an Azure management group. 7290 // "AZURE_SUBSCRIPTION" - The node represents an Azure subscription. 7291 // "AZURE_RESOURCE_GROUP" - The node represents an Azure resource group. 7292 NodeType string `json:"nodeType,omitempty"` 7293 // ForceSendFields is a list of field names (e.g. "DisplayName") to 7294 // unconditionally include in API requests. By default, fields with empty or 7295 // default values are omitted from API requests. See 7296 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7297 // details. 7298 ForceSendFields []string `json:"-"` 7299 // NullFields is a list of field names (e.g. "DisplayName") to include in API 7300 // requests with the JSON null value. By default, fields with empty values are 7301 // omitted from API requests. See 7302 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7303 NullFields []string `json:"-"` 7304 } 7305 7306 func (s *ResourcePathNode) MarshalJSON() ([]byte, error) { 7307 type NoMethod ResourcePathNode 7308 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7309 } 7310 7311 // Role: Kubernetes Role or ClusterRole. 7312 type Role struct { 7313 // Kind: Role type. 7314 // 7315 // Possible values: 7316 // "KIND_UNSPECIFIED" - Role type is not specified. 7317 // "ROLE" - Kubernetes Role. 7318 // "CLUSTER_ROLE" - Kubernetes ClusterRole. 7319 Kind string `json:"kind,omitempty"` 7320 // Name: Role name. 7321 Name string `json:"name,omitempty"` 7322 // Ns: Role namespace. 7323 Ns string `json:"ns,omitempty"` 7324 // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally 7325 // include in API requests. By default, fields with empty or default values are 7326 // omitted from API requests. See 7327 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7328 // details. 7329 ForceSendFields []string `json:"-"` 7330 // NullFields is a list of field names (e.g. "Kind") to include in API requests 7331 // with the JSON null value. By default, fields with empty values are omitted 7332 // from API requests. See 7333 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7334 NullFields []string `json:"-"` 7335 } 7336 7337 func (s *Role) MarshalJSON() ([]byte, error) { 7338 type NoMethod Role 7339 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7340 } 7341 7342 // SecurityBulletin: SecurityBulletin are notifications of vulnerabilities of 7343 // Google products. 7344 type SecurityBulletin struct { 7345 // BulletinId: ID of the bulletin corresponding to the vulnerability. 7346 BulletinId string `json:"bulletinId,omitempty"` 7347 // SubmissionTime: Submission time of this Security Bulletin. 7348 SubmissionTime string `json:"submissionTime,omitempty"` 7349 // SuggestedUpgradeVersion: This represents a version that the cluster 7350 // receiving this notification should be upgraded to, based on its current 7351 // version. For example, 1.15.0 7352 SuggestedUpgradeVersion string `json:"suggestedUpgradeVersion,omitempty"` 7353 // ForceSendFields is a list of field names (e.g. "BulletinId") to 7354 // unconditionally include in API requests. By default, fields with empty or 7355 // default values are omitted from API requests. See 7356 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7357 // details. 7358 ForceSendFields []string `json:"-"` 7359 // NullFields is a list of field names (e.g. "BulletinId") to include in API 7360 // requests with the JSON null value. By default, fields with empty values are 7361 // omitted from API requests. See 7362 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7363 NullFields []string `json:"-"` 7364 } 7365 7366 func (s *SecurityBulletin) MarshalJSON() ([]byte, error) { 7367 type NoMethod SecurityBulletin 7368 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7369 } 7370 7371 // SecurityCenterSettings: Resource capturing the settings for Security Center. 7372 // Next ID: 12 7373 type SecurityCenterSettings struct { 7374 // LogSinkProject: The resource name of the project to send logs to. This 7375 // project must be part of the organization this resource resides in. The 7376 // format is `projects/{project_id}`. An empty value disables logging. This 7377 // value is only referenced by services that support log sink. Please refer to 7378 // the documentation for an updated list of compatible services. This may only 7379 // be specified for organization level onboarding. 7380 LogSinkProject string `json:"logSinkProject,omitempty"` 7381 // Name: The resource name of the SecurityCenterSettings. Format: 7382 // organizations/{organization}/securityCenterSettings Format: 7383 // folders/{folder}/securityCenterSettings Format: 7384 // projects/{project}/securityCenterSettings 7385 Name string `json:"name,omitempty"` 7386 // OnboardingTime: Output only. Timestamp of when the customer organization was 7387 // onboarded to SCC. 7388 OnboardingTime string `json:"onboardingTime,omitempty"` 7389 // OrgServiceAccount: Output only. The organization level service account to be 7390 // used for security center components. 7391 OrgServiceAccount string `json:"orgServiceAccount,omitempty"` 7392 7393 // ServerResponse contains the HTTP response code and headers from the server. 7394 googleapi.ServerResponse `json:"-"` 7395 // ForceSendFields is a list of field names (e.g. "LogSinkProject") to 7396 // unconditionally include in API requests. By default, fields with empty or 7397 // default values are omitted from API requests. See 7398 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7399 // details. 7400 ForceSendFields []string `json:"-"` 7401 // NullFields is a list of field names (e.g. "LogSinkProject") to include in 7402 // API requests with the JSON null value. By default, fields with empty values 7403 // are omitted from API requests. See 7404 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7405 NullFields []string `json:"-"` 7406 } 7407 7408 func (s *SecurityCenterSettings) MarshalJSON() ([]byte, error) { 7409 type NoMethod SecurityCenterSettings 7410 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7411 } 7412 7413 // SecurityHealthAnalyticsSettings: Resource capturing the settings for the 7414 // Security Health Analytics service. 7415 type SecurityHealthAnalyticsSettings struct { 7416 // Modules: The configurations including the state of enablement for the 7417 // service's different modules. The absence of a module in the map implies its 7418 // configuration is inherited from its parent's. 7419 Modules map[string]Config `json:"modules,omitempty"` 7420 // Name: The resource name of the SecurityHealthAnalyticsSettings. Formats: * 7421 // organizations/{organization}/securityHealthAnalyticsSettings * 7422 // folders/{folder}/securityHealthAnalyticsSettings * 7423 // projects/{project}/securityHealthAnalyticsSettings 7424 Name string `json:"name,omitempty"` 7425 // ServiceAccount: Output only. The service account used by Security Health 7426 // Analytics detectors. 7427 ServiceAccount string `json:"serviceAccount,omitempty"` 7428 // ServiceEnablementState: The state of enablement for the service at its level 7429 // of the resource hierarchy. A DISABLED state will override all module 7430 // enablement_states to DISABLED. 7431 // 7432 // Possible values: 7433 // "ENABLEMENT_STATE_UNSPECIFIED" - Default value. This value is unused. 7434 // "INHERITED" - State is inherited from the parent resource. 7435 // "ENABLED" - State is enabled. 7436 // "DISABLED" - State is disabled. 7437 ServiceEnablementState string `json:"serviceEnablementState,omitempty"` 7438 // UpdateTime: Output only. The time the settings were last updated. 7439 UpdateTime string `json:"updateTime,omitempty"` 7440 7441 // ServerResponse contains the HTTP response code and headers from the server. 7442 googleapi.ServerResponse `json:"-"` 7443 // ForceSendFields is a list of field names (e.g. "Modules") to unconditionally 7444 // include in API requests. By default, fields with empty or default values are 7445 // omitted from API requests. See 7446 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7447 // details. 7448 ForceSendFields []string `json:"-"` 7449 // NullFields is a list of field names (e.g. "Modules") to include in API 7450 // requests with the JSON null value. By default, fields with empty values are 7451 // omitted from API requests. See 7452 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7453 NullFields []string `json:"-"` 7454 } 7455 7456 func (s *SecurityHealthAnalyticsSettings) MarshalJSON() ([]byte, error) { 7457 type NoMethod SecurityHealthAnalyticsSettings 7458 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7459 } 7460 7461 // SecurityMarks: User specified security marks that are attached to the parent 7462 // Security Command Center resource. Security marks are scoped within a 7463 // Security Command Center organization -- they can be modified and viewed by 7464 // all users who have proper permissions on the organization. 7465 type SecurityMarks struct { 7466 // CanonicalName: The canonical name of the marks. Examples: 7467 // "organizations/{organization_id}/assets/{asset_id}/securityMarks" 7468 // "folders/{folder_id}/assets/{asset_id}/securityMarks" 7469 // "projects/{project_number}/assets/{asset_id}/securityMarks" 7470 // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/se 7471 // curityMarks" 7472 // "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" 7473 // 7474 // "projects/{project_number}/sources/{source_id}/findings/{finding_id}/security 7475 // Marks" 7476 CanonicalName string `json:"canonicalName,omitempty"` 7477 // Marks: Mutable user specified security marks belonging to the parent 7478 // resource. Constraints are as follows: * Keys and values are treated as case 7479 // insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys 7480 // must be letters, numbers, underscores, or dashes * Values have leading and 7481 // trailing whitespace trimmed, remaining characters must be between 1 - 4096 7482 // characters (inclusive) 7483 Marks map[string]string `json:"marks,omitempty"` 7484 // Name: The relative resource name of the SecurityMarks. See: 7485 // https://cloud.google.com/apis/design/resource_names#relative_resource_name 7486 // Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks" 7487 // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/se 7488 // curityMarks". 7489 Name string `json:"name,omitempty"` 7490 // ForceSendFields is a list of field names (e.g. "CanonicalName") to 7491 // unconditionally include in API requests. By default, fields with empty or 7492 // default values are omitted from API requests. See 7493 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7494 // details. 7495 ForceSendFields []string `json:"-"` 7496 // NullFields is a list of field names (e.g. "CanonicalName") to include in API 7497 // requests with the JSON null value. By default, fields with empty values are 7498 // omitted from API requests. See 7499 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7500 NullFields []string `json:"-"` 7501 } 7502 7503 func (s *SecurityMarks) MarshalJSON() ([]byte, error) { 7504 type NoMethod SecurityMarks 7505 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7506 } 7507 7508 // SecurityPolicy: Information about the Google Cloud Armor security policy 7509 // (https://cloud.google.com/armor/docs/security-policy-overview) relevant to 7510 // the finding. 7511 type SecurityPolicy struct { 7512 // Name: The name of the Google Cloud Armor security policy, for example, 7513 // "my-security-policy". 7514 Name string `json:"name,omitempty"` 7515 // Preview: Whether or not the associated rule or policy is in preview mode. 7516 Preview bool `json:"preview,omitempty"` 7517 // Type: The type of Google Cloud Armor security policy for example, 'backend 7518 // security policy', 'edge security policy', 'network edge security policy', or 7519 // 'always-on DDoS protection'. 7520 Type string `json:"type,omitempty"` 7521 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 7522 // include in API requests. By default, fields with empty or default values are 7523 // omitted from API requests. See 7524 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7525 // details. 7526 ForceSendFields []string `json:"-"` 7527 // NullFields is a list of field names (e.g. "Name") to include in API requests 7528 // with the JSON null value. By default, fields with empty values are omitted 7529 // from API requests. See 7530 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7531 NullFields []string `json:"-"` 7532 } 7533 7534 func (s *SecurityPolicy) MarshalJSON() ([]byte, error) { 7535 type NoMethod SecurityPolicy 7536 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7537 } 7538 7539 // SecurityPosture: Represents a posture that is deployed on Google Cloud by 7540 // the Security Command Center Posture Management service. A posture contains 7541 // one or more policy sets. A policy set is a group of policies that enforce a 7542 // set of security rules on Google Cloud. 7543 type SecurityPosture struct { 7544 // ChangedPolicy: The name of the updated policy, for example, 7545 // `projects/{project_id}/policies/{constraint_name}`. 7546 ChangedPolicy string `json:"changedPolicy,omitempty"` 7547 // Name: Name of the posture, for example, `CIS-Posture`. 7548 Name string `json:"name,omitempty"` 7549 // Policy: The ID of the updated policy, for example, `compute-policy-1`. 7550 Policy string `json:"policy,omitempty"` 7551 // PolicyDriftDetails: The details about a change in an updated policy that 7552 // violates the deployed posture. 7553 PolicyDriftDetails []*PolicyDriftDetails `json:"policyDriftDetails,omitempty"` 7554 // PolicySet: The name of the updated policyset, for example, `cis-policyset`. 7555 PolicySet string `json:"policySet,omitempty"` 7556 // PostureDeployment: The name of the posture deployment, for example, 7557 // `organizations/{org_id}/posturedeployments/{posture_deployment_id}`. 7558 PostureDeployment string `json:"postureDeployment,omitempty"` 7559 // PostureDeploymentResource: The project, folder, or organization on which the 7560 // posture is deployed, for example, `projects/{project_number}`. 7561 PostureDeploymentResource string `json:"postureDeploymentResource,omitempty"` 7562 // RevisionId: The version of the posture, for example, `c7cfa2a8`. 7563 RevisionId string `json:"revisionId,omitempty"` 7564 // ForceSendFields is a list of field names (e.g. "ChangedPolicy") to 7565 // unconditionally include in API requests. By default, fields with empty or 7566 // default values are omitted from API requests. See 7567 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7568 // details. 7569 ForceSendFields []string `json:"-"` 7570 // NullFields is a list of field names (e.g. "ChangedPolicy") to include in API 7571 // requests with the JSON null value. By default, fields with empty values are 7572 // omitted from API requests. See 7573 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7574 NullFields []string `json:"-"` 7575 } 7576 7577 func (s *SecurityPosture) MarshalJSON() ([]byte, error) { 7578 type NoMethod SecurityPosture 7579 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7580 } 7581 7582 // ServiceAccountDelegationInfo: Identity delegation history of an 7583 // authenticated service account. 7584 type ServiceAccountDelegationInfo struct { 7585 // PrincipalEmail: The email address of a Google account. 7586 PrincipalEmail string `json:"principalEmail,omitempty"` 7587 // PrincipalSubject: A string representing the principal_subject associated 7588 // with the identity. As compared to `principal_email`, supports principals 7589 // that aren't associated with email addresses, such as third party principals. 7590 // For most identities, the format will be 7591 // `principal://iam.googleapis.com/{identity pool name}/subjects/{subject}` 7592 // except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) 7593 // that are still in the legacy format `serviceAccount:{identity pool 7594 // name}[{subject}]` 7595 PrincipalSubject string `json:"principalSubject,omitempty"` 7596 // ForceSendFields is a list of field names (e.g. "PrincipalEmail") to 7597 // unconditionally include in API requests. By default, fields with empty or 7598 // default values are omitted from API requests. See 7599 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7600 // details. 7601 ForceSendFields []string `json:"-"` 7602 // NullFields is a list of field names (e.g. "PrincipalEmail") to include in 7603 // API requests with the JSON null value. By default, fields with empty values 7604 // are omitted from API requests. See 7605 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7606 NullFields []string `json:"-"` 7607 } 7608 7609 func (s *ServiceAccountDelegationInfo) MarshalJSON() ([]byte, error) { 7610 type NoMethod ServiceAccountDelegationInfo 7611 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7612 } 7613 7614 // Subject: Represents a Kubernetes subject. 7615 type Subject struct { 7616 // Kind: Authentication type for the subject. 7617 // 7618 // Possible values: 7619 // "AUTH_TYPE_UNSPECIFIED" - Authentication is not specified. 7620 // "USER" - User with valid certificate. 7621 // "SERVICEACCOUNT" - Users managed by Kubernetes API with credentials stored 7622 // as secrets. 7623 // "GROUP" - Collection of users. 7624 Kind string `json:"kind,omitempty"` 7625 // Name: Name for the subject. 7626 Name string `json:"name,omitempty"` 7627 // Ns: Namespace for the subject. 7628 Ns string `json:"ns,omitempty"` 7629 // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally 7630 // include in API requests. By default, fields with empty or default values are 7631 // omitted from API requests. See 7632 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7633 // details. 7634 ForceSendFields []string `json:"-"` 7635 // NullFields is a list of field names (e.g. "Kind") to include in API requests 7636 // with the JSON null value. By default, fields with empty values are omitted 7637 // from API requests. See 7638 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7639 NullFields []string `json:"-"` 7640 } 7641 7642 func (s *Subject) MarshalJSON() ([]byte, error) { 7643 type NoMethod Subject 7644 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7645 } 7646 7647 // Subscription: Resource capturing the state of an organization's 7648 // subscription. 7649 type Subscription struct { 7650 // Details: The details of the most recent active subscription. If there has 7651 // never been a subscription this will be empty. 7652 Details *Details `json:"details,omitempty"` 7653 // Name: The resource name of the subscription. Format: 7654 // organizations/{organization}/subscription 7655 Name string `json:"name,omitempty"` 7656 // Tier: The tier of SCC features this organization currently has access to. 7657 // 7658 // Possible values: 7659 // "TIER_UNSPECIFIED" - Default value. This value is unused. 7660 // "STANDARD" - The standard tier. 7661 // "PREMIUM" - The premium tier. 7662 // "ENTERPRISE" - The enterprise tier. 7663 // "ENTERPRISE_MC" - The enterprise MC tier. 7664 Tier string `json:"tier,omitempty"` 7665 7666 // ServerResponse contains the HTTP response code and headers from the server. 7667 googleapi.ServerResponse `json:"-"` 7668 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally 7669 // include in API requests. By default, fields with empty or default values are 7670 // omitted from API requests. See 7671 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7672 // details. 7673 ForceSendFields []string `json:"-"` 7674 // NullFields is a list of field names (e.g. "Details") to include in API 7675 // requests with the JSON null value. By default, fields with empty values are 7676 // omitted from API requests. See 7677 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7678 NullFields []string `json:"-"` 7679 } 7680 7681 func (s *Subscription) MarshalJSON() ([]byte, error) { 7682 type NoMethod Subscription 7683 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7684 } 7685 7686 // TicketInfo: Information about the ticket, if any, that is being used to 7687 // track the resolution of the issue that is identified by this finding. 7688 type TicketInfo struct { 7689 // Assignee: The assignee of the ticket in the ticket system. 7690 Assignee string `json:"assignee,omitempty"` 7691 // Description: The description of the ticket in the ticket system. 7692 Description string `json:"description,omitempty"` 7693 // Id: The identifier of the ticket in the ticket system. 7694 Id string `json:"id,omitempty"` 7695 // Status: The latest status of the ticket, as reported by the ticket system. 7696 Status string `json:"status,omitempty"` 7697 // UpdateTime: The time when the ticket was last updated, as reported by the 7698 // ticket system. 7699 UpdateTime string `json:"updateTime,omitempty"` 7700 // Uri: The link to the ticket in the ticket system. 7701 Uri string `json:"uri,omitempty"` 7702 // ForceSendFields is a list of field names (e.g. "Assignee") to 7703 // unconditionally include in API requests. By default, fields with empty or 7704 // default values are omitted from API requests. See 7705 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7706 // details. 7707 ForceSendFields []string `json:"-"` 7708 // NullFields is a list of field names (e.g. "Assignee") to include in API 7709 // requests with the JSON null value. By default, fields with empty values are 7710 // omitted from API requests. See 7711 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7712 NullFields []string `json:"-"` 7713 } 7714 7715 func (s *TicketInfo) MarshalJSON() ([]byte, error) { 7716 type NoMethod TicketInfo 7717 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7718 } 7719 7720 // VirtualMachineThreatDetectionSettings: Resource capturing the settings for 7721 // the Virtual Machine Threat Detection service. 7722 type VirtualMachineThreatDetectionSettings struct { 7723 // Modules: The configurations including the state of enablement for the 7724 // service's different modules. The absence of a module in the map implies its 7725 // configuration is inherited from its parent's. 7726 Modules map[string]Config `json:"modules,omitempty"` 7727 // Name: The resource name of the VirtualMachineThreatDetectionSettings. 7728 // Formats: * 7729 // organizations/{organization}/virtualMachineThreatDetectionSettings * 7730 // folders/{folder}/virtualMachineThreatDetectionSettings * 7731 // projects/{project}/virtualMachineThreatDetectionSettings 7732 Name string `json:"name,omitempty"` 7733 // ServiceAccount: Output only. The service account used by Virtual Machine 7734 // Threat Detection detectors. 7735 ServiceAccount string `json:"serviceAccount,omitempty"` 7736 // ServiceEnablementState: The state of enablement for the service at its level 7737 // of the resource hierarchy. A DISABLED state will override all module 7738 // enablement_states to DISABLED. 7739 // 7740 // Possible values: 7741 // "ENABLEMENT_STATE_UNSPECIFIED" - Default value. This value is unused. 7742 // "INHERITED" - State is inherited from the parent resource. 7743 // "ENABLED" - State is enabled. 7744 // "DISABLED" - State is disabled. 7745 ServiceEnablementState string `json:"serviceEnablementState,omitempty"` 7746 // UpdateTime: Output only. The time the settings were last updated. 7747 UpdateTime string `json:"updateTime,omitempty"` 7748 7749 // ServerResponse contains the HTTP response code and headers from the server. 7750 googleapi.ServerResponse `json:"-"` 7751 // ForceSendFields is a list of field names (e.g. "Modules") to unconditionally 7752 // include in API requests. By default, fields with empty or default values are 7753 // omitted from API requests. See 7754 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7755 // details. 7756 ForceSendFields []string `json:"-"` 7757 // NullFields is a list of field names (e.g. "Modules") to include in API 7758 // requests with the JSON null value. By default, fields with empty values are 7759 // omitted from API requests. See 7760 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7761 NullFields []string `json:"-"` 7762 } 7763 7764 func (s *VirtualMachineThreatDetectionSettings) MarshalJSON() ([]byte, error) { 7765 type NoMethod VirtualMachineThreatDetectionSettings 7766 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7767 } 7768 7769 // Vulnerability: Refers to common vulnerability fields e.g. cve, cvss, cwe 7770 // etc. 7771 type Vulnerability struct { 7772 // Cve: CVE stands for Common Vulnerabilities and Exposures 7773 // (https://cve.mitre.org/about/) 7774 Cve *Cve `json:"cve,omitempty"` 7775 // FixedPackage: The fixed package is relevant to the finding. 7776 FixedPackage *Package `json:"fixedPackage,omitempty"` 7777 // OffendingPackage: The offending package is relevant to the finding. 7778 OffendingPackage *Package `json:"offendingPackage,omitempty"` 7779 // SecurityBulletin: The security bulletin is relevant to this finding. 7780 SecurityBulletin *SecurityBulletin `json:"securityBulletin,omitempty"` 7781 // ForceSendFields is a list of field names (e.g. "Cve") to unconditionally 7782 // include in API requests. By default, fields with empty or default values are 7783 // omitted from API requests. See 7784 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7785 // details. 7786 ForceSendFields []string `json:"-"` 7787 // NullFields is a list of field names (e.g. "Cve") to include in API requests 7788 // with the JSON null value. By default, fields with empty values are omitted 7789 // from API requests. See 7790 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7791 NullFields []string `json:"-"` 7792 } 7793 7794 func (s *Vulnerability) MarshalJSON() ([]byte, error) { 7795 type NoMethod Vulnerability 7796 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7797 } 7798 7799 // VulnerabilityCountBySeverity: Vulnerability count by severity. 7800 type VulnerabilityCountBySeverity struct { 7801 // SeverityToFindingCount: Key is the Severity enum. 7802 SeverityToFindingCount map[string]string `json:"severityToFindingCount,omitempty"` 7803 // ForceSendFields is a list of field names (e.g. "SeverityToFindingCount") to 7804 // unconditionally include in API requests. By default, fields with empty or 7805 // default values are omitted from API requests. See 7806 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7807 // details. 7808 ForceSendFields []string `json:"-"` 7809 // NullFields is a list of field names (e.g. "SeverityToFindingCount") to 7810 // include in API requests with the JSON null value. By default, fields with 7811 // empty values are omitted from API requests. See 7812 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7813 NullFields []string `json:"-"` 7814 } 7815 7816 func (s *VulnerabilityCountBySeverity) MarshalJSON() ([]byte, error) { 7817 type NoMethod VulnerabilityCountBySeverity 7818 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7819 } 7820 7821 // VulnerabilitySnapshot: Result containing the properties and count of a 7822 // VulnerabilitySnapshot request. 7823 type VulnerabilitySnapshot struct { 7824 // CloudProvider: The cloud provider for the vulnerability snapshot. 7825 // 7826 // Possible values: 7827 // "CLOUD_PROVIDER_UNSPECIFIED" - The cloud provider is unspecified. 7828 // "GOOGLE_CLOUD_PLATFORM" - The cloud provider is Google Cloud Platform. 7829 // "AMAZON_WEB_SERVICES" - The cloud provider is Amazon Web Services. 7830 // "MICROSOFT_AZURE" - The cloud provider is Microsoft Azure. 7831 CloudProvider string `json:"cloudProvider,omitempty"` 7832 // FindingCount: The vulnerability count by severity. 7833 FindingCount *VulnerabilityCountBySeverity `json:"findingCount,omitempty"` 7834 // Name: Identifier. The vulnerability snapshot name. Format: 7835 // //locations//vulnerabilitySnapshots/ 7836 Name string `json:"name,omitempty"` 7837 // SnapshotTime: The time that the snapshot was taken. 7838 SnapshotTime string `json:"snapshotTime,omitempty"` 7839 // ForceSendFields is a list of field names (e.g. "CloudProvider") to 7840 // unconditionally include in API requests. By default, fields with empty or 7841 // default values are omitted from API requests. See 7842 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7843 // details. 7844 ForceSendFields []string `json:"-"` 7845 // NullFields is a list of field names (e.g. "CloudProvider") to include in API 7846 // requests with the JSON null value. By default, fields with empty values are 7847 // omitted from API requests. See 7848 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7849 NullFields []string `json:"-"` 7850 } 7851 7852 func (s *VulnerabilitySnapshot) MarshalJSON() ([]byte, error) { 7853 type NoMethod VulnerabilitySnapshot 7854 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7855 } 7856 7857 // WebSecurityScannerSettings: Resource capturing the settings for the Web 7858 // Security Scanner service. 7859 type WebSecurityScannerSettings struct { 7860 // Modules: The configurations including the state of enablement for the 7861 // service's different modules. The absence of a module in the map implies its 7862 // configuration is inherited from its parent's. 7863 Modules map[string]Config `json:"modules,omitempty"` 7864 // Name: The resource name of the WebSecurityScannerSettings. Formats: * 7865 // organizations/{organization}/webSecurityScannerSettings * 7866 // folders/{folder}/webSecurityScannerSettings * 7867 // projects/{project}/webSecurityScannerSettings 7868 Name string `json:"name,omitempty"` 7869 // ServiceEnablementState: The state of enablement for the service at its level 7870 // of the resource hierarchy. A DISABLED state will override all module 7871 // enablement_states to DISABLED. 7872 // 7873 // Possible values: 7874 // "ENABLEMENT_STATE_UNSPECIFIED" - Default value. This value is unused. 7875 // "INHERITED" - State is inherited from the parent resource. 7876 // "ENABLED" - State is enabled. 7877 // "DISABLED" - State is disabled. 7878 ServiceEnablementState string `json:"serviceEnablementState,omitempty"` 7879 // UpdateTime: Output only. The time the settings were last updated. 7880 UpdateTime string `json:"updateTime,omitempty"` 7881 7882 // ServerResponse contains the HTTP response code and headers from the server. 7883 googleapi.ServerResponse `json:"-"` 7884 // ForceSendFields is a list of field names (e.g. "Modules") to unconditionally 7885 // include in API requests. By default, fields with empty or default values are 7886 // omitted from API requests. See 7887 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7888 // details. 7889 ForceSendFields []string `json:"-"` 7890 // NullFields is a list of field names (e.g. "Modules") to include in API 7891 // requests with the JSON null value. By default, fields with empty values are 7892 // omitted from API requests. See 7893 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7894 NullFields []string `json:"-"` 7895 } 7896 7897 func (s *WebSecurityScannerSettings) MarshalJSON() ([]byte, error) { 7898 type NoMethod WebSecurityScannerSettings 7899 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7900 } 7901 7902 // YaraRuleSignature: A signature corresponding to a YARA rule. 7903 type YaraRuleSignature struct { 7904 // YaraRule: The name of the YARA rule. 7905 YaraRule string `json:"yaraRule,omitempty"` 7906 // ForceSendFields is a list of field names (e.g. "YaraRule") to 7907 // unconditionally include in API requests. By default, fields with empty or 7908 // default values are omitted from API requests. See 7909 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7910 // details. 7911 ForceSendFields []string `json:"-"` 7912 // NullFields is a list of field names (e.g. "YaraRule") to include in API 7913 // requests with the JSON null value. By default, fields with empty values are 7914 // omitted from API requests. See 7915 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7916 NullFields []string `json:"-"` 7917 } 7918 7919 func (s *YaraRuleSignature) MarshalJSON() ([]byte, error) { 7920 type NoMethod YaraRuleSignature 7921 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7922 } 7923 7924 type FoldersGetContainerThreatDetectionSettingsCall struct { 7925 s *Service 7926 name string 7927 urlParams_ gensupport.URLParams 7928 ifNoneMatch_ string 7929 ctx_ context.Context 7930 header_ http.Header 7931 } 7932 7933 // GetContainerThreatDetectionSettings: Get the 7934 // ContainerThreatDetectionSettings resource. In the returned settings 7935 // response, a missing field only indicates that it was not explicitly set, so 7936 // no assumption should be made about these fields. In other words, 7937 // GetContainerThreatDetectionSettings does not calculate the effective service 7938 // settings for the resource, which accounts for inherited settings and 7939 // defaults. Instead, use CalculateContainerThreatDetectionSettings for this 7940 // purpose. 7941 // 7942 // - name: The name of the ContainerThreatDetectionSettings to retrieve. 7943 // Formats: * organizations/{organization}/containerThreatDetectionSettings * 7944 // folders/{folder}/containerThreatDetectionSettings * 7945 // projects/{project}/containerThreatDetectionSettings * 7946 // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatD 7947 // etectionSettings. 7948 func (r *FoldersService) GetContainerThreatDetectionSettings(name string) *FoldersGetContainerThreatDetectionSettingsCall { 7949 c := &FoldersGetContainerThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7950 c.name = name 7951 return c 7952 } 7953 7954 // Fields allows partial responses to be retrieved. See 7955 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7956 // details. 7957 func (c *FoldersGetContainerThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *FoldersGetContainerThreatDetectionSettingsCall { 7958 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7959 return c 7960 } 7961 7962 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7963 // object's ETag matches the given value. This is useful for getting updates 7964 // only after the object has changed since the last request. 7965 func (c *FoldersGetContainerThreatDetectionSettingsCall) IfNoneMatch(entityTag string) *FoldersGetContainerThreatDetectionSettingsCall { 7966 c.ifNoneMatch_ = entityTag 7967 return c 7968 } 7969 7970 // Context sets the context to be used in this call's Do method. 7971 func (c *FoldersGetContainerThreatDetectionSettingsCall) Context(ctx context.Context) *FoldersGetContainerThreatDetectionSettingsCall { 7972 c.ctx_ = ctx 7973 return c 7974 } 7975 7976 // Header returns a http.Header that can be modified by the caller to add 7977 // headers to the request. 7978 func (c *FoldersGetContainerThreatDetectionSettingsCall) Header() http.Header { 7979 if c.header_ == nil { 7980 c.header_ = make(http.Header) 7981 } 7982 return c.header_ 7983 } 7984 7985 func (c *FoldersGetContainerThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 7986 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7987 if c.ifNoneMatch_ != "" { 7988 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7989 } 7990 var body io.Reader = nil 7991 c.urlParams_.Set("alt", alt) 7992 c.urlParams_.Set("prettyPrint", "false") 7993 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 7994 urls += "?" + c.urlParams_.Encode() 7995 req, err := http.NewRequest("GET", urls, body) 7996 if err != nil { 7997 return nil, err 7998 } 7999 req.Header = reqHeaders 8000 googleapi.Expand(req.URL, map[string]string{ 8001 "name": c.name, 8002 }) 8003 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8004 } 8005 8006 // Do executes the "securitycenter.folders.getContainerThreatDetectionSettings" call. 8007 // Any non-2xx status code is an error. Response headers are in either 8008 // *ContainerThreatDetectionSettings.ServerResponse.Header or (if a response 8009 // was returned at all) in error.(*googleapi.Error).Header. Use 8010 // googleapi.IsNotModified to check whether the returned error was because 8011 // http.StatusNotModified was returned. 8012 func (c *FoldersGetContainerThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*ContainerThreatDetectionSettings, error) { 8013 gensupport.SetOptions(c.urlParams_, opts...) 8014 res, err := c.doRequest("json") 8015 if res != nil && res.StatusCode == http.StatusNotModified { 8016 if res.Body != nil { 8017 res.Body.Close() 8018 } 8019 return nil, gensupport.WrapError(&googleapi.Error{ 8020 Code: res.StatusCode, 8021 Header: res.Header, 8022 }) 8023 } 8024 if err != nil { 8025 return nil, err 8026 } 8027 defer googleapi.CloseBody(res) 8028 if err := googleapi.CheckResponse(res); err != nil { 8029 return nil, gensupport.WrapError(err) 8030 } 8031 ret := &ContainerThreatDetectionSettings{ 8032 ServerResponse: googleapi.ServerResponse{ 8033 Header: res.Header, 8034 HTTPStatusCode: res.StatusCode, 8035 }, 8036 } 8037 target := &ret 8038 if err := gensupport.DecodeResponse(target, res); err != nil { 8039 return nil, err 8040 } 8041 return ret, nil 8042 } 8043 8044 type FoldersGetEventThreatDetectionSettingsCall struct { 8045 s *Service 8046 name string 8047 urlParams_ gensupport.URLParams 8048 ifNoneMatch_ string 8049 ctx_ context.Context 8050 header_ http.Header 8051 } 8052 8053 // GetEventThreatDetectionSettings: Get the EventThreatDetectionSettings 8054 // resource. In the returned settings response, a missing field only indicates 8055 // that it was not explicitly set, so no assumption should be made about these 8056 // fields. In other words, GetEventThreatDetectionSettings does not calculate 8057 // the effective service settings for the resource, which accounts for 8058 // inherited settings and defaults. Instead, use 8059 // CalculateEventThreatDetectionSettings for this purpose. 8060 // 8061 // - name: The name of the EventThreatDetectionSettings to retrieve. Formats: * 8062 // organizations/{organization}/eventThreatDetectionSettings * 8063 // folders/{folder}/eventThreatDetectionSettings * 8064 // projects/{project}/eventThreatDetectionSettings. 8065 func (r *FoldersService) GetEventThreatDetectionSettings(name string) *FoldersGetEventThreatDetectionSettingsCall { 8066 c := &FoldersGetEventThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8067 c.name = name 8068 return c 8069 } 8070 8071 // Fields allows partial responses to be retrieved. See 8072 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8073 // details. 8074 func (c *FoldersGetEventThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *FoldersGetEventThreatDetectionSettingsCall { 8075 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8076 return c 8077 } 8078 8079 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8080 // object's ETag matches the given value. This is useful for getting updates 8081 // only after the object has changed since the last request. 8082 func (c *FoldersGetEventThreatDetectionSettingsCall) IfNoneMatch(entityTag string) *FoldersGetEventThreatDetectionSettingsCall { 8083 c.ifNoneMatch_ = entityTag 8084 return c 8085 } 8086 8087 // Context sets the context to be used in this call's Do method. 8088 func (c *FoldersGetEventThreatDetectionSettingsCall) Context(ctx context.Context) *FoldersGetEventThreatDetectionSettingsCall { 8089 c.ctx_ = ctx 8090 return c 8091 } 8092 8093 // Header returns a http.Header that can be modified by the caller to add 8094 // headers to the request. 8095 func (c *FoldersGetEventThreatDetectionSettingsCall) Header() http.Header { 8096 if c.header_ == nil { 8097 c.header_ = make(http.Header) 8098 } 8099 return c.header_ 8100 } 8101 8102 func (c *FoldersGetEventThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 8103 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8104 if c.ifNoneMatch_ != "" { 8105 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8106 } 8107 var body io.Reader = nil 8108 c.urlParams_.Set("alt", alt) 8109 c.urlParams_.Set("prettyPrint", "false") 8110 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 8111 urls += "?" + c.urlParams_.Encode() 8112 req, err := http.NewRequest("GET", urls, body) 8113 if err != nil { 8114 return nil, err 8115 } 8116 req.Header = reqHeaders 8117 googleapi.Expand(req.URL, map[string]string{ 8118 "name": c.name, 8119 }) 8120 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8121 } 8122 8123 // Do executes the "securitycenter.folders.getEventThreatDetectionSettings" call. 8124 // Any non-2xx status code is an error. Response headers are in either 8125 // *EventThreatDetectionSettings.ServerResponse.Header or (if a response was 8126 // returned at all) in error.(*googleapi.Error).Header. Use 8127 // googleapi.IsNotModified to check whether the returned error was because 8128 // http.StatusNotModified was returned. 8129 func (c *FoldersGetEventThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionSettings, error) { 8130 gensupport.SetOptions(c.urlParams_, opts...) 8131 res, err := c.doRequest("json") 8132 if res != nil && res.StatusCode == http.StatusNotModified { 8133 if res.Body != nil { 8134 res.Body.Close() 8135 } 8136 return nil, gensupport.WrapError(&googleapi.Error{ 8137 Code: res.StatusCode, 8138 Header: res.Header, 8139 }) 8140 } 8141 if err != nil { 8142 return nil, err 8143 } 8144 defer googleapi.CloseBody(res) 8145 if err := googleapi.CheckResponse(res); err != nil { 8146 return nil, gensupport.WrapError(err) 8147 } 8148 ret := &EventThreatDetectionSettings{ 8149 ServerResponse: googleapi.ServerResponse{ 8150 Header: res.Header, 8151 HTTPStatusCode: res.StatusCode, 8152 }, 8153 } 8154 target := &ret 8155 if err := gensupport.DecodeResponse(target, res); err != nil { 8156 return nil, err 8157 } 8158 return ret, nil 8159 } 8160 8161 type FoldersGetRapidVulnerabilityDetectionSettingsCall struct { 8162 s *Service 8163 name string 8164 urlParams_ gensupport.URLParams 8165 ifNoneMatch_ string 8166 ctx_ context.Context 8167 header_ http.Header 8168 } 8169 8170 // GetRapidVulnerabilityDetectionSettings: Get the 8171 // RapidVulnerabilityDetectionSettings resource. In the returned settings 8172 // response, a missing field only indicates that it was not explicitly set, so 8173 // no assumption should be made about these fields. In other words, 8174 // GetRapidVulnerabilityDetectionSettings does not calculate the effective 8175 // service settings for the resource, which accounts for inherited settings and 8176 // defaults. Instead, use CalculateRapidVulnerabilityDetectionSettings for this 8177 // purpose. 8178 // 8179 // - name: The name of the RapidVulnerabilityDetectionSettings to retrieve. 8180 // Formats: * 8181 // organizations/{organization}/rapidVulnerabilityDetectionSettings * 8182 // folders/{folder}/rapidVulnerabilityDetectionSettings * 8183 // projects/{project}/rapidVulnerabilityDetectionSettings. 8184 func (r *FoldersService) GetRapidVulnerabilityDetectionSettings(name string) *FoldersGetRapidVulnerabilityDetectionSettingsCall { 8185 c := &FoldersGetRapidVulnerabilityDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8186 c.name = name 8187 return c 8188 } 8189 8190 // Fields allows partial responses to be retrieved. See 8191 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8192 // details. 8193 func (c *FoldersGetRapidVulnerabilityDetectionSettingsCall) Fields(s ...googleapi.Field) *FoldersGetRapidVulnerabilityDetectionSettingsCall { 8194 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8195 return c 8196 } 8197 8198 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8199 // object's ETag matches the given value. This is useful for getting updates 8200 // only after the object has changed since the last request. 8201 func (c *FoldersGetRapidVulnerabilityDetectionSettingsCall) IfNoneMatch(entityTag string) *FoldersGetRapidVulnerabilityDetectionSettingsCall { 8202 c.ifNoneMatch_ = entityTag 8203 return c 8204 } 8205 8206 // Context sets the context to be used in this call's Do method. 8207 func (c *FoldersGetRapidVulnerabilityDetectionSettingsCall) Context(ctx context.Context) *FoldersGetRapidVulnerabilityDetectionSettingsCall { 8208 c.ctx_ = ctx 8209 return c 8210 } 8211 8212 // Header returns a http.Header that can be modified by the caller to add 8213 // headers to the request. 8214 func (c *FoldersGetRapidVulnerabilityDetectionSettingsCall) Header() http.Header { 8215 if c.header_ == nil { 8216 c.header_ = make(http.Header) 8217 } 8218 return c.header_ 8219 } 8220 8221 func (c *FoldersGetRapidVulnerabilityDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 8222 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8223 if c.ifNoneMatch_ != "" { 8224 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8225 } 8226 var body io.Reader = nil 8227 c.urlParams_.Set("alt", alt) 8228 c.urlParams_.Set("prettyPrint", "false") 8229 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 8230 urls += "?" + c.urlParams_.Encode() 8231 req, err := http.NewRequest("GET", urls, body) 8232 if err != nil { 8233 return nil, err 8234 } 8235 req.Header = reqHeaders 8236 googleapi.Expand(req.URL, map[string]string{ 8237 "name": c.name, 8238 }) 8239 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8240 } 8241 8242 // Do executes the "securitycenter.folders.getRapidVulnerabilityDetectionSettings" call. 8243 // Any non-2xx status code is an error. Response headers are in either 8244 // *RapidVulnerabilityDetectionSettings.ServerResponse.Header or (if a response 8245 // was returned at all) in error.(*googleapi.Error).Header. Use 8246 // googleapi.IsNotModified to check whether the returned error was because 8247 // http.StatusNotModified was returned. 8248 func (c *FoldersGetRapidVulnerabilityDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { 8249 gensupport.SetOptions(c.urlParams_, opts...) 8250 res, err := c.doRequest("json") 8251 if res != nil && res.StatusCode == http.StatusNotModified { 8252 if res.Body != nil { 8253 res.Body.Close() 8254 } 8255 return nil, gensupport.WrapError(&googleapi.Error{ 8256 Code: res.StatusCode, 8257 Header: res.Header, 8258 }) 8259 } 8260 if err != nil { 8261 return nil, err 8262 } 8263 defer googleapi.CloseBody(res) 8264 if err := googleapi.CheckResponse(res); err != nil { 8265 return nil, gensupport.WrapError(err) 8266 } 8267 ret := &RapidVulnerabilityDetectionSettings{ 8268 ServerResponse: googleapi.ServerResponse{ 8269 Header: res.Header, 8270 HTTPStatusCode: res.StatusCode, 8271 }, 8272 } 8273 target := &ret 8274 if err := gensupport.DecodeResponse(target, res); err != nil { 8275 return nil, err 8276 } 8277 return ret, nil 8278 } 8279 8280 type FoldersGetSecurityCenterSettingsCall struct { 8281 s *Service 8282 name string 8283 urlParams_ gensupport.URLParams 8284 ifNoneMatch_ string 8285 ctx_ context.Context 8286 header_ http.Header 8287 } 8288 8289 // GetSecurityCenterSettings: Get the SecurityCenterSettings resource. 8290 // 8291 // - name: The name of the SecurityCenterSettings to retrieve. Format: 8292 // organizations/{organization}/securityCenterSettings Format: 8293 // folders/{folder}/securityCenterSettings Format: 8294 // projects/{project}/securityCenterSettings. 8295 func (r *FoldersService) GetSecurityCenterSettings(name string) *FoldersGetSecurityCenterSettingsCall { 8296 c := &FoldersGetSecurityCenterSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8297 c.name = name 8298 return c 8299 } 8300 8301 // Fields allows partial responses to be retrieved. See 8302 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8303 // details. 8304 func (c *FoldersGetSecurityCenterSettingsCall) Fields(s ...googleapi.Field) *FoldersGetSecurityCenterSettingsCall { 8305 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8306 return c 8307 } 8308 8309 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8310 // object's ETag matches the given value. This is useful for getting updates 8311 // only after the object has changed since the last request. 8312 func (c *FoldersGetSecurityCenterSettingsCall) IfNoneMatch(entityTag string) *FoldersGetSecurityCenterSettingsCall { 8313 c.ifNoneMatch_ = entityTag 8314 return c 8315 } 8316 8317 // Context sets the context to be used in this call's Do method. 8318 func (c *FoldersGetSecurityCenterSettingsCall) Context(ctx context.Context) *FoldersGetSecurityCenterSettingsCall { 8319 c.ctx_ = ctx 8320 return c 8321 } 8322 8323 // Header returns a http.Header that can be modified by the caller to add 8324 // headers to the request. 8325 func (c *FoldersGetSecurityCenterSettingsCall) Header() http.Header { 8326 if c.header_ == nil { 8327 c.header_ = make(http.Header) 8328 } 8329 return c.header_ 8330 } 8331 8332 func (c *FoldersGetSecurityCenterSettingsCall) doRequest(alt string) (*http.Response, error) { 8333 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8334 if c.ifNoneMatch_ != "" { 8335 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8336 } 8337 var body io.Reader = nil 8338 c.urlParams_.Set("alt", alt) 8339 c.urlParams_.Set("prettyPrint", "false") 8340 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 8341 urls += "?" + c.urlParams_.Encode() 8342 req, err := http.NewRequest("GET", urls, body) 8343 if err != nil { 8344 return nil, err 8345 } 8346 req.Header = reqHeaders 8347 googleapi.Expand(req.URL, map[string]string{ 8348 "name": c.name, 8349 }) 8350 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8351 } 8352 8353 // Do executes the "securitycenter.folders.getSecurityCenterSettings" call. 8354 // Any non-2xx status code is an error. Response headers are in either 8355 // *SecurityCenterSettings.ServerResponse.Header or (if a response was returned 8356 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8357 // check whether the returned error was because http.StatusNotModified was 8358 // returned. 8359 func (c *FoldersGetSecurityCenterSettingsCall) Do(opts ...googleapi.CallOption) (*SecurityCenterSettings, error) { 8360 gensupport.SetOptions(c.urlParams_, opts...) 8361 res, err := c.doRequest("json") 8362 if res != nil && res.StatusCode == http.StatusNotModified { 8363 if res.Body != nil { 8364 res.Body.Close() 8365 } 8366 return nil, gensupport.WrapError(&googleapi.Error{ 8367 Code: res.StatusCode, 8368 Header: res.Header, 8369 }) 8370 } 8371 if err != nil { 8372 return nil, err 8373 } 8374 defer googleapi.CloseBody(res) 8375 if err := googleapi.CheckResponse(res); err != nil { 8376 return nil, gensupport.WrapError(err) 8377 } 8378 ret := &SecurityCenterSettings{ 8379 ServerResponse: googleapi.ServerResponse{ 8380 Header: res.Header, 8381 HTTPStatusCode: res.StatusCode, 8382 }, 8383 } 8384 target := &ret 8385 if err := gensupport.DecodeResponse(target, res); err != nil { 8386 return nil, err 8387 } 8388 return ret, nil 8389 } 8390 8391 type FoldersGetSecurityHealthAnalyticsSettingsCall struct { 8392 s *Service 8393 name string 8394 urlParams_ gensupport.URLParams 8395 ifNoneMatch_ string 8396 ctx_ context.Context 8397 header_ http.Header 8398 } 8399 8400 // GetSecurityHealthAnalyticsSettings: Get the SecurityHealthAnalyticsSettings 8401 // resource. In the returned settings response, a missing field only indicates 8402 // that it was not explicitly set, so no assumption should be made about these 8403 // fields. In other words, GetSecurityHealthAnalyticsSettings does not 8404 // calculate the effective service settings for the resource, which accounts 8405 // for inherited settings and defaults. Instead, use 8406 // CalculateSecurityHealthAnalyticsSettings for this purpose. 8407 // 8408 // - name: The name of the SecurityHealthAnalyticsSettings to retrieve. 8409 // Formats: * organizations/{organization}/securityHealthAnalyticsSettings * 8410 // folders/{folder}/securityHealthAnalyticsSettings * 8411 // projects/{project}/securityHealthAnalyticsSettings. 8412 func (r *FoldersService) GetSecurityHealthAnalyticsSettings(name string) *FoldersGetSecurityHealthAnalyticsSettingsCall { 8413 c := &FoldersGetSecurityHealthAnalyticsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8414 c.name = name 8415 return c 8416 } 8417 8418 // Fields allows partial responses to be retrieved. See 8419 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8420 // details. 8421 func (c *FoldersGetSecurityHealthAnalyticsSettingsCall) Fields(s ...googleapi.Field) *FoldersGetSecurityHealthAnalyticsSettingsCall { 8422 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8423 return c 8424 } 8425 8426 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8427 // object's ETag matches the given value. This is useful for getting updates 8428 // only after the object has changed since the last request. 8429 func (c *FoldersGetSecurityHealthAnalyticsSettingsCall) IfNoneMatch(entityTag string) *FoldersGetSecurityHealthAnalyticsSettingsCall { 8430 c.ifNoneMatch_ = entityTag 8431 return c 8432 } 8433 8434 // Context sets the context to be used in this call's Do method. 8435 func (c *FoldersGetSecurityHealthAnalyticsSettingsCall) Context(ctx context.Context) *FoldersGetSecurityHealthAnalyticsSettingsCall { 8436 c.ctx_ = ctx 8437 return c 8438 } 8439 8440 // Header returns a http.Header that can be modified by the caller to add 8441 // headers to the request. 8442 func (c *FoldersGetSecurityHealthAnalyticsSettingsCall) Header() http.Header { 8443 if c.header_ == nil { 8444 c.header_ = make(http.Header) 8445 } 8446 return c.header_ 8447 } 8448 8449 func (c *FoldersGetSecurityHealthAnalyticsSettingsCall) doRequest(alt string) (*http.Response, error) { 8450 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8451 if c.ifNoneMatch_ != "" { 8452 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8453 } 8454 var body io.Reader = nil 8455 c.urlParams_.Set("alt", alt) 8456 c.urlParams_.Set("prettyPrint", "false") 8457 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 8458 urls += "?" + c.urlParams_.Encode() 8459 req, err := http.NewRequest("GET", urls, body) 8460 if err != nil { 8461 return nil, err 8462 } 8463 req.Header = reqHeaders 8464 googleapi.Expand(req.URL, map[string]string{ 8465 "name": c.name, 8466 }) 8467 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8468 } 8469 8470 // Do executes the "securitycenter.folders.getSecurityHealthAnalyticsSettings" call. 8471 // Any non-2xx status code is an error. Response headers are in either 8472 // *SecurityHealthAnalyticsSettings.ServerResponse.Header or (if a response was 8473 // returned at all) in error.(*googleapi.Error).Header. Use 8474 // googleapi.IsNotModified to check whether the returned error was because 8475 // http.StatusNotModified was returned. 8476 func (c *FoldersGetSecurityHealthAnalyticsSettingsCall) Do(opts ...googleapi.CallOption) (*SecurityHealthAnalyticsSettings, error) { 8477 gensupport.SetOptions(c.urlParams_, opts...) 8478 res, err := c.doRequest("json") 8479 if res != nil && res.StatusCode == http.StatusNotModified { 8480 if res.Body != nil { 8481 res.Body.Close() 8482 } 8483 return nil, gensupport.WrapError(&googleapi.Error{ 8484 Code: res.StatusCode, 8485 Header: res.Header, 8486 }) 8487 } 8488 if err != nil { 8489 return nil, err 8490 } 8491 defer googleapi.CloseBody(res) 8492 if err := googleapi.CheckResponse(res); err != nil { 8493 return nil, gensupport.WrapError(err) 8494 } 8495 ret := &SecurityHealthAnalyticsSettings{ 8496 ServerResponse: googleapi.ServerResponse{ 8497 Header: res.Header, 8498 HTTPStatusCode: res.StatusCode, 8499 }, 8500 } 8501 target := &ret 8502 if err := gensupport.DecodeResponse(target, res); err != nil { 8503 return nil, err 8504 } 8505 return ret, nil 8506 } 8507 8508 type FoldersGetVirtualMachineThreatDetectionSettingsCall struct { 8509 s *Service 8510 name string 8511 urlParams_ gensupport.URLParams 8512 ifNoneMatch_ string 8513 ctx_ context.Context 8514 header_ http.Header 8515 } 8516 8517 // GetVirtualMachineThreatDetectionSettings: Get the 8518 // VirtualMachineThreatDetectionSettings resource. In the returned settings 8519 // response, a missing field only indicates that it was not explicitly set, so 8520 // no assumption should be made about these fields. In other words, 8521 // GetVirtualMachineThreatDetectionSettings does not calculate the effective 8522 // service settings for the resource, which accounts for inherited settings and 8523 // defaults. Instead, use CalculateVirtualMachineThreatDetectionSettings for 8524 // this purpose. 8525 // 8526 // - name: The name of the VirtualMachineThreatDetectionSettings to retrieve. 8527 // Formats: * 8528 // organizations/{organization}/virtualMachineThreatDetectionSettings * 8529 // folders/{folder}/virtualMachineThreatDetectionSettings * 8530 // projects/{project}/virtualMachineThreatDetectionSettings. 8531 func (r *FoldersService) GetVirtualMachineThreatDetectionSettings(name string) *FoldersGetVirtualMachineThreatDetectionSettingsCall { 8532 c := &FoldersGetVirtualMachineThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8533 c.name = name 8534 return c 8535 } 8536 8537 // Fields allows partial responses to be retrieved. See 8538 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8539 // details. 8540 func (c *FoldersGetVirtualMachineThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *FoldersGetVirtualMachineThreatDetectionSettingsCall { 8541 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8542 return c 8543 } 8544 8545 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8546 // object's ETag matches the given value. This is useful for getting updates 8547 // only after the object has changed since the last request. 8548 func (c *FoldersGetVirtualMachineThreatDetectionSettingsCall) IfNoneMatch(entityTag string) *FoldersGetVirtualMachineThreatDetectionSettingsCall { 8549 c.ifNoneMatch_ = entityTag 8550 return c 8551 } 8552 8553 // Context sets the context to be used in this call's Do method. 8554 func (c *FoldersGetVirtualMachineThreatDetectionSettingsCall) Context(ctx context.Context) *FoldersGetVirtualMachineThreatDetectionSettingsCall { 8555 c.ctx_ = ctx 8556 return c 8557 } 8558 8559 // Header returns a http.Header that can be modified by the caller to add 8560 // headers to the request. 8561 func (c *FoldersGetVirtualMachineThreatDetectionSettingsCall) Header() http.Header { 8562 if c.header_ == nil { 8563 c.header_ = make(http.Header) 8564 } 8565 return c.header_ 8566 } 8567 8568 func (c *FoldersGetVirtualMachineThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 8569 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8570 if c.ifNoneMatch_ != "" { 8571 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8572 } 8573 var body io.Reader = nil 8574 c.urlParams_.Set("alt", alt) 8575 c.urlParams_.Set("prettyPrint", "false") 8576 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 8577 urls += "?" + c.urlParams_.Encode() 8578 req, err := http.NewRequest("GET", urls, body) 8579 if err != nil { 8580 return nil, err 8581 } 8582 req.Header = reqHeaders 8583 googleapi.Expand(req.URL, map[string]string{ 8584 "name": c.name, 8585 }) 8586 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8587 } 8588 8589 // Do executes the "securitycenter.folders.getVirtualMachineThreatDetectionSettings" call. 8590 // Any non-2xx status code is an error. Response headers are in either 8591 // *VirtualMachineThreatDetectionSettings.ServerResponse.Header or (if a 8592 // response was returned at all) in error.(*googleapi.Error).Header. Use 8593 // googleapi.IsNotModified to check whether the returned error was because 8594 // http.StatusNotModified was returned. 8595 func (c *FoldersGetVirtualMachineThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*VirtualMachineThreatDetectionSettings, error) { 8596 gensupport.SetOptions(c.urlParams_, opts...) 8597 res, err := c.doRequest("json") 8598 if res != nil && res.StatusCode == http.StatusNotModified { 8599 if res.Body != nil { 8600 res.Body.Close() 8601 } 8602 return nil, gensupport.WrapError(&googleapi.Error{ 8603 Code: res.StatusCode, 8604 Header: res.Header, 8605 }) 8606 } 8607 if err != nil { 8608 return nil, err 8609 } 8610 defer googleapi.CloseBody(res) 8611 if err := googleapi.CheckResponse(res); err != nil { 8612 return nil, gensupport.WrapError(err) 8613 } 8614 ret := &VirtualMachineThreatDetectionSettings{ 8615 ServerResponse: googleapi.ServerResponse{ 8616 Header: res.Header, 8617 HTTPStatusCode: res.StatusCode, 8618 }, 8619 } 8620 target := &ret 8621 if err := gensupport.DecodeResponse(target, res); err != nil { 8622 return nil, err 8623 } 8624 return ret, nil 8625 } 8626 8627 type FoldersGetWebSecurityScannerSettingsCall struct { 8628 s *Service 8629 name string 8630 urlParams_ gensupport.URLParams 8631 ifNoneMatch_ string 8632 ctx_ context.Context 8633 header_ http.Header 8634 } 8635 8636 // GetWebSecurityScannerSettings: Get the WebSecurityScannerSettings resource. 8637 // In the returned settings response, a missing field only indicates that it 8638 // was not explicitly set, so no assumption should be made about these fields. 8639 // In other words, GetWebSecurityScannerSettings does not calculate the 8640 // effective service settings for the resource, which accounts for inherited 8641 // settings and defaults. Instead, use CalculateWebSecurityScannerSettings for 8642 // this purpose. 8643 // 8644 // - name: The name of the WebSecurityScannerSettings to retrieve. Formats: * 8645 // organizations/{organization}/webSecurityScannerSettings * 8646 // folders/{folder}/webSecurityScannerSettings * 8647 // projects/{project}/webSecurityScannerSettings. 8648 func (r *FoldersService) GetWebSecurityScannerSettings(name string) *FoldersGetWebSecurityScannerSettingsCall { 8649 c := &FoldersGetWebSecurityScannerSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8650 c.name = name 8651 return c 8652 } 8653 8654 // Fields allows partial responses to be retrieved. See 8655 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8656 // details. 8657 func (c *FoldersGetWebSecurityScannerSettingsCall) Fields(s ...googleapi.Field) *FoldersGetWebSecurityScannerSettingsCall { 8658 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8659 return c 8660 } 8661 8662 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8663 // object's ETag matches the given value. This is useful for getting updates 8664 // only after the object has changed since the last request. 8665 func (c *FoldersGetWebSecurityScannerSettingsCall) IfNoneMatch(entityTag string) *FoldersGetWebSecurityScannerSettingsCall { 8666 c.ifNoneMatch_ = entityTag 8667 return c 8668 } 8669 8670 // Context sets the context to be used in this call's Do method. 8671 func (c *FoldersGetWebSecurityScannerSettingsCall) Context(ctx context.Context) *FoldersGetWebSecurityScannerSettingsCall { 8672 c.ctx_ = ctx 8673 return c 8674 } 8675 8676 // Header returns a http.Header that can be modified by the caller to add 8677 // headers to the request. 8678 func (c *FoldersGetWebSecurityScannerSettingsCall) Header() http.Header { 8679 if c.header_ == nil { 8680 c.header_ = make(http.Header) 8681 } 8682 return c.header_ 8683 } 8684 8685 func (c *FoldersGetWebSecurityScannerSettingsCall) doRequest(alt string) (*http.Response, error) { 8686 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8687 if c.ifNoneMatch_ != "" { 8688 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8689 } 8690 var body io.Reader = nil 8691 c.urlParams_.Set("alt", alt) 8692 c.urlParams_.Set("prettyPrint", "false") 8693 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 8694 urls += "?" + c.urlParams_.Encode() 8695 req, err := http.NewRequest("GET", urls, body) 8696 if err != nil { 8697 return nil, err 8698 } 8699 req.Header = reqHeaders 8700 googleapi.Expand(req.URL, map[string]string{ 8701 "name": c.name, 8702 }) 8703 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8704 } 8705 8706 // Do executes the "securitycenter.folders.getWebSecurityScannerSettings" call. 8707 // Any non-2xx status code is an error. Response headers are in either 8708 // *WebSecurityScannerSettings.ServerResponse.Header or (if a response was 8709 // returned at all) in error.(*googleapi.Error).Header. Use 8710 // googleapi.IsNotModified to check whether the returned error was because 8711 // http.StatusNotModified was returned. 8712 func (c *FoldersGetWebSecurityScannerSettingsCall) Do(opts ...googleapi.CallOption) (*WebSecurityScannerSettings, error) { 8713 gensupport.SetOptions(c.urlParams_, opts...) 8714 res, err := c.doRequest("json") 8715 if res != nil && res.StatusCode == http.StatusNotModified { 8716 if res.Body != nil { 8717 res.Body.Close() 8718 } 8719 return nil, gensupport.WrapError(&googleapi.Error{ 8720 Code: res.StatusCode, 8721 Header: res.Header, 8722 }) 8723 } 8724 if err != nil { 8725 return nil, err 8726 } 8727 defer googleapi.CloseBody(res) 8728 if err := googleapi.CheckResponse(res); err != nil { 8729 return nil, gensupport.WrapError(err) 8730 } 8731 ret := &WebSecurityScannerSettings{ 8732 ServerResponse: googleapi.ServerResponse{ 8733 Header: res.Header, 8734 HTTPStatusCode: res.StatusCode, 8735 }, 8736 } 8737 target := &ret 8738 if err := gensupport.DecodeResponse(target, res); err != nil { 8739 return nil, err 8740 } 8741 return ret, nil 8742 } 8743 8744 type FoldersUpdateContainerThreatDetectionSettingsCall struct { 8745 s *Service 8746 name string 8747 containerthreatdetectionsettings *ContainerThreatDetectionSettings 8748 urlParams_ gensupport.URLParams 8749 ctx_ context.Context 8750 header_ http.Header 8751 } 8752 8753 // UpdateContainerThreatDetectionSettings: Update the 8754 // ContainerThreatDetectionSettings resource. 8755 // 8756 // - name: The resource name of the ContainerThreatDetectionSettings. Formats: 8757 // - organizations/{organization}/containerThreatDetectionSettings * 8758 // folders/{folder}/containerThreatDetectionSettings * 8759 // projects/{project}/containerThreatDetectionSettings * 8760 // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatD 8761 // etectionSettings. 8762 func (r *FoldersService) UpdateContainerThreatDetectionSettings(name string, containerthreatdetectionsettings *ContainerThreatDetectionSettings) *FoldersUpdateContainerThreatDetectionSettingsCall { 8763 c := &FoldersUpdateContainerThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8764 c.name = name 8765 c.containerthreatdetectionsettings = containerthreatdetectionsettings 8766 return c 8767 } 8768 8769 // UpdateMask sets the optional parameter "updateMask": The list of fields to 8770 // be updated. 8771 func (c *FoldersUpdateContainerThreatDetectionSettingsCall) UpdateMask(updateMask string) *FoldersUpdateContainerThreatDetectionSettingsCall { 8772 c.urlParams_.Set("updateMask", updateMask) 8773 return c 8774 } 8775 8776 // Fields allows partial responses to be retrieved. See 8777 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8778 // details. 8779 func (c *FoldersUpdateContainerThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *FoldersUpdateContainerThreatDetectionSettingsCall { 8780 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8781 return c 8782 } 8783 8784 // Context sets the context to be used in this call's Do method. 8785 func (c *FoldersUpdateContainerThreatDetectionSettingsCall) Context(ctx context.Context) *FoldersUpdateContainerThreatDetectionSettingsCall { 8786 c.ctx_ = ctx 8787 return c 8788 } 8789 8790 // Header returns a http.Header that can be modified by the caller to add 8791 // headers to the request. 8792 func (c *FoldersUpdateContainerThreatDetectionSettingsCall) Header() http.Header { 8793 if c.header_ == nil { 8794 c.header_ = make(http.Header) 8795 } 8796 return c.header_ 8797 } 8798 8799 func (c *FoldersUpdateContainerThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 8800 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8801 var body io.Reader = nil 8802 body, err := googleapi.WithoutDataWrapper.JSONReader(c.containerthreatdetectionsettings) 8803 if err != nil { 8804 return nil, err 8805 } 8806 c.urlParams_.Set("alt", alt) 8807 c.urlParams_.Set("prettyPrint", "false") 8808 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 8809 urls += "?" + c.urlParams_.Encode() 8810 req, err := http.NewRequest("PATCH", urls, body) 8811 if err != nil { 8812 return nil, err 8813 } 8814 req.Header = reqHeaders 8815 googleapi.Expand(req.URL, map[string]string{ 8816 "name": c.name, 8817 }) 8818 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8819 } 8820 8821 // Do executes the "securitycenter.folders.updateContainerThreatDetectionSettings" call. 8822 // Any non-2xx status code is an error. Response headers are in either 8823 // *ContainerThreatDetectionSettings.ServerResponse.Header or (if a response 8824 // was returned at all) in error.(*googleapi.Error).Header. Use 8825 // googleapi.IsNotModified to check whether the returned error was because 8826 // http.StatusNotModified was returned. 8827 func (c *FoldersUpdateContainerThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*ContainerThreatDetectionSettings, error) { 8828 gensupport.SetOptions(c.urlParams_, opts...) 8829 res, err := c.doRequest("json") 8830 if res != nil && res.StatusCode == http.StatusNotModified { 8831 if res.Body != nil { 8832 res.Body.Close() 8833 } 8834 return nil, gensupport.WrapError(&googleapi.Error{ 8835 Code: res.StatusCode, 8836 Header: res.Header, 8837 }) 8838 } 8839 if err != nil { 8840 return nil, err 8841 } 8842 defer googleapi.CloseBody(res) 8843 if err := googleapi.CheckResponse(res); err != nil { 8844 return nil, gensupport.WrapError(err) 8845 } 8846 ret := &ContainerThreatDetectionSettings{ 8847 ServerResponse: googleapi.ServerResponse{ 8848 Header: res.Header, 8849 HTTPStatusCode: res.StatusCode, 8850 }, 8851 } 8852 target := &ret 8853 if err := gensupport.DecodeResponse(target, res); err != nil { 8854 return nil, err 8855 } 8856 return ret, nil 8857 } 8858 8859 type FoldersUpdateEventThreatDetectionSettingsCall struct { 8860 s *Service 8861 name string 8862 eventthreatdetectionsettings *EventThreatDetectionSettings 8863 urlParams_ gensupport.URLParams 8864 ctx_ context.Context 8865 header_ http.Header 8866 } 8867 8868 // UpdateEventThreatDetectionSettings: Update the EventThreatDetectionSettings 8869 // resource. 8870 // 8871 // - name: The resource name of the EventThreatDetectionSettings. Formats: * 8872 // organizations/{organization}/eventThreatDetectionSettings * 8873 // folders/{folder}/eventThreatDetectionSettings * 8874 // projects/{project}/eventThreatDetectionSettings. 8875 func (r *FoldersService) UpdateEventThreatDetectionSettings(name string, eventthreatdetectionsettings *EventThreatDetectionSettings) *FoldersUpdateEventThreatDetectionSettingsCall { 8876 c := &FoldersUpdateEventThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8877 c.name = name 8878 c.eventthreatdetectionsettings = eventthreatdetectionsettings 8879 return c 8880 } 8881 8882 // UpdateMask sets the optional parameter "updateMask": The list of fields to 8883 // be updated. 8884 func (c *FoldersUpdateEventThreatDetectionSettingsCall) UpdateMask(updateMask string) *FoldersUpdateEventThreatDetectionSettingsCall { 8885 c.urlParams_.Set("updateMask", updateMask) 8886 return c 8887 } 8888 8889 // Fields allows partial responses to be retrieved. See 8890 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8891 // details. 8892 func (c *FoldersUpdateEventThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *FoldersUpdateEventThreatDetectionSettingsCall { 8893 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8894 return c 8895 } 8896 8897 // Context sets the context to be used in this call's Do method. 8898 func (c *FoldersUpdateEventThreatDetectionSettingsCall) Context(ctx context.Context) *FoldersUpdateEventThreatDetectionSettingsCall { 8899 c.ctx_ = ctx 8900 return c 8901 } 8902 8903 // Header returns a http.Header that can be modified by the caller to add 8904 // headers to the request. 8905 func (c *FoldersUpdateEventThreatDetectionSettingsCall) Header() http.Header { 8906 if c.header_ == nil { 8907 c.header_ = make(http.Header) 8908 } 8909 return c.header_ 8910 } 8911 8912 func (c *FoldersUpdateEventThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 8913 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8914 var body io.Reader = nil 8915 body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventthreatdetectionsettings) 8916 if err != nil { 8917 return nil, err 8918 } 8919 c.urlParams_.Set("alt", alt) 8920 c.urlParams_.Set("prettyPrint", "false") 8921 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 8922 urls += "?" + c.urlParams_.Encode() 8923 req, err := http.NewRequest("PATCH", urls, body) 8924 if err != nil { 8925 return nil, err 8926 } 8927 req.Header = reqHeaders 8928 googleapi.Expand(req.URL, map[string]string{ 8929 "name": c.name, 8930 }) 8931 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8932 } 8933 8934 // Do executes the "securitycenter.folders.updateEventThreatDetectionSettings" call. 8935 // Any non-2xx status code is an error. Response headers are in either 8936 // *EventThreatDetectionSettings.ServerResponse.Header or (if a response was 8937 // returned at all) in error.(*googleapi.Error).Header. Use 8938 // googleapi.IsNotModified to check whether the returned error was because 8939 // http.StatusNotModified was returned. 8940 func (c *FoldersUpdateEventThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionSettings, error) { 8941 gensupport.SetOptions(c.urlParams_, opts...) 8942 res, err := c.doRequest("json") 8943 if res != nil && res.StatusCode == http.StatusNotModified { 8944 if res.Body != nil { 8945 res.Body.Close() 8946 } 8947 return nil, gensupport.WrapError(&googleapi.Error{ 8948 Code: res.StatusCode, 8949 Header: res.Header, 8950 }) 8951 } 8952 if err != nil { 8953 return nil, err 8954 } 8955 defer googleapi.CloseBody(res) 8956 if err := googleapi.CheckResponse(res); err != nil { 8957 return nil, gensupport.WrapError(err) 8958 } 8959 ret := &EventThreatDetectionSettings{ 8960 ServerResponse: googleapi.ServerResponse{ 8961 Header: res.Header, 8962 HTTPStatusCode: res.StatusCode, 8963 }, 8964 } 8965 target := &ret 8966 if err := gensupport.DecodeResponse(target, res); err != nil { 8967 return nil, err 8968 } 8969 return ret, nil 8970 } 8971 8972 type FoldersUpdateRapidVulnerabilityDetectionSettingsCall struct { 8973 s *Service 8974 name string 8975 rapidvulnerabilitydetectionsettings *RapidVulnerabilityDetectionSettings 8976 urlParams_ gensupport.URLParams 8977 ctx_ context.Context 8978 header_ http.Header 8979 } 8980 8981 // UpdateRapidVulnerabilityDetectionSettings: Update the 8982 // RapidVulnerabilityDetectionSettings resource. 8983 // 8984 // - name: The resource name of the RapidVulnerabilityDetectionSettings. 8985 // Formats: * 8986 // organizations/{organization}/rapidVulnerabilityDetectionSettings * 8987 // folders/{folder}/rapidVulnerabilityDetectionSettings * 8988 // projects/{project}/rapidVulnerabilityDetectionSettings. 8989 func (r *FoldersService) UpdateRapidVulnerabilityDetectionSettings(name string, rapidvulnerabilitydetectionsettings *RapidVulnerabilityDetectionSettings) *FoldersUpdateRapidVulnerabilityDetectionSettingsCall { 8990 c := &FoldersUpdateRapidVulnerabilityDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8991 c.name = name 8992 c.rapidvulnerabilitydetectionsettings = rapidvulnerabilitydetectionsettings 8993 return c 8994 } 8995 8996 // UpdateMask sets the optional parameter "updateMask": The list of fields to 8997 // be updated. 8998 func (c *FoldersUpdateRapidVulnerabilityDetectionSettingsCall) UpdateMask(updateMask string) *FoldersUpdateRapidVulnerabilityDetectionSettingsCall { 8999 c.urlParams_.Set("updateMask", updateMask) 9000 return c 9001 } 9002 9003 // Fields allows partial responses to be retrieved. See 9004 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9005 // details. 9006 func (c *FoldersUpdateRapidVulnerabilityDetectionSettingsCall) Fields(s ...googleapi.Field) *FoldersUpdateRapidVulnerabilityDetectionSettingsCall { 9007 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9008 return c 9009 } 9010 9011 // Context sets the context to be used in this call's Do method. 9012 func (c *FoldersUpdateRapidVulnerabilityDetectionSettingsCall) Context(ctx context.Context) *FoldersUpdateRapidVulnerabilityDetectionSettingsCall { 9013 c.ctx_ = ctx 9014 return c 9015 } 9016 9017 // Header returns a http.Header that can be modified by the caller to add 9018 // headers to the request. 9019 func (c *FoldersUpdateRapidVulnerabilityDetectionSettingsCall) Header() http.Header { 9020 if c.header_ == nil { 9021 c.header_ = make(http.Header) 9022 } 9023 return c.header_ 9024 } 9025 9026 func (c *FoldersUpdateRapidVulnerabilityDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 9027 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9028 var body io.Reader = nil 9029 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rapidvulnerabilitydetectionsettings) 9030 if err != nil { 9031 return nil, err 9032 } 9033 c.urlParams_.Set("alt", alt) 9034 c.urlParams_.Set("prettyPrint", "false") 9035 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 9036 urls += "?" + c.urlParams_.Encode() 9037 req, err := http.NewRequest("PATCH", urls, body) 9038 if err != nil { 9039 return nil, err 9040 } 9041 req.Header = reqHeaders 9042 googleapi.Expand(req.URL, map[string]string{ 9043 "name": c.name, 9044 }) 9045 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9046 } 9047 9048 // Do executes the "securitycenter.folders.updateRapidVulnerabilityDetectionSettings" call. 9049 // Any non-2xx status code is an error. Response headers are in either 9050 // *RapidVulnerabilityDetectionSettings.ServerResponse.Header or (if a response 9051 // was returned at all) in error.(*googleapi.Error).Header. Use 9052 // googleapi.IsNotModified to check whether the returned error was because 9053 // http.StatusNotModified was returned. 9054 func (c *FoldersUpdateRapidVulnerabilityDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { 9055 gensupport.SetOptions(c.urlParams_, opts...) 9056 res, err := c.doRequest("json") 9057 if res != nil && res.StatusCode == http.StatusNotModified { 9058 if res.Body != nil { 9059 res.Body.Close() 9060 } 9061 return nil, gensupport.WrapError(&googleapi.Error{ 9062 Code: res.StatusCode, 9063 Header: res.Header, 9064 }) 9065 } 9066 if err != nil { 9067 return nil, err 9068 } 9069 defer googleapi.CloseBody(res) 9070 if err := googleapi.CheckResponse(res); err != nil { 9071 return nil, gensupport.WrapError(err) 9072 } 9073 ret := &RapidVulnerabilityDetectionSettings{ 9074 ServerResponse: googleapi.ServerResponse{ 9075 Header: res.Header, 9076 HTTPStatusCode: res.StatusCode, 9077 }, 9078 } 9079 target := &ret 9080 if err := gensupport.DecodeResponse(target, res); err != nil { 9081 return nil, err 9082 } 9083 return ret, nil 9084 } 9085 9086 type FoldersUpdateSecurityHealthAnalyticsSettingsCall struct { 9087 s *Service 9088 name string 9089 securityhealthanalyticssettings *SecurityHealthAnalyticsSettings 9090 urlParams_ gensupport.URLParams 9091 ctx_ context.Context 9092 header_ http.Header 9093 } 9094 9095 // UpdateSecurityHealthAnalyticsSettings: Update the 9096 // SecurityHealthAnalyticsSettings resource. 9097 // 9098 // - name: The resource name of the SecurityHealthAnalyticsSettings. Formats: * 9099 // organizations/{organization}/securityHealthAnalyticsSettings * 9100 // folders/{folder}/securityHealthAnalyticsSettings * 9101 // projects/{project}/securityHealthAnalyticsSettings. 9102 func (r *FoldersService) UpdateSecurityHealthAnalyticsSettings(name string, securityhealthanalyticssettings *SecurityHealthAnalyticsSettings) *FoldersUpdateSecurityHealthAnalyticsSettingsCall { 9103 c := &FoldersUpdateSecurityHealthAnalyticsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9104 c.name = name 9105 c.securityhealthanalyticssettings = securityhealthanalyticssettings 9106 return c 9107 } 9108 9109 // UpdateMask sets the optional parameter "updateMask": The list of fields to 9110 // be updated. 9111 func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) UpdateMask(updateMask string) *FoldersUpdateSecurityHealthAnalyticsSettingsCall { 9112 c.urlParams_.Set("updateMask", updateMask) 9113 return c 9114 } 9115 9116 // Fields allows partial responses to be retrieved. See 9117 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9118 // details. 9119 func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Fields(s ...googleapi.Field) *FoldersUpdateSecurityHealthAnalyticsSettingsCall { 9120 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9121 return c 9122 } 9123 9124 // Context sets the context to be used in this call's Do method. 9125 func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Context(ctx context.Context) *FoldersUpdateSecurityHealthAnalyticsSettingsCall { 9126 c.ctx_ = ctx 9127 return c 9128 } 9129 9130 // Header returns a http.Header that can be modified by the caller to add 9131 // headers to the request. 9132 func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Header() http.Header { 9133 if c.header_ == nil { 9134 c.header_ = make(http.Header) 9135 } 9136 return c.header_ 9137 } 9138 9139 func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) doRequest(alt string) (*http.Response, error) { 9140 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9141 var body io.Reader = nil 9142 body, err := googleapi.WithoutDataWrapper.JSONReader(c.securityhealthanalyticssettings) 9143 if err != nil { 9144 return nil, err 9145 } 9146 c.urlParams_.Set("alt", alt) 9147 c.urlParams_.Set("prettyPrint", "false") 9148 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 9149 urls += "?" + c.urlParams_.Encode() 9150 req, err := http.NewRequest("PATCH", urls, body) 9151 if err != nil { 9152 return nil, err 9153 } 9154 req.Header = reqHeaders 9155 googleapi.Expand(req.URL, map[string]string{ 9156 "name": c.name, 9157 }) 9158 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9159 } 9160 9161 // Do executes the "securitycenter.folders.updateSecurityHealthAnalyticsSettings" call. 9162 // Any non-2xx status code is an error. Response headers are in either 9163 // *SecurityHealthAnalyticsSettings.ServerResponse.Header or (if a response was 9164 // returned at all) in error.(*googleapi.Error).Header. Use 9165 // googleapi.IsNotModified to check whether the returned error was because 9166 // http.StatusNotModified was returned. 9167 func (c *FoldersUpdateSecurityHealthAnalyticsSettingsCall) Do(opts ...googleapi.CallOption) (*SecurityHealthAnalyticsSettings, error) { 9168 gensupport.SetOptions(c.urlParams_, opts...) 9169 res, err := c.doRequest("json") 9170 if res != nil && res.StatusCode == http.StatusNotModified { 9171 if res.Body != nil { 9172 res.Body.Close() 9173 } 9174 return nil, gensupport.WrapError(&googleapi.Error{ 9175 Code: res.StatusCode, 9176 Header: res.Header, 9177 }) 9178 } 9179 if err != nil { 9180 return nil, err 9181 } 9182 defer googleapi.CloseBody(res) 9183 if err := googleapi.CheckResponse(res); err != nil { 9184 return nil, gensupport.WrapError(err) 9185 } 9186 ret := &SecurityHealthAnalyticsSettings{ 9187 ServerResponse: googleapi.ServerResponse{ 9188 Header: res.Header, 9189 HTTPStatusCode: res.StatusCode, 9190 }, 9191 } 9192 target := &ret 9193 if err := gensupport.DecodeResponse(target, res); err != nil { 9194 return nil, err 9195 } 9196 return ret, nil 9197 } 9198 9199 type FoldersUpdateVirtualMachineThreatDetectionSettingsCall struct { 9200 s *Service 9201 name string 9202 virtualmachinethreatdetectionsettings *VirtualMachineThreatDetectionSettings 9203 urlParams_ gensupport.URLParams 9204 ctx_ context.Context 9205 header_ http.Header 9206 } 9207 9208 // UpdateVirtualMachineThreatDetectionSettings: Update the 9209 // VirtualMachineThreatDetectionSettings resource. 9210 // 9211 // - name: The resource name of the VirtualMachineThreatDetectionSettings. 9212 // Formats: * 9213 // organizations/{organization}/virtualMachineThreatDetectionSettings * 9214 // folders/{folder}/virtualMachineThreatDetectionSettings * 9215 // projects/{project}/virtualMachineThreatDetectionSettings. 9216 func (r *FoldersService) UpdateVirtualMachineThreatDetectionSettings(name string, virtualmachinethreatdetectionsettings *VirtualMachineThreatDetectionSettings) *FoldersUpdateVirtualMachineThreatDetectionSettingsCall { 9217 c := &FoldersUpdateVirtualMachineThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9218 c.name = name 9219 c.virtualmachinethreatdetectionsettings = virtualmachinethreatdetectionsettings 9220 return c 9221 } 9222 9223 // UpdateMask sets the optional parameter "updateMask": The list of fields to 9224 // be updated. 9225 func (c *FoldersUpdateVirtualMachineThreatDetectionSettingsCall) UpdateMask(updateMask string) *FoldersUpdateVirtualMachineThreatDetectionSettingsCall { 9226 c.urlParams_.Set("updateMask", updateMask) 9227 return c 9228 } 9229 9230 // Fields allows partial responses to be retrieved. See 9231 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9232 // details. 9233 func (c *FoldersUpdateVirtualMachineThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *FoldersUpdateVirtualMachineThreatDetectionSettingsCall { 9234 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9235 return c 9236 } 9237 9238 // Context sets the context to be used in this call's Do method. 9239 func (c *FoldersUpdateVirtualMachineThreatDetectionSettingsCall) Context(ctx context.Context) *FoldersUpdateVirtualMachineThreatDetectionSettingsCall { 9240 c.ctx_ = ctx 9241 return c 9242 } 9243 9244 // Header returns a http.Header that can be modified by the caller to add 9245 // headers to the request. 9246 func (c *FoldersUpdateVirtualMachineThreatDetectionSettingsCall) Header() http.Header { 9247 if c.header_ == nil { 9248 c.header_ = make(http.Header) 9249 } 9250 return c.header_ 9251 } 9252 9253 func (c *FoldersUpdateVirtualMachineThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 9254 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9255 var body io.Reader = nil 9256 body, err := googleapi.WithoutDataWrapper.JSONReader(c.virtualmachinethreatdetectionsettings) 9257 if err != nil { 9258 return nil, err 9259 } 9260 c.urlParams_.Set("alt", alt) 9261 c.urlParams_.Set("prettyPrint", "false") 9262 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 9263 urls += "?" + c.urlParams_.Encode() 9264 req, err := http.NewRequest("PATCH", urls, body) 9265 if err != nil { 9266 return nil, err 9267 } 9268 req.Header = reqHeaders 9269 googleapi.Expand(req.URL, map[string]string{ 9270 "name": c.name, 9271 }) 9272 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9273 } 9274 9275 // Do executes the "securitycenter.folders.updateVirtualMachineThreatDetectionSettings" call. 9276 // Any non-2xx status code is an error. Response headers are in either 9277 // *VirtualMachineThreatDetectionSettings.ServerResponse.Header or (if a 9278 // response was returned at all) in error.(*googleapi.Error).Header. Use 9279 // googleapi.IsNotModified to check whether the returned error was because 9280 // http.StatusNotModified was returned. 9281 func (c *FoldersUpdateVirtualMachineThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*VirtualMachineThreatDetectionSettings, error) { 9282 gensupport.SetOptions(c.urlParams_, opts...) 9283 res, err := c.doRequest("json") 9284 if res != nil && res.StatusCode == http.StatusNotModified { 9285 if res.Body != nil { 9286 res.Body.Close() 9287 } 9288 return nil, gensupport.WrapError(&googleapi.Error{ 9289 Code: res.StatusCode, 9290 Header: res.Header, 9291 }) 9292 } 9293 if err != nil { 9294 return nil, err 9295 } 9296 defer googleapi.CloseBody(res) 9297 if err := googleapi.CheckResponse(res); err != nil { 9298 return nil, gensupport.WrapError(err) 9299 } 9300 ret := &VirtualMachineThreatDetectionSettings{ 9301 ServerResponse: googleapi.ServerResponse{ 9302 Header: res.Header, 9303 HTTPStatusCode: res.StatusCode, 9304 }, 9305 } 9306 target := &ret 9307 if err := gensupport.DecodeResponse(target, res); err != nil { 9308 return nil, err 9309 } 9310 return ret, nil 9311 } 9312 9313 type FoldersUpdateWebSecurityScannerSettingsCall struct { 9314 s *Service 9315 name string 9316 websecurityscannersettings *WebSecurityScannerSettings 9317 urlParams_ gensupport.URLParams 9318 ctx_ context.Context 9319 header_ http.Header 9320 } 9321 9322 // UpdateWebSecurityScannerSettings: Update the WebSecurityScannerSettings 9323 // resource. 9324 // 9325 // - name: The resource name of the WebSecurityScannerSettings. Formats: * 9326 // organizations/{organization}/webSecurityScannerSettings * 9327 // folders/{folder}/webSecurityScannerSettings * 9328 // projects/{project}/webSecurityScannerSettings. 9329 func (r *FoldersService) UpdateWebSecurityScannerSettings(name string, websecurityscannersettings *WebSecurityScannerSettings) *FoldersUpdateWebSecurityScannerSettingsCall { 9330 c := &FoldersUpdateWebSecurityScannerSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9331 c.name = name 9332 c.websecurityscannersettings = websecurityscannersettings 9333 return c 9334 } 9335 9336 // UpdateMask sets the optional parameter "updateMask": The list of fields to 9337 // be updated. 9338 func (c *FoldersUpdateWebSecurityScannerSettingsCall) UpdateMask(updateMask string) *FoldersUpdateWebSecurityScannerSettingsCall { 9339 c.urlParams_.Set("updateMask", updateMask) 9340 return c 9341 } 9342 9343 // Fields allows partial responses to be retrieved. See 9344 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9345 // details. 9346 func (c *FoldersUpdateWebSecurityScannerSettingsCall) Fields(s ...googleapi.Field) *FoldersUpdateWebSecurityScannerSettingsCall { 9347 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9348 return c 9349 } 9350 9351 // Context sets the context to be used in this call's Do method. 9352 func (c *FoldersUpdateWebSecurityScannerSettingsCall) Context(ctx context.Context) *FoldersUpdateWebSecurityScannerSettingsCall { 9353 c.ctx_ = ctx 9354 return c 9355 } 9356 9357 // Header returns a http.Header that can be modified by the caller to add 9358 // headers to the request. 9359 func (c *FoldersUpdateWebSecurityScannerSettingsCall) Header() http.Header { 9360 if c.header_ == nil { 9361 c.header_ = make(http.Header) 9362 } 9363 return c.header_ 9364 } 9365 9366 func (c *FoldersUpdateWebSecurityScannerSettingsCall) doRequest(alt string) (*http.Response, error) { 9367 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9368 var body io.Reader = nil 9369 body, err := googleapi.WithoutDataWrapper.JSONReader(c.websecurityscannersettings) 9370 if err != nil { 9371 return nil, err 9372 } 9373 c.urlParams_.Set("alt", alt) 9374 c.urlParams_.Set("prettyPrint", "false") 9375 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 9376 urls += "?" + c.urlParams_.Encode() 9377 req, err := http.NewRequest("PATCH", urls, body) 9378 if err != nil { 9379 return nil, err 9380 } 9381 req.Header = reqHeaders 9382 googleapi.Expand(req.URL, map[string]string{ 9383 "name": c.name, 9384 }) 9385 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9386 } 9387 9388 // Do executes the "securitycenter.folders.updateWebSecurityScannerSettings" call. 9389 // Any non-2xx status code is an error. Response headers are in either 9390 // *WebSecurityScannerSettings.ServerResponse.Header or (if a response was 9391 // returned at all) in error.(*googleapi.Error).Header. Use 9392 // googleapi.IsNotModified to check whether the returned error was because 9393 // http.StatusNotModified was returned. 9394 func (c *FoldersUpdateWebSecurityScannerSettingsCall) Do(opts ...googleapi.CallOption) (*WebSecurityScannerSettings, error) { 9395 gensupport.SetOptions(c.urlParams_, opts...) 9396 res, err := c.doRequest("json") 9397 if res != nil && res.StatusCode == http.StatusNotModified { 9398 if res.Body != nil { 9399 res.Body.Close() 9400 } 9401 return nil, gensupport.WrapError(&googleapi.Error{ 9402 Code: res.StatusCode, 9403 Header: res.Header, 9404 }) 9405 } 9406 if err != nil { 9407 return nil, err 9408 } 9409 defer googleapi.CloseBody(res) 9410 if err := googleapi.CheckResponse(res); err != nil { 9411 return nil, gensupport.WrapError(err) 9412 } 9413 ret := &WebSecurityScannerSettings{ 9414 ServerResponse: googleapi.ServerResponse{ 9415 Header: res.Header, 9416 HTTPStatusCode: res.StatusCode, 9417 }, 9418 } 9419 target := &ret 9420 if err := gensupport.DecodeResponse(target, res); err != nil { 9421 return nil, err 9422 } 9423 return ret, nil 9424 } 9425 9426 type FoldersContainerThreatDetectionSettingsCalculateCall struct { 9427 s *Service 9428 name string 9429 urlParams_ gensupport.URLParams 9430 ifNoneMatch_ string 9431 ctx_ context.Context 9432 header_ http.Header 9433 } 9434 9435 // Calculate: Calculates the effective ContainerThreatDetectionSettings based 9436 // on its level in the resource hierarchy and its settings. Settings provided 9437 // closer to the target resource take precedence over those further away (e.g. 9438 // folder will override organization level settings). The default SCC setting 9439 // for the detector service defaults can be overridden at organization, folder 9440 // and project levels. No assumptions should be made about the SCC defaults as 9441 // it is considered an internal implementation detail. 9442 // 9443 // - name: The name of the ContainerThreatDetectionSettings to calculate. 9444 // Formats: * organizations/{organization}/containerThreatDetectionSettings * 9445 // folders/{folder}/containerThreatDetectionSettings * 9446 // projects/{project}/containerThreatDetectionSettings * 9447 // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatD 9448 // etectionSettings. 9449 func (r *FoldersContainerThreatDetectionSettingsService) Calculate(name string) *FoldersContainerThreatDetectionSettingsCalculateCall { 9450 c := &FoldersContainerThreatDetectionSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9451 c.name = name 9452 return c 9453 } 9454 9455 // Fields allows partial responses to be retrieved. See 9456 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9457 // details. 9458 func (c *FoldersContainerThreatDetectionSettingsCalculateCall) Fields(s ...googleapi.Field) *FoldersContainerThreatDetectionSettingsCalculateCall { 9459 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9460 return c 9461 } 9462 9463 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9464 // object's ETag matches the given value. This is useful for getting updates 9465 // only after the object has changed since the last request. 9466 func (c *FoldersContainerThreatDetectionSettingsCalculateCall) IfNoneMatch(entityTag string) *FoldersContainerThreatDetectionSettingsCalculateCall { 9467 c.ifNoneMatch_ = entityTag 9468 return c 9469 } 9470 9471 // Context sets the context to be used in this call's Do method. 9472 func (c *FoldersContainerThreatDetectionSettingsCalculateCall) Context(ctx context.Context) *FoldersContainerThreatDetectionSettingsCalculateCall { 9473 c.ctx_ = ctx 9474 return c 9475 } 9476 9477 // Header returns a http.Header that can be modified by the caller to add 9478 // headers to the request. 9479 func (c *FoldersContainerThreatDetectionSettingsCalculateCall) Header() http.Header { 9480 if c.header_ == nil { 9481 c.header_ = make(http.Header) 9482 } 9483 return c.header_ 9484 } 9485 9486 func (c *FoldersContainerThreatDetectionSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 9487 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9488 if c.ifNoneMatch_ != "" { 9489 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9490 } 9491 var body io.Reader = nil 9492 c.urlParams_.Set("alt", alt) 9493 c.urlParams_.Set("prettyPrint", "false") 9494 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 9495 urls += "?" + c.urlParams_.Encode() 9496 req, err := http.NewRequest("GET", urls, body) 9497 if err != nil { 9498 return nil, err 9499 } 9500 req.Header = reqHeaders 9501 googleapi.Expand(req.URL, map[string]string{ 9502 "name": c.name, 9503 }) 9504 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9505 } 9506 9507 // Do executes the "securitycenter.folders.containerThreatDetectionSettings.calculate" call. 9508 // Any non-2xx status code is an error. Response headers are in either 9509 // *ContainerThreatDetectionSettings.ServerResponse.Header or (if a response 9510 // was returned at all) in error.(*googleapi.Error).Header. Use 9511 // googleapi.IsNotModified to check whether the returned error was because 9512 // http.StatusNotModified was returned. 9513 func (c *FoldersContainerThreatDetectionSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*ContainerThreatDetectionSettings, error) { 9514 gensupport.SetOptions(c.urlParams_, opts...) 9515 res, err := c.doRequest("json") 9516 if res != nil && res.StatusCode == http.StatusNotModified { 9517 if res.Body != nil { 9518 res.Body.Close() 9519 } 9520 return nil, gensupport.WrapError(&googleapi.Error{ 9521 Code: res.StatusCode, 9522 Header: res.Header, 9523 }) 9524 } 9525 if err != nil { 9526 return nil, err 9527 } 9528 defer googleapi.CloseBody(res) 9529 if err := googleapi.CheckResponse(res); err != nil { 9530 return nil, gensupport.WrapError(err) 9531 } 9532 ret := &ContainerThreatDetectionSettings{ 9533 ServerResponse: googleapi.ServerResponse{ 9534 Header: res.Header, 9535 HTTPStatusCode: res.StatusCode, 9536 }, 9537 } 9538 target := &ret 9539 if err := gensupport.DecodeResponse(target, res); err != nil { 9540 return nil, err 9541 } 9542 return ret, nil 9543 } 9544 9545 type FoldersEventThreatDetectionSettingsCalculateCall struct { 9546 s *Service 9547 name string 9548 urlParams_ gensupport.URLParams 9549 ifNoneMatch_ string 9550 ctx_ context.Context 9551 header_ http.Header 9552 } 9553 9554 // Calculate: Calculates the effective EventThreatDetectionSettings based on 9555 // its level in the resource hierarchy and its settings. Settings provided 9556 // closer to the target resource take precedence over those further away (e.g. 9557 // folder will override organization level settings). The default SCC setting 9558 // for the detector service defaults can be overridden at organization, folder 9559 // and project levels. No assumptions should be made about the SCC defaults as 9560 // it is considered an internal implementation detail. 9561 // 9562 // - name: The name of the EventThreatDetectionSettings to calculate. Formats: 9563 // - organizations/{organization}/eventThreatDetectionSettings * 9564 // folders/{folder}/eventThreatDetectionSettings * 9565 // projects/{project}/eventThreatDetectionSettings. 9566 func (r *FoldersEventThreatDetectionSettingsService) Calculate(name string) *FoldersEventThreatDetectionSettingsCalculateCall { 9567 c := &FoldersEventThreatDetectionSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9568 c.name = name 9569 return c 9570 } 9571 9572 // Fields allows partial responses to be retrieved. See 9573 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9574 // details. 9575 func (c *FoldersEventThreatDetectionSettingsCalculateCall) Fields(s ...googleapi.Field) *FoldersEventThreatDetectionSettingsCalculateCall { 9576 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9577 return c 9578 } 9579 9580 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9581 // object's ETag matches the given value. This is useful for getting updates 9582 // only after the object has changed since the last request. 9583 func (c *FoldersEventThreatDetectionSettingsCalculateCall) IfNoneMatch(entityTag string) *FoldersEventThreatDetectionSettingsCalculateCall { 9584 c.ifNoneMatch_ = entityTag 9585 return c 9586 } 9587 9588 // Context sets the context to be used in this call's Do method. 9589 func (c *FoldersEventThreatDetectionSettingsCalculateCall) Context(ctx context.Context) *FoldersEventThreatDetectionSettingsCalculateCall { 9590 c.ctx_ = ctx 9591 return c 9592 } 9593 9594 // Header returns a http.Header that can be modified by the caller to add 9595 // headers to the request. 9596 func (c *FoldersEventThreatDetectionSettingsCalculateCall) Header() http.Header { 9597 if c.header_ == nil { 9598 c.header_ = make(http.Header) 9599 } 9600 return c.header_ 9601 } 9602 9603 func (c *FoldersEventThreatDetectionSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 9604 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9605 if c.ifNoneMatch_ != "" { 9606 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9607 } 9608 var body io.Reader = nil 9609 c.urlParams_.Set("alt", alt) 9610 c.urlParams_.Set("prettyPrint", "false") 9611 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 9612 urls += "?" + c.urlParams_.Encode() 9613 req, err := http.NewRequest("GET", urls, body) 9614 if err != nil { 9615 return nil, err 9616 } 9617 req.Header = reqHeaders 9618 googleapi.Expand(req.URL, map[string]string{ 9619 "name": c.name, 9620 }) 9621 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9622 } 9623 9624 // Do executes the "securitycenter.folders.eventThreatDetectionSettings.calculate" call. 9625 // Any non-2xx status code is an error. Response headers are in either 9626 // *EventThreatDetectionSettings.ServerResponse.Header or (if a response was 9627 // returned at all) in error.(*googleapi.Error).Header. Use 9628 // googleapi.IsNotModified to check whether the returned error was because 9629 // http.StatusNotModified was returned. 9630 func (c *FoldersEventThreatDetectionSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionSettings, error) { 9631 gensupport.SetOptions(c.urlParams_, opts...) 9632 res, err := c.doRequest("json") 9633 if res != nil && res.StatusCode == http.StatusNotModified { 9634 if res.Body != nil { 9635 res.Body.Close() 9636 } 9637 return nil, gensupport.WrapError(&googleapi.Error{ 9638 Code: res.StatusCode, 9639 Header: res.Header, 9640 }) 9641 } 9642 if err != nil { 9643 return nil, err 9644 } 9645 defer googleapi.CloseBody(res) 9646 if err := googleapi.CheckResponse(res); err != nil { 9647 return nil, gensupport.WrapError(err) 9648 } 9649 ret := &EventThreatDetectionSettings{ 9650 ServerResponse: googleapi.ServerResponse{ 9651 Header: res.Header, 9652 HTTPStatusCode: res.StatusCode, 9653 }, 9654 } 9655 target := &ret 9656 if err := gensupport.DecodeResponse(target, res); err != nil { 9657 return nil, err 9658 } 9659 return ret, nil 9660 } 9661 9662 type FoldersRapidVulnerabilityDetectionSettingsCalculateCall struct { 9663 s *Service 9664 name string 9665 urlParams_ gensupport.URLParams 9666 ifNoneMatch_ string 9667 ctx_ context.Context 9668 header_ http.Header 9669 } 9670 9671 // Calculate: Calculates the effective RapidVulnerabilityDetectionSettings 9672 // based on its level in the resource hierarchy and its settings. Settings 9673 // provided closer to the target resource take precedence over those further 9674 // away (e.g. folder will override organization level settings). The default 9675 // SCC setting for the detector service defaults can be overridden at 9676 // organization, folder and project levels. No assumptions should be made about 9677 // the SCC defaults as it is considered an internal implementation detail. 9678 // 9679 // - name: The name of the RapidVulnerabilityDetectionSettings to calculate. 9680 // Formats: * 9681 // organizations/{organization}/rapidVulnerabilityDetectionSettings * 9682 // folders/{folder}/rapidVulnerabilityDetectionSettings * 9683 // projects/{project}/rapidVulnerabilityDetectionSettings. 9684 func (r *FoldersRapidVulnerabilityDetectionSettingsService) Calculate(name string) *FoldersRapidVulnerabilityDetectionSettingsCalculateCall { 9685 c := &FoldersRapidVulnerabilityDetectionSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9686 c.name = name 9687 return c 9688 } 9689 9690 // Fields allows partial responses to be retrieved. See 9691 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9692 // details. 9693 func (c *FoldersRapidVulnerabilityDetectionSettingsCalculateCall) Fields(s ...googleapi.Field) *FoldersRapidVulnerabilityDetectionSettingsCalculateCall { 9694 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9695 return c 9696 } 9697 9698 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9699 // object's ETag matches the given value. This is useful for getting updates 9700 // only after the object has changed since the last request. 9701 func (c *FoldersRapidVulnerabilityDetectionSettingsCalculateCall) IfNoneMatch(entityTag string) *FoldersRapidVulnerabilityDetectionSettingsCalculateCall { 9702 c.ifNoneMatch_ = entityTag 9703 return c 9704 } 9705 9706 // Context sets the context to be used in this call's Do method. 9707 func (c *FoldersRapidVulnerabilityDetectionSettingsCalculateCall) Context(ctx context.Context) *FoldersRapidVulnerabilityDetectionSettingsCalculateCall { 9708 c.ctx_ = ctx 9709 return c 9710 } 9711 9712 // Header returns a http.Header that can be modified by the caller to add 9713 // headers to the request. 9714 func (c *FoldersRapidVulnerabilityDetectionSettingsCalculateCall) Header() http.Header { 9715 if c.header_ == nil { 9716 c.header_ = make(http.Header) 9717 } 9718 return c.header_ 9719 } 9720 9721 func (c *FoldersRapidVulnerabilityDetectionSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 9722 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9723 if c.ifNoneMatch_ != "" { 9724 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9725 } 9726 var body io.Reader = nil 9727 c.urlParams_.Set("alt", alt) 9728 c.urlParams_.Set("prettyPrint", "false") 9729 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 9730 urls += "?" + c.urlParams_.Encode() 9731 req, err := http.NewRequest("GET", urls, body) 9732 if err != nil { 9733 return nil, err 9734 } 9735 req.Header = reqHeaders 9736 googleapi.Expand(req.URL, map[string]string{ 9737 "name": c.name, 9738 }) 9739 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9740 } 9741 9742 // Do executes the "securitycenter.folders.rapidVulnerabilityDetectionSettings.calculate" call. 9743 // Any non-2xx status code is an error. Response headers are in either 9744 // *RapidVulnerabilityDetectionSettings.ServerResponse.Header or (if a response 9745 // was returned at all) in error.(*googleapi.Error).Header. Use 9746 // googleapi.IsNotModified to check whether the returned error was because 9747 // http.StatusNotModified was returned. 9748 func (c *FoldersRapidVulnerabilityDetectionSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { 9749 gensupport.SetOptions(c.urlParams_, opts...) 9750 res, err := c.doRequest("json") 9751 if res != nil && res.StatusCode == http.StatusNotModified { 9752 if res.Body != nil { 9753 res.Body.Close() 9754 } 9755 return nil, gensupport.WrapError(&googleapi.Error{ 9756 Code: res.StatusCode, 9757 Header: res.Header, 9758 }) 9759 } 9760 if err != nil { 9761 return nil, err 9762 } 9763 defer googleapi.CloseBody(res) 9764 if err := googleapi.CheckResponse(res); err != nil { 9765 return nil, gensupport.WrapError(err) 9766 } 9767 ret := &RapidVulnerabilityDetectionSettings{ 9768 ServerResponse: googleapi.ServerResponse{ 9769 Header: res.Header, 9770 HTTPStatusCode: res.StatusCode, 9771 }, 9772 } 9773 target := &ret 9774 if err := gensupport.DecodeResponse(target, res); err != nil { 9775 return nil, err 9776 } 9777 return ret, nil 9778 } 9779 9780 type FoldersSecurityHealthAnalyticsSettingsCalculateCall struct { 9781 s *Service 9782 name string 9783 urlParams_ gensupport.URLParams 9784 ifNoneMatch_ string 9785 ctx_ context.Context 9786 header_ http.Header 9787 } 9788 9789 // Calculate: Calculates the effective SecurityHealthAnalyticsSettings based on 9790 // its level in the resource hierarchy and its settings. Settings provided 9791 // closer to the target resource take precedence over those further away (e.g. 9792 // folder will override organization level settings). The default SCC setting 9793 // for the detector service defaults can be overridden at organization, folder 9794 // and project levels. No assumptions should be made about the SCC defaults as 9795 // it is considered an internal implementation detail. 9796 // 9797 // - name: The name of the SecurityHealthAnalyticsSettings to calculate. 9798 // Formats: * organizations/{organization}/securityHealthAnalyticsSettings * 9799 // folders/{folder}/securityHealthAnalyticsSettings * 9800 // projects/{project}/securityHealthAnalyticsSettings. 9801 func (r *FoldersSecurityHealthAnalyticsSettingsService) Calculate(name string) *FoldersSecurityHealthAnalyticsSettingsCalculateCall { 9802 c := &FoldersSecurityHealthAnalyticsSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9803 c.name = name 9804 return c 9805 } 9806 9807 // Fields allows partial responses to be retrieved. See 9808 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9809 // details. 9810 func (c *FoldersSecurityHealthAnalyticsSettingsCalculateCall) Fields(s ...googleapi.Field) *FoldersSecurityHealthAnalyticsSettingsCalculateCall { 9811 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9812 return c 9813 } 9814 9815 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9816 // object's ETag matches the given value. This is useful for getting updates 9817 // only after the object has changed since the last request. 9818 func (c *FoldersSecurityHealthAnalyticsSettingsCalculateCall) IfNoneMatch(entityTag string) *FoldersSecurityHealthAnalyticsSettingsCalculateCall { 9819 c.ifNoneMatch_ = entityTag 9820 return c 9821 } 9822 9823 // Context sets the context to be used in this call's Do method. 9824 func (c *FoldersSecurityHealthAnalyticsSettingsCalculateCall) Context(ctx context.Context) *FoldersSecurityHealthAnalyticsSettingsCalculateCall { 9825 c.ctx_ = ctx 9826 return c 9827 } 9828 9829 // Header returns a http.Header that can be modified by the caller to add 9830 // headers to the request. 9831 func (c *FoldersSecurityHealthAnalyticsSettingsCalculateCall) Header() http.Header { 9832 if c.header_ == nil { 9833 c.header_ = make(http.Header) 9834 } 9835 return c.header_ 9836 } 9837 9838 func (c *FoldersSecurityHealthAnalyticsSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 9839 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9840 if c.ifNoneMatch_ != "" { 9841 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9842 } 9843 var body io.Reader = nil 9844 c.urlParams_.Set("alt", alt) 9845 c.urlParams_.Set("prettyPrint", "false") 9846 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 9847 urls += "?" + c.urlParams_.Encode() 9848 req, err := http.NewRequest("GET", urls, body) 9849 if err != nil { 9850 return nil, err 9851 } 9852 req.Header = reqHeaders 9853 googleapi.Expand(req.URL, map[string]string{ 9854 "name": c.name, 9855 }) 9856 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9857 } 9858 9859 // Do executes the "securitycenter.folders.securityHealthAnalyticsSettings.calculate" call. 9860 // Any non-2xx status code is an error. Response headers are in either 9861 // *SecurityHealthAnalyticsSettings.ServerResponse.Header or (if a response was 9862 // returned at all) in error.(*googleapi.Error).Header. Use 9863 // googleapi.IsNotModified to check whether the returned error was because 9864 // http.StatusNotModified was returned. 9865 func (c *FoldersSecurityHealthAnalyticsSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*SecurityHealthAnalyticsSettings, error) { 9866 gensupport.SetOptions(c.urlParams_, opts...) 9867 res, err := c.doRequest("json") 9868 if res != nil && res.StatusCode == http.StatusNotModified { 9869 if res.Body != nil { 9870 res.Body.Close() 9871 } 9872 return nil, gensupport.WrapError(&googleapi.Error{ 9873 Code: res.StatusCode, 9874 Header: res.Header, 9875 }) 9876 } 9877 if err != nil { 9878 return nil, err 9879 } 9880 defer googleapi.CloseBody(res) 9881 if err := googleapi.CheckResponse(res); err != nil { 9882 return nil, gensupport.WrapError(err) 9883 } 9884 ret := &SecurityHealthAnalyticsSettings{ 9885 ServerResponse: googleapi.ServerResponse{ 9886 Header: res.Header, 9887 HTTPStatusCode: res.StatusCode, 9888 }, 9889 } 9890 target := &ret 9891 if err := gensupport.DecodeResponse(target, res); err != nil { 9892 return nil, err 9893 } 9894 return ret, nil 9895 } 9896 9897 type FoldersVirtualMachineThreatDetectionSettingsCalculateCall struct { 9898 s *Service 9899 name string 9900 urlParams_ gensupport.URLParams 9901 ifNoneMatch_ string 9902 ctx_ context.Context 9903 header_ http.Header 9904 } 9905 9906 // Calculate: Calculates the effective VirtualMachineThreatDetectionSettings 9907 // based on its level in the resource hierarchy and its settings. Settings 9908 // provided closer to the target resource take precedence over those further 9909 // away (e.g. folder will override organization level settings). The default 9910 // SCC setting for the detector service defaults can be overridden at 9911 // organization, folder and project levels. No assumptions should be made about 9912 // the SCC defaults as it is considered an internal implementation detail. 9913 // 9914 // - name: The name of the VirtualMachineThreatDetectionSettings to calculate. 9915 // Formats: * 9916 // organizations/{organization}/virtualMachineThreatDetectionSettings * 9917 // folders/{folder}/virtualMachineThreatDetectionSettings * 9918 // projects/{project}/virtualMachineThreatDetectionSettings. 9919 func (r *FoldersVirtualMachineThreatDetectionSettingsService) Calculate(name string) *FoldersVirtualMachineThreatDetectionSettingsCalculateCall { 9920 c := &FoldersVirtualMachineThreatDetectionSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9921 c.name = name 9922 return c 9923 } 9924 9925 // Fields allows partial responses to be retrieved. See 9926 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9927 // details. 9928 func (c *FoldersVirtualMachineThreatDetectionSettingsCalculateCall) Fields(s ...googleapi.Field) *FoldersVirtualMachineThreatDetectionSettingsCalculateCall { 9929 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9930 return c 9931 } 9932 9933 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9934 // object's ETag matches the given value. This is useful for getting updates 9935 // only after the object has changed since the last request. 9936 func (c *FoldersVirtualMachineThreatDetectionSettingsCalculateCall) IfNoneMatch(entityTag string) *FoldersVirtualMachineThreatDetectionSettingsCalculateCall { 9937 c.ifNoneMatch_ = entityTag 9938 return c 9939 } 9940 9941 // Context sets the context to be used in this call's Do method. 9942 func (c *FoldersVirtualMachineThreatDetectionSettingsCalculateCall) Context(ctx context.Context) *FoldersVirtualMachineThreatDetectionSettingsCalculateCall { 9943 c.ctx_ = ctx 9944 return c 9945 } 9946 9947 // Header returns a http.Header that can be modified by the caller to add 9948 // headers to the request. 9949 func (c *FoldersVirtualMachineThreatDetectionSettingsCalculateCall) Header() http.Header { 9950 if c.header_ == nil { 9951 c.header_ = make(http.Header) 9952 } 9953 return c.header_ 9954 } 9955 9956 func (c *FoldersVirtualMachineThreatDetectionSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 9957 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9958 if c.ifNoneMatch_ != "" { 9959 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9960 } 9961 var body io.Reader = nil 9962 c.urlParams_.Set("alt", alt) 9963 c.urlParams_.Set("prettyPrint", "false") 9964 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 9965 urls += "?" + c.urlParams_.Encode() 9966 req, err := http.NewRequest("GET", urls, body) 9967 if err != nil { 9968 return nil, err 9969 } 9970 req.Header = reqHeaders 9971 googleapi.Expand(req.URL, map[string]string{ 9972 "name": c.name, 9973 }) 9974 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9975 } 9976 9977 // Do executes the "securitycenter.folders.virtualMachineThreatDetectionSettings.calculate" call. 9978 // Any non-2xx status code is an error. Response headers are in either 9979 // *VirtualMachineThreatDetectionSettings.ServerResponse.Header or (if a 9980 // response was returned at all) in error.(*googleapi.Error).Header. Use 9981 // googleapi.IsNotModified to check whether the returned error was because 9982 // http.StatusNotModified was returned. 9983 func (c *FoldersVirtualMachineThreatDetectionSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*VirtualMachineThreatDetectionSettings, error) { 9984 gensupport.SetOptions(c.urlParams_, opts...) 9985 res, err := c.doRequest("json") 9986 if res != nil && res.StatusCode == http.StatusNotModified { 9987 if res.Body != nil { 9988 res.Body.Close() 9989 } 9990 return nil, gensupport.WrapError(&googleapi.Error{ 9991 Code: res.StatusCode, 9992 Header: res.Header, 9993 }) 9994 } 9995 if err != nil { 9996 return nil, err 9997 } 9998 defer googleapi.CloseBody(res) 9999 if err := googleapi.CheckResponse(res); err != nil { 10000 return nil, gensupport.WrapError(err) 10001 } 10002 ret := &VirtualMachineThreatDetectionSettings{ 10003 ServerResponse: googleapi.ServerResponse{ 10004 Header: res.Header, 10005 HTTPStatusCode: res.StatusCode, 10006 }, 10007 } 10008 target := &ret 10009 if err := gensupport.DecodeResponse(target, res); err != nil { 10010 return nil, err 10011 } 10012 return ret, nil 10013 } 10014 10015 type FoldersWebSecurityScannerSettingsCalculateCall struct { 10016 s *Service 10017 name string 10018 urlParams_ gensupport.URLParams 10019 ifNoneMatch_ string 10020 ctx_ context.Context 10021 header_ http.Header 10022 } 10023 10024 // Calculate: Calculates the effective WebSecurityScannerSettings based on its 10025 // level in the resource hierarchy and its settings. Settings provided closer 10026 // to the target resource take precedence over those further away (e.g. folder 10027 // will override organization level settings). The default SCC setting for the 10028 // detector service defaults can be overridden at organization, folder and 10029 // project levels. No assumptions should be made about the SCC defaults as it 10030 // is considered an internal implementation detail. 10031 // 10032 // - name: The name of the WebSecurityScannerSettings to calculate. Formats: * 10033 // organizations/{organization}/webSecurityScannerSettings * 10034 // folders/{folder}/webSecurityScannerSettings * 10035 // projects/{project}/webSecurityScannerSettings. 10036 func (r *FoldersWebSecurityScannerSettingsService) Calculate(name string) *FoldersWebSecurityScannerSettingsCalculateCall { 10037 c := &FoldersWebSecurityScannerSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10038 c.name = name 10039 return c 10040 } 10041 10042 // Fields allows partial responses to be retrieved. See 10043 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10044 // details. 10045 func (c *FoldersWebSecurityScannerSettingsCalculateCall) Fields(s ...googleapi.Field) *FoldersWebSecurityScannerSettingsCalculateCall { 10046 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10047 return c 10048 } 10049 10050 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10051 // object's ETag matches the given value. This is useful for getting updates 10052 // only after the object has changed since the last request. 10053 func (c *FoldersWebSecurityScannerSettingsCalculateCall) IfNoneMatch(entityTag string) *FoldersWebSecurityScannerSettingsCalculateCall { 10054 c.ifNoneMatch_ = entityTag 10055 return c 10056 } 10057 10058 // Context sets the context to be used in this call's Do method. 10059 func (c *FoldersWebSecurityScannerSettingsCalculateCall) Context(ctx context.Context) *FoldersWebSecurityScannerSettingsCalculateCall { 10060 c.ctx_ = ctx 10061 return c 10062 } 10063 10064 // Header returns a http.Header that can be modified by the caller to add 10065 // headers to the request. 10066 func (c *FoldersWebSecurityScannerSettingsCalculateCall) Header() http.Header { 10067 if c.header_ == nil { 10068 c.header_ = make(http.Header) 10069 } 10070 return c.header_ 10071 } 10072 10073 func (c *FoldersWebSecurityScannerSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 10074 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10075 if c.ifNoneMatch_ != "" { 10076 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10077 } 10078 var body io.Reader = nil 10079 c.urlParams_.Set("alt", alt) 10080 c.urlParams_.Set("prettyPrint", "false") 10081 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 10082 urls += "?" + c.urlParams_.Encode() 10083 req, err := http.NewRequest("GET", urls, body) 10084 if err != nil { 10085 return nil, err 10086 } 10087 req.Header = reqHeaders 10088 googleapi.Expand(req.URL, map[string]string{ 10089 "name": c.name, 10090 }) 10091 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10092 } 10093 10094 // Do executes the "securitycenter.folders.webSecurityScannerSettings.calculate" call. 10095 // Any non-2xx status code is an error. Response headers are in either 10096 // *WebSecurityScannerSettings.ServerResponse.Header or (if a response was 10097 // returned at all) in error.(*googleapi.Error).Header. Use 10098 // googleapi.IsNotModified to check whether the returned error was because 10099 // http.StatusNotModified was returned. 10100 func (c *FoldersWebSecurityScannerSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*WebSecurityScannerSettings, error) { 10101 gensupport.SetOptions(c.urlParams_, opts...) 10102 res, err := c.doRequest("json") 10103 if res != nil && res.StatusCode == http.StatusNotModified { 10104 if res.Body != nil { 10105 res.Body.Close() 10106 } 10107 return nil, gensupport.WrapError(&googleapi.Error{ 10108 Code: res.StatusCode, 10109 Header: res.Header, 10110 }) 10111 } 10112 if err != nil { 10113 return nil, err 10114 } 10115 defer googleapi.CloseBody(res) 10116 if err := googleapi.CheckResponse(res); err != nil { 10117 return nil, gensupport.WrapError(err) 10118 } 10119 ret := &WebSecurityScannerSettings{ 10120 ServerResponse: googleapi.ServerResponse{ 10121 Header: res.Header, 10122 HTTPStatusCode: res.StatusCode, 10123 }, 10124 } 10125 target := &ret 10126 if err := gensupport.DecodeResponse(target, res); err != nil { 10127 return nil, err 10128 } 10129 return ret, nil 10130 } 10131 10132 type OrganizationsGetContainerThreatDetectionSettingsCall struct { 10133 s *Service 10134 name string 10135 urlParams_ gensupport.URLParams 10136 ifNoneMatch_ string 10137 ctx_ context.Context 10138 header_ http.Header 10139 } 10140 10141 // GetContainerThreatDetectionSettings: Get the 10142 // ContainerThreatDetectionSettings resource. In the returned settings 10143 // response, a missing field only indicates that it was not explicitly set, so 10144 // no assumption should be made about these fields. In other words, 10145 // GetContainerThreatDetectionSettings does not calculate the effective service 10146 // settings for the resource, which accounts for inherited settings and 10147 // defaults. Instead, use CalculateContainerThreatDetectionSettings for this 10148 // purpose. 10149 // 10150 // - name: The name of the ContainerThreatDetectionSettings to retrieve. 10151 // Formats: * organizations/{organization}/containerThreatDetectionSettings * 10152 // folders/{folder}/containerThreatDetectionSettings * 10153 // projects/{project}/containerThreatDetectionSettings * 10154 // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatD 10155 // etectionSettings. 10156 func (r *OrganizationsService) GetContainerThreatDetectionSettings(name string) *OrganizationsGetContainerThreatDetectionSettingsCall { 10157 c := &OrganizationsGetContainerThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10158 c.name = name 10159 return c 10160 } 10161 10162 // Fields allows partial responses to be retrieved. See 10163 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10164 // details. 10165 func (c *OrganizationsGetContainerThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetContainerThreatDetectionSettingsCall { 10166 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10167 return c 10168 } 10169 10170 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10171 // object's ETag matches the given value. This is useful for getting updates 10172 // only after the object has changed since the last request. 10173 func (c *OrganizationsGetContainerThreatDetectionSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetContainerThreatDetectionSettingsCall { 10174 c.ifNoneMatch_ = entityTag 10175 return c 10176 } 10177 10178 // Context sets the context to be used in this call's Do method. 10179 func (c *OrganizationsGetContainerThreatDetectionSettingsCall) Context(ctx context.Context) *OrganizationsGetContainerThreatDetectionSettingsCall { 10180 c.ctx_ = ctx 10181 return c 10182 } 10183 10184 // Header returns a http.Header that can be modified by the caller to add 10185 // headers to the request. 10186 func (c *OrganizationsGetContainerThreatDetectionSettingsCall) Header() http.Header { 10187 if c.header_ == nil { 10188 c.header_ = make(http.Header) 10189 } 10190 return c.header_ 10191 } 10192 10193 func (c *OrganizationsGetContainerThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 10194 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10195 if c.ifNoneMatch_ != "" { 10196 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10197 } 10198 var body io.Reader = nil 10199 c.urlParams_.Set("alt", alt) 10200 c.urlParams_.Set("prettyPrint", "false") 10201 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 10202 urls += "?" + c.urlParams_.Encode() 10203 req, err := http.NewRequest("GET", urls, body) 10204 if err != nil { 10205 return nil, err 10206 } 10207 req.Header = reqHeaders 10208 googleapi.Expand(req.URL, map[string]string{ 10209 "name": c.name, 10210 }) 10211 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10212 } 10213 10214 // Do executes the "securitycenter.organizations.getContainerThreatDetectionSettings" call. 10215 // Any non-2xx status code is an error. Response headers are in either 10216 // *ContainerThreatDetectionSettings.ServerResponse.Header or (if a response 10217 // was returned at all) in error.(*googleapi.Error).Header. Use 10218 // googleapi.IsNotModified to check whether the returned error was because 10219 // http.StatusNotModified was returned. 10220 func (c *OrganizationsGetContainerThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*ContainerThreatDetectionSettings, error) { 10221 gensupport.SetOptions(c.urlParams_, opts...) 10222 res, err := c.doRequest("json") 10223 if res != nil && res.StatusCode == http.StatusNotModified { 10224 if res.Body != nil { 10225 res.Body.Close() 10226 } 10227 return nil, gensupport.WrapError(&googleapi.Error{ 10228 Code: res.StatusCode, 10229 Header: res.Header, 10230 }) 10231 } 10232 if err != nil { 10233 return nil, err 10234 } 10235 defer googleapi.CloseBody(res) 10236 if err := googleapi.CheckResponse(res); err != nil { 10237 return nil, gensupport.WrapError(err) 10238 } 10239 ret := &ContainerThreatDetectionSettings{ 10240 ServerResponse: googleapi.ServerResponse{ 10241 Header: res.Header, 10242 HTTPStatusCode: res.StatusCode, 10243 }, 10244 } 10245 target := &ret 10246 if err := gensupport.DecodeResponse(target, res); err != nil { 10247 return nil, err 10248 } 10249 return ret, nil 10250 } 10251 10252 type OrganizationsGetEventThreatDetectionSettingsCall struct { 10253 s *Service 10254 name string 10255 urlParams_ gensupport.URLParams 10256 ifNoneMatch_ string 10257 ctx_ context.Context 10258 header_ http.Header 10259 } 10260 10261 // GetEventThreatDetectionSettings: Get the EventThreatDetectionSettings 10262 // resource. In the returned settings response, a missing field only indicates 10263 // that it was not explicitly set, so no assumption should be made about these 10264 // fields. In other words, GetEventThreatDetectionSettings does not calculate 10265 // the effective service settings for the resource, which accounts for 10266 // inherited settings and defaults. Instead, use 10267 // CalculateEventThreatDetectionSettings for this purpose. 10268 // 10269 // - name: The name of the EventThreatDetectionSettings to retrieve. Formats: * 10270 // organizations/{organization}/eventThreatDetectionSettings * 10271 // folders/{folder}/eventThreatDetectionSettings * 10272 // projects/{project}/eventThreatDetectionSettings. 10273 func (r *OrganizationsService) GetEventThreatDetectionSettings(name string) *OrganizationsGetEventThreatDetectionSettingsCall { 10274 c := &OrganizationsGetEventThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10275 c.name = name 10276 return c 10277 } 10278 10279 // Fields allows partial responses to be retrieved. See 10280 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10281 // details. 10282 func (c *OrganizationsGetEventThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetEventThreatDetectionSettingsCall { 10283 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10284 return c 10285 } 10286 10287 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10288 // object's ETag matches the given value. This is useful for getting updates 10289 // only after the object has changed since the last request. 10290 func (c *OrganizationsGetEventThreatDetectionSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetEventThreatDetectionSettingsCall { 10291 c.ifNoneMatch_ = entityTag 10292 return c 10293 } 10294 10295 // Context sets the context to be used in this call's Do method. 10296 func (c *OrganizationsGetEventThreatDetectionSettingsCall) Context(ctx context.Context) *OrganizationsGetEventThreatDetectionSettingsCall { 10297 c.ctx_ = ctx 10298 return c 10299 } 10300 10301 // Header returns a http.Header that can be modified by the caller to add 10302 // headers to the request. 10303 func (c *OrganizationsGetEventThreatDetectionSettingsCall) Header() http.Header { 10304 if c.header_ == nil { 10305 c.header_ = make(http.Header) 10306 } 10307 return c.header_ 10308 } 10309 10310 func (c *OrganizationsGetEventThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 10311 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10312 if c.ifNoneMatch_ != "" { 10313 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10314 } 10315 var body io.Reader = nil 10316 c.urlParams_.Set("alt", alt) 10317 c.urlParams_.Set("prettyPrint", "false") 10318 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 10319 urls += "?" + c.urlParams_.Encode() 10320 req, err := http.NewRequest("GET", urls, body) 10321 if err != nil { 10322 return nil, err 10323 } 10324 req.Header = reqHeaders 10325 googleapi.Expand(req.URL, map[string]string{ 10326 "name": c.name, 10327 }) 10328 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10329 } 10330 10331 // Do executes the "securitycenter.organizations.getEventThreatDetectionSettings" call. 10332 // Any non-2xx status code is an error. Response headers are in either 10333 // *EventThreatDetectionSettings.ServerResponse.Header or (if a response was 10334 // returned at all) in error.(*googleapi.Error).Header. Use 10335 // googleapi.IsNotModified to check whether the returned error was because 10336 // http.StatusNotModified was returned. 10337 func (c *OrganizationsGetEventThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionSettings, error) { 10338 gensupport.SetOptions(c.urlParams_, opts...) 10339 res, err := c.doRequest("json") 10340 if res != nil && res.StatusCode == http.StatusNotModified { 10341 if res.Body != nil { 10342 res.Body.Close() 10343 } 10344 return nil, gensupport.WrapError(&googleapi.Error{ 10345 Code: res.StatusCode, 10346 Header: res.Header, 10347 }) 10348 } 10349 if err != nil { 10350 return nil, err 10351 } 10352 defer googleapi.CloseBody(res) 10353 if err := googleapi.CheckResponse(res); err != nil { 10354 return nil, gensupport.WrapError(err) 10355 } 10356 ret := &EventThreatDetectionSettings{ 10357 ServerResponse: googleapi.ServerResponse{ 10358 Header: res.Header, 10359 HTTPStatusCode: res.StatusCode, 10360 }, 10361 } 10362 target := &ret 10363 if err := gensupport.DecodeResponse(target, res); err != nil { 10364 return nil, err 10365 } 10366 return ret, nil 10367 } 10368 10369 type OrganizationsGetRapidVulnerabilityDetectionSettingsCall struct { 10370 s *Service 10371 name string 10372 urlParams_ gensupport.URLParams 10373 ifNoneMatch_ string 10374 ctx_ context.Context 10375 header_ http.Header 10376 } 10377 10378 // GetRapidVulnerabilityDetectionSettings: Get the 10379 // RapidVulnerabilityDetectionSettings resource. In the returned settings 10380 // response, a missing field only indicates that it was not explicitly set, so 10381 // no assumption should be made about these fields. In other words, 10382 // GetRapidVulnerabilityDetectionSettings does not calculate the effective 10383 // service settings for the resource, which accounts for inherited settings and 10384 // defaults. Instead, use CalculateRapidVulnerabilityDetectionSettings for this 10385 // purpose. 10386 // 10387 // - name: The name of the RapidVulnerabilityDetectionSettings to retrieve. 10388 // Formats: * 10389 // organizations/{organization}/rapidVulnerabilityDetectionSettings * 10390 // folders/{folder}/rapidVulnerabilityDetectionSettings * 10391 // projects/{project}/rapidVulnerabilityDetectionSettings. 10392 func (r *OrganizationsService) GetRapidVulnerabilityDetectionSettings(name string) *OrganizationsGetRapidVulnerabilityDetectionSettingsCall { 10393 c := &OrganizationsGetRapidVulnerabilityDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10394 c.name = name 10395 return c 10396 } 10397 10398 // Fields allows partial responses to be retrieved. See 10399 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10400 // details. 10401 func (c *OrganizationsGetRapidVulnerabilityDetectionSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetRapidVulnerabilityDetectionSettingsCall { 10402 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10403 return c 10404 } 10405 10406 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10407 // object's ETag matches the given value. This is useful for getting updates 10408 // only after the object has changed since the last request. 10409 func (c *OrganizationsGetRapidVulnerabilityDetectionSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetRapidVulnerabilityDetectionSettingsCall { 10410 c.ifNoneMatch_ = entityTag 10411 return c 10412 } 10413 10414 // Context sets the context to be used in this call's Do method. 10415 func (c *OrganizationsGetRapidVulnerabilityDetectionSettingsCall) Context(ctx context.Context) *OrganizationsGetRapidVulnerabilityDetectionSettingsCall { 10416 c.ctx_ = ctx 10417 return c 10418 } 10419 10420 // Header returns a http.Header that can be modified by the caller to add 10421 // headers to the request. 10422 func (c *OrganizationsGetRapidVulnerabilityDetectionSettingsCall) Header() http.Header { 10423 if c.header_ == nil { 10424 c.header_ = make(http.Header) 10425 } 10426 return c.header_ 10427 } 10428 10429 func (c *OrganizationsGetRapidVulnerabilityDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 10430 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10431 if c.ifNoneMatch_ != "" { 10432 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10433 } 10434 var body io.Reader = nil 10435 c.urlParams_.Set("alt", alt) 10436 c.urlParams_.Set("prettyPrint", "false") 10437 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 10438 urls += "?" + c.urlParams_.Encode() 10439 req, err := http.NewRequest("GET", urls, body) 10440 if err != nil { 10441 return nil, err 10442 } 10443 req.Header = reqHeaders 10444 googleapi.Expand(req.URL, map[string]string{ 10445 "name": c.name, 10446 }) 10447 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10448 } 10449 10450 // Do executes the "securitycenter.organizations.getRapidVulnerabilityDetectionSettings" call. 10451 // Any non-2xx status code is an error. Response headers are in either 10452 // *RapidVulnerabilityDetectionSettings.ServerResponse.Header or (if a response 10453 // was returned at all) in error.(*googleapi.Error).Header. Use 10454 // googleapi.IsNotModified to check whether the returned error was because 10455 // http.StatusNotModified was returned. 10456 func (c *OrganizationsGetRapidVulnerabilityDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { 10457 gensupport.SetOptions(c.urlParams_, opts...) 10458 res, err := c.doRequest("json") 10459 if res != nil && res.StatusCode == http.StatusNotModified { 10460 if res.Body != nil { 10461 res.Body.Close() 10462 } 10463 return nil, gensupport.WrapError(&googleapi.Error{ 10464 Code: res.StatusCode, 10465 Header: res.Header, 10466 }) 10467 } 10468 if err != nil { 10469 return nil, err 10470 } 10471 defer googleapi.CloseBody(res) 10472 if err := googleapi.CheckResponse(res); err != nil { 10473 return nil, gensupport.WrapError(err) 10474 } 10475 ret := &RapidVulnerabilityDetectionSettings{ 10476 ServerResponse: googleapi.ServerResponse{ 10477 Header: res.Header, 10478 HTTPStatusCode: res.StatusCode, 10479 }, 10480 } 10481 target := &ret 10482 if err := gensupport.DecodeResponse(target, res); err != nil { 10483 return nil, err 10484 } 10485 return ret, nil 10486 } 10487 10488 type OrganizationsGetSecurityCenterSettingsCall struct { 10489 s *Service 10490 name string 10491 urlParams_ gensupport.URLParams 10492 ifNoneMatch_ string 10493 ctx_ context.Context 10494 header_ http.Header 10495 } 10496 10497 // GetSecurityCenterSettings: Get the SecurityCenterSettings resource. 10498 // 10499 // - name: The name of the SecurityCenterSettings to retrieve. Format: 10500 // organizations/{organization}/securityCenterSettings Format: 10501 // folders/{folder}/securityCenterSettings Format: 10502 // projects/{project}/securityCenterSettings. 10503 func (r *OrganizationsService) GetSecurityCenterSettings(name string) *OrganizationsGetSecurityCenterSettingsCall { 10504 c := &OrganizationsGetSecurityCenterSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10505 c.name = name 10506 return c 10507 } 10508 10509 // Fields allows partial responses to be retrieved. See 10510 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10511 // details. 10512 func (c *OrganizationsGetSecurityCenterSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetSecurityCenterSettingsCall { 10513 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10514 return c 10515 } 10516 10517 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10518 // object's ETag matches the given value. This is useful for getting updates 10519 // only after the object has changed since the last request. 10520 func (c *OrganizationsGetSecurityCenterSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetSecurityCenterSettingsCall { 10521 c.ifNoneMatch_ = entityTag 10522 return c 10523 } 10524 10525 // Context sets the context to be used in this call's Do method. 10526 func (c *OrganizationsGetSecurityCenterSettingsCall) Context(ctx context.Context) *OrganizationsGetSecurityCenterSettingsCall { 10527 c.ctx_ = ctx 10528 return c 10529 } 10530 10531 // Header returns a http.Header that can be modified by the caller to add 10532 // headers to the request. 10533 func (c *OrganizationsGetSecurityCenterSettingsCall) Header() http.Header { 10534 if c.header_ == nil { 10535 c.header_ = make(http.Header) 10536 } 10537 return c.header_ 10538 } 10539 10540 func (c *OrganizationsGetSecurityCenterSettingsCall) doRequest(alt string) (*http.Response, error) { 10541 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10542 if c.ifNoneMatch_ != "" { 10543 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10544 } 10545 var body io.Reader = nil 10546 c.urlParams_.Set("alt", alt) 10547 c.urlParams_.Set("prettyPrint", "false") 10548 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 10549 urls += "?" + c.urlParams_.Encode() 10550 req, err := http.NewRequest("GET", urls, body) 10551 if err != nil { 10552 return nil, err 10553 } 10554 req.Header = reqHeaders 10555 googleapi.Expand(req.URL, map[string]string{ 10556 "name": c.name, 10557 }) 10558 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10559 } 10560 10561 // Do executes the "securitycenter.organizations.getSecurityCenterSettings" call. 10562 // Any non-2xx status code is an error. Response headers are in either 10563 // *SecurityCenterSettings.ServerResponse.Header or (if a response was returned 10564 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10565 // check whether the returned error was because http.StatusNotModified was 10566 // returned. 10567 func (c *OrganizationsGetSecurityCenterSettingsCall) Do(opts ...googleapi.CallOption) (*SecurityCenterSettings, error) { 10568 gensupport.SetOptions(c.urlParams_, opts...) 10569 res, err := c.doRequest("json") 10570 if res != nil && res.StatusCode == http.StatusNotModified { 10571 if res.Body != nil { 10572 res.Body.Close() 10573 } 10574 return nil, gensupport.WrapError(&googleapi.Error{ 10575 Code: res.StatusCode, 10576 Header: res.Header, 10577 }) 10578 } 10579 if err != nil { 10580 return nil, err 10581 } 10582 defer googleapi.CloseBody(res) 10583 if err := googleapi.CheckResponse(res); err != nil { 10584 return nil, gensupport.WrapError(err) 10585 } 10586 ret := &SecurityCenterSettings{ 10587 ServerResponse: googleapi.ServerResponse{ 10588 Header: res.Header, 10589 HTTPStatusCode: res.StatusCode, 10590 }, 10591 } 10592 target := &ret 10593 if err := gensupport.DecodeResponse(target, res); err != nil { 10594 return nil, err 10595 } 10596 return ret, nil 10597 } 10598 10599 type OrganizationsGetSecurityHealthAnalyticsSettingsCall struct { 10600 s *Service 10601 name string 10602 urlParams_ gensupport.URLParams 10603 ifNoneMatch_ string 10604 ctx_ context.Context 10605 header_ http.Header 10606 } 10607 10608 // GetSecurityHealthAnalyticsSettings: Get the SecurityHealthAnalyticsSettings 10609 // resource. In the returned settings response, a missing field only indicates 10610 // that it was not explicitly set, so no assumption should be made about these 10611 // fields. In other words, GetSecurityHealthAnalyticsSettings does not 10612 // calculate the effective service settings for the resource, which accounts 10613 // for inherited settings and defaults. Instead, use 10614 // CalculateSecurityHealthAnalyticsSettings for this purpose. 10615 // 10616 // - name: The name of the SecurityHealthAnalyticsSettings to retrieve. 10617 // Formats: * organizations/{organization}/securityHealthAnalyticsSettings * 10618 // folders/{folder}/securityHealthAnalyticsSettings * 10619 // projects/{project}/securityHealthAnalyticsSettings. 10620 func (r *OrganizationsService) GetSecurityHealthAnalyticsSettings(name string) *OrganizationsGetSecurityHealthAnalyticsSettingsCall { 10621 c := &OrganizationsGetSecurityHealthAnalyticsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10622 c.name = name 10623 return c 10624 } 10625 10626 // Fields allows partial responses to be retrieved. See 10627 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10628 // details. 10629 func (c *OrganizationsGetSecurityHealthAnalyticsSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetSecurityHealthAnalyticsSettingsCall { 10630 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10631 return c 10632 } 10633 10634 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10635 // object's ETag matches the given value. This is useful for getting updates 10636 // only after the object has changed since the last request. 10637 func (c *OrganizationsGetSecurityHealthAnalyticsSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetSecurityHealthAnalyticsSettingsCall { 10638 c.ifNoneMatch_ = entityTag 10639 return c 10640 } 10641 10642 // Context sets the context to be used in this call's Do method. 10643 func (c *OrganizationsGetSecurityHealthAnalyticsSettingsCall) Context(ctx context.Context) *OrganizationsGetSecurityHealthAnalyticsSettingsCall { 10644 c.ctx_ = ctx 10645 return c 10646 } 10647 10648 // Header returns a http.Header that can be modified by the caller to add 10649 // headers to the request. 10650 func (c *OrganizationsGetSecurityHealthAnalyticsSettingsCall) Header() http.Header { 10651 if c.header_ == nil { 10652 c.header_ = make(http.Header) 10653 } 10654 return c.header_ 10655 } 10656 10657 func (c *OrganizationsGetSecurityHealthAnalyticsSettingsCall) doRequest(alt string) (*http.Response, error) { 10658 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10659 if c.ifNoneMatch_ != "" { 10660 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10661 } 10662 var body io.Reader = nil 10663 c.urlParams_.Set("alt", alt) 10664 c.urlParams_.Set("prettyPrint", "false") 10665 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 10666 urls += "?" + c.urlParams_.Encode() 10667 req, err := http.NewRequest("GET", urls, body) 10668 if err != nil { 10669 return nil, err 10670 } 10671 req.Header = reqHeaders 10672 googleapi.Expand(req.URL, map[string]string{ 10673 "name": c.name, 10674 }) 10675 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10676 } 10677 10678 // Do executes the "securitycenter.organizations.getSecurityHealthAnalyticsSettings" call. 10679 // Any non-2xx status code is an error. Response headers are in either 10680 // *SecurityHealthAnalyticsSettings.ServerResponse.Header or (if a response was 10681 // returned at all) in error.(*googleapi.Error).Header. Use 10682 // googleapi.IsNotModified to check whether the returned error was because 10683 // http.StatusNotModified was returned. 10684 func (c *OrganizationsGetSecurityHealthAnalyticsSettingsCall) Do(opts ...googleapi.CallOption) (*SecurityHealthAnalyticsSettings, error) { 10685 gensupport.SetOptions(c.urlParams_, opts...) 10686 res, err := c.doRequest("json") 10687 if res != nil && res.StatusCode == http.StatusNotModified { 10688 if res.Body != nil { 10689 res.Body.Close() 10690 } 10691 return nil, gensupport.WrapError(&googleapi.Error{ 10692 Code: res.StatusCode, 10693 Header: res.Header, 10694 }) 10695 } 10696 if err != nil { 10697 return nil, err 10698 } 10699 defer googleapi.CloseBody(res) 10700 if err := googleapi.CheckResponse(res); err != nil { 10701 return nil, gensupport.WrapError(err) 10702 } 10703 ret := &SecurityHealthAnalyticsSettings{ 10704 ServerResponse: googleapi.ServerResponse{ 10705 Header: res.Header, 10706 HTTPStatusCode: res.StatusCode, 10707 }, 10708 } 10709 target := &ret 10710 if err := gensupport.DecodeResponse(target, res); err != nil { 10711 return nil, err 10712 } 10713 return ret, nil 10714 } 10715 10716 type OrganizationsGetSubscriptionCall struct { 10717 s *Service 10718 name string 10719 urlParams_ gensupport.URLParams 10720 ifNoneMatch_ string 10721 ctx_ context.Context 10722 header_ http.Header 10723 } 10724 10725 // GetSubscription: Get the Subscription resource. 10726 // 10727 // - name: The name of the subscription to retrieve. Format: 10728 // organizations/{organization}/subscription. 10729 func (r *OrganizationsService) GetSubscription(name string) *OrganizationsGetSubscriptionCall { 10730 c := &OrganizationsGetSubscriptionCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10731 c.name = name 10732 return c 10733 } 10734 10735 // Fields allows partial responses to be retrieved. See 10736 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10737 // details. 10738 func (c *OrganizationsGetSubscriptionCall) Fields(s ...googleapi.Field) *OrganizationsGetSubscriptionCall { 10739 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10740 return c 10741 } 10742 10743 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10744 // object's ETag matches the given value. This is useful for getting updates 10745 // only after the object has changed since the last request. 10746 func (c *OrganizationsGetSubscriptionCall) IfNoneMatch(entityTag string) *OrganizationsGetSubscriptionCall { 10747 c.ifNoneMatch_ = entityTag 10748 return c 10749 } 10750 10751 // Context sets the context to be used in this call's Do method. 10752 func (c *OrganizationsGetSubscriptionCall) Context(ctx context.Context) *OrganizationsGetSubscriptionCall { 10753 c.ctx_ = ctx 10754 return c 10755 } 10756 10757 // Header returns a http.Header that can be modified by the caller to add 10758 // headers to the request. 10759 func (c *OrganizationsGetSubscriptionCall) Header() http.Header { 10760 if c.header_ == nil { 10761 c.header_ = make(http.Header) 10762 } 10763 return c.header_ 10764 } 10765 10766 func (c *OrganizationsGetSubscriptionCall) doRequest(alt string) (*http.Response, error) { 10767 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10768 if c.ifNoneMatch_ != "" { 10769 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10770 } 10771 var body io.Reader = nil 10772 c.urlParams_.Set("alt", alt) 10773 c.urlParams_.Set("prettyPrint", "false") 10774 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 10775 urls += "?" + c.urlParams_.Encode() 10776 req, err := http.NewRequest("GET", urls, body) 10777 if err != nil { 10778 return nil, err 10779 } 10780 req.Header = reqHeaders 10781 googleapi.Expand(req.URL, map[string]string{ 10782 "name": c.name, 10783 }) 10784 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10785 } 10786 10787 // Do executes the "securitycenter.organizations.getSubscription" call. 10788 // Any non-2xx status code is an error. Response headers are in either 10789 // *Subscription.ServerResponse.Header or (if a response was returned at all) 10790 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10791 // whether the returned error was because http.StatusNotModified was returned. 10792 func (c *OrganizationsGetSubscriptionCall) Do(opts ...googleapi.CallOption) (*Subscription, error) { 10793 gensupport.SetOptions(c.urlParams_, opts...) 10794 res, err := c.doRequest("json") 10795 if res != nil && res.StatusCode == http.StatusNotModified { 10796 if res.Body != nil { 10797 res.Body.Close() 10798 } 10799 return nil, gensupport.WrapError(&googleapi.Error{ 10800 Code: res.StatusCode, 10801 Header: res.Header, 10802 }) 10803 } 10804 if err != nil { 10805 return nil, err 10806 } 10807 defer googleapi.CloseBody(res) 10808 if err := googleapi.CheckResponse(res); err != nil { 10809 return nil, gensupport.WrapError(err) 10810 } 10811 ret := &Subscription{ 10812 ServerResponse: googleapi.ServerResponse{ 10813 Header: res.Header, 10814 HTTPStatusCode: res.StatusCode, 10815 }, 10816 } 10817 target := &ret 10818 if err := gensupport.DecodeResponse(target, res); err != nil { 10819 return nil, err 10820 } 10821 return ret, nil 10822 } 10823 10824 type OrganizationsGetVirtualMachineThreatDetectionSettingsCall struct { 10825 s *Service 10826 name string 10827 urlParams_ gensupport.URLParams 10828 ifNoneMatch_ string 10829 ctx_ context.Context 10830 header_ http.Header 10831 } 10832 10833 // GetVirtualMachineThreatDetectionSettings: Get the 10834 // VirtualMachineThreatDetectionSettings resource. In the returned settings 10835 // response, a missing field only indicates that it was not explicitly set, so 10836 // no assumption should be made about these fields. In other words, 10837 // GetVirtualMachineThreatDetectionSettings does not calculate the effective 10838 // service settings for the resource, which accounts for inherited settings and 10839 // defaults. Instead, use CalculateVirtualMachineThreatDetectionSettings for 10840 // this purpose. 10841 // 10842 // - name: The name of the VirtualMachineThreatDetectionSettings to retrieve. 10843 // Formats: * 10844 // organizations/{organization}/virtualMachineThreatDetectionSettings * 10845 // folders/{folder}/virtualMachineThreatDetectionSettings * 10846 // projects/{project}/virtualMachineThreatDetectionSettings. 10847 func (r *OrganizationsService) GetVirtualMachineThreatDetectionSettings(name string) *OrganizationsGetVirtualMachineThreatDetectionSettingsCall { 10848 c := &OrganizationsGetVirtualMachineThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10849 c.name = name 10850 return c 10851 } 10852 10853 // Fields allows partial responses to be retrieved. See 10854 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10855 // details. 10856 func (c *OrganizationsGetVirtualMachineThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetVirtualMachineThreatDetectionSettingsCall { 10857 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10858 return c 10859 } 10860 10861 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10862 // object's ETag matches the given value. This is useful for getting updates 10863 // only after the object has changed since the last request. 10864 func (c *OrganizationsGetVirtualMachineThreatDetectionSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetVirtualMachineThreatDetectionSettingsCall { 10865 c.ifNoneMatch_ = entityTag 10866 return c 10867 } 10868 10869 // Context sets the context to be used in this call's Do method. 10870 func (c *OrganizationsGetVirtualMachineThreatDetectionSettingsCall) Context(ctx context.Context) *OrganizationsGetVirtualMachineThreatDetectionSettingsCall { 10871 c.ctx_ = ctx 10872 return c 10873 } 10874 10875 // Header returns a http.Header that can be modified by the caller to add 10876 // headers to the request. 10877 func (c *OrganizationsGetVirtualMachineThreatDetectionSettingsCall) Header() http.Header { 10878 if c.header_ == nil { 10879 c.header_ = make(http.Header) 10880 } 10881 return c.header_ 10882 } 10883 10884 func (c *OrganizationsGetVirtualMachineThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 10885 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10886 if c.ifNoneMatch_ != "" { 10887 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10888 } 10889 var body io.Reader = nil 10890 c.urlParams_.Set("alt", alt) 10891 c.urlParams_.Set("prettyPrint", "false") 10892 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 10893 urls += "?" + c.urlParams_.Encode() 10894 req, err := http.NewRequest("GET", urls, body) 10895 if err != nil { 10896 return nil, err 10897 } 10898 req.Header = reqHeaders 10899 googleapi.Expand(req.URL, map[string]string{ 10900 "name": c.name, 10901 }) 10902 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10903 } 10904 10905 // Do executes the "securitycenter.organizations.getVirtualMachineThreatDetectionSettings" call. 10906 // Any non-2xx status code is an error. Response headers are in either 10907 // *VirtualMachineThreatDetectionSettings.ServerResponse.Header or (if a 10908 // response was returned at all) in error.(*googleapi.Error).Header. Use 10909 // googleapi.IsNotModified to check whether the returned error was because 10910 // http.StatusNotModified was returned. 10911 func (c *OrganizationsGetVirtualMachineThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*VirtualMachineThreatDetectionSettings, error) { 10912 gensupport.SetOptions(c.urlParams_, opts...) 10913 res, err := c.doRequest("json") 10914 if res != nil && res.StatusCode == http.StatusNotModified { 10915 if res.Body != nil { 10916 res.Body.Close() 10917 } 10918 return nil, gensupport.WrapError(&googleapi.Error{ 10919 Code: res.StatusCode, 10920 Header: res.Header, 10921 }) 10922 } 10923 if err != nil { 10924 return nil, err 10925 } 10926 defer googleapi.CloseBody(res) 10927 if err := googleapi.CheckResponse(res); err != nil { 10928 return nil, gensupport.WrapError(err) 10929 } 10930 ret := &VirtualMachineThreatDetectionSettings{ 10931 ServerResponse: googleapi.ServerResponse{ 10932 Header: res.Header, 10933 HTTPStatusCode: res.StatusCode, 10934 }, 10935 } 10936 target := &ret 10937 if err := gensupport.DecodeResponse(target, res); err != nil { 10938 return nil, err 10939 } 10940 return ret, nil 10941 } 10942 10943 type OrganizationsGetWebSecurityScannerSettingsCall struct { 10944 s *Service 10945 name string 10946 urlParams_ gensupport.URLParams 10947 ifNoneMatch_ string 10948 ctx_ context.Context 10949 header_ http.Header 10950 } 10951 10952 // GetWebSecurityScannerSettings: Get the WebSecurityScannerSettings resource. 10953 // In the returned settings response, a missing field only indicates that it 10954 // was not explicitly set, so no assumption should be made about these fields. 10955 // In other words, GetWebSecurityScannerSettings does not calculate the 10956 // effective service settings for the resource, which accounts for inherited 10957 // settings and defaults. Instead, use CalculateWebSecurityScannerSettings for 10958 // this purpose. 10959 // 10960 // - name: The name of the WebSecurityScannerSettings to retrieve. Formats: * 10961 // organizations/{organization}/webSecurityScannerSettings * 10962 // folders/{folder}/webSecurityScannerSettings * 10963 // projects/{project}/webSecurityScannerSettings. 10964 func (r *OrganizationsService) GetWebSecurityScannerSettings(name string) *OrganizationsGetWebSecurityScannerSettingsCall { 10965 c := &OrganizationsGetWebSecurityScannerSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10966 c.name = name 10967 return c 10968 } 10969 10970 // Fields allows partial responses to be retrieved. See 10971 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10972 // details. 10973 func (c *OrganizationsGetWebSecurityScannerSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetWebSecurityScannerSettingsCall { 10974 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10975 return c 10976 } 10977 10978 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10979 // object's ETag matches the given value. This is useful for getting updates 10980 // only after the object has changed since the last request. 10981 func (c *OrganizationsGetWebSecurityScannerSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetWebSecurityScannerSettingsCall { 10982 c.ifNoneMatch_ = entityTag 10983 return c 10984 } 10985 10986 // Context sets the context to be used in this call's Do method. 10987 func (c *OrganizationsGetWebSecurityScannerSettingsCall) Context(ctx context.Context) *OrganizationsGetWebSecurityScannerSettingsCall { 10988 c.ctx_ = ctx 10989 return c 10990 } 10991 10992 // Header returns a http.Header that can be modified by the caller to add 10993 // headers to the request. 10994 func (c *OrganizationsGetWebSecurityScannerSettingsCall) Header() http.Header { 10995 if c.header_ == nil { 10996 c.header_ = make(http.Header) 10997 } 10998 return c.header_ 10999 } 11000 11001 func (c *OrganizationsGetWebSecurityScannerSettingsCall) doRequest(alt string) (*http.Response, error) { 11002 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11003 if c.ifNoneMatch_ != "" { 11004 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11005 } 11006 var body io.Reader = nil 11007 c.urlParams_.Set("alt", alt) 11008 c.urlParams_.Set("prettyPrint", "false") 11009 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 11010 urls += "?" + c.urlParams_.Encode() 11011 req, err := http.NewRequest("GET", urls, body) 11012 if err != nil { 11013 return nil, err 11014 } 11015 req.Header = reqHeaders 11016 googleapi.Expand(req.URL, map[string]string{ 11017 "name": c.name, 11018 }) 11019 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11020 } 11021 11022 // Do executes the "securitycenter.organizations.getWebSecurityScannerSettings" call. 11023 // Any non-2xx status code is an error. Response headers are in either 11024 // *WebSecurityScannerSettings.ServerResponse.Header or (if a response was 11025 // returned at all) in error.(*googleapi.Error).Header. Use 11026 // googleapi.IsNotModified to check whether the returned error was because 11027 // http.StatusNotModified was returned. 11028 func (c *OrganizationsGetWebSecurityScannerSettingsCall) Do(opts ...googleapi.CallOption) (*WebSecurityScannerSettings, error) { 11029 gensupport.SetOptions(c.urlParams_, opts...) 11030 res, err := c.doRequest("json") 11031 if res != nil && res.StatusCode == http.StatusNotModified { 11032 if res.Body != nil { 11033 res.Body.Close() 11034 } 11035 return nil, gensupport.WrapError(&googleapi.Error{ 11036 Code: res.StatusCode, 11037 Header: res.Header, 11038 }) 11039 } 11040 if err != nil { 11041 return nil, err 11042 } 11043 defer googleapi.CloseBody(res) 11044 if err := googleapi.CheckResponse(res); err != nil { 11045 return nil, gensupport.WrapError(err) 11046 } 11047 ret := &WebSecurityScannerSettings{ 11048 ServerResponse: googleapi.ServerResponse{ 11049 Header: res.Header, 11050 HTTPStatusCode: res.StatusCode, 11051 }, 11052 } 11053 target := &ret 11054 if err := gensupport.DecodeResponse(target, res); err != nil { 11055 return nil, err 11056 } 11057 return ret, nil 11058 } 11059 11060 type OrganizationsUpdateContainerThreatDetectionSettingsCall struct { 11061 s *Service 11062 name string 11063 containerthreatdetectionsettings *ContainerThreatDetectionSettings 11064 urlParams_ gensupport.URLParams 11065 ctx_ context.Context 11066 header_ http.Header 11067 } 11068 11069 // UpdateContainerThreatDetectionSettings: Update the 11070 // ContainerThreatDetectionSettings resource. 11071 // 11072 // - name: The resource name of the ContainerThreatDetectionSettings. Formats: 11073 // - organizations/{organization}/containerThreatDetectionSettings * 11074 // folders/{folder}/containerThreatDetectionSettings * 11075 // projects/{project}/containerThreatDetectionSettings * 11076 // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatD 11077 // etectionSettings. 11078 func (r *OrganizationsService) UpdateContainerThreatDetectionSettings(name string, containerthreatdetectionsettings *ContainerThreatDetectionSettings) *OrganizationsUpdateContainerThreatDetectionSettingsCall { 11079 c := &OrganizationsUpdateContainerThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11080 c.name = name 11081 c.containerthreatdetectionsettings = containerthreatdetectionsettings 11082 return c 11083 } 11084 11085 // UpdateMask sets the optional parameter "updateMask": The list of fields to 11086 // be updated. 11087 func (c *OrganizationsUpdateContainerThreatDetectionSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateContainerThreatDetectionSettingsCall { 11088 c.urlParams_.Set("updateMask", updateMask) 11089 return c 11090 } 11091 11092 // Fields allows partial responses to be retrieved. See 11093 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11094 // details. 11095 func (c *OrganizationsUpdateContainerThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateContainerThreatDetectionSettingsCall { 11096 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11097 return c 11098 } 11099 11100 // Context sets the context to be used in this call's Do method. 11101 func (c *OrganizationsUpdateContainerThreatDetectionSettingsCall) Context(ctx context.Context) *OrganizationsUpdateContainerThreatDetectionSettingsCall { 11102 c.ctx_ = ctx 11103 return c 11104 } 11105 11106 // Header returns a http.Header that can be modified by the caller to add 11107 // headers to the request. 11108 func (c *OrganizationsUpdateContainerThreatDetectionSettingsCall) Header() http.Header { 11109 if c.header_ == nil { 11110 c.header_ = make(http.Header) 11111 } 11112 return c.header_ 11113 } 11114 11115 func (c *OrganizationsUpdateContainerThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 11116 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11117 var body io.Reader = nil 11118 body, err := googleapi.WithoutDataWrapper.JSONReader(c.containerthreatdetectionsettings) 11119 if err != nil { 11120 return nil, err 11121 } 11122 c.urlParams_.Set("alt", alt) 11123 c.urlParams_.Set("prettyPrint", "false") 11124 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 11125 urls += "?" + c.urlParams_.Encode() 11126 req, err := http.NewRequest("PATCH", urls, body) 11127 if err != nil { 11128 return nil, err 11129 } 11130 req.Header = reqHeaders 11131 googleapi.Expand(req.URL, map[string]string{ 11132 "name": c.name, 11133 }) 11134 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11135 } 11136 11137 // Do executes the "securitycenter.organizations.updateContainerThreatDetectionSettings" call. 11138 // Any non-2xx status code is an error. Response headers are in either 11139 // *ContainerThreatDetectionSettings.ServerResponse.Header or (if a response 11140 // was returned at all) in error.(*googleapi.Error).Header. Use 11141 // googleapi.IsNotModified to check whether the returned error was because 11142 // http.StatusNotModified was returned. 11143 func (c *OrganizationsUpdateContainerThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*ContainerThreatDetectionSettings, error) { 11144 gensupport.SetOptions(c.urlParams_, opts...) 11145 res, err := c.doRequest("json") 11146 if res != nil && res.StatusCode == http.StatusNotModified { 11147 if res.Body != nil { 11148 res.Body.Close() 11149 } 11150 return nil, gensupport.WrapError(&googleapi.Error{ 11151 Code: res.StatusCode, 11152 Header: res.Header, 11153 }) 11154 } 11155 if err != nil { 11156 return nil, err 11157 } 11158 defer googleapi.CloseBody(res) 11159 if err := googleapi.CheckResponse(res); err != nil { 11160 return nil, gensupport.WrapError(err) 11161 } 11162 ret := &ContainerThreatDetectionSettings{ 11163 ServerResponse: googleapi.ServerResponse{ 11164 Header: res.Header, 11165 HTTPStatusCode: res.StatusCode, 11166 }, 11167 } 11168 target := &ret 11169 if err := gensupport.DecodeResponse(target, res); err != nil { 11170 return nil, err 11171 } 11172 return ret, nil 11173 } 11174 11175 type OrganizationsUpdateEventThreatDetectionSettingsCall struct { 11176 s *Service 11177 name string 11178 eventthreatdetectionsettings *EventThreatDetectionSettings 11179 urlParams_ gensupport.URLParams 11180 ctx_ context.Context 11181 header_ http.Header 11182 } 11183 11184 // UpdateEventThreatDetectionSettings: Update the EventThreatDetectionSettings 11185 // resource. 11186 // 11187 // - name: The resource name of the EventThreatDetectionSettings. Formats: * 11188 // organizations/{organization}/eventThreatDetectionSettings * 11189 // folders/{folder}/eventThreatDetectionSettings * 11190 // projects/{project}/eventThreatDetectionSettings. 11191 func (r *OrganizationsService) UpdateEventThreatDetectionSettings(name string, eventthreatdetectionsettings *EventThreatDetectionSettings) *OrganizationsUpdateEventThreatDetectionSettingsCall { 11192 c := &OrganizationsUpdateEventThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11193 c.name = name 11194 c.eventthreatdetectionsettings = eventthreatdetectionsettings 11195 return c 11196 } 11197 11198 // UpdateMask sets the optional parameter "updateMask": The list of fields to 11199 // be updated. 11200 func (c *OrganizationsUpdateEventThreatDetectionSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateEventThreatDetectionSettingsCall { 11201 c.urlParams_.Set("updateMask", updateMask) 11202 return c 11203 } 11204 11205 // Fields allows partial responses to be retrieved. See 11206 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11207 // details. 11208 func (c *OrganizationsUpdateEventThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateEventThreatDetectionSettingsCall { 11209 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11210 return c 11211 } 11212 11213 // Context sets the context to be used in this call's Do method. 11214 func (c *OrganizationsUpdateEventThreatDetectionSettingsCall) Context(ctx context.Context) *OrganizationsUpdateEventThreatDetectionSettingsCall { 11215 c.ctx_ = ctx 11216 return c 11217 } 11218 11219 // Header returns a http.Header that can be modified by the caller to add 11220 // headers to the request. 11221 func (c *OrganizationsUpdateEventThreatDetectionSettingsCall) Header() http.Header { 11222 if c.header_ == nil { 11223 c.header_ = make(http.Header) 11224 } 11225 return c.header_ 11226 } 11227 11228 func (c *OrganizationsUpdateEventThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 11229 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11230 var body io.Reader = nil 11231 body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventthreatdetectionsettings) 11232 if err != nil { 11233 return nil, err 11234 } 11235 c.urlParams_.Set("alt", alt) 11236 c.urlParams_.Set("prettyPrint", "false") 11237 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 11238 urls += "?" + c.urlParams_.Encode() 11239 req, err := http.NewRequest("PATCH", urls, body) 11240 if err != nil { 11241 return nil, err 11242 } 11243 req.Header = reqHeaders 11244 googleapi.Expand(req.URL, map[string]string{ 11245 "name": c.name, 11246 }) 11247 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11248 } 11249 11250 // Do executes the "securitycenter.organizations.updateEventThreatDetectionSettings" call. 11251 // Any non-2xx status code is an error. Response headers are in either 11252 // *EventThreatDetectionSettings.ServerResponse.Header or (if a response was 11253 // returned at all) in error.(*googleapi.Error).Header. Use 11254 // googleapi.IsNotModified to check whether the returned error was because 11255 // http.StatusNotModified was returned. 11256 func (c *OrganizationsUpdateEventThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionSettings, error) { 11257 gensupport.SetOptions(c.urlParams_, opts...) 11258 res, err := c.doRequest("json") 11259 if res != nil && res.StatusCode == http.StatusNotModified { 11260 if res.Body != nil { 11261 res.Body.Close() 11262 } 11263 return nil, gensupport.WrapError(&googleapi.Error{ 11264 Code: res.StatusCode, 11265 Header: res.Header, 11266 }) 11267 } 11268 if err != nil { 11269 return nil, err 11270 } 11271 defer googleapi.CloseBody(res) 11272 if err := googleapi.CheckResponse(res); err != nil { 11273 return nil, gensupport.WrapError(err) 11274 } 11275 ret := &EventThreatDetectionSettings{ 11276 ServerResponse: googleapi.ServerResponse{ 11277 Header: res.Header, 11278 HTTPStatusCode: res.StatusCode, 11279 }, 11280 } 11281 target := &ret 11282 if err := gensupport.DecodeResponse(target, res); err != nil { 11283 return nil, err 11284 } 11285 return ret, nil 11286 } 11287 11288 type OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall struct { 11289 s *Service 11290 name string 11291 rapidvulnerabilitydetectionsettings *RapidVulnerabilityDetectionSettings 11292 urlParams_ gensupport.URLParams 11293 ctx_ context.Context 11294 header_ http.Header 11295 } 11296 11297 // UpdateRapidVulnerabilityDetectionSettings: Update the 11298 // RapidVulnerabilityDetectionSettings resource. 11299 // 11300 // - name: The resource name of the RapidVulnerabilityDetectionSettings. 11301 // Formats: * 11302 // organizations/{organization}/rapidVulnerabilityDetectionSettings * 11303 // folders/{folder}/rapidVulnerabilityDetectionSettings * 11304 // projects/{project}/rapidVulnerabilityDetectionSettings. 11305 func (r *OrganizationsService) UpdateRapidVulnerabilityDetectionSettings(name string, rapidvulnerabilitydetectionsettings *RapidVulnerabilityDetectionSettings) *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall { 11306 c := &OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11307 c.name = name 11308 c.rapidvulnerabilitydetectionsettings = rapidvulnerabilitydetectionsettings 11309 return c 11310 } 11311 11312 // UpdateMask sets the optional parameter "updateMask": The list of fields to 11313 // be updated. 11314 func (c *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall { 11315 c.urlParams_.Set("updateMask", updateMask) 11316 return c 11317 } 11318 11319 // Fields allows partial responses to be retrieved. See 11320 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11321 // details. 11322 func (c *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall { 11323 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11324 return c 11325 } 11326 11327 // Context sets the context to be used in this call's Do method. 11328 func (c *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall) Context(ctx context.Context) *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall { 11329 c.ctx_ = ctx 11330 return c 11331 } 11332 11333 // Header returns a http.Header that can be modified by the caller to add 11334 // headers to the request. 11335 func (c *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall) Header() http.Header { 11336 if c.header_ == nil { 11337 c.header_ = make(http.Header) 11338 } 11339 return c.header_ 11340 } 11341 11342 func (c *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 11343 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11344 var body io.Reader = nil 11345 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rapidvulnerabilitydetectionsettings) 11346 if err != nil { 11347 return nil, err 11348 } 11349 c.urlParams_.Set("alt", alt) 11350 c.urlParams_.Set("prettyPrint", "false") 11351 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 11352 urls += "?" + c.urlParams_.Encode() 11353 req, err := http.NewRequest("PATCH", urls, body) 11354 if err != nil { 11355 return nil, err 11356 } 11357 req.Header = reqHeaders 11358 googleapi.Expand(req.URL, map[string]string{ 11359 "name": c.name, 11360 }) 11361 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11362 } 11363 11364 // Do executes the "securitycenter.organizations.updateRapidVulnerabilityDetectionSettings" call. 11365 // Any non-2xx status code is an error. Response headers are in either 11366 // *RapidVulnerabilityDetectionSettings.ServerResponse.Header or (if a response 11367 // was returned at all) in error.(*googleapi.Error).Header. Use 11368 // googleapi.IsNotModified to check whether the returned error was because 11369 // http.StatusNotModified was returned. 11370 func (c *OrganizationsUpdateRapidVulnerabilityDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { 11371 gensupport.SetOptions(c.urlParams_, opts...) 11372 res, err := c.doRequest("json") 11373 if res != nil && res.StatusCode == http.StatusNotModified { 11374 if res.Body != nil { 11375 res.Body.Close() 11376 } 11377 return nil, gensupport.WrapError(&googleapi.Error{ 11378 Code: res.StatusCode, 11379 Header: res.Header, 11380 }) 11381 } 11382 if err != nil { 11383 return nil, err 11384 } 11385 defer googleapi.CloseBody(res) 11386 if err := googleapi.CheckResponse(res); err != nil { 11387 return nil, gensupport.WrapError(err) 11388 } 11389 ret := &RapidVulnerabilityDetectionSettings{ 11390 ServerResponse: googleapi.ServerResponse{ 11391 Header: res.Header, 11392 HTTPStatusCode: res.StatusCode, 11393 }, 11394 } 11395 target := &ret 11396 if err := gensupport.DecodeResponse(target, res); err != nil { 11397 return nil, err 11398 } 11399 return ret, nil 11400 } 11401 11402 type OrganizationsUpdateSecurityHealthAnalyticsSettingsCall struct { 11403 s *Service 11404 name string 11405 securityhealthanalyticssettings *SecurityHealthAnalyticsSettings 11406 urlParams_ gensupport.URLParams 11407 ctx_ context.Context 11408 header_ http.Header 11409 } 11410 11411 // UpdateSecurityHealthAnalyticsSettings: Update the 11412 // SecurityHealthAnalyticsSettings resource. 11413 // 11414 // - name: The resource name of the SecurityHealthAnalyticsSettings. Formats: * 11415 // organizations/{organization}/securityHealthAnalyticsSettings * 11416 // folders/{folder}/securityHealthAnalyticsSettings * 11417 // projects/{project}/securityHealthAnalyticsSettings. 11418 func (r *OrganizationsService) UpdateSecurityHealthAnalyticsSettings(name string, securityhealthanalyticssettings *SecurityHealthAnalyticsSettings) *OrganizationsUpdateSecurityHealthAnalyticsSettingsCall { 11419 c := &OrganizationsUpdateSecurityHealthAnalyticsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11420 c.name = name 11421 c.securityhealthanalyticssettings = securityhealthanalyticssettings 11422 return c 11423 } 11424 11425 // UpdateMask sets the optional parameter "updateMask": The list of fields to 11426 // be updated. 11427 func (c *OrganizationsUpdateSecurityHealthAnalyticsSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateSecurityHealthAnalyticsSettingsCall { 11428 c.urlParams_.Set("updateMask", updateMask) 11429 return c 11430 } 11431 11432 // Fields allows partial responses to be retrieved. See 11433 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11434 // details. 11435 func (c *OrganizationsUpdateSecurityHealthAnalyticsSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateSecurityHealthAnalyticsSettingsCall { 11436 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11437 return c 11438 } 11439 11440 // Context sets the context to be used in this call's Do method. 11441 func (c *OrganizationsUpdateSecurityHealthAnalyticsSettingsCall) Context(ctx context.Context) *OrganizationsUpdateSecurityHealthAnalyticsSettingsCall { 11442 c.ctx_ = ctx 11443 return c 11444 } 11445 11446 // Header returns a http.Header that can be modified by the caller to add 11447 // headers to the request. 11448 func (c *OrganizationsUpdateSecurityHealthAnalyticsSettingsCall) Header() http.Header { 11449 if c.header_ == nil { 11450 c.header_ = make(http.Header) 11451 } 11452 return c.header_ 11453 } 11454 11455 func (c *OrganizationsUpdateSecurityHealthAnalyticsSettingsCall) doRequest(alt string) (*http.Response, error) { 11456 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11457 var body io.Reader = nil 11458 body, err := googleapi.WithoutDataWrapper.JSONReader(c.securityhealthanalyticssettings) 11459 if err != nil { 11460 return nil, err 11461 } 11462 c.urlParams_.Set("alt", alt) 11463 c.urlParams_.Set("prettyPrint", "false") 11464 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 11465 urls += "?" + c.urlParams_.Encode() 11466 req, err := http.NewRequest("PATCH", urls, body) 11467 if err != nil { 11468 return nil, err 11469 } 11470 req.Header = reqHeaders 11471 googleapi.Expand(req.URL, map[string]string{ 11472 "name": c.name, 11473 }) 11474 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11475 } 11476 11477 // Do executes the "securitycenter.organizations.updateSecurityHealthAnalyticsSettings" call. 11478 // Any non-2xx status code is an error. Response headers are in either 11479 // *SecurityHealthAnalyticsSettings.ServerResponse.Header or (if a response was 11480 // returned at all) in error.(*googleapi.Error).Header. Use 11481 // googleapi.IsNotModified to check whether the returned error was because 11482 // http.StatusNotModified was returned. 11483 func (c *OrganizationsUpdateSecurityHealthAnalyticsSettingsCall) Do(opts ...googleapi.CallOption) (*SecurityHealthAnalyticsSettings, error) { 11484 gensupport.SetOptions(c.urlParams_, opts...) 11485 res, err := c.doRequest("json") 11486 if res != nil && res.StatusCode == http.StatusNotModified { 11487 if res.Body != nil { 11488 res.Body.Close() 11489 } 11490 return nil, gensupport.WrapError(&googleapi.Error{ 11491 Code: res.StatusCode, 11492 Header: res.Header, 11493 }) 11494 } 11495 if err != nil { 11496 return nil, err 11497 } 11498 defer googleapi.CloseBody(res) 11499 if err := googleapi.CheckResponse(res); err != nil { 11500 return nil, gensupport.WrapError(err) 11501 } 11502 ret := &SecurityHealthAnalyticsSettings{ 11503 ServerResponse: googleapi.ServerResponse{ 11504 Header: res.Header, 11505 HTTPStatusCode: res.StatusCode, 11506 }, 11507 } 11508 target := &ret 11509 if err := gensupport.DecodeResponse(target, res); err != nil { 11510 return nil, err 11511 } 11512 return ret, nil 11513 } 11514 11515 type OrganizationsUpdateVirtualMachineThreatDetectionSettingsCall struct { 11516 s *Service 11517 name string 11518 virtualmachinethreatdetectionsettings *VirtualMachineThreatDetectionSettings 11519 urlParams_ gensupport.URLParams 11520 ctx_ context.Context 11521 header_ http.Header 11522 } 11523 11524 // UpdateVirtualMachineThreatDetectionSettings: Update the 11525 // VirtualMachineThreatDetectionSettings resource. 11526 // 11527 // - name: The resource name of the VirtualMachineThreatDetectionSettings. 11528 // Formats: * 11529 // organizations/{organization}/virtualMachineThreatDetectionSettings * 11530 // folders/{folder}/virtualMachineThreatDetectionSettings * 11531 // projects/{project}/virtualMachineThreatDetectionSettings. 11532 func (r *OrganizationsService) UpdateVirtualMachineThreatDetectionSettings(name string, virtualmachinethreatdetectionsettings *VirtualMachineThreatDetectionSettings) *OrganizationsUpdateVirtualMachineThreatDetectionSettingsCall { 11533 c := &OrganizationsUpdateVirtualMachineThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11534 c.name = name 11535 c.virtualmachinethreatdetectionsettings = virtualmachinethreatdetectionsettings 11536 return c 11537 } 11538 11539 // UpdateMask sets the optional parameter "updateMask": The list of fields to 11540 // be updated. 11541 func (c *OrganizationsUpdateVirtualMachineThreatDetectionSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateVirtualMachineThreatDetectionSettingsCall { 11542 c.urlParams_.Set("updateMask", updateMask) 11543 return c 11544 } 11545 11546 // Fields allows partial responses to be retrieved. See 11547 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11548 // details. 11549 func (c *OrganizationsUpdateVirtualMachineThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateVirtualMachineThreatDetectionSettingsCall { 11550 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11551 return c 11552 } 11553 11554 // Context sets the context to be used in this call's Do method. 11555 func (c *OrganizationsUpdateVirtualMachineThreatDetectionSettingsCall) Context(ctx context.Context) *OrganizationsUpdateVirtualMachineThreatDetectionSettingsCall { 11556 c.ctx_ = ctx 11557 return c 11558 } 11559 11560 // Header returns a http.Header that can be modified by the caller to add 11561 // headers to the request. 11562 func (c *OrganizationsUpdateVirtualMachineThreatDetectionSettingsCall) Header() http.Header { 11563 if c.header_ == nil { 11564 c.header_ = make(http.Header) 11565 } 11566 return c.header_ 11567 } 11568 11569 func (c *OrganizationsUpdateVirtualMachineThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 11570 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11571 var body io.Reader = nil 11572 body, err := googleapi.WithoutDataWrapper.JSONReader(c.virtualmachinethreatdetectionsettings) 11573 if err != nil { 11574 return nil, err 11575 } 11576 c.urlParams_.Set("alt", alt) 11577 c.urlParams_.Set("prettyPrint", "false") 11578 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 11579 urls += "?" + c.urlParams_.Encode() 11580 req, err := http.NewRequest("PATCH", urls, body) 11581 if err != nil { 11582 return nil, err 11583 } 11584 req.Header = reqHeaders 11585 googleapi.Expand(req.URL, map[string]string{ 11586 "name": c.name, 11587 }) 11588 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11589 } 11590 11591 // Do executes the "securitycenter.organizations.updateVirtualMachineThreatDetectionSettings" call. 11592 // Any non-2xx status code is an error. Response headers are in either 11593 // *VirtualMachineThreatDetectionSettings.ServerResponse.Header or (if a 11594 // response was returned at all) in error.(*googleapi.Error).Header. Use 11595 // googleapi.IsNotModified to check whether the returned error was because 11596 // http.StatusNotModified was returned. 11597 func (c *OrganizationsUpdateVirtualMachineThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*VirtualMachineThreatDetectionSettings, error) { 11598 gensupport.SetOptions(c.urlParams_, opts...) 11599 res, err := c.doRequest("json") 11600 if res != nil && res.StatusCode == http.StatusNotModified { 11601 if res.Body != nil { 11602 res.Body.Close() 11603 } 11604 return nil, gensupport.WrapError(&googleapi.Error{ 11605 Code: res.StatusCode, 11606 Header: res.Header, 11607 }) 11608 } 11609 if err != nil { 11610 return nil, err 11611 } 11612 defer googleapi.CloseBody(res) 11613 if err := googleapi.CheckResponse(res); err != nil { 11614 return nil, gensupport.WrapError(err) 11615 } 11616 ret := &VirtualMachineThreatDetectionSettings{ 11617 ServerResponse: googleapi.ServerResponse{ 11618 Header: res.Header, 11619 HTTPStatusCode: res.StatusCode, 11620 }, 11621 } 11622 target := &ret 11623 if err := gensupport.DecodeResponse(target, res); err != nil { 11624 return nil, err 11625 } 11626 return ret, nil 11627 } 11628 11629 type OrganizationsUpdateWebSecurityScannerSettingsCall struct { 11630 s *Service 11631 name string 11632 websecurityscannersettings *WebSecurityScannerSettings 11633 urlParams_ gensupport.URLParams 11634 ctx_ context.Context 11635 header_ http.Header 11636 } 11637 11638 // UpdateWebSecurityScannerSettings: Update the WebSecurityScannerSettings 11639 // resource. 11640 // 11641 // - name: The resource name of the WebSecurityScannerSettings. Formats: * 11642 // organizations/{organization}/webSecurityScannerSettings * 11643 // folders/{folder}/webSecurityScannerSettings * 11644 // projects/{project}/webSecurityScannerSettings. 11645 func (r *OrganizationsService) UpdateWebSecurityScannerSettings(name string, websecurityscannersettings *WebSecurityScannerSettings) *OrganizationsUpdateWebSecurityScannerSettingsCall { 11646 c := &OrganizationsUpdateWebSecurityScannerSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11647 c.name = name 11648 c.websecurityscannersettings = websecurityscannersettings 11649 return c 11650 } 11651 11652 // UpdateMask sets the optional parameter "updateMask": The list of fields to 11653 // be updated. 11654 func (c *OrganizationsUpdateWebSecurityScannerSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateWebSecurityScannerSettingsCall { 11655 c.urlParams_.Set("updateMask", updateMask) 11656 return c 11657 } 11658 11659 // Fields allows partial responses to be retrieved. See 11660 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11661 // details. 11662 func (c *OrganizationsUpdateWebSecurityScannerSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateWebSecurityScannerSettingsCall { 11663 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11664 return c 11665 } 11666 11667 // Context sets the context to be used in this call's Do method. 11668 func (c *OrganizationsUpdateWebSecurityScannerSettingsCall) Context(ctx context.Context) *OrganizationsUpdateWebSecurityScannerSettingsCall { 11669 c.ctx_ = ctx 11670 return c 11671 } 11672 11673 // Header returns a http.Header that can be modified by the caller to add 11674 // headers to the request. 11675 func (c *OrganizationsUpdateWebSecurityScannerSettingsCall) Header() http.Header { 11676 if c.header_ == nil { 11677 c.header_ = make(http.Header) 11678 } 11679 return c.header_ 11680 } 11681 11682 func (c *OrganizationsUpdateWebSecurityScannerSettingsCall) doRequest(alt string) (*http.Response, error) { 11683 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11684 var body io.Reader = nil 11685 body, err := googleapi.WithoutDataWrapper.JSONReader(c.websecurityscannersettings) 11686 if err != nil { 11687 return nil, err 11688 } 11689 c.urlParams_.Set("alt", alt) 11690 c.urlParams_.Set("prettyPrint", "false") 11691 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 11692 urls += "?" + c.urlParams_.Encode() 11693 req, err := http.NewRequest("PATCH", urls, body) 11694 if err != nil { 11695 return nil, err 11696 } 11697 req.Header = reqHeaders 11698 googleapi.Expand(req.URL, map[string]string{ 11699 "name": c.name, 11700 }) 11701 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11702 } 11703 11704 // Do executes the "securitycenter.organizations.updateWebSecurityScannerSettings" call. 11705 // Any non-2xx status code is an error. Response headers are in either 11706 // *WebSecurityScannerSettings.ServerResponse.Header or (if a response was 11707 // returned at all) in error.(*googleapi.Error).Header. Use 11708 // googleapi.IsNotModified to check whether the returned error was because 11709 // http.StatusNotModified was returned. 11710 func (c *OrganizationsUpdateWebSecurityScannerSettingsCall) Do(opts ...googleapi.CallOption) (*WebSecurityScannerSettings, error) { 11711 gensupport.SetOptions(c.urlParams_, opts...) 11712 res, err := c.doRequest("json") 11713 if res != nil && res.StatusCode == http.StatusNotModified { 11714 if res.Body != nil { 11715 res.Body.Close() 11716 } 11717 return nil, gensupport.WrapError(&googleapi.Error{ 11718 Code: res.StatusCode, 11719 Header: res.Header, 11720 }) 11721 } 11722 if err != nil { 11723 return nil, err 11724 } 11725 defer googleapi.CloseBody(res) 11726 if err := googleapi.CheckResponse(res); err != nil { 11727 return nil, gensupport.WrapError(err) 11728 } 11729 ret := &WebSecurityScannerSettings{ 11730 ServerResponse: googleapi.ServerResponse{ 11731 Header: res.Header, 11732 HTTPStatusCode: res.StatusCode, 11733 }, 11734 } 11735 target := &ret 11736 if err := gensupport.DecodeResponse(target, res); err != nil { 11737 return nil, err 11738 } 11739 return ret, nil 11740 } 11741 11742 type OrganizationsContainerThreatDetectionSettingsCalculateCall struct { 11743 s *Service 11744 name string 11745 urlParams_ gensupport.URLParams 11746 ifNoneMatch_ string 11747 ctx_ context.Context 11748 header_ http.Header 11749 } 11750 11751 // Calculate: Calculates the effective ContainerThreatDetectionSettings based 11752 // on its level in the resource hierarchy and its settings. Settings provided 11753 // closer to the target resource take precedence over those further away (e.g. 11754 // folder will override organization level settings). The default SCC setting 11755 // for the detector service defaults can be overridden at organization, folder 11756 // and project levels. No assumptions should be made about the SCC defaults as 11757 // it is considered an internal implementation detail. 11758 // 11759 // - name: The name of the ContainerThreatDetectionSettings to calculate. 11760 // Formats: * organizations/{organization}/containerThreatDetectionSettings * 11761 // folders/{folder}/containerThreatDetectionSettings * 11762 // projects/{project}/containerThreatDetectionSettings * 11763 // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatD 11764 // etectionSettings. 11765 func (r *OrganizationsContainerThreatDetectionSettingsService) Calculate(name string) *OrganizationsContainerThreatDetectionSettingsCalculateCall { 11766 c := &OrganizationsContainerThreatDetectionSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11767 c.name = name 11768 return c 11769 } 11770 11771 // Fields allows partial responses to be retrieved. See 11772 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11773 // details. 11774 func (c *OrganizationsContainerThreatDetectionSettingsCalculateCall) Fields(s ...googleapi.Field) *OrganizationsContainerThreatDetectionSettingsCalculateCall { 11775 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11776 return c 11777 } 11778 11779 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11780 // object's ETag matches the given value. This is useful for getting updates 11781 // only after the object has changed since the last request. 11782 func (c *OrganizationsContainerThreatDetectionSettingsCalculateCall) IfNoneMatch(entityTag string) *OrganizationsContainerThreatDetectionSettingsCalculateCall { 11783 c.ifNoneMatch_ = entityTag 11784 return c 11785 } 11786 11787 // Context sets the context to be used in this call's Do method. 11788 func (c *OrganizationsContainerThreatDetectionSettingsCalculateCall) Context(ctx context.Context) *OrganizationsContainerThreatDetectionSettingsCalculateCall { 11789 c.ctx_ = ctx 11790 return c 11791 } 11792 11793 // Header returns a http.Header that can be modified by the caller to add 11794 // headers to the request. 11795 func (c *OrganizationsContainerThreatDetectionSettingsCalculateCall) Header() http.Header { 11796 if c.header_ == nil { 11797 c.header_ = make(http.Header) 11798 } 11799 return c.header_ 11800 } 11801 11802 func (c *OrganizationsContainerThreatDetectionSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 11803 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11804 if c.ifNoneMatch_ != "" { 11805 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11806 } 11807 var body io.Reader = nil 11808 c.urlParams_.Set("alt", alt) 11809 c.urlParams_.Set("prettyPrint", "false") 11810 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 11811 urls += "?" + c.urlParams_.Encode() 11812 req, err := http.NewRequest("GET", urls, body) 11813 if err != nil { 11814 return nil, err 11815 } 11816 req.Header = reqHeaders 11817 googleapi.Expand(req.URL, map[string]string{ 11818 "name": c.name, 11819 }) 11820 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11821 } 11822 11823 // Do executes the "securitycenter.organizations.containerThreatDetectionSettings.calculate" call. 11824 // Any non-2xx status code is an error. Response headers are in either 11825 // *ContainerThreatDetectionSettings.ServerResponse.Header or (if a response 11826 // was returned at all) in error.(*googleapi.Error).Header. Use 11827 // googleapi.IsNotModified to check whether the returned error was because 11828 // http.StatusNotModified was returned. 11829 func (c *OrganizationsContainerThreatDetectionSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*ContainerThreatDetectionSettings, error) { 11830 gensupport.SetOptions(c.urlParams_, opts...) 11831 res, err := c.doRequest("json") 11832 if res != nil && res.StatusCode == http.StatusNotModified { 11833 if res.Body != nil { 11834 res.Body.Close() 11835 } 11836 return nil, gensupport.WrapError(&googleapi.Error{ 11837 Code: res.StatusCode, 11838 Header: res.Header, 11839 }) 11840 } 11841 if err != nil { 11842 return nil, err 11843 } 11844 defer googleapi.CloseBody(res) 11845 if err := googleapi.CheckResponse(res); err != nil { 11846 return nil, gensupport.WrapError(err) 11847 } 11848 ret := &ContainerThreatDetectionSettings{ 11849 ServerResponse: googleapi.ServerResponse{ 11850 Header: res.Header, 11851 HTTPStatusCode: res.StatusCode, 11852 }, 11853 } 11854 target := &ret 11855 if err := gensupport.DecodeResponse(target, res); err != nil { 11856 return nil, err 11857 } 11858 return ret, nil 11859 } 11860 11861 type OrganizationsEventThreatDetectionSettingsCalculateCall struct { 11862 s *Service 11863 name string 11864 urlParams_ gensupport.URLParams 11865 ifNoneMatch_ string 11866 ctx_ context.Context 11867 header_ http.Header 11868 } 11869 11870 // Calculate: Calculates the effective EventThreatDetectionSettings based on 11871 // its level in the resource hierarchy and its settings. Settings provided 11872 // closer to the target resource take precedence over those further away (e.g. 11873 // folder will override organization level settings). The default SCC setting 11874 // for the detector service defaults can be overridden at organization, folder 11875 // and project levels. No assumptions should be made about the SCC defaults as 11876 // it is considered an internal implementation detail. 11877 // 11878 // - name: The name of the EventThreatDetectionSettings to calculate. Formats: 11879 // - organizations/{organization}/eventThreatDetectionSettings * 11880 // folders/{folder}/eventThreatDetectionSettings * 11881 // projects/{project}/eventThreatDetectionSettings. 11882 func (r *OrganizationsEventThreatDetectionSettingsService) Calculate(name string) *OrganizationsEventThreatDetectionSettingsCalculateCall { 11883 c := &OrganizationsEventThreatDetectionSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11884 c.name = name 11885 return c 11886 } 11887 11888 // Fields allows partial responses to be retrieved. See 11889 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11890 // details. 11891 func (c *OrganizationsEventThreatDetectionSettingsCalculateCall) Fields(s ...googleapi.Field) *OrganizationsEventThreatDetectionSettingsCalculateCall { 11892 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11893 return c 11894 } 11895 11896 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11897 // object's ETag matches the given value. This is useful for getting updates 11898 // only after the object has changed since the last request. 11899 func (c *OrganizationsEventThreatDetectionSettingsCalculateCall) IfNoneMatch(entityTag string) *OrganizationsEventThreatDetectionSettingsCalculateCall { 11900 c.ifNoneMatch_ = entityTag 11901 return c 11902 } 11903 11904 // Context sets the context to be used in this call's Do method. 11905 func (c *OrganizationsEventThreatDetectionSettingsCalculateCall) Context(ctx context.Context) *OrganizationsEventThreatDetectionSettingsCalculateCall { 11906 c.ctx_ = ctx 11907 return c 11908 } 11909 11910 // Header returns a http.Header that can be modified by the caller to add 11911 // headers to the request. 11912 func (c *OrganizationsEventThreatDetectionSettingsCalculateCall) Header() http.Header { 11913 if c.header_ == nil { 11914 c.header_ = make(http.Header) 11915 } 11916 return c.header_ 11917 } 11918 11919 func (c *OrganizationsEventThreatDetectionSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 11920 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11921 if c.ifNoneMatch_ != "" { 11922 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11923 } 11924 var body io.Reader = nil 11925 c.urlParams_.Set("alt", alt) 11926 c.urlParams_.Set("prettyPrint", "false") 11927 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 11928 urls += "?" + c.urlParams_.Encode() 11929 req, err := http.NewRequest("GET", urls, body) 11930 if err != nil { 11931 return nil, err 11932 } 11933 req.Header = reqHeaders 11934 googleapi.Expand(req.URL, map[string]string{ 11935 "name": c.name, 11936 }) 11937 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11938 } 11939 11940 // Do executes the "securitycenter.organizations.eventThreatDetectionSettings.calculate" call. 11941 // Any non-2xx status code is an error. Response headers are in either 11942 // *EventThreatDetectionSettings.ServerResponse.Header or (if a response was 11943 // returned at all) in error.(*googleapi.Error).Header. Use 11944 // googleapi.IsNotModified to check whether the returned error was because 11945 // http.StatusNotModified was returned. 11946 func (c *OrganizationsEventThreatDetectionSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionSettings, error) { 11947 gensupport.SetOptions(c.urlParams_, opts...) 11948 res, err := c.doRequest("json") 11949 if res != nil && res.StatusCode == http.StatusNotModified { 11950 if res.Body != nil { 11951 res.Body.Close() 11952 } 11953 return nil, gensupport.WrapError(&googleapi.Error{ 11954 Code: res.StatusCode, 11955 Header: res.Header, 11956 }) 11957 } 11958 if err != nil { 11959 return nil, err 11960 } 11961 defer googleapi.CloseBody(res) 11962 if err := googleapi.CheckResponse(res); err != nil { 11963 return nil, gensupport.WrapError(err) 11964 } 11965 ret := &EventThreatDetectionSettings{ 11966 ServerResponse: googleapi.ServerResponse{ 11967 Header: res.Header, 11968 HTTPStatusCode: res.StatusCode, 11969 }, 11970 } 11971 target := &ret 11972 if err := gensupport.DecodeResponse(target, res); err != nil { 11973 return nil, err 11974 } 11975 return ret, nil 11976 } 11977 11978 type OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall struct { 11979 s *Service 11980 name string 11981 urlParams_ gensupport.URLParams 11982 ifNoneMatch_ string 11983 ctx_ context.Context 11984 header_ http.Header 11985 } 11986 11987 // Calculate: Calculates the effective RapidVulnerabilityDetectionSettings 11988 // based on its level in the resource hierarchy and its settings. Settings 11989 // provided closer to the target resource take precedence over those further 11990 // away (e.g. folder will override organization level settings). The default 11991 // SCC setting for the detector service defaults can be overridden at 11992 // organization, folder and project levels. No assumptions should be made about 11993 // the SCC defaults as it is considered an internal implementation detail. 11994 // 11995 // - name: The name of the RapidVulnerabilityDetectionSettings to calculate. 11996 // Formats: * 11997 // organizations/{organization}/rapidVulnerabilityDetectionSettings * 11998 // folders/{folder}/rapidVulnerabilityDetectionSettings * 11999 // projects/{project}/rapidVulnerabilityDetectionSettings. 12000 func (r *OrganizationsRapidVulnerabilityDetectionSettingsService) Calculate(name string) *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall { 12001 c := &OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12002 c.name = name 12003 return c 12004 } 12005 12006 // Fields allows partial responses to be retrieved. See 12007 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12008 // details. 12009 func (c *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall) Fields(s ...googleapi.Field) *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall { 12010 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12011 return c 12012 } 12013 12014 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12015 // object's ETag matches the given value. This is useful for getting updates 12016 // only after the object has changed since the last request. 12017 func (c *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall) IfNoneMatch(entityTag string) *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall { 12018 c.ifNoneMatch_ = entityTag 12019 return c 12020 } 12021 12022 // Context sets the context to be used in this call's Do method. 12023 func (c *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall) Context(ctx context.Context) *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall { 12024 c.ctx_ = ctx 12025 return c 12026 } 12027 12028 // Header returns a http.Header that can be modified by the caller to add 12029 // headers to the request. 12030 func (c *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall) Header() http.Header { 12031 if c.header_ == nil { 12032 c.header_ = make(http.Header) 12033 } 12034 return c.header_ 12035 } 12036 12037 func (c *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 12038 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12039 if c.ifNoneMatch_ != "" { 12040 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12041 } 12042 var body io.Reader = nil 12043 c.urlParams_.Set("alt", alt) 12044 c.urlParams_.Set("prettyPrint", "false") 12045 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 12046 urls += "?" + c.urlParams_.Encode() 12047 req, err := http.NewRequest("GET", urls, body) 12048 if err != nil { 12049 return nil, err 12050 } 12051 req.Header = reqHeaders 12052 googleapi.Expand(req.URL, map[string]string{ 12053 "name": c.name, 12054 }) 12055 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12056 } 12057 12058 // Do executes the "securitycenter.organizations.rapidVulnerabilityDetectionSettings.calculate" call. 12059 // Any non-2xx status code is an error. Response headers are in either 12060 // *RapidVulnerabilityDetectionSettings.ServerResponse.Header or (if a response 12061 // was returned at all) in error.(*googleapi.Error).Header. Use 12062 // googleapi.IsNotModified to check whether the returned error was because 12063 // http.StatusNotModified was returned. 12064 func (c *OrganizationsRapidVulnerabilityDetectionSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { 12065 gensupport.SetOptions(c.urlParams_, opts...) 12066 res, err := c.doRequest("json") 12067 if res != nil && res.StatusCode == http.StatusNotModified { 12068 if res.Body != nil { 12069 res.Body.Close() 12070 } 12071 return nil, gensupport.WrapError(&googleapi.Error{ 12072 Code: res.StatusCode, 12073 Header: res.Header, 12074 }) 12075 } 12076 if err != nil { 12077 return nil, err 12078 } 12079 defer googleapi.CloseBody(res) 12080 if err := googleapi.CheckResponse(res); err != nil { 12081 return nil, gensupport.WrapError(err) 12082 } 12083 ret := &RapidVulnerabilityDetectionSettings{ 12084 ServerResponse: googleapi.ServerResponse{ 12085 Header: res.Header, 12086 HTTPStatusCode: res.StatusCode, 12087 }, 12088 } 12089 target := &ret 12090 if err := gensupport.DecodeResponse(target, res); err != nil { 12091 return nil, err 12092 } 12093 return ret, nil 12094 } 12095 12096 type OrganizationsSecurityHealthAnalyticsSettingsCalculateCall struct { 12097 s *Service 12098 name string 12099 urlParams_ gensupport.URLParams 12100 ifNoneMatch_ string 12101 ctx_ context.Context 12102 header_ http.Header 12103 } 12104 12105 // Calculate: Calculates the effective SecurityHealthAnalyticsSettings based on 12106 // its level in the resource hierarchy and its settings. Settings provided 12107 // closer to the target resource take precedence over those further away (e.g. 12108 // folder will override organization level settings). The default SCC setting 12109 // for the detector service defaults can be overridden at organization, folder 12110 // and project levels. No assumptions should be made about the SCC defaults as 12111 // it is considered an internal implementation detail. 12112 // 12113 // - name: The name of the SecurityHealthAnalyticsSettings to calculate. 12114 // Formats: * organizations/{organization}/securityHealthAnalyticsSettings * 12115 // folders/{folder}/securityHealthAnalyticsSettings * 12116 // projects/{project}/securityHealthAnalyticsSettings. 12117 func (r *OrganizationsSecurityHealthAnalyticsSettingsService) Calculate(name string) *OrganizationsSecurityHealthAnalyticsSettingsCalculateCall { 12118 c := &OrganizationsSecurityHealthAnalyticsSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12119 c.name = name 12120 return c 12121 } 12122 12123 // Fields allows partial responses to be retrieved. See 12124 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12125 // details. 12126 func (c *OrganizationsSecurityHealthAnalyticsSettingsCalculateCall) Fields(s ...googleapi.Field) *OrganizationsSecurityHealthAnalyticsSettingsCalculateCall { 12127 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12128 return c 12129 } 12130 12131 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12132 // object's ETag matches the given value. This is useful for getting updates 12133 // only after the object has changed since the last request. 12134 func (c *OrganizationsSecurityHealthAnalyticsSettingsCalculateCall) IfNoneMatch(entityTag string) *OrganizationsSecurityHealthAnalyticsSettingsCalculateCall { 12135 c.ifNoneMatch_ = entityTag 12136 return c 12137 } 12138 12139 // Context sets the context to be used in this call's Do method. 12140 func (c *OrganizationsSecurityHealthAnalyticsSettingsCalculateCall) Context(ctx context.Context) *OrganizationsSecurityHealthAnalyticsSettingsCalculateCall { 12141 c.ctx_ = ctx 12142 return c 12143 } 12144 12145 // Header returns a http.Header that can be modified by the caller to add 12146 // headers to the request. 12147 func (c *OrganizationsSecurityHealthAnalyticsSettingsCalculateCall) Header() http.Header { 12148 if c.header_ == nil { 12149 c.header_ = make(http.Header) 12150 } 12151 return c.header_ 12152 } 12153 12154 func (c *OrganizationsSecurityHealthAnalyticsSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 12155 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12156 if c.ifNoneMatch_ != "" { 12157 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12158 } 12159 var body io.Reader = nil 12160 c.urlParams_.Set("alt", alt) 12161 c.urlParams_.Set("prettyPrint", "false") 12162 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 12163 urls += "?" + c.urlParams_.Encode() 12164 req, err := http.NewRequest("GET", urls, body) 12165 if err != nil { 12166 return nil, err 12167 } 12168 req.Header = reqHeaders 12169 googleapi.Expand(req.URL, map[string]string{ 12170 "name": c.name, 12171 }) 12172 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12173 } 12174 12175 // Do executes the "securitycenter.organizations.securityHealthAnalyticsSettings.calculate" call. 12176 // Any non-2xx status code is an error. Response headers are in either 12177 // *SecurityHealthAnalyticsSettings.ServerResponse.Header or (if a response was 12178 // returned at all) in error.(*googleapi.Error).Header. Use 12179 // googleapi.IsNotModified to check whether the returned error was because 12180 // http.StatusNotModified was returned. 12181 func (c *OrganizationsSecurityHealthAnalyticsSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*SecurityHealthAnalyticsSettings, error) { 12182 gensupport.SetOptions(c.urlParams_, opts...) 12183 res, err := c.doRequest("json") 12184 if res != nil && res.StatusCode == http.StatusNotModified { 12185 if res.Body != nil { 12186 res.Body.Close() 12187 } 12188 return nil, gensupport.WrapError(&googleapi.Error{ 12189 Code: res.StatusCode, 12190 Header: res.Header, 12191 }) 12192 } 12193 if err != nil { 12194 return nil, err 12195 } 12196 defer googleapi.CloseBody(res) 12197 if err := googleapi.CheckResponse(res); err != nil { 12198 return nil, gensupport.WrapError(err) 12199 } 12200 ret := &SecurityHealthAnalyticsSettings{ 12201 ServerResponse: googleapi.ServerResponse{ 12202 Header: res.Header, 12203 HTTPStatusCode: res.StatusCode, 12204 }, 12205 } 12206 target := &ret 12207 if err := gensupport.DecodeResponse(target, res); err != nil { 12208 return nil, err 12209 } 12210 return ret, nil 12211 } 12212 12213 type OrganizationsVirtualMachineThreatDetectionSettingsCalculateCall struct { 12214 s *Service 12215 name string 12216 urlParams_ gensupport.URLParams 12217 ifNoneMatch_ string 12218 ctx_ context.Context 12219 header_ http.Header 12220 } 12221 12222 // Calculate: Calculates the effective VirtualMachineThreatDetectionSettings 12223 // based on its level in the resource hierarchy and its settings. Settings 12224 // provided closer to the target resource take precedence over those further 12225 // away (e.g. folder will override organization level settings). The default 12226 // SCC setting for the detector service defaults can be overridden at 12227 // organization, folder and project levels. No assumptions should be made about 12228 // the SCC defaults as it is considered an internal implementation detail. 12229 // 12230 // - name: The name of the VirtualMachineThreatDetectionSettings to calculate. 12231 // Formats: * 12232 // organizations/{organization}/virtualMachineThreatDetectionSettings * 12233 // folders/{folder}/virtualMachineThreatDetectionSettings * 12234 // projects/{project}/virtualMachineThreatDetectionSettings. 12235 func (r *OrganizationsVirtualMachineThreatDetectionSettingsService) Calculate(name string) *OrganizationsVirtualMachineThreatDetectionSettingsCalculateCall { 12236 c := &OrganizationsVirtualMachineThreatDetectionSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12237 c.name = name 12238 return c 12239 } 12240 12241 // Fields allows partial responses to be retrieved. See 12242 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12243 // details. 12244 func (c *OrganizationsVirtualMachineThreatDetectionSettingsCalculateCall) Fields(s ...googleapi.Field) *OrganizationsVirtualMachineThreatDetectionSettingsCalculateCall { 12245 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12246 return c 12247 } 12248 12249 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12250 // object's ETag matches the given value. This is useful for getting updates 12251 // only after the object has changed since the last request. 12252 func (c *OrganizationsVirtualMachineThreatDetectionSettingsCalculateCall) IfNoneMatch(entityTag string) *OrganizationsVirtualMachineThreatDetectionSettingsCalculateCall { 12253 c.ifNoneMatch_ = entityTag 12254 return c 12255 } 12256 12257 // Context sets the context to be used in this call's Do method. 12258 func (c *OrganizationsVirtualMachineThreatDetectionSettingsCalculateCall) Context(ctx context.Context) *OrganizationsVirtualMachineThreatDetectionSettingsCalculateCall { 12259 c.ctx_ = ctx 12260 return c 12261 } 12262 12263 // Header returns a http.Header that can be modified by the caller to add 12264 // headers to the request. 12265 func (c *OrganizationsVirtualMachineThreatDetectionSettingsCalculateCall) Header() http.Header { 12266 if c.header_ == nil { 12267 c.header_ = make(http.Header) 12268 } 12269 return c.header_ 12270 } 12271 12272 func (c *OrganizationsVirtualMachineThreatDetectionSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 12273 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12274 if c.ifNoneMatch_ != "" { 12275 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12276 } 12277 var body io.Reader = nil 12278 c.urlParams_.Set("alt", alt) 12279 c.urlParams_.Set("prettyPrint", "false") 12280 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 12281 urls += "?" + c.urlParams_.Encode() 12282 req, err := http.NewRequest("GET", urls, body) 12283 if err != nil { 12284 return nil, err 12285 } 12286 req.Header = reqHeaders 12287 googleapi.Expand(req.URL, map[string]string{ 12288 "name": c.name, 12289 }) 12290 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12291 } 12292 12293 // Do executes the "securitycenter.organizations.virtualMachineThreatDetectionSettings.calculate" call. 12294 // Any non-2xx status code is an error. Response headers are in either 12295 // *VirtualMachineThreatDetectionSettings.ServerResponse.Header or (if a 12296 // response was returned at all) in error.(*googleapi.Error).Header. Use 12297 // googleapi.IsNotModified to check whether the returned error was because 12298 // http.StatusNotModified was returned. 12299 func (c *OrganizationsVirtualMachineThreatDetectionSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*VirtualMachineThreatDetectionSettings, error) { 12300 gensupport.SetOptions(c.urlParams_, opts...) 12301 res, err := c.doRequest("json") 12302 if res != nil && res.StatusCode == http.StatusNotModified { 12303 if res.Body != nil { 12304 res.Body.Close() 12305 } 12306 return nil, gensupport.WrapError(&googleapi.Error{ 12307 Code: res.StatusCode, 12308 Header: res.Header, 12309 }) 12310 } 12311 if err != nil { 12312 return nil, err 12313 } 12314 defer googleapi.CloseBody(res) 12315 if err := googleapi.CheckResponse(res); err != nil { 12316 return nil, gensupport.WrapError(err) 12317 } 12318 ret := &VirtualMachineThreatDetectionSettings{ 12319 ServerResponse: googleapi.ServerResponse{ 12320 Header: res.Header, 12321 HTTPStatusCode: res.StatusCode, 12322 }, 12323 } 12324 target := &ret 12325 if err := gensupport.DecodeResponse(target, res); err != nil { 12326 return nil, err 12327 } 12328 return ret, nil 12329 } 12330 12331 type OrganizationsWebSecurityScannerSettingsCalculateCall struct { 12332 s *Service 12333 name string 12334 urlParams_ gensupport.URLParams 12335 ifNoneMatch_ string 12336 ctx_ context.Context 12337 header_ http.Header 12338 } 12339 12340 // Calculate: Calculates the effective WebSecurityScannerSettings based on its 12341 // level in the resource hierarchy and its settings. Settings provided closer 12342 // to the target resource take precedence over those further away (e.g. folder 12343 // will override organization level settings). The default SCC setting for the 12344 // detector service defaults can be overridden at organization, folder and 12345 // project levels. No assumptions should be made about the SCC defaults as it 12346 // is considered an internal implementation detail. 12347 // 12348 // - name: The name of the WebSecurityScannerSettings to calculate. Formats: * 12349 // organizations/{organization}/webSecurityScannerSettings * 12350 // folders/{folder}/webSecurityScannerSettings * 12351 // projects/{project}/webSecurityScannerSettings. 12352 func (r *OrganizationsWebSecurityScannerSettingsService) Calculate(name string) *OrganizationsWebSecurityScannerSettingsCalculateCall { 12353 c := &OrganizationsWebSecurityScannerSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12354 c.name = name 12355 return c 12356 } 12357 12358 // Fields allows partial responses to be retrieved. See 12359 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12360 // details. 12361 func (c *OrganizationsWebSecurityScannerSettingsCalculateCall) Fields(s ...googleapi.Field) *OrganizationsWebSecurityScannerSettingsCalculateCall { 12362 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12363 return c 12364 } 12365 12366 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12367 // object's ETag matches the given value. This is useful for getting updates 12368 // only after the object has changed since the last request. 12369 func (c *OrganizationsWebSecurityScannerSettingsCalculateCall) IfNoneMatch(entityTag string) *OrganizationsWebSecurityScannerSettingsCalculateCall { 12370 c.ifNoneMatch_ = entityTag 12371 return c 12372 } 12373 12374 // Context sets the context to be used in this call's Do method. 12375 func (c *OrganizationsWebSecurityScannerSettingsCalculateCall) Context(ctx context.Context) *OrganizationsWebSecurityScannerSettingsCalculateCall { 12376 c.ctx_ = ctx 12377 return c 12378 } 12379 12380 // Header returns a http.Header that can be modified by the caller to add 12381 // headers to the request. 12382 func (c *OrganizationsWebSecurityScannerSettingsCalculateCall) Header() http.Header { 12383 if c.header_ == nil { 12384 c.header_ = make(http.Header) 12385 } 12386 return c.header_ 12387 } 12388 12389 func (c *OrganizationsWebSecurityScannerSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 12390 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12391 if c.ifNoneMatch_ != "" { 12392 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12393 } 12394 var body io.Reader = nil 12395 c.urlParams_.Set("alt", alt) 12396 c.urlParams_.Set("prettyPrint", "false") 12397 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 12398 urls += "?" + c.urlParams_.Encode() 12399 req, err := http.NewRequest("GET", urls, body) 12400 if err != nil { 12401 return nil, err 12402 } 12403 req.Header = reqHeaders 12404 googleapi.Expand(req.URL, map[string]string{ 12405 "name": c.name, 12406 }) 12407 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12408 } 12409 12410 // Do executes the "securitycenter.organizations.webSecurityScannerSettings.calculate" call. 12411 // Any non-2xx status code is an error. Response headers are in either 12412 // *WebSecurityScannerSettings.ServerResponse.Header or (if a response was 12413 // returned at all) in error.(*googleapi.Error).Header. Use 12414 // googleapi.IsNotModified to check whether the returned error was because 12415 // http.StatusNotModified was returned. 12416 func (c *OrganizationsWebSecurityScannerSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*WebSecurityScannerSettings, error) { 12417 gensupport.SetOptions(c.urlParams_, opts...) 12418 res, err := c.doRequest("json") 12419 if res != nil && res.StatusCode == http.StatusNotModified { 12420 if res.Body != nil { 12421 res.Body.Close() 12422 } 12423 return nil, gensupport.WrapError(&googleapi.Error{ 12424 Code: res.StatusCode, 12425 Header: res.Header, 12426 }) 12427 } 12428 if err != nil { 12429 return nil, err 12430 } 12431 defer googleapi.CloseBody(res) 12432 if err := googleapi.CheckResponse(res); err != nil { 12433 return nil, gensupport.WrapError(err) 12434 } 12435 ret := &WebSecurityScannerSettings{ 12436 ServerResponse: googleapi.ServerResponse{ 12437 Header: res.Header, 12438 HTTPStatusCode: res.StatusCode, 12439 }, 12440 } 12441 target := &ret 12442 if err := gensupport.DecodeResponse(target, res); err != nil { 12443 return nil, err 12444 } 12445 return ret, nil 12446 } 12447 12448 type ProjectsGetContainerThreatDetectionSettingsCall struct { 12449 s *Service 12450 name string 12451 urlParams_ gensupport.URLParams 12452 ifNoneMatch_ string 12453 ctx_ context.Context 12454 header_ http.Header 12455 } 12456 12457 // GetContainerThreatDetectionSettings: Get the 12458 // ContainerThreatDetectionSettings resource. In the returned settings 12459 // response, a missing field only indicates that it was not explicitly set, so 12460 // no assumption should be made about these fields. In other words, 12461 // GetContainerThreatDetectionSettings does not calculate the effective service 12462 // settings for the resource, which accounts for inherited settings and 12463 // defaults. Instead, use CalculateContainerThreatDetectionSettings for this 12464 // purpose. 12465 // 12466 // - name: The name of the ContainerThreatDetectionSettings to retrieve. 12467 // Formats: * organizations/{organization}/containerThreatDetectionSettings * 12468 // folders/{folder}/containerThreatDetectionSettings * 12469 // projects/{project}/containerThreatDetectionSettings * 12470 // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatD 12471 // etectionSettings. 12472 func (r *ProjectsService) GetContainerThreatDetectionSettings(name string) *ProjectsGetContainerThreatDetectionSettingsCall { 12473 c := &ProjectsGetContainerThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12474 c.name = name 12475 return c 12476 } 12477 12478 // Fields allows partial responses to be retrieved. See 12479 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12480 // details. 12481 func (c *ProjectsGetContainerThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetContainerThreatDetectionSettingsCall { 12482 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12483 return c 12484 } 12485 12486 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12487 // object's ETag matches the given value. This is useful for getting updates 12488 // only after the object has changed since the last request. 12489 func (c *ProjectsGetContainerThreatDetectionSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetContainerThreatDetectionSettingsCall { 12490 c.ifNoneMatch_ = entityTag 12491 return c 12492 } 12493 12494 // Context sets the context to be used in this call's Do method. 12495 func (c *ProjectsGetContainerThreatDetectionSettingsCall) Context(ctx context.Context) *ProjectsGetContainerThreatDetectionSettingsCall { 12496 c.ctx_ = ctx 12497 return c 12498 } 12499 12500 // Header returns a http.Header that can be modified by the caller to add 12501 // headers to the request. 12502 func (c *ProjectsGetContainerThreatDetectionSettingsCall) Header() http.Header { 12503 if c.header_ == nil { 12504 c.header_ = make(http.Header) 12505 } 12506 return c.header_ 12507 } 12508 12509 func (c *ProjectsGetContainerThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 12510 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12511 if c.ifNoneMatch_ != "" { 12512 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12513 } 12514 var body io.Reader = nil 12515 c.urlParams_.Set("alt", alt) 12516 c.urlParams_.Set("prettyPrint", "false") 12517 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 12518 urls += "?" + c.urlParams_.Encode() 12519 req, err := http.NewRequest("GET", urls, body) 12520 if err != nil { 12521 return nil, err 12522 } 12523 req.Header = reqHeaders 12524 googleapi.Expand(req.URL, map[string]string{ 12525 "name": c.name, 12526 }) 12527 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12528 } 12529 12530 // Do executes the "securitycenter.projects.getContainerThreatDetectionSettings" call. 12531 // Any non-2xx status code is an error. Response headers are in either 12532 // *ContainerThreatDetectionSettings.ServerResponse.Header or (if a response 12533 // was returned at all) in error.(*googleapi.Error).Header. Use 12534 // googleapi.IsNotModified to check whether the returned error was because 12535 // http.StatusNotModified was returned. 12536 func (c *ProjectsGetContainerThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*ContainerThreatDetectionSettings, error) { 12537 gensupport.SetOptions(c.urlParams_, opts...) 12538 res, err := c.doRequest("json") 12539 if res != nil && res.StatusCode == http.StatusNotModified { 12540 if res.Body != nil { 12541 res.Body.Close() 12542 } 12543 return nil, gensupport.WrapError(&googleapi.Error{ 12544 Code: res.StatusCode, 12545 Header: res.Header, 12546 }) 12547 } 12548 if err != nil { 12549 return nil, err 12550 } 12551 defer googleapi.CloseBody(res) 12552 if err := googleapi.CheckResponse(res); err != nil { 12553 return nil, gensupport.WrapError(err) 12554 } 12555 ret := &ContainerThreatDetectionSettings{ 12556 ServerResponse: googleapi.ServerResponse{ 12557 Header: res.Header, 12558 HTTPStatusCode: res.StatusCode, 12559 }, 12560 } 12561 target := &ret 12562 if err := gensupport.DecodeResponse(target, res); err != nil { 12563 return nil, err 12564 } 12565 return ret, nil 12566 } 12567 12568 type ProjectsGetEventThreatDetectionSettingsCall struct { 12569 s *Service 12570 name string 12571 urlParams_ gensupport.URLParams 12572 ifNoneMatch_ string 12573 ctx_ context.Context 12574 header_ http.Header 12575 } 12576 12577 // GetEventThreatDetectionSettings: Get the EventThreatDetectionSettings 12578 // resource. In the returned settings response, a missing field only indicates 12579 // that it was not explicitly set, so no assumption should be made about these 12580 // fields. In other words, GetEventThreatDetectionSettings does not calculate 12581 // the effective service settings for the resource, which accounts for 12582 // inherited settings and defaults. Instead, use 12583 // CalculateEventThreatDetectionSettings for this purpose. 12584 // 12585 // - name: The name of the EventThreatDetectionSettings to retrieve. Formats: * 12586 // organizations/{organization}/eventThreatDetectionSettings * 12587 // folders/{folder}/eventThreatDetectionSettings * 12588 // projects/{project}/eventThreatDetectionSettings. 12589 func (r *ProjectsService) GetEventThreatDetectionSettings(name string) *ProjectsGetEventThreatDetectionSettingsCall { 12590 c := &ProjectsGetEventThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12591 c.name = name 12592 return c 12593 } 12594 12595 // Fields allows partial responses to be retrieved. See 12596 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12597 // details. 12598 func (c *ProjectsGetEventThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetEventThreatDetectionSettingsCall { 12599 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12600 return c 12601 } 12602 12603 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12604 // object's ETag matches the given value. This is useful for getting updates 12605 // only after the object has changed since the last request. 12606 func (c *ProjectsGetEventThreatDetectionSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetEventThreatDetectionSettingsCall { 12607 c.ifNoneMatch_ = entityTag 12608 return c 12609 } 12610 12611 // Context sets the context to be used in this call's Do method. 12612 func (c *ProjectsGetEventThreatDetectionSettingsCall) Context(ctx context.Context) *ProjectsGetEventThreatDetectionSettingsCall { 12613 c.ctx_ = ctx 12614 return c 12615 } 12616 12617 // Header returns a http.Header that can be modified by the caller to add 12618 // headers to the request. 12619 func (c *ProjectsGetEventThreatDetectionSettingsCall) Header() http.Header { 12620 if c.header_ == nil { 12621 c.header_ = make(http.Header) 12622 } 12623 return c.header_ 12624 } 12625 12626 func (c *ProjectsGetEventThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 12627 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12628 if c.ifNoneMatch_ != "" { 12629 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12630 } 12631 var body io.Reader = nil 12632 c.urlParams_.Set("alt", alt) 12633 c.urlParams_.Set("prettyPrint", "false") 12634 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 12635 urls += "?" + c.urlParams_.Encode() 12636 req, err := http.NewRequest("GET", urls, body) 12637 if err != nil { 12638 return nil, err 12639 } 12640 req.Header = reqHeaders 12641 googleapi.Expand(req.URL, map[string]string{ 12642 "name": c.name, 12643 }) 12644 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12645 } 12646 12647 // Do executes the "securitycenter.projects.getEventThreatDetectionSettings" call. 12648 // Any non-2xx status code is an error. Response headers are in either 12649 // *EventThreatDetectionSettings.ServerResponse.Header or (if a response was 12650 // returned at all) in error.(*googleapi.Error).Header. Use 12651 // googleapi.IsNotModified to check whether the returned error was because 12652 // http.StatusNotModified was returned. 12653 func (c *ProjectsGetEventThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionSettings, error) { 12654 gensupport.SetOptions(c.urlParams_, opts...) 12655 res, err := c.doRequest("json") 12656 if res != nil && res.StatusCode == http.StatusNotModified { 12657 if res.Body != nil { 12658 res.Body.Close() 12659 } 12660 return nil, gensupport.WrapError(&googleapi.Error{ 12661 Code: res.StatusCode, 12662 Header: res.Header, 12663 }) 12664 } 12665 if err != nil { 12666 return nil, err 12667 } 12668 defer googleapi.CloseBody(res) 12669 if err := googleapi.CheckResponse(res); err != nil { 12670 return nil, gensupport.WrapError(err) 12671 } 12672 ret := &EventThreatDetectionSettings{ 12673 ServerResponse: googleapi.ServerResponse{ 12674 Header: res.Header, 12675 HTTPStatusCode: res.StatusCode, 12676 }, 12677 } 12678 target := &ret 12679 if err := gensupport.DecodeResponse(target, res); err != nil { 12680 return nil, err 12681 } 12682 return ret, nil 12683 } 12684 12685 type ProjectsGetRapidVulnerabilityDetectionSettingsCall struct { 12686 s *Service 12687 name string 12688 urlParams_ gensupport.URLParams 12689 ifNoneMatch_ string 12690 ctx_ context.Context 12691 header_ http.Header 12692 } 12693 12694 // GetRapidVulnerabilityDetectionSettings: Get the 12695 // RapidVulnerabilityDetectionSettings resource. In the returned settings 12696 // response, a missing field only indicates that it was not explicitly set, so 12697 // no assumption should be made about these fields. In other words, 12698 // GetRapidVulnerabilityDetectionSettings does not calculate the effective 12699 // service settings for the resource, which accounts for inherited settings and 12700 // defaults. Instead, use CalculateRapidVulnerabilityDetectionSettings for this 12701 // purpose. 12702 // 12703 // - name: The name of the RapidVulnerabilityDetectionSettings to retrieve. 12704 // Formats: * 12705 // organizations/{organization}/rapidVulnerabilityDetectionSettings * 12706 // folders/{folder}/rapidVulnerabilityDetectionSettings * 12707 // projects/{project}/rapidVulnerabilityDetectionSettings. 12708 func (r *ProjectsService) GetRapidVulnerabilityDetectionSettings(name string) *ProjectsGetRapidVulnerabilityDetectionSettingsCall { 12709 c := &ProjectsGetRapidVulnerabilityDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12710 c.name = name 12711 return c 12712 } 12713 12714 // Fields allows partial responses to be retrieved. See 12715 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12716 // details. 12717 func (c *ProjectsGetRapidVulnerabilityDetectionSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetRapidVulnerabilityDetectionSettingsCall { 12718 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12719 return c 12720 } 12721 12722 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12723 // object's ETag matches the given value. This is useful for getting updates 12724 // only after the object has changed since the last request. 12725 func (c *ProjectsGetRapidVulnerabilityDetectionSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetRapidVulnerabilityDetectionSettingsCall { 12726 c.ifNoneMatch_ = entityTag 12727 return c 12728 } 12729 12730 // Context sets the context to be used in this call's Do method. 12731 func (c *ProjectsGetRapidVulnerabilityDetectionSettingsCall) Context(ctx context.Context) *ProjectsGetRapidVulnerabilityDetectionSettingsCall { 12732 c.ctx_ = ctx 12733 return c 12734 } 12735 12736 // Header returns a http.Header that can be modified by the caller to add 12737 // headers to the request. 12738 func (c *ProjectsGetRapidVulnerabilityDetectionSettingsCall) Header() http.Header { 12739 if c.header_ == nil { 12740 c.header_ = make(http.Header) 12741 } 12742 return c.header_ 12743 } 12744 12745 func (c *ProjectsGetRapidVulnerabilityDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 12746 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12747 if c.ifNoneMatch_ != "" { 12748 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12749 } 12750 var body io.Reader = nil 12751 c.urlParams_.Set("alt", alt) 12752 c.urlParams_.Set("prettyPrint", "false") 12753 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 12754 urls += "?" + c.urlParams_.Encode() 12755 req, err := http.NewRequest("GET", urls, body) 12756 if err != nil { 12757 return nil, err 12758 } 12759 req.Header = reqHeaders 12760 googleapi.Expand(req.URL, map[string]string{ 12761 "name": c.name, 12762 }) 12763 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12764 } 12765 12766 // Do executes the "securitycenter.projects.getRapidVulnerabilityDetectionSettings" call. 12767 // Any non-2xx status code is an error. Response headers are in either 12768 // *RapidVulnerabilityDetectionSettings.ServerResponse.Header or (if a response 12769 // was returned at all) in error.(*googleapi.Error).Header. Use 12770 // googleapi.IsNotModified to check whether the returned error was because 12771 // http.StatusNotModified was returned. 12772 func (c *ProjectsGetRapidVulnerabilityDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { 12773 gensupport.SetOptions(c.urlParams_, opts...) 12774 res, err := c.doRequest("json") 12775 if res != nil && res.StatusCode == http.StatusNotModified { 12776 if res.Body != nil { 12777 res.Body.Close() 12778 } 12779 return nil, gensupport.WrapError(&googleapi.Error{ 12780 Code: res.StatusCode, 12781 Header: res.Header, 12782 }) 12783 } 12784 if err != nil { 12785 return nil, err 12786 } 12787 defer googleapi.CloseBody(res) 12788 if err := googleapi.CheckResponse(res); err != nil { 12789 return nil, gensupport.WrapError(err) 12790 } 12791 ret := &RapidVulnerabilityDetectionSettings{ 12792 ServerResponse: googleapi.ServerResponse{ 12793 Header: res.Header, 12794 HTTPStatusCode: res.StatusCode, 12795 }, 12796 } 12797 target := &ret 12798 if err := gensupport.DecodeResponse(target, res); err != nil { 12799 return nil, err 12800 } 12801 return ret, nil 12802 } 12803 12804 type ProjectsGetSecurityCenterSettingsCall struct { 12805 s *Service 12806 name string 12807 urlParams_ gensupport.URLParams 12808 ifNoneMatch_ string 12809 ctx_ context.Context 12810 header_ http.Header 12811 } 12812 12813 // GetSecurityCenterSettings: Get the SecurityCenterSettings resource. 12814 // 12815 // - name: The name of the SecurityCenterSettings to retrieve. Format: 12816 // organizations/{organization}/securityCenterSettings Format: 12817 // folders/{folder}/securityCenterSettings Format: 12818 // projects/{project}/securityCenterSettings. 12819 func (r *ProjectsService) GetSecurityCenterSettings(name string) *ProjectsGetSecurityCenterSettingsCall { 12820 c := &ProjectsGetSecurityCenterSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12821 c.name = name 12822 return c 12823 } 12824 12825 // Fields allows partial responses to be retrieved. See 12826 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12827 // details. 12828 func (c *ProjectsGetSecurityCenterSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetSecurityCenterSettingsCall { 12829 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12830 return c 12831 } 12832 12833 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12834 // object's ETag matches the given value. This is useful for getting updates 12835 // only after the object has changed since the last request. 12836 func (c *ProjectsGetSecurityCenterSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetSecurityCenterSettingsCall { 12837 c.ifNoneMatch_ = entityTag 12838 return c 12839 } 12840 12841 // Context sets the context to be used in this call's Do method. 12842 func (c *ProjectsGetSecurityCenterSettingsCall) Context(ctx context.Context) *ProjectsGetSecurityCenterSettingsCall { 12843 c.ctx_ = ctx 12844 return c 12845 } 12846 12847 // Header returns a http.Header that can be modified by the caller to add 12848 // headers to the request. 12849 func (c *ProjectsGetSecurityCenterSettingsCall) Header() http.Header { 12850 if c.header_ == nil { 12851 c.header_ = make(http.Header) 12852 } 12853 return c.header_ 12854 } 12855 12856 func (c *ProjectsGetSecurityCenterSettingsCall) doRequest(alt string) (*http.Response, error) { 12857 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12858 if c.ifNoneMatch_ != "" { 12859 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12860 } 12861 var body io.Reader = nil 12862 c.urlParams_.Set("alt", alt) 12863 c.urlParams_.Set("prettyPrint", "false") 12864 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 12865 urls += "?" + c.urlParams_.Encode() 12866 req, err := http.NewRequest("GET", urls, body) 12867 if err != nil { 12868 return nil, err 12869 } 12870 req.Header = reqHeaders 12871 googleapi.Expand(req.URL, map[string]string{ 12872 "name": c.name, 12873 }) 12874 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12875 } 12876 12877 // Do executes the "securitycenter.projects.getSecurityCenterSettings" call. 12878 // Any non-2xx status code is an error. Response headers are in either 12879 // *SecurityCenterSettings.ServerResponse.Header or (if a response was returned 12880 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12881 // check whether the returned error was because http.StatusNotModified was 12882 // returned. 12883 func (c *ProjectsGetSecurityCenterSettingsCall) Do(opts ...googleapi.CallOption) (*SecurityCenterSettings, error) { 12884 gensupport.SetOptions(c.urlParams_, opts...) 12885 res, err := c.doRequest("json") 12886 if res != nil && res.StatusCode == http.StatusNotModified { 12887 if res.Body != nil { 12888 res.Body.Close() 12889 } 12890 return nil, gensupport.WrapError(&googleapi.Error{ 12891 Code: res.StatusCode, 12892 Header: res.Header, 12893 }) 12894 } 12895 if err != nil { 12896 return nil, err 12897 } 12898 defer googleapi.CloseBody(res) 12899 if err := googleapi.CheckResponse(res); err != nil { 12900 return nil, gensupport.WrapError(err) 12901 } 12902 ret := &SecurityCenterSettings{ 12903 ServerResponse: googleapi.ServerResponse{ 12904 Header: res.Header, 12905 HTTPStatusCode: res.StatusCode, 12906 }, 12907 } 12908 target := &ret 12909 if err := gensupport.DecodeResponse(target, res); err != nil { 12910 return nil, err 12911 } 12912 return ret, nil 12913 } 12914 12915 type ProjectsGetSecurityHealthAnalyticsSettingsCall struct { 12916 s *Service 12917 name string 12918 urlParams_ gensupport.URLParams 12919 ifNoneMatch_ string 12920 ctx_ context.Context 12921 header_ http.Header 12922 } 12923 12924 // GetSecurityHealthAnalyticsSettings: Get the SecurityHealthAnalyticsSettings 12925 // resource. In the returned settings response, a missing field only indicates 12926 // that it was not explicitly set, so no assumption should be made about these 12927 // fields. In other words, GetSecurityHealthAnalyticsSettings does not 12928 // calculate the effective service settings for the resource, which accounts 12929 // for inherited settings and defaults. Instead, use 12930 // CalculateSecurityHealthAnalyticsSettings for this purpose. 12931 // 12932 // - name: The name of the SecurityHealthAnalyticsSettings to retrieve. 12933 // Formats: * organizations/{organization}/securityHealthAnalyticsSettings * 12934 // folders/{folder}/securityHealthAnalyticsSettings * 12935 // projects/{project}/securityHealthAnalyticsSettings. 12936 func (r *ProjectsService) GetSecurityHealthAnalyticsSettings(name string) *ProjectsGetSecurityHealthAnalyticsSettingsCall { 12937 c := &ProjectsGetSecurityHealthAnalyticsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12938 c.name = name 12939 return c 12940 } 12941 12942 // Fields allows partial responses to be retrieved. See 12943 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12944 // details. 12945 func (c *ProjectsGetSecurityHealthAnalyticsSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetSecurityHealthAnalyticsSettingsCall { 12946 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12947 return c 12948 } 12949 12950 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12951 // object's ETag matches the given value. This is useful for getting updates 12952 // only after the object has changed since the last request. 12953 func (c *ProjectsGetSecurityHealthAnalyticsSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetSecurityHealthAnalyticsSettingsCall { 12954 c.ifNoneMatch_ = entityTag 12955 return c 12956 } 12957 12958 // Context sets the context to be used in this call's Do method. 12959 func (c *ProjectsGetSecurityHealthAnalyticsSettingsCall) Context(ctx context.Context) *ProjectsGetSecurityHealthAnalyticsSettingsCall { 12960 c.ctx_ = ctx 12961 return c 12962 } 12963 12964 // Header returns a http.Header that can be modified by the caller to add 12965 // headers to the request. 12966 func (c *ProjectsGetSecurityHealthAnalyticsSettingsCall) Header() http.Header { 12967 if c.header_ == nil { 12968 c.header_ = make(http.Header) 12969 } 12970 return c.header_ 12971 } 12972 12973 func (c *ProjectsGetSecurityHealthAnalyticsSettingsCall) doRequest(alt string) (*http.Response, error) { 12974 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12975 if c.ifNoneMatch_ != "" { 12976 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12977 } 12978 var body io.Reader = nil 12979 c.urlParams_.Set("alt", alt) 12980 c.urlParams_.Set("prettyPrint", "false") 12981 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 12982 urls += "?" + c.urlParams_.Encode() 12983 req, err := http.NewRequest("GET", urls, body) 12984 if err != nil { 12985 return nil, err 12986 } 12987 req.Header = reqHeaders 12988 googleapi.Expand(req.URL, map[string]string{ 12989 "name": c.name, 12990 }) 12991 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12992 } 12993 12994 // Do executes the "securitycenter.projects.getSecurityHealthAnalyticsSettings" call. 12995 // Any non-2xx status code is an error. Response headers are in either 12996 // *SecurityHealthAnalyticsSettings.ServerResponse.Header or (if a response was 12997 // returned at all) in error.(*googleapi.Error).Header. Use 12998 // googleapi.IsNotModified to check whether the returned error was because 12999 // http.StatusNotModified was returned. 13000 func (c *ProjectsGetSecurityHealthAnalyticsSettingsCall) Do(opts ...googleapi.CallOption) (*SecurityHealthAnalyticsSettings, error) { 13001 gensupport.SetOptions(c.urlParams_, opts...) 13002 res, err := c.doRequest("json") 13003 if res != nil && res.StatusCode == http.StatusNotModified { 13004 if res.Body != nil { 13005 res.Body.Close() 13006 } 13007 return nil, gensupport.WrapError(&googleapi.Error{ 13008 Code: res.StatusCode, 13009 Header: res.Header, 13010 }) 13011 } 13012 if err != nil { 13013 return nil, err 13014 } 13015 defer googleapi.CloseBody(res) 13016 if err := googleapi.CheckResponse(res); err != nil { 13017 return nil, gensupport.WrapError(err) 13018 } 13019 ret := &SecurityHealthAnalyticsSettings{ 13020 ServerResponse: googleapi.ServerResponse{ 13021 Header: res.Header, 13022 HTTPStatusCode: res.StatusCode, 13023 }, 13024 } 13025 target := &ret 13026 if err := gensupport.DecodeResponse(target, res); err != nil { 13027 return nil, err 13028 } 13029 return ret, nil 13030 } 13031 13032 type ProjectsGetVirtualMachineThreatDetectionSettingsCall struct { 13033 s *Service 13034 name string 13035 urlParams_ gensupport.URLParams 13036 ifNoneMatch_ string 13037 ctx_ context.Context 13038 header_ http.Header 13039 } 13040 13041 // GetVirtualMachineThreatDetectionSettings: Get the 13042 // VirtualMachineThreatDetectionSettings resource. In the returned settings 13043 // response, a missing field only indicates that it was not explicitly set, so 13044 // no assumption should be made about these fields. In other words, 13045 // GetVirtualMachineThreatDetectionSettings does not calculate the effective 13046 // service settings for the resource, which accounts for inherited settings and 13047 // defaults. Instead, use CalculateVirtualMachineThreatDetectionSettings for 13048 // this purpose. 13049 // 13050 // - name: The name of the VirtualMachineThreatDetectionSettings to retrieve. 13051 // Formats: * 13052 // organizations/{organization}/virtualMachineThreatDetectionSettings * 13053 // folders/{folder}/virtualMachineThreatDetectionSettings * 13054 // projects/{project}/virtualMachineThreatDetectionSettings. 13055 func (r *ProjectsService) GetVirtualMachineThreatDetectionSettings(name string) *ProjectsGetVirtualMachineThreatDetectionSettingsCall { 13056 c := &ProjectsGetVirtualMachineThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13057 c.name = name 13058 return c 13059 } 13060 13061 // Fields allows partial responses to be retrieved. See 13062 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13063 // details. 13064 func (c *ProjectsGetVirtualMachineThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetVirtualMachineThreatDetectionSettingsCall { 13065 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13066 return c 13067 } 13068 13069 // IfNoneMatch sets an optional parameter which makes the operation fail if the 13070 // object's ETag matches the given value. This is useful for getting updates 13071 // only after the object has changed since the last request. 13072 func (c *ProjectsGetVirtualMachineThreatDetectionSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetVirtualMachineThreatDetectionSettingsCall { 13073 c.ifNoneMatch_ = entityTag 13074 return c 13075 } 13076 13077 // Context sets the context to be used in this call's Do method. 13078 func (c *ProjectsGetVirtualMachineThreatDetectionSettingsCall) Context(ctx context.Context) *ProjectsGetVirtualMachineThreatDetectionSettingsCall { 13079 c.ctx_ = ctx 13080 return c 13081 } 13082 13083 // Header returns a http.Header that can be modified by the caller to add 13084 // headers to the request. 13085 func (c *ProjectsGetVirtualMachineThreatDetectionSettingsCall) Header() http.Header { 13086 if c.header_ == nil { 13087 c.header_ = make(http.Header) 13088 } 13089 return c.header_ 13090 } 13091 13092 func (c *ProjectsGetVirtualMachineThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 13093 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 13094 if c.ifNoneMatch_ != "" { 13095 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13096 } 13097 var body io.Reader = nil 13098 c.urlParams_.Set("alt", alt) 13099 c.urlParams_.Set("prettyPrint", "false") 13100 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 13101 urls += "?" + c.urlParams_.Encode() 13102 req, err := http.NewRequest("GET", urls, body) 13103 if err != nil { 13104 return nil, err 13105 } 13106 req.Header = reqHeaders 13107 googleapi.Expand(req.URL, map[string]string{ 13108 "name": c.name, 13109 }) 13110 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13111 } 13112 13113 // Do executes the "securitycenter.projects.getVirtualMachineThreatDetectionSettings" call. 13114 // Any non-2xx status code is an error. Response headers are in either 13115 // *VirtualMachineThreatDetectionSettings.ServerResponse.Header or (if a 13116 // response was returned at all) in error.(*googleapi.Error).Header. Use 13117 // googleapi.IsNotModified to check whether the returned error was because 13118 // http.StatusNotModified was returned. 13119 func (c *ProjectsGetVirtualMachineThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*VirtualMachineThreatDetectionSettings, error) { 13120 gensupport.SetOptions(c.urlParams_, opts...) 13121 res, err := c.doRequest("json") 13122 if res != nil && res.StatusCode == http.StatusNotModified { 13123 if res.Body != nil { 13124 res.Body.Close() 13125 } 13126 return nil, gensupport.WrapError(&googleapi.Error{ 13127 Code: res.StatusCode, 13128 Header: res.Header, 13129 }) 13130 } 13131 if err != nil { 13132 return nil, err 13133 } 13134 defer googleapi.CloseBody(res) 13135 if err := googleapi.CheckResponse(res); err != nil { 13136 return nil, gensupport.WrapError(err) 13137 } 13138 ret := &VirtualMachineThreatDetectionSettings{ 13139 ServerResponse: googleapi.ServerResponse{ 13140 Header: res.Header, 13141 HTTPStatusCode: res.StatusCode, 13142 }, 13143 } 13144 target := &ret 13145 if err := gensupport.DecodeResponse(target, res); err != nil { 13146 return nil, err 13147 } 13148 return ret, nil 13149 } 13150 13151 type ProjectsGetWebSecurityScannerSettingsCall struct { 13152 s *Service 13153 name string 13154 urlParams_ gensupport.URLParams 13155 ifNoneMatch_ string 13156 ctx_ context.Context 13157 header_ http.Header 13158 } 13159 13160 // GetWebSecurityScannerSettings: Get the WebSecurityScannerSettings resource. 13161 // In the returned settings response, a missing field only indicates that it 13162 // was not explicitly set, so no assumption should be made about these fields. 13163 // In other words, GetWebSecurityScannerSettings does not calculate the 13164 // effective service settings for the resource, which accounts for inherited 13165 // settings and defaults. Instead, use CalculateWebSecurityScannerSettings for 13166 // this purpose. 13167 // 13168 // - name: The name of the WebSecurityScannerSettings to retrieve. Formats: * 13169 // organizations/{organization}/webSecurityScannerSettings * 13170 // folders/{folder}/webSecurityScannerSettings * 13171 // projects/{project}/webSecurityScannerSettings. 13172 func (r *ProjectsService) GetWebSecurityScannerSettings(name string) *ProjectsGetWebSecurityScannerSettingsCall { 13173 c := &ProjectsGetWebSecurityScannerSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13174 c.name = name 13175 return c 13176 } 13177 13178 // Fields allows partial responses to be retrieved. See 13179 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13180 // details. 13181 func (c *ProjectsGetWebSecurityScannerSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetWebSecurityScannerSettingsCall { 13182 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13183 return c 13184 } 13185 13186 // IfNoneMatch sets an optional parameter which makes the operation fail if the 13187 // object's ETag matches the given value. This is useful for getting updates 13188 // only after the object has changed since the last request. 13189 func (c *ProjectsGetWebSecurityScannerSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetWebSecurityScannerSettingsCall { 13190 c.ifNoneMatch_ = entityTag 13191 return c 13192 } 13193 13194 // Context sets the context to be used in this call's Do method. 13195 func (c *ProjectsGetWebSecurityScannerSettingsCall) Context(ctx context.Context) *ProjectsGetWebSecurityScannerSettingsCall { 13196 c.ctx_ = ctx 13197 return c 13198 } 13199 13200 // Header returns a http.Header that can be modified by the caller to add 13201 // headers to the request. 13202 func (c *ProjectsGetWebSecurityScannerSettingsCall) Header() http.Header { 13203 if c.header_ == nil { 13204 c.header_ = make(http.Header) 13205 } 13206 return c.header_ 13207 } 13208 13209 func (c *ProjectsGetWebSecurityScannerSettingsCall) doRequest(alt string) (*http.Response, error) { 13210 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 13211 if c.ifNoneMatch_ != "" { 13212 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13213 } 13214 var body io.Reader = nil 13215 c.urlParams_.Set("alt", alt) 13216 c.urlParams_.Set("prettyPrint", "false") 13217 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 13218 urls += "?" + c.urlParams_.Encode() 13219 req, err := http.NewRequest("GET", urls, body) 13220 if err != nil { 13221 return nil, err 13222 } 13223 req.Header = reqHeaders 13224 googleapi.Expand(req.URL, map[string]string{ 13225 "name": c.name, 13226 }) 13227 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13228 } 13229 13230 // Do executes the "securitycenter.projects.getWebSecurityScannerSettings" call. 13231 // Any non-2xx status code is an error. Response headers are in either 13232 // *WebSecurityScannerSettings.ServerResponse.Header or (if a response was 13233 // returned at all) in error.(*googleapi.Error).Header. Use 13234 // googleapi.IsNotModified to check whether the returned error was because 13235 // http.StatusNotModified was returned. 13236 func (c *ProjectsGetWebSecurityScannerSettingsCall) Do(opts ...googleapi.CallOption) (*WebSecurityScannerSettings, error) { 13237 gensupport.SetOptions(c.urlParams_, opts...) 13238 res, err := c.doRequest("json") 13239 if res != nil && res.StatusCode == http.StatusNotModified { 13240 if res.Body != nil { 13241 res.Body.Close() 13242 } 13243 return nil, gensupport.WrapError(&googleapi.Error{ 13244 Code: res.StatusCode, 13245 Header: res.Header, 13246 }) 13247 } 13248 if err != nil { 13249 return nil, err 13250 } 13251 defer googleapi.CloseBody(res) 13252 if err := googleapi.CheckResponse(res); err != nil { 13253 return nil, gensupport.WrapError(err) 13254 } 13255 ret := &WebSecurityScannerSettings{ 13256 ServerResponse: googleapi.ServerResponse{ 13257 Header: res.Header, 13258 HTTPStatusCode: res.StatusCode, 13259 }, 13260 } 13261 target := &ret 13262 if err := gensupport.DecodeResponse(target, res); err != nil { 13263 return nil, err 13264 } 13265 return ret, nil 13266 } 13267 13268 type ProjectsUpdateContainerThreatDetectionSettingsCall struct { 13269 s *Service 13270 name string 13271 containerthreatdetectionsettings *ContainerThreatDetectionSettings 13272 urlParams_ gensupport.URLParams 13273 ctx_ context.Context 13274 header_ http.Header 13275 } 13276 13277 // UpdateContainerThreatDetectionSettings: Update the 13278 // ContainerThreatDetectionSettings resource. 13279 // 13280 // - name: The resource name of the ContainerThreatDetectionSettings. Formats: 13281 // - organizations/{organization}/containerThreatDetectionSettings * 13282 // folders/{folder}/containerThreatDetectionSettings * 13283 // projects/{project}/containerThreatDetectionSettings * 13284 // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatD 13285 // etectionSettings. 13286 func (r *ProjectsService) UpdateContainerThreatDetectionSettings(name string, containerthreatdetectionsettings *ContainerThreatDetectionSettings) *ProjectsUpdateContainerThreatDetectionSettingsCall { 13287 c := &ProjectsUpdateContainerThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13288 c.name = name 13289 c.containerthreatdetectionsettings = containerthreatdetectionsettings 13290 return c 13291 } 13292 13293 // UpdateMask sets the optional parameter "updateMask": The list of fields to 13294 // be updated. 13295 func (c *ProjectsUpdateContainerThreatDetectionSettingsCall) UpdateMask(updateMask string) *ProjectsUpdateContainerThreatDetectionSettingsCall { 13296 c.urlParams_.Set("updateMask", updateMask) 13297 return c 13298 } 13299 13300 // Fields allows partial responses to be retrieved. See 13301 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13302 // details. 13303 func (c *ProjectsUpdateContainerThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *ProjectsUpdateContainerThreatDetectionSettingsCall { 13304 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13305 return c 13306 } 13307 13308 // Context sets the context to be used in this call's Do method. 13309 func (c *ProjectsUpdateContainerThreatDetectionSettingsCall) Context(ctx context.Context) *ProjectsUpdateContainerThreatDetectionSettingsCall { 13310 c.ctx_ = ctx 13311 return c 13312 } 13313 13314 // Header returns a http.Header that can be modified by the caller to add 13315 // headers to the request. 13316 func (c *ProjectsUpdateContainerThreatDetectionSettingsCall) Header() http.Header { 13317 if c.header_ == nil { 13318 c.header_ = make(http.Header) 13319 } 13320 return c.header_ 13321 } 13322 13323 func (c *ProjectsUpdateContainerThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 13324 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13325 var body io.Reader = nil 13326 body, err := googleapi.WithoutDataWrapper.JSONReader(c.containerthreatdetectionsettings) 13327 if err != nil { 13328 return nil, err 13329 } 13330 c.urlParams_.Set("alt", alt) 13331 c.urlParams_.Set("prettyPrint", "false") 13332 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 13333 urls += "?" + c.urlParams_.Encode() 13334 req, err := http.NewRequest("PATCH", urls, body) 13335 if err != nil { 13336 return nil, err 13337 } 13338 req.Header = reqHeaders 13339 googleapi.Expand(req.URL, map[string]string{ 13340 "name": c.name, 13341 }) 13342 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13343 } 13344 13345 // Do executes the "securitycenter.projects.updateContainerThreatDetectionSettings" call. 13346 // Any non-2xx status code is an error. Response headers are in either 13347 // *ContainerThreatDetectionSettings.ServerResponse.Header or (if a response 13348 // was returned at all) in error.(*googleapi.Error).Header. Use 13349 // googleapi.IsNotModified to check whether the returned error was because 13350 // http.StatusNotModified was returned. 13351 func (c *ProjectsUpdateContainerThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*ContainerThreatDetectionSettings, error) { 13352 gensupport.SetOptions(c.urlParams_, opts...) 13353 res, err := c.doRequest("json") 13354 if res != nil && res.StatusCode == http.StatusNotModified { 13355 if res.Body != nil { 13356 res.Body.Close() 13357 } 13358 return nil, gensupport.WrapError(&googleapi.Error{ 13359 Code: res.StatusCode, 13360 Header: res.Header, 13361 }) 13362 } 13363 if err != nil { 13364 return nil, err 13365 } 13366 defer googleapi.CloseBody(res) 13367 if err := googleapi.CheckResponse(res); err != nil { 13368 return nil, gensupport.WrapError(err) 13369 } 13370 ret := &ContainerThreatDetectionSettings{ 13371 ServerResponse: googleapi.ServerResponse{ 13372 Header: res.Header, 13373 HTTPStatusCode: res.StatusCode, 13374 }, 13375 } 13376 target := &ret 13377 if err := gensupport.DecodeResponse(target, res); err != nil { 13378 return nil, err 13379 } 13380 return ret, nil 13381 } 13382 13383 type ProjectsUpdateEventThreatDetectionSettingsCall struct { 13384 s *Service 13385 name string 13386 eventthreatdetectionsettings *EventThreatDetectionSettings 13387 urlParams_ gensupport.URLParams 13388 ctx_ context.Context 13389 header_ http.Header 13390 } 13391 13392 // UpdateEventThreatDetectionSettings: Update the EventThreatDetectionSettings 13393 // resource. 13394 // 13395 // - name: The resource name of the EventThreatDetectionSettings. Formats: * 13396 // organizations/{organization}/eventThreatDetectionSettings * 13397 // folders/{folder}/eventThreatDetectionSettings * 13398 // projects/{project}/eventThreatDetectionSettings. 13399 func (r *ProjectsService) UpdateEventThreatDetectionSettings(name string, eventthreatdetectionsettings *EventThreatDetectionSettings) *ProjectsUpdateEventThreatDetectionSettingsCall { 13400 c := &ProjectsUpdateEventThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13401 c.name = name 13402 c.eventthreatdetectionsettings = eventthreatdetectionsettings 13403 return c 13404 } 13405 13406 // UpdateMask sets the optional parameter "updateMask": The list of fields to 13407 // be updated. 13408 func (c *ProjectsUpdateEventThreatDetectionSettingsCall) UpdateMask(updateMask string) *ProjectsUpdateEventThreatDetectionSettingsCall { 13409 c.urlParams_.Set("updateMask", updateMask) 13410 return c 13411 } 13412 13413 // Fields allows partial responses to be retrieved. See 13414 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13415 // details. 13416 func (c *ProjectsUpdateEventThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *ProjectsUpdateEventThreatDetectionSettingsCall { 13417 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13418 return c 13419 } 13420 13421 // Context sets the context to be used in this call's Do method. 13422 func (c *ProjectsUpdateEventThreatDetectionSettingsCall) Context(ctx context.Context) *ProjectsUpdateEventThreatDetectionSettingsCall { 13423 c.ctx_ = ctx 13424 return c 13425 } 13426 13427 // Header returns a http.Header that can be modified by the caller to add 13428 // headers to the request. 13429 func (c *ProjectsUpdateEventThreatDetectionSettingsCall) Header() http.Header { 13430 if c.header_ == nil { 13431 c.header_ = make(http.Header) 13432 } 13433 return c.header_ 13434 } 13435 13436 func (c *ProjectsUpdateEventThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 13437 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13438 var body io.Reader = nil 13439 body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventthreatdetectionsettings) 13440 if err != nil { 13441 return nil, err 13442 } 13443 c.urlParams_.Set("alt", alt) 13444 c.urlParams_.Set("prettyPrint", "false") 13445 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 13446 urls += "?" + c.urlParams_.Encode() 13447 req, err := http.NewRequest("PATCH", urls, body) 13448 if err != nil { 13449 return nil, err 13450 } 13451 req.Header = reqHeaders 13452 googleapi.Expand(req.URL, map[string]string{ 13453 "name": c.name, 13454 }) 13455 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13456 } 13457 13458 // Do executes the "securitycenter.projects.updateEventThreatDetectionSettings" call. 13459 // Any non-2xx status code is an error. Response headers are in either 13460 // *EventThreatDetectionSettings.ServerResponse.Header or (if a response was 13461 // returned at all) in error.(*googleapi.Error).Header. Use 13462 // googleapi.IsNotModified to check whether the returned error was because 13463 // http.StatusNotModified was returned. 13464 func (c *ProjectsUpdateEventThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionSettings, error) { 13465 gensupport.SetOptions(c.urlParams_, opts...) 13466 res, err := c.doRequest("json") 13467 if res != nil && res.StatusCode == http.StatusNotModified { 13468 if res.Body != nil { 13469 res.Body.Close() 13470 } 13471 return nil, gensupport.WrapError(&googleapi.Error{ 13472 Code: res.StatusCode, 13473 Header: res.Header, 13474 }) 13475 } 13476 if err != nil { 13477 return nil, err 13478 } 13479 defer googleapi.CloseBody(res) 13480 if err := googleapi.CheckResponse(res); err != nil { 13481 return nil, gensupport.WrapError(err) 13482 } 13483 ret := &EventThreatDetectionSettings{ 13484 ServerResponse: googleapi.ServerResponse{ 13485 Header: res.Header, 13486 HTTPStatusCode: res.StatusCode, 13487 }, 13488 } 13489 target := &ret 13490 if err := gensupport.DecodeResponse(target, res); err != nil { 13491 return nil, err 13492 } 13493 return ret, nil 13494 } 13495 13496 type ProjectsUpdateRapidVulnerabilityDetectionSettingsCall struct { 13497 s *Service 13498 name string 13499 rapidvulnerabilitydetectionsettings *RapidVulnerabilityDetectionSettings 13500 urlParams_ gensupport.URLParams 13501 ctx_ context.Context 13502 header_ http.Header 13503 } 13504 13505 // UpdateRapidVulnerabilityDetectionSettings: Update the 13506 // RapidVulnerabilityDetectionSettings resource. 13507 // 13508 // - name: The resource name of the RapidVulnerabilityDetectionSettings. 13509 // Formats: * 13510 // organizations/{organization}/rapidVulnerabilityDetectionSettings * 13511 // folders/{folder}/rapidVulnerabilityDetectionSettings * 13512 // projects/{project}/rapidVulnerabilityDetectionSettings. 13513 func (r *ProjectsService) UpdateRapidVulnerabilityDetectionSettings(name string, rapidvulnerabilitydetectionsettings *RapidVulnerabilityDetectionSettings) *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall { 13514 c := &ProjectsUpdateRapidVulnerabilityDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13515 c.name = name 13516 c.rapidvulnerabilitydetectionsettings = rapidvulnerabilitydetectionsettings 13517 return c 13518 } 13519 13520 // UpdateMask sets the optional parameter "updateMask": The list of fields to 13521 // be updated. 13522 func (c *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall) UpdateMask(updateMask string) *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall { 13523 c.urlParams_.Set("updateMask", updateMask) 13524 return c 13525 } 13526 13527 // Fields allows partial responses to be retrieved. See 13528 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13529 // details. 13530 func (c *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall) Fields(s ...googleapi.Field) *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall { 13531 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13532 return c 13533 } 13534 13535 // Context sets the context to be used in this call's Do method. 13536 func (c *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall) Context(ctx context.Context) *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall { 13537 c.ctx_ = ctx 13538 return c 13539 } 13540 13541 // Header returns a http.Header that can be modified by the caller to add 13542 // headers to the request. 13543 func (c *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall) Header() http.Header { 13544 if c.header_ == nil { 13545 c.header_ = make(http.Header) 13546 } 13547 return c.header_ 13548 } 13549 13550 func (c *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 13551 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13552 var body io.Reader = nil 13553 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rapidvulnerabilitydetectionsettings) 13554 if err != nil { 13555 return nil, err 13556 } 13557 c.urlParams_.Set("alt", alt) 13558 c.urlParams_.Set("prettyPrint", "false") 13559 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 13560 urls += "?" + c.urlParams_.Encode() 13561 req, err := http.NewRequest("PATCH", urls, body) 13562 if err != nil { 13563 return nil, err 13564 } 13565 req.Header = reqHeaders 13566 googleapi.Expand(req.URL, map[string]string{ 13567 "name": c.name, 13568 }) 13569 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13570 } 13571 13572 // Do executes the "securitycenter.projects.updateRapidVulnerabilityDetectionSettings" call. 13573 // Any non-2xx status code is an error. Response headers are in either 13574 // *RapidVulnerabilityDetectionSettings.ServerResponse.Header or (if a response 13575 // was returned at all) in error.(*googleapi.Error).Header. Use 13576 // googleapi.IsNotModified to check whether the returned error was because 13577 // http.StatusNotModified was returned. 13578 func (c *ProjectsUpdateRapidVulnerabilityDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { 13579 gensupport.SetOptions(c.urlParams_, opts...) 13580 res, err := c.doRequest("json") 13581 if res != nil && res.StatusCode == http.StatusNotModified { 13582 if res.Body != nil { 13583 res.Body.Close() 13584 } 13585 return nil, gensupport.WrapError(&googleapi.Error{ 13586 Code: res.StatusCode, 13587 Header: res.Header, 13588 }) 13589 } 13590 if err != nil { 13591 return nil, err 13592 } 13593 defer googleapi.CloseBody(res) 13594 if err := googleapi.CheckResponse(res); err != nil { 13595 return nil, gensupport.WrapError(err) 13596 } 13597 ret := &RapidVulnerabilityDetectionSettings{ 13598 ServerResponse: googleapi.ServerResponse{ 13599 Header: res.Header, 13600 HTTPStatusCode: res.StatusCode, 13601 }, 13602 } 13603 target := &ret 13604 if err := gensupport.DecodeResponse(target, res); err != nil { 13605 return nil, err 13606 } 13607 return ret, nil 13608 } 13609 13610 type ProjectsUpdateSecurityHealthAnalyticsSettingsCall struct { 13611 s *Service 13612 name string 13613 securityhealthanalyticssettings *SecurityHealthAnalyticsSettings 13614 urlParams_ gensupport.URLParams 13615 ctx_ context.Context 13616 header_ http.Header 13617 } 13618 13619 // UpdateSecurityHealthAnalyticsSettings: Update the 13620 // SecurityHealthAnalyticsSettings resource. 13621 // 13622 // - name: The resource name of the SecurityHealthAnalyticsSettings. Formats: * 13623 // organizations/{organization}/securityHealthAnalyticsSettings * 13624 // folders/{folder}/securityHealthAnalyticsSettings * 13625 // projects/{project}/securityHealthAnalyticsSettings. 13626 func (r *ProjectsService) UpdateSecurityHealthAnalyticsSettings(name string, securityhealthanalyticssettings *SecurityHealthAnalyticsSettings) *ProjectsUpdateSecurityHealthAnalyticsSettingsCall { 13627 c := &ProjectsUpdateSecurityHealthAnalyticsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13628 c.name = name 13629 c.securityhealthanalyticssettings = securityhealthanalyticssettings 13630 return c 13631 } 13632 13633 // UpdateMask sets the optional parameter "updateMask": The list of fields to 13634 // be updated. 13635 func (c *ProjectsUpdateSecurityHealthAnalyticsSettingsCall) UpdateMask(updateMask string) *ProjectsUpdateSecurityHealthAnalyticsSettingsCall { 13636 c.urlParams_.Set("updateMask", updateMask) 13637 return c 13638 } 13639 13640 // Fields allows partial responses to be retrieved. See 13641 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13642 // details. 13643 func (c *ProjectsUpdateSecurityHealthAnalyticsSettingsCall) Fields(s ...googleapi.Field) *ProjectsUpdateSecurityHealthAnalyticsSettingsCall { 13644 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13645 return c 13646 } 13647 13648 // Context sets the context to be used in this call's Do method. 13649 func (c *ProjectsUpdateSecurityHealthAnalyticsSettingsCall) Context(ctx context.Context) *ProjectsUpdateSecurityHealthAnalyticsSettingsCall { 13650 c.ctx_ = ctx 13651 return c 13652 } 13653 13654 // Header returns a http.Header that can be modified by the caller to add 13655 // headers to the request. 13656 func (c *ProjectsUpdateSecurityHealthAnalyticsSettingsCall) Header() http.Header { 13657 if c.header_ == nil { 13658 c.header_ = make(http.Header) 13659 } 13660 return c.header_ 13661 } 13662 13663 func (c *ProjectsUpdateSecurityHealthAnalyticsSettingsCall) doRequest(alt string) (*http.Response, error) { 13664 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13665 var body io.Reader = nil 13666 body, err := googleapi.WithoutDataWrapper.JSONReader(c.securityhealthanalyticssettings) 13667 if err != nil { 13668 return nil, err 13669 } 13670 c.urlParams_.Set("alt", alt) 13671 c.urlParams_.Set("prettyPrint", "false") 13672 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 13673 urls += "?" + c.urlParams_.Encode() 13674 req, err := http.NewRequest("PATCH", urls, body) 13675 if err != nil { 13676 return nil, err 13677 } 13678 req.Header = reqHeaders 13679 googleapi.Expand(req.URL, map[string]string{ 13680 "name": c.name, 13681 }) 13682 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13683 } 13684 13685 // Do executes the "securitycenter.projects.updateSecurityHealthAnalyticsSettings" call. 13686 // Any non-2xx status code is an error. Response headers are in either 13687 // *SecurityHealthAnalyticsSettings.ServerResponse.Header or (if a response was 13688 // returned at all) in error.(*googleapi.Error).Header. Use 13689 // googleapi.IsNotModified to check whether the returned error was because 13690 // http.StatusNotModified was returned. 13691 func (c *ProjectsUpdateSecurityHealthAnalyticsSettingsCall) Do(opts ...googleapi.CallOption) (*SecurityHealthAnalyticsSettings, error) { 13692 gensupport.SetOptions(c.urlParams_, opts...) 13693 res, err := c.doRequest("json") 13694 if res != nil && res.StatusCode == http.StatusNotModified { 13695 if res.Body != nil { 13696 res.Body.Close() 13697 } 13698 return nil, gensupport.WrapError(&googleapi.Error{ 13699 Code: res.StatusCode, 13700 Header: res.Header, 13701 }) 13702 } 13703 if err != nil { 13704 return nil, err 13705 } 13706 defer googleapi.CloseBody(res) 13707 if err := googleapi.CheckResponse(res); err != nil { 13708 return nil, gensupport.WrapError(err) 13709 } 13710 ret := &SecurityHealthAnalyticsSettings{ 13711 ServerResponse: googleapi.ServerResponse{ 13712 Header: res.Header, 13713 HTTPStatusCode: res.StatusCode, 13714 }, 13715 } 13716 target := &ret 13717 if err := gensupport.DecodeResponse(target, res); err != nil { 13718 return nil, err 13719 } 13720 return ret, nil 13721 } 13722 13723 type ProjectsUpdateVirtualMachineThreatDetectionSettingsCall struct { 13724 s *Service 13725 name string 13726 virtualmachinethreatdetectionsettings *VirtualMachineThreatDetectionSettings 13727 urlParams_ gensupport.URLParams 13728 ctx_ context.Context 13729 header_ http.Header 13730 } 13731 13732 // UpdateVirtualMachineThreatDetectionSettings: Update the 13733 // VirtualMachineThreatDetectionSettings resource. 13734 // 13735 // - name: The resource name of the VirtualMachineThreatDetectionSettings. 13736 // Formats: * 13737 // organizations/{organization}/virtualMachineThreatDetectionSettings * 13738 // folders/{folder}/virtualMachineThreatDetectionSettings * 13739 // projects/{project}/virtualMachineThreatDetectionSettings. 13740 func (r *ProjectsService) UpdateVirtualMachineThreatDetectionSettings(name string, virtualmachinethreatdetectionsettings *VirtualMachineThreatDetectionSettings) *ProjectsUpdateVirtualMachineThreatDetectionSettingsCall { 13741 c := &ProjectsUpdateVirtualMachineThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13742 c.name = name 13743 c.virtualmachinethreatdetectionsettings = virtualmachinethreatdetectionsettings 13744 return c 13745 } 13746 13747 // UpdateMask sets the optional parameter "updateMask": The list of fields to 13748 // be updated. 13749 func (c *ProjectsUpdateVirtualMachineThreatDetectionSettingsCall) UpdateMask(updateMask string) *ProjectsUpdateVirtualMachineThreatDetectionSettingsCall { 13750 c.urlParams_.Set("updateMask", updateMask) 13751 return c 13752 } 13753 13754 // Fields allows partial responses to be retrieved. See 13755 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13756 // details. 13757 func (c *ProjectsUpdateVirtualMachineThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *ProjectsUpdateVirtualMachineThreatDetectionSettingsCall { 13758 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13759 return c 13760 } 13761 13762 // Context sets the context to be used in this call's Do method. 13763 func (c *ProjectsUpdateVirtualMachineThreatDetectionSettingsCall) Context(ctx context.Context) *ProjectsUpdateVirtualMachineThreatDetectionSettingsCall { 13764 c.ctx_ = ctx 13765 return c 13766 } 13767 13768 // Header returns a http.Header that can be modified by the caller to add 13769 // headers to the request. 13770 func (c *ProjectsUpdateVirtualMachineThreatDetectionSettingsCall) Header() http.Header { 13771 if c.header_ == nil { 13772 c.header_ = make(http.Header) 13773 } 13774 return c.header_ 13775 } 13776 13777 func (c *ProjectsUpdateVirtualMachineThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 13778 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13779 var body io.Reader = nil 13780 body, err := googleapi.WithoutDataWrapper.JSONReader(c.virtualmachinethreatdetectionsettings) 13781 if err != nil { 13782 return nil, err 13783 } 13784 c.urlParams_.Set("alt", alt) 13785 c.urlParams_.Set("prettyPrint", "false") 13786 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 13787 urls += "?" + c.urlParams_.Encode() 13788 req, err := http.NewRequest("PATCH", urls, body) 13789 if err != nil { 13790 return nil, err 13791 } 13792 req.Header = reqHeaders 13793 googleapi.Expand(req.URL, map[string]string{ 13794 "name": c.name, 13795 }) 13796 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13797 } 13798 13799 // Do executes the "securitycenter.projects.updateVirtualMachineThreatDetectionSettings" call. 13800 // Any non-2xx status code is an error. Response headers are in either 13801 // *VirtualMachineThreatDetectionSettings.ServerResponse.Header or (if a 13802 // response was returned at all) in error.(*googleapi.Error).Header. Use 13803 // googleapi.IsNotModified to check whether the returned error was because 13804 // http.StatusNotModified was returned. 13805 func (c *ProjectsUpdateVirtualMachineThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*VirtualMachineThreatDetectionSettings, error) { 13806 gensupport.SetOptions(c.urlParams_, opts...) 13807 res, err := c.doRequest("json") 13808 if res != nil && res.StatusCode == http.StatusNotModified { 13809 if res.Body != nil { 13810 res.Body.Close() 13811 } 13812 return nil, gensupport.WrapError(&googleapi.Error{ 13813 Code: res.StatusCode, 13814 Header: res.Header, 13815 }) 13816 } 13817 if err != nil { 13818 return nil, err 13819 } 13820 defer googleapi.CloseBody(res) 13821 if err := googleapi.CheckResponse(res); err != nil { 13822 return nil, gensupport.WrapError(err) 13823 } 13824 ret := &VirtualMachineThreatDetectionSettings{ 13825 ServerResponse: googleapi.ServerResponse{ 13826 Header: res.Header, 13827 HTTPStatusCode: res.StatusCode, 13828 }, 13829 } 13830 target := &ret 13831 if err := gensupport.DecodeResponse(target, res); err != nil { 13832 return nil, err 13833 } 13834 return ret, nil 13835 } 13836 13837 type ProjectsUpdateWebSecurityScannerSettingsCall struct { 13838 s *Service 13839 name string 13840 websecurityscannersettings *WebSecurityScannerSettings 13841 urlParams_ gensupport.URLParams 13842 ctx_ context.Context 13843 header_ http.Header 13844 } 13845 13846 // UpdateWebSecurityScannerSettings: Update the WebSecurityScannerSettings 13847 // resource. 13848 // 13849 // - name: The resource name of the WebSecurityScannerSettings. Formats: * 13850 // organizations/{organization}/webSecurityScannerSettings * 13851 // folders/{folder}/webSecurityScannerSettings * 13852 // projects/{project}/webSecurityScannerSettings. 13853 func (r *ProjectsService) UpdateWebSecurityScannerSettings(name string, websecurityscannersettings *WebSecurityScannerSettings) *ProjectsUpdateWebSecurityScannerSettingsCall { 13854 c := &ProjectsUpdateWebSecurityScannerSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13855 c.name = name 13856 c.websecurityscannersettings = websecurityscannersettings 13857 return c 13858 } 13859 13860 // UpdateMask sets the optional parameter "updateMask": The list of fields to 13861 // be updated. 13862 func (c *ProjectsUpdateWebSecurityScannerSettingsCall) UpdateMask(updateMask string) *ProjectsUpdateWebSecurityScannerSettingsCall { 13863 c.urlParams_.Set("updateMask", updateMask) 13864 return c 13865 } 13866 13867 // Fields allows partial responses to be retrieved. See 13868 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13869 // details. 13870 func (c *ProjectsUpdateWebSecurityScannerSettingsCall) Fields(s ...googleapi.Field) *ProjectsUpdateWebSecurityScannerSettingsCall { 13871 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13872 return c 13873 } 13874 13875 // Context sets the context to be used in this call's Do method. 13876 func (c *ProjectsUpdateWebSecurityScannerSettingsCall) Context(ctx context.Context) *ProjectsUpdateWebSecurityScannerSettingsCall { 13877 c.ctx_ = ctx 13878 return c 13879 } 13880 13881 // Header returns a http.Header that can be modified by the caller to add 13882 // headers to the request. 13883 func (c *ProjectsUpdateWebSecurityScannerSettingsCall) Header() http.Header { 13884 if c.header_ == nil { 13885 c.header_ = make(http.Header) 13886 } 13887 return c.header_ 13888 } 13889 13890 func (c *ProjectsUpdateWebSecurityScannerSettingsCall) doRequest(alt string) (*http.Response, error) { 13891 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13892 var body io.Reader = nil 13893 body, err := googleapi.WithoutDataWrapper.JSONReader(c.websecurityscannersettings) 13894 if err != nil { 13895 return nil, err 13896 } 13897 c.urlParams_.Set("alt", alt) 13898 c.urlParams_.Set("prettyPrint", "false") 13899 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 13900 urls += "?" + c.urlParams_.Encode() 13901 req, err := http.NewRequest("PATCH", urls, body) 13902 if err != nil { 13903 return nil, err 13904 } 13905 req.Header = reqHeaders 13906 googleapi.Expand(req.URL, map[string]string{ 13907 "name": c.name, 13908 }) 13909 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13910 } 13911 13912 // Do executes the "securitycenter.projects.updateWebSecurityScannerSettings" call. 13913 // Any non-2xx status code is an error. Response headers are in either 13914 // *WebSecurityScannerSettings.ServerResponse.Header or (if a response was 13915 // returned at all) in error.(*googleapi.Error).Header. Use 13916 // googleapi.IsNotModified to check whether the returned error was because 13917 // http.StatusNotModified was returned. 13918 func (c *ProjectsUpdateWebSecurityScannerSettingsCall) Do(opts ...googleapi.CallOption) (*WebSecurityScannerSettings, error) { 13919 gensupport.SetOptions(c.urlParams_, opts...) 13920 res, err := c.doRequest("json") 13921 if res != nil && res.StatusCode == http.StatusNotModified { 13922 if res.Body != nil { 13923 res.Body.Close() 13924 } 13925 return nil, gensupport.WrapError(&googleapi.Error{ 13926 Code: res.StatusCode, 13927 Header: res.Header, 13928 }) 13929 } 13930 if err != nil { 13931 return nil, err 13932 } 13933 defer googleapi.CloseBody(res) 13934 if err := googleapi.CheckResponse(res); err != nil { 13935 return nil, gensupport.WrapError(err) 13936 } 13937 ret := &WebSecurityScannerSettings{ 13938 ServerResponse: googleapi.ServerResponse{ 13939 Header: res.Header, 13940 HTTPStatusCode: res.StatusCode, 13941 }, 13942 } 13943 target := &ret 13944 if err := gensupport.DecodeResponse(target, res); err != nil { 13945 return nil, err 13946 } 13947 return ret, nil 13948 } 13949 13950 type ProjectsContainerThreatDetectionSettingsCalculateCall struct { 13951 s *Service 13952 name string 13953 urlParams_ gensupport.URLParams 13954 ifNoneMatch_ string 13955 ctx_ context.Context 13956 header_ http.Header 13957 } 13958 13959 // Calculate: Calculates the effective ContainerThreatDetectionSettings based 13960 // on its level in the resource hierarchy and its settings. Settings provided 13961 // closer to the target resource take precedence over those further away (e.g. 13962 // folder will override organization level settings). The default SCC setting 13963 // for the detector service defaults can be overridden at organization, folder 13964 // and project levels. No assumptions should be made about the SCC defaults as 13965 // it is considered an internal implementation detail. 13966 // 13967 // - name: The name of the ContainerThreatDetectionSettings to calculate. 13968 // Formats: * organizations/{organization}/containerThreatDetectionSettings * 13969 // folders/{folder}/containerThreatDetectionSettings * 13970 // projects/{project}/containerThreatDetectionSettings * 13971 // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatD 13972 // etectionSettings. 13973 func (r *ProjectsContainerThreatDetectionSettingsService) Calculate(name string) *ProjectsContainerThreatDetectionSettingsCalculateCall { 13974 c := &ProjectsContainerThreatDetectionSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13975 c.name = name 13976 return c 13977 } 13978 13979 // Fields allows partial responses to be retrieved. See 13980 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13981 // details. 13982 func (c *ProjectsContainerThreatDetectionSettingsCalculateCall) Fields(s ...googleapi.Field) *ProjectsContainerThreatDetectionSettingsCalculateCall { 13983 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13984 return c 13985 } 13986 13987 // IfNoneMatch sets an optional parameter which makes the operation fail if the 13988 // object's ETag matches the given value. This is useful for getting updates 13989 // only after the object has changed since the last request. 13990 func (c *ProjectsContainerThreatDetectionSettingsCalculateCall) IfNoneMatch(entityTag string) *ProjectsContainerThreatDetectionSettingsCalculateCall { 13991 c.ifNoneMatch_ = entityTag 13992 return c 13993 } 13994 13995 // Context sets the context to be used in this call's Do method. 13996 func (c *ProjectsContainerThreatDetectionSettingsCalculateCall) Context(ctx context.Context) *ProjectsContainerThreatDetectionSettingsCalculateCall { 13997 c.ctx_ = ctx 13998 return c 13999 } 14000 14001 // Header returns a http.Header that can be modified by the caller to add 14002 // headers to the request. 14003 func (c *ProjectsContainerThreatDetectionSettingsCalculateCall) Header() http.Header { 14004 if c.header_ == nil { 14005 c.header_ = make(http.Header) 14006 } 14007 return c.header_ 14008 } 14009 14010 func (c *ProjectsContainerThreatDetectionSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 14011 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 14012 if c.ifNoneMatch_ != "" { 14013 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14014 } 14015 var body io.Reader = nil 14016 c.urlParams_.Set("alt", alt) 14017 c.urlParams_.Set("prettyPrint", "false") 14018 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 14019 urls += "?" + c.urlParams_.Encode() 14020 req, err := http.NewRequest("GET", urls, body) 14021 if err != nil { 14022 return nil, err 14023 } 14024 req.Header = reqHeaders 14025 googleapi.Expand(req.URL, map[string]string{ 14026 "name": c.name, 14027 }) 14028 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14029 } 14030 14031 // Do executes the "securitycenter.projects.containerThreatDetectionSettings.calculate" call. 14032 // Any non-2xx status code is an error. Response headers are in either 14033 // *ContainerThreatDetectionSettings.ServerResponse.Header or (if a response 14034 // was returned at all) in error.(*googleapi.Error).Header. Use 14035 // googleapi.IsNotModified to check whether the returned error was because 14036 // http.StatusNotModified was returned. 14037 func (c *ProjectsContainerThreatDetectionSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*ContainerThreatDetectionSettings, error) { 14038 gensupport.SetOptions(c.urlParams_, opts...) 14039 res, err := c.doRequest("json") 14040 if res != nil && res.StatusCode == http.StatusNotModified { 14041 if res.Body != nil { 14042 res.Body.Close() 14043 } 14044 return nil, gensupport.WrapError(&googleapi.Error{ 14045 Code: res.StatusCode, 14046 Header: res.Header, 14047 }) 14048 } 14049 if err != nil { 14050 return nil, err 14051 } 14052 defer googleapi.CloseBody(res) 14053 if err := googleapi.CheckResponse(res); err != nil { 14054 return nil, gensupport.WrapError(err) 14055 } 14056 ret := &ContainerThreatDetectionSettings{ 14057 ServerResponse: googleapi.ServerResponse{ 14058 Header: res.Header, 14059 HTTPStatusCode: res.StatusCode, 14060 }, 14061 } 14062 target := &ret 14063 if err := gensupport.DecodeResponse(target, res); err != nil { 14064 return nil, err 14065 } 14066 return ret, nil 14067 } 14068 14069 type ProjectsEventThreatDetectionSettingsCalculateCall struct { 14070 s *Service 14071 name string 14072 urlParams_ gensupport.URLParams 14073 ifNoneMatch_ string 14074 ctx_ context.Context 14075 header_ http.Header 14076 } 14077 14078 // Calculate: Calculates the effective EventThreatDetectionSettings based on 14079 // its level in the resource hierarchy and its settings. Settings provided 14080 // closer to the target resource take precedence over those further away (e.g. 14081 // folder will override organization level settings). The default SCC setting 14082 // for the detector service defaults can be overridden at organization, folder 14083 // and project levels. No assumptions should be made about the SCC defaults as 14084 // it is considered an internal implementation detail. 14085 // 14086 // - name: The name of the EventThreatDetectionSettings to calculate. Formats: 14087 // - organizations/{organization}/eventThreatDetectionSettings * 14088 // folders/{folder}/eventThreatDetectionSettings * 14089 // projects/{project}/eventThreatDetectionSettings. 14090 func (r *ProjectsEventThreatDetectionSettingsService) Calculate(name string) *ProjectsEventThreatDetectionSettingsCalculateCall { 14091 c := &ProjectsEventThreatDetectionSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14092 c.name = name 14093 return c 14094 } 14095 14096 // Fields allows partial responses to be retrieved. See 14097 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14098 // details. 14099 func (c *ProjectsEventThreatDetectionSettingsCalculateCall) Fields(s ...googleapi.Field) *ProjectsEventThreatDetectionSettingsCalculateCall { 14100 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14101 return c 14102 } 14103 14104 // IfNoneMatch sets an optional parameter which makes the operation fail if the 14105 // object's ETag matches the given value. This is useful for getting updates 14106 // only after the object has changed since the last request. 14107 func (c *ProjectsEventThreatDetectionSettingsCalculateCall) IfNoneMatch(entityTag string) *ProjectsEventThreatDetectionSettingsCalculateCall { 14108 c.ifNoneMatch_ = entityTag 14109 return c 14110 } 14111 14112 // Context sets the context to be used in this call's Do method. 14113 func (c *ProjectsEventThreatDetectionSettingsCalculateCall) Context(ctx context.Context) *ProjectsEventThreatDetectionSettingsCalculateCall { 14114 c.ctx_ = ctx 14115 return c 14116 } 14117 14118 // Header returns a http.Header that can be modified by the caller to add 14119 // headers to the request. 14120 func (c *ProjectsEventThreatDetectionSettingsCalculateCall) Header() http.Header { 14121 if c.header_ == nil { 14122 c.header_ = make(http.Header) 14123 } 14124 return c.header_ 14125 } 14126 14127 func (c *ProjectsEventThreatDetectionSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 14128 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 14129 if c.ifNoneMatch_ != "" { 14130 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14131 } 14132 var body io.Reader = nil 14133 c.urlParams_.Set("alt", alt) 14134 c.urlParams_.Set("prettyPrint", "false") 14135 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 14136 urls += "?" + c.urlParams_.Encode() 14137 req, err := http.NewRequest("GET", urls, body) 14138 if err != nil { 14139 return nil, err 14140 } 14141 req.Header = reqHeaders 14142 googleapi.Expand(req.URL, map[string]string{ 14143 "name": c.name, 14144 }) 14145 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14146 } 14147 14148 // Do executes the "securitycenter.projects.eventThreatDetectionSettings.calculate" call. 14149 // Any non-2xx status code is an error. Response headers are in either 14150 // *EventThreatDetectionSettings.ServerResponse.Header or (if a response was 14151 // returned at all) in error.(*googleapi.Error).Header. Use 14152 // googleapi.IsNotModified to check whether the returned error was because 14153 // http.StatusNotModified was returned. 14154 func (c *ProjectsEventThreatDetectionSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*EventThreatDetectionSettings, error) { 14155 gensupport.SetOptions(c.urlParams_, opts...) 14156 res, err := c.doRequest("json") 14157 if res != nil && res.StatusCode == http.StatusNotModified { 14158 if res.Body != nil { 14159 res.Body.Close() 14160 } 14161 return nil, gensupport.WrapError(&googleapi.Error{ 14162 Code: res.StatusCode, 14163 Header: res.Header, 14164 }) 14165 } 14166 if err != nil { 14167 return nil, err 14168 } 14169 defer googleapi.CloseBody(res) 14170 if err := googleapi.CheckResponse(res); err != nil { 14171 return nil, gensupport.WrapError(err) 14172 } 14173 ret := &EventThreatDetectionSettings{ 14174 ServerResponse: googleapi.ServerResponse{ 14175 Header: res.Header, 14176 HTTPStatusCode: res.StatusCode, 14177 }, 14178 } 14179 target := &ret 14180 if err := gensupport.DecodeResponse(target, res); err != nil { 14181 return nil, err 14182 } 14183 return ret, nil 14184 } 14185 14186 type ProjectsLocationsClustersGetContainerThreatDetectionSettingsCall struct { 14187 s *Service 14188 name string 14189 urlParams_ gensupport.URLParams 14190 ifNoneMatch_ string 14191 ctx_ context.Context 14192 header_ http.Header 14193 } 14194 14195 // GetContainerThreatDetectionSettings: Get the 14196 // ContainerThreatDetectionSettings resource. In the returned settings 14197 // response, a missing field only indicates that it was not explicitly set, so 14198 // no assumption should be made about these fields. In other words, 14199 // GetContainerThreatDetectionSettings does not calculate the effective service 14200 // settings for the resource, which accounts for inherited settings and 14201 // defaults. Instead, use CalculateContainerThreatDetectionSettings for this 14202 // purpose. 14203 // 14204 // - name: The name of the ContainerThreatDetectionSettings to retrieve. 14205 // Formats: * organizations/{organization}/containerThreatDetectionSettings * 14206 // folders/{folder}/containerThreatDetectionSettings * 14207 // projects/{project}/containerThreatDetectionSettings * 14208 // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatD 14209 // etectionSettings. 14210 func (r *ProjectsLocationsClustersService) GetContainerThreatDetectionSettings(name string) *ProjectsLocationsClustersGetContainerThreatDetectionSettingsCall { 14211 c := &ProjectsLocationsClustersGetContainerThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14212 c.name = name 14213 return c 14214 } 14215 14216 // Fields allows partial responses to be retrieved. See 14217 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14218 // details. 14219 func (c *ProjectsLocationsClustersGetContainerThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetContainerThreatDetectionSettingsCall { 14220 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14221 return c 14222 } 14223 14224 // IfNoneMatch sets an optional parameter which makes the operation fail if the 14225 // object's ETag matches the given value. This is useful for getting updates 14226 // only after the object has changed since the last request. 14227 func (c *ProjectsLocationsClustersGetContainerThreatDetectionSettingsCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetContainerThreatDetectionSettingsCall { 14228 c.ifNoneMatch_ = entityTag 14229 return c 14230 } 14231 14232 // Context sets the context to be used in this call's Do method. 14233 func (c *ProjectsLocationsClustersGetContainerThreatDetectionSettingsCall) Context(ctx context.Context) *ProjectsLocationsClustersGetContainerThreatDetectionSettingsCall { 14234 c.ctx_ = ctx 14235 return c 14236 } 14237 14238 // Header returns a http.Header that can be modified by the caller to add 14239 // headers to the request. 14240 func (c *ProjectsLocationsClustersGetContainerThreatDetectionSettingsCall) Header() http.Header { 14241 if c.header_ == nil { 14242 c.header_ = make(http.Header) 14243 } 14244 return c.header_ 14245 } 14246 14247 func (c *ProjectsLocationsClustersGetContainerThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 14248 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 14249 if c.ifNoneMatch_ != "" { 14250 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14251 } 14252 var body io.Reader = nil 14253 c.urlParams_.Set("alt", alt) 14254 c.urlParams_.Set("prettyPrint", "false") 14255 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 14256 urls += "?" + c.urlParams_.Encode() 14257 req, err := http.NewRequest("GET", urls, body) 14258 if err != nil { 14259 return nil, err 14260 } 14261 req.Header = reqHeaders 14262 googleapi.Expand(req.URL, map[string]string{ 14263 "name": c.name, 14264 }) 14265 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14266 } 14267 14268 // Do executes the "securitycenter.projects.locations.clusters.getContainerThreatDetectionSettings" call. 14269 // Any non-2xx status code is an error. Response headers are in either 14270 // *ContainerThreatDetectionSettings.ServerResponse.Header or (if a response 14271 // was returned at all) in error.(*googleapi.Error).Header. Use 14272 // googleapi.IsNotModified to check whether the returned error was because 14273 // http.StatusNotModified was returned. 14274 func (c *ProjectsLocationsClustersGetContainerThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*ContainerThreatDetectionSettings, error) { 14275 gensupport.SetOptions(c.urlParams_, opts...) 14276 res, err := c.doRequest("json") 14277 if res != nil && res.StatusCode == http.StatusNotModified { 14278 if res.Body != nil { 14279 res.Body.Close() 14280 } 14281 return nil, gensupport.WrapError(&googleapi.Error{ 14282 Code: res.StatusCode, 14283 Header: res.Header, 14284 }) 14285 } 14286 if err != nil { 14287 return nil, err 14288 } 14289 defer googleapi.CloseBody(res) 14290 if err := googleapi.CheckResponse(res); err != nil { 14291 return nil, gensupport.WrapError(err) 14292 } 14293 ret := &ContainerThreatDetectionSettings{ 14294 ServerResponse: googleapi.ServerResponse{ 14295 Header: res.Header, 14296 HTTPStatusCode: res.StatusCode, 14297 }, 14298 } 14299 target := &ret 14300 if err := gensupport.DecodeResponse(target, res); err != nil { 14301 return nil, err 14302 } 14303 return ret, nil 14304 } 14305 14306 type ProjectsLocationsClustersUpdateContainerThreatDetectionSettingsCall struct { 14307 s *Service 14308 name string 14309 containerthreatdetectionsettings *ContainerThreatDetectionSettings 14310 urlParams_ gensupport.URLParams 14311 ctx_ context.Context 14312 header_ http.Header 14313 } 14314 14315 // UpdateContainerThreatDetectionSettings: Update the 14316 // ContainerThreatDetectionSettings resource. 14317 // 14318 // - name: The resource name of the ContainerThreatDetectionSettings. Formats: 14319 // - organizations/{organization}/containerThreatDetectionSettings * 14320 // folders/{folder}/containerThreatDetectionSettings * 14321 // projects/{project}/containerThreatDetectionSettings * 14322 // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatD 14323 // etectionSettings. 14324 func (r *ProjectsLocationsClustersService) UpdateContainerThreatDetectionSettings(name string, containerthreatdetectionsettings *ContainerThreatDetectionSettings) *ProjectsLocationsClustersUpdateContainerThreatDetectionSettingsCall { 14325 c := &ProjectsLocationsClustersUpdateContainerThreatDetectionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14326 c.name = name 14327 c.containerthreatdetectionsettings = containerthreatdetectionsettings 14328 return c 14329 } 14330 14331 // UpdateMask sets the optional parameter "updateMask": The list of fields to 14332 // be updated. 14333 func (c *ProjectsLocationsClustersUpdateContainerThreatDetectionSettingsCall) UpdateMask(updateMask string) *ProjectsLocationsClustersUpdateContainerThreatDetectionSettingsCall { 14334 c.urlParams_.Set("updateMask", updateMask) 14335 return c 14336 } 14337 14338 // Fields allows partial responses to be retrieved. See 14339 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14340 // details. 14341 func (c *ProjectsLocationsClustersUpdateContainerThreatDetectionSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUpdateContainerThreatDetectionSettingsCall { 14342 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14343 return c 14344 } 14345 14346 // Context sets the context to be used in this call's Do method. 14347 func (c *ProjectsLocationsClustersUpdateContainerThreatDetectionSettingsCall) Context(ctx context.Context) *ProjectsLocationsClustersUpdateContainerThreatDetectionSettingsCall { 14348 c.ctx_ = ctx 14349 return c 14350 } 14351 14352 // Header returns a http.Header that can be modified by the caller to add 14353 // headers to the request. 14354 func (c *ProjectsLocationsClustersUpdateContainerThreatDetectionSettingsCall) Header() http.Header { 14355 if c.header_ == nil { 14356 c.header_ = make(http.Header) 14357 } 14358 return c.header_ 14359 } 14360 14361 func (c *ProjectsLocationsClustersUpdateContainerThreatDetectionSettingsCall) doRequest(alt string) (*http.Response, error) { 14362 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 14363 var body io.Reader = nil 14364 body, err := googleapi.WithoutDataWrapper.JSONReader(c.containerthreatdetectionsettings) 14365 if err != nil { 14366 return nil, err 14367 } 14368 c.urlParams_.Set("alt", alt) 14369 c.urlParams_.Set("prettyPrint", "false") 14370 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}") 14371 urls += "?" + c.urlParams_.Encode() 14372 req, err := http.NewRequest("PATCH", urls, body) 14373 if err != nil { 14374 return nil, err 14375 } 14376 req.Header = reqHeaders 14377 googleapi.Expand(req.URL, map[string]string{ 14378 "name": c.name, 14379 }) 14380 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14381 } 14382 14383 // Do executes the "securitycenter.projects.locations.clusters.updateContainerThreatDetectionSettings" call. 14384 // Any non-2xx status code is an error. Response headers are in either 14385 // *ContainerThreatDetectionSettings.ServerResponse.Header or (if a response 14386 // was returned at all) in error.(*googleapi.Error).Header. Use 14387 // googleapi.IsNotModified to check whether the returned error was because 14388 // http.StatusNotModified was returned. 14389 func (c *ProjectsLocationsClustersUpdateContainerThreatDetectionSettingsCall) Do(opts ...googleapi.CallOption) (*ContainerThreatDetectionSettings, error) { 14390 gensupport.SetOptions(c.urlParams_, opts...) 14391 res, err := c.doRequest("json") 14392 if res != nil && res.StatusCode == http.StatusNotModified { 14393 if res.Body != nil { 14394 res.Body.Close() 14395 } 14396 return nil, gensupport.WrapError(&googleapi.Error{ 14397 Code: res.StatusCode, 14398 Header: res.Header, 14399 }) 14400 } 14401 if err != nil { 14402 return nil, err 14403 } 14404 defer googleapi.CloseBody(res) 14405 if err := googleapi.CheckResponse(res); err != nil { 14406 return nil, gensupport.WrapError(err) 14407 } 14408 ret := &ContainerThreatDetectionSettings{ 14409 ServerResponse: googleapi.ServerResponse{ 14410 Header: res.Header, 14411 HTTPStatusCode: res.StatusCode, 14412 }, 14413 } 14414 target := &ret 14415 if err := gensupport.DecodeResponse(target, res); err != nil { 14416 return nil, err 14417 } 14418 return ret, nil 14419 } 14420 14421 type ProjectsLocationsClustersContainerThreatDetectionSettingsCalculateCall struct { 14422 s *Service 14423 name string 14424 urlParams_ gensupport.URLParams 14425 ifNoneMatch_ string 14426 ctx_ context.Context 14427 header_ http.Header 14428 } 14429 14430 // Calculate: Calculates the effective ContainerThreatDetectionSettings based 14431 // on its level in the resource hierarchy and its settings. Settings provided 14432 // closer to the target resource take precedence over those further away (e.g. 14433 // folder will override organization level settings). The default SCC setting 14434 // for the detector service defaults can be overridden at organization, folder 14435 // and project levels. No assumptions should be made about the SCC defaults as 14436 // it is considered an internal implementation detail. 14437 // 14438 // - name: The name of the ContainerThreatDetectionSettings to calculate. 14439 // Formats: * organizations/{organization}/containerThreatDetectionSettings * 14440 // folders/{folder}/containerThreatDetectionSettings * 14441 // projects/{project}/containerThreatDetectionSettings * 14442 // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatD 14443 // etectionSettings. 14444 func (r *ProjectsLocationsClustersContainerThreatDetectionSettingsService) Calculate(name string) *ProjectsLocationsClustersContainerThreatDetectionSettingsCalculateCall { 14445 c := &ProjectsLocationsClustersContainerThreatDetectionSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14446 c.name = name 14447 return c 14448 } 14449 14450 // Fields allows partial responses to be retrieved. See 14451 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14452 // details. 14453 func (c *ProjectsLocationsClustersContainerThreatDetectionSettingsCalculateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersContainerThreatDetectionSettingsCalculateCall { 14454 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14455 return c 14456 } 14457 14458 // IfNoneMatch sets an optional parameter which makes the operation fail if the 14459 // object's ETag matches the given value. This is useful for getting updates 14460 // only after the object has changed since the last request. 14461 func (c *ProjectsLocationsClustersContainerThreatDetectionSettingsCalculateCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersContainerThreatDetectionSettingsCalculateCall { 14462 c.ifNoneMatch_ = entityTag 14463 return c 14464 } 14465 14466 // Context sets the context to be used in this call's Do method. 14467 func (c *ProjectsLocationsClustersContainerThreatDetectionSettingsCalculateCall) Context(ctx context.Context) *ProjectsLocationsClustersContainerThreatDetectionSettingsCalculateCall { 14468 c.ctx_ = ctx 14469 return c 14470 } 14471 14472 // Header returns a http.Header that can be modified by the caller to add 14473 // headers to the request. 14474 func (c *ProjectsLocationsClustersContainerThreatDetectionSettingsCalculateCall) Header() http.Header { 14475 if c.header_ == nil { 14476 c.header_ = make(http.Header) 14477 } 14478 return c.header_ 14479 } 14480 14481 func (c *ProjectsLocationsClustersContainerThreatDetectionSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 14482 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 14483 if c.ifNoneMatch_ != "" { 14484 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14485 } 14486 var body io.Reader = nil 14487 c.urlParams_.Set("alt", alt) 14488 c.urlParams_.Set("prettyPrint", "false") 14489 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 14490 urls += "?" + c.urlParams_.Encode() 14491 req, err := http.NewRequest("GET", urls, body) 14492 if err != nil { 14493 return nil, err 14494 } 14495 req.Header = reqHeaders 14496 googleapi.Expand(req.URL, map[string]string{ 14497 "name": c.name, 14498 }) 14499 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14500 } 14501 14502 // Do executes the "securitycenter.projects.locations.clusters.containerThreatDetectionSettings.calculate" call. 14503 // Any non-2xx status code is an error. Response headers are in either 14504 // *ContainerThreatDetectionSettings.ServerResponse.Header or (if a response 14505 // was returned at all) in error.(*googleapi.Error).Header. Use 14506 // googleapi.IsNotModified to check whether the returned error was because 14507 // http.StatusNotModified was returned. 14508 func (c *ProjectsLocationsClustersContainerThreatDetectionSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*ContainerThreatDetectionSettings, error) { 14509 gensupport.SetOptions(c.urlParams_, opts...) 14510 res, err := c.doRequest("json") 14511 if res != nil && res.StatusCode == http.StatusNotModified { 14512 if res.Body != nil { 14513 res.Body.Close() 14514 } 14515 return nil, gensupport.WrapError(&googleapi.Error{ 14516 Code: res.StatusCode, 14517 Header: res.Header, 14518 }) 14519 } 14520 if err != nil { 14521 return nil, err 14522 } 14523 defer googleapi.CloseBody(res) 14524 if err := googleapi.CheckResponse(res); err != nil { 14525 return nil, gensupport.WrapError(err) 14526 } 14527 ret := &ContainerThreatDetectionSettings{ 14528 ServerResponse: googleapi.ServerResponse{ 14529 Header: res.Header, 14530 HTTPStatusCode: res.StatusCode, 14531 }, 14532 } 14533 target := &ret 14534 if err := gensupport.DecodeResponse(target, res); err != nil { 14535 return nil, err 14536 } 14537 return ret, nil 14538 } 14539 14540 type ProjectsRapidVulnerabilityDetectionSettingsCalculateCall struct { 14541 s *Service 14542 name string 14543 urlParams_ gensupport.URLParams 14544 ifNoneMatch_ string 14545 ctx_ context.Context 14546 header_ http.Header 14547 } 14548 14549 // Calculate: Calculates the effective RapidVulnerabilityDetectionSettings 14550 // based on its level in the resource hierarchy and its settings. Settings 14551 // provided closer to the target resource take precedence over those further 14552 // away (e.g. folder will override organization level settings). The default 14553 // SCC setting for the detector service defaults can be overridden at 14554 // organization, folder and project levels. No assumptions should be made about 14555 // the SCC defaults as it is considered an internal implementation detail. 14556 // 14557 // - name: The name of the RapidVulnerabilityDetectionSettings to calculate. 14558 // Formats: * 14559 // organizations/{organization}/rapidVulnerabilityDetectionSettings * 14560 // folders/{folder}/rapidVulnerabilityDetectionSettings * 14561 // projects/{project}/rapidVulnerabilityDetectionSettings. 14562 func (r *ProjectsRapidVulnerabilityDetectionSettingsService) Calculate(name string) *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall { 14563 c := &ProjectsRapidVulnerabilityDetectionSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14564 c.name = name 14565 return c 14566 } 14567 14568 // Fields allows partial responses to be retrieved. See 14569 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14570 // details. 14571 func (c *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall) Fields(s ...googleapi.Field) *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall { 14572 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14573 return c 14574 } 14575 14576 // IfNoneMatch sets an optional parameter which makes the operation fail if the 14577 // object's ETag matches the given value. This is useful for getting updates 14578 // only after the object has changed since the last request. 14579 func (c *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall) IfNoneMatch(entityTag string) *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall { 14580 c.ifNoneMatch_ = entityTag 14581 return c 14582 } 14583 14584 // Context sets the context to be used in this call's Do method. 14585 func (c *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall) Context(ctx context.Context) *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall { 14586 c.ctx_ = ctx 14587 return c 14588 } 14589 14590 // Header returns a http.Header that can be modified by the caller to add 14591 // headers to the request. 14592 func (c *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall) Header() http.Header { 14593 if c.header_ == nil { 14594 c.header_ = make(http.Header) 14595 } 14596 return c.header_ 14597 } 14598 14599 func (c *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 14600 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 14601 if c.ifNoneMatch_ != "" { 14602 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14603 } 14604 var body io.Reader = nil 14605 c.urlParams_.Set("alt", alt) 14606 c.urlParams_.Set("prettyPrint", "false") 14607 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 14608 urls += "?" + c.urlParams_.Encode() 14609 req, err := http.NewRequest("GET", urls, body) 14610 if err != nil { 14611 return nil, err 14612 } 14613 req.Header = reqHeaders 14614 googleapi.Expand(req.URL, map[string]string{ 14615 "name": c.name, 14616 }) 14617 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14618 } 14619 14620 // Do executes the "securitycenter.projects.rapidVulnerabilityDetectionSettings.calculate" call. 14621 // Any non-2xx status code is an error. Response headers are in either 14622 // *RapidVulnerabilityDetectionSettings.ServerResponse.Header or (if a response 14623 // was returned at all) in error.(*googleapi.Error).Header. Use 14624 // googleapi.IsNotModified to check whether the returned error was because 14625 // http.StatusNotModified was returned. 14626 func (c *ProjectsRapidVulnerabilityDetectionSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*RapidVulnerabilityDetectionSettings, error) { 14627 gensupport.SetOptions(c.urlParams_, opts...) 14628 res, err := c.doRequest("json") 14629 if res != nil && res.StatusCode == http.StatusNotModified { 14630 if res.Body != nil { 14631 res.Body.Close() 14632 } 14633 return nil, gensupport.WrapError(&googleapi.Error{ 14634 Code: res.StatusCode, 14635 Header: res.Header, 14636 }) 14637 } 14638 if err != nil { 14639 return nil, err 14640 } 14641 defer googleapi.CloseBody(res) 14642 if err := googleapi.CheckResponse(res); err != nil { 14643 return nil, gensupport.WrapError(err) 14644 } 14645 ret := &RapidVulnerabilityDetectionSettings{ 14646 ServerResponse: googleapi.ServerResponse{ 14647 Header: res.Header, 14648 HTTPStatusCode: res.StatusCode, 14649 }, 14650 } 14651 target := &ret 14652 if err := gensupport.DecodeResponse(target, res); err != nil { 14653 return nil, err 14654 } 14655 return ret, nil 14656 } 14657 14658 type ProjectsSecurityHealthAnalyticsSettingsCalculateCall struct { 14659 s *Service 14660 name string 14661 urlParams_ gensupport.URLParams 14662 ifNoneMatch_ string 14663 ctx_ context.Context 14664 header_ http.Header 14665 } 14666 14667 // Calculate: Calculates the effective SecurityHealthAnalyticsSettings based on 14668 // its level in the resource hierarchy and its settings. Settings provided 14669 // closer to the target resource take precedence over those further away (e.g. 14670 // folder will override organization level settings). The default SCC setting 14671 // for the detector service defaults can be overridden at organization, folder 14672 // and project levels. No assumptions should be made about the SCC defaults as 14673 // it is considered an internal implementation detail. 14674 // 14675 // - name: The name of the SecurityHealthAnalyticsSettings to calculate. 14676 // Formats: * organizations/{organization}/securityHealthAnalyticsSettings * 14677 // folders/{folder}/securityHealthAnalyticsSettings * 14678 // projects/{project}/securityHealthAnalyticsSettings. 14679 func (r *ProjectsSecurityHealthAnalyticsSettingsService) Calculate(name string) *ProjectsSecurityHealthAnalyticsSettingsCalculateCall { 14680 c := &ProjectsSecurityHealthAnalyticsSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14681 c.name = name 14682 return c 14683 } 14684 14685 // Fields allows partial responses to be retrieved. See 14686 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14687 // details. 14688 func (c *ProjectsSecurityHealthAnalyticsSettingsCalculateCall) Fields(s ...googleapi.Field) *ProjectsSecurityHealthAnalyticsSettingsCalculateCall { 14689 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14690 return c 14691 } 14692 14693 // IfNoneMatch sets an optional parameter which makes the operation fail if the 14694 // object's ETag matches the given value. This is useful for getting updates 14695 // only after the object has changed since the last request. 14696 func (c *ProjectsSecurityHealthAnalyticsSettingsCalculateCall) IfNoneMatch(entityTag string) *ProjectsSecurityHealthAnalyticsSettingsCalculateCall { 14697 c.ifNoneMatch_ = entityTag 14698 return c 14699 } 14700 14701 // Context sets the context to be used in this call's Do method. 14702 func (c *ProjectsSecurityHealthAnalyticsSettingsCalculateCall) Context(ctx context.Context) *ProjectsSecurityHealthAnalyticsSettingsCalculateCall { 14703 c.ctx_ = ctx 14704 return c 14705 } 14706 14707 // Header returns a http.Header that can be modified by the caller to add 14708 // headers to the request. 14709 func (c *ProjectsSecurityHealthAnalyticsSettingsCalculateCall) Header() http.Header { 14710 if c.header_ == nil { 14711 c.header_ = make(http.Header) 14712 } 14713 return c.header_ 14714 } 14715 14716 func (c *ProjectsSecurityHealthAnalyticsSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 14717 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 14718 if c.ifNoneMatch_ != "" { 14719 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14720 } 14721 var body io.Reader = nil 14722 c.urlParams_.Set("alt", alt) 14723 c.urlParams_.Set("prettyPrint", "false") 14724 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 14725 urls += "?" + c.urlParams_.Encode() 14726 req, err := http.NewRequest("GET", urls, body) 14727 if err != nil { 14728 return nil, err 14729 } 14730 req.Header = reqHeaders 14731 googleapi.Expand(req.URL, map[string]string{ 14732 "name": c.name, 14733 }) 14734 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14735 } 14736 14737 // Do executes the "securitycenter.projects.securityHealthAnalyticsSettings.calculate" call. 14738 // Any non-2xx status code is an error. Response headers are in either 14739 // *SecurityHealthAnalyticsSettings.ServerResponse.Header or (if a response was 14740 // returned at all) in error.(*googleapi.Error).Header. Use 14741 // googleapi.IsNotModified to check whether the returned error was because 14742 // http.StatusNotModified was returned. 14743 func (c *ProjectsSecurityHealthAnalyticsSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*SecurityHealthAnalyticsSettings, error) { 14744 gensupport.SetOptions(c.urlParams_, opts...) 14745 res, err := c.doRequest("json") 14746 if res != nil && res.StatusCode == http.StatusNotModified { 14747 if res.Body != nil { 14748 res.Body.Close() 14749 } 14750 return nil, gensupport.WrapError(&googleapi.Error{ 14751 Code: res.StatusCode, 14752 Header: res.Header, 14753 }) 14754 } 14755 if err != nil { 14756 return nil, err 14757 } 14758 defer googleapi.CloseBody(res) 14759 if err := googleapi.CheckResponse(res); err != nil { 14760 return nil, gensupport.WrapError(err) 14761 } 14762 ret := &SecurityHealthAnalyticsSettings{ 14763 ServerResponse: googleapi.ServerResponse{ 14764 Header: res.Header, 14765 HTTPStatusCode: res.StatusCode, 14766 }, 14767 } 14768 target := &ret 14769 if err := gensupport.DecodeResponse(target, res); err != nil { 14770 return nil, err 14771 } 14772 return ret, nil 14773 } 14774 14775 type ProjectsVirtualMachineThreatDetectionSettingsCalculateCall struct { 14776 s *Service 14777 name string 14778 urlParams_ gensupport.URLParams 14779 ifNoneMatch_ string 14780 ctx_ context.Context 14781 header_ http.Header 14782 } 14783 14784 // Calculate: Calculates the effective VirtualMachineThreatDetectionSettings 14785 // based on its level in the resource hierarchy and its settings. Settings 14786 // provided closer to the target resource take precedence over those further 14787 // away (e.g. folder will override organization level settings). The default 14788 // SCC setting for the detector service defaults can be overridden at 14789 // organization, folder and project levels. No assumptions should be made about 14790 // the SCC defaults as it is considered an internal implementation detail. 14791 // 14792 // - name: The name of the VirtualMachineThreatDetectionSettings to calculate. 14793 // Formats: * 14794 // organizations/{organization}/virtualMachineThreatDetectionSettings * 14795 // folders/{folder}/virtualMachineThreatDetectionSettings * 14796 // projects/{project}/virtualMachineThreatDetectionSettings. 14797 func (r *ProjectsVirtualMachineThreatDetectionSettingsService) Calculate(name string) *ProjectsVirtualMachineThreatDetectionSettingsCalculateCall { 14798 c := &ProjectsVirtualMachineThreatDetectionSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14799 c.name = name 14800 return c 14801 } 14802 14803 // Fields allows partial responses to be retrieved. See 14804 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14805 // details. 14806 func (c *ProjectsVirtualMachineThreatDetectionSettingsCalculateCall) Fields(s ...googleapi.Field) *ProjectsVirtualMachineThreatDetectionSettingsCalculateCall { 14807 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14808 return c 14809 } 14810 14811 // IfNoneMatch sets an optional parameter which makes the operation fail if the 14812 // object's ETag matches the given value. This is useful for getting updates 14813 // only after the object has changed since the last request. 14814 func (c *ProjectsVirtualMachineThreatDetectionSettingsCalculateCall) IfNoneMatch(entityTag string) *ProjectsVirtualMachineThreatDetectionSettingsCalculateCall { 14815 c.ifNoneMatch_ = entityTag 14816 return c 14817 } 14818 14819 // Context sets the context to be used in this call's Do method. 14820 func (c *ProjectsVirtualMachineThreatDetectionSettingsCalculateCall) Context(ctx context.Context) *ProjectsVirtualMachineThreatDetectionSettingsCalculateCall { 14821 c.ctx_ = ctx 14822 return c 14823 } 14824 14825 // Header returns a http.Header that can be modified by the caller to add 14826 // headers to the request. 14827 func (c *ProjectsVirtualMachineThreatDetectionSettingsCalculateCall) Header() http.Header { 14828 if c.header_ == nil { 14829 c.header_ = make(http.Header) 14830 } 14831 return c.header_ 14832 } 14833 14834 func (c *ProjectsVirtualMachineThreatDetectionSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 14835 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 14836 if c.ifNoneMatch_ != "" { 14837 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14838 } 14839 var body io.Reader = nil 14840 c.urlParams_.Set("alt", alt) 14841 c.urlParams_.Set("prettyPrint", "false") 14842 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 14843 urls += "?" + c.urlParams_.Encode() 14844 req, err := http.NewRequest("GET", urls, body) 14845 if err != nil { 14846 return nil, err 14847 } 14848 req.Header = reqHeaders 14849 googleapi.Expand(req.URL, map[string]string{ 14850 "name": c.name, 14851 }) 14852 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14853 } 14854 14855 // Do executes the "securitycenter.projects.virtualMachineThreatDetectionSettings.calculate" call. 14856 // Any non-2xx status code is an error. Response headers are in either 14857 // *VirtualMachineThreatDetectionSettings.ServerResponse.Header or (if a 14858 // response was returned at all) in error.(*googleapi.Error).Header. Use 14859 // googleapi.IsNotModified to check whether the returned error was because 14860 // http.StatusNotModified was returned. 14861 func (c *ProjectsVirtualMachineThreatDetectionSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*VirtualMachineThreatDetectionSettings, error) { 14862 gensupport.SetOptions(c.urlParams_, opts...) 14863 res, err := c.doRequest("json") 14864 if res != nil && res.StatusCode == http.StatusNotModified { 14865 if res.Body != nil { 14866 res.Body.Close() 14867 } 14868 return nil, gensupport.WrapError(&googleapi.Error{ 14869 Code: res.StatusCode, 14870 Header: res.Header, 14871 }) 14872 } 14873 if err != nil { 14874 return nil, err 14875 } 14876 defer googleapi.CloseBody(res) 14877 if err := googleapi.CheckResponse(res); err != nil { 14878 return nil, gensupport.WrapError(err) 14879 } 14880 ret := &VirtualMachineThreatDetectionSettings{ 14881 ServerResponse: googleapi.ServerResponse{ 14882 Header: res.Header, 14883 HTTPStatusCode: res.StatusCode, 14884 }, 14885 } 14886 target := &ret 14887 if err := gensupport.DecodeResponse(target, res); err != nil { 14888 return nil, err 14889 } 14890 return ret, nil 14891 } 14892 14893 type ProjectsWebSecurityScannerSettingsCalculateCall struct { 14894 s *Service 14895 name string 14896 urlParams_ gensupport.URLParams 14897 ifNoneMatch_ string 14898 ctx_ context.Context 14899 header_ http.Header 14900 } 14901 14902 // Calculate: Calculates the effective WebSecurityScannerSettings based on its 14903 // level in the resource hierarchy and its settings. Settings provided closer 14904 // to the target resource take precedence over those further away (e.g. folder 14905 // will override organization level settings). The default SCC setting for the 14906 // detector service defaults can be overridden at organization, folder and 14907 // project levels. No assumptions should be made about the SCC defaults as it 14908 // is considered an internal implementation detail. 14909 // 14910 // - name: The name of the WebSecurityScannerSettings to calculate. Formats: * 14911 // organizations/{organization}/webSecurityScannerSettings * 14912 // folders/{folder}/webSecurityScannerSettings * 14913 // projects/{project}/webSecurityScannerSettings. 14914 func (r *ProjectsWebSecurityScannerSettingsService) Calculate(name string) *ProjectsWebSecurityScannerSettingsCalculateCall { 14915 c := &ProjectsWebSecurityScannerSettingsCalculateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14916 c.name = name 14917 return c 14918 } 14919 14920 // Fields allows partial responses to be retrieved. See 14921 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 14922 // details. 14923 func (c *ProjectsWebSecurityScannerSettingsCalculateCall) Fields(s ...googleapi.Field) *ProjectsWebSecurityScannerSettingsCalculateCall { 14924 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14925 return c 14926 } 14927 14928 // IfNoneMatch sets an optional parameter which makes the operation fail if the 14929 // object's ETag matches the given value. This is useful for getting updates 14930 // only after the object has changed since the last request. 14931 func (c *ProjectsWebSecurityScannerSettingsCalculateCall) IfNoneMatch(entityTag string) *ProjectsWebSecurityScannerSettingsCalculateCall { 14932 c.ifNoneMatch_ = entityTag 14933 return c 14934 } 14935 14936 // Context sets the context to be used in this call's Do method. 14937 func (c *ProjectsWebSecurityScannerSettingsCalculateCall) Context(ctx context.Context) *ProjectsWebSecurityScannerSettingsCalculateCall { 14938 c.ctx_ = ctx 14939 return c 14940 } 14941 14942 // Header returns a http.Header that can be modified by the caller to add 14943 // headers to the request. 14944 func (c *ProjectsWebSecurityScannerSettingsCalculateCall) Header() http.Header { 14945 if c.header_ == nil { 14946 c.header_ = make(http.Header) 14947 } 14948 return c.header_ 14949 } 14950 14951 func (c *ProjectsWebSecurityScannerSettingsCalculateCall) doRequest(alt string) (*http.Response, error) { 14952 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 14953 if c.ifNoneMatch_ != "" { 14954 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14955 } 14956 var body io.Reader = nil 14957 c.urlParams_.Set("alt", alt) 14958 c.urlParams_.Set("prettyPrint", "false") 14959 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:calculate") 14960 urls += "?" + c.urlParams_.Encode() 14961 req, err := http.NewRequest("GET", urls, body) 14962 if err != nil { 14963 return nil, err 14964 } 14965 req.Header = reqHeaders 14966 googleapi.Expand(req.URL, map[string]string{ 14967 "name": c.name, 14968 }) 14969 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14970 } 14971 14972 // Do executes the "securitycenter.projects.webSecurityScannerSettings.calculate" call. 14973 // Any non-2xx status code is an error. Response headers are in either 14974 // *WebSecurityScannerSettings.ServerResponse.Header or (if a response was 14975 // returned at all) in error.(*googleapi.Error).Header. Use 14976 // googleapi.IsNotModified to check whether the returned error was because 14977 // http.StatusNotModified was returned. 14978 func (c *ProjectsWebSecurityScannerSettingsCalculateCall) Do(opts ...googleapi.CallOption) (*WebSecurityScannerSettings, error) { 14979 gensupport.SetOptions(c.urlParams_, opts...) 14980 res, err := c.doRequest("json") 14981 if res != nil && res.StatusCode == http.StatusNotModified { 14982 if res.Body != nil { 14983 res.Body.Close() 14984 } 14985 return nil, gensupport.WrapError(&googleapi.Error{ 14986 Code: res.StatusCode, 14987 Header: res.Header, 14988 }) 14989 } 14990 if err != nil { 14991 return nil, err 14992 } 14993 defer googleapi.CloseBody(res) 14994 if err := googleapi.CheckResponse(res); err != nil { 14995 return nil, gensupport.WrapError(err) 14996 } 14997 ret := &WebSecurityScannerSettings{ 14998 ServerResponse: googleapi.ServerResponse{ 14999 Header: res.Header, 15000 HTTPStatusCode: res.StatusCode, 15001 }, 15002 } 15003 target := &ret 15004 if err := gensupport.DecodeResponse(target, res); err != nil { 15005 return nil, err 15006 } 15007 return ret, nil 15008 } 15009