1// Copyright 2019 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 cloudasset provides access to the Cloud Asset API. 8// 9// For product documentation, see: https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/quickstart-cloud-asset-inventory 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/cloudasset/v1" 16// ... 17// ctx := context.Background() 18// cloudassetService, err := cloudasset.NewService(ctx) 19// 20// In this example, Google Application Default Credentials are used for authentication. 21// 22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23// 24// Other authentication options 25// 26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 27// 28// cloudassetService, err := cloudasset.NewService(ctx, option.WithAPIKey("AIza...")) 29// 30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 31// 32// config := &oauth2.Config{...} 33// // ... 34// token, err := config.Exchange(ctx, ...) 35// cloudassetService, err := cloudasset.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36// 37// See https://godoc.org/google.golang.org/api/option/ for details on options. 38package cloudasset // import "google.golang.org/api/cloudasset/v1" 39 40import ( 41 "bytes" 42 "context" 43 "encoding/json" 44 "errors" 45 "fmt" 46 "io" 47 "net/http" 48 "net/url" 49 "strconv" 50 "strings" 51 52 googleapi "google.golang.org/api/googleapi" 53 gensupport "google.golang.org/api/internal/gensupport" 54 option "google.golang.org/api/option" 55 htransport "google.golang.org/api/transport/http" 56) 57 58// Always reference these packages, just in case the auto-generated code 59// below doesn't. 60var _ = bytes.NewBuffer 61var _ = strconv.Itoa 62var _ = fmt.Sprintf 63var _ = json.NewDecoder 64var _ = io.Copy 65var _ = url.Parse 66var _ = gensupport.MarshalJSON 67var _ = googleapi.Version 68var _ = errors.New 69var _ = strings.Replace 70var _ = context.Canceled 71 72const apiId = "cloudasset:v1" 73const apiName = "cloudasset" 74const apiVersion = "v1" 75const basePath = "https://cloudasset.googleapis.com/" 76 77// OAuth2 scopes used by this API. 78const ( 79 // View and manage your data across Google Cloud Platform services 80 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 81) 82 83// NewService creates a new Service. 84func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 85 scopesOption := option.WithScopes( 86 "https://www.googleapis.com/auth/cloud-platform", 87 ) 88 // NOTE: prepend, so we don't override user-specified scopes. 89 opts = append([]option.ClientOption{scopesOption}, opts...) 90 client, endpoint, err := htransport.NewClient(ctx, opts...) 91 if err != nil { 92 return nil, err 93 } 94 s, err := New(client) 95 if err != nil { 96 return nil, err 97 } 98 if endpoint != "" { 99 s.BasePath = endpoint 100 } 101 return s, nil 102} 103 104// New creates a new Service. It uses the provided http.Client for requests. 105// 106// Deprecated: please use NewService instead. 107// To provide a custom HTTP client, use option.WithHTTPClient. 108// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 109func New(client *http.Client) (*Service, error) { 110 if client == nil { 111 return nil, errors.New("client is nil") 112 } 113 s := &Service{client: client, BasePath: basePath} 114 s.Feeds = NewFeedsService(s) 115 s.Operations = NewOperationsService(s) 116 s.V1 = NewV1Service(s) 117 return s, nil 118} 119 120type Service struct { 121 client *http.Client 122 BasePath string // API endpoint base URL 123 UserAgent string // optional additional User-Agent fragment 124 125 Feeds *FeedsService 126 127 Operations *OperationsService 128 129 V1 *V1Service 130} 131 132func (s *Service) userAgent() string { 133 if s.UserAgent == "" { 134 return googleapi.UserAgent 135 } 136 return googleapi.UserAgent + " " + s.UserAgent 137} 138 139func NewFeedsService(s *Service) *FeedsService { 140 rs := &FeedsService{s: s} 141 return rs 142} 143 144type FeedsService struct { 145 s *Service 146} 147 148func NewOperationsService(s *Service) *OperationsService { 149 rs := &OperationsService{s: s} 150 return rs 151} 152 153type OperationsService struct { 154 s *Service 155} 156 157func NewV1Service(s *Service) *V1Service { 158 rs := &V1Service{s: s} 159 return rs 160} 161 162type V1Service struct { 163 s *Service 164} 165 166// Asset: Cloud asset. This includes all Google Cloud Platform 167// resources, 168// Cloud IAM policies, and other non-GCP assets. 169type Asset struct { 170 AccessLevel *GoogleIdentityAccesscontextmanagerV1AccessLevel `json:"accessLevel,omitempty"` 171 172 AccessPolicy *GoogleIdentityAccesscontextmanagerV1AccessPolicy `json:"accessPolicy,omitempty"` 173 174 // Ancestors: Asset's ancestry path in Cloud Resource Manager (CRM) 175 // hierarchy, 176 // represented as a list of relative resource names. Ancestry path 177 // starts with 178 // the closest CRM ancestor and ends at root. If the asset is a 179 // CRM 180 // project/folder/organization, this starts from the asset 181 // itself. 182 // 183 // Example: ["projects/123456789", "folders/5432", "organizations/1234"] 184 Ancestors []string `json:"ancestors,omitempty"` 185 186 // AssetType: Type of the asset. Example: "compute.googleapis.com/Disk". 187 AssetType string `json:"assetType,omitempty"` 188 189 // IamPolicy: Representation of the actual Cloud IAM policy set on a 190 // cloud resource. For 191 // each resource, there must be at most one Cloud IAM policy set on it. 192 IamPolicy *Policy `json:"iamPolicy,omitempty"` 193 194 // Name: The full name of the asset. For 195 // example: 196 // `//compute.googleapis.com/projects/my_project_123/zones/zone1 197 // /instances/instance1`. 198 // See 199 // [Resource 200 // Names](https://cloud.google.com/apis/design/resource_names#f 201 // ull_resource_name) 202 // for more information. 203 Name string `json:"name,omitempty"` 204 205 // OrgPolicy: Representation of the Cloud Organization Policy set on an 206 // asset. For each 207 // asset, there could be multiple Organization policies with 208 // different 209 // constraints. 210 OrgPolicy []*GoogleCloudOrgpolicyV1Policy `json:"orgPolicy,omitempty"` 211 212 // Resource: Representation of the resource. 213 Resource *Resource `json:"resource,omitempty"` 214 215 ServicePerimeter *GoogleIdentityAccesscontextmanagerV1ServicePerimeter `json:"servicePerimeter,omitempty"` 216 217 // ForceSendFields is a list of field names (e.g. "AccessLevel") to 218 // unconditionally include in API requests. By default, fields with 219 // empty values are omitted from API requests. However, any non-pointer, 220 // non-interface field appearing in ForceSendFields will be sent to the 221 // server regardless of whether the field is empty or not. This may be 222 // used to include empty fields in Patch requests. 223 ForceSendFields []string `json:"-"` 224 225 // NullFields is a list of field names (e.g. "AccessLevel") to include 226 // in API requests with the JSON null value. By default, fields with 227 // empty values are omitted from API requests. However, any field with 228 // an empty value appearing in NullFields will be sent to the server as 229 // null. It is an error if a field in this list has a non-empty value. 230 // This may be used to include null fields in Patch requests. 231 NullFields []string `json:"-"` 232} 233 234func (s *Asset) MarshalJSON() ([]byte, error) { 235 type NoMethod Asset 236 raw := NoMethod(*s) 237 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 238} 239 240// AuditConfig: Specifies the audit configuration for a service. 241// The configuration determines which permission types are logged, and 242// what 243// identities, if any, are exempted from logging. 244// An AuditConfig must have one or more AuditLogConfigs. 245// 246// If there are AuditConfigs for both `allServices` and a specific 247// service, 248// the union of the two AuditConfigs is used for that service: the 249// log_types 250// specified in each AuditConfig are enabled, and the exempted_members 251// in each 252// AuditLogConfig are exempted. 253// 254// Example Policy with multiple AuditConfigs: 255// 256// { 257// "audit_configs": [ 258// { 259// "service": "allServices" 260// "audit_log_configs": [ 261// { 262// "log_type": "DATA_READ", 263// "exempted_members": [ 264// "user:jose@example.com" 265// ] 266// }, 267// { 268// "log_type": "DATA_WRITE", 269// }, 270// { 271// "log_type": "ADMIN_READ", 272// } 273// ] 274// }, 275// { 276// "service": "sampleservice.googleapis.com" 277// "audit_log_configs": [ 278// { 279// "log_type": "DATA_READ", 280// }, 281// { 282// "log_type": "DATA_WRITE", 283// "exempted_members": [ 284// "user:aliya@example.com" 285// ] 286// } 287// ] 288// } 289// ] 290// } 291// 292// For sampleservice, this policy enables DATA_READ, DATA_WRITE and 293// ADMIN_READ 294// logging. It also exempts jose@example.com from DATA_READ logging, 295// and 296// aliya@example.com from DATA_WRITE logging. 297type AuditConfig struct { 298 // AuditLogConfigs: The configuration for logging of each type of 299 // permission. 300 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` 301 302 // Service: Specifies a service that will be enabled for audit 303 // logging. 304 // For example, `storage.googleapis.com`, 305 // `cloudsql.googleapis.com`. 306 // `allServices` is a special value that covers all services. 307 Service string `json:"service,omitempty"` 308 309 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to 310 // unconditionally include in API requests. By default, fields with 311 // empty values are omitted from API requests. However, any non-pointer, 312 // non-interface field appearing in ForceSendFields will be sent to the 313 // server regardless of whether the field is empty or not. This may be 314 // used to include empty fields in Patch requests. 315 ForceSendFields []string `json:"-"` 316 317 // NullFields is a list of field names (e.g. "AuditLogConfigs") to 318 // include in API requests with the JSON null value. By default, fields 319 // with empty values are omitted from API requests. However, any field 320 // with an empty value appearing in NullFields will be sent to the 321 // server as null. It is an error if a field in this list has a 322 // non-empty value. This may be used to include null fields in Patch 323 // requests. 324 NullFields []string `json:"-"` 325} 326 327func (s *AuditConfig) MarshalJSON() ([]byte, error) { 328 type NoMethod AuditConfig 329 raw := NoMethod(*s) 330 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 331} 332 333// AuditLogConfig: Provides the configuration for logging a type of 334// permissions. 335// Example: 336// 337// { 338// "audit_log_configs": [ 339// { 340// "log_type": "DATA_READ", 341// "exempted_members": [ 342// "user:jose@example.com" 343// ] 344// }, 345// { 346// "log_type": "DATA_WRITE", 347// } 348// ] 349// } 350// 351// This enables 'DATA_READ' and 'DATA_WRITE' logging, while 352// exempting 353// jose@example.com from DATA_READ logging. 354type AuditLogConfig struct { 355 // ExemptedMembers: Specifies the identities that do not cause logging 356 // for this type of 357 // permission. 358 // Follows the same format of Binding.members. 359 ExemptedMembers []string `json:"exemptedMembers,omitempty"` 360 361 // LogType: The log type that this config enables. 362 // 363 // Possible values: 364 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. 365 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy 366 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create 367 // "DATA_READ" - Data reads. Example: CloudSQL Users list 368 LogType string `json:"logType,omitempty"` 369 370 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to 371 // unconditionally include in API requests. By default, fields with 372 // empty values are omitted from API requests. However, any non-pointer, 373 // non-interface field appearing in ForceSendFields will be sent to the 374 // server regardless of whether the field is empty or not. This may be 375 // used to include empty fields in Patch requests. 376 ForceSendFields []string `json:"-"` 377 378 // NullFields is a list of field names (e.g. "ExemptedMembers") to 379 // include in API requests with the JSON null value. By default, fields 380 // with empty values are omitted from API requests. However, any field 381 // with an empty value appearing in NullFields will be sent to the 382 // server as null. It is an error if a field in this list has a 383 // non-empty value. This may be used to include null fields in Patch 384 // requests. 385 NullFields []string `json:"-"` 386} 387 388func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { 389 type NoMethod AuditLogConfig 390 raw := NoMethod(*s) 391 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 392} 393 394// BatchGetAssetsHistoryResponse: Batch get assets history response. 395type BatchGetAssetsHistoryResponse struct { 396 // Assets: A list of assets with valid time windows. 397 Assets []*TemporalAsset `json:"assets,omitempty"` 398 399 // ServerResponse contains the HTTP response code and headers from the 400 // server. 401 googleapi.ServerResponse `json:"-"` 402 403 // ForceSendFields is a list of field names (e.g. "Assets") to 404 // unconditionally include in API requests. By default, fields with 405 // empty values are omitted from API requests. However, any non-pointer, 406 // non-interface field appearing in ForceSendFields will be sent to the 407 // server regardless of whether the field is empty or not. This may be 408 // used to include empty fields in Patch requests. 409 ForceSendFields []string `json:"-"` 410 411 // NullFields is a list of field names (e.g. "Assets") to include in API 412 // requests with the JSON null value. By default, fields with empty 413 // values are omitted from API requests. However, any field with an 414 // empty value appearing in NullFields will be sent to the server as 415 // null. It is an error if a field in this list has a non-empty value. 416 // This may be used to include null fields in Patch requests. 417 NullFields []string `json:"-"` 418} 419 420func (s *BatchGetAssetsHistoryResponse) MarshalJSON() ([]byte, error) { 421 type NoMethod BatchGetAssetsHistoryResponse 422 raw := NoMethod(*s) 423 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 424} 425 426// BigQueryDestination: A BigQuery destination. 427type BigQueryDestination struct { 428 // Dataset: Required. The BigQuery dataset in 429 // format 430 // "projects/projectId/datasets/datasetId", to which the snapshot 431 // result 432 // should be exported. If this dataset does not exist, the export call 433 // returns 434 // an error. 435 Dataset string `json:"dataset,omitempty"` 436 437 // Force: If the destination table already exists and this flag is 438 // `TRUE`, the 439 // table will be overwritten by the contents of assets snapshot. If the 440 // flag 441 // is not set and the destination table already exists, the export 442 // call 443 // returns an error. 444 Force bool `json:"force,omitempty"` 445 446 // Table: Required. The BigQuery table to which the snapshot result 447 // should be 448 // written. If this table does not exist, a new table with the given 449 // name 450 // will be created. 451 Table string `json:"table,omitempty"` 452 453 // ForceSendFields is a list of field names (e.g. "Dataset") to 454 // unconditionally include in API requests. By default, fields with 455 // empty values are omitted from API requests. However, any non-pointer, 456 // non-interface field appearing in ForceSendFields will be sent to the 457 // server regardless of whether the field is empty or not. This may be 458 // used to include empty fields in Patch requests. 459 ForceSendFields []string `json:"-"` 460 461 // NullFields is a list of field names (e.g. "Dataset") to include in 462 // API requests with the JSON null value. By default, fields with empty 463 // values are omitted from API requests. However, any field with an 464 // empty value appearing in NullFields will be sent to the server as 465 // null. It is an error if a field in this list has a non-empty value. 466 // This may be used to include null fields in Patch requests. 467 NullFields []string `json:"-"` 468} 469 470func (s *BigQueryDestination) MarshalJSON() ([]byte, error) { 471 type NoMethod BigQueryDestination 472 raw := NoMethod(*s) 473 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 474} 475 476// Binding: Associates `members` with a `role`. 477type Binding struct { 478 // Condition: The condition that is associated with this binding. 479 // NOTE: An unsatisfied condition will not allow user access via 480 // current 481 // binding. Different bindings, including their conditions, are 482 // examined 483 // independently. 484 Condition *Expr `json:"condition,omitempty"` 485 486 // Members: Specifies the identities requesting access for a Cloud 487 // Platform resource. 488 // `members` can have the following values: 489 // 490 // * `allUsers`: A special identifier that represents anyone who is 491 // on the internet; with or without a Google account. 492 // 493 // * `allAuthenticatedUsers`: A special identifier that represents 494 // anyone 495 // who is authenticated with a Google account or a service 496 // account. 497 // 498 // * `user:{emailid}`: An email address that represents a specific 499 // Google 500 // account. For example, `alice@example.com` . 501 // 502 // 503 // * `serviceAccount:{emailid}`: An email address that represents a 504 // service 505 // account. For example, 506 // `my-other-app@appspot.gserviceaccount.com`. 507 // 508 // * `group:{emailid}`: An email address that represents a Google 509 // group. 510 // For example, `admins@example.com`. 511 // 512 // * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus 513 // unique 514 // identifier) representing a user that has been recently deleted. 515 // For 516 // example, `alice@example.com?uid=123456789012345678901`. If the 517 // user is 518 // recovered, this value reverts to `user:{emailid}` and the 519 // recovered user 520 // retains the role in the binding. 521 // 522 // * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address 523 // (plus 524 // unique identifier) representing a service account that has been 525 // recently 526 // deleted. For example, 527 // 528 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. 529 // 530 // If the service account is undeleted, this value reverts to 531 // `serviceAccount:{emailid}` and the undeleted service account 532 // retains the 533 // role in the binding. 534 // 535 // * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus 536 // unique 537 // identifier) representing a Google group that has been recently 538 // deleted. For example, 539 // `admins@example.com?uid=123456789012345678901`. If 540 // the group is recovered, this value reverts to `group:{emailid}` 541 // and the 542 // recovered group retains the role in the binding. 543 // 544 // 545 // * `domain:{domain}`: The G Suite domain (primary) that represents all 546 // the 547 // users of that domain. For example, `google.com` or 548 // `example.com`. 549 // 550 // 551 Members []string `json:"members,omitempty"` 552 553 // Role: Role that is assigned to `members`. 554 // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 555 Role string `json:"role,omitempty"` 556 557 // ForceSendFields is a list of field names (e.g. "Condition") to 558 // unconditionally include in API requests. By default, fields with 559 // empty values are omitted from API requests. However, any non-pointer, 560 // non-interface field appearing in ForceSendFields will be sent to the 561 // server regardless of whether the field is empty or not. This may be 562 // used to include empty fields in Patch requests. 563 ForceSendFields []string `json:"-"` 564 565 // NullFields is a list of field names (e.g. "Condition") to include in 566 // API requests with the JSON null value. By default, fields with empty 567 // values are omitted from API requests. However, any field with an 568 // empty value appearing in NullFields will be sent to the server as 569 // null. It is an error if a field in this list has a non-empty value. 570 // This may be used to include null fields in Patch requests. 571 NullFields []string `json:"-"` 572} 573 574func (s *Binding) MarshalJSON() ([]byte, error) { 575 type NoMethod Binding 576 raw := NoMethod(*s) 577 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 578} 579 580// CreateFeedRequest: Create asset feed request. 581type CreateFeedRequest struct { 582 // Feed: Required. The feed details. The field `name` must be empty and 583 // it will be generated 584 // in the format 585 // of: 586 // projects/project_number/feeds/feed_id 587 // folders/folder_number/feeds/ 588 // feed_id 589 // organizations/organization_number/feeds/feed_id 590 Feed *Feed `json:"feed,omitempty"` 591 592 // FeedId: Required. This is the client-assigned asset feed identifier 593 // and it needs to 594 // be unique under a specific parent project/folder/organization. 595 FeedId string `json:"feedId,omitempty"` 596 597 // ForceSendFields is a list of field names (e.g. "Feed") to 598 // unconditionally include in API requests. By default, fields with 599 // empty values are omitted from API requests. However, any non-pointer, 600 // non-interface field appearing in ForceSendFields will be sent to the 601 // server regardless of whether the field is empty or not. This may be 602 // used to include empty fields in Patch requests. 603 ForceSendFields []string `json:"-"` 604 605 // NullFields is a list of field names (e.g. "Feed") to include in API 606 // requests with the JSON null value. By default, fields with empty 607 // values are omitted from API requests. However, any field with an 608 // empty value appearing in NullFields will be sent to the server as 609 // null. It is an error if a field in this list has a non-empty value. 610 // This may be used to include null fields in Patch requests. 611 NullFields []string `json:"-"` 612} 613 614func (s *CreateFeedRequest) MarshalJSON() ([]byte, error) { 615 type NoMethod CreateFeedRequest 616 raw := NoMethod(*s) 617 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 618} 619 620// Empty: A generic empty message that you can re-use to avoid defining 621// duplicated 622// empty messages in your APIs. A typical example is to use it as the 623// request 624// or the response type of an API method. For instance: 625// 626// service Foo { 627// rpc Bar(google.protobuf.Empty) returns 628// (google.protobuf.Empty); 629// } 630// 631// The JSON representation for `Empty` is empty JSON object `{}`. 632type Empty struct { 633 // ServerResponse contains the HTTP response code and headers from the 634 // server. 635 googleapi.ServerResponse `json:"-"` 636} 637 638// ExportAssetsRequest: Export asset request. 639type ExportAssetsRequest struct { 640 // AssetTypes: A list of asset types of which to take a snapshot for. 641 // For example: 642 // "compute.googleapis.com/Disk". If specified, only matching assets 643 // will be 644 // returned. See [Introduction to Cloud 645 // Asset 646 // Inventory](https://cloud.google.com/asset-inventory/docs/overvie 647 // w) 648 // for all supported asset types. 649 AssetTypes []string `json:"assetTypes,omitempty"` 650 651 // ContentType: Asset content type. If not specified, no content but the 652 // asset name will be 653 // returned. 654 // 655 // Possible values: 656 // "CONTENT_TYPE_UNSPECIFIED" - Unspecified content type. 657 // "RESOURCE" - Resource metadata. 658 // "IAM_POLICY" - The actual IAM policy set on a resource. 659 // "ORG_POLICY" - The Cloud Organization Policy set on an asset. 660 // "ACCESS_POLICY" - The Cloud Access context mananger Policy set on 661 // an asset. 662 ContentType string `json:"contentType,omitempty"` 663 664 // OutputConfig: Required. Output configuration indicating where the 665 // results will be output 666 // to. All results will be in newline delimited JSON format. 667 OutputConfig *OutputConfig `json:"outputConfig,omitempty"` 668 669 // ReadTime: Timestamp to take an asset snapshot. This can only be set 670 // to a timestamp 671 // between 2018-10-02 UTC (inclusive) and the current time. If not 672 // specified, 673 // the current time will be used. Due to delays in resource data 674 // collection 675 // and indexing, there is a volatile window during which running the 676 // same 677 // query may get different results. 678 ReadTime string `json:"readTime,omitempty"` 679 680 // ForceSendFields is a list of field names (e.g. "AssetTypes") to 681 // unconditionally include in API requests. By default, fields with 682 // empty values are omitted from API requests. However, any non-pointer, 683 // non-interface field appearing in ForceSendFields will be sent to the 684 // server regardless of whether the field is empty or not. This may be 685 // used to include empty fields in Patch requests. 686 ForceSendFields []string `json:"-"` 687 688 // NullFields is a list of field names (e.g. "AssetTypes") to include in 689 // API requests with the JSON null value. By default, fields with empty 690 // values are omitted from API requests. However, any field with an 691 // empty value appearing in NullFields will be sent to the server as 692 // null. It is an error if a field in this list has a non-empty value. 693 // This may be used to include null fields in Patch requests. 694 NullFields []string `json:"-"` 695} 696 697func (s *ExportAssetsRequest) MarshalJSON() ([]byte, error) { 698 type NoMethod ExportAssetsRequest 699 raw := NoMethod(*s) 700 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 701} 702 703// Expr: Represents an expression text. Example: 704// 705// title: "User account presence" 706// description: "Determines whether the request has a user account" 707// expression: "size(request.user) > 0" 708type Expr struct { 709 // Description: An optional description of the expression. This is a 710 // longer text which 711 // describes the expression, e.g. when hovered over it in a UI. 712 Description string `json:"description,omitempty"` 713 714 // Expression: Textual representation of an expression in 715 // Common Expression Language syntax. 716 // 717 // The application context of the containing message determines 718 // which 719 // well-known feature set of CEL is supported. 720 Expression string `json:"expression,omitempty"` 721 722 // Location: An optional string indicating the location of the 723 // expression for error 724 // reporting, e.g. a file name and a position in the file. 725 Location string `json:"location,omitempty"` 726 727 // Title: An optional title for the expression, i.e. a short string 728 // describing 729 // its purpose. This can be used e.g. in UIs which allow to enter 730 // the 731 // expression. 732 Title string `json:"title,omitempty"` 733 734 // ForceSendFields is a list of field names (e.g. "Description") to 735 // unconditionally include in API requests. By default, fields with 736 // empty values are omitted from API requests. However, any non-pointer, 737 // non-interface field appearing in ForceSendFields will be sent to the 738 // server regardless of whether the field is empty or not. This may be 739 // used to include empty fields in Patch requests. 740 ForceSendFields []string `json:"-"` 741 742 // NullFields is a list of field names (e.g. "Description") to include 743 // in API requests with the JSON null value. By default, fields with 744 // empty values are omitted from API requests. However, any field with 745 // an empty value appearing in NullFields will be sent to the server as 746 // null. It is an error if a field in this list has a non-empty value. 747 // This may be used to include null fields in Patch requests. 748 NullFields []string `json:"-"` 749} 750 751func (s *Expr) MarshalJSON() ([]byte, error) { 752 type NoMethod Expr 753 raw := NoMethod(*s) 754 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 755} 756 757// Feed: An asset feed used to export asset updates to a 758// destinations. 759// An asset feed filter controls what updates are exported. 760// The asset feed must be created within a project, organization, 761// or 762// folder. Supported destinations are: 763// Cloud Pub/Sub topics. 764type Feed struct { 765 // AssetNames: A list of the full names of the assets to receive 766 // updates. You must specify 767 // either or both of asset_names and asset_types. Only asset updates 768 // matching 769 // specified asset_names and asset_types are exported to the feed. 770 // For 771 // example: 772 // `//compute.googleapis.com/projects/my_project_123/zones/z 773 // one1/instances/instance1`. 774 // See 775 // [Resource 776 // Names](https://cloud.google.com/apis/design/resource_names#f 777 // ull_resource_name) 778 // for more info. 779 AssetNames []string `json:"assetNames,omitempty"` 780 781 // AssetTypes: A list of types of the assets to receive updates. You 782 // must specify either 783 // or both of asset_names and asset_types. Only asset updates 784 // matching 785 // specified asset_names and asset_types are exported to the feed. 786 // For example: 787 // "compute.googleapis.com/Disk" See [Introduction to Cloud 788 // Asset 789 // Inventory](https://cloud.google.com/resource-manager/docs/cloud- 790 // asset-inventory/overview) 791 // for all supported asset types. 792 AssetTypes []string `json:"assetTypes,omitempty"` 793 794 // ContentType: Asset content type. If not specified, no content but the 795 // asset name and 796 // type will be returned. 797 // 798 // Possible values: 799 // "CONTENT_TYPE_UNSPECIFIED" - Unspecified content type. 800 // "RESOURCE" - Resource metadata. 801 // "IAM_POLICY" - The actual IAM policy set on a resource. 802 // "ORG_POLICY" - The Cloud Organization Policy set on an asset. 803 // "ACCESS_POLICY" - The Cloud Access context mananger Policy set on 804 // an asset. 805 ContentType string `json:"contentType,omitempty"` 806 807 // FeedOutputConfig: Required. Feed output configuration defining where 808 // the asset updates are 809 // published to. 810 FeedOutputConfig *FeedOutputConfig `json:"feedOutputConfig,omitempty"` 811 812 // Name: Required. The format will 813 // be 814 // projects/{project_number}/feeds/{client-assigned_feed_identifier} 815 // or 816 // folders/{folder_number}/feeds/{client-assigned_feed_identifier} 817 // or 818 // organizations/{organization_number}/feeds/{client-assigned_feed_ide 819 // ntifier} 820 // 821 // The client-assigned feed identifier must be unique within the 822 // parent 823 // project/folder/organization. 824 Name string `json:"name,omitempty"` 825 826 // ServerResponse contains the HTTP response code and headers from the 827 // server. 828 googleapi.ServerResponse `json:"-"` 829 830 // ForceSendFields is a list of field names (e.g. "AssetNames") to 831 // unconditionally include in API requests. By default, fields with 832 // empty values are omitted from API requests. However, any non-pointer, 833 // non-interface field appearing in ForceSendFields will be sent to the 834 // server regardless of whether the field is empty or not. This may be 835 // used to include empty fields in Patch requests. 836 ForceSendFields []string `json:"-"` 837 838 // NullFields is a list of field names (e.g. "AssetNames") to include in 839 // API requests with the JSON null value. By default, fields with empty 840 // values are omitted from API requests. However, any field with an 841 // empty value appearing in NullFields will be sent to the server as 842 // null. It is an error if a field in this list has a non-empty value. 843 // This may be used to include null fields in Patch requests. 844 NullFields []string `json:"-"` 845} 846 847func (s *Feed) MarshalJSON() ([]byte, error) { 848 type NoMethod Feed 849 raw := NoMethod(*s) 850 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 851} 852 853// FeedOutputConfig: Output configuration for asset feed destination. 854type FeedOutputConfig struct { 855 // PubsubDestination: Destination on Cloud Pubsub. 856 PubsubDestination *PubsubDestination `json:"pubsubDestination,omitempty"` 857 858 // ForceSendFields is a list of field names (e.g. "PubsubDestination") 859 // to unconditionally include in API requests. By default, fields with 860 // empty values are omitted from API requests. However, any non-pointer, 861 // non-interface field appearing in ForceSendFields will be sent to the 862 // server regardless of whether the field is empty or not. This may be 863 // used to include empty fields in Patch requests. 864 ForceSendFields []string `json:"-"` 865 866 // NullFields is a list of field names (e.g. "PubsubDestination") to 867 // include in API requests with the JSON null value. By default, fields 868 // with empty values are omitted from API requests. However, any field 869 // with an empty value appearing in NullFields will be sent to the 870 // server as null. It is an error if a field in this list has a 871 // non-empty value. This may be used to include null fields in Patch 872 // requests. 873 NullFields []string `json:"-"` 874} 875 876func (s *FeedOutputConfig) MarshalJSON() ([]byte, error) { 877 type NoMethod FeedOutputConfig 878 raw := NoMethod(*s) 879 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 880} 881 882// GcsDestination: A Cloud Storage location. 883type GcsDestination struct { 884 // Uri: The uri of the Cloud Storage object. It's the same uri that is 885 // used by 886 // gsutil. For example: "gs://bucket_name/object_name". See [Viewing 887 // and 888 // Editing 889 // Object 890 // Metadata](https://cloud.google.com/storage/docs/viewing-editing 891 // -metadata) 892 // for more information. 893 Uri string `json:"uri,omitempty"` 894 895 // UriPrefix: The uri prefix of all generated Cloud Storage objects. For 896 // example: 897 // "gs://bucket_name/object_name_prefix". Each object uri is in 898 // format: 899 // "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and 900 // only 901 // contains assets for that type. <shard number> starts from 0. For 902 // example: 903 // "gs://bucket_name/object_name_prefix/compute.googleapis.com/D 904 // isk/0" is 905 // the first shard of output objects containing 906 // all 907 // compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will 908 // be 909 // returned if file with the same name 910 // "gs://bucket_name/object_name_prefix" 911 // already exists. 912 UriPrefix string `json:"uriPrefix,omitempty"` 913 914 // ForceSendFields is a list of field names (e.g. "Uri") to 915 // unconditionally include in API requests. By default, fields with 916 // empty values are omitted from API requests. However, any non-pointer, 917 // non-interface field appearing in ForceSendFields will be sent to the 918 // server regardless of whether the field is empty or not. This may be 919 // used to include empty fields in Patch requests. 920 ForceSendFields []string `json:"-"` 921 922 // NullFields is a list of field names (e.g. "Uri") to include in API 923 // requests with the JSON null value. By default, fields with empty 924 // values are omitted from API requests. However, any field with an 925 // empty value appearing in NullFields will be sent to the server as 926 // null. It is an error if a field in this list has a non-empty value. 927 // This may be used to include null fields in Patch requests. 928 NullFields []string `json:"-"` 929} 930 931func (s *GcsDestination) MarshalJSON() ([]byte, error) { 932 type NoMethod GcsDestination 933 raw := NoMethod(*s) 934 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 935} 936 937// GoogleCloudOrgpolicyV1BooleanPolicy: Used in `policy_type` to specify 938// how `boolean_policy` will behave at this 939// resource. 940type GoogleCloudOrgpolicyV1BooleanPolicy struct { 941 // Enforced: If `true`, then the `Policy` is enforced. If `false`, then 942 // any 943 // configuration is acceptable. 944 // 945 // Suppose you have a 946 // `Constraint` 947 // `constraints/compute.disableSerialPortAccess` with 948 // `constraint_default` 949 // set to `ALLOW`. A `Policy` for that `Constraint` exhibits the 950 // following 951 // behavior: 952 // - If the `Policy` at this resource has enforced set to `false`, 953 // serial 954 // port connection attempts will be allowed. 955 // - If the `Policy` at this resource has enforced set to `true`, 956 // serial 957 // port connection attempts will be refused. 958 // - If the `Policy` at this resource is `RestoreDefault`, serial 959 // port 960 // connection attempts will be allowed. 961 // - If no `Policy` is set at this resource or anywhere higher in the 962 // resource hierarchy, serial port connection attempts will be 963 // allowed. 964 // - If no `Policy` is set at this resource, but one exists higher in 965 // the 966 // resource hierarchy, the behavior is as if the`Policy` were set 967 // at 968 // this resource. 969 // 970 // The following examples demonstrate the different possible 971 // layerings: 972 // 973 // Example 1 (nearest `Constraint` wins): 974 // `organizations/foo` has a `Policy` with: 975 // {enforced: false} 976 // `projects/bar` has no `Policy` set. 977 // The constraint at `projects/bar` and `organizations/foo` will not 978 // be 979 // enforced. 980 // 981 // Example 2 (enforcement gets replaced): 982 // `organizations/foo` has a `Policy` with: 983 // {enforced: false} 984 // `projects/bar` has a `Policy` with: 985 // {enforced: true} 986 // The constraint at `organizations/foo` is not enforced. 987 // The constraint at `projects/bar` is enforced. 988 // 989 // Example 3 (RestoreDefault): 990 // `organizations/foo` has a `Policy` with: 991 // {enforced: true} 992 // `projects/bar` has a `Policy` with: 993 // {RestoreDefault: {}} 994 // The constraint at `organizations/foo` is enforced. 995 // The constraint at `projects/bar` is not enforced, 996 // because 997 // `constraint_default` for the `Constraint` is `ALLOW`. 998 Enforced bool `json:"enforced,omitempty"` 999 1000 // ForceSendFields is a list of field names (e.g. "Enforced") to 1001 // unconditionally include in API requests. By default, fields with 1002 // empty values are omitted from API requests. However, any non-pointer, 1003 // non-interface field appearing in ForceSendFields will be sent to the 1004 // server regardless of whether the field is empty or not. This may be 1005 // used to include empty fields in Patch requests. 1006 ForceSendFields []string `json:"-"` 1007 1008 // NullFields is a list of field names (e.g. "Enforced") to include in 1009 // API requests with the JSON null value. By default, fields with empty 1010 // values are omitted from API requests. However, any field with an 1011 // empty value appearing in NullFields will be sent to the server as 1012 // null. It is an error if a field in this list has a non-empty value. 1013 // This may be used to include null fields in Patch requests. 1014 NullFields []string `json:"-"` 1015} 1016 1017func (s *GoogleCloudOrgpolicyV1BooleanPolicy) MarshalJSON() ([]byte, error) { 1018 type NoMethod GoogleCloudOrgpolicyV1BooleanPolicy 1019 raw := NoMethod(*s) 1020 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1021} 1022 1023// GoogleCloudOrgpolicyV1ListPolicy: Used in `policy_type` to specify 1024// how `list_policy` behaves at this 1025// resource. 1026// 1027// `ListPolicy` can define specific values and subtrees of Cloud 1028// Resource 1029// Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) 1030// that 1031// are allowed or denied by setting the `allowed_values` and 1032// `denied_values` 1033// fields. This is achieved by using the `under:` and optional `is:` 1034// prefixes. 1035// The `under:` prefix is used to denote resource subtree values. 1036// The `is:` prefix is used to denote specific values, and is required 1037// only 1038// if the value contains a ":". Values prefixed with "is:" are treated 1039// the 1040// same as values with no prefix. 1041// Ancestry subtrees must be in one of the following formats: 1042// - "projects/<project-id>", e.g. "projects/tokyo-rain-123" 1043// - "folders/<folder-id>", e.g. "folders/1234" 1044// - "organizations/<organization-id>", e.g. 1045// "organizations/1234" 1046// The `supports_under` field of the associated `Constraint` defines 1047// whether 1048// ancestry prefixes can be used. You can set `allowed_values` 1049// and 1050// `denied_values` in the same `Policy` if `all_values` 1051// is 1052// `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny 1053// all 1054// values. If `all_values` is set to either `ALLOW` or 1055// `DENY`, 1056// `allowed_values` and `denied_values` must be unset. 1057type GoogleCloudOrgpolicyV1ListPolicy struct { 1058 // AllValues: The policy all_values state. 1059 // 1060 // Possible values: 1061 // "ALL_VALUES_UNSPECIFIED" - Indicates that allowed_values or 1062 // denied_values must be set. 1063 // "ALLOW" - A policy with this set allows all values. 1064 // "DENY" - A policy with this set denies all values. 1065 AllValues string `json:"allValues,omitempty"` 1066 1067 // AllowedValues: List of values allowed at this resource. Can only be 1068 // set if `all_values` 1069 // is set to `ALL_VALUES_UNSPECIFIED`. 1070 AllowedValues []string `json:"allowedValues,omitempty"` 1071 1072 // DeniedValues: List of values denied at this resource. Can only be set 1073 // if `all_values` 1074 // is set to `ALL_VALUES_UNSPECIFIED`. 1075 DeniedValues []string `json:"deniedValues,omitempty"` 1076 1077 // InheritFromParent: Determines the inheritance behavior for this 1078 // `Policy`. 1079 // 1080 // By default, a `ListPolicy` set at a resource supercedes any `Policy` 1081 // set 1082 // anywhere up the resource hierarchy. However, if `inherit_from_parent` 1083 // is 1084 // set to `true`, then the values from the effective `Policy` of the 1085 // parent 1086 // resource are inherited, meaning the values set in this `Policy` 1087 // are 1088 // added to the values inherited up the hierarchy. 1089 // 1090 // Setting `Policy` hierarchies that inherit both allowed values and 1091 // denied 1092 // values isn't recommended in most circumstances to keep the 1093 // configuration 1094 // simple and understandable. However, it is possible to set a `Policy` 1095 // with 1096 // `allowed_values` set that inherits a `Policy` with `denied_values` 1097 // set. 1098 // In this case, the values that are allowed must be in `allowed_values` 1099 // and 1100 // not present in `denied_values`. 1101 // 1102 // For example, suppose you have a 1103 // `Constraint` 1104 // `constraints/serviceuser.services`, which has a `constraint_type` 1105 // of 1106 // `list_constraint`, and with `constraint_default` set to 1107 // `ALLOW`. 1108 // Suppose that at the Organization level, a `Policy` is applied 1109 // that 1110 // restricts the allowed API activations to {`E1`, `E2`}. Then, if 1111 // a 1112 // `Policy` is applied to a project below the Organization that 1113 // has 1114 // `inherit_from_parent` set to `false` and field all_values set to 1115 // DENY, 1116 // then an attempt to activate any API will be denied. 1117 // 1118 // The following examples demonstrate different possible layerings 1119 // for 1120 // `projects/bar` parented by `organizations/foo`: 1121 // 1122 // Example 1 (no inherited values): 1123 // `organizations/foo` has a `Policy` with values: 1124 // {allowed_values: "E1" allowed_values:"E2"} 1125 // `projects/bar` has `inherit_from_parent` `false` and values: 1126 // {allowed_values: "E3" allowed_values: "E4"} 1127 // The accepted values at `organizations/foo` are `E1`, `E2`. 1128 // The accepted values at `projects/bar` are `E3`, and `E4`. 1129 // 1130 // Example 2 (inherited values): 1131 // `organizations/foo` has a `Policy` with values: 1132 // {allowed_values: "E1" allowed_values:"E2"} 1133 // `projects/bar` has a `Policy` with values: 1134 // {value: "E3" value: "E4" inherit_from_parent: true} 1135 // The accepted values at `organizations/foo` are `E1`, `E2`. 1136 // The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and 1137 // `E4`. 1138 // 1139 // Example 3 (inheriting both allowed and denied values): 1140 // `organizations/foo` has a `Policy` with values: 1141 // {allowed_values: "E1" allowed_values: "E2"} 1142 // `projects/bar` has a `Policy` with: 1143 // {denied_values: "E1"} 1144 // The accepted values at `organizations/foo` are `E1`, `E2`. 1145 // The value accepted at `projects/bar` is `E2`. 1146 // 1147 // Example 4 (RestoreDefault): 1148 // `organizations/foo` has a `Policy` with values: 1149 // {allowed_values: "E1" allowed_values:"E2"} 1150 // `projects/bar` has a `Policy` with values: 1151 // {RestoreDefault: {}} 1152 // The accepted values at `organizations/foo` are `E1`, `E2`. 1153 // The accepted values at `projects/bar` are either all or none 1154 // depending on 1155 // the value of `constraint_default` (if `ALLOW`, all; if 1156 // `DENY`, none). 1157 // 1158 // Example 5 (no policy inherits parent policy): 1159 // `organizations/foo` has no `Policy` set. 1160 // `projects/bar` has no `Policy` set. 1161 // The accepted values at both levels are either all or none depending 1162 // on 1163 // the value of `constraint_default` (if `ALLOW`, all; if 1164 // `DENY`, none). 1165 // 1166 // Example 6 (ListConstraint allowing all): 1167 // `organizations/foo` has a `Policy` with values: 1168 // {allowed_values: "E1" allowed_values: "E2"} 1169 // `projects/bar` has a `Policy` with: 1170 // {all: ALLOW} 1171 // The accepted values at `organizations/foo` are `E1`, E2`. 1172 // Any value is accepted at `projects/bar`. 1173 // 1174 // Example 7 (ListConstraint allowing none): 1175 // `organizations/foo` has a `Policy` with values: 1176 // {allowed_values: "E1" allowed_values: "E2"} 1177 // `projects/bar` has a `Policy` with: 1178 // {all: DENY} 1179 // The accepted values at `organizations/foo` are `E1`, E2`. 1180 // No value is accepted at `projects/bar`. 1181 // 1182 // Example 10 (allowed and denied subtrees of Resource Manager 1183 // hierarchy): 1184 // Given the following resource hierarchy 1185 // O1->{F1, F2}; F1->{P1}; F2->{P2, P3}, 1186 // `organizations/foo` has a `Policy` with values: 1187 // {allowed_values: "under:organizations/O1"} 1188 // `projects/bar` has a `Policy` with: 1189 // {allowed_values: "under:projects/P3"} 1190 // {denied_values: "under:folders/F2"} 1191 // The accepted values at `organizations/foo` are `organizations/O1`, 1192 // `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`, 1193 // `projects/P3`. 1194 // The accepted values at `projects/bar` are `organizations/O1`, 1195 // `folders/F1`, `projects/P1`. 1196 InheritFromParent bool `json:"inheritFromParent,omitempty"` 1197 1198 // SuggestedValue: Optional. The Google Cloud Console will try to 1199 // default to a configuration 1200 // that matches the value specified in this `Policy`. If 1201 // `suggested_value` 1202 // is not set, it will inherit the value specified higher in the 1203 // hierarchy, 1204 // unless `inherit_from_parent` is `false`. 1205 SuggestedValue string `json:"suggestedValue,omitempty"` 1206 1207 // ForceSendFields is a list of field names (e.g. "AllValues") to 1208 // unconditionally include in API requests. By default, fields with 1209 // empty values are omitted from API requests. However, any non-pointer, 1210 // non-interface field appearing in ForceSendFields will be sent to the 1211 // server regardless of whether the field is empty or not. This may be 1212 // used to include empty fields in Patch requests. 1213 ForceSendFields []string `json:"-"` 1214 1215 // NullFields is a list of field names (e.g. "AllValues") to include in 1216 // API requests with the JSON null value. By default, fields with empty 1217 // values are omitted from API requests. However, any field with an 1218 // empty value appearing in NullFields will be sent to the server as 1219 // null. It is an error if a field in this list has a non-empty value. 1220 // This may be used to include null fields in Patch requests. 1221 NullFields []string `json:"-"` 1222} 1223 1224func (s *GoogleCloudOrgpolicyV1ListPolicy) MarshalJSON() ([]byte, error) { 1225 type NoMethod GoogleCloudOrgpolicyV1ListPolicy 1226 raw := NoMethod(*s) 1227 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1228} 1229 1230// GoogleCloudOrgpolicyV1Policy: Defines a Cloud Organization `Policy` 1231// which is used to specify `Constraints` 1232// for configurations of Cloud Platform resources. 1233type GoogleCloudOrgpolicyV1Policy struct { 1234 // BooleanPolicy: For boolean `Constraints`, whether to enforce the 1235 // `Constraint` or not. 1236 BooleanPolicy *GoogleCloudOrgpolicyV1BooleanPolicy `json:"booleanPolicy,omitempty"` 1237 1238 // Constraint: The name of the `Constraint` the `Policy` is configuring, 1239 // for example, 1240 // `constraints/serviceuser.services`. 1241 // 1242 // Immutable after creation. 1243 Constraint string `json:"constraint,omitempty"` 1244 1245 // Etag: An opaque tag indicating the current version of the `Policy`, 1246 // used for 1247 // concurrency control. 1248 // 1249 // When the `Policy` is returned from either a `GetPolicy` or 1250 // a 1251 // `ListOrgPolicy` request, this `etag` indicates the version of the 1252 // current 1253 // `Policy` to use when executing a read-modify-write loop. 1254 // 1255 // When the `Policy` is returned from a `GetEffectivePolicy` request, 1256 // the 1257 // `etag` will be unset. 1258 // 1259 // When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` 1260 // value 1261 // that was returned from a `GetOrgPolicy` request as part of 1262 // a 1263 // read-modify-write loop for concurrency control. Not setting the 1264 // `etag`in a 1265 // `SetOrgPolicy` request will result in an unconditional write of 1266 // the 1267 // `Policy`. 1268 Etag string `json:"etag,omitempty"` 1269 1270 // ListPolicy: List of values either allowed or disallowed. 1271 ListPolicy *GoogleCloudOrgpolicyV1ListPolicy `json:"listPolicy,omitempty"` 1272 1273 // RestoreDefault: Restores the default behavior of the constraint; 1274 // independent of 1275 // `Constraint` type. 1276 RestoreDefault *GoogleCloudOrgpolicyV1RestoreDefault `json:"restoreDefault,omitempty"` 1277 1278 // UpdateTime: The time stamp the `Policy` was previously updated. This 1279 // is set by the 1280 // server, not specified by the caller, and represents the last time a 1281 // call to 1282 // `SetOrgPolicy` was made for that `Policy`. Any value set by the 1283 // client will 1284 // be ignored. 1285 UpdateTime string `json:"updateTime,omitempty"` 1286 1287 // Version: Version of the `Policy`. Default version is 0; 1288 Version int64 `json:"version,omitempty"` 1289 1290 // ForceSendFields is a list of field names (e.g. "BooleanPolicy") to 1291 // unconditionally include in API requests. By default, fields with 1292 // empty values are omitted from API requests. However, any non-pointer, 1293 // non-interface field appearing in ForceSendFields will be sent to the 1294 // server regardless of whether the field is empty or not. This may be 1295 // used to include empty fields in Patch requests. 1296 ForceSendFields []string `json:"-"` 1297 1298 // NullFields is a list of field names (e.g. "BooleanPolicy") to include 1299 // in API requests with the JSON null value. By default, fields with 1300 // empty values are omitted from API requests. However, any field with 1301 // an empty value appearing in NullFields will be sent to the server as 1302 // null. It is an error if a field in this list has a non-empty value. 1303 // This may be used to include null fields in Patch requests. 1304 NullFields []string `json:"-"` 1305} 1306 1307func (s *GoogleCloudOrgpolicyV1Policy) MarshalJSON() ([]byte, error) { 1308 type NoMethod GoogleCloudOrgpolicyV1Policy 1309 raw := NoMethod(*s) 1310 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1311} 1312 1313// GoogleCloudOrgpolicyV1RestoreDefault: Ignores policies set above this 1314// resource and restores the 1315// `constraint_default` enforcement behavior of the specific 1316// `Constraint` at 1317// this resource. 1318// 1319// Suppose that `constraint_default` is set to `ALLOW` for 1320// the 1321// `Constraint` `constraints/serviceuser.services`. Suppose that 1322// organization 1323// foo.com sets a `Policy` at their Organization resource node that 1324// restricts 1325// the allowed service activations to deny all service activations. 1326// They 1327// could then set a `Policy` with the `policy_type` `restore_default` 1328// on 1329// several experimental projects, restoring the 1330// `constraint_default` 1331// enforcement of the `Constraint` for only those projects, allowing 1332// those 1333// projects to have all services activated. 1334type GoogleCloudOrgpolicyV1RestoreDefault struct { 1335} 1336 1337// GoogleIdentityAccesscontextmanagerV1AccessLevel: An `AccessLevel` is 1338// a label that can be applied to requests to GCP services, 1339// along with a list of requirements necessary for the label to be 1340// applied. 1341type GoogleIdentityAccesscontextmanagerV1AccessLevel struct { 1342 // Basic: A `BasicLevel` composed of `Conditions`. 1343 Basic *GoogleIdentityAccesscontextmanagerV1BasicLevel `json:"basic,omitempty"` 1344 1345 // CreateTime: Output only. Time the `AccessLevel` was created in UTC. 1346 CreateTime string `json:"createTime,omitempty"` 1347 1348 // Description: Description of the `AccessLevel` and its use. Does not 1349 // affect behavior. 1350 Description string `json:"description,omitempty"` 1351 1352 // Name: Required. Resource name for the Access Level. The `short_name` 1353 // component 1354 // must begin with a letter and only include alphanumeric and '_'. 1355 // Format: 1356 // `accessPolicies/{policy_id}/accessLevels/{short_name}` 1357 Name string `json:"name,omitempty"` 1358 1359 // Title: Human readable title. Must be unique within the Policy. 1360 Title string `json:"title,omitempty"` 1361 1362 // UpdateTime: Output only. Time the `AccessLevel` was updated in UTC. 1363 UpdateTime string `json:"updateTime,omitempty"` 1364 1365 // ForceSendFields is a list of field names (e.g. "Basic") to 1366 // unconditionally include in API requests. By default, fields with 1367 // empty values are omitted from API requests. However, any non-pointer, 1368 // non-interface field appearing in ForceSendFields will be sent to the 1369 // server regardless of whether the field is empty or not. This may be 1370 // used to include empty fields in Patch requests. 1371 ForceSendFields []string `json:"-"` 1372 1373 // NullFields is a list of field names (e.g. "Basic") to include in API 1374 // requests with the JSON null value. By default, fields with empty 1375 // values are omitted from API requests. However, any field with an 1376 // empty value appearing in NullFields will be sent to the server as 1377 // null. It is an error if a field in this list has a non-empty value. 1378 // This may be used to include null fields in Patch requests. 1379 NullFields []string `json:"-"` 1380} 1381 1382func (s *GoogleIdentityAccesscontextmanagerV1AccessLevel) MarshalJSON() ([]byte, error) { 1383 type NoMethod GoogleIdentityAccesscontextmanagerV1AccessLevel 1384 raw := NoMethod(*s) 1385 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1386} 1387 1388// GoogleIdentityAccesscontextmanagerV1AccessPolicy: `AccessPolicy` is a 1389// container for `AccessLevels` (which define the necessary 1390// attributes to use GCP services) and `ServicePerimeters` (which define 1391// regions 1392// of services able to freely pass data within a perimeter). An access 1393// policy is 1394// globally visible within an organization, and the restrictions it 1395// specifies 1396// apply to all projects within an organization. 1397type GoogleIdentityAccesscontextmanagerV1AccessPolicy struct { 1398 // CreateTime: Output only. Time the `AccessPolicy` was created in UTC. 1399 CreateTime string `json:"createTime,omitempty"` 1400 1401 // Name: Output only. Resource name of the `AccessPolicy`. 1402 // Format: 1403 // `accessPolicies/{policy_id}` 1404 Name string `json:"name,omitempty"` 1405 1406 // Parent: Required. The parent of this `AccessPolicy` in the Cloud 1407 // Resource 1408 // Hierarchy. Currently immutable once created. 1409 // Format: 1410 // `organizations/{organization_id}` 1411 Parent string `json:"parent,omitempty"` 1412 1413 // Title: Required. Human readable title. Does not affect behavior. 1414 Title string `json:"title,omitempty"` 1415 1416 // UpdateTime: Output only. Time the `AccessPolicy` was updated in UTC. 1417 UpdateTime string `json:"updateTime,omitempty"` 1418 1419 // ForceSendFields is a list of field names (e.g. "CreateTime") to 1420 // unconditionally include in API requests. By default, fields with 1421 // empty values are omitted from API requests. However, any non-pointer, 1422 // non-interface field appearing in ForceSendFields will be sent to the 1423 // server regardless of whether the field is empty or not. This may be 1424 // used to include empty fields in Patch requests. 1425 ForceSendFields []string `json:"-"` 1426 1427 // NullFields is a list of field names (e.g. "CreateTime") to include in 1428 // API requests with the JSON null value. By default, fields with empty 1429 // values are omitted from API requests. However, any field with an 1430 // empty value appearing in NullFields will be sent to the server as 1431 // null. It is an error if a field in this list has a non-empty value. 1432 // This may be used to include null fields in Patch requests. 1433 NullFields []string `json:"-"` 1434} 1435 1436func (s *GoogleIdentityAccesscontextmanagerV1AccessPolicy) MarshalJSON() ([]byte, error) { 1437 type NoMethod GoogleIdentityAccesscontextmanagerV1AccessPolicy 1438 raw := NoMethod(*s) 1439 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1440} 1441 1442// GoogleIdentityAccesscontextmanagerV1BasicLevel: `BasicLevel` is an 1443// `AccessLevel` using a set of recommended features. 1444type GoogleIdentityAccesscontextmanagerV1BasicLevel struct { 1445 // CombiningFunction: How the `conditions` list should be combined to 1446 // determine if a request is 1447 // granted this `AccessLevel`. If AND is used, each `Condition` 1448 // in 1449 // `conditions` must be satisfied for the `AccessLevel` to be applied. 1450 // If OR 1451 // is used, at least one `Condition` in `conditions` must be satisfied 1452 // for the 1453 // `AccessLevel` to be applied. Default behavior is AND. 1454 // 1455 // Possible values: 1456 // "AND" - All `Conditions` must be true for the `BasicLevel` to be 1457 // true. 1458 // "OR" - If at least one `Condition` is true, then the `BasicLevel` 1459 // is true. 1460 CombiningFunction string `json:"combiningFunction,omitempty"` 1461 1462 // Conditions: Required. A list of requirements for the `AccessLevel` to 1463 // be granted. 1464 Conditions []*GoogleIdentityAccesscontextmanagerV1Condition `json:"conditions,omitempty"` 1465 1466 // ForceSendFields is a list of field names (e.g. "CombiningFunction") 1467 // to unconditionally include in API requests. By default, fields with 1468 // empty values are omitted from API requests. However, any non-pointer, 1469 // non-interface field appearing in ForceSendFields will be sent to the 1470 // server regardless of whether the field is empty or not. This may be 1471 // used to include empty fields in Patch requests. 1472 ForceSendFields []string `json:"-"` 1473 1474 // NullFields is a list of field names (e.g. "CombiningFunction") to 1475 // include in API requests with the JSON null value. By default, fields 1476 // with empty values are omitted from API requests. However, any field 1477 // with an empty value appearing in NullFields will be sent to the 1478 // server as null. It is an error if a field in this list has a 1479 // non-empty value. This may be used to include null fields in Patch 1480 // requests. 1481 NullFields []string `json:"-"` 1482} 1483 1484func (s *GoogleIdentityAccesscontextmanagerV1BasicLevel) MarshalJSON() ([]byte, error) { 1485 type NoMethod GoogleIdentityAccesscontextmanagerV1BasicLevel 1486 raw := NoMethod(*s) 1487 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1488} 1489 1490// GoogleIdentityAccesscontextmanagerV1Condition: A condition necessary 1491// for an `AccessLevel` to be granted. The Condition is an 1492// AND over its fields. So a Condition is true if: 1) the request IP is 1493// from one 1494// of the listed subnetworks AND 2) the originating device complies with 1495// the 1496// listed device policy AND 3) all listed access levels are granted AND 1497// 4) the 1498// request was sent at a time allowed by the DateTimeRestriction. 1499type GoogleIdentityAccesscontextmanagerV1Condition struct { 1500 // DevicePolicy: Device specific restrictions, all restrictions must 1501 // hold for the 1502 // Condition to be true. If not specified, all devices are allowed. 1503 DevicePolicy *GoogleIdentityAccesscontextmanagerV1DevicePolicy `json:"devicePolicy,omitempty"` 1504 1505 // IpSubnetworks: CIDR block IP subnetwork specification. May be IPv4 or 1506 // IPv6. Note that for 1507 // a CIDR IP address block, the specified IP address portion must be 1508 // properly 1509 // truncated (i.e. all the host bits must be zero) or the input is 1510 // considered 1511 // malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" 1512 // is 1513 // not. Similarly, for IPv6, "2001:db8::/32" is accepted 1514 // whereas 1515 // "2001:db8::1/32" is not. The originating IP of a request must be in 1516 // one of 1517 // the listed subnets in order for this Condition to be true. If empty, 1518 // all IP 1519 // addresses are allowed. 1520 IpSubnetworks []string `json:"ipSubnetworks,omitempty"` 1521 1522 // Members: The request must be made by one of the provided user or 1523 // service 1524 // accounts. Groups are not 1525 // supported. 1526 // Syntax: 1527 // `user:{emailid}` 1528 // `serviceAccount:{emailid}` 1529 // If not specified, a request may come from any user. 1530 Members []string `json:"members,omitempty"` 1531 1532 // Negate: Whether to negate the Condition. If true, the Condition 1533 // becomes a NAND over 1534 // its non-empty fields, each field must be false for the Condition 1535 // overall to 1536 // be satisfied. Defaults to false. 1537 Negate bool `json:"negate,omitempty"` 1538 1539 // Regions: The request must originate from one of the provided 1540 // countries/regions. 1541 // Must be valid ISO 3166-1 alpha-2 codes. 1542 Regions []string `json:"regions,omitempty"` 1543 1544 // RequiredAccessLevels: A list of other access levels defined in the 1545 // same `Policy`, referenced by 1546 // resource name. Referencing an `AccessLevel` which does not exist is 1547 // an 1548 // error. All access levels listed must be granted for the Condition 1549 // to be true. 1550 // Example: 1551 // "accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME" 1552 RequiredAccessLevels []string `json:"requiredAccessLevels,omitempty"` 1553 1554 // ForceSendFields is a list of field names (e.g. "DevicePolicy") to 1555 // unconditionally include in API requests. By default, fields with 1556 // empty values are omitted from API requests. However, any non-pointer, 1557 // non-interface field appearing in ForceSendFields will be sent to the 1558 // server regardless of whether the field is empty or not. This may be 1559 // used to include empty fields in Patch requests. 1560 ForceSendFields []string `json:"-"` 1561 1562 // NullFields is a list of field names (e.g. "DevicePolicy") to include 1563 // in API requests with the JSON null value. By default, fields with 1564 // empty values are omitted from API requests. However, any field with 1565 // an empty value appearing in NullFields will be sent to the server as 1566 // null. It is an error if a field in this list has a non-empty value. 1567 // This may be used to include null fields in Patch requests. 1568 NullFields []string `json:"-"` 1569} 1570 1571func (s *GoogleIdentityAccesscontextmanagerV1Condition) MarshalJSON() ([]byte, error) { 1572 type NoMethod GoogleIdentityAccesscontextmanagerV1Condition 1573 raw := NoMethod(*s) 1574 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1575} 1576 1577// GoogleIdentityAccesscontextmanagerV1DevicePolicy: `DevicePolicy` 1578// specifies device specific restrictions necessary to acquire a 1579// given access level. A `DevicePolicy` specifies requirements for 1580// requests from 1581// devices to be granted access levels, it does not do any enforcement 1582// on the 1583// device. `DevicePolicy` acts as an AND over all specified fields, and 1584// each 1585// repeated field is an OR over its elements. Any unset fields are 1586// ignored. For 1587// example, if the proto is { os_type : DESKTOP_WINDOWS, os_type 1588// : 1589// DESKTOP_LINUX, encryption_status: ENCRYPTED}, then the DevicePolicy 1590// will be 1591// true for requests originating from encrypted Linux desktops and 1592// encrypted 1593// Windows desktops. 1594type GoogleIdentityAccesscontextmanagerV1DevicePolicy struct { 1595 // AllowedDeviceManagementLevels: Allowed device management levels, an 1596 // empty list allows all management 1597 // levels. 1598 // 1599 // Possible values: 1600 // "MANAGEMENT_UNSPECIFIED" - The device's management level is not 1601 // specified or not known. 1602 // "NONE" - The device is not managed. 1603 // "BASIC" - Basic management is enabled, which is generally limited 1604 // to monitoring and 1605 // wiping the corporate account. 1606 // "COMPLETE" - Complete device management. This includes more 1607 // thorough monitoring and the 1608 // ability to directly manage the device (such as remote wiping). This 1609 // can be 1610 // enabled through the Android Enterprise Platform. 1611 AllowedDeviceManagementLevels []string `json:"allowedDeviceManagementLevels,omitempty"` 1612 1613 // AllowedEncryptionStatuses: Allowed encryptions statuses, an empty 1614 // list allows all statuses. 1615 // 1616 // Possible values: 1617 // "ENCRYPTION_UNSPECIFIED" - The encryption status of the device is 1618 // not specified or not known. 1619 // "ENCRYPTION_UNSUPPORTED" - The device does not support encryption. 1620 // "UNENCRYPTED" - The device supports encryption, but is currently 1621 // unencrypted. 1622 // "ENCRYPTED" - The device is encrypted. 1623 AllowedEncryptionStatuses []string `json:"allowedEncryptionStatuses,omitempty"` 1624 1625 // OsConstraints: Allowed OS versions, an empty list allows all types 1626 // and all versions. 1627 OsConstraints []*GoogleIdentityAccesscontextmanagerV1OsConstraint `json:"osConstraints,omitempty"` 1628 1629 // RequireAdminApproval: Whether the device needs to be approved by the 1630 // customer admin. 1631 RequireAdminApproval bool `json:"requireAdminApproval,omitempty"` 1632 1633 // RequireCorpOwned: Whether the device needs to be corp owned. 1634 RequireCorpOwned bool `json:"requireCorpOwned,omitempty"` 1635 1636 // RequireScreenlock: Whether or not screenlock is required for the 1637 // DevicePolicy to be true. 1638 // Defaults to `false`. 1639 RequireScreenlock bool `json:"requireScreenlock,omitempty"` 1640 1641 // ForceSendFields is a list of field names (e.g. 1642 // "AllowedDeviceManagementLevels") to unconditionally include in API 1643 // requests. By default, fields with empty values are omitted from API 1644 // requests. However, any non-pointer, non-interface field appearing in 1645 // ForceSendFields will be sent to the server regardless of whether the 1646 // field is empty or not. This may be used to include empty fields in 1647 // Patch requests. 1648 ForceSendFields []string `json:"-"` 1649 1650 // NullFields is a list of field names (e.g. 1651 // "AllowedDeviceManagementLevels") to include in API requests with the 1652 // JSON null value. By default, fields with empty values are omitted 1653 // from API requests. However, any field with an empty value appearing 1654 // in NullFields will be sent to the server as null. It is an error if a 1655 // field in this list has a non-empty value. This may be used to include 1656 // null fields in Patch requests. 1657 NullFields []string `json:"-"` 1658} 1659 1660func (s *GoogleIdentityAccesscontextmanagerV1DevicePolicy) MarshalJSON() ([]byte, error) { 1661 type NoMethod GoogleIdentityAccesscontextmanagerV1DevicePolicy 1662 raw := NoMethod(*s) 1663 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1664} 1665 1666// GoogleIdentityAccesscontextmanagerV1OsConstraint: A restriction on 1667// the OS type and version of devices making requests. 1668type GoogleIdentityAccesscontextmanagerV1OsConstraint struct { 1669 // MinimumVersion: The minimum allowed OS version. If not set, any 1670 // version of this OS 1671 // satisfies the constraint. Format: "major.minor.patch". 1672 // Examples: "10.5.301", "9.2.1". 1673 MinimumVersion string `json:"minimumVersion,omitempty"` 1674 1675 // OsType: Required. The allowed OS type. 1676 // 1677 // Possible values: 1678 // "OS_UNSPECIFIED" - The operating system of the device is not 1679 // specified or not known. 1680 // "DESKTOP_MAC" - A desktop Mac operating system. 1681 // "DESKTOP_WINDOWS" - A desktop Windows operating system. 1682 // "DESKTOP_LINUX" - A desktop Linux operating system. 1683 // "DESKTOP_CHROME_OS" - A desktop ChromeOS operating system. 1684 OsType string `json:"osType,omitempty"` 1685 1686 // RequireVerifiedChromeOs: Only allows requests from devices with a 1687 // verified Chrome OS. 1688 // Verifications includes requirements that the device is 1689 // enterprise-managed, 1690 // conformant to domain policies, and the caller has permission to 1691 // call 1692 // the API targeted by the request. 1693 RequireVerifiedChromeOs bool `json:"requireVerifiedChromeOs,omitempty"` 1694 1695 // ForceSendFields is a list of field names (e.g. "MinimumVersion") to 1696 // unconditionally include in API requests. By default, fields with 1697 // empty values are omitted from API requests. However, any non-pointer, 1698 // non-interface field appearing in ForceSendFields will be sent to the 1699 // server regardless of whether the field is empty or not. This may be 1700 // used to include empty fields in Patch requests. 1701 ForceSendFields []string `json:"-"` 1702 1703 // NullFields is a list of field names (e.g. "MinimumVersion") to 1704 // include in API requests with the JSON null value. By default, fields 1705 // with empty values are omitted from API requests. However, any field 1706 // with an empty value appearing in NullFields will be sent to the 1707 // server as null. It is an error if a field in this list has a 1708 // non-empty value. This may be used to include null fields in Patch 1709 // requests. 1710 NullFields []string `json:"-"` 1711} 1712 1713func (s *GoogleIdentityAccesscontextmanagerV1OsConstraint) MarshalJSON() ([]byte, error) { 1714 type NoMethod GoogleIdentityAccesscontextmanagerV1OsConstraint 1715 raw := NoMethod(*s) 1716 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1717} 1718 1719// GoogleIdentityAccesscontextmanagerV1ServicePerimeter: 1720// `ServicePerimeter` describes a set of GCP resources which can freely 1721// import 1722// and export data amongst themselves, but not export outside of 1723// the 1724// `ServicePerimeter`. If a request with a source within this 1725// `ServicePerimeter` 1726// has a target outside of the `ServicePerimeter`, the request will be 1727// blocked. 1728// Otherwise the request is allowed. There are two types of Service 1729// Perimeter - 1730// Regular and Bridge. Regular Service Perimeters cannot overlap, a 1731// single GCP 1732// project can only belong to a single regular Service Perimeter. 1733// Service 1734// Perimeter Bridges can contain only GCP projects as members, a single 1735// GCP 1736// project may belong to multiple Service Perimeter Bridges. 1737type GoogleIdentityAccesscontextmanagerV1ServicePerimeter struct { 1738 // CreateTime: Output only. Time the `ServicePerimeter` was created in 1739 // UTC. 1740 CreateTime string `json:"createTime,omitempty"` 1741 1742 // Description: Description of the `ServicePerimeter` and its use. Does 1743 // not affect 1744 // behavior. 1745 Description string `json:"description,omitempty"` 1746 1747 // Name: Required. Resource name for the ServicePerimeter. The 1748 // `short_name` 1749 // component must begin with a letter and only include alphanumeric and 1750 // '_'. 1751 // Format: `accessPolicies/{policy_id}/servicePerimeters/{short_name}` 1752 Name string `json:"name,omitempty"` 1753 1754 // PerimeterType: Perimeter type indicator. A single project is 1755 // allowed to be a member of single regular perimeter, but multiple 1756 // service 1757 // perimeter bridges. A project cannot be a included in a perimeter 1758 // bridge 1759 // without being included in regular perimeter. For perimeter 1760 // bridges, 1761 // the restricted service list as well as access level lists must 1762 // be 1763 // empty. 1764 // 1765 // Possible values: 1766 // "PERIMETER_TYPE_REGULAR" - Regular Perimeter. 1767 // "PERIMETER_TYPE_BRIDGE" - Perimeter Bridge. 1768 PerimeterType string `json:"perimeterType,omitempty"` 1769 1770 // Status: Current ServicePerimeter configuration. Specifies sets of 1771 // resources, 1772 // restricted services and access levels that determine 1773 // perimeter 1774 // content and boundaries. 1775 Status *GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig `json:"status,omitempty"` 1776 1777 // Title: Human readable title. Must be unique within the Policy. 1778 Title string `json:"title,omitempty"` 1779 1780 // UpdateTime: Output only. Time the `ServicePerimeter` was updated in 1781 // UTC. 1782 UpdateTime string `json:"updateTime,omitempty"` 1783 1784 // ForceSendFields is a list of field names (e.g. "CreateTime") to 1785 // unconditionally include in API requests. By default, fields with 1786 // empty values are omitted from API requests. However, any non-pointer, 1787 // non-interface field appearing in ForceSendFields will be sent to the 1788 // server regardless of whether the field is empty or not. This may be 1789 // used to include empty fields in Patch requests. 1790 ForceSendFields []string `json:"-"` 1791 1792 // NullFields is a list of field names (e.g. "CreateTime") to include in 1793 // API requests with the JSON null value. By default, fields with empty 1794 // values are omitted from API requests. However, any field with an 1795 // empty value appearing in NullFields will be sent to the server as 1796 // null. It is an error if a field in this list has a non-empty value. 1797 // This may be used to include null fields in Patch requests. 1798 NullFields []string `json:"-"` 1799} 1800 1801func (s *GoogleIdentityAccesscontextmanagerV1ServicePerimeter) MarshalJSON() ([]byte, error) { 1802 type NoMethod GoogleIdentityAccesscontextmanagerV1ServicePerimeter 1803 raw := NoMethod(*s) 1804 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1805} 1806 1807// GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig: 1808// `ServicePerimeterConfig` specifies a set of GCP resources that 1809// describe 1810// specific Service Perimeter configuration. 1811type GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig struct { 1812 // AccessLevels: A list of `AccessLevel` resource names that allow 1813 // resources within the 1814 // `ServicePerimeter` to be accessed from the internet. `AccessLevels` 1815 // listed 1816 // must be in the same policy as this `ServicePerimeter`. Referencing 1817 // a 1818 // nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` 1819 // names are 1820 // listed, resources within the perimeter can only be accessed via GCP 1821 // calls 1822 // with request origins within the perimeter. 1823 // Example: 1824 // "accessPolicies/MY_POLICY/accessLevels/MY_LEVEL". 1825 // For Service Perimeter Bridge, must be empty. 1826 AccessLevels []string `json:"accessLevels,omitempty"` 1827 1828 // Resources: A list of GCP resources that are inside of the service 1829 // perimeter. 1830 // Currently only projects are allowed. Format: 1831 // `projects/{project_number}` 1832 Resources []string `json:"resources,omitempty"` 1833 1834 // RestrictedServices: GCP services that are subject to the Service 1835 // Perimeter restrictions. For 1836 // example, if `storage.googleapis.com` is specified, access to the 1837 // storage 1838 // buckets inside the perimeter must meet the perimeter's access 1839 // restrictions. 1840 RestrictedServices []string `json:"restrictedServices,omitempty"` 1841 1842 // ForceSendFields is a list of field names (e.g. "AccessLevels") to 1843 // unconditionally include in API requests. By default, fields with 1844 // empty values are omitted from API requests. However, any non-pointer, 1845 // non-interface field appearing in ForceSendFields will be sent to the 1846 // server regardless of whether the field is empty or not. This may be 1847 // used to include empty fields in Patch requests. 1848 ForceSendFields []string `json:"-"` 1849 1850 // NullFields is a list of field names (e.g. "AccessLevels") to include 1851 // in API requests with the JSON null value. By default, fields with 1852 // empty values are omitted from API requests. However, any field with 1853 // an empty value appearing in NullFields will be sent to the server as 1854 // null. It is an error if a field in this list has a non-empty value. 1855 // This may be used to include null fields in Patch requests. 1856 NullFields []string `json:"-"` 1857} 1858 1859func (s *GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig) MarshalJSON() ([]byte, error) { 1860 type NoMethod GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig 1861 raw := NoMethod(*s) 1862 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1863} 1864 1865type ListFeedsResponse struct { 1866 // Feeds: A list of feeds. 1867 Feeds []*Feed `json:"feeds,omitempty"` 1868 1869 // ServerResponse contains the HTTP response code and headers from the 1870 // server. 1871 googleapi.ServerResponse `json:"-"` 1872 1873 // ForceSendFields is a list of field names (e.g. "Feeds") to 1874 // unconditionally include in API requests. By default, fields with 1875 // empty values are omitted from API requests. However, any non-pointer, 1876 // non-interface field appearing in ForceSendFields will be sent to the 1877 // server regardless of whether the field is empty or not. This may be 1878 // used to include empty fields in Patch requests. 1879 ForceSendFields []string `json:"-"` 1880 1881 // NullFields is a list of field names (e.g. "Feeds") to include in API 1882 // requests with the JSON null value. By default, fields with empty 1883 // values are omitted from API requests. However, any field with an 1884 // empty value appearing in NullFields will be sent to the server as 1885 // null. It is an error if a field in this list has a non-empty value. 1886 // This may be used to include null fields in Patch requests. 1887 NullFields []string `json:"-"` 1888} 1889 1890func (s *ListFeedsResponse) MarshalJSON() ([]byte, error) { 1891 type NoMethod ListFeedsResponse 1892 raw := NoMethod(*s) 1893 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1894} 1895 1896// Operation: This resource represents a long-running operation that is 1897// the result of a 1898// network API call. 1899type Operation struct { 1900 // Done: If the value is `false`, it means the operation is still in 1901 // progress. 1902 // If `true`, the operation is completed, and either `error` or 1903 // `response` is 1904 // available. 1905 Done bool `json:"done,omitempty"` 1906 1907 // Error: The error result of the operation in case of failure or 1908 // cancellation. 1909 Error *Status `json:"error,omitempty"` 1910 1911 // Metadata: Service-specific metadata associated with the operation. 1912 // It typically 1913 // contains progress information and common metadata such as create 1914 // time. 1915 // Some services might not provide such metadata. Any method that 1916 // returns a 1917 // long-running operation should document the metadata type, if any. 1918 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 1919 1920 // Name: The server-assigned name, which is only unique within the same 1921 // service that 1922 // originally returns it. If you use the default HTTP mapping, 1923 // the 1924 // `name` should be a resource name ending with 1925 // `operations/{unique_id}`. 1926 Name string `json:"name,omitempty"` 1927 1928 // Response: The normal response of the operation in case of success. 1929 // If the original 1930 // method returns no data on success, such as `Delete`, the response 1931 // is 1932 // `google.protobuf.Empty`. If the original method is 1933 // standard 1934 // `Get`/`Create`/`Update`, the response should be the resource. For 1935 // other 1936 // methods, the response should have the type `XxxResponse`, where 1937 // `Xxx` 1938 // is the original method name. For example, if the original method 1939 // name 1940 // is `TakeSnapshot()`, the inferred response type 1941 // is 1942 // `TakeSnapshotResponse`. 1943 Response googleapi.RawMessage `json:"response,omitempty"` 1944 1945 // ServerResponse contains the HTTP response code and headers from the 1946 // server. 1947 googleapi.ServerResponse `json:"-"` 1948 1949 // ForceSendFields is a list of field names (e.g. "Done") to 1950 // unconditionally include in API requests. By default, fields with 1951 // empty values are omitted from API requests. However, any non-pointer, 1952 // non-interface field appearing in ForceSendFields will be sent to the 1953 // server regardless of whether the field is empty or not. This may be 1954 // used to include empty fields in Patch requests. 1955 ForceSendFields []string `json:"-"` 1956 1957 // NullFields is a list of field names (e.g. "Done") to include in API 1958 // requests with the JSON null value. By default, fields with empty 1959 // values are omitted from API requests. However, any field with an 1960 // empty value appearing in NullFields will be sent to the server as 1961 // null. It is an error if a field in this list has a non-empty value. 1962 // This may be used to include null fields in Patch requests. 1963 NullFields []string `json:"-"` 1964} 1965 1966func (s *Operation) MarshalJSON() ([]byte, error) { 1967 type NoMethod Operation 1968 raw := NoMethod(*s) 1969 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1970} 1971 1972// OutputConfig: Output configuration for export assets destination. 1973type OutputConfig struct { 1974 // BigqueryDestination: Destination on BigQuery. The output table stores 1975 // the fields in asset 1976 // proto as columns in BigQuery. The resource/iam_policy field is 1977 // converted 1978 // to a record with each field to a column, except metadata to a single 1979 // JSON 1980 // string. 1981 BigqueryDestination *BigQueryDestination `json:"bigqueryDestination,omitempty"` 1982 1983 // GcsDestination: Destination on Cloud Storage. 1984 GcsDestination *GcsDestination `json:"gcsDestination,omitempty"` 1985 1986 // ForceSendFields is a list of field names (e.g. "BigqueryDestination") 1987 // to unconditionally include in API requests. By default, fields with 1988 // empty values are omitted from API requests. However, any non-pointer, 1989 // non-interface field appearing in ForceSendFields will be sent to the 1990 // server regardless of whether the field is empty or not. This may be 1991 // used to include empty fields in Patch requests. 1992 ForceSendFields []string `json:"-"` 1993 1994 // NullFields is a list of field names (e.g. "BigqueryDestination") to 1995 // include in API requests with the JSON null value. By default, fields 1996 // with empty values are omitted from API requests. However, any field 1997 // with an empty value appearing in NullFields will be sent to the 1998 // server as null. It is an error if a field in this list has a 1999 // non-empty value. This may be used to include null fields in Patch 2000 // requests. 2001 NullFields []string `json:"-"` 2002} 2003 2004func (s *OutputConfig) MarshalJSON() ([]byte, error) { 2005 type NoMethod OutputConfig 2006 raw := NoMethod(*s) 2007 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2008} 2009 2010// Policy: An Identity and Access Management (IAM) policy, which 2011// specifies access 2012// controls for Google Cloud resources. 2013// 2014// 2015// A `Policy` is a collection of `bindings`. A `binding` binds one or 2016// more 2017// `members` to a single `role`. Members can be user accounts, service 2018// accounts, 2019// Google groups, and domains (such as G Suite). A `role` is a named 2020// list of 2021// permissions; each `role` can be an IAM predefined role or a 2022// user-created 2023// custom role. 2024// 2025// Optionally, a `binding` can specify a `condition`, which is a 2026// logical 2027// expression that allows access to a resource only if the expression 2028// evaluates 2029// to `true`. A condition can add constraints based on attributes of 2030// the 2031// request, the resource, or both. 2032// 2033// **JSON example:** 2034// 2035// { 2036// "bindings": [ 2037// { 2038// "role": "roles/resourcemanager.organizationAdmin", 2039// "members": [ 2040// "user:mike@example.com", 2041// "group:admins@example.com", 2042// "domain:google.com", 2043// 2044// "serviceAccount:my-project-id@appspot.gserviceaccount.com" 2045// ] 2046// }, 2047// { 2048// "role": "roles/resourcemanager.organizationViewer", 2049// "members": ["user:eve@example.com"], 2050// "condition": { 2051// "title": "expirable access", 2052// "description": "Does not grant access after Sep 2020", 2053// "expression": "request.time < 2054// timestamp('2020-10-01T00:00:00.000Z')", 2055// } 2056// } 2057// ], 2058// "etag": "BwWWja0YfJA=", 2059// "version": 3 2060// } 2061// 2062// **YAML example:** 2063// 2064// bindings: 2065// - members: 2066// - user:mike@example.com 2067// - group:admins@example.com 2068// - domain:google.com 2069// - serviceAccount:my-project-id@appspot.gserviceaccount.com 2070// role: roles/resourcemanager.organizationAdmin 2071// - members: 2072// - user:eve@example.com 2073// role: roles/resourcemanager.organizationViewer 2074// condition: 2075// title: expirable access 2076// description: Does not grant access after Sep 2020 2077// expression: request.time < 2078// timestamp('2020-10-01T00:00:00.000Z') 2079// - etag: BwWWja0YfJA= 2080// - version: 3 2081// 2082// For a description of IAM and its features, see the 2083// [IAM documentation](https://cloud.google.com/iam/docs/). 2084type Policy struct { 2085 // AuditConfigs: Specifies cloud audit logging configuration for this 2086 // policy. 2087 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` 2088 2089 // Bindings: Associates a list of `members` to a `role`. Optionally, may 2090 // specify a 2091 // `condition` that determines how and when the `bindings` are applied. 2092 // Each 2093 // of the `bindings` must contain at least one member. 2094 Bindings []*Binding `json:"bindings,omitempty"` 2095 2096 // Etag: `etag` is used for optimistic concurrency control as a way to 2097 // help 2098 // prevent simultaneous updates of a policy from overwriting each 2099 // other. 2100 // It is strongly suggested that systems make use of the `etag` in 2101 // the 2102 // read-modify-write cycle to perform policy updates in order to avoid 2103 // race 2104 // conditions: An `etag` is returned in the response to `getIamPolicy`, 2105 // and 2106 // systems are expected to put that etag in the request to 2107 // `setIamPolicy` to 2108 // ensure that their change will be applied to the same version of the 2109 // policy. 2110 // 2111 // **Important:** If you use IAM Conditions, you must include the `etag` 2112 // field 2113 // whenever you call `setIamPolicy`. If you omit this field, then IAM 2114 // allows 2115 // you to overwrite a version `3` policy with a version `1` policy, and 2116 // all of 2117 // the conditions in the version `3` policy are lost. 2118 Etag string `json:"etag,omitempty"` 2119 2120 // Version: Specifies the format of the policy. 2121 // 2122 // Valid values are `0`, `1`, and `3`. Requests that specify an invalid 2123 // value 2124 // are rejected. 2125 // 2126 // Any operation that affects conditional role bindings must specify 2127 // version 2128 // `3`. This requirement applies to the following operations: 2129 // 2130 // * Getting a policy that includes a conditional role binding 2131 // * Adding a conditional role binding to a policy 2132 // * Changing a conditional role binding in a policy 2133 // * Removing any role binding, with or without a condition, from a 2134 // policy 2135 // that includes conditions 2136 // 2137 // **Important:** If you use IAM Conditions, you must include the `etag` 2138 // field 2139 // whenever you call `setIamPolicy`. If you omit this field, then IAM 2140 // allows 2141 // you to overwrite a version `3` policy with a version `1` policy, and 2142 // all of 2143 // the conditions in the version `3` policy are lost. 2144 // 2145 // If a policy does not include any conditions, operations on that 2146 // policy may 2147 // specify any valid version or leave the field unset. 2148 Version int64 `json:"version,omitempty"` 2149 2150 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to 2151 // unconditionally include in API requests. By default, fields with 2152 // empty values are omitted from API requests. However, any non-pointer, 2153 // non-interface field appearing in ForceSendFields will be sent to the 2154 // server regardless of whether the field is empty or not. This may be 2155 // used to include empty fields in Patch requests. 2156 ForceSendFields []string `json:"-"` 2157 2158 // NullFields is a list of field names (e.g. "AuditConfigs") to include 2159 // in API requests with the JSON null value. By default, fields with 2160 // empty values are omitted from API requests. However, any field with 2161 // an empty value appearing in NullFields will be sent to the server as 2162 // null. It is an error if a field in this list has a non-empty value. 2163 // This may be used to include null fields in Patch requests. 2164 NullFields []string `json:"-"` 2165} 2166 2167func (s *Policy) MarshalJSON() ([]byte, error) { 2168 type NoMethod Policy 2169 raw := NoMethod(*s) 2170 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2171} 2172 2173// PubsubDestination: A Cloud Pubsub destination. 2174type PubsubDestination struct { 2175 // Topic: The name of the Cloud Pub/Sub topic to publish to. 2176 // For example: `projects/PROJECT_ID/topics/TOPIC_ID`. 2177 Topic string `json:"topic,omitempty"` 2178 2179 // ForceSendFields is a list of field names (e.g. "Topic") to 2180 // unconditionally include in API requests. By default, fields with 2181 // empty values are omitted from API requests. However, any non-pointer, 2182 // non-interface field appearing in ForceSendFields will be sent to the 2183 // server regardless of whether the field is empty or not. This may be 2184 // used to include empty fields in Patch requests. 2185 ForceSendFields []string `json:"-"` 2186 2187 // NullFields is a list of field names (e.g. "Topic") to include in API 2188 // requests with the JSON null value. By default, fields with empty 2189 // values are omitted from API requests. However, any field with an 2190 // empty value appearing in NullFields will be sent to the server as 2191 // null. It is an error if a field in this list has a non-empty value. 2192 // This may be used to include null fields in Patch requests. 2193 NullFields []string `json:"-"` 2194} 2195 2196func (s *PubsubDestination) MarshalJSON() ([]byte, error) { 2197 type NoMethod PubsubDestination 2198 raw := NoMethod(*s) 2199 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2200} 2201 2202// Resource: Representation of a cloud resource. 2203type Resource struct { 2204 // Data: The content of the resource, in which some sensitive fields are 2205 // scrubbed 2206 // away and may not be present. 2207 Data googleapi.RawMessage `json:"data,omitempty"` 2208 2209 // DiscoveryDocumentUri: The URL of the discovery document containing 2210 // the resource's JSON schema. 2211 // For 2212 // example: 2213 // "https://www.googleapis.com/discovery/v1/apis/compute/v1/res 2214 // t". 2215 // It will be left unspecified for resources without a discovery-based 2216 // API, 2217 // such as Cloud Bigtable. 2218 DiscoveryDocumentUri string `json:"discoveryDocumentUri,omitempty"` 2219 2220 // DiscoveryName: The JSON schema name listed in the discovery 2221 // document. 2222 // Example: "Project". It will be left unspecified for resources (such 2223 // as 2224 // Cloud Bigtable) without a discovery-based API. 2225 DiscoveryName string `json:"discoveryName,omitempty"` 2226 2227 // Parent: The full name of the immediate parent of this resource. 2228 // See 2229 // [Resource 2230 // Names](https://cloud.google.com/apis/design/resource_nam 2231 // es#full_resource_name) 2232 // for more information. 2233 // 2234 // For GCP assets, it is the parent resource defined in the [Cloud IAM 2235 // policy 2236 // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hi 2237 // erarchy). 2238 // For 2239 // example: 2240 // "//cloudresourcemanager.googleapis.com/projects/my_project_1 2241 // 23". 2242 // 2243 // For third-party assets, it is up to the users to define. 2244 Parent string `json:"parent,omitempty"` 2245 2246 // ResourceUrl: The REST URL for accessing the resource. An HTTP GET 2247 // operation using this 2248 // URL returns the resource 2249 // itself. 2250 // Example: 2251 // `https://cloudresourcemanager.googleapis.com/v1/proje 2252 // cts/my-project-123`. 2253 // It will be left unspecified for resources without a REST API. 2254 ResourceUrl string `json:"resourceUrl,omitempty"` 2255 2256 // Version: The API version. Example: "v1". 2257 Version string `json:"version,omitempty"` 2258 2259 // ForceSendFields is a list of field names (e.g. "Data") to 2260 // unconditionally include in API requests. By default, fields with 2261 // empty values are omitted from API requests. However, any non-pointer, 2262 // non-interface field appearing in ForceSendFields will be sent to the 2263 // server regardless of whether the field is empty or not. This may be 2264 // used to include empty fields in Patch requests. 2265 ForceSendFields []string `json:"-"` 2266 2267 // NullFields is a list of field names (e.g. "Data") to include in API 2268 // requests with the JSON null value. By default, fields with empty 2269 // values are omitted from API requests. However, any field with an 2270 // empty value appearing in NullFields will be sent to the server as 2271 // null. It is an error if a field in this list has a non-empty value. 2272 // This may be used to include null fields in Patch requests. 2273 NullFields []string `json:"-"` 2274} 2275 2276func (s *Resource) MarshalJSON() ([]byte, error) { 2277 type NoMethod Resource 2278 raw := NoMethod(*s) 2279 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2280} 2281 2282// Status: The `Status` type defines a logical error model that is 2283// suitable for 2284// different programming environments, including REST APIs and RPC APIs. 2285// It is 2286// used by [gRPC](https://github.com/grpc). Each `Status` message 2287// contains 2288// three pieces of data: error code, error message, and error 2289// details. 2290// 2291// You can find out more about this error model and how to work with it 2292// in the 2293// [API Design Guide](https://cloud.google.com/apis/design/errors). 2294type Status struct { 2295 // Code: The status code, which should be an enum value of 2296 // google.rpc.Code. 2297 Code int64 `json:"code,omitempty"` 2298 2299 // Details: A list of messages that carry the error details. There is a 2300 // common set of 2301 // message types for APIs to use. 2302 Details []googleapi.RawMessage `json:"details,omitempty"` 2303 2304 // Message: A developer-facing error message, which should be in 2305 // English. Any 2306 // user-facing error message should be localized and sent in 2307 // the 2308 // google.rpc.Status.details field, or localized by the client. 2309 Message string `json:"message,omitempty"` 2310 2311 // ForceSendFields is a list of field names (e.g. "Code") to 2312 // unconditionally include in API requests. By default, fields with 2313 // empty values are omitted from API requests. However, any non-pointer, 2314 // non-interface field appearing in ForceSendFields will be sent to the 2315 // server regardless of whether the field is empty or not. This may be 2316 // used to include empty fields in Patch requests. 2317 ForceSendFields []string `json:"-"` 2318 2319 // NullFields is a list of field names (e.g. "Code") to include in API 2320 // requests with the JSON null value. By default, fields with empty 2321 // values are omitted from API requests. However, any field with an 2322 // empty value appearing in NullFields will be sent to the server as 2323 // null. It is an error if a field in this list has a non-empty value. 2324 // This may be used to include null fields in Patch requests. 2325 NullFields []string `json:"-"` 2326} 2327 2328func (s *Status) MarshalJSON() ([]byte, error) { 2329 type NoMethod Status 2330 raw := NoMethod(*s) 2331 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2332} 2333 2334// TemporalAsset: Temporal asset. In addition to the asset, the temporal 2335// asset includes the 2336// status of the asset and valid from and to time of it. 2337type TemporalAsset struct { 2338 // Asset: Asset. 2339 Asset *Asset `json:"asset,omitempty"` 2340 2341 // Deleted: If the asset is deleted or not. 2342 Deleted bool `json:"deleted,omitempty"` 2343 2344 // Window: The time window when the asset data and state was observed. 2345 Window *TimeWindow `json:"window,omitempty"` 2346 2347 // ForceSendFields is a list of field names (e.g. "Asset") to 2348 // unconditionally include in API requests. By default, fields with 2349 // empty values are omitted from API requests. However, any non-pointer, 2350 // non-interface field appearing in ForceSendFields will be sent to the 2351 // server regardless of whether the field is empty or not. This may be 2352 // used to include empty fields in Patch requests. 2353 ForceSendFields []string `json:"-"` 2354 2355 // NullFields is a list of field names (e.g. "Asset") to include in API 2356 // requests with the JSON null value. By default, fields with empty 2357 // values are omitted from API requests. However, any field with an 2358 // empty value appearing in NullFields will be sent to the server as 2359 // null. It is an error if a field in this list has a non-empty value. 2360 // This may be used to include null fields in Patch requests. 2361 NullFields []string `json:"-"` 2362} 2363 2364func (s *TemporalAsset) MarshalJSON() ([]byte, error) { 2365 type NoMethod TemporalAsset 2366 raw := NoMethod(*s) 2367 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2368} 2369 2370// TimeWindow: A time window of (start_time, end_time]. 2371type TimeWindow struct { 2372 // EndTime: End time of the time window (inclusive). 2373 // Current timestamp if not specified. 2374 EndTime string `json:"endTime,omitempty"` 2375 2376 // StartTime: Start time of the time window (exclusive). 2377 StartTime string `json:"startTime,omitempty"` 2378 2379 // ForceSendFields is a list of field names (e.g. "EndTime") to 2380 // unconditionally include in API requests. By default, fields with 2381 // empty values are omitted from API requests. However, any non-pointer, 2382 // non-interface field appearing in ForceSendFields will be sent to the 2383 // server regardless of whether the field is empty or not. This may be 2384 // used to include empty fields in Patch requests. 2385 ForceSendFields []string `json:"-"` 2386 2387 // NullFields is a list of field names (e.g. "EndTime") to include in 2388 // API requests with the JSON null value. By default, fields with empty 2389 // values are omitted from API requests. However, any field with an 2390 // empty value appearing in NullFields will be sent to the server as 2391 // null. It is an error if a field in this list has a non-empty value. 2392 // This may be used to include null fields in Patch requests. 2393 NullFields []string `json:"-"` 2394} 2395 2396func (s *TimeWindow) MarshalJSON() ([]byte, error) { 2397 type NoMethod TimeWindow 2398 raw := NoMethod(*s) 2399 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2400} 2401 2402// UpdateFeedRequest: Update asset feed request. 2403type UpdateFeedRequest struct { 2404 // Feed: Required. The new values of feed details. It must match an 2405 // existing feed and the 2406 // field `name` must be in the format 2407 // of: 2408 // projects/project_number/feeds/feed_id 2409 // or 2410 // folders/folder_number/feeds/feed_id 2411 // or 2412 // organizations/organization_number/feeds/feed_id. 2413 Feed *Feed `json:"feed,omitempty"` 2414 2415 // UpdateMask: Required. Only updates the `feed` fields indicated by 2416 // this mask. 2417 // The field mask must not be empty, and it must not contain fields 2418 // that 2419 // are immutable or only set by the server. 2420 UpdateMask string `json:"updateMask,omitempty"` 2421 2422 // ForceSendFields is a list of field names (e.g. "Feed") to 2423 // unconditionally include in API requests. By default, fields with 2424 // empty values are omitted from API requests. However, any non-pointer, 2425 // non-interface field appearing in ForceSendFields will be sent to the 2426 // server regardless of whether the field is empty or not. This may be 2427 // used to include empty fields in Patch requests. 2428 ForceSendFields []string `json:"-"` 2429 2430 // NullFields is a list of field names (e.g. "Feed") to include in API 2431 // requests with the JSON null value. By default, fields with empty 2432 // values are omitted from API requests. However, any field with an 2433 // empty value appearing in NullFields will be sent to the server as 2434 // null. It is an error if a field in this list has a non-empty value. 2435 // This may be used to include null fields in Patch requests. 2436 NullFields []string `json:"-"` 2437} 2438 2439func (s *UpdateFeedRequest) MarshalJSON() ([]byte, error) { 2440 type NoMethod UpdateFeedRequest 2441 raw := NoMethod(*s) 2442 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2443} 2444 2445// method id "cloudasset.feeds.create": 2446 2447type FeedsCreateCall struct { 2448 s *Service 2449 parent string 2450 createfeedrequest *CreateFeedRequest 2451 urlParams_ gensupport.URLParams 2452 ctx_ context.Context 2453 header_ http.Header 2454} 2455 2456// Create: Creates a feed in a parent project/folder/organization to 2457// listen to its 2458// asset updates. 2459func (r *FeedsService) Create(parent string, createfeedrequest *CreateFeedRequest) *FeedsCreateCall { 2460 c := &FeedsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2461 c.parent = parent 2462 c.createfeedrequest = createfeedrequest 2463 return c 2464} 2465 2466// Fields allows partial responses to be retrieved. See 2467// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2468// for more information. 2469func (c *FeedsCreateCall) Fields(s ...googleapi.Field) *FeedsCreateCall { 2470 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2471 return c 2472} 2473 2474// Context sets the context to be used in this call's Do method. Any 2475// pending HTTP request will be aborted if the provided context is 2476// canceled. 2477func (c *FeedsCreateCall) Context(ctx context.Context) *FeedsCreateCall { 2478 c.ctx_ = ctx 2479 return c 2480} 2481 2482// Header returns an http.Header that can be modified by the caller to 2483// add HTTP headers to the request. 2484func (c *FeedsCreateCall) Header() http.Header { 2485 if c.header_ == nil { 2486 c.header_ = make(http.Header) 2487 } 2488 return c.header_ 2489} 2490 2491func (c *FeedsCreateCall) doRequest(alt string) (*http.Response, error) { 2492 reqHeaders := make(http.Header) 2493 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") 2494 for k, v := range c.header_ { 2495 reqHeaders[k] = v 2496 } 2497 reqHeaders.Set("User-Agent", c.s.userAgent()) 2498 var body io.Reader = nil 2499 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createfeedrequest) 2500 if err != nil { 2501 return nil, err 2502 } 2503 reqHeaders.Set("Content-Type", "application/json") 2504 c.urlParams_.Set("alt", alt) 2505 c.urlParams_.Set("prettyPrint", "false") 2506 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/feeds") 2507 urls += "?" + c.urlParams_.Encode() 2508 req, err := http.NewRequest("POST", urls, body) 2509 if err != nil { 2510 return nil, err 2511 } 2512 req.Header = reqHeaders 2513 googleapi.Expand(req.URL, map[string]string{ 2514 "parent": c.parent, 2515 }) 2516 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2517} 2518 2519// Do executes the "cloudasset.feeds.create" call. 2520// Exactly one of *Feed or error will be non-nil. Any non-2xx status 2521// code is an error. Response headers are in either 2522// *Feed.ServerResponse.Header or (if a response was returned at all) in 2523// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2524// whether the returned error was because http.StatusNotModified was 2525// returned. 2526func (c *FeedsCreateCall) Do(opts ...googleapi.CallOption) (*Feed, error) { 2527 gensupport.SetOptions(c.urlParams_, opts...) 2528 res, err := c.doRequest("json") 2529 if res != nil && res.StatusCode == http.StatusNotModified { 2530 if res.Body != nil { 2531 res.Body.Close() 2532 } 2533 return nil, &googleapi.Error{ 2534 Code: res.StatusCode, 2535 Header: res.Header, 2536 } 2537 } 2538 if err != nil { 2539 return nil, err 2540 } 2541 defer googleapi.CloseBody(res) 2542 if err := googleapi.CheckResponse(res); err != nil { 2543 return nil, err 2544 } 2545 ret := &Feed{ 2546 ServerResponse: googleapi.ServerResponse{ 2547 Header: res.Header, 2548 HTTPStatusCode: res.StatusCode, 2549 }, 2550 } 2551 target := &ret 2552 if err := gensupport.DecodeResponse(target, res); err != nil { 2553 return nil, err 2554 } 2555 return ret, nil 2556 // { 2557 // "description": "Creates a feed in a parent project/folder/organization to listen to its\nasset updates.", 2558 // "flatPath": "v1/{v1Id}/{v1Id1}/feeds", 2559 // "httpMethod": "POST", 2560 // "id": "cloudasset.feeds.create", 2561 // "parameterOrder": [ 2562 // "parent" 2563 // ], 2564 // "parameters": { 2565 // "parent": { 2566 // "description": "Required. The name of the project/folder/organization where this feed\nshould be created in. It can only be an organization number (such as\n\"organizations/123\"), a folder number (such as \"folders/123\"), a project ID\n(such as \"projects/my-project-id\")\", or a project number (such as\n\"projects/12345\").", 2567 // "location": "path", 2568 // "pattern": "^[^/]+/[^/]+$", 2569 // "required": true, 2570 // "type": "string" 2571 // } 2572 // }, 2573 // "path": "v1/{+parent}/feeds", 2574 // "request": { 2575 // "$ref": "CreateFeedRequest" 2576 // }, 2577 // "response": { 2578 // "$ref": "Feed" 2579 // }, 2580 // "scopes": [ 2581 // "https://www.googleapis.com/auth/cloud-platform" 2582 // ] 2583 // } 2584 2585} 2586 2587// method id "cloudasset.feeds.delete": 2588 2589type FeedsDeleteCall struct { 2590 s *Service 2591 name string 2592 urlParams_ gensupport.URLParams 2593 ctx_ context.Context 2594 header_ http.Header 2595} 2596 2597// Delete: Deletes an asset feed. 2598func (r *FeedsService) Delete(name string) *FeedsDeleteCall { 2599 c := &FeedsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2600 c.name = name 2601 return c 2602} 2603 2604// Fields allows partial responses to be retrieved. See 2605// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2606// for more information. 2607func (c *FeedsDeleteCall) Fields(s ...googleapi.Field) *FeedsDeleteCall { 2608 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2609 return c 2610} 2611 2612// Context sets the context to be used in this call's Do method. Any 2613// pending HTTP request will be aborted if the provided context is 2614// canceled. 2615func (c *FeedsDeleteCall) Context(ctx context.Context) *FeedsDeleteCall { 2616 c.ctx_ = ctx 2617 return c 2618} 2619 2620// Header returns an http.Header that can be modified by the caller to 2621// add HTTP headers to the request. 2622func (c *FeedsDeleteCall) Header() http.Header { 2623 if c.header_ == nil { 2624 c.header_ = make(http.Header) 2625 } 2626 return c.header_ 2627} 2628 2629func (c *FeedsDeleteCall) doRequest(alt string) (*http.Response, error) { 2630 reqHeaders := make(http.Header) 2631 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") 2632 for k, v := range c.header_ { 2633 reqHeaders[k] = v 2634 } 2635 reqHeaders.Set("User-Agent", c.s.userAgent()) 2636 var body io.Reader = nil 2637 c.urlParams_.Set("alt", alt) 2638 c.urlParams_.Set("prettyPrint", "false") 2639 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 2640 urls += "?" + c.urlParams_.Encode() 2641 req, err := http.NewRequest("DELETE", urls, body) 2642 if err != nil { 2643 return nil, err 2644 } 2645 req.Header = reqHeaders 2646 googleapi.Expand(req.URL, map[string]string{ 2647 "name": c.name, 2648 }) 2649 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2650} 2651 2652// Do executes the "cloudasset.feeds.delete" call. 2653// Exactly one of *Empty or error will be non-nil. Any non-2xx status 2654// code is an error. Response headers are in either 2655// *Empty.ServerResponse.Header or (if a response was returned at all) 2656// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 2657// check whether the returned error was because http.StatusNotModified 2658// was returned. 2659func (c *FeedsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 2660 gensupport.SetOptions(c.urlParams_, opts...) 2661 res, err := c.doRequest("json") 2662 if res != nil && res.StatusCode == http.StatusNotModified { 2663 if res.Body != nil { 2664 res.Body.Close() 2665 } 2666 return nil, &googleapi.Error{ 2667 Code: res.StatusCode, 2668 Header: res.Header, 2669 } 2670 } 2671 if err != nil { 2672 return nil, err 2673 } 2674 defer googleapi.CloseBody(res) 2675 if err := googleapi.CheckResponse(res); err != nil { 2676 return nil, err 2677 } 2678 ret := &Empty{ 2679 ServerResponse: googleapi.ServerResponse{ 2680 Header: res.Header, 2681 HTTPStatusCode: res.StatusCode, 2682 }, 2683 } 2684 target := &ret 2685 if err := gensupport.DecodeResponse(target, res); err != nil { 2686 return nil, err 2687 } 2688 return ret, nil 2689 // { 2690 // "description": "Deletes an asset feed.", 2691 // "flatPath": "v1/{v1Id}/{v1Id1}/feeds/{feedsId}", 2692 // "httpMethod": "DELETE", 2693 // "id": "cloudasset.feeds.delete", 2694 // "parameterOrder": [ 2695 // "name" 2696 // ], 2697 // "parameters": { 2698 // "name": { 2699 // "description": "Required. The name of the feed and it must be in the format of:\nprojects/project_number/feeds/feed_id\nfolders/folder_number/feeds/feed_id\norganizations/organization_number/feeds/feed_id", 2700 // "location": "path", 2701 // "pattern": "^[^/]+/[^/]+/feeds/[^/]+$", 2702 // "required": true, 2703 // "type": "string" 2704 // } 2705 // }, 2706 // "path": "v1/{+name}", 2707 // "response": { 2708 // "$ref": "Empty" 2709 // }, 2710 // "scopes": [ 2711 // "https://www.googleapis.com/auth/cloud-platform" 2712 // ] 2713 // } 2714 2715} 2716 2717// method id "cloudasset.feeds.get": 2718 2719type FeedsGetCall struct { 2720 s *Service 2721 name string 2722 urlParams_ gensupport.URLParams 2723 ifNoneMatch_ string 2724 ctx_ context.Context 2725 header_ http.Header 2726} 2727 2728// Get: Gets details about an asset feed. 2729func (r *FeedsService) Get(name string) *FeedsGetCall { 2730 c := &FeedsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2731 c.name = name 2732 return c 2733} 2734 2735// Fields allows partial responses to be retrieved. See 2736// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2737// for more information. 2738func (c *FeedsGetCall) Fields(s ...googleapi.Field) *FeedsGetCall { 2739 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2740 return c 2741} 2742 2743// IfNoneMatch sets the optional parameter which makes the operation 2744// fail if the object's ETag matches the given value. This is useful for 2745// getting updates only after the object has changed since the last 2746// request. Use googleapi.IsNotModified to check whether the response 2747// error from Do is the result of In-None-Match. 2748func (c *FeedsGetCall) IfNoneMatch(entityTag string) *FeedsGetCall { 2749 c.ifNoneMatch_ = entityTag 2750 return c 2751} 2752 2753// Context sets the context to be used in this call's Do method. Any 2754// pending HTTP request will be aborted if the provided context is 2755// canceled. 2756func (c *FeedsGetCall) Context(ctx context.Context) *FeedsGetCall { 2757 c.ctx_ = ctx 2758 return c 2759} 2760 2761// Header returns an http.Header that can be modified by the caller to 2762// add HTTP headers to the request. 2763func (c *FeedsGetCall) Header() http.Header { 2764 if c.header_ == nil { 2765 c.header_ = make(http.Header) 2766 } 2767 return c.header_ 2768} 2769 2770func (c *FeedsGetCall) doRequest(alt string) (*http.Response, error) { 2771 reqHeaders := make(http.Header) 2772 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") 2773 for k, v := range c.header_ { 2774 reqHeaders[k] = v 2775 } 2776 reqHeaders.Set("User-Agent", c.s.userAgent()) 2777 if c.ifNoneMatch_ != "" { 2778 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2779 } 2780 var body io.Reader = nil 2781 c.urlParams_.Set("alt", alt) 2782 c.urlParams_.Set("prettyPrint", "false") 2783 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 2784 urls += "?" + c.urlParams_.Encode() 2785 req, err := http.NewRequest("GET", urls, body) 2786 if err != nil { 2787 return nil, err 2788 } 2789 req.Header = reqHeaders 2790 googleapi.Expand(req.URL, map[string]string{ 2791 "name": c.name, 2792 }) 2793 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2794} 2795 2796// Do executes the "cloudasset.feeds.get" call. 2797// Exactly one of *Feed or error will be non-nil. Any non-2xx status 2798// code is an error. Response headers are in either 2799// *Feed.ServerResponse.Header or (if a response was returned at all) in 2800// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2801// whether the returned error was because http.StatusNotModified was 2802// returned. 2803func (c *FeedsGetCall) Do(opts ...googleapi.CallOption) (*Feed, error) { 2804 gensupport.SetOptions(c.urlParams_, opts...) 2805 res, err := c.doRequest("json") 2806 if res != nil && res.StatusCode == http.StatusNotModified { 2807 if res.Body != nil { 2808 res.Body.Close() 2809 } 2810 return nil, &googleapi.Error{ 2811 Code: res.StatusCode, 2812 Header: res.Header, 2813 } 2814 } 2815 if err != nil { 2816 return nil, err 2817 } 2818 defer googleapi.CloseBody(res) 2819 if err := googleapi.CheckResponse(res); err != nil { 2820 return nil, err 2821 } 2822 ret := &Feed{ 2823 ServerResponse: googleapi.ServerResponse{ 2824 Header: res.Header, 2825 HTTPStatusCode: res.StatusCode, 2826 }, 2827 } 2828 target := &ret 2829 if err := gensupport.DecodeResponse(target, res); err != nil { 2830 return nil, err 2831 } 2832 return ret, nil 2833 // { 2834 // "description": "Gets details about an asset feed.", 2835 // "flatPath": "v1/{v1Id}/{v1Id1}/feeds/{feedsId}", 2836 // "httpMethod": "GET", 2837 // "id": "cloudasset.feeds.get", 2838 // "parameterOrder": [ 2839 // "name" 2840 // ], 2841 // "parameters": { 2842 // "name": { 2843 // "description": "Required. The name of the Feed and it must be in the format of:\nprojects/project_number/feeds/feed_id\nfolders/folder_number/feeds/feed_id\norganizations/organization_number/feeds/feed_id", 2844 // "location": "path", 2845 // "pattern": "^[^/]+/[^/]+/feeds/[^/]+$", 2846 // "required": true, 2847 // "type": "string" 2848 // } 2849 // }, 2850 // "path": "v1/{+name}", 2851 // "response": { 2852 // "$ref": "Feed" 2853 // }, 2854 // "scopes": [ 2855 // "https://www.googleapis.com/auth/cloud-platform" 2856 // ] 2857 // } 2858 2859} 2860 2861// method id "cloudasset.feeds.list": 2862 2863type FeedsListCall struct { 2864 s *Service 2865 parent string 2866 urlParams_ gensupport.URLParams 2867 ifNoneMatch_ string 2868 ctx_ context.Context 2869 header_ http.Header 2870} 2871 2872// List: Lists all asset feeds in a parent project/folder/organization. 2873func (r *FeedsService) List(parent string) *FeedsListCall { 2874 c := &FeedsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2875 c.parent = parent 2876 return c 2877} 2878 2879// Fields allows partial responses to be retrieved. See 2880// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2881// for more information. 2882func (c *FeedsListCall) Fields(s ...googleapi.Field) *FeedsListCall { 2883 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2884 return c 2885} 2886 2887// IfNoneMatch sets the optional parameter which makes the operation 2888// fail if the object's ETag matches the given value. This is useful for 2889// getting updates only after the object has changed since the last 2890// request. Use googleapi.IsNotModified to check whether the response 2891// error from Do is the result of In-None-Match. 2892func (c *FeedsListCall) IfNoneMatch(entityTag string) *FeedsListCall { 2893 c.ifNoneMatch_ = entityTag 2894 return c 2895} 2896 2897// Context sets the context to be used in this call's Do method. Any 2898// pending HTTP request will be aborted if the provided context is 2899// canceled. 2900func (c *FeedsListCall) Context(ctx context.Context) *FeedsListCall { 2901 c.ctx_ = ctx 2902 return c 2903} 2904 2905// Header returns an http.Header that can be modified by the caller to 2906// add HTTP headers to the request. 2907func (c *FeedsListCall) Header() http.Header { 2908 if c.header_ == nil { 2909 c.header_ = make(http.Header) 2910 } 2911 return c.header_ 2912} 2913 2914func (c *FeedsListCall) doRequest(alt string) (*http.Response, error) { 2915 reqHeaders := make(http.Header) 2916 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") 2917 for k, v := range c.header_ { 2918 reqHeaders[k] = v 2919 } 2920 reqHeaders.Set("User-Agent", c.s.userAgent()) 2921 if c.ifNoneMatch_ != "" { 2922 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2923 } 2924 var body io.Reader = nil 2925 c.urlParams_.Set("alt", alt) 2926 c.urlParams_.Set("prettyPrint", "false") 2927 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/feeds") 2928 urls += "?" + c.urlParams_.Encode() 2929 req, err := http.NewRequest("GET", urls, body) 2930 if err != nil { 2931 return nil, err 2932 } 2933 req.Header = reqHeaders 2934 googleapi.Expand(req.URL, map[string]string{ 2935 "parent": c.parent, 2936 }) 2937 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2938} 2939 2940// Do executes the "cloudasset.feeds.list" call. 2941// Exactly one of *ListFeedsResponse or error will be non-nil. Any 2942// non-2xx status code is an error. Response headers are in either 2943// *ListFeedsResponse.ServerResponse.Header or (if a response was 2944// returned at all) in error.(*googleapi.Error).Header. Use 2945// googleapi.IsNotModified to check whether the returned error was 2946// because http.StatusNotModified was returned. 2947func (c *FeedsListCall) Do(opts ...googleapi.CallOption) (*ListFeedsResponse, error) { 2948 gensupport.SetOptions(c.urlParams_, opts...) 2949 res, err := c.doRequest("json") 2950 if res != nil && res.StatusCode == http.StatusNotModified { 2951 if res.Body != nil { 2952 res.Body.Close() 2953 } 2954 return nil, &googleapi.Error{ 2955 Code: res.StatusCode, 2956 Header: res.Header, 2957 } 2958 } 2959 if err != nil { 2960 return nil, err 2961 } 2962 defer googleapi.CloseBody(res) 2963 if err := googleapi.CheckResponse(res); err != nil { 2964 return nil, err 2965 } 2966 ret := &ListFeedsResponse{ 2967 ServerResponse: googleapi.ServerResponse{ 2968 Header: res.Header, 2969 HTTPStatusCode: res.StatusCode, 2970 }, 2971 } 2972 target := &ret 2973 if err := gensupport.DecodeResponse(target, res); err != nil { 2974 return nil, err 2975 } 2976 return ret, nil 2977 // { 2978 // "description": "Lists all asset feeds in a parent project/folder/organization.", 2979 // "flatPath": "v1/{v1Id}/{v1Id1}/feeds", 2980 // "httpMethod": "GET", 2981 // "id": "cloudasset.feeds.list", 2982 // "parameterOrder": [ 2983 // "parent" 2984 // ], 2985 // "parameters": { 2986 // "parent": { 2987 // "description": "Required. The parent project/folder/organization whose feeds are to be\nlisted. It can only be using project/folder/organization number (such as\n\"folders/12345\")\", or a project ID (such as \"projects/my-project-id\").", 2988 // "location": "path", 2989 // "pattern": "^[^/]+/[^/]+$", 2990 // "required": true, 2991 // "type": "string" 2992 // } 2993 // }, 2994 // "path": "v1/{+parent}/feeds", 2995 // "response": { 2996 // "$ref": "ListFeedsResponse" 2997 // }, 2998 // "scopes": [ 2999 // "https://www.googleapis.com/auth/cloud-platform" 3000 // ] 3001 // } 3002 3003} 3004 3005// method id "cloudasset.feeds.patch": 3006 3007type FeedsPatchCall struct { 3008 s *Service 3009 nameid string 3010 updatefeedrequest *UpdateFeedRequest 3011 urlParams_ gensupport.URLParams 3012 ctx_ context.Context 3013 header_ http.Header 3014} 3015 3016// Patch: Updates an asset feed configuration. 3017func (r *FeedsService) Patch(nameid string, updatefeedrequest *UpdateFeedRequest) *FeedsPatchCall { 3018 c := &FeedsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3019 c.nameid = nameid 3020 c.updatefeedrequest = updatefeedrequest 3021 return c 3022} 3023 3024// Fields allows partial responses to be retrieved. See 3025// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3026// for more information. 3027func (c *FeedsPatchCall) Fields(s ...googleapi.Field) *FeedsPatchCall { 3028 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3029 return c 3030} 3031 3032// Context sets the context to be used in this call's Do method. Any 3033// pending HTTP request will be aborted if the provided context is 3034// canceled. 3035func (c *FeedsPatchCall) Context(ctx context.Context) *FeedsPatchCall { 3036 c.ctx_ = ctx 3037 return c 3038} 3039 3040// Header returns an http.Header that can be modified by the caller to 3041// add HTTP headers to the request. 3042func (c *FeedsPatchCall) Header() http.Header { 3043 if c.header_ == nil { 3044 c.header_ = make(http.Header) 3045 } 3046 return c.header_ 3047} 3048 3049func (c *FeedsPatchCall) doRequest(alt string) (*http.Response, error) { 3050 reqHeaders := make(http.Header) 3051 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") 3052 for k, v := range c.header_ { 3053 reqHeaders[k] = v 3054 } 3055 reqHeaders.Set("User-Agent", c.s.userAgent()) 3056 var body io.Reader = nil 3057 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatefeedrequest) 3058 if err != nil { 3059 return nil, err 3060 } 3061 reqHeaders.Set("Content-Type", "application/json") 3062 c.urlParams_.Set("alt", alt) 3063 c.urlParams_.Set("prettyPrint", "false") 3064 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 3065 urls += "?" + c.urlParams_.Encode() 3066 req, err := http.NewRequest("PATCH", urls, body) 3067 if err != nil { 3068 return nil, err 3069 } 3070 req.Header = reqHeaders 3071 googleapi.Expand(req.URL, map[string]string{ 3072 "name": c.nameid, 3073 }) 3074 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3075} 3076 3077// Do executes the "cloudasset.feeds.patch" call. 3078// Exactly one of *Feed or error will be non-nil. Any non-2xx status 3079// code is an error. Response headers are in either 3080// *Feed.ServerResponse.Header or (if a response was returned at all) in 3081// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3082// whether the returned error was because http.StatusNotModified was 3083// returned. 3084func (c *FeedsPatchCall) Do(opts ...googleapi.CallOption) (*Feed, error) { 3085 gensupport.SetOptions(c.urlParams_, opts...) 3086 res, err := c.doRequest("json") 3087 if res != nil && res.StatusCode == http.StatusNotModified { 3088 if res.Body != nil { 3089 res.Body.Close() 3090 } 3091 return nil, &googleapi.Error{ 3092 Code: res.StatusCode, 3093 Header: res.Header, 3094 } 3095 } 3096 if err != nil { 3097 return nil, err 3098 } 3099 defer googleapi.CloseBody(res) 3100 if err := googleapi.CheckResponse(res); err != nil { 3101 return nil, err 3102 } 3103 ret := &Feed{ 3104 ServerResponse: googleapi.ServerResponse{ 3105 Header: res.Header, 3106 HTTPStatusCode: res.StatusCode, 3107 }, 3108 } 3109 target := &ret 3110 if err := gensupport.DecodeResponse(target, res); err != nil { 3111 return nil, err 3112 } 3113 return ret, nil 3114 // { 3115 // "description": "Updates an asset feed configuration.", 3116 // "flatPath": "v1/{v1Id}/{v1Id1}/feeds/{feedsId}", 3117 // "httpMethod": "PATCH", 3118 // "id": "cloudasset.feeds.patch", 3119 // "parameterOrder": [ 3120 // "name" 3121 // ], 3122 // "parameters": { 3123 // "name": { 3124 // "description": "Required. The format will be\nprojects/{project_number}/feeds/{client-assigned_feed_identifier} or\nfolders/{folder_number}/feeds/{client-assigned_feed_identifier} or\norganizations/{organization_number}/feeds/{client-assigned_feed_identifier}\n\nThe client-assigned feed identifier must be unique within the parent\nproject/folder/organization.", 3125 // "location": "path", 3126 // "pattern": "^[^/]+/[^/]+/feeds/[^/]+$", 3127 // "required": true, 3128 // "type": "string" 3129 // } 3130 // }, 3131 // "path": "v1/{+name}", 3132 // "request": { 3133 // "$ref": "UpdateFeedRequest" 3134 // }, 3135 // "response": { 3136 // "$ref": "Feed" 3137 // }, 3138 // "scopes": [ 3139 // "https://www.googleapis.com/auth/cloud-platform" 3140 // ] 3141 // } 3142 3143} 3144 3145// method id "cloudasset.operations.get": 3146 3147type OperationsGetCall struct { 3148 s *Service 3149 name string 3150 urlParams_ gensupport.URLParams 3151 ifNoneMatch_ string 3152 ctx_ context.Context 3153 header_ http.Header 3154} 3155 3156// Get: Gets the latest state of a long-running operation. Clients can 3157// use this 3158// method to poll the operation result at intervals as recommended by 3159// the API 3160// service. 3161func (r *OperationsService) Get(name string) *OperationsGetCall { 3162 c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3163 c.name = name 3164 return c 3165} 3166 3167// Fields allows partial responses to be retrieved. See 3168// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3169// for more information. 3170func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { 3171 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3172 return c 3173} 3174 3175// IfNoneMatch sets the optional parameter which makes the operation 3176// fail if the object's ETag matches the given value. This is useful for 3177// getting updates only after the object has changed since the last 3178// request. Use googleapi.IsNotModified to check whether the response 3179// error from Do is the result of In-None-Match. 3180func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { 3181 c.ifNoneMatch_ = entityTag 3182 return c 3183} 3184 3185// Context sets the context to be used in this call's Do method. Any 3186// pending HTTP request will be aborted if the provided context is 3187// canceled. 3188func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { 3189 c.ctx_ = ctx 3190 return c 3191} 3192 3193// Header returns an http.Header that can be modified by the caller to 3194// add HTTP headers to the request. 3195func (c *OperationsGetCall) Header() http.Header { 3196 if c.header_ == nil { 3197 c.header_ = make(http.Header) 3198 } 3199 return c.header_ 3200} 3201 3202func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { 3203 reqHeaders := make(http.Header) 3204 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") 3205 for k, v := range c.header_ { 3206 reqHeaders[k] = v 3207 } 3208 reqHeaders.Set("User-Agent", c.s.userAgent()) 3209 if c.ifNoneMatch_ != "" { 3210 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3211 } 3212 var body io.Reader = nil 3213 c.urlParams_.Set("alt", alt) 3214 c.urlParams_.Set("prettyPrint", "false") 3215 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 3216 urls += "?" + c.urlParams_.Encode() 3217 req, err := http.NewRequest("GET", urls, body) 3218 if err != nil { 3219 return nil, err 3220 } 3221 req.Header = reqHeaders 3222 googleapi.Expand(req.URL, map[string]string{ 3223 "name": c.name, 3224 }) 3225 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3226} 3227 3228// Do executes the "cloudasset.operations.get" call. 3229// Exactly one of *Operation or error will be non-nil. Any non-2xx 3230// status code is an error. Response headers are in either 3231// *Operation.ServerResponse.Header or (if a response was returned at 3232// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3233// to check whether the returned error was because 3234// http.StatusNotModified was returned. 3235func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3236 gensupport.SetOptions(c.urlParams_, opts...) 3237 res, err := c.doRequest("json") 3238 if res != nil && res.StatusCode == http.StatusNotModified { 3239 if res.Body != nil { 3240 res.Body.Close() 3241 } 3242 return nil, &googleapi.Error{ 3243 Code: res.StatusCode, 3244 Header: res.Header, 3245 } 3246 } 3247 if err != nil { 3248 return nil, err 3249 } 3250 defer googleapi.CloseBody(res) 3251 if err := googleapi.CheckResponse(res); err != nil { 3252 return nil, err 3253 } 3254 ret := &Operation{ 3255 ServerResponse: googleapi.ServerResponse{ 3256 Header: res.Header, 3257 HTTPStatusCode: res.StatusCode, 3258 }, 3259 } 3260 target := &ret 3261 if err := gensupport.DecodeResponse(target, res); err != nil { 3262 return nil, err 3263 } 3264 return ret, nil 3265 // { 3266 // "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", 3267 // "flatPath": "v1/{v1Id}/{v1Id1}/operations/{operationsId}/{operationsId1}", 3268 // "httpMethod": "GET", 3269 // "id": "cloudasset.operations.get", 3270 // "parameterOrder": [ 3271 // "name" 3272 // ], 3273 // "parameters": { 3274 // "name": { 3275 // "description": "The name of the operation resource.", 3276 // "location": "path", 3277 // "pattern": "^[^/]+/[^/]+/operations/[^/]+/.+$", 3278 // "required": true, 3279 // "type": "string" 3280 // } 3281 // }, 3282 // "path": "v1/{+name}", 3283 // "response": { 3284 // "$ref": "Operation" 3285 // }, 3286 // "scopes": [ 3287 // "https://www.googleapis.com/auth/cloud-platform" 3288 // ] 3289 // } 3290 3291} 3292 3293// method id "cloudasset.batchGetAssetsHistory": 3294 3295type V1BatchGetAssetsHistoryCall struct { 3296 s *Service 3297 parent string 3298 urlParams_ gensupport.URLParams 3299 ifNoneMatch_ string 3300 ctx_ context.Context 3301 header_ http.Header 3302} 3303 3304// BatchGetAssetsHistory: Batch gets the update history of assets that 3305// overlap a time window. 3306// For RESOURCE content, this API outputs history with asset in 3307// both 3308// non-delete or deleted status. 3309// For IAM_POLICY content, this API outputs history when the asset and 3310// its 3311// attached IAM POLICY both exist. This can create gaps in the output 3312// history. 3313// If a specified asset does not exist, this API returns an 3314// INVALID_ARGUMENT 3315// error. 3316func (r *V1Service) BatchGetAssetsHistory(parent string) *V1BatchGetAssetsHistoryCall { 3317 c := &V1BatchGetAssetsHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3318 c.parent = parent 3319 return c 3320} 3321 3322// AssetNames sets the optional parameter "assetNames": A list of the 3323// full names of the assets. For 3324// example: 3325// `//compute.googleapis.com/projects/my_project_123/zones/zone1 3326// /instances/instance1`. 3327// See 3328// [Resource 3329// Names](https://cloud.google.com/apis/design/resource_names#f 3330// ull_resource_name) 3331// and [Resource 3332// Name 3333// Format](https://cloud.google.com/asset-inventory/docs/resource-na 3334// me-format) 3335// for more info. 3336// 3337// The request becomes a no-op if the asset name list is empty, and the 3338// max 3339// size of the asset name list is 100 in one request. 3340func (c *V1BatchGetAssetsHistoryCall) AssetNames(assetNames ...string) *V1BatchGetAssetsHistoryCall { 3341 c.urlParams_.SetMulti("assetNames", append([]string{}, assetNames...)) 3342 return c 3343} 3344 3345// ContentType sets the optional parameter "contentType": The content 3346// type. 3347// 3348// Possible values: 3349// "CONTENT_TYPE_UNSPECIFIED" 3350// "RESOURCE" 3351// "IAM_POLICY" 3352// "ORG_POLICY" 3353// "ACCESS_POLICY" 3354func (c *V1BatchGetAssetsHistoryCall) ContentType(contentType string) *V1BatchGetAssetsHistoryCall { 3355 c.urlParams_.Set("contentType", contentType) 3356 return c 3357} 3358 3359// ReadTimeWindowEndTime sets the optional parameter 3360// "readTimeWindow.endTime": End time of the time window 3361// (inclusive). 3362// Current timestamp if not specified. 3363func (c *V1BatchGetAssetsHistoryCall) ReadTimeWindowEndTime(readTimeWindowEndTime string) *V1BatchGetAssetsHistoryCall { 3364 c.urlParams_.Set("readTimeWindow.endTime", readTimeWindowEndTime) 3365 return c 3366} 3367 3368// ReadTimeWindowStartTime sets the optional parameter 3369// "readTimeWindow.startTime": Start time of the time window 3370// (exclusive). 3371func (c *V1BatchGetAssetsHistoryCall) ReadTimeWindowStartTime(readTimeWindowStartTime string) *V1BatchGetAssetsHistoryCall { 3372 c.urlParams_.Set("readTimeWindow.startTime", readTimeWindowStartTime) 3373 return c 3374} 3375 3376// Fields allows partial responses to be retrieved. See 3377// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3378// for more information. 3379func (c *V1BatchGetAssetsHistoryCall) Fields(s ...googleapi.Field) *V1BatchGetAssetsHistoryCall { 3380 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3381 return c 3382} 3383 3384// IfNoneMatch sets the optional parameter which makes the operation 3385// fail if the object's ETag matches the given value. This is useful for 3386// getting updates only after the object has changed since the last 3387// request. Use googleapi.IsNotModified to check whether the response 3388// error from Do is the result of In-None-Match. 3389func (c *V1BatchGetAssetsHistoryCall) IfNoneMatch(entityTag string) *V1BatchGetAssetsHistoryCall { 3390 c.ifNoneMatch_ = entityTag 3391 return c 3392} 3393 3394// Context sets the context to be used in this call's Do method. Any 3395// pending HTTP request will be aborted if the provided context is 3396// canceled. 3397func (c *V1BatchGetAssetsHistoryCall) Context(ctx context.Context) *V1BatchGetAssetsHistoryCall { 3398 c.ctx_ = ctx 3399 return c 3400} 3401 3402// Header returns an http.Header that can be modified by the caller to 3403// add HTTP headers to the request. 3404func (c *V1BatchGetAssetsHistoryCall) Header() http.Header { 3405 if c.header_ == nil { 3406 c.header_ = make(http.Header) 3407 } 3408 return c.header_ 3409} 3410 3411func (c *V1BatchGetAssetsHistoryCall) doRequest(alt string) (*http.Response, error) { 3412 reqHeaders := make(http.Header) 3413 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") 3414 for k, v := range c.header_ { 3415 reqHeaders[k] = v 3416 } 3417 reqHeaders.Set("User-Agent", c.s.userAgent()) 3418 if c.ifNoneMatch_ != "" { 3419 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3420 } 3421 var body io.Reader = nil 3422 c.urlParams_.Set("alt", alt) 3423 c.urlParams_.Set("prettyPrint", "false") 3424 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:batchGetAssetsHistory") 3425 urls += "?" + c.urlParams_.Encode() 3426 req, err := http.NewRequest("GET", urls, body) 3427 if err != nil { 3428 return nil, err 3429 } 3430 req.Header = reqHeaders 3431 googleapi.Expand(req.URL, map[string]string{ 3432 "parent": c.parent, 3433 }) 3434 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3435} 3436 3437// Do executes the "cloudasset.batchGetAssetsHistory" call. 3438// Exactly one of *BatchGetAssetsHistoryResponse or error will be 3439// non-nil. Any non-2xx status code is an error. Response headers are in 3440// either *BatchGetAssetsHistoryResponse.ServerResponse.Header or (if a 3441// response was returned at all) in error.(*googleapi.Error).Header. Use 3442// googleapi.IsNotModified to check whether the returned error was 3443// because http.StatusNotModified was returned. 3444func (c *V1BatchGetAssetsHistoryCall) Do(opts ...googleapi.CallOption) (*BatchGetAssetsHistoryResponse, error) { 3445 gensupport.SetOptions(c.urlParams_, opts...) 3446 res, err := c.doRequest("json") 3447 if res != nil && res.StatusCode == http.StatusNotModified { 3448 if res.Body != nil { 3449 res.Body.Close() 3450 } 3451 return nil, &googleapi.Error{ 3452 Code: res.StatusCode, 3453 Header: res.Header, 3454 } 3455 } 3456 if err != nil { 3457 return nil, err 3458 } 3459 defer googleapi.CloseBody(res) 3460 if err := googleapi.CheckResponse(res); err != nil { 3461 return nil, err 3462 } 3463 ret := &BatchGetAssetsHistoryResponse{ 3464 ServerResponse: googleapi.ServerResponse{ 3465 Header: res.Header, 3466 HTTPStatusCode: res.StatusCode, 3467 }, 3468 } 3469 target := &ret 3470 if err := gensupport.DecodeResponse(target, res); err != nil { 3471 return nil, err 3472 } 3473 return ret, nil 3474 // { 3475 // "description": "Batch gets the update history of assets that overlap a time window.\nFor RESOURCE content, this API outputs history with asset in both\nnon-delete or deleted status.\nFor IAM_POLICY content, this API outputs history when the asset and its\nattached IAM POLICY both exist. This can create gaps in the output history.\nIf a specified asset does not exist, this API returns an INVALID_ARGUMENT\nerror.", 3476 // "flatPath": "v1/{v1Id}/{v1Id1}:batchGetAssetsHistory", 3477 // "httpMethod": "GET", 3478 // "id": "cloudasset.batchGetAssetsHistory", 3479 // "parameterOrder": [ 3480 // "parent" 3481 // ], 3482 // "parameters": { 3483 // "assetNames": { 3484 // "description": "A list of the full names of the assets. For example:\n`//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.\nSee [Resource\nNames](https://cloud.google.com/apis/design/resource_names#full_resource_name)\nand [Resource Name\nFormat](https://cloud.google.com/asset-inventory/docs/resource-name-format)\nfor more info.\n\nThe request becomes a no-op if the asset name list is empty, and the max\nsize of the asset name list is 100 in one request.", 3485 // "location": "query", 3486 // "repeated": true, 3487 // "type": "string" 3488 // }, 3489 // "contentType": { 3490 // "description": "Optional. The content type.", 3491 // "enum": [ 3492 // "CONTENT_TYPE_UNSPECIFIED", 3493 // "RESOURCE", 3494 // "IAM_POLICY", 3495 // "ORG_POLICY", 3496 // "ACCESS_POLICY" 3497 // ], 3498 // "location": "query", 3499 // "type": "string" 3500 // }, 3501 // "parent": { 3502 // "description": "Required. The relative name of the root asset. It can only be an\norganization number (such as \"organizations/123\"), a project ID (such as\n\"projects/my-project-id\")\", or a project number (such as \"projects/12345\").", 3503 // "location": "path", 3504 // "pattern": "^[^/]+/[^/]+$", 3505 // "required": true, 3506 // "type": "string" 3507 // }, 3508 // "readTimeWindow.endTime": { 3509 // "description": "End time of the time window (inclusive).\nCurrent timestamp if not specified.", 3510 // "format": "google-datetime", 3511 // "location": "query", 3512 // "type": "string" 3513 // }, 3514 // "readTimeWindow.startTime": { 3515 // "description": "Start time of the time window (exclusive).", 3516 // "format": "google-datetime", 3517 // "location": "query", 3518 // "type": "string" 3519 // } 3520 // }, 3521 // "path": "v1/{+parent}:batchGetAssetsHistory", 3522 // "response": { 3523 // "$ref": "BatchGetAssetsHistoryResponse" 3524 // }, 3525 // "scopes": [ 3526 // "https://www.googleapis.com/auth/cloud-platform" 3527 // ] 3528 // } 3529 3530} 3531 3532// method id "cloudasset.exportAssets": 3533 3534type V1ExportAssetsCall struct { 3535 s *Service 3536 parent string 3537 exportassetsrequest *ExportAssetsRequest 3538 urlParams_ gensupport.URLParams 3539 ctx_ context.Context 3540 header_ http.Header 3541} 3542 3543// ExportAssets: Exports assets with time and resource types to a given 3544// Cloud Storage 3545// location. The output format is newline-delimited JSON. 3546// This API implements the google.longrunning.Operation API allowing 3547// you 3548// to keep track of the export. 3549func (r *V1Service) ExportAssets(parent string, exportassetsrequest *ExportAssetsRequest) *V1ExportAssetsCall { 3550 c := &V1ExportAssetsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3551 c.parent = parent 3552 c.exportassetsrequest = exportassetsrequest 3553 return c 3554} 3555 3556// Fields allows partial responses to be retrieved. See 3557// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3558// for more information. 3559func (c *V1ExportAssetsCall) Fields(s ...googleapi.Field) *V1ExportAssetsCall { 3560 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3561 return c 3562} 3563 3564// Context sets the context to be used in this call's Do method. Any 3565// pending HTTP request will be aborted if the provided context is 3566// canceled. 3567func (c *V1ExportAssetsCall) Context(ctx context.Context) *V1ExportAssetsCall { 3568 c.ctx_ = ctx 3569 return c 3570} 3571 3572// Header returns an http.Header that can be modified by the caller to 3573// add HTTP headers to the request. 3574func (c *V1ExportAssetsCall) Header() http.Header { 3575 if c.header_ == nil { 3576 c.header_ = make(http.Header) 3577 } 3578 return c.header_ 3579} 3580 3581func (c *V1ExportAssetsCall) doRequest(alt string) (*http.Response, error) { 3582 reqHeaders := make(http.Header) 3583 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") 3584 for k, v := range c.header_ { 3585 reqHeaders[k] = v 3586 } 3587 reqHeaders.Set("User-Agent", c.s.userAgent()) 3588 var body io.Reader = nil 3589 body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportassetsrequest) 3590 if err != nil { 3591 return nil, err 3592 } 3593 reqHeaders.Set("Content-Type", "application/json") 3594 c.urlParams_.Set("alt", alt) 3595 c.urlParams_.Set("prettyPrint", "false") 3596 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:exportAssets") 3597 urls += "?" + c.urlParams_.Encode() 3598 req, err := http.NewRequest("POST", urls, body) 3599 if err != nil { 3600 return nil, err 3601 } 3602 req.Header = reqHeaders 3603 googleapi.Expand(req.URL, map[string]string{ 3604 "parent": c.parent, 3605 }) 3606 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3607} 3608 3609// Do executes the "cloudasset.exportAssets" call. 3610// Exactly one of *Operation or error will be non-nil. Any non-2xx 3611// status code is an error. Response headers are in either 3612// *Operation.ServerResponse.Header or (if a response was returned at 3613// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3614// to check whether the returned error was because 3615// http.StatusNotModified was returned. 3616func (c *V1ExportAssetsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3617 gensupport.SetOptions(c.urlParams_, opts...) 3618 res, err := c.doRequest("json") 3619 if res != nil && res.StatusCode == http.StatusNotModified { 3620 if res.Body != nil { 3621 res.Body.Close() 3622 } 3623 return nil, &googleapi.Error{ 3624 Code: res.StatusCode, 3625 Header: res.Header, 3626 } 3627 } 3628 if err != nil { 3629 return nil, err 3630 } 3631 defer googleapi.CloseBody(res) 3632 if err := googleapi.CheckResponse(res); err != nil { 3633 return nil, err 3634 } 3635 ret := &Operation{ 3636 ServerResponse: googleapi.ServerResponse{ 3637 Header: res.Header, 3638 HTTPStatusCode: res.StatusCode, 3639 }, 3640 } 3641 target := &ret 3642 if err := gensupport.DecodeResponse(target, res); err != nil { 3643 return nil, err 3644 } 3645 return ret, nil 3646 // { 3647 // "description": "Exports assets with time and resource types to a given Cloud Storage\nlocation. The output format is newline-delimited JSON.\nThis API implements the google.longrunning.Operation API allowing you\nto keep track of the export.", 3648 // "flatPath": "v1/{v1Id}/{v1Id1}:exportAssets", 3649 // "httpMethod": "POST", 3650 // "id": "cloudasset.exportAssets", 3651 // "parameterOrder": [ 3652 // "parent" 3653 // ], 3654 // "parameters": { 3655 // "parent": { 3656 // "description": "Required. The relative name of the root asset. This can only be an\norganization number (such as \"organizations/123\"), a project ID (such as\n\"projects/my-project-id\"), or a project number (such as \"projects/12345\"),\nor a folder number (such as \"folders/123\").", 3657 // "location": "path", 3658 // "pattern": "^[^/]+/[^/]+$", 3659 // "required": true, 3660 // "type": "string" 3661 // } 3662 // }, 3663 // "path": "v1/{+parent}:exportAssets", 3664 // "request": { 3665 // "$ref": "ExportAssetsRequest" 3666 // }, 3667 // "response": { 3668 // "$ref": "Operation" 3669 // }, 3670 // "scopes": [ 3671 // "https://www.googleapis.com/auth/cloud-platform" 3672 // ] 3673 // } 3674 3675} 3676