1// Copyright 2020 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 deploymentmanager provides access to the Google Cloud Deployment Manager API V2Beta Methods. 8// 9// For product documentation, see: https://developers.google.com/deployment-manager/ 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/deploymentmanager/v2beta" 16// ... 17// ctx := context.Background() 18// deploymentmanagerService, err := deploymentmanager.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// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: 27// 28// deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithScopes(deploymentmanager.NdevCloudmanReadonlyScope)) 29// 30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 31// 32// deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithAPIKey("AIza...")) 33// 34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 35// 36// config := &oauth2.Config{...} 37// // ... 38// token, err := config.Exchange(ctx, ...) 39// deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 40// 41// See https://godoc.org/google.golang.org/api/option/ for details on options. 42package deploymentmanager // import "google.golang.org/api/deploymentmanager/v2beta" 43 44import ( 45 "bytes" 46 "context" 47 "encoding/json" 48 "errors" 49 "fmt" 50 "io" 51 "net/http" 52 "net/url" 53 "strconv" 54 "strings" 55 56 googleapi "google.golang.org/api/googleapi" 57 gensupport "google.golang.org/api/internal/gensupport" 58 option "google.golang.org/api/option" 59 internaloption "google.golang.org/api/option/internaloption" 60 htransport "google.golang.org/api/transport/http" 61) 62 63// Always reference these packages, just in case the auto-generated code 64// below doesn't. 65var _ = bytes.NewBuffer 66var _ = strconv.Itoa 67var _ = fmt.Sprintf 68var _ = json.NewDecoder 69var _ = io.Copy 70var _ = url.Parse 71var _ = gensupport.MarshalJSON 72var _ = googleapi.Version 73var _ = errors.New 74var _ = strings.Replace 75var _ = context.Canceled 76var _ = internaloption.WithDefaultEndpoint 77 78const apiId = "deploymentmanager:v2beta" 79const apiName = "deploymentmanager" 80const apiVersion = "v2beta" 81const basePath = "https://www.googleapis.com/deploymentmanager/v2beta/projects/" 82 83// OAuth2 scopes used by this API. 84const ( 85 // View and manage your data across Google Cloud Platform services 86 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 87 88 // View your data across Google Cloud Platform services 89 CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" 90 91 // View and manage your Google Cloud Platform management resources and 92 // deployment status information 93 NdevCloudmanScope = "https://www.googleapis.com/auth/ndev.cloudman" 94 95 // View your Google Cloud Platform management resources and deployment 96 // status information 97 NdevCloudmanReadonlyScope = "https://www.googleapis.com/auth/ndev.cloudman.readonly" 98) 99 100// NewService creates a new Service. 101func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 102 scopesOption := option.WithScopes( 103 "https://www.googleapis.com/auth/cloud-platform", 104 "https://www.googleapis.com/auth/cloud-platform.read-only", 105 "https://www.googleapis.com/auth/ndev.cloudman", 106 "https://www.googleapis.com/auth/ndev.cloudman.readonly", 107 ) 108 // NOTE: prepend, so we don't override user-specified scopes. 109 opts = append([]option.ClientOption{scopesOption}, opts...) 110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 111 client, endpoint, err := htransport.NewClient(ctx, opts...) 112 if err != nil { 113 return nil, err 114 } 115 s, err := New(client) 116 if err != nil { 117 return nil, err 118 } 119 if endpoint != "" { 120 s.BasePath = endpoint 121 } 122 return s, nil 123} 124 125// New creates a new Service. It uses the provided http.Client for requests. 126// 127// Deprecated: please use NewService instead. 128// To provide a custom HTTP client, use option.WithHTTPClient. 129// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 130func New(client *http.Client) (*Service, error) { 131 if client == nil { 132 return nil, errors.New("client is nil") 133 } 134 s := &Service{client: client, BasePath: basePath} 135 s.CompositeTypes = NewCompositeTypesService(s) 136 s.Deployments = NewDeploymentsService(s) 137 s.Manifests = NewManifestsService(s) 138 s.Operations = NewOperationsService(s) 139 s.Resources = NewResourcesService(s) 140 s.TypeProviders = NewTypeProvidersService(s) 141 s.Types = NewTypesService(s) 142 return s, nil 143} 144 145type Service struct { 146 client *http.Client 147 BasePath string // API endpoint base URL 148 UserAgent string // optional additional User-Agent fragment 149 150 CompositeTypes *CompositeTypesService 151 152 Deployments *DeploymentsService 153 154 Manifests *ManifestsService 155 156 Operations *OperationsService 157 158 Resources *ResourcesService 159 160 TypeProviders *TypeProvidersService 161 162 Types *TypesService 163} 164 165func (s *Service) userAgent() string { 166 if s.UserAgent == "" { 167 return googleapi.UserAgent 168 } 169 return googleapi.UserAgent + " " + s.UserAgent 170} 171 172func NewCompositeTypesService(s *Service) *CompositeTypesService { 173 rs := &CompositeTypesService{s: s} 174 return rs 175} 176 177type CompositeTypesService struct { 178 s *Service 179} 180 181func NewDeploymentsService(s *Service) *DeploymentsService { 182 rs := &DeploymentsService{s: s} 183 return rs 184} 185 186type DeploymentsService struct { 187 s *Service 188} 189 190func NewManifestsService(s *Service) *ManifestsService { 191 rs := &ManifestsService{s: s} 192 return rs 193} 194 195type ManifestsService struct { 196 s *Service 197} 198 199func NewOperationsService(s *Service) *OperationsService { 200 rs := &OperationsService{s: s} 201 return rs 202} 203 204type OperationsService struct { 205 s *Service 206} 207 208func NewResourcesService(s *Service) *ResourcesService { 209 rs := &ResourcesService{s: s} 210 return rs 211} 212 213type ResourcesService struct { 214 s *Service 215} 216 217func NewTypeProvidersService(s *Service) *TypeProvidersService { 218 rs := &TypeProvidersService{s: s} 219 return rs 220} 221 222type TypeProvidersService struct { 223 s *Service 224} 225 226func NewTypesService(s *Service) *TypesService { 227 rs := &TypesService{s: s} 228 return rs 229} 230 231type TypesService struct { 232 s *Service 233} 234 235// AsyncOptions: Async options that determine when a resource should 236// finish. 237type AsyncOptions struct { 238 // MethodMatch: Method regex where this policy will apply. 239 MethodMatch string `json:"methodMatch,omitempty"` 240 241 // PollingOptions: Deployment manager will poll instances for this API 242 // resource setting a RUNNING state, and blocking until polling 243 // conditions tell whether the resource is completed or failed. 244 PollingOptions *PollingOptions `json:"pollingOptions,omitempty"` 245 246 // ForceSendFields is a list of field names (e.g. "MethodMatch") to 247 // unconditionally include in API requests. By default, fields with 248 // empty values are omitted from API requests. However, any non-pointer, 249 // non-interface field appearing in ForceSendFields will be sent to the 250 // server regardless of whether the field is empty or not. This may be 251 // used to include empty fields in Patch requests. 252 ForceSendFields []string `json:"-"` 253 254 // NullFields is a list of field names (e.g. "MethodMatch") to include 255 // in API requests with the JSON null value. By default, fields with 256 // empty values are omitted from API requests. However, any field with 257 // an empty value appearing in NullFields will be sent to the server as 258 // null. It is an error if a field in this list has a non-empty value. 259 // This may be used to include null fields in Patch requests. 260 NullFields []string `json:"-"` 261} 262 263func (s *AsyncOptions) MarshalJSON() ([]byte, error) { 264 type NoMethod AsyncOptions 265 raw := NoMethod(*s) 266 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 267} 268 269// AuditConfig: Specifies the audit configuration for a service. The 270// configuration determines which permission types are logged, and what 271// identities, if any, are exempted from logging. An AuditConfig must 272// have one or more AuditLogConfigs. 273// 274// If there are AuditConfigs for both `allServices` and a specific 275// service, the union of the two AuditConfigs is used for that service: 276// the log_types specified in each AuditConfig are enabled, and the 277// exempted_members in each AuditLogConfig are exempted. 278// 279// Example Policy with multiple AuditConfigs: 280// 281// { "audit_configs": [ { "service": "allServices" "audit_log_configs": 282// [ { "log_type": "DATA_READ", "exempted_members": [ 283// "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { 284// "log_type": "ADMIN_READ", } ] }, { "service": 285// "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": 286// "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ 287// "user:bar@gmail.com" ] } ] } ] } 288// 289// For fooservice, this policy enables DATA_READ, DATA_WRITE and 290// ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ 291// logging, and bar@gmail.com from DATA_WRITE logging. 292type AuditConfig struct { 293 // AuditLogConfigs: The configuration for logging of each type of 294 // permission. 295 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` 296 297 ExemptedMembers []string `json:"exemptedMembers,omitempty"` 298 299 // Service: Specifies a service that will be enabled for audit logging. 300 // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. 301 // `allServices` is a special value that covers all services. 302 Service string `json:"service,omitempty"` 303 304 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to 305 // unconditionally include in API requests. By default, fields with 306 // empty values are omitted from API requests. However, any non-pointer, 307 // non-interface field appearing in ForceSendFields will be sent to the 308 // server regardless of whether the field is empty or not. This may be 309 // used to include empty fields in Patch requests. 310 ForceSendFields []string `json:"-"` 311 312 // NullFields is a list of field names (e.g. "AuditLogConfigs") to 313 // include in API requests with the JSON null value. By default, fields 314 // with empty values are omitted from API requests. However, any field 315 // with an empty value appearing in NullFields will be sent to the 316 // server as null. It is an error if a field in this list has a 317 // non-empty value. This may be used to include null fields in Patch 318 // requests. 319 NullFields []string `json:"-"` 320} 321 322func (s *AuditConfig) MarshalJSON() ([]byte, error) { 323 type NoMethod AuditConfig 324 raw := NoMethod(*s) 325 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 326} 327 328// AuditLogConfig: Provides the configuration for logging a type of 329// permissions. Example: 330// 331// { "audit_log_configs": [ { "log_type": "DATA_READ", 332// "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": 333// "DATA_WRITE", } ] } 334// 335// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting 336// foo@gmail.com from DATA_READ logging. 337type AuditLogConfig struct { 338 // ExemptedMembers: Specifies the identities that do not cause logging 339 // for this type of permission. Follows the same format of 340 // [Binding.members][]. 341 ExemptedMembers []string `json:"exemptedMembers,omitempty"` 342 343 // LogType: The log type that this config enables. 344 LogType string `json:"logType,omitempty"` 345 346 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to 347 // unconditionally include in API requests. By default, fields with 348 // empty values are omitted from API requests. However, any non-pointer, 349 // non-interface field appearing in ForceSendFields will be sent to the 350 // server regardless of whether the field is empty or not. This may be 351 // used to include empty fields in Patch requests. 352 ForceSendFields []string `json:"-"` 353 354 // NullFields is a list of field names (e.g. "ExemptedMembers") to 355 // include in API requests with the JSON null value. By default, fields 356 // with empty values are omitted from API requests. However, any field 357 // with an empty value appearing in NullFields will be sent to the 358 // server as null. It is an error if a field in this list has a 359 // non-empty value. This may be used to include null fields in Patch 360 // requests. 361 NullFields []string `json:"-"` 362} 363 364func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { 365 type NoMethod AuditLogConfig 366 raw := NoMethod(*s) 367 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 368} 369 370// AuthorizationLoggingOptions: Authorization-related information used 371// by Cloud Audit Logging. 372type AuthorizationLoggingOptions struct { 373 // PermissionType: The type of the permission that was checked. 374 PermissionType string `json:"permissionType,omitempty"` 375 376 // ForceSendFields is a list of field names (e.g. "PermissionType") to 377 // unconditionally include in API requests. By default, fields with 378 // empty values are omitted from API requests. However, any non-pointer, 379 // non-interface field appearing in ForceSendFields will be sent to the 380 // server regardless of whether the field is empty or not. This may be 381 // used to include empty fields in Patch requests. 382 ForceSendFields []string `json:"-"` 383 384 // NullFields is a list of field names (e.g. "PermissionType") to 385 // include in API requests with the JSON null value. By default, fields 386 // with empty values are omitted from API requests. However, any field 387 // with an empty value appearing in NullFields will be sent to the 388 // server as null. It is an error if a field in this list has a 389 // non-empty value. This may be used to include null fields in Patch 390 // requests. 391 NullFields []string `json:"-"` 392} 393 394func (s *AuthorizationLoggingOptions) MarshalJSON() ([]byte, error) { 395 type NoMethod AuthorizationLoggingOptions 396 raw := NoMethod(*s) 397 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 398} 399 400// BaseType: BaseType that describes a service-backed Type. 401type BaseType struct { 402 // CollectionOverrides: Allows resource handling overrides for specific 403 // collections 404 CollectionOverrides []*CollectionOverride `json:"collectionOverrides,omitempty"` 405 406 // Credential: Credential used when interacting with this type. 407 Credential *Credential `json:"credential,omitempty"` 408 409 // DescriptorUrl: Descriptor Url for the this type. 410 DescriptorUrl string `json:"descriptorUrl,omitempty"` 411 412 // Options: Options to apply when handling any resources in this 413 // service. 414 Options *Options `json:"options,omitempty"` 415 416 // ForceSendFields is a list of field names (e.g. "CollectionOverrides") 417 // to unconditionally include in API requests. By default, fields with 418 // empty values are omitted from API requests. However, any non-pointer, 419 // non-interface field appearing in ForceSendFields will be sent to the 420 // server regardless of whether the field is empty or not. This may be 421 // used to include empty fields in Patch requests. 422 ForceSendFields []string `json:"-"` 423 424 // NullFields is a list of field names (e.g. "CollectionOverrides") to 425 // include in API requests with the JSON null value. By default, fields 426 // with empty values are omitted from API requests. However, any field 427 // with an empty value appearing in NullFields will be sent to the 428 // server as null. It is an error if a field in this list has a 429 // non-empty value. This may be used to include null fields in Patch 430 // requests. 431 NullFields []string `json:"-"` 432} 433 434func (s *BaseType) MarshalJSON() ([]byte, error) { 435 type NoMethod BaseType 436 raw := NoMethod(*s) 437 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 438} 439 440// BasicAuth: Basic Auth used as a credential. 441type BasicAuth struct { 442 Password string `json:"password,omitempty"` 443 444 User string `json:"user,omitempty"` 445 446 // ForceSendFields is a list of field names (e.g. "Password") to 447 // unconditionally include in API requests. By default, fields with 448 // empty values are omitted from API requests. However, any non-pointer, 449 // non-interface field appearing in ForceSendFields will be sent to the 450 // server regardless of whether the field is empty or not. This may be 451 // used to include empty fields in Patch requests. 452 ForceSendFields []string `json:"-"` 453 454 // NullFields is a list of field names (e.g. "Password") to include in 455 // API requests with the JSON null value. By default, fields with empty 456 // values are omitted from API requests. However, any field with an 457 // empty value appearing in NullFields will be sent to the server as 458 // null. It is an error if a field in this list has a non-empty value. 459 // This may be used to include null fields in Patch requests. 460 NullFields []string `json:"-"` 461} 462 463func (s *BasicAuth) MarshalJSON() ([]byte, error) { 464 type NoMethod BasicAuth 465 raw := NoMethod(*s) 466 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 467} 468 469// Binding: Associates `members` with a `role`. 470type Binding struct { 471 // Condition: Unimplemented. The condition that is associated with this 472 // binding. NOTE: an unsatisfied condition will not allow user access 473 // via current binding. Different bindings, including their conditions, 474 // are examined independently. 475 Condition *Expr `json:"condition,omitempty"` 476 477 // Members: Specifies the identities requesting access for a Cloud 478 // Platform resource. `members` can have the following values: 479 // 480 // * `allUsers`: A special identifier that represents anyone who is on 481 // the internet; with or without a Google account. 482 // 483 // * `allAuthenticatedUsers`: A special identifier that represents 484 // anyone who is authenticated with a Google account or a service 485 // account. 486 // 487 // * `user:{emailid}`: An email address that represents a specific 488 // Google account. For example, `alice@gmail.com` . 489 // 490 // 491 // 492 // * `serviceAccount:{emailid}`: An email address that represents a 493 // service account. For example, 494 // `my-other-app@appspot.gserviceaccount.com`. 495 // 496 // * `group:{emailid}`: An email address that represents a Google group. 497 // For example, `admins@example.com`. 498 // 499 // 500 // 501 // * `domain:{domain}`: A Google Apps domain name that represents all 502 // the users of that domain. For example, `google.com` or `example.com`. 503 Members []string `json:"members,omitempty"` 504 505 // Role: Role that is assigned to `members`. For example, 506 // `roles/viewer`, `roles/editor`, or `roles/owner`. 507 Role string `json:"role,omitempty"` 508 509 // ForceSendFields is a list of field names (e.g. "Condition") to 510 // unconditionally include in API requests. By default, fields with 511 // empty values are omitted from API requests. However, any non-pointer, 512 // non-interface field appearing in ForceSendFields will be sent to the 513 // server regardless of whether the field is empty or not. This may be 514 // used to include empty fields in Patch requests. 515 ForceSendFields []string `json:"-"` 516 517 // NullFields is a list of field names (e.g. "Condition") to include in 518 // API requests with the JSON null value. By default, fields with empty 519 // values are omitted from API requests. However, any field with an 520 // empty value appearing in NullFields will be sent to the server as 521 // null. It is an error if a field in this list has a non-empty value. 522 // This may be used to include null fields in Patch requests. 523 NullFields []string `json:"-"` 524} 525 526func (s *Binding) MarshalJSON() ([]byte, error) { 527 type NoMethod Binding 528 raw := NoMethod(*s) 529 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 530} 531 532// CollectionOverride: CollectionOverride allows resource handling 533// overrides for specific resources within a BaseType 534type CollectionOverride struct { 535 // Collection: The collection that identifies this resource within its 536 // service. 537 Collection string `json:"collection,omitempty"` 538 539 // Options: The options to apply to this resource-level override 540 Options *Options `json:"options,omitempty"` 541 542 // ForceSendFields is a list of field names (e.g. "Collection") to 543 // unconditionally include in API requests. By default, fields with 544 // empty values are omitted from API requests. However, any non-pointer, 545 // non-interface field appearing in ForceSendFields will be sent to the 546 // server regardless of whether the field is empty or not. This may be 547 // used to include empty fields in Patch requests. 548 ForceSendFields []string `json:"-"` 549 550 // NullFields is a list of field names (e.g. "Collection") to include in 551 // API requests with the JSON null value. By default, fields with empty 552 // values are omitted from API requests. However, any field with an 553 // empty value appearing in NullFields will be sent to the server as 554 // null. It is an error if a field in this list has a non-empty value. 555 // This may be used to include null fields in Patch requests. 556 NullFields []string `json:"-"` 557} 558 559func (s *CollectionOverride) MarshalJSON() ([]byte, error) { 560 type NoMethod CollectionOverride 561 raw := NoMethod(*s) 562 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 563} 564 565// CompositeType: Holds the composite type. 566type CompositeType struct { 567 // Description: An optional textual description of the resource; 568 // provided by the client when the resource is created. 569 Description string `json:"description,omitempty"` 570 571 Id uint64 `json:"id,omitempty,string"` 572 573 // InsertTime: Output only. Creation timestamp in RFC3339 text format. 574 InsertTime string `json:"insertTime,omitempty"` 575 576 // Labels: Map of labels; provided by the client when the resource is 577 // created or updated. Specifically: Label keys must be between 1 and 63 578 // characters long and must conform to the following regular expression: 579 // [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63 580 // characters long and must conform to the regular expression 581 // ([a-z]([-a-z0-9]*[a-z0-9])?)? 582 Labels []*CompositeTypeLabelEntry `json:"labels,omitempty"` 583 584 // Name: Name of the composite type, must follow the expression: 585 // [a-z]([-a-z0-9_.]{0,61}[a-z0-9])?. 586 Name string `json:"name,omitempty"` 587 588 // Operation: Output only. The Operation that most recently ran, or is 589 // currently running, on this composite type. 590 Operation *Operation `json:"operation,omitempty"` 591 592 // SelfLink: Output only. Server defined URL for the resource. 593 SelfLink string `json:"selfLink,omitempty"` 594 595 Status string `json:"status,omitempty"` 596 597 // TemplateContents: Files for the template type. 598 TemplateContents *TemplateContents `json:"templateContents,omitempty"` 599 600 // ServerResponse contains the HTTP response code and headers from the 601 // server. 602 googleapi.ServerResponse `json:"-"` 603 604 // ForceSendFields is a list of field names (e.g. "Description") to 605 // unconditionally include in API requests. By default, fields with 606 // empty values are omitted from API requests. However, any non-pointer, 607 // non-interface field appearing in ForceSendFields will be sent to the 608 // server regardless of whether the field is empty or not. This may be 609 // used to include empty fields in Patch requests. 610 ForceSendFields []string `json:"-"` 611 612 // NullFields is a list of field names (e.g. "Description") to include 613 // in API requests with the JSON null value. By default, fields with 614 // empty values are omitted from API requests. However, any field with 615 // an empty value appearing in NullFields will be sent to the server as 616 // null. It is an error if a field in this list has a non-empty value. 617 // This may be used to include null fields in Patch requests. 618 NullFields []string `json:"-"` 619} 620 621func (s *CompositeType) MarshalJSON() ([]byte, error) { 622 type NoMethod CompositeType 623 raw := NoMethod(*s) 624 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 625} 626 627type CompositeTypeLabelEntry struct { 628 Key string `json:"key,omitempty"` 629 630 Value string `json:"value,omitempty"` 631 632 // ForceSendFields is a list of field names (e.g. "Key") to 633 // unconditionally include in API requests. By default, fields with 634 // empty values are omitted from API requests. However, any non-pointer, 635 // non-interface field appearing in ForceSendFields will be sent to the 636 // server regardless of whether the field is empty or not. This may be 637 // used to include empty fields in Patch requests. 638 ForceSendFields []string `json:"-"` 639 640 // NullFields is a list of field names (e.g. "Key") to include in API 641 // requests with the JSON null value. By default, fields with empty 642 // values are omitted from API requests. However, any field with an 643 // empty value appearing in NullFields will be sent to the server as 644 // null. It is an error if a field in this list has a non-empty value. 645 // This may be used to include null fields in Patch requests. 646 NullFields []string `json:"-"` 647} 648 649func (s *CompositeTypeLabelEntry) MarshalJSON() ([]byte, error) { 650 type NoMethod CompositeTypeLabelEntry 651 raw := NoMethod(*s) 652 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 653} 654 655// CompositeTypesListResponse: A response that returns all Composite 656// Types supported by Deployment Manager 657type CompositeTypesListResponse struct { 658 // CompositeTypes: Output only. A list of resource composite types 659 // supported by Deployment Manager. 660 CompositeTypes []*CompositeType `json:"compositeTypes,omitempty"` 661 662 // NextPageToken: A token used to continue a truncated list request. 663 NextPageToken string `json:"nextPageToken,omitempty"` 664 665 // ServerResponse contains the HTTP response code and headers from the 666 // server. 667 googleapi.ServerResponse `json:"-"` 668 669 // ForceSendFields is a list of field names (e.g. "CompositeTypes") to 670 // unconditionally include in API requests. By default, fields with 671 // empty values are omitted from API requests. However, any non-pointer, 672 // non-interface field appearing in ForceSendFields will be sent to the 673 // server regardless of whether the field is empty or not. This may be 674 // used to include empty fields in Patch requests. 675 ForceSendFields []string `json:"-"` 676 677 // NullFields is a list of field names (e.g. "CompositeTypes") to 678 // include in API requests with the JSON null value. By default, fields 679 // with empty values are omitted from API requests. However, any field 680 // with an empty value appearing in NullFields will be sent to the 681 // server as null. It is an error if a field in this list has a 682 // non-empty value. This may be used to include null fields in Patch 683 // requests. 684 NullFields []string `json:"-"` 685} 686 687func (s *CompositeTypesListResponse) MarshalJSON() ([]byte, error) { 688 type NoMethod CompositeTypesListResponse 689 raw := NoMethod(*s) 690 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 691} 692 693// Condition: A condition to be met. 694type Condition struct { 695 // Iam: Trusted attributes supplied by the IAM system. 696 Iam string `json:"iam,omitempty"` 697 698 // Op: An operator to apply the subject with. 699 Op string `json:"op,omitempty"` 700 701 // Svc: Trusted attributes discharged by the service. 702 Svc string `json:"svc,omitempty"` 703 704 // Sys: Trusted attributes supplied by any service that owns resources 705 // and uses the IAM system for access control. 706 Sys string `json:"sys,omitempty"` 707 708 // Value: DEPRECATED. Use 'values' instead. 709 Value string `json:"value,omitempty"` 710 711 // Values: The objects of the condition. This is mutually exclusive with 712 // 'value'. 713 Values []string `json:"values,omitempty"` 714 715 // ForceSendFields is a list of field names (e.g. "Iam") to 716 // unconditionally include in API requests. By default, fields with 717 // empty values are omitted from API requests. However, any non-pointer, 718 // non-interface field appearing in ForceSendFields will be sent to the 719 // server regardless of whether the field is empty or not. This may be 720 // used to include empty fields in Patch requests. 721 ForceSendFields []string `json:"-"` 722 723 // NullFields is a list of field names (e.g. "Iam") to include in API 724 // requests with the JSON null value. By default, fields with empty 725 // values are omitted from API requests. However, any field with an 726 // empty value appearing in NullFields will be sent to the server as 727 // null. It is an error if a field in this list has a non-empty value. 728 // This may be used to include null fields in Patch requests. 729 NullFields []string `json:"-"` 730} 731 732func (s *Condition) MarshalJSON() ([]byte, error) { 733 type NoMethod Condition 734 raw := NoMethod(*s) 735 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 736} 737 738type ConfigFile struct { 739 // Content: The contents of the file. 740 Content string `json:"content,omitempty"` 741 742 // ForceSendFields is a list of field names (e.g. "Content") to 743 // unconditionally include in API requests. By default, fields with 744 // empty values are omitted from API requests. However, any non-pointer, 745 // non-interface field appearing in ForceSendFields will be sent to the 746 // server regardless of whether the field is empty or not. This may be 747 // used to include empty fields in Patch requests. 748 ForceSendFields []string `json:"-"` 749 750 // NullFields is a list of field names (e.g. "Content") to include in 751 // API requests with the JSON null value. By default, fields with empty 752 // values are omitted from API requests. However, any field with an 753 // empty value appearing in NullFields will be sent to the server as 754 // null. It is an error if a field in this list has a non-empty value. 755 // This may be used to include null fields in Patch requests. 756 NullFields []string `json:"-"` 757} 758 759func (s *ConfigFile) MarshalJSON() ([]byte, error) { 760 type NoMethod ConfigFile 761 raw := NoMethod(*s) 762 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 763} 764 765// Credential: The credential used by Deployment Manager and 766// TypeProvider. Only one of the options is permitted. 767type Credential struct { 768 // BasicAuth: Basic Auth Credential, only used by TypeProvider. 769 BasicAuth *BasicAuth `json:"basicAuth,omitempty"` 770 771 // ServiceAccount: Service Account Credential, only used by Deployment. 772 ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"` 773 774 // UseProjectDefault: Specify to use the project default credential, 775 // only supported by Deployment. 776 UseProjectDefault bool `json:"useProjectDefault,omitempty"` 777 778 // ForceSendFields is a list of field names (e.g. "BasicAuth") to 779 // unconditionally include in API requests. By default, fields with 780 // empty values are omitted from API requests. However, any non-pointer, 781 // non-interface field appearing in ForceSendFields will be sent to the 782 // server regardless of whether the field is empty or not. This may be 783 // used to include empty fields in Patch requests. 784 ForceSendFields []string `json:"-"` 785 786 // NullFields is a list of field names (e.g. "BasicAuth") to include in 787 // API requests with the JSON null value. By default, fields with empty 788 // values are omitted from API requests. However, any field with an 789 // empty value appearing in NullFields will be sent to the server as 790 // null. It is an error if a field in this list has a non-empty value. 791 // This may be used to include null fields in Patch requests. 792 NullFields []string `json:"-"` 793} 794 795func (s *Credential) MarshalJSON() ([]byte, error) { 796 type NoMethod Credential 797 raw := NoMethod(*s) 798 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 799} 800 801type Deployment struct { 802 // Description: An optional user-provided description of the deployment. 803 Description string `json:"description,omitempty"` 804 805 // Fingerprint: Provides a fingerprint to use in requests to modify a 806 // deployment, such as update(), stop(), and cancelPreview() requests. A 807 // fingerprint is a randomly generated value that must be provided with 808 // update(), stop(), and cancelPreview() requests to perform optimistic 809 // locking. This ensures optimistic concurrency so that only one request 810 // happens at a time. 811 // 812 // The fingerprint is initially generated by Deployment Manager and 813 // changes after every request to modify data. To get the latest 814 // fingerprint value, perform a get() request to a deployment. 815 Fingerprint string `json:"fingerprint,omitempty"` 816 817 Id uint64 `json:"id,omitempty,string"` 818 819 // InsertTime: Output only. Creation timestamp in RFC3339 text format. 820 InsertTime string `json:"insertTime,omitempty"` 821 822 // Labels: Map of labels; provided by the client when the resource is 823 // created or updated. Specifically: Label keys must be between 1 and 63 824 // characters long and must conform to the following regular expression: 825 // [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63 826 // characters long and must conform to the regular expression 827 // ([a-z]([-a-z0-9]*[a-z0-9])?)? 828 Labels []*DeploymentLabelEntry `json:"labels,omitempty"` 829 830 // Manifest: Output only. URL of the manifest representing the last 831 // manifest that was successfully deployed. 832 Manifest string `json:"manifest,omitempty"` 833 834 // Name: Name of the resource; provided by the client when the resource 835 // is created. The name must be 1-63 characters long, and comply with 836 // RFC1035. Specifically, the name must be 1-63 characters long and 837 // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means 838 // the first character must be a lowercase letter, and all following 839 // characters must be a dash, lowercase letter, or digit, except the 840 // last character, which cannot be a dash. 841 Name string `json:"name,omitempty"` 842 843 // Operation: Output only. The Operation that most recently ran, or is 844 // currently running, on this deployment. 845 Operation *Operation `json:"operation,omitempty"` 846 847 // SelfLink: Output only. Server defined URL for the resource. 848 SelfLink string `json:"selfLink,omitempty"` 849 850 // Target: [Input Only] The parameters that define your deployment, 851 // including the deployment configuration and relevant templates. 852 Target *TargetConfiguration `json:"target,omitempty"` 853 854 // Update: Output only. If Deployment Manager is currently updating or 855 // previewing an update to this deployment, the updated configuration 856 // appears here. 857 Update *DeploymentUpdate `json:"update,omitempty"` 858 859 // UpdateTime: Output only. Update timestamp in RFC3339 text format. 860 UpdateTime string `json:"updateTime,omitempty"` 861 862 // ServerResponse contains the HTTP response code and headers from the 863 // server. 864 googleapi.ServerResponse `json:"-"` 865 866 // ForceSendFields is a list of field names (e.g. "Description") to 867 // unconditionally include in API requests. By default, fields with 868 // empty values are omitted from API requests. However, any non-pointer, 869 // non-interface field appearing in ForceSendFields will be sent to the 870 // server regardless of whether the field is empty or not. This may be 871 // used to include empty fields in Patch requests. 872 ForceSendFields []string `json:"-"` 873 874 // NullFields is a list of field names (e.g. "Description") to include 875 // in API requests with the JSON null value. By default, fields with 876 // empty values are omitted from API requests. However, any field with 877 // an empty value appearing in NullFields will be sent to the server as 878 // null. It is an error if a field in this list has a non-empty value. 879 // This may be used to include null fields in Patch requests. 880 NullFields []string `json:"-"` 881} 882 883func (s *Deployment) MarshalJSON() ([]byte, error) { 884 type NoMethod Deployment 885 raw := NoMethod(*s) 886 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 887} 888 889type DeploymentLabelEntry struct { 890 Key string `json:"key,omitempty"` 891 892 Value string `json:"value,omitempty"` 893 894 // ForceSendFields is a list of field names (e.g. "Key") to 895 // unconditionally include in API requests. By default, fields with 896 // empty values are omitted from API requests. However, any non-pointer, 897 // non-interface field appearing in ForceSendFields will be sent to the 898 // server regardless of whether the field is empty or not. This may be 899 // used to include empty fields in Patch requests. 900 ForceSendFields []string `json:"-"` 901 902 // NullFields is a list of field names (e.g. "Key") to include in API 903 // requests with the JSON null value. By default, fields with empty 904 // values are omitted from API requests. However, any field with an 905 // empty value appearing in NullFields will be sent to the server as 906 // null. It is an error if a field in this list has a non-empty value. 907 // This may be used to include null fields in Patch requests. 908 NullFields []string `json:"-"` 909} 910 911func (s *DeploymentLabelEntry) MarshalJSON() ([]byte, error) { 912 type NoMethod DeploymentLabelEntry 913 raw := NoMethod(*s) 914 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 915} 916 917type DeploymentUpdate struct { 918 // Description: Output only. An optional user-provided description of 919 // the deployment after the current update has been applied. 920 Description string `json:"description,omitempty"` 921 922 // Labels: Output only. Map of labels; provided by the client when the 923 // resource is created or updated. Specifically: Label keys must be 924 // between 1 and 63 characters long and must conform to the following 925 // regular expression: [a-z]([-a-z0-9]*[a-z0-9])? Label values must be 926 // between 0 and 63 characters long and must conform to the regular 927 // expression ([a-z]([-a-z0-9]*[a-z0-9])?)? 928 Labels []*DeploymentUpdateLabelEntry `json:"labels,omitempty"` 929 930 // Manifest: Output only. URL of the manifest representing the update 931 // configuration of this deployment. 932 Manifest string `json:"manifest,omitempty"` 933 934 // ForceSendFields is a list of field names (e.g. "Description") to 935 // unconditionally include in API requests. By default, fields with 936 // empty values are omitted from API requests. However, any non-pointer, 937 // non-interface field appearing in ForceSendFields will be sent to the 938 // server regardless of whether the field is empty or not. This may be 939 // used to include empty fields in Patch requests. 940 ForceSendFields []string `json:"-"` 941 942 // NullFields is a list of field names (e.g. "Description") to include 943 // in API requests with the JSON null value. By default, fields with 944 // empty values are omitted from API requests. However, any field with 945 // an empty value appearing in NullFields will be sent to the server as 946 // null. It is an error if a field in this list has a non-empty value. 947 // This may be used to include null fields in Patch requests. 948 NullFields []string `json:"-"` 949} 950 951func (s *DeploymentUpdate) MarshalJSON() ([]byte, error) { 952 type NoMethod DeploymentUpdate 953 raw := NoMethod(*s) 954 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 955} 956 957type DeploymentUpdateLabelEntry struct { 958 Key string `json:"key,omitempty"` 959 960 Value string `json:"value,omitempty"` 961 962 // ForceSendFields is a list of field names (e.g. "Key") to 963 // unconditionally include in API requests. By default, fields with 964 // empty values are omitted from API requests. However, any non-pointer, 965 // non-interface field appearing in ForceSendFields will be sent to the 966 // server regardless of whether the field is empty or not. This may be 967 // used to include empty fields in Patch requests. 968 ForceSendFields []string `json:"-"` 969 970 // NullFields is a list of field names (e.g. "Key") to include in API 971 // requests with the JSON null value. By default, fields with empty 972 // values are omitted from API requests. However, any field with an 973 // empty value appearing in NullFields will be sent to the server as 974 // null. It is an error if a field in this list has a non-empty value. 975 // This may be used to include null fields in Patch requests. 976 NullFields []string `json:"-"` 977} 978 979func (s *DeploymentUpdateLabelEntry) MarshalJSON() ([]byte, error) { 980 type NoMethod DeploymentUpdateLabelEntry 981 raw := NoMethod(*s) 982 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 983} 984 985type DeploymentsCancelPreviewRequest struct { 986 // Fingerprint: Specifies a fingerprint for cancelPreview() requests. A 987 // fingerprint is a randomly generated value that must be provided in 988 // cancelPreview() requests to perform optimistic locking. This ensures 989 // optimistic concurrency so that the deployment does not have 990 // conflicting requests (e.g. if someone attempts to make a new update 991 // request while another user attempts to cancel a preview, this would 992 // prevent one of the requests). 993 // 994 // The fingerprint is initially generated by Deployment Manager and 995 // changes after every request to modify a deployment. To get the latest 996 // fingerprint value, perform a get() request on the deployment. 997 Fingerprint string `json:"fingerprint,omitempty"` 998 999 // ForceSendFields is a list of field names (e.g. "Fingerprint") to 1000 // unconditionally include in API requests. By default, fields with 1001 // empty values are omitted from API requests. However, any non-pointer, 1002 // non-interface field appearing in ForceSendFields will be sent to the 1003 // server regardless of whether the field is empty or not. This may be 1004 // used to include empty fields in Patch requests. 1005 ForceSendFields []string `json:"-"` 1006 1007 // NullFields is a list of field names (e.g. "Fingerprint") to include 1008 // in API requests with the JSON null value. By default, fields with 1009 // empty values are omitted from API requests. However, any field with 1010 // an empty value appearing in NullFields will be sent to the server as 1011 // null. It is an error if a field in this list has a non-empty value. 1012 // This may be used to include null fields in Patch requests. 1013 NullFields []string `json:"-"` 1014} 1015 1016func (s *DeploymentsCancelPreviewRequest) MarshalJSON() ([]byte, error) { 1017 type NoMethod DeploymentsCancelPreviewRequest 1018 raw := NoMethod(*s) 1019 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1020} 1021 1022// DeploymentsListResponse: A response containing a partial list of 1023// deployments and a page token used to build the next request if the 1024// request has been truncated. 1025type DeploymentsListResponse struct { 1026 // Deployments: Output only. The deployments contained in this response. 1027 Deployments []*Deployment `json:"deployments,omitempty"` 1028 1029 // NextPageToken: Output only. A token used to continue a truncated list 1030 // request. 1031 NextPageToken string `json:"nextPageToken,omitempty"` 1032 1033 // ServerResponse contains the HTTP response code and headers from the 1034 // server. 1035 googleapi.ServerResponse `json:"-"` 1036 1037 // ForceSendFields is a list of field names (e.g. "Deployments") to 1038 // unconditionally include in API requests. By default, fields with 1039 // empty values are omitted from API requests. However, any non-pointer, 1040 // non-interface field appearing in ForceSendFields will be sent to the 1041 // server regardless of whether the field is empty or not. This may be 1042 // used to include empty fields in Patch requests. 1043 ForceSendFields []string `json:"-"` 1044 1045 // NullFields is a list of field names (e.g. "Deployments") to include 1046 // in API requests with the JSON null value. By default, fields with 1047 // empty values are omitted from API requests. However, any field with 1048 // an empty value appearing in NullFields will be sent to the server as 1049 // null. It is an error if a field in this list has a non-empty value. 1050 // This may be used to include null fields in Patch requests. 1051 NullFields []string `json:"-"` 1052} 1053 1054func (s *DeploymentsListResponse) MarshalJSON() ([]byte, error) { 1055 type NoMethod DeploymentsListResponse 1056 raw := NoMethod(*s) 1057 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1058} 1059 1060type DeploymentsStopRequest struct { 1061 // Fingerprint: Specifies a fingerprint for stop() requests. A 1062 // fingerprint is a randomly generated value that must be provided in 1063 // stop() requests to perform optimistic locking. This ensures 1064 // optimistic concurrency so that the deployment does not have 1065 // conflicting requests (e.g. if someone attempts to make a new update 1066 // request while another user attempts to stop an ongoing update 1067 // request, this would prevent a collision). 1068 // 1069 // The fingerprint is initially generated by Deployment Manager and 1070 // changes after every request to modify a deployment. To get the latest 1071 // fingerprint value, perform a get() request on the deployment. 1072 Fingerprint string `json:"fingerprint,omitempty"` 1073 1074 // ForceSendFields is a list of field names (e.g. "Fingerprint") to 1075 // unconditionally include in API requests. By default, fields with 1076 // empty values are omitted from API requests. However, any non-pointer, 1077 // non-interface field appearing in ForceSendFields will be sent to the 1078 // server regardless of whether the field is empty or not. This may be 1079 // used to include empty fields in Patch requests. 1080 ForceSendFields []string `json:"-"` 1081 1082 // NullFields is a list of field names (e.g. "Fingerprint") to include 1083 // in API requests with the JSON null value. By default, fields with 1084 // empty values are omitted from API requests. However, any field with 1085 // an empty value appearing in NullFields will be sent to the server as 1086 // null. It is an error if a field in this list has a non-empty value. 1087 // This may be used to include null fields in Patch requests. 1088 NullFields []string `json:"-"` 1089} 1090 1091func (s *DeploymentsStopRequest) MarshalJSON() ([]byte, error) { 1092 type NoMethod DeploymentsStopRequest 1093 raw := NoMethod(*s) 1094 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1095} 1096 1097type Diagnostic struct { 1098 // Field: JsonPath expression on the resource that if non empty, 1099 // indicates that this field needs to be extracted as a diagnostic. 1100 Field string `json:"field,omitempty"` 1101 1102 // Level: Level to record this diagnostic. 1103 Level string `json:"level,omitempty"` 1104 1105 // ForceSendFields is a list of field names (e.g. "Field") to 1106 // unconditionally include in API requests. By default, fields with 1107 // empty values are omitted from API requests. However, any non-pointer, 1108 // non-interface field appearing in ForceSendFields will be sent to the 1109 // server regardless of whether the field is empty or not. This may be 1110 // used to include empty fields in Patch requests. 1111 ForceSendFields []string `json:"-"` 1112 1113 // NullFields is a list of field names (e.g. "Field") to include in API 1114 // requests with the JSON null value. By default, fields with empty 1115 // values are omitted from API requests. However, any field with an 1116 // empty value appearing in NullFields will be sent to the server as 1117 // null. It is an error if a field in this list has a non-empty value. 1118 // This may be used to include null fields in Patch requests. 1119 NullFields []string `json:"-"` 1120} 1121 1122func (s *Diagnostic) MarshalJSON() ([]byte, error) { 1123 type NoMethod Diagnostic 1124 raw := NoMethod(*s) 1125 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1126} 1127 1128// Expr: Represents an expression text. Example: 1129// 1130// title: "User account presence" description: "Determines whether the 1131// request has a user account" expression: "size(request.user) > 0" 1132type Expr struct { 1133 // Description: An optional description of the expression. This is a 1134 // longer text which describes the expression, e.g. when hovered over it 1135 // in a UI. 1136 Description string `json:"description,omitempty"` 1137 1138 // Expression: Textual representation of an expression in Common 1139 // Expression Language syntax. 1140 // 1141 // The application context of the containing message determines which 1142 // well-known feature set of CEL is supported. 1143 Expression string `json:"expression,omitempty"` 1144 1145 // Location: An optional string indicating the location of the 1146 // expression for error reporting, e.g. a file name and a position in 1147 // the file. 1148 Location string `json:"location,omitempty"` 1149 1150 // Title: An optional title for the expression, i.e. a short string 1151 // describing its purpose. This can be used e.g. in UIs which allow to 1152 // enter the expression. 1153 Title string `json:"title,omitempty"` 1154 1155 // ForceSendFields is a list of field names (e.g. "Description") to 1156 // unconditionally include in API requests. By default, fields with 1157 // empty values are omitted from API requests. However, any non-pointer, 1158 // non-interface field appearing in ForceSendFields will be sent to the 1159 // server regardless of whether the field is empty or not. This may be 1160 // used to include empty fields in Patch requests. 1161 ForceSendFields []string `json:"-"` 1162 1163 // NullFields is a list of field names (e.g. "Description") to include 1164 // in API requests with the JSON null value. By default, fields with 1165 // empty values are omitted from API requests. However, any field with 1166 // an empty value appearing in NullFields will be sent to the server as 1167 // null. It is an error if a field in this list has a non-empty value. 1168 // This may be used to include null fields in Patch requests. 1169 NullFields []string `json:"-"` 1170} 1171 1172func (s *Expr) MarshalJSON() ([]byte, error) { 1173 type NoMethod Expr 1174 raw := NoMethod(*s) 1175 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1176} 1177 1178type GlobalSetPolicyRequest struct { 1179 // Bindings: Flatten Policy to create a backward compatible wire-format. 1180 // Deprecated. Use 'policy' to specify bindings. 1181 Bindings []*Binding `json:"bindings,omitempty"` 1182 1183 // Etag: Flatten Policy to create a backward compatible wire-format. 1184 // Deprecated. Use 'policy' to specify the etag. 1185 Etag string `json:"etag,omitempty"` 1186 1187 // Policy: REQUIRED: The complete policy to be applied to the 1188 // 'resource'. The size of the policy is limited to a few 10s of KB. An 1189 // empty policy is in general a valid policy but certain services (like 1190 // Projects) might reject them. 1191 Policy *Policy `json:"policy,omitempty"` 1192 1193 // ForceSendFields is a list of field names (e.g. "Bindings") to 1194 // unconditionally include in API requests. By default, fields with 1195 // empty values are omitted from API requests. However, any non-pointer, 1196 // non-interface field appearing in ForceSendFields will be sent to the 1197 // server regardless of whether the field is empty or not. This may be 1198 // used to include empty fields in Patch requests. 1199 ForceSendFields []string `json:"-"` 1200 1201 // NullFields is a list of field names (e.g. "Bindings") to include in 1202 // API requests with the JSON null value. By default, fields with empty 1203 // values are omitted from API requests. However, any field with an 1204 // empty value appearing in NullFields will be sent to the server as 1205 // null. It is an error if a field in this list has a non-empty value. 1206 // This may be used to include null fields in Patch requests. 1207 NullFields []string `json:"-"` 1208} 1209 1210func (s *GlobalSetPolicyRequest) MarshalJSON() ([]byte, error) { 1211 type NoMethod GlobalSetPolicyRequest 1212 raw := NoMethod(*s) 1213 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1214} 1215 1216type ImportFile struct { 1217 // Content: The contents of the file. 1218 Content string `json:"content,omitempty"` 1219 1220 // Name: The name of the file. 1221 Name string `json:"name,omitempty"` 1222 1223 // ForceSendFields is a list of field names (e.g. "Content") to 1224 // unconditionally include in API requests. By default, fields with 1225 // empty values are omitted from API requests. However, any non-pointer, 1226 // non-interface field appearing in ForceSendFields will be sent to the 1227 // server regardless of whether the field is empty or not. This may be 1228 // used to include empty fields in Patch requests. 1229 ForceSendFields []string `json:"-"` 1230 1231 // NullFields is a list of field names (e.g. "Content") to include in 1232 // API requests with the JSON null value. By default, fields with empty 1233 // values are omitted from API requests. However, any field with an 1234 // empty value appearing in NullFields will be sent to the server as 1235 // null. It is an error if a field in this list has a non-empty value. 1236 // This may be used to include null fields in Patch requests. 1237 NullFields []string `json:"-"` 1238} 1239 1240func (s *ImportFile) MarshalJSON() ([]byte, error) { 1241 type NoMethod ImportFile 1242 raw := NoMethod(*s) 1243 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1244} 1245 1246// InputMapping: InputMapping creates a 'virtual' property that will be 1247// injected into the properties before sending the request to the 1248// underlying API. 1249type InputMapping struct { 1250 // FieldName: The name of the field that is going to be injected. 1251 FieldName string `json:"fieldName,omitempty"` 1252 1253 // Location: The location where this mapping applies. 1254 Location string `json:"location,omitempty"` 1255 1256 // MethodMatch: Regex to evaluate on method to decide if input applies. 1257 MethodMatch string `json:"methodMatch,omitempty"` 1258 1259 // Value: A jsonPath expression to select an element. 1260 Value string `json:"value,omitempty"` 1261 1262 // ForceSendFields is a list of field names (e.g. "FieldName") to 1263 // unconditionally include in API requests. By default, fields with 1264 // empty values are omitted from API requests. However, any non-pointer, 1265 // non-interface field appearing in ForceSendFields will be sent to the 1266 // server regardless of whether the field is empty or not. This may be 1267 // used to include empty fields in Patch requests. 1268 ForceSendFields []string `json:"-"` 1269 1270 // NullFields is a list of field names (e.g. "FieldName") to include in 1271 // API requests with the JSON null value. By default, fields with empty 1272 // values are omitted from API requests. However, any field with an 1273 // empty value appearing in NullFields will be sent to the server as 1274 // null. It is an error if a field in this list has a non-empty value. 1275 // This may be used to include null fields in Patch requests. 1276 NullFields []string `json:"-"` 1277} 1278 1279func (s *InputMapping) MarshalJSON() ([]byte, error) { 1280 type NoMethod InputMapping 1281 raw := NoMethod(*s) 1282 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1283} 1284 1285// LogConfig: Specifies what kind of log the caller must write 1286type LogConfig struct { 1287 // CloudAudit: Cloud audit options. 1288 CloudAudit *LogConfigCloudAuditOptions `json:"cloudAudit,omitempty"` 1289 1290 // Counter: Counter options. 1291 Counter *LogConfigCounterOptions `json:"counter,omitempty"` 1292 1293 // DataAccess: Data access options. 1294 DataAccess *LogConfigDataAccessOptions `json:"dataAccess,omitempty"` 1295 1296 // ForceSendFields is a list of field names (e.g. "CloudAudit") to 1297 // unconditionally include in API requests. By default, fields with 1298 // empty values are omitted from API requests. However, any non-pointer, 1299 // non-interface field appearing in ForceSendFields will be sent to the 1300 // server regardless of whether the field is empty or not. This may be 1301 // used to include empty fields in Patch requests. 1302 ForceSendFields []string `json:"-"` 1303 1304 // NullFields is a list of field names (e.g. "CloudAudit") to include in 1305 // API requests with the JSON null value. By default, fields with empty 1306 // values are omitted from API requests. However, any field with an 1307 // empty value appearing in NullFields will be sent to the server as 1308 // null. It is an error if a field in this list has a non-empty value. 1309 // This may be used to include null fields in Patch requests. 1310 NullFields []string `json:"-"` 1311} 1312 1313func (s *LogConfig) MarshalJSON() ([]byte, error) { 1314 type NoMethod LogConfig 1315 raw := NoMethod(*s) 1316 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1317} 1318 1319// LogConfigCloudAuditOptions: Write a Cloud Audit log 1320type LogConfigCloudAuditOptions struct { 1321 // AuthorizationLoggingOptions: Information used by the Cloud Audit 1322 // Logging pipeline. 1323 AuthorizationLoggingOptions *AuthorizationLoggingOptions `json:"authorizationLoggingOptions,omitempty"` 1324 1325 // LogName: The log_name to populate in the Cloud Audit Record. 1326 LogName string `json:"logName,omitempty"` 1327 1328 // ForceSendFields is a list of field names (e.g. 1329 // "AuthorizationLoggingOptions") to unconditionally include in API 1330 // requests. By default, fields with empty values are omitted from API 1331 // requests. However, any non-pointer, non-interface field appearing in 1332 // ForceSendFields will be sent to the server regardless of whether the 1333 // field is empty or not. This may be used to include empty fields in 1334 // Patch requests. 1335 ForceSendFields []string `json:"-"` 1336 1337 // NullFields is a list of field names (e.g. 1338 // "AuthorizationLoggingOptions") to include in API requests with the 1339 // JSON null value. By default, fields with empty values are omitted 1340 // from API requests. However, any field with an empty value appearing 1341 // in NullFields will be sent to the server as null. It is an error if a 1342 // field in this list has a non-empty value. This may be used to include 1343 // null fields in Patch requests. 1344 NullFields []string `json:"-"` 1345} 1346 1347func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) { 1348 type NoMethod LogConfigCloudAuditOptions 1349 raw := NoMethod(*s) 1350 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1351} 1352 1353// LogConfigCounterOptions: Increment a streamz counter with the 1354// specified metric and field names. 1355// 1356// Metric names should start with a '/', generally be lowercase-only, 1357// and end in "_count". Field names should not contain an initial slash. 1358// The actual exported metric names will have "/iam/policy" 1359// prepended. 1360// 1361// Field names correspond to IAM request parameters and field values are 1362// their respective values. 1363// 1364// Supported field names: - "authority", which is "[token]" if 1365// IAMContext.token is present, otherwise the value of 1366// IAMContext.authority_selector if present, and otherwise a 1367// representation of IAMContext.principal; or - "iam_principal", a 1368// representation of IAMContext.principal even if a token or authority 1369// selector is present; or - "" (empty string), resulting in a counter 1370// with no fields. 1371// 1372// Examples: counter { metric: "/debug_access_count" field: 1373// "iam_principal" } ==> increment counter 1374// /iam/policy/backend_debug_access_count {iam_principal=[value of 1375// IAMContext.principal]} 1376// 1377// At this time we do not support multiple field names (though this may 1378// be supported in the future). 1379type LogConfigCounterOptions struct { 1380 // Field: The field value to attribute. 1381 Field string `json:"field,omitempty"` 1382 1383 // Metric: The metric to update. 1384 Metric string `json:"metric,omitempty"` 1385 1386 // ForceSendFields is a list of field names (e.g. "Field") to 1387 // unconditionally include in API requests. By default, fields with 1388 // empty values are omitted from API requests. However, any non-pointer, 1389 // non-interface field appearing in ForceSendFields will be sent to the 1390 // server regardless of whether the field is empty or not. This may be 1391 // used to include empty fields in Patch requests. 1392 ForceSendFields []string `json:"-"` 1393 1394 // NullFields is a list of field names (e.g. "Field") to include in API 1395 // requests with the JSON null value. By default, fields with empty 1396 // values are omitted from API requests. However, any field with an 1397 // empty value appearing in NullFields will be sent to the server as 1398 // null. It is an error if a field in this list has a non-empty value. 1399 // This may be used to include null fields in Patch requests. 1400 NullFields []string `json:"-"` 1401} 1402 1403func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { 1404 type NoMethod LogConfigCounterOptions 1405 raw := NoMethod(*s) 1406 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1407} 1408 1409// LogConfigDataAccessOptions: Write a Data Access (Gin) log 1410type LogConfigDataAccessOptions struct { 1411 // LogMode: Whether Gin logging should happen in a fail-closed manner at 1412 // the caller. This is relevant only in the LocalIAM implementation, for 1413 // now. 1414 // 1415 // NOTE: Logging to Gin in a fail-closed manner is currently unsupported 1416 // while work is being done to satisfy the requirements of go/345. 1417 // Currently, setting LOG_FAIL_CLOSED mode will have no effect, but 1418 // still exists because there is active work being done to support it 1419 // (b/115874152). 1420 LogMode string `json:"logMode,omitempty"` 1421 1422 // ForceSendFields is a list of field names (e.g. "LogMode") to 1423 // unconditionally include in API requests. By default, fields with 1424 // empty values are omitted from API requests. However, any non-pointer, 1425 // non-interface field appearing in ForceSendFields will be sent to the 1426 // server regardless of whether the field is empty or not. This may be 1427 // used to include empty fields in Patch requests. 1428 ForceSendFields []string `json:"-"` 1429 1430 // NullFields is a list of field names (e.g. "LogMode") to include in 1431 // API requests with the JSON null value. By default, fields with empty 1432 // values are omitted from API requests. However, any field with an 1433 // empty value appearing in NullFields will be sent to the server as 1434 // null. It is an error if a field in this list has a non-empty value. 1435 // This may be used to include null fields in Patch requests. 1436 NullFields []string `json:"-"` 1437} 1438 1439func (s *LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) { 1440 type NoMethod LogConfigDataAccessOptions 1441 raw := NoMethod(*s) 1442 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1443} 1444 1445type Manifest struct { 1446 // Config: Output only. The YAML configuration for this manifest. 1447 Config *ConfigFile `json:"config,omitempty"` 1448 1449 // ExpandedConfig: Output only. The fully-expanded configuration file, 1450 // including any templates and references. 1451 ExpandedConfig string `json:"expandedConfig,omitempty"` 1452 1453 Id uint64 `json:"id,omitempty,string"` 1454 1455 // Imports: Output only. The imported files for this manifest. 1456 Imports []*ImportFile `json:"imports,omitempty"` 1457 1458 // InsertTime: Output only. Creation timestamp in RFC3339 text format. 1459 InsertTime string `json:"insertTime,omitempty"` 1460 1461 // Layout: Output only. The YAML layout for this manifest. 1462 Layout string `json:"layout,omitempty"` 1463 1464 // Name: Output only. 1465 // 1466 // The name of the manifest. 1467 Name string `json:"name,omitempty"` 1468 1469 // SelfLink: Output only. Self link for the manifest. 1470 SelfLink string `json:"selfLink,omitempty"` 1471 1472 // ServerResponse contains the HTTP response code and headers from the 1473 // server. 1474 googleapi.ServerResponse `json:"-"` 1475 1476 // ForceSendFields is a list of field names (e.g. "Config") to 1477 // unconditionally include in API requests. By default, fields with 1478 // empty values are omitted from API requests. However, any non-pointer, 1479 // non-interface field appearing in ForceSendFields will be sent to the 1480 // server regardless of whether the field is empty or not. This may be 1481 // used to include empty fields in Patch requests. 1482 ForceSendFields []string `json:"-"` 1483 1484 // NullFields is a list of field names (e.g. "Config") to include in API 1485 // requests with the JSON null value. By default, fields with empty 1486 // values are omitted from API requests. However, any field with an 1487 // empty value appearing in NullFields will be sent to the server as 1488 // null. It is an error if a field in this list has a non-empty value. 1489 // This may be used to include null fields in Patch requests. 1490 NullFields []string `json:"-"` 1491} 1492 1493func (s *Manifest) MarshalJSON() ([]byte, error) { 1494 type NoMethod Manifest 1495 raw := NoMethod(*s) 1496 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1497} 1498 1499// ManifestsListResponse: A response containing a partial list of 1500// manifests and a page token used to build the next request if the 1501// request has been truncated. 1502type ManifestsListResponse struct { 1503 // Manifests: Output only. Manifests contained in this list response. 1504 Manifests []*Manifest `json:"manifests,omitempty"` 1505 1506 // NextPageToken: Output only. A token used to continue a truncated list 1507 // request. 1508 NextPageToken string `json:"nextPageToken,omitempty"` 1509 1510 // ServerResponse contains the HTTP response code and headers from the 1511 // server. 1512 googleapi.ServerResponse `json:"-"` 1513 1514 // ForceSendFields is a list of field names (e.g. "Manifests") to 1515 // unconditionally include in API requests. By default, fields with 1516 // empty values are omitted from API requests. However, any non-pointer, 1517 // non-interface field appearing in ForceSendFields will be sent to the 1518 // server regardless of whether the field is empty or not. This may be 1519 // used to include empty fields in Patch requests. 1520 ForceSendFields []string `json:"-"` 1521 1522 // NullFields is a list of field names (e.g. "Manifests") to include in 1523 // API requests with the JSON null value. By default, fields with empty 1524 // values are omitted from API requests. However, any field with an 1525 // empty value appearing in NullFields will be sent to the server as 1526 // null. It is an error if a field in this list has a non-empty value. 1527 // This may be used to include null fields in Patch requests. 1528 NullFields []string `json:"-"` 1529} 1530 1531func (s *ManifestsListResponse) MarshalJSON() ([]byte, error) { 1532 type NoMethod ManifestsListResponse 1533 raw := NoMethod(*s) 1534 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1535} 1536 1537// Operation: An Operation resource, used to manage asynchronous API 1538// requests. (== resource_for v1.globalOperations ==) (== resource_for 1539// beta.globalOperations ==) (== resource_for v1.regionOperations ==) 1540// (== resource_for beta.regionOperations ==) (== resource_for 1541// v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 1542type Operation struct { 1543 // ClientOperationId: [Output Only] The value of `requestId` if you 1544 // provided it in the request. Not present otherwise. 1545 ClientOperationId string `json:"clientOperationId,omitempty"` 1546 1547 // CreationTimestamp: [Deprecated] This field is deprecated. 1548 CreationTimestamp string `json:"creationTimestamp,omitempty"` 1549 1550 // Description: [Output Only] A textual description of the operation, 1551 // which is set when the operation is created. 1552 Description string `json:"description,omitempty"` 1553 1554 // EndTime: [Output Only] The time that this operation was completed. 1555 // This value is in RFC3339 text format. 1556 EndTime string `json:"endTime,omitempty"` 1557 1558 // Error: [Output Only] If errors are generated during processing of the 1559 // operation, this field will be populated. 1560 Error *OperationError `json:"error,omitempty"` 1561 1562 // HttpErrorMessage: [Output Only] If the operation fails, this field 1563 // contains the HTTP error message that was returned, such as NOT FOUND. 1564 HttpErrorMessage string `json:"httpErrorMessage,omitempty"` 1565 1566 // HttpErrorStatusCode: [Output Only] If the operation fails, this field 1567 // contains the HTTP error status code that was returned. For example, a 1568 // 404 means the resource was not found. 1569 HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` 1570 1571 // Id: [Output Only] The unique identifier for the resource. This 1572 // identifier is defined by the server. 1573 Id uint64 `json:"id,omitempty,string"` 1574 1575 // InsertTime: [Output Only] The time that this operation was requested. 1576 // This value is in RFC3339 text format. 1577 InsertTime string `json:"insertTime,omitempty"` 1578 1579 // Kind: [Output Only] Type of the resource. Always compute#operation 1580 // for Operation resources. 1581 Kind string `json:"kind,omitempty"` 1582 1583 // Name: [Output Only] Name of the resource. 1584 Name string `json:"name,omitempty"` 1585 1586 // OperationType: [Output Only] The type of operation, such as insert, 1587 // update, or delete, and so on. 1588 OperationType string `json:"operationType,omitempty"` 1589 1590 // Progress: [Output Only] An optional progress indicator that ranges 1591 // from 0 to 100. There is no requirement that this be linear or support 1592 // any granularity of operations. This should not be used to guess when 1593 // the operation will be complete. This number should monotonically 1594 // increase as the operation progresses. 1595 Progress int64 `json:"progress,omitempty"` 1596 1597 // Region: [Output Only] The URL of the region where the operation 1598 // resides. Only available when performing regional operations. You must 1599 // specify this field as part of the HTTP request URL. It is not 1600 // settable as a field in the request body. 1601 Region string `json:"region,omitempty"` 1602 1603 // SelfLink: [Output Only] Server-defined URL for the resource. 1604 SelfLink string `json:"selfLink,omitempty"` 1605 1606 // StartTime: [Output Only] The time that this operation was started by 1607 // the server. This value is in RFC3339 text format. 1608 StartTime string `json:"startTime,omitempty"` 1609 1610 // Status: [Output Only] The status of the operation, which can be one 1611 // of the following: PENDING, RUNNING, or DONE. 1612 Status string `json:"status,omitempty"` 1613 1614 // StatusMessage: [Output Only] An optional textual description of the 1615 // current status of the operation. 1616 StatusMessage string `json:"statusMessage,omitempty"` 1617 1618 // TargetId: [Output Only] The unique target ID, which identifies a 1619 // specific incarnation of the target resource. 1620 TargetId uint64 `json:"targetId,omitempty,string"` 1621 1622 // TargetLink: [Output Only] The URL of the resource that the operation 1623 // modifies. For operations related to creating a snapshot, this points 1624 // to the persistent disk that the snapshot was created from. 1625 TargetLink string `json:"targetLink,omitempty"` 1626 1627 // User: [Output Only] User who requested the operation, for example: 1628 // user@example.com. 1629 User string `json:"user,omitempty"` 1630 1631 // Warnings: [Output Only] If warning messages are generated during 1632 // processing of the operation, this field will be populated. 1633 Warnings []*OperationWarnings `json:"warnings,omitempty"` 1634 1635 // Zone: [Output Only] The URL of the zone where the operation resides. 1636 // Only available when performing per-zone operations. You must specify 1637 // this field as part of the HTTP request URL. It is not settable as a 1638 // field in the request body. 1639 Zone string `json:"zone,omitempty"` 1640 1641 // ServerResponse contains the HTTP response code and headers from the 1642 // server. 1643 googleapi.ServerResponse `json:"-"` 1644 1645 // ForceSendFields is a list of field names (e.g. "ClientOperationId") 1646 // to unconditionally include in API requests. By default, fields with 1647 // empty values are omitted from API requests. However, any non-pointer, 1648 // non-interface field appearing in ForceSendFields will be sent to the 1649 // server regardless of whether the field is empty or not. This may be 1650 // used to include empty fields in Patch requests. 1651 ForceSendFields []string `json:"-"` 1652 1653 // NullFields is a list of field names (e.g. "ClientOperationId") to 1654 // include in API requests with the JSON null value. By default, fields 1655 // with empty values are omitted from API requests. However, any field 1656 // with an empty value appearing in NullFields will be sent to the 1657 // server as null. It is an error if a field in this list has a 1658 // non-empty value. This may be used to include null fields in Patch 1659 // requests. 1660 NullFields []string `json:"-"` 1661} 1662 1663func (s *Operation) MarshalJSON() ([]byte, error) { 1664 type NoMethod Operation 1665 raw := NoMethod(*s) 1666 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1667} 1668 1669// OperationError: [Output Only] If errors are generated during 1670// processing of the operation, this field will be populated. 1671type OperationError struct { 1672 // Errors: [Output Only] The array of errors encountered while 1673 // processing this operation. 1674 Errors []*OperationErrorErrors `json:"errors,omitempty"` 1675 1676 // ForceSendFields is a list of field names (e.g. "Errors") to 1677 // unconditionally include in API requests. By default, fields with 1678 // empty values are omitted from API requests. However, any non-pointer, 1679 // non-interface field appearing in ForceSendFields will be sent to the 1680 // server regardless of whether the field is empty or not. This may be 1681 // used to include empty fields in Patch requests. 1682 ForceSendFields []string `json:"-"` 1683 1684 // NullFields is a list of field names (e.g. "Errors") to include in API 1685 // requests with the JSON null value. By default, fields with empty 1686 // values are omitted from API requests. However, any field with an 1687 // empty value appearing in NullFields will be sent to the server as 1688 // null. It is an error if a field in this list has a non-empty value. 1689 // This may be used to include null fields in Patch requests. 1690 NullFields []string `json:"-"` 1691} 1692 1693func (s *OperationError) MarshalJSON() ([]byte, error) { 1694 type NoMethod OperationError 1695 raw := NoMethod(*s) 1696 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1697} 1698 1699type OperationErrorErrors struct { 1700 // Code: [Output Only] The error type identifier for this error. 1701 Code string `json:"code,omitempty"` 1702 1703 // Location: [Output Only] Indicates the field in the request that 1704 // caused the error. This property is optional. 1705 Location string `json:"location,omitempty"` 1706 1707 // Message: [Output Only] An optional, human-readable error message. 1708 Message string `json:"message,omitempty"` 1709 1710 // ForceSendFields is a list of field names (e.g. "Code") to 1711 // unconditionally include in API requests. By default, fields with 1712 // empty values are omitted from API requests. However, any non-pointer, 1713 // non-interface field appearing in ForceSendFields will be sent to the 1714 // server regardless of whether the field is empty or not. This may be 1715 // used to include empty fields in Patch requests. 1716 ForceSendFields []string `json:"-"` 1717 1718 // NullFields is a list of field names (e.g. "Code") to include in API 1719 // requests with the JSON null value. By default, fields with empty 1720 // values are omitted from API requests. However, any field with an 1721 // empty value appearing in NullFields will be sent to the server as 1722 // null. It is an error if a field in this list has a non-empty value. 1723 // This may be used to include null fields in Patch requests. 1724 NullFields []string `json:"-"` 1725} 1726 1727func (s *OperationErrorErrors) MarshalJSON() ([]byte, error) { 1728 type NoMethod OperationErrorErrors 1729 raw := NoMethod(*s) 1730 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1731} 1732 1733type OperationWarnings struct { 1734 // Code: [Output Only] A warning code, if applicable. For example, 1735 // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in 1736 // the response. 1737 Code string `json:"code,omitempty"` 1738 1739 // Data: [Output Only] Metadata about this warning in key: value format. 1740 // For example: 1741 // "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1742 Data []*OperationWarningsData `json:"data,omitempty"` 1743 1744 // Message: [Output Only] A human-readable description of the warning 1745 // code. 1746 Message string `json:"message,omitempty"` 1747 1748 // ForceSendFields is a list of field names (e.g. "Code") to 1749 // unconditionally include in API requests. By default, fields with 1750 // empty values are omitted from API requests. However, any non-pointer, 1751 // non-interface field appearing in ForceSendFields will be sent to the 1752 // server regardless of whether the field is empty or not. This may be 1753 // used to include empty fields in Patch requests. 1754 ForceSendFields []string `json:"-"` 1755 1756 // NullFields is a list of field names (e.g. "Code") to include in API 1757 // requests with the JSON null value. By default, fields with empty 1758 // values are omitted from API requests. However, any field with an 1759 // empty value appearing in NullFields will be sent to the server as 1760 // null. It is an error if a field in this list has a non-empty value. 1761 // This may be used to include null fields in Patch requests. 1762 NullFields []string `json:"-"` 1763} 1764 1765func (s *OperationWarnings) MarshalJSON() ([]byte, error) { 1766 type NoMethod OperationWarnings 1767 raw := NoMethod(*s) 1768 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1769} 1770 1771type OperationWarningsData struct { 1772 // Key: [Output Only] A key that provides more detail on the warning 1773 // being returned. For example, for warnings where there are no results 1774 // in a list request for a particular zone, this key might be scope and 1775 // the key value might be the zone name. Other examples might be a key 1776 // indicating a deprecated resource and a suggested replacement, or a 1777 // warning about invalid network settings (for example, if an instance 1778 // attempts to perform IP forwarding but is not enabled for IP 1779 // forwarding). 1780 Key string `json:"key,omitempty"` 1781 1782 // Value: [Output Only] A warning data value corresponding to the key. 1783 Value string `json:"value,omitempty"` 1784 1785 // ForceSendFields is a list of field names (e.g. "Key") to 1786 // unconditionally include in API requests. By default, fields with 1787 // empty values are omitted from API requests. However, any non-pointer, 1788 // non-interface field appearing in ForceSendFields will be sent to the 1789 // server regardless of whether the field is empty or not. This may be 1790 // used to include empty fields in Patch requests. 1791 ForceSendFields []string `json:"-"` 1792 1793 // NullFields is a list of field names (e.g. "Key") to include in API 1794 // requests with the JSON null value. By default, fields with empty 1795 // values are omitted from API requests. However, any field with an 1796 // empty value appearing in NullFields will be sent to the server as 1797 // null. It is an error if a field in this list has a non-empty value. 1798 // This may be used to include null fields in Patch requests. 1799 NullFields []string `json:"-"` 1800} 1801 1802func (s *OperationWarningsData) MarshalJSON() ([]byte, error) { 1803 type NoMethod OperationWarningsData 1804 raw := NoMethod(*s) 1805 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1806} 1807 1808// OperationsListResponse: A response containing a partial list of 1809// operations and a page token used to build the next request if the 1810// request has been truncated. 1811type OperationsListResponse struct { 1812 // NextPageToken: Output only. A token used to continue a truncated list 1813 // request. 1814 NextPageToken string `json:"nextPageToken,omitempty"` 1815 1816 // Operations: Output only. Operations contained in this list response. 1817 Operations []*Operation `json:"operations,omitempty"` 1818 1819 // ServerResponse contains the HTTP response code and headers from the 1820 // server. 1821 googleapi.ServerResponse `json:"-"` 1822 1823 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1824 // unconditionally include in API requests. By default, fields with 1825 // empty values are omitted from API requests. However, any non-pointer, 1826 // non-interface field appearing in ForceSendFields will be sent to the 1827 // server regardless of whether the field is empty or not. This may be 1828 // used to include empty fields in Patch requests. 1829 ForceSendFields []string `json:"-"` 1830 1831 // NullFields is a list of field names (e.g. "NextPageToken") to include 1832 // in API requests with the JSON null value. By default, fields with 1833 // empty values are omitted from API requests. However, any field with 1834 // an empty value appearing in NullFields will be sent to the server as 1835 // null. It is an error if a field in this list has a non-empty value. 1836 // This may be used to include null fields in Patch requests. 1837 NullFields []string `json:"-"` 1838} 1839 1840func (s *OperationsListResponse) MarshalJSON() ([]byte, error) { 1841 type NoMethod OperationsListResponse 1842 raw := NoMethod(*s) 1843 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1844} 1845 1846// Options: Options allows customized resource handling by Deployment 1847// Manager. 1848type Options struct { 1849 // AsyncOptions: Options regarding how to thread async requests. 1850 AsyncOptions []*AsyncOptions `json:"asyncOptions,omitempty"` 1851 1852 // InputMappings: The mappings that apply for requests. 1853 InputMappings []*InputMapping `json:"inputMappings,omitempty"` 1854 1855 // ValidationOptions: Options for how to validate and process properties 1856 // on a resource. 1857 ValidationOptions *ValidationOptions `json:"validationOptions,omitempty"` 1858 1859 // VirtualProperties: Additional properties block described as a 1860 // jsonSchema, these properties will never be part of the json payload, 1861 // but they can be consumed by InputMappings, this must be a valid json 1862 // schema draft-04. The properties specified here will be decouple in a 1863 // different section. This schema will be merged to the schema 1864 // validation, and properties here will be extracted From the payload 1865 // and consumed explicitly by InputMappings. ex: field1: type: string 1866 // field2: type: number 1867 VirtualProperties string `json:"virtualProperties,omitempty"` 1868 1869 // ForceSendFields is a list of field names (e.g. "AsyncOptions") to 1870 // unconditionally include in API requests. By default, fields with 1871 // empty values are omitted from API requests. However, any non-pointer, 1872 // non-interface field appearing in ForceSendFields will be sent to the 1873 // server regardless of whether the field is empty or not. This may be 1874 // used to include empty fields in Patch requests. 1875 ForceSendFields []string `json:"-"` 1876 1877 // NullFields is a list of field names (e.g. "AsyncOptions") to include 1878 // in API requests with the JSON null value. By default, fields with 1879 // empty values are omitted from API requests. However, any field with 1880 // an empty value appearing in NullFields will be sent to the server as 1881 // null. It is an error if a field in this list has a non-empty value. 1882 // This may be used to include null fields in Patch requests. 1883 NullFields []string `json:"-"` 1884} 1885 1886func (s *Options) MarshalJSON() ([]byte, error) { 1887 type NoMethod Options 1888 raw := NoMethod(*s) 1889 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1890} 1891 1892// Policy: Defines an Identity and Access Management (IAM) policy. It is 1893// used to specify access control policies for Cloud Platform 1894// resources. 1895// 1896// 1897// 1898// A `Policy` consists of a list of `bindings`. A `binding` binds a list 1899// of `members` to a `role`, where the members can be user accounts, 1900// Google groups, Google domains, and service accounts. A `role` is a 1901// named list of permissions defined by IAM. 1902// 1903// **JSON Example** 1904// 1905// { "bindings": [ { "role": "roles/owner", "members": [ 1906// "user:mike@example.com", "group:admins@example.com", 1907// "domain:google.com", 1908// "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { 1909// "role": "roles/viewer", "members": ["user:sean@example.com"] } ] 1910// } 1911// 1912// **YAML Example** 1913// 1914// bindings: - members: - user:mike@example.com - 1915// group:admins@example.com - domain:google.com - 1916// serviceAccount:my-other-app@appspot.gserviceaccount.com role: 1917// roles/owner - members: - user:sean@example.com role: 1918// roles/viewer 1919// 1920// 1921// 1922// For a description of IAM and its features, see the [IAM developer's 1923// guide](https://cloud.google.com/iam/docs). 1924type Policy struct { 1925 // AuditConfigs: Specifies cloud audit logging configuration for this 1926 // policy. 1927 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` 1928 1929 // Bindings: Associates a list of `members` to a `role`. `bindings` with 1930 // no members will result in an error. 1931 Bindings []*Binding `json:"bindings,omitempty"` 1932 1933 // Etag: `etag` is used for optimistic concurrency control as a way to 1934 // help prevent simultaneous updates of a policy from overwriting each 1935 // other. It is strongly suggested that systems make use of the `etag` 1936 // in the read-modify-write cycle to perform policy updates in order to 1937 // avoid race conditions: An `etag` is returned in the response to 1938 // `getIamPolicy`, and systems are expected to put that etag in the 1939 // request to `setIamPolicy` to ensure that their change will be applied 1940 // to the same version of the policy. 1941 // 1942 // If no `etag` is provided in the call to `setIamPolicy`, then the 1943 // existing policy is overwritten blindly. 1944 Etag string `json:"etag,omitempty"` 1945 1946 IamOwned bool `json:"iamOwned,omitempty"` 1947 1948 // Rules: If more than one rule is specified, the rules are applied in 1949 // the following manner: - All matching LOG rules are always applied. - 1950 // If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging 1951 // will be applied if one or more matching rule requires logging. - 1952 // Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is 1953 // granted. Logging will be applied if one or more matching rule 1954 // requires logging. - Otherwise, if no rule applies, permission is 1955 // denied. 1956 Rules []*Rule `json:"rules,omitempty"` 1957 1958 // Version: Deprecated. 1959 Version int64 `json:"version,omitempty"` 1960 1961 // ServerResponse contains the HTTP response code and headers from the 1962 // server. 1963 googleapi.ServerResponse `json:"-"` 1964 1965 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to 1966 // unconditionally include in API requests. By default, fields with 1967 // empty values are omitted from API requests. However, any non-pointer, 1968 // non-interface field appearing in ForceSendFields will be sent to the 1969 // server regardless of whether the field is empty or not. This may be 1970 // used to include empty fields in Patch requests. 1971 ForceSendFields []string `json:"-"` 1972 1973 // NullFields is a list of field names (e.g. "AuditConfigs") to include 1974 // in API requests with the JSON null value. By default, fields with 1975 // empty values are omitted from API requests. However, any field with 1976 // an empty value appearing in NullFields will be sent to the server as 1977 // null. It is an error if a field in this list has a non-empty value. 1978 // This may be used to include null fields in Patch requests. 1979 NullFields []string `json:"-"` 1980} 1981 1982func (s *Policy) MarshalJSON() ([]byte, error) { 1983 type NoMethod Policy 1984 raw := NoMethod(*s) 1985 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1986} 1987 1988type PollingOptions struct { 1989 // Diagnostics: An array of diagnostics to be collected by Deployment 1990 // Manager, these diagnostics will be displayed to the user. 1991 Diagnostics []*Diagnostic `json:"diagnostics,omitempty"` 1992 1993 // FailCondition: JsonPath expression that determines if the request 1994 // failed. 1995 FailCondition string `json:"failCondition,omitempty"` 1996 1997 // FinishCondition: JsonPath expression that determines if the request 1998 // is completed. 1999 FinishCondition string `json:"finishCondition,omitempty"` 2000 2001 // PollingLink: JsonPath expression that evaluates to string, it 2002 // indicates where to poll. 2003 PollingLink string `json:"pollingLink,omitempty"` 2004 2005 // TargetLink: JsonPath expression, after polling is completed, 2006 // indicates where to fetch the resource. 2007 TargetLink string `json:"targetLink,omitempty"` 2008 2009 // ForceSendFields is a list of field names (e.g. "Diagnostics") to 2010 // unconditionally include in API requests. By default, fields with 2011 // empty values are omitted from API requests. However, any non-pointer, 2012 // non-interface field appearing in ForceSendFields will be sent to the 2013 // server regardless of whether the field is empty or not. This may be 2014 // used to include empty fields in Patch requests. 2015 ForceSendFields []string `json:"-"` 2016 2017 // NullFields is a list of field names (e.g. "Diagnostics") to include 2018 // in API requests with the JSON null value. By default, fields with 2019 // empty values are omitted from API requests. However, any field with 2020 // an empty value appearing in NullFields will be sent to the server as 2021 // null. It is an error if a field in this list has a non-empty value. 2022 // This may be used to include null fields in Patch requests. 2023 NullFields []string `json:"-"` 2024} 2025 2026func (s *PollingOptions) MarshalJSON() ([]byte, error) { 2027 type NoMethod PollingOptions 2028 raw := NoMethod(*s) 2029 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2030} 2031 2032type Resource struct { 2033 // AccessControl: The Access Control Policy set on this resource. 2034 AccessControl *ResourceAccessControl `json:"accessControl,omitempty"` 2035 2036 // FinalProperties: Output only. The evaluated properties of the 2037 // resource with references expanded. Returned as serialized YAML. 2038 FinalProperties string `json:"finalProperties,omitempty"` 2039 2040 Id uint64 `json:"id,omitempty,string"` 2041 2042 // InsertTime: Output only. Creation timestamp in RFC3339 text format. 2043 InsertTime string `json:"insertTime,omitempty"` 2044 2045 // Manifest: Output only. URL of the manifest representing the current 2046 // configuration of this resource. 2047 Manifest string `json:"manifest,omitempty"` 2048 2049 // Name: Output only. The name of the resource as it appears in the YAML 2050 // config. 2051 Name string `json:"name,omitempty"` 2052 2053 // Properties: Output only. The current properties of the resource 2054 // before any references have been filled in. Returned as serialized 2055 // YAML. 2056 Properties string `json:"properties,omitempty"` 2057 2058 // Type: Output only. The type of the resource, for example 2059 // compute.v1.instance, or cloudfunctions.v1beta1.function. 2060 Type string `json:"type,omitempty"` 2061 2062 // Update: Output only. If Deployment Manager is currently updating or 2063 // previewing an update to this resource, the updated configuration 2064 // appears here. 2065 Update *ResourceUpdate `json:"update,omitempty"` 2066 2067 // UpdateTime: Output only. Update timestamp in RFC3339 text format. 2068 UpdateTime string `json:"updateTime,omitempty"` 2069 2070 // Url: Output only. The URL of the actual resource. 2071 Url string `json:"url,omitempty"` 2072 2073 // Warnings: Output only. If warning messages are generated during 2074 // processing of this resource, this field will be populated. 2075 Warnings []*ResourceWarnings `json:"warnings,omitempty"` 2076 2077 // ServerResponse contains the HTTP response code and headers from the 2078 // server. 2079 googleapi.ServerResponse `json:"-"` 2080 2081 // ForceSendFields is a list of field names (e.g. "AccessControl") to 2082 // unconditionally include in API requests. By default, fields with 2083 // empty values are omitted from API requests. However, any non-pointer, 2084 // non-interface field appearing in ForceSendFields will be sent to the 2085 // server regardless of whether the field is empty or not. This may be 2086 // used to include empty fields in Patch requests. 2087 ForceSendFields []string `json:"-"` 2088 2089 // NullFields is a list of field names (e.g. "AccessControl") to include 2090 // in API requests with the JSON null value. By default, fields with 2091 // empty values are omitted from API requests. However, any field with 2092 // an empty value appearing in NullFields will be sent to the server as 2093 // null. It is an error if a field in this list has a non-empty value. 2094 // This may be used to include null fields in Patch requests. 2095 NullFields []string `json:"-"` 2096} 2097 2098func (s *Resource) MarshalJSON() ([]byte, error) { 2099 type NoMethod Resource 2100 raw := NoMethod(*s) 2101 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2102} 2103 2104type ResourceWarnings struct { 2105 // Code: [Output Only] A warning code, if applicable. For example, 2106 // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in 2107 // the response. 2108 Code string `json:"code,omitempty"` 2109 2110 // Data: [Output Only] Metadata about this warning in key: value format. 2111 // For example: 2112 // "data": [ { "key": "scope", "value": "zones/us-east1-d" } 2113 Data []*ResourceWarningsData `json:"data,omitempty"` 2114 2115 // Message: [Output Only] A human-readable description of the warning 2116 // code. 2117 Message string `json:"message,omitempty"` 2118 2119 // ForceSendFields is a list of field names (e.g. "Code") to 2120 // unconditionally include in API requests. By default, fields with 2121 // empty values are omitted from API requests. However, any non-pointer, 2122 // non-interface field appearing in ForceSendFields will be sent to the 2123 // server regardless of whether the field is empty or not. This may be 2124 // used to include empty fields in Patch requests. 2125 ForceSendFields []string `json:"-"` 2126 2127 // NullFields is a list of field names (e.g. "Code") to include in API 2128 // requests with the JSON null value. By default, fields with empty 2129 // values are omitted from API requests. However, any field with an 2130 // empty value appearing in NullFields will be sent to the server as 2131 // null. It is an error if a field in this list has a non-empty value. 2132 // This may be used to include null fields in Patch requests. 2133 NullFields []string `json:"-"` 2134} 2135 2136func (s *ResourceWarnings) MarshalJSON() ([]byte, error) { 2137 type NoMethod ResourceWarnings 2138 raw := NoMethod(*s) 2139 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2140} 2141 2142type ResourceWarningsData struct { 2143 // Key: [Output Only] A key that provides more detail on the warning 2144 // being returned. For example, for warnings where there are no results 2145 // in a list request for a particular zone, this key might be scope and 2146 // the key value might be the zone name. Other examples might be a key 2147 // indicating a deprecated resource and a suggested replacement, or a 2148 // warning about invalid network settings (for example, if an instance 2149 // attempts to perform IP forwarding but is not enabled for IP 2150 // forwarding). 2151 Key string `json:"key,omitempty"` 2152 2153 // Value: [Output Only] A warning data value corresponding to the key. 2154 Value string `json:"value,omitempty"` 2155 2156 // ForceSendFields is a list of field names (e.g. "Key") to 2157 // unconditionally include in API requests. By default, fields with 2158 // empty values are omitted from API requests. However, any non-pointer, 2159 // non-interface field appearing in ForceSendFields will be sent to the 2160 // server regardless of whether the field is empty or not. This may be 2161 // used to include empty fields in Patch requests. 2162 ForceSendFields []string `json:"-"` 2163 2164 // NullFields is a list of field names (e.g. "Key") to include in API 2165 // requests with the JSON null value. By default, fields with empty 2166 // values are omitted from API requests. However, any field with an 2167 // empty value appearing in NullFields will be sent to the server as 2168 // null. It is an error if a field in this list has a non-empty value. 2169 // This may be used to include null fields in Patch requests. 2170 NullFields []string `json:"-"` 2171} 2172 2173func (s *ResourceWarningsData) MarshalJSON() ([]byte, error) { 2174 type NoMethod ResourceWarningsData 2175 raw := NoMethod(*s) 2176 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2177} 2178 2179// ResourceAccessControl: The access controls set on the resource. 2180type ResourceAccessControl struct { 2181 // GcpIamPolicy: The GCP IAM Policy to set on the resource. 2182 GcpIamPolicy string `json:"gcpIamPolicy,omitempty"` 2183 2184 // ForceSendFields is a list of field names (e.g. "GcpIamPolicy") to 2185 // unconditionally include in API requests. By default, fields with 2186 // empty values are omitted from API requests. However, any non-pointer, 2187 // non-interface field appearing in ForceSendFields will be sent to the 2188 // server regardless of whether the field is empty or not. This may be 2189 // used to include empty fields in Patch requests. 2190 ForceSendFields []string `json:"-"` 2191 2192 // NullFields is a list of field names (e.g. "GcpIamPolicy") to include 2193 // in API requests with the JSON null value. By default, fields with 2194 // empty values are omitted from API requests. However, any field with 2195 // an empty value appearing in NullFields will be sent to the server as 2196 // null. It is an error if a field in this list has a non-empty value. 2197 // This may be used to include null fields in Patch requests. 2198 NullFields []string `json:"-"` 2199} 2200 2201func (s *ResourceAccessControl) MarshalJSON() ([]byte, error) { 2202 type NoMethod ResourceAccessControl 2203 raw := NoMethod(*s) 2204 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2205} 2206 2207type ResourceUpdate struct { 2208 // AccessControl: The Access Control Policy to set on this resource 2209 // after updating the resource itself. 2210 AccessControl *ResourceAccessControl `json:"accessControl,omitempty"` 2211 2212 // Error: Output only. If errors are generated during update of the 2213 // resource, this field will be populated. 2214 Error *ResourceUpdateError `json:"error,omitempty"` 2215 2216 // FinalProperties: Output only. The expanded properties of the resource 2217 // with reference values expanded. Returned as serialized YAML. 2218 FinalProperties string `json:"finalProperties,omitempty"` 2219 2220 // Intent: Output only. The intent of the resource: PREVIEW, UPDATE, or 2221 // CANCEL. 2222 Intent string `json:"intent,omitempty"` 2223 2224 // Manifest: Output only. URL of the manifest representing the update 2225 // configuration of this resource. 2226 Manifest string `json:"manifest,omitempty"` 2227 2228 // Properties: Output only. The set of updated properties for this 2229 // resource, before references are expanded. Returned as serialized 2230 // YAML. 2231 Properties string `json:"properties,omitempty"` 2232 2233 // State: Output only. The state of the resource. 2234 State string `json:"state,omitempty"` 2235 2236 // Warnings: Output only. If warning messages are generated during 2237 // processing of this resource, this field will be populated. 2238 Warnings []*ResourceUpdateWarnings `json:"warnings,omitempty"` 2239 2240 // ForceSendFields is a list of field names (e.g. "AccessControl") to 2241 // unconditionally include in API requests. By default, fields with 2242 // empty values are omitted from API requests. However, any non-pointer, 2243 // non-interface field appearing in ForceSendFields will be sent to the 2244 // server regardless of whether the field is empty or not. This may be 2245 // used to include empty fields in Patch requests. 2246 ForceSendFields []string `json:"-"` 2247 2248 // NullFields is a list of field names (e.g. "AccessControl") to include 2249 // in API requests with the JSON null value. By default, fields with 2250 // empty values are omitted from API requests. However, any field with 2251 // an empty value appearing in NullFields will be sent to the server as 2252 // null. It is an error if a field in this list has a non-empty value. 2253 // This may be used to include null fields in Patch requests. 2254 NullFields []string `json:"-"` 2255} 2256 2257func (s *ResourceUpdate) MarshalJSON() ([]byte, error) { 2258 type NoMethod ResourceUpdate 2259 raw := NoMethod(*s) 2260 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2261} 2262 2263// ResourceUpdateError: Output only. If errors are generated during 2264// update of the resource, this field will be populated. 2265type ResourceUpdateError struct { 2266 // Errors: [Output Only] The array of errors encountered while 2267 // processing this operation. 2268 Errors []*ResourceUpdateErrorErrors `json:"errors,omitempty"` 2269 2270 // ForceSendFields is a list of field names (e.g. "Errors") to 2271 // unconditionally include in API requests. By default, fields with 2272 // empty values are omitted from API requests. However, any non-pointer, 2273 // non-interface field appearing in ForceSendFields will be sent to the 2274 // server regardless of whether the field is empty or not. This may be 2275 // used to include empty fields in Patch requests. 2276 ForceSendFields []string `json:"-"` 2277 2278 // NullFields is a list of field names (e.g. "Errors") to include in API 2279 // requests with the JSON null value. By default, fields with empty 2280 // values are omitted from API requests. However, any field with an 2281 // empty value appearing in NullFields will be sent to the server as 2282 // null. It is an error if a field in this list has a non-empty value. 2283 // This may be used to include null fields in Patch requests. 2284 NullFields []string `json:"-"` 2285} 2286 2287func (s *ResourceUpdateError) MarshalJSON() ([]byte, error) { 2288 type NoMethod ResourceUpdateError 2289 raw := NoMethod(*s) 2290 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2291} 2292 2293type ResourceUpdateErrorErrors struct { 2294 // Code: [Output Only] The error type identifier for this error. 2295 Code string `json:"code,omitempty"` 2296 2297 // Location: [Output Only] Indicates the field in the request that 2298 // caused the error. This property is optional. 2299 Location string `json:"location,omitempty"` 2300 2301 // Message: [Output Only] An optional, human-readable error message. 2302 Message string `json:"message,omitempty"` 2303 2304 // ForceSendFields is a list of field names (e.g. "Code") to 2305 // unconditionally include in API requests. By default, fields with 2306 // empty values are omitted from API requests. However, any non-pointer, 2307 // non-interface field appearing in ForceSendFields will be sent to the 2308 // server regardless of whether the field is empty or not. This may be 2309 // used to include empty fields in Patch requests. 2310 ForceSendFields []string `json:"-"` 2311 2312 // NullFields is a list of field names (e.g. "Code") to include in API 2313 // requests with the JSON null value. By default, fields with empty 2314 // values are omitted from API requests. However, any field with an 2315 // empty value appearing in NullFields will be sent to the server as 2316 // null. It is an error if a field in this list has a non-empty value. 2317 // This may be used to include null fields in Patch requests. 2318 NullFields []string `json:"-"` 2319} 2320 2321func (s *ResourceUpdateErrorErrors) MarshalJSON() ([]byte, error) { 2322 type NoMethod ResourceUpdateErrorErrors 2323 raw := NoMethod(*s) 2324 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2325} 2326 2327type ResourceUpdateWarnings struct { 2328 // Code: [Output Only] A warning code, if applicable. For example, 2329 // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in 2330 // the response. 2331 Code string `json:"code,omitempty"` 2332 2333 // Data: [Output Only] Metadata about this warning in key: value format. 2334 // For example: 2335 // "data": [ { "key": "scope", "value": "zones/us-east1-d" } 2336 Data []*ResourceUpdateWarningsData `json:"data,omitempty"` 2337 2338 // Message: [Output Only] A human-readable description of the warning 2339 // code. 2340 Message string `json:"message,omitempty"` 2341 2342 // ForceSendFields is a list of field names (e.g. "Code") to 2343 // unconditionally include in API requests. By default, fields with 2344 // empty values are omitted from API requests. However, any non-pointer, 2345 // non-interface field appearing in ForceSendFields will be sent to the 2346 // server regardless of whether the field is empty or not. This may be 2347 // used to include empty fields in Patch requests. 2348 ForceSendFields []string `json:"-"` 2349 2350 // NullFields is a list of field names (e.g. "Code") to include in API 2351 // requests with the JSON null value. By default, fields with empty 2352 // values are omitted from API requests. However, any field with an 2353 // empty value appearing in NullFields will be sent to the server as 2354 // null. It is an error if a field in this list has a non-empty value. 2355 // This may be used to include null fields in Patch requests. 2356 NullFields []string `json:"-"` 2357} 2358 2359func (s *ResourceUpdateWarnings) MarshalJSON() ([]byte, error) { 2360 type NoMethod ResourceUpdateWarnings 2361 raw := NoMethod(*s) 2362 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2363} 2364 2365type ResourceUpdateWarningsData struct { 2366 // Key: [Output Only] A key that provides more detail on the warning 2367 // being returned. For example, for warnings where there are no results 2368 // in a list request for a particular zone, this key might be scope and 2369 // the key value might be the zone name. Other examples might be a key 2370 // indicating a deprecated resource and a suggested replacement, or a 2371 // warning about invalid network settings (for example, if an instance 2372 // attempts to perform IP forwarding but is not enabled for IP 2373 // forwarding). 2374 Key string `json:"key,omitempty"` 2375 2376 // Value: [Output Only] A warning data value corresponding to the key. 2377 Value string `json:"value,omitempty"` 2378 2379 // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") to include in API 2388 // 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 *ResourceUpdateWarningsData) MarshalJSON() ([]byte, error) { 2397 type NoMethod ResourceUpdateWarningsData 2398 raw := NoMethod(*s) 2399 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2400} 2401 2402// ResourcesListResponse: A response containing a partial list of 2403// resources and a page token used to build the next request if the 2404// request has been truncated. 2405type ResourcesListResponse struct { 2406 // NextPageToken: A token used to continue a truncated list request. 2407 NextPageToken string `json:"nextPageToken,omitempty"` 2408 2409 // Resources: Resources contained in this list response. 2410 Resources []*Resource `json:"resources,omitempty"` 2411 2412 // ServerResponse contains the HTTP response code and headers from the 2413 // server. 2414 googleapi.ServerResponse `json:"-"` 2415 2416 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2417 // unconditionally include in API requests. By default, fields with 2418 // empty values are omitted from API requests. However, any non-pointer, 2419 // non-interface field appearing in ForceSendFields will be sent to the 2420 // server regardless of whether the field is empty or not. This may be 2421 // used to include empty fields in Patch requests. 2422 ForceSendFields []string `json:"-"` 2423 2424 // NullFields is a list of field names (e.g. "NextPageToken") to include 2425 // in API requests with the JSON null value. By default, fields with 2426 // empty values are omitted from API requests. However, any field with 2427 // an empty value appearing in NullFields will be sent to the server as 2428 // null. It is an error if a field in this list has a non-empty value. 2429 // This may be used to include null fields in Patch requests. 2430 NullFields []string `json:"-"` 2431} 2432 2433func (s *ResourcesListResponse) MarshalJSON() ([]byte, error) { 2434 type NoMethod ResourcesListResponse 2435 raw := NoMethod(*s) 2436 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2437} 2438 2439// Rule: A rule to be applied in a Policy. 2440type Rule struct { 2441 // Action: Required 2442 Action string `json:"action,omitempty"` 2443 2444 // Conditions: Additional restrictions that must be met. All conditions 2445 // must pass for the rule to match. 2446 Conditions []*Condition `json:"conditions,omitempty"` 2447 2448 // Description: Human-readable description of the rule. 2449 Description string `json:"description,omitempty"` 2450 2451 // Ins: If one or more 'in' clauses are specified, the rule matches if 2452 // the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. 2453 Ins []string `json:"ins,omitempty"` 2454 2455 // LogConfigs: The config returned to callers of 2456 // tech.iam.IAM.CheckPolicy for any entries that match the LOG action. 2457 LogConfigs []*LogConfig `json:"logConfigs,omitempty"` 2458 2459 // NotIns: If one or more 'not_in' clauses are specified, the rule 2460 // matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the 2461 // entries. 2462 NotIns []string `json:"notIns,omitempty"` 2463 2464 // Permissions: A permission is a string of form '..' (e.g., 2465 // 'storage.buckets.list'). A value of '*' matches all permissions, and 2466 // a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. 2467 Permissions []string `json:"permissions,omitempty"` 2468 2469 // ForceSendFields is a list of field names (e.g. "Action") to 2470 // unconditionally include in API requests. By default, fields with 2471 // empty values are omitted from API requests. However, any non-pointer, 2472 // non-interface field appearing in ForceSendFields will be sent to the 2473 // server regardless of whether the field is empty or not. This may be 2474 // used to include empty fields in Patch requests. 2475 ForceSendFields []string `json:"-"` 2476 2477 // NullFields is a list of field names (e.g. "Action") to include in API 2478 // requests with the JSON null value. By default, fields with empty 2479 // values are omitted from API requests. However, any field with an 2480 // empty value appearing in NullFields will be sent to the server as 2481 // null. It is an error if a field in this list has a non-empty value. 2482 // This may be used to include null fields in Patch requests. 2483 NullFields []string `json:"-"` 2484} 2485 2486func (s *Rule) MarshalJSON() ([]byte, error) { 2487 type NoMethod Rule 2488 raw := NoMethod(*s) 2489 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2490} 2491 2492// ServiceAccount: Service Account used as a credential. 2493type ServiceAccount struct { 2494 // Email: The IAM service account email address like 2495 // test@myproject.iam.gserviceaccount.com 2496 Email string `json:"email,omitempty"` 2497 2498 // ForceSendFields is a list of field names (e.g. "Email") to 2499 // unconditionally include in API requests. By default, fields with 2500 // empty values are omitted from API requests. However, any non-pointer, 2501 // non-interface field appearing in ForceSendFields will be sent to the 2502 // server regardless of whether the field is empty or not. This may be 2503 // used to include empty fields in Patch requests. 2504 ForceSendFields []string `json:"-"` 2505 2506 // NullFields is a list of field names (e.g. "Email") to include in API 2507 // requests with the JSON null value. By default, fields with empty 2508 // values are omitted from API requests. However, any field with an 2509 // empty value appearing in NullFields will be sent to the server as 2510 // null. It is an error if a field in this list has a non-empty value. 2511 // This may be used to include null fields in Patch requests. 2512 NullFields []string `json:"-"` 2513} 2514 2515func (s *ServiceAccount) MarshalJSON() ([]byte, error) { 2516 type NoMethod ServiceAccount 2517 raw := NoMethod(*s) 2518 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2519} 2520 2521type TargetConfiguration struct { 2522 // Config: The configuration to use for this deployment. 2523 Config *ConfigFile `json:"config,omitempty"` 2524 2525 // Imports: Specifies any files to import for this configuration. This 2526 // can be used to import templates or other files. For example, you 2527 // might import a text file in order to use the file in a template. 2528 Imports []*ImportFile `json:"imports,omitempty"` 2529 2530 // ForceSendFields is a list of field names (e.g. "Config") to 2531 // unconditionally include in API requests. By default, fields with 2532 // empty values are omitted from API requests. However, any non-pointer, 2533 // non-interface field appearing in ForceSendFields will be sent to the 2534 // server regardless of whether the field is empty or not. This may be 2535 // used to include empty fields in Patch requests. 2536 ForceSendFields []string `json:"-"` 2537 2538 // NullFields is a list of field names (e.g. "Config") to include in API 2539 // requests with the JSON null value. By default, fields with empty 2540 // values are omitted from API requests. However, any field with an 2541 // empty value appearing in NullFields will be sent to the server as 2542 // null. It is an error if a field in this list has a non-empty value. 2543 // This may be used to include null fields in Patch requests. 2544 NullFields []string `json:"-"` 2545} 2546 2547func (s *TargetConfiguration) MarshalJSON() ([]byte, error) { 2548 type NoMethod TargetConfiguration 2549 raw := NoMethod(*s) 2550 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2551} 2552 2553// TemplateContents: Files that make up the template contents of a 2554// template type. 2555type TemplateContents struct { 2556 // Imports: Import files referenced by the main template. 2557 Imports []*ImportFile `json:"imports,omitempty"` 2558 2559 // Interpreter: Which interpreter (python or jinja) should be used 2560 // during expansion. 2561 Interpreter string `json:"interpreter,omitempty"` 2562 2563 // MainTemplate: The filename of the mainTemplate 2564 MainTemplate string `json:"mainTemplate,omitempty"` 2565 2566 // Schema: The contents of the template schema. 2567 Schema string `json:"schema,omitempty"` 2568 2569 // Template: The contents of the main template file. 2570 Template string `json:"template,omitempty"` 2571 2572 // ForceSendFields is a list of field names (e.g. "Imports") to 2573 // unconditionally include in API requests. By default, fields with 2574 // empty values are omitted from API requests. However, any non-pointer, 2575 // non-interface field appearing in ForceSendFields will be sent to the 2576 // server regardless of whether the field is empty or not. This may be 2577 // used to include empty fields in Patch requests. 2578 ForceSendFields []string `json:"-"` 2579 2580 // NullFields is a list of field names (e.g. "Imports") to include in 2581 // API requests with the JSON null value. By default, fields with empty 2582 // values are omitted from API requests. However, any field with an 2583 // empty value appearing in NullFields will be sent to the server as 2584 // null. It is an error if a field in this list has a non-empty value. 2585 // This may be used to include null fields in Patch requests. 2586 NullFields []string `json:"-"` 2587} 2588 2589func (s *TemplateContents) MarshalJSON() ([]byte, error) { 2590 type NoMethod TemplateContents 2591 raw := NoMethod(*s) 2592 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2593} 2594 2595type TestPermissionsRequest struct { 2596 // Permissions: The set of permissions to check for the 'resource'. 2597 // Permissions with wildcards (such as '*' or 'storage.*') are not 2598 // allowed. 2599 Permissions []string `json:"permissions,omitempty"` 2600 2601 // ForceSendFields is a list of field names (e.g. "Permissions") to 2602 // unconditionally include in API requests. By default, fields with 2603 // empty values are omitted from API requests. However, any non-pointer, 2604 // non-interface field appearing in ForceSendFields will be sent to the 2605 // server regardless of whether the field is empty or not. This may be 2606 // used to include empty fields in Patch requests. 2607 ForceSendFields []string `json:"-"` 2608 2609 // NullFields is a list of field names (e.g. "Permissions") to include 2610 // in API requests with the JSON null value. By default, fields with 2611 // empty values are omitted from API requests. However, any field with 2612 // an empty value appearing in NullFields will be sent to the server as 2613 // null. It is an error if a field in this list has a non-empty value. 2614 // This may be used to include null fields in Patch requests. 2615 NullFields []string `json:"-"` 2616} 2617 2618func (s *TestPermissionsRequest) MarshalJSON() ([]byte, error) { 2619 type NoMethod TestPermissionsRequest 2620 raw := NoMethod(*s) 2621 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2622} 2623 2624type TestPermissionsResponse struct { 2625 // Permissions: A subset of `TestPermissionsRequest.permissions` that 2626 // the caller is allowed. 2627 Permissions []string `json:"permissions,omitempty"` 2628 2629 // ServerResponse contains the HTTP response code and headers from the 2630 // server. 2631 googleapi.ServerResponse `json:"-"` 2632 2633 // ForceSendFields is a list of field names (e.g. "Permissions") to 2634 // unconditionally include in API requests. By default, fields with 2635 // empty values are omitted from API requests. However, any non-pointer, 2636 // non-interface field appearing in ForceSendFields will be sent to the 2637 // server regardless of whether the field is empty or not. This may be 2638 // used to include empty fields in Patch requests. 2639 ForceSendFields []string `json:"-"` 2640 2641 // NullFields is a list of field names (e.g. "Permissions") to include 2642 // in API requests with the JSON null value. By default, fields with 2643 // empty values are omitted from API requests. However, any field with 2644 // an empty value appearing in NullFields will be sent to the server as 2645 // null. It is an error if a field in this list has a non-empty value. 2646 // This may be used to include null fields in Patch requests. 2647 NullFields []string `json:"-"` 2648} 2649 2650func (s *TestPermissionsResponse) MarshalJSON() ([]byte, error) { 2651 type NoMethod TestPermissionsResponse 2652 raw := NoMethod(*s) 2653 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2654} 2655 2656// Type: A resource type supported by Deployment Manager. 2657type Type struct { 2658 // Base: Base Type (configurable service) that backs this Type. 2659 Base *BaseType `json:"base,omitempty"` 2660 2661 // Description: An optional textual description of the resource; 2662 // provided by the client when the resource is created. 2663 Description string `json:"description,omitempty"` 2664 2665 Id uint64 `json:"id,omitempty,string"` 2666 2667 // InsertTime: Output only. Creation timestamp in RFC3339 text format. 2668 InsertTime string `json:"insertTime,omitempty"` 2669 2670 // Labels: Map of labels; provided by the client when the resource is 2671 // created or updated. Specifically: Label keys must be between 1 and 63 2672 // characters long and must conform to the following regular expression: 2673 // [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63 2674 // characters long and must conform to the regular expression 2675 // ([a-z]([-a-z0-9]*[a-z0-9])?)? 2676 Labels []*TypeLabelEntry `json:"labels,omitempty"` 2677 2678 // Name: Name of the type. 2679 Name string `json:"name,omitempty"` 2680 2681 // Operation: Output only. The Operation that most recently ran, or is 2682 // currently running, on this type. 2683 Operation *Operation `json:"operation,omitempty"` 2684 2685 // SelfLink: Output only. Server defined URL for the resource. 2686 SelfLink string `json:"selfLink,omitempty"` 2687 2688 // ForceSendFields is a list of field names (e.g. "Base") to 2689 // unconditionally include in API requests. By default, fields with 2690 // empty values are omitted from API requests. However, any non-pointer, 2691 // non-interface field appearing in ForceSendFields will be sent to the 2692 // server regardless of whether the field is empty or not. This may be 2693 // used to include empty fields in Patch requests. 2694 ForceSendFields []string `json:"-"` 2695 2696 // NullFields is a list of field names (e.g. "Base") to include in API 2697 // requests with the JSON null value. By default, fields with empty 2698 // values are omitted from API requests. However, any field with an 2699 // empty value appearing in NullFields will be sent to the server as 2700 // null. It is an error if a field in this list has a non-empty value. 2701 // This may be used to include null fields in Patch requests. 2702 NullFields []string `json:"-"` 2703} 2704 2705func (s *Type) MarshalJSON() ([]byte, error) { 2706 type NoMethod Type 2707 raw := NoMethod(*s) 2708 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2709} 2710 2711// TypeInfo: Type Information. Contains detailed information about a 2712// composite type, base type, or base type with specific collection. 2713type TypeInfo struct { 2714 // Description: The description of the type. 2715 Description string `json:"description,omitempty"` 2716 2717 // DocumentationLink: For swagger 2.0 externalDocs field will be used. 2718 // For swagger 1.2 this field will be empty. 2719 DocumentationLink string `json:"documentationLink,omitempty"` 2720 2721 // Kind: Output only. Type of the output. Always 2722 // deploymentManager#TypeInfo for TypeInfo. 2723 Kind string `json:"kind,omitempty"` 2724 2725 // Name: The base type or composite type name. 2726 Name string `json:"name,omitempty"` 2727 2728 // Schema: For base types with a collection, we return a schema and 2729 // documentation link For template types, we return only a schema 2730 Schema *TypeInfoSchemaInfo `json:"schema,omitempty"` 2731 2732 // SelfLink: Output only. Self link for the type provider. 2733 SelfLink string `json:"selfLink,omitempty"` 2734 2735 // Title: The title on the API descriptor URL provided. 2736 Title string `json:"title,omitempty"` 2737 2738 // ServerResponse contains the HTTP response code and headers from the 2739 // server. 2740 googleapi.ServerResponse `json:"-"` 2741 2742 // ForceSendFields is a list of field names (e.g. "Description") to 2743 // unconditionally include in API requests. By default, fields with 2744 // empty values are omitted from API requests. However, any non-pointer, 2745 // non-interface field appearing in ForceSendFields will be sent to the 2746 // server regardless of whether the field is empty or not. This may be 2747 // used to include empty fields in Patch requests. 2748 ForceSendFields []string `json:"-"` 2749 2750 // NullFields is a list of field names (e.g. "Description") to include 2751 // in API requests with the JSON null value. By default, fields with 2752 // empty values are omitted from API requests. However, any field with 2753 // an empty value appearing in NullFields will be sent to the server as 2754 // null. It is an error if a field in this list has a non-empty value. 2755 // This may be used to include null fields in Patch requests. 2756 NullFields []string `json:"-"` 2757} 2758 2759func (s *TypeInfo) MarshalJSON() ([]byte, error) { 2760 type NoMethod TypeInfo 2761 raw := NoMethod(*s) 2762 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2763} 2764 2765type TypeInfoSchemaInfo struct { 2766 // Input: The properties that this composite type or base type 2767 // collection accept as input, represented as a json blob, format is: 2768 // JSON Schema Draft V4 2769 Input string `json:"input,omitempty"` 2770 2771 // Output: The properties that this composite type or base type 2772 // collection exposes as output, these properties can be used for 2773 // references, represented as json blob, format is: JSON Schema Draft V4 2774 Output string `json:"output,omitempty"` 2775 2776 // ForceSendFields is a list of field names (e.g. "Input") to 2777 // unconditionally include in API requests. By default, fields with 2778 // empty values are omitted from API requests. However, any non-pointer, 2779 // non-interface field appearing in ForceSendFields will be sent to the 2780 // server regardless of whether the field is empty or not. This may be 2781 // used to include empty fields in Patch requests. 2782 ForceSendFields []string `json:"-"` 2783 2784 // NullFields is a list of field names (e.g. "Input") to include in API 2785 // requests with the JSON null value. By default, fields with empty 2786 // values are omitted from API requests. However, any field with an 2787 // empty value appearing in NullFields will be sent to the server as 2788 // null. It is an error if a field in this list has a non-empty value. 2789 // This may be used to include null fields in Patch requests. 2790 NullFields []string `json:"-"` 2791} 2792 2793func (s *TypeInfoSchemaInfo) MarshalJSON() ([]byte, error) { 2794 type NoMethod TypeInfoSchemaInfo 2795 raw := NoMethod(*s) 2796 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2797} 2798 2799type TypeLabelEntry struct { 2800 Key string `json:"key,omitempty"` 2801 2802 Value string `json:"value,omitempty"` 2803 2804 // ForceSendFields is a list of field names (e.g. "Key") to 2805 // unconditionally include in API requests. By default, fields with 2806 // empty values are omitted from API requests. However, any non-pointer, 2807 // non-interface field appearing in ForceSendFields will be sent to the 2808 // server regardless of whether the field is empty or not. This may be 2809 // used to include empty fields in Patch requests. 2810 ForceSendFields []string `json:"-"` 2811 2812 // NullFields is a list of field names (e.g. "Key") to include in API 2813 // requests with the JSON null value. By default, fields with empty 2814 // values are omitted from API requests. However, any field with an 2815 // empty value appearing in NullFields will be sent to the server as 2816 // null. It is an error if a field in this list has a non-empty value. 2817 // This may be used to include null fields in Patch requests. 2818 NullFields []string `json:"-"` 2819} 2820 2821func (s *TypeLabelEntry) MarshalJSON() ([]byte, error) { 2822 type NoMethod TypeLabelEntry 2823 raw := NoMethod(*s) 2824 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2825} 2826 2827// TypeProvider: A type provider that describes a service-backed Type. 2828type TypeProvider struct { 2829 // CollectionOverrides: Allows resource handling overrides for specific 2830 // collections 2831 CollectionOverrides []*CollectionOverride `json:"collectionOverrides,omitempty"` 2832 2833 // Credential: Credential used when interacting with this type. 2834 Credential *Credential `json:"credential,omitempty"` 2835 2836 // Description: An optional textual description of the resource; 2837 // provided by the client when the resource is created. 2838 Description string `json:"description,omitempty"` 2839 2840 // DescriptorUrl: Descriptor Url for the this type provider. 2841 DescriptorUrl string `json:"descriptorUrl,omitempty"` 2842 2843 // Id: Output only. Unique identifier for the resource defined by the 2844 // server. 2845 Id uint64 `json:"id,omitempty,string"` 2846 2847 // InsertTime: Output only. Creation timestamp in RFC3339 text format. 2848 InsertTime string `json:"insertTime,omitempty"` 2849 2850 // Labels: Map of labels; provided by the client when the resource is 2851 // created or updated. Specifically: Label keys must be between 1 and 63 2852 // characters long and must conform to the following regular expression: 2853 // [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63 2854 // characters long and must conform to the regular expression 2855 // ([a-z]([-a-z0-9]*[a-z0-9])?)? 2856 Labels []*TypeProviderLabelEntry `json:"labels,omitempty"` 2857 2858 // Name: Name of the resource; provided by the client when the resource 2859 // is created. The name must be 1-63 characters long, and comply with 2860 // RFC1035. Specifically, the name must be 1-63 characters long and 2861 // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means 2862 // the first character must be a lowercase letter, and all following 2863 // characters must be a dash, lowercase letter, or digit, except the 2864 // last character, which cannot be a dash. 2865 Name string `json:"name,omitempty"` 2866 2867 // Operation: Output only. The Operation that most recently ran, or is 2868 // currently running, on this type provider. 2869 Operation *Operation `json:"operation,omitempty"` 2870 2871 // Options: Options to apply when handling any resources in this 2872 // service. 2873 Options *Options `json:"options,omitempty"` 2874 2875 // SelfLink: Output only. Self link for the type provider. 2876 SelfLink string `json:"selfLink,omitempty"` 2877 2878 // ServerResponse contains the HTTP response code and headers from the 2879 // server. 2880 googleapi.ServerResponse `json:"-"` 2881 2882 // ForceSendFields is a list of field names (e.g. "CollectionOverrides") 2883 // to unconditionally include in API requests. By default, fields with 2884 // empty values are omitted from API requests. However, any non-pointer, 2885 // non-interface field appearing in ForceSendFields will be sent to the 2886 // server regardless of whether the field is empty or not. This may be 2887 // used to include empty fields in Patch requests. 2888 ForceSendFields []string `json:"-"` 2889 2890 // NullFields is a list of field names (e.g. "CollectionOverrides") to 2891 // include in API requests with the JSON null value. By default, fields 2892 // with empty values are omitted from API requests. However, any field 2893 // with an empty value appearing in NullFields will be sent to the 2894 // server as null. It is an error if a field in this list has a 2895 // non-empty value. This may be used to include null fields in Patch 2896 // requests. 2897 NullFields []string `json:"-"` 2898} 2899 2900func (s *TypeProvider) MarshalJSON() ([]byte, error) { 2901 type NoMethod TypeProvider 2902 raw := NoMethod(*s) 2903 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2904} 2905 2906type TypeProviderLabelEntry struct { 2907 Key string `json:"key,omitempty"` 2908 2909 Value string `json:"value,omitempty"` 2910 2911 // ForceSendFields is a list of field names (e.g. "Key") to 2912 // unconditionally include in API requests. By default, fields with 2913 // empty values are omitted from API requests. However, any non-pointer, 2914 // non-interface field appearing in ForceSendFields will be sent to the 2915 // server regardless of whether the field is empty or not. This may be 2916 // used to include empty fields in Patch requests. 2917 ForceSendFields []string `json:"-"` 2918 2919 // NullFields is a list of field names (e.g. "Key") to include in API 2920 // requests with the JSON null value. By default, fields with empty 2921 // values are omitted from API requests. However, any field with an 2922 // empty value appearing in NullFields will be sent to the server as 2923 // null. It is an error if a field in this list has a non-empty value. 2924 // This may be used to include null fields in Patch requests. 2925 NullFields []string `json:"-"` 2926} 2927 2928func (s *TypeProviderLabelEntry) MarshalJSON() ([]byte, error) { 2929 type NoMethod TypeProviderLabelEntry 2930 raw := NoMethod(*s) 2931 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2932} 2933 2934// TypeProvidersListResponse: A response that returns all Type Providers 2935// supported by Deployment Manager 2936type TypeProvidersListResponse struct { 2937 // NextPageToken: A token used to continue a truncated list request. 2938 NextPageToken string `json:"nextPageToken,omitempty"` 2939 2940 // TypeProviders: Output only. A list of resource type providers 2941 // supported by Deployment Manager. 2942 TypeProviders []*TypeProvider `json:"typeProviders,omitempty"` 2943 2944 // ServerResponse contains the HTTP response code and headers from the 2945 // server. 2946 googleapi.ServerResponse `json:"-"` 2947 2948 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2949 // unconditionally include in API requests. By default, fields with 2950 // empty values are omitted from API requests. However, any non-pointer, 2951 // non-interface field appearing in ForceSendFields will be sent to the 2952 // server regardless of whether the field is empty or not. This may be 2953 // used to include empty fields in Patch requests. 2954 ForceSendFields []string `json:"-"` 2955 2956 // NullFields is a list of field names (e.g. "NextPageToken") to include 2957 // in API requests with the JSON null value. By default, fields with 2958 // empty values are omitted from API requests. However, any field with 2959 // an empty value appearing in NullFields will be sent to the server as 2960 // null. It is an error if a field in this list has a non-empty value. 2961 // This may be used to include null fields in Patch requests. 2962 NullFields []string `json:"-"` 2963} 2964 2965func (s *TypeProvidersListResponse) MarshalJSON() ([]byte, error) { 2966 type NoMethod TypeProvidersListResponse 2967 raw := NoMethod(*s) 2968 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2969} 2970 2971type TypeProvidersListTypesResponse struct { 2972 // NextPageToken: A token used to continue a truncated list request. 2973 NextPageToken string `json:"nextPageToken,omitempty"` 2974 2975 // Types: Output only. A list of resource type info. 2976 Types []*TypeInfo `json:"types,omitempty"` 2977 2978 // ServerResponse contains the HTTP response code and headers from the 2979 // server. 2980 googleapi.ServerResponse `json:"-"` 2981 2982 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2983 // unconditionally include in API requests. By default, fields with 2984 // empty values are omitted from API requests. However, any non-pointer, 2985 // non-interface field appearing in ForceSendFields will be sent to the 2986 // server regardless of whether the field is empty or not. This may be 2987 // used to include empty fields in Patch requests. 2988 ForceSendFields []string `json:"-"` 2989 2990 // NullFields is a list of field names (e.g. "NextPageToken") to include 2991 // in API requests with the JSON null value. By default, fields with 2992 // empty values are omitted from API requests. However, any field with 2993 // an empty value appearing in NullFields will be sent to the server as 2994 // null. It is an error if a field in this list has a non-empty value. 2995 // This may be used to include null fields in Patch requests. 2996 NullFields []string `json:"-"` 2997} 2998 2999func (s *TypeProvidersListTypesResponse) MarshalJSON() ([]byte, error) { 3000 type NoMethod TypeProvidersListTypesResponse 3001 raw := NoMethod(*s) 3002 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3003} 3004 3005// TypesListResponse: A response that returns all Types supported by 3006// Deployment Manager 3007type TypesListResponse struct { 3008 // NextPageToken: A token used to continue a truncated list request. 3009 NextPageToken string `json:"nextPageToken,omitempty"` 3010 3011 // Types: Output only. A list of resource types supported by Deployment 3012 // Manager. 3013 Types []*Type `json:"types,omitempty"` 3014 3015 // ServerResponse contains the HTTP response code and headers from the 3016 // server. 3017 googleapi.ServerResponse `json:"-"` 3018 3019 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3020 // unconditionally include in API requests. By default, fields with 3021 // empty values are omitted from API requests. However, any non-pointer, 3022 // non-interface field appearing in ForceSendFields will be sent to the 3023 // server regardless of whether the field is empty or not. This may be 3024 // used to include empty fields in Patch requests. 3025 ForceSendFields []string `json:"-"` 3026 3027 // NullFields is a list of field names (e.g. "NextPageToken") to include 3028 // in API requests with the JSON null value. By default, fields with 3029 // empty values are omitted from API requests. However, any field with 3030 // an empty value appearing in NullFields will be sent to the server as 3031 // null. It is an error if a field in this list has a non-empty value. 3032 // This may be used to include null fields in Patch requests. 3033 NullFields []string `json:"-"` 3034} 3035 3036func (s *TypesListResponse) MarshalJSON() ([]byte, error) { 3037 type NoMethod TypesListResponse 3038 raw := NoMethod(*s) 3039 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3040} 3041 3042// ValidationOptions: Options for how to validate and process properties 3043// on a resource. 3044type ValidationOptions struct { 3045 // SchemaValidation: Customize how deployment manager will validate the 3046 // resource against schema errors. 3047 SchemaValidation string `json:"schemaValidation,omitempty"` 3048 3049 // UndeclaredProperties: Specify what to do with extra properties when 3050 // executing a request. 3051 UndeclaredProperties string `json:"undeclaredProperties,omitempty"` 3052 3053 // ForceSendFields is a list of field names (e.g. "SchemaValidation") to 3054 // unconditionally include in API requests. By default, fields with 3055 // empty values are omitted from API requests. However, any non-pointer, 3056 // non-interface field appearing in ForceSendFields will be sent to the 3057 // server regardless of whether the field is empty or not. This may be 3058 // used to include empty fields in Patch requests. 3059 ForceSendFields []string `json:"-"` 3060 3061 // NullFields is a list of field names (e.g. "SchemaValidation") to 3062 // include in API requests with the JSON null value. By default, fields 3063 // with empty values are omitted from API requests. However, any field 3064 // with an empty value appearing in NullFields will be sent to the 3065 // server as null. It is an error if a field in this list has a 3066 // non-empty value. This may be used to include null fields in Patch 3067 // requests. 3068 NullFields []string `json:"-"` 3069} 3070 3071func (s *ValidationOptions) MarshalJSON() ([]byte, error) { 3072 type NoMethod ValidationOptions 3073 raw := NoMethod(*s) 3074 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3075} 3076 3077// method id "deploymentmanager.compositeTypes.delete": 3078 3079type CompositeTypesDeleteCall struct { 3080 s *Service 3081 project string 3082 compositeType string 3083 urlParams_ gensupport.URLParams 3084 ctx_ context.Context 3085 header_ http.Header 3086} 3087 3088// Delete: Deletes a composite type. 3089func (r *CompositeTypesService) Delete(project string, compositeType string) *CompositeTypesDeleteCall { 3090 c := &CompositeTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3091 c.project = project 3092 c.compositeType = compositeType 3093 return c 3094} 3095 3096// Fields allows partial responses to be retrieved. See 3097// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3098// for more information. 3099func (c *CompositeTypesDeleteCall) Fields(s ...googleapi.Field) *CompositeTypesDeleteCall { 3100 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3101 return c 3102} 3103 3104// Context sets the context to be used in this call's Do method. Any 3105// pending HTTP request will be aborted if the provided context is 3106// canceled. 3107func (c *CompositeTypesDeleteCall) Context(ctx context.Context) *CompositeTypesDeleteCall { 3108 c.ctx_ = ctx 3109 return c 3110} 3111 3112// Header returns an http.Header that can be modified by the caller to 3113// add HTTP headers to the request. 3114func (c *CompositeTypesDeleteCall) Header() http.Header { 3115 if c.header_ == nil { 3116 c.header_ = make(http.Header) 3117 } 3118 return c.header_ 3119} 3120 3121func (c *CompositeTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 3122 reqHeaders := make(http.Header) 3123 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 3124 for k, v := range c.header_ { 3125 reqHeaders[k] = v 3126 } 3127 reqHeaders.Set("User-Agent", c.s.userAgent()) 3128 var body io.Reader = nil 3129 c.urlParams_.Set("alt", alt) 3130 c.urlParams_.Set("prettyPrint", "false") 3131 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes/{compositeType}") 3132 urls += "?" + c.urlParams_.Encode() 3133 req, err := http.NewRequest("DELETE", urls, body) 3134 if err != nil { 3135 return nil, err 3136 } 3137 req.Header = reqHeaders 3138 googleapi.Expand(req.URL, map[string]string{ 3139 "project": c.project, 3140 "compositeType": c.compositeType, 3141 }) 3142 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3143} 3144 3145// Do executes the "deploymentmanager.compositeTypes.delete" call. 3146// Exactly one of *Operation or error will be non-nil. Any non-2xx 3147// status code is an error. Response headers are in either 3148// *Operation.ServerResponse.Header or (if a response was returned at 3149// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3150// to check whether the returned error was because 3151// http.StatusNotModified was returned. 3152func (c *CompositeTypesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3153 gensupport.SetOptions(c.urlParams_, opts...) 3154 res, err := c.doRequest("json") 3155 if res != nil && res.StatusCode == http.StatusNotModified { 3156 if res.Body != nil { 3157 res.Body.Close() 3158 } 3159 return nil, &googleapi.Error{ 3160 Code: res.StatusCode, 3161 Header: res.Header, 3162 } 3163 } 3164 if err != nil { 3165 return nil, err 3166 } 3167 defer googleapi.CloseBody(res) 3168 if err := googleapi.CheckResponse(res); err != nil { 3169 return nil, err 3170 } 3171 ret := &Operation{ 3172 ServerResponse: googleapi.ServerResponse{ 3173 Header: res.Header, 3174 HTTPStatusCode: res.StatusCode, 3175 }, 3176 } 3177 target := &ret 3178 if err := gensupport.DecodeResponse(target, res); err != nil { 3179 return nil, err 3180 } 3181 return ret, nil 3182 // { 3183 // "description": "Deletes a composite type.", 3184 // "httpMethod": "DELETE", 3185 // "id": "deploymentmanager.compositeTypes.delete", 3186 // "parameterOrder": [ 3187 // "project", 3188 // "compositeType" 3189 // ], 3190 // "parameters": { 3191 // "compositeType": { 3192 // "description": "The name of the type for this request.", 3193 // "location": "path", 3194 // "pattern": "[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?", 3195 // "required": true, 3196 // "type": "string" 3197 // }, 3198 // "project": { 3199 // "description": "The project ID for this request.", 3200 // "location": "path", 3201 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 3202 // "required": true, 3203 // "type": "string" 3204 // } 3205 // }, 3206 // "path": "{project}/global/compositeTypes/{compositeType}", 3207 // "response": { 3208 // "$ref": "Operation" 3209 // }, 3210 // "scopes": [ 3211 // "https://www.googleapis.com/auth/cloud-platform", 3212 // "https://www.googleapis.com/auth/ndev.cloudman" 3213 // ] 3214 // } 3215 3216} 3217 3218// method id "deploymentmanager.compositeTypes.get": 3219 3220type CompositeTypesGetCall struct { 3221 s *Service 3222 project string 3223 compositeType string 3224 urlParams_ gensupport.URLParams 3225 ifNoneMatch_ string 3226 ctx_ context.Context 3227 header_ http.Header 3228} 3229 3230// Get: Gets information about a specific composite type. 3231func (r *CompositeTypesService) Get(project string, compositeType string) *CompositeTypesGetCall { 3232 c := &CompositeTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3233 c.project = project 3234 c.compositeType = compositeType 3235 return c 3236} 3237 3238// Fields allows partial responses to be retrieved. See 3239// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3240// for more information. 3241func (c *CompositeTypesGetCall) Fields(s ...googleapi.Field) *CompositeTypesGetCall { 3242 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3243 return c 3244} 3245 3246// IfNoneMatch sets the optional parameter which makes the operation 3247// fail if the object's ETag matches the given value. This is useful for 3248// getting updates only after the object has changed since the last 3249// request. Use googleapi.IsNotModified to check whether the response 3250// error from Do is the result of In-None-Match. 3251func (c *CompositeTypesGetCall) IfNoneMatch(entityTag string) *CompositeTypesGetCall { 3252 c.ifNoneMatch_ = entityTag 3253 return c 3254} 3255 3256// Context sets the context to be used in this call's Do method. Any 3257// pending HTTP request will be aborted if the provided context is 3258// canceled. 3259func (c *CompositeTypesGetCall) Context(ctx context.Context) *CompositeTypesGetCall { 3260 c.ctx_ = ctx 3261 return c 3262} 3263 3264// Header returns an http.Header that can be modified by the caller to 3265// add HTTP headers to the request. 3266func (c *CompositeTypesGetCall) Header() http.Header { 3267 if c.header_ == nil { 3268 c.header_ = make(http.Header) 3269 } 3270 return c.header_ 3271} 3272 3273func (c *CompositeTypesGetCall) doRequest(alt string) (*http.Response, error) { 3274 reqHeaders := make(http.Header) 3275 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 3276 for k, v := range c.header_ { 3277 reqHeaders[k] = v 3278 } 3279 reqHeaders.Set("User-Agent", c.s.userAgent()) 3280 if c.ifNoneMatch_ != "" { 3281 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3282 } 3283 var body io.Reader = nil 3284 c.urlParams_.Set("alt", alt) 3285 c.urlParams_.Set("prettyPrint", "false") 3286 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes/{compositeType}") 3287 urls += "?" + c.urlParams_.Encode() 3288 req, err := http.NewRequest("GET", urls, body) 3289 if err != nil { 3290 return nil, err 3291 } 3292 req.Header = reqHeaders 3293 googleapi.Expand(req.URL, map[string]string{ 3294 "project": c.project, 3295 "compositeType": c.compositeType, 3296 }) 3297 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3298} 3299 3300// Do executes the "deploymentmanager.compositeTypes.get" call. 3301// Exactly one of *CompositeType or error will be non-nil. Any non-2xx 3302// status code is an error. Response headers are in either 3303// *CompositeType.ServerResponse.Header or (if a response was returned 3304// at all) in error.(*googleapi.Error).Header. Use 3305// googleapi.IsNotModified to check whether the returned error was 3306// because http.StatusNotModified was returned. 3307func (c *CompositeTypesGetCall) Do(opts ...googleapi.CallOption) (*CompositeType, error) { 3308 gensupport.SetOptions(c.urlParams_, opts...) 3309 res, err := c.doRequest("json") 3310 if res != nil && res.StatusCode == http.StatusNotModified { 3311 if res.Body != nil { 3312 res.Body.Close() 3313 } 3314 return nil, &googleapi.Error{ 3315 Code: res.StatusCode, 3316 Header: res.Header, 3317 } 3318 } 3319 if err != nil { 3320 return nil, err 3321 } 3322 defer googleapi.CloseBody(res) 3323 if err := googleapi.CheckResponse(res); err != nil { 3324 return nil, err 3325 } 3326 ret := &CompositeType{ 3327 ServerResponse: googleapi.ServerResponse{ 3328 Header: res.Header, 3329 HTTPStatusCode: res.StatusCode, 3330 }, 3331 } 3332 target := &ret 3333 if err := gensupport.DecodeResponse(target, res); err != nil { 3334 return nil, err 3335 } 3336 return ret, nil 3337 // { 3338 // "description": "Gets information about a specific composite type.", 3339 // "httpMethod": "GET", 3340 // "id": "deploymentmanager.compositeTypes.get", 3341 // "parameterOrder": [ 3342 // "project", 3343 // "compositeType" 3344 // ], 3345 // "parameters": { 3346 // "compositeType": { 3347 // "description": "The name of the composite type for this request.", 3348 // "location": "path", 3349 // "pattern": "[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?", 3350 // "required": true, 3351 // "type": "string" 3352 // }, 3353 // "project": { 3354 // "description": "The project ID for this request.", 3355 // "location": "path", 3356 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 3357 // "required": true, 3358 // "type": "string" 3359 // } 3360 // }, 3361 // "path": "{project}/global/compositeTypes/{compositeType}", 3362 // "response": { 3363 // "$ref": "CompositeType" 3364 // }, 3365 // "scopes": [ 3366 // "https://www.googleapis.com/auth/cloud-platform", 3367 // "https://www.googleapis.com/auth/cloud-platform.read-only", 3368 // "https://www.googleapis.com/auth/ndev.cloudman", 3369 // "https://www.googleapis.com/auth/ndev.cloudman.readonly" 3370 // ] 3371 // } 3372 3373} 3374 3375// method id "deploymentmanager.compositeTypes.insert": 3376 3377type CompositeTypesInsertCall struct { 3378 s *Service 3379 project string 3380 compositetype *CompositeType 3381 urlParams_ gensupport.URLParams 3382 ctx_ context.Context 3383 header_ http.Header 3384} 3385 3386// Insert: Creates a composite type. 3387func (r *CompositeTypesService) Insert(project string, compositetype *CompositeType) *CompositeTypesInsertCall { 3388 c := &CompositeTypesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3389 c.project = project 3390 c.compositetype = compositetype 3391 return c 3392} 3393 3394// Fields allows partial responses to be retrieved. See 3395// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3396// for more information. 3397func (c *CompositeTypesInsertCall) Fields(s ...googleapi.Field) *CompositeTypesInsertCall { 3398 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3399 return c 3400} 3401 3402// Context sets the context to be used in this call's Do method. Any 3403// pending HTTP request will be aborted if the provided context is 3404// canceled. 3405func (c *CompositeTypesInsertCall) Context(ctx context.Context) *CompositeTypesInsertCall { 3406 c.ctx_ = ctx 3407 return c 3408} 3409 3410// Header returns an http.Header that can be modified by the caller to 3411// add HTTP headers to the request. 3412func (c *CompositeTypesInsertCall) Header() http.Header { 3413 if c.header_ == nil { 3414 c.header_ = make(http.Header) 3415 } 3416 return c.header_ 3417} 3418 3419func (c *CompositeTypesInsertCall) doRequest(alt string) (*http.Response, error) { 3420 reqHeaders := make(http.Header) 3421 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 3422 for k, v := range c.header_ { 3423 reqHeaders[k] = v 3424 } 3425 reqHeaders.Set("User-Agent", c.s.userAgent()) 3426 var body io.Reader = nil 3427 body, err := googleapi.WithoutDataWrapper.JSONReader(c.compositetype) 3428 if err != nil { 3429 return nil, err 3430 } 3431 reqHeaders.Set("Content-Type", "application/json") 3432 c.urlParams_.Set("alt", alt) 3433 c.urlParams_.Set("prettyPrint", "false") 3434 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes") 3435 urls += "?" + c.urlParams_.Encode() 3436 req, err := http.NewRequest("POST", urls, body) 3437 if err != nil { 3438 return nil, err 3439 } 3440 req.Header = reqHeaders 3441 googleapi.Expand(req.URL, map[string]string{ 3442 "project": c.project, 3443 }) 3444 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3445} 3446 3447// Do executes the "deploymentmanager.compositeTypes.insert" call. 3448// Exactly one of *Operation or error will be non-nil. Any non-2xx 3449// status code is an error. Response headers are in either 3450// *Operation.ServerResponse.Header or (if a response was returned at 3451// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3452// to check whether the returned error was because 3453// http.StatusNotModified was returned. 3454func (c *CompositeTypesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3455 gensupport.SetOptions(c.urlParams_, opts...) 3456 res, err := c.doRequest("json") 3457 if res != nil && res.StatusCode == http.StatusNotModified { 3458 if res.Body != nil { 3459 res.Body.Close() 3460 } 3461 return nil, &googleapi.Error{ 3462 Code: res.StatusCode, 3463 Header: res.Header, 3464 } 3465 } 3466 if err != nil { 3467 return nil, err 3468 } 3469 defer googleapi.CloseBody(res) 3470 if err := googleapi.CheckResponse(res); err != nil { 3471 return nil, err 3472 } 3473 ret := &Operation{ 3474 ServerResponse: googleapi.ServerResponse{ 3475 Header: res.Header, 3476 HTTPStatusCode: res.StatusCode, 3477 }, 3478 } 3479 target := &ret 3480 if err := gensupport.DecodeResponse(target, res); err != nil { 3481 return nil, err 3482 } 3483 return ret, nil 3484 // { 3485 // "description": "Creates a composite type.", 3486 // "httpMethod": "POST", 3487 // "id": "deploymentmanager.compositeTypes.insert", 3488 // "parameterOrder": [ 3489 // "project" 3490 // ], 3491 // "parameters": { 3492 // "project": { 3493 // "description": "The project ID for this request.", 3494 // "location": "path", 3495 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 3496 // "required": true, 3497 // "type": "string" 3498 // } 3499 // }, 3500 // "path": "{project}/global/compositeTypes", 3501 // "request": { 3502 // "$ref": "CompositeType" 3503 // }, 3504 // "response": { 3505 // "$ref": "Operation" 3506 // }, 3507 // "scopes": [ 3508 // "https://www.googleapis.com/auth/cloud-platform", 3509 // "https://www.googleapis.com/auth/ndev.cloudman" 3510 // ] 3511 // } 3512 3513} 3514 3515// method id "deploymentmanager.compositeTypes.list": 3516 3517type CompositeTypesListCall struct { 3518 s *Service 3519 project string 3520 urlParams_ gensupport.URLParams 3521 ifNoneMatch_ string 3522 ctx_ context.Context 3523 header_ http.Header 3524} 3525 3526// List: Lists all composite types for Deployment Manager. 3527func (r *CompositeTypesService) List(project string) *CompositeTypesListCall { 3528 c := &CompositeTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3529 c.project = project 3530 return c 3531} 3532 3533// Filter sets the optional parameter "filter": A filter expression that 3534// filters resources listed in the response. The expression must specify 3535// the field name, a comparison operator, and the value that you want to 3536// use for filtering. The value must be a string, a number, or a 3537// boolean. The comparison operator must be either =, !=, >, or <. 3538// 3539// For example, if you are filtering Compute Engine instances, you can 3540// exclude instances named example-instance by specifying name != 3541// example-instance. 3542// 3543// You can also filter nested fields. For example, you could specify 3544// scheduling.automaticRestart = false to include instances only if they 3545// are not scheduled for automatic restarts. You can use filtering on 3546// nested fields to filter based on resource labels. 3547// 3548// To filter on multiple expressions, provide each separate expression 3549// within parentheses. For example, (scheduling.automaticRestart = true) 3550// (cpuPlatform = "Intel Skylake"). By default, each expression is an 3551// AND expression. However, you can include AND and OR expressions 3552// explicitly. For example, (cpuPlatform = "Intel Skylake") OR 3553// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = 3554// true). 3555func (c *CompositeTypesListCall) Filter(filter string) *CompositeTypesListCall { 3556 c.urlParams_.Set("filter", filter) 3557 return c 3558} 3559 3560// MaxResults sets the optional parameter "maxResults": The maximum 3561// number of results per page that should be returned. If the number of 3562// available results is larger than maxResults, Compute Engine returns a 3563// nextPageToken that can be used to get the next page of results in 3564// subsequent list requests. Acceptable values are 0 to 500, inclusive. 3565// (Default: 500) 3566func (c *CompositeTypesListCall) MaxResults(maxResults int64) *CompositeTypesListCall { 3567 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 3568 return c 3569} 3570 3571// OrderBy sets the optional parameter "orderBy": Sorts list results by 3572// a certain order. By default, results are returned in alphanumerical 3573// order based on the resource name. 3574// 3575// You can also sort results in descending order based on the creation 3576// timestamp using orderBy="creationTimestamp desc". This sorts results 3577// based on the creationTimestamp field in reverse chronological order 3578// (newest result first). Use this to sort resources like operations so 3579// that the newest operation is returned first. 3580// 3581// Currently, only sorting by name or creationTimestamp desc is 3582// supported. 3583func (c *CompositeTypesListCall) OrderBy(orderBy string) *CompositeTypesListCall { 3584 c.urlParams_.Set("orderBy", orderBy) 3585 return c 3586} 3587 3588// PageToken sets the optional parameter "pageToken": Specifies a page 3589// token to use. Set pageToken to the nextPageToken returned by a 3590// previous list request to get the next page of results. 3591func (c *CompositeTypesListCall) PageToken(pageToken string) *CompositeTypesListCall { 3592 c.urlParams_.Set("pageToken", pageToken) 3593 return c 3594} 3595 3596// Fields allows partial responses to be retrieved. See 3597// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3598// for more information. 3599func (c *CompositeTypesListCall) Fields(s ...googleapi.Field) *CompositeTypesListCall { 3600 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3601 return c 3602} 3603 3604// IfNoneMatch sets the optional parameter which makes the operation 3605// fail if the object's ETag matches the given value. This is useful for 3606// getting updates only after the object has changed since the last 3607// request. Use googleapi.IsNotModified to check whether the response 3608// error from Do is the result of In-None-Match. 3609func (c *CompositeTypesListCall) IfNoneMatch(entityTag string) *CompositeTypesListCall { 3610 c.ifNoneMatch_ = entityTag 3611 return c 3612} 3613 3614// Context sets the context to be used in this call's Do method. Any 3615// pending HTTP request will be aborted if the provided context is 3616// canceled. 3617func (c *CompositeTypesListCall) Context(ctx context.Context) *CompositeTypesListCall { 3618 c.ctx_ = ctx 3619 return c 3620} 3621 3622// Header returns an http.Header that can be modified by the caller to 3623// add HTTP headers to the request. 3624func (c *CompositeTypesListCall) Header() http.Header { 3625 if c.header_ == nil { 3626 c.header_ = make(http.Header) 3627 } 3628 return c.header_ 3629} 3630 3631func (c *CompositeTypesListCall) doRequest(alt string) (*http.Response, error) { 3632 reqHeaders := make(http.Header) 3633 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 3634 for k, v := range c.header_ { 3635 reqHeaders[k] = v 3636 } 3637 reqHeaders.Set("User-Agent", c.s.userAgent()) 3638 if c.ifNoneMatch_ != "" { 3639 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3640 } 3641 var body io.Reader = nil 3642 c.urlParams_.Set("alt", alt) 3643 c.urlParams_.Set("prettyPrint", "false") 3644 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes") 3645 urls += "?" + c.urlParams_.Encode() 3646 req, err := http.NewRequest("GET", urls, body) 3647 if err != nil { 3648 return nil, err 3649 } 3650 req.Header = reqHeaders 3651 googleapi.Expand(req.URL, map[string]string{ 3652 "project": c.project, 3653 }) 3654 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3655} 3656 3657// Do executes the "deploymentmanager.compositeTypes.list" call. 3658// Exactly one of *CompositeTypesListResponse or error will be non-nil. 3659// Any non-2xx status code is an error. Response headers are in either 3660// *CompositeTypesListResponse.ServerResponse.Header or (if a response 3661// was returned at all) in error.(*googleapi.Error).Header. Use 3662// googleapi.IsNotModified to check whether the returned error was 3663// because http.StatusNotModified was returned. 3664func (c *CompositeTypesListCall) Do(opts ...googleapi.CallOption) (*CompositeTypesListResponse, error) { 3665 gensupport.SetOptions(c.urlParams_, opts...) 3666 res, err := c.doRequest("json") 3667 if res != nil && res.StatusCode == http.StatusNotModified { 3668 if res.Body != nil { 3669 res.Body.Close() 3670 } 3671 return nil, &googleapi.Error{ 3672 Code: res.StatusCode, 3673 Header: res.Header, 3674 } 3675 } 3676 if err != nil { 3677 return nil, err 3678 } 3679 defer googleapi.CloseBody(res) 3680 if err := googleapi.CheckResponse(res); err != nil { 3681 return nil, err 3682 } 3683 ret := &CompositeTypesListResponse{ 3684 ServerResponse: googleapi.ServerResponse{ 3685 Header: res.Header, 3686 HTTPStatusCode: res.StatusCode, 3687 }, 3688 } 3689 target := &ret 3690 if err := gensupport.DecodeResponse(target, res); err != nil { 3691 return nil, err 3692 } 3693 return ret, nil 3694 // { 3695 // "description": "Lists all composite types for Deployment Manager.", 3696 // "httpMethod": "GET", 3697 // "id": "deploymentmanager.compositeTypes.list", 3698 // "parameterOrder": [ 3699 // "project" 3700 // ], 3701 // "parameters": { 3702 // "filter": { 3703 // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", 3704 // "location": "query", 3705 // "type": "string" 3706 // }, 3707 // "maxResults": { 3708 // "default": "500", 3709 // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", 3710 // "format": "uint32", 3711 // "location": "query", 3712 // "minimum": "0", 3713 // "type": "integer" 3714 // }, 3715 // "orderBy": { 3716 // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", 3717 // "location": "query", 3718 // "type": "string" 3719 // }, 3720 // "pageToken": { 3721 // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", 3722 // "location": "query", 3723 // "type": "string" 3724 // }, 3725 // "project": { 3726 // "description": "The project ID for this request.", 3727 // "location": "path", 3728 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 3729 // "required": true, 3730 // "type": "string" 3731 // } 3732 // }, 3733 // "path": "{project}/global/compositeTypes", 3734 // "response": { 3735 // "$ref": "CompositeTypesListResponse" 3736 // }, 3737 // "scopes": [ 3738 // "https://www.googleapis.com/auth/cloud-platform", 3739 // "https://www.googleapis.com/auth/cloud-platform.read-only", 3740 // "https://www.googleapis.com/auth/ndev.cloudman", 3741 // "https://www.googleapis.com/auth/ndev.cloudman.readonly" 3742 // ] 3743 // } 3744 3745} 3746 3747// Pages invokes f for each page of results. 3748// A non-nil error returned from f will halt the iteration. 3749// The provided context supersedes any context provided to the Context method. 3750func (c *CompositeTypesListCall) Pages(ctx context.Context, f func(*CompositeTypesListResponse) error) error { 3751 c.ctx_ = ctx 3752 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 3753 for { 3754 x, err := c.Do() 3755 if err != nil { 3756 return err 3757 } 3758 if err := f(x); err != nil { 3759 return err 3760 } 3761 if x.NextPageToken == "" { 3762 return nil 3763 } 3764 c.PageToken(x.NextPageToken) 3765 } 3766} 3767 3768// method id "deploymentmanager.compositeTypes.patch": 3769 3770type CompositeTypesPatchCall struct { 3771 s *Service 3772 project string 3773 compositeType string 3774 compositetype *CompositeType 3775 urlParams_ gensupport.URLParams 3776 ctx_ context.Context 3777 header_ http.Header 3778} 3779 3780// Patch: Updates a composite type. This method supports patch 3781// semantics. 3782func (r *CompositeTypesService) Patch(project string, compositeType string, compositetype *CompositeType) *CompositeTypesPatchCall { 3783 c := &CompositeTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3784 c.project = project 3785 c.compositeType = compositeType 3786 c.compositetype = compositetype 3787 return c 3788} 3789 3790// Fields allows partial responses to be retrieved. See 3791// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3792// for more information. 3793func (c *CompositeTypesPatchCall) Fields(s ...googleapi.Field) *CompositeTypesPatchCall { 3794 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3795 return c 3796} 3797 3798// Context sets the context to be used in this call's Do method. Any 3799// pending HTTP request will be aborted if the provided context is 3800// canceled. 3801func (c *CompositeTypesPatchCall) Context(ctx context.Context) *CompositeTypesPatchCall { 3802 c.ctx_ = ctx 3803 return c 3804} 3805 3806// Header returns an http.Header that can be modified by the caller to 3807// add HTTP headers to the request. 3808func (c *CompositeTypesPatchCall) Header() http.Header { 3809 if c.header_ == nil { 3810 c.header_ = make(http.Header) 3811 } 3812 return c.header_ 3813} 3814 3815func (c *CompositeTypesPatchCall) doRequest(alt string) (*http.Response, error) { 3816 reqHeaders := make(http.Header) 3817 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 3818 for k, v := range c.header_ { 3819 reqHeaders[k] = v 3820 } 3821 reqHeaders.Set("User-Agent", c.s.userAgent()) 3822 var body io.Reader = nil 3823 body, err := googleapi.WithoutDataWrapper.JSONReader(c.compositetype) 3824 if err != nil { 3825 return nil, err 3826 } 3827 reqHeaders.Set("Content-Type", "application/json") 3828 c.urlParams_.Set("alt", alt) 3829 c.urlParams_.Set("prettyPrint", "false") 3830 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes/{compositeType}") 3831 urls += "?" + c.urlParams_.Encode() 3832 req, err := http.NewRequest("PATCH", urls, body) 3833 if err != nil { 3834 return nil, err 3835 } 3836 req.Header = reqHeaders 3837 googleapi.Expand(req.URL, map[string]string{ 3838 "project": c.project, 3839 "compositeType": c.compositeType, 3840 }) 3841 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3842} 3843 3844// Do executes the "deploymentmanager.compositeTypes.patch" call. 3845// Exactly one of *Operation or error will be non-nil. Any non-2xx 3846// status code is an error. Response headers are in either 3847// *Operation.ServerResponse.Header or (if a response was returned at 3848// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3849// to check whether the returned error was because 3850// http.StatusNotModified was returned. 3851func (c *CompositeTypesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3852 gensupport.SetOptions(c.urlParams_, opts...) 3853 res, err := c.doRequest("json") 3854 if res != nil && res.StatusCode == http.StatusNotModified { 3855 if res.Body != nil { 3856 res.Body.Close() 3857 } 3858 return nil, &googleapi.Error{ 3859 Code: res.StatusCode, 3860 Header: res.Header, 3861 } 3862 } 3863 if err != nil { 3864 return nil, err 3865 } 3866 defer googleapi.CloseBody(res) 3867 if err := googleapi.CheckResponse(res); err != nil { 3868 return nil, err 3869 } 3870 ret := &Operation{ 3871 ServerResponse: googleapi.ServerResponse{ 3872 Header: res.Header, 3873 HTTPStatusCode: res.StatusCode, 3874 }, 3875 } 3876 target := &ret 3877 if err := gensupport.DecodeResponse(target, res); err != nil { 3878 return nil, err 3879 } 3880 return ret, nil 3881 // { 3882 // "description": "Updates a composite type. This method supports patch semantics.", 3883 // "httpMethod": "PATCH", 3884 // "id": "deploymentmanager.compositeTypes.patch", 3885 // "parameterOrder": [ 3886 // "project", 3887 // "compositeType" 3888 // ], 3889 // "parameters": { 3890 // "compositeType": { 3891 // "description": "The name of the composite type for this request.", 3892 // "location": "path", 3893 // "pattern": "[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?", 3894 // "required": true, 3895 // "type": "string" 3896 // }, 3897 // "project": { 3898 // "description": "The project ID for this request.", 3899 // "location": "path", 3900 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 3901 // "required": true, 3902 // "type": "string" 3903 // } 3904 // }, 3905 // "path": "{project}/global/compositeTypes/{compositeType}", 3906 // "request": { 3907 // "$ref": "CompositeType" 3908 // }, 3909 // "response": { 3910 // "$ref": "Operation" 3911 // }, 3912 // "scopes": [ 3913 // "https://www.googleapis.com/auth/cloud-platform", 3914 // "https://www.googleapis.com/auth/ndev.cloudman" 3915 // ] 3916 // } 3917 3918} 3919 3920// method id "deploymentmanager.compositeTypes.update": 3921 3922type CompositeTypesUpdateCall struct { 3923 s *Service 3924 project string 3925 compositeType string 3926 compositetype *CompositeType 3927 urlParams_ gensupport.URLParams 3928 ctx_ context.Context 3929 header_ http.Header 3930} 3931 3932// Update: Updates a composite type. 3933func (r *CompositeTypesService) Update(project string, compositeType string, compositetype *CompositeType) *CompositeTypesUpdateCall { 3934 c := &CompositeTypesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3935 c.project = project 3936 c.compositeType = compositeType 3937 c.compositetype = compositetype 3938 return c 3939} 3940 3941// Fields allows partial responses to be retrieved. See 3942// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3943// for more information. 3944func (c *CompositeTypesUpdateCall) Fields(s ...googleapi.Field) *CompositeTypesUpdateCall { 3945 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3946 return c 3947} 3948 3949// Context sets the context to be used in this call's Do method. Any 3950// pending HTTP request will be aborted if the provided context is 3951// canceled. 3952func (c *CompositeTypesUpdateCall) Context(ctx context.Context) *CompositeTypesUpdateCall { 3953 c.ctx_ = ctx 3954 return c 3955} 3956 3957// Header returns an http.Header that can be modified by the caller to 3958// add HTTP headers to the request. 3959func (c *CompositeTypesUpdateCall) Header() http.Header { 3960 if c.header_ == nil { 3961 c.header_ = make(http.Header) 3962 } 3963 return c.header_ 3964} 3965 3966func (c *CompositeTypesUpdateCall) doRequest(alt string) (*http.Response, error) { 3967 reqHeaders := make(http.Header) 3968 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 3969 for k, v := range c.header_ { 3970 reqHeaders[k] = v 3971 } 3972 reqHeaders.Set("User-Agent", c.s.userAgent()) 3973 var body io.Reader = nil 3974 body, err := googleapi.WithoutDataWrapper.JSONReader(c.compositetype) 3975 if err != nil { 3976 return nil, err 3977 } 3978 reqHeaders.Set("Content-Type", "application/json") 3979 c.urlParams_.Set("alt", alt) 3980 c.urlParams_.Set("prettyPrint", "false") 3981 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/compositeTypes/{compositeType}") 3982 urls += "?" + c.urlParams_.Encode() 3983 req, err := http.NewRequest("PUT", urls, body) 3984 if err != nil { 3985 return nil, err 3986 } 3987 req.Header = reqHeaders 3988 googleapi.Expand(req.URL, map[string]string{ 3989 "project": c.project, 3990 "compositeType": c.compositeType, 3991 }) 3992 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3993} 3994 3995// Do executes the "deploymentmanager.compositeTypes.update" call. 3996// Exactly one of *Operation or error will be non-nil. Any non-2xx 3997// status code is an error. Response headers are in either 3998// *Operation.ServerResponse.Header or (if a response was returned at 3999// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4000// to check whether the returned error was because 4001// http.StatusNotModified was returned. 4002func (c *CompositeTypesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4003 gensupport.SetOptions(c.urlParams_, opts...) 4004 res, err := c.doRequest("json") 4005 if res != nil && res.StatusCode == http.StatusNotModified { 4006 if res.Body != nil { 4007 res.Body.Close() 4008 } 4009 return nil, &googleapi.Error{ 4010 Code: res.StatusCode, 4011 Header: res.Header, 4012 } 4013 } 4014 if err != nil { 4015 return nil, err 4016 } 4017 defer googleapi.CloseBody(res) 4018 if err := googleapi.CheckResponse(res); err != nil { 4019 return nil, err 4020 } 4021 ret := &Operation{ 4022 ServerResponse: googleapi.ServerResponse{ 4023 Header: res.Header, 4024 HTTPStatusCode: res.StatusCode, 4025 }, 4026 } 4027 target := &ret 4028 if err := gensupport.DecodeResponse(target, res); err != nil { 4029 return nil, err 4030 } 4031 return ret, nil 4032 // { 4033 // "description": "Updates a composite type.", 4034 // "httpMethod": "PUT", 4035 // "id": "deploymentmanager.compositeTypes.update", 4036 // "parameterOrder": [ 4037 // "project", 4038 // "compositeType" 4039 // ], 4040 // "parameters": { 4041 // "compositeType": { 4042 // "description": "The name of the composite type for this request.", 4043 // "location": "path", 4044 // "pattern": "[a-z](?:[-a-z0-9_.]{0,61}[a-z0-9])?", 4045 // "required": true, 4046 // "type": "string" 4047 // }, 4048 // "project": { 4049 // "description": "The project ID for this request.", 4050 // "location": "path", 4051 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 4052 // "required": true, 4053 // "type": "string" 4054 // } 4055 // }, 4056 // "path": "{project}/global/compositeTypes/{compositeType}", 4057 // "request": { 4058 // "$ref": "CompositeType" 4059 // }, 4060 // "response": { 4061 // "$ref": "Operation" 4062 // }, 4063 // "scopes": [ 4064 // "https://www.googleapis.com/auth/cloud-platform", 4065 // "https://www.googleapis.com/auth/ndev.cloudman" 4066 // ] 4067 // } 4068 4069} 4070 4071// method id "deploymentmanager.deployments.cancelPreview": 4072 4073type DeploymentsCancelPreviewCall struct { 4074 s *Service 4075 project string 4076 deployment string 4077 deploymentscancelpreviewrequest *DeploymentsCancelPreviewRequest 4078 urlParams_ gensupport.URLParams 4079 ctx_ context.Context 4080 header_ http.Header 4081} 4082 4083// CancelPreview: Cancels and removes the preview currently associated 4084// with the deployment. 4085func (r *DeploymentsService) CancelPreview(project string, deployment string, deploymentscancelpreviewrequest *DeploymentsCancelPreviewRequest) *DeploymentsCancelPreviewCall { 4086 c := &DeploymentsCancelPreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4087 c.project = project 4088 c.deployment = deployment 4089 c.deploymentscancelpreviewrequest = deploymentscancelpreviewrequest 4090 return c 4091} 4092 4093// Fields allows partial responses to be retrieved. See 4094// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4095// for more information. 4096func (c *DeploymentsCancelPreviewCall) Fields(s ...googleapi.Field) *DeploymentsCancelPreviewCall { 4097 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4098 return c 4099} 4100 4101// Context sets the context to be used in this call's Do method. Any 4102// pending HTTP request will be aborted if the provided context is 4103// canceled. 4104func (c *DeploymentsCancelPreviewCall) Context(ctx context.Context) *DeploymentsCancelPreviewCall { 4105 c.ctx_ = ctx 4106 return c 4107} 4108 4109// Header returns an http.Header that can be modified by the caller to 4110// add HTTP headers to the request. 4111func (c *DeploymentsCancelPreviewCall) Header() http.Header { 4112 if c.header_ == nil { 4113 c.header_ = make(http.Header) 4114 } 4115 return c.header_ 4116} 4117 4118func (c *DeploymentsCancelPreviewCall) doRequest(alt string) (*http.Response, error) { 4119 reqHeaders := make(http.Header) 4120 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4121 for k, v := range c.header_ { 4122 reqHeaders[k] = v 4123 } 4124 reqHeaders.Set("User-Agent", c.s.userAgent()) 4125 var body io.Reader = nil 4126 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deploymentscancelpreviewrequest) 4127 if err != nil { 4128 return nil, err 4129 } 4130 reqHeaders.Set("Content-Type", "application/json") 4131 c.urlParams_.Set("alt", alt) 4132 c.urlParams_.Set("prettyPrint", "false") 4133 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/cancelPreview") 4134 urls += "?" + c.urlParams_.Encode() 4135 req, err := http.NewRequest("POST", urls, body) 4136 if err != nil { 4137 return nil, err 4138 } 4139 req.Header = reqHeaders 4140 googleapi.Expand(req.URL, map[string]string{ 4141 "project": c.project, 4142 "deployment": c.deployment, 4143 }) 4144 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4145} 4146 4147// Do executes the "deploymentmanager.deployments.cancelPreview" call. 4148// Exactly one of *Operation or error will be non-nil. Any non-2xx 4149// status code is an error. Response headers are in either 4150// *Operation.ServerResponse.Header or (if a response was returned at 4151// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4152// to check whether the returned error was because 4153// http.StatusNotModified was returned. 4154func (c *DeploymentsCancelPreviewCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4155 gensupport.SetOptions(c.urlParams_, opts...) 4156 res, err := c.doRequest("json") 4157 if res != nil && res.StatusCode == http.StatusNotModified { 4158 if res.Body != nil { 4159 res.Body.Close() 4160 } 4161 return nil, &googleapi.Error{ 4162 Code: res.StatusCode, 4163 Header: res.Header, 4164 } 4165 } 4166 if err != nil { 4167 return nil, err 4168 } 4169 defer googleapi.CloseBody(res) 4170 if err := googleapi.CheckResponse(res); err != nil { 4171 return nil, err 4172 } 4173 ret := &Operation{ 4174 ServerResponse: googleapi.ServerResponse{ 4175 Header: res.Header, 4176 HTTPStatusCode: res.StatusCode, 4177 }, 4178 } 4179 target := &ret 4180 if err := gensupport.DecodeResponse(target, res); err != nil { 4181 return nil, err 4182 } 4183 return ret, nil 4184 // { 4185 // "description": "Cancels and removes the preview currently associated with the deployment.", 4186 // "httpMethod": "POST", 4187 // "id": "deploymentmanager.deployments.cancelPreview", 4188 // "parameterOrder": [ 4189 // "project", 4190 // "deployment" 4191 // ], 4192 // "parameters": { 4193 // "deployment": { 4194 // "description": "The name of the deployment for this request.", 4195 // "location": "path", 4196 // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", 4197 // "required": true, 4198 // "type": "string" 4199 // }, 4200 // "project": { 4201 // "description": "The project ID for this request.", 4202 // "location": "path", 4203 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 4204 // "required": true, 4205 // "type": "string" 4206 // } 4207 // }, 4208 // "path": "{project}/global/deployments/{deployment}/cancelPreview", 4209 // "request": { 4210 // "$ref": "DeploymentsCancelPreviewRequest" 4211 // }, 4212 // "response": { 4213 // "$ref": "Operation" 4214 // }, 4215 // "scopes": [ 4216 // "https://www.googleapis.com/auth/cloud-platform", 4217 // "https://www.googleapis.com/auth/ndev.cloudman" 4218 // ] 4219 // } 4220 4221} 4222 4223// method id "deploymentmanager.deployments.delete": 4224 4225type DeploymentsDeleteCall struct { 4226 s *Service 4227 project string 4228 deployment string 4229 urlParams_ gensupport.URLParams 4230 ctx_ context.Context 4231 header_ http.Header 4232} 4233 4234// Delete: Deletes a deployment and all of the resources in the 4235// deployment. 4236func (r *DeploymentsService) Delete(project string, deployment string) *DeploymentsDeleteCall { 4237 c := &DeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4238 c.project = project 4239 c.deployment = deployment 4240 return c 4241} 4242 4243// DeletePolicy sets the optional parameter "deletePolicy": Sets the 4244// policy to use for deleting resources. 4245// 4246// Possible values: 4247// "ABANDON" 4248// "DELETE" (default) 4249func (c *DeploymentsDeleteCall) DeletePolicy(deletePolicy string) *DeploymentsDeleteCall { 4250 c.urlParams_.Set("deletePolicy", deletePolicy) 4251 return c 4252} 4253 4254// Fields allows partial responses to be retrieved. See 4255// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4256// for more information. 4257func (c *DeploymentsDeleteCall) Fields(s ...googleapi.Field) *DeploymentsDeleteCall { 4258 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4259 return c 4260} 4261 4262// Context sets the context to be used in this call's Do method. Any 4263// pending HTTP request will be aborted if the provided context is 4264// canceled. 4265func (c *DeploymentsDeleteCall) Context(ctx context.Context) *DeploymentsDeleteCall { 4266 c.ctx_ = ctx 4267 return c 4268} 4269 4270// Header returns an http.Header that can be modified by the caller to 4271// add HTTP headers to the request. 4272func (c *DeploymentsDeleteCall) Header() http.Header { 4273 if c.header_ == nil { 4274 c.header_ = make(http.Header) 4275 } 4276 return c.header_ 4277} 4278 4279func (c *DeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) { 4280 reqHeaders := make(http.Header) 4281 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4282 for k, v := range c.header_ { 4283 reqHeaders[k] = v 4284 } 4285 reqHeaders.Set("User-Agent", c.s.userAgent()) 4286 var body io.Reader = nil 4287 c.urlParams_.Set("alt", alt) 4288 c.urlParams_.Set("prettyPrint", "false") 4289 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}") 4290 urls += "?" + c.urlParams_.Encode() 4291 req, err := http.NewRequest("DELETE", urls, body) 4292 if err != nil { 4293 return nil, err 4294 } 4295 req.Header = reqHeaders 4296 googleapi.Expand(req.URL, map[string]string{ 4297 "project": c.project, 4298 "deployment": c.deployment, 4299 }) 4300 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4301} 4302 4303// Do executes the "deploymentmanager.deployments.delete" call. 4304// Exactly one of *Operation or error will be non-nil. Any non-2xx 4305// status code is an error. Response headers are in either 4306// *Operation.ServerResponse.Header or (if a response was returned at 4307// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4308// to check whether the returned error was because 4309// http.StatusNotModified was returned. 4310func (c *DeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4311 gensupport.SetOptions(c.urlParams_, opts...) 4312 res, err := c.doRequest("json") 4313 if res != nil && res.StatusCode == http.StatusNotModified { 4314 if res.Body != nil { 4315 res.Body.Close() 4316 } 4317 return nil, &googleapi.Error{ 4318 Code: res.StatusCode, 4319 Header: res.Header, 4320 } 4321 } 4322 if err != nil { 4323 return nil, err 4324 } 4325 defer googleapi.CloseBody(res) 4326 if err := googleapi.CheckResponse(res); err != nil { 4327 return nil, err 4328 } 4329 ret := &Operation{ 4330 ServerResponse: googleapi.ServerResponse{ 4331 Header: res.Header, 4332 HTTPStatusCode: res.StatusCode, 4333 }, 4334 } 4335 target := &ret 4336 if err := gensupport.DecodeResponse(target, res); err != nil { 4337 return nil, err 4338 } 4339 return ret, nil 4340 // { 4341 // "description": "Deletes a deployment and all of the resources in the deployment.", 4342 // "httpMethod": "DELETE", 4343 // "id": "deploymentmanager.deployments.delete", 4344 // "parameterOrder": [ 4345 // "project", 4346 // "deployment" 4347 // ], 4348 // "parameters": { 4349 // "deletePolicy": { 4350 // "default": "DELETE", 4351 // "description": "Sets the policy to use for deleting resources.", 4352 // "enum": [ 4353 // "ABANDON", 4354 // "DELETE" 4355 // ], 4356 // "enumDescriptions": [ 4357 // "", 4358 // "" 4359 // ], 4360 // "location": "query", 4361 // "type": "string" 4362 // }, 4363 // "deployment": { 4364 // "description": "The name of the deployment for this request.", 4365 // "location": "path", 4366 // "required": true, 4367 // "type": "string" 4368 // }, 4369 // "project": { 4370 // "description": "The project ID for this request.", 4371 // "location": "path", 4372 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 4373 // "required": true, 4374 // "type": "string" 4375 // } 4376 // }, 4377 // "path": "{project}/global/deployments/{deployment}", 4378 // "response": { 4379 // "$ref": "Operation" 4380 // }, 4381 // "scopes": [ 4382 // "https://www.googleapis.com/auth/cloud-platform", 4383 // "https://www.googleapis.com/auth/ndev.cloudman" 4384 // ] 4385 // } 4386 4387} 4388 4389// method id "deploymentmanager.deployments.get": 4390 4391type DeploymentsGetCall struct { 4392 s *Service 4393 project string 4394 deployment string 4395 urlParams_ gensupport.URLParams 4396 ifNoneMatch_ string 4397 ctx_ context.Context 4398 header_ http.Header 4399} 4400 4401// Get: Gets information about a specific deployment. 4402func (r *DeploymentsService) Get(project string, deployment string) *DeploymentsGetCall { 4403 c := &DeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4404 c.project = project 4405 c.deployment = deployment 4406 return c 4407} 4408 4409// Fields allows partial responses to be retrieved. See 4410// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4411// for more information. 4412func (c *DeploymentsGetCall) Fields(s ...googleapi.Field) *DeploymentsGetCall { 4413 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4414 return c 4415} 4416 4417// IfNoneMatch sets the optional parameter which makes the operation 4418// fail if the object's ETag matches the given value. This is useful for 4419// getting updates only after the object has changed since the last 4420// request. Use googleapi.IsNotModified to check whether the response 4421// error from Do is the result of In-None-Match. 4422func (c *DeploymentsGetCall) IfNoneMatch(entityTag string) *DeploymentsGetCall { 4423 c.ifNoneMatch_ = entityTag 4424 return c 4425} 4426 4427// Context sets the context to be used in this call's Do method. Any 4428// pending HTTP request will be aborted if the provided context is 4429// canceled. 4430func (c *DeploymentsGetCall) Context(ctx context.Context) *DeploymentsGetCall { 4431 c.ctx_ = ctx 4432 return c 4433} 4434 4435// Header returns an http.Header that can be modified by the caller to 4436// add HTTP headers to the request. 4437func (c *DeploymentsGetCall) Header() http.Header { 4438 if c.header_ == nil { 4439 c.header_ = make(http.Header) 4440 } 4441 return c.header_ 4442} 4443 4444func (c *DeploymentsGetCall) doRequest(alt string) (*http.Response, error) { 4445 reqHeaders := make(http.Header) 4446 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4447 for k, v := range c.header_ { 4448 reqHeaders[k] = v 4449 } 4450 reqHeaders.Set("User-Agent", c.s.userAgent()) 4451 if c.ifNoneMatch_ != "" { 4452 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4453 } 4454 var body io.Reader = nil 4455 c.urlParams_.Set("alt", alt) 4456 c.urlParams_.Set("prettyPrint", "false") 4457 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}") 4458 urls += "?" + c.urlParams_.Encode() 4459 req, err := http.NewRequest("GET", urls, body) 4460 if err != nil { 4461 return nil, err 4462 } 4463 req.Header = reqHeaders 4464 googleapi.Expand(req.URL, map[string]string{ 4465 "project": c.project, 4466 "deployment": c.deployment, 4467 }) 4468 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4469} 4470 4471// Do executes the "deploymentmanager.deployments.get" call. 4472// Exactly one of *Deployment or error will be non-nil. Any non-2xx 4473// status code is an error. Response headers are in either 4474// *Deployment.ServerResponse.Header or (if a response was returned at 4475// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4476// to check whether the returned error was because 4477// http.StatusNotModified was returned. 4478func (c *DeploymentsGetCall) Do(opts ...googleapi.CallOption) (*Deployment, error) { 4479 gensupport.SetOptions(c.urlParams_, opts...) 4480 res, err := c.doRequest("json") 4481 if res != nil && res.StatusCode == http.StatusNotModified { 4482 if res.Body != nil { 4483 res.Body.Close() 4484 } 4485 return nil, &googleapi.Error{ 4486 Code: res.StatusCode, 4487 Header: res.Header, 4488 } 4489 } 4490 if err != nil { 4491 return nil, err 4492 } 4493 defer googleapi.CloseBody(res) 4494 if err := googleapi.CheckResponse(res); err != nil { 4495 return nil, err 4496 } 4497 ret := &Deployment{ 4498 ServerResponse: googleapi.ServerResponse{ 4499 Header: res.Header, 4500 HTTPStatusCode: res.StatusCode, 4501 }, 4502 } 4503 target := &ret 4504 if err := gensupport.DecodeResponse(target, res); err != nil { 4505 return nil, err 4506 } 4507 return ret, nil 4508 // { 4509 // "description": "Gets information about a specific deployment.", 4510 // "httpMethod": "GET", 4511 // "id": "deploymentmanager.deployments.get", 4512 // "parameterOrder": [ 4513 // "project", 4514 // "deployment" 4515 // ], 4516 // "parameters": { 4517 // "deployment": { 4518 // "description": "The name of the deployment for this request.", 4519 // "location": "path", 4520 // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", 4521 // "required": true, 4522 // "type": "string" 4523 // }, 4524 // "project": { 4525 // "description": "The project ID for this request.", 4526 // "location": "path", 4527 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 4528 // "required": true, 4529 // "type": "string" 4530 // } 4531 // }, 4532 // "path": "{project}/global/deployments/{deployment}", 4533 // "response": { 4534 // "$ref": "Deployment" 4535 // }, 4536 // "scopes": [ 4537 // "https://www.googleapis.com/auth/cloud-platform", 4538 // "https://www.googleapis.com/auth/cloud-platform.read-only", 4539 // "https://www.googleapis.com/auth/ndev.cloudman", 4540 // "https://www.googleapis.com/auth/ndev.cloudman.readonly" 4541 // ] 4542 // } 4543 4544} 4545 4546// method id "deploymentmanager.deployments.getIamPolicy": 4547 4548type DeploymentsGetIamPolicyCall struct { 4549 s *Service 4550 project string 4551 resource string 4552 urlParams_ gensupport.URLParams 4553 ifNoneMatch_ string 4554 ctx_ context.Context 4555 header_ http.Header 4556} 4557 4558// GetIamPolicy: Gets the access control policy for a resource. May be 4559// empty if no such policy or resource exists. 4560func (r *DeploymentsService) GetIamPolicy(project string, resource string) *DeploymentsGetIamPolicyCall { 4561 c := &DeploymentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4562 c.project = project 4563 c.resource = resource 4564 return c 4565} 4566 4567// Fields allows partial responses to be retrieved. See 4568// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4569// for more information. 4570func (c *DeploymentsGetIamPolicyCall) Fields(s ...googleapi.Field) *DeploymentsGetIamPolicyCall { 4571 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4572 return c 4573} 4574 4575// IfNoneMatch sets the optional parameter which makes the operation 4576// fail if the object's ETag matches the given value. This is useful for 4577// getting updates only after the object has changed since the last 4578// request. Use googleapi.IsNotModified to check whether the response 4579// error from Do is the result of In-None-Match. 4580func (c *DeploymentsGetIamPolicyCall) IfNoneMatch(entityTag string) *DeploymentsGetIamPolicyCall { 4581 c.ifNoneMatch_ = entityTag 4582 return c 4583} 4584 4585// Context sets the context to be used in this call's Do method. Any 4586// pending HTTP request will be aborted if the provided context is 4587// canceled. 4588func (c *DeploymentsGetIamPolicyCall) Context(ctx context.Context) *DeploymentsGetIamPolicyCall { 4589 c.ctx_ = ctx 4590 return c 4591} 4592 4593// Header returns an http.Header that can be modified by the caller to 4594// add HTTP headers to the request. 4595func (c *DeploymentsGetIamPolicyCall) Header() http.Header { 4596 if c.header_ == nil { 4597 c.header_ = make(http.Header) 4598 } 4599 return c.header_ 4600} 4601 4602func (c *DeploymentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 4603 reqHeaders := make(http.Header) 4604 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4605 for k, v := range c.header_ { 4606 reqHeaders[k] = v 4607 } 4608 reqHeaders.Set("User-Agent", c.s.userAgent()) 4609 if c.ifNoneMatch_ != "" { 4610 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4611 } 4612 var body io.Reader = nil 4613 c.urlParams_.Set("alt", alt) 4614 c.urlParams_.Set("prettyPrint", "false") 4615 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{resource}/getIamPolicy") 4616 urls += "?" + c.urlParams_.Encode() 4617 req, err := http.NewRequest("GET", urls, body) 4618 if err != nil { 4619 return nil, err 4620 } 4621 req.Header = reqHeaders 4622 googleapi.Expand(req.URL, map[string]string{ 4623 "project": c.project, 4624 "resource": c.resource, 4625 }) 4626 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4627} 4628 4629// Do executes the "deploymentmanager.deployments.getIamPolicy" call. 4630// Exactly one of *Policy or error will be non-nil. Any non-2xx status 4631// code is an error. Response headers are in either 4632// *Policy.ServerResponse.Header or (if a response was returned at all) 4633// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4634// check whether the returned error was because http.StatusNotModified 4635// was returned. 4636func (c *DeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 4637 gensupport.SetOptions(c.urlParams_, opts...) 4638 res, err := c.doRequest("json") 4639 if res != nil && res.StatusCode == http.StatusNotModified { 4640 if res.Body != nil { 4641 res.Body.Close() 4642 } 4643 return nil, &googleapi.Error{ 4644 Code: res.StatusCode, 4645 Header: res.Header, 4646 } 4647 } 4648 if err != nil { 4649 return nil, err 4650 } 4651 defer googleapi.CloseBody(res) 4652 if err := googleapi.CheckResponse(res); err != nil { 4653 return nil, err 4654 } 4655 ret := &Policy{ 4656 ServerResponse: googleapi.ServerResponse{ 4657 Header: res.Header, 4658 HTTPStatusCode: res.StatusCode, 4659 }, 4660 } 4661 target := &ret 4662 if err := gensupport.DecodeResponse(target, res); err != nil { 4663 return nil, err 4664 } 4665 return ret, nil 4666 // { 4667 // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", 4668 // "httpMethod": "GET", 4669 // "id": "deploymentmanager.deployments.getIamPolicy", 4670 // "parameterOrder": [ 4671 // "project", 4672 // "resource" 4673 // ], 4674 // "parameters": { 4675 // "project": { 4676 // "description": "Project ID for this request.", 4677 // "location": "path", 4678 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", 4679 // "required": true, 4680 // "type": "string" 4681 // }, 4682 // "resource": { 4683 // "description": "Name or id of the resource for this request.", 4684 // "location": "path", 4685 // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", 4686 // "required": true, 4687 // "type": "string" 4688 // } 4689 // }, 4690 // "path": "{project}/global/deployments/{resource}/getIamPolicy", 4691 // "response": { 4692 // "$ref": "Policy" 4693 // }, 4694 // "scopes": [ 4695 // "https://www.googleapis.com/auth/cloud-platform", 4696 // "https://www.googleapis.com/auth/ndev.cloudman" 4697 // ] 4698 // } 4699 4700} 4701 4702// method id "deploymentmanager.deployments.insert": 4703 4704type DeploymentsInsertCall struct { 4705 s *Service 4706 project string 4707 deployment *Deployment 4708 urlParams_ gensupport.URLParams 4709 ctx_ context.Context 4710 header_ http.Header 4711} 4712 4713// Insert: Creates a deployment and all of the resources described by 4714// the deployment manifest. 4715func (r *DeploymentsService) Insert(project string, deployment *Deployment) *DeploymentsInsertCall { 4716 c := &DeploymentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4717 c.project = project 4718 c.deployment = deployment 4719 return c 4720} 4721 4722// CreatePolicy sets the optional parameter "createPolicy": Sets the 4723// policy to use for creating new resources. 4724// 4725// Possible values: 4726// "ACQUIRE" 4727// "CREATE" 4728// "CREATE_OR_ACQUIRE" (default) 4729func (c *DeploymentsInsertCall) CreatePolicy(createPolicy string) *DeploymentsInsertCall { 4730 c.urlParams_.Set("createPolicy", createPolicy) 4731 return c 4732} 4733 4734// Preview sets the optional parameter "preview": If set to true, 4735// creates a deployment and creates "shell" resources but does not 4736// actually instantiate these resources. This allows you to preview what 4737// your deployment looks like. After previewing a deployment, you can 4738// deploy your resources by making a request with the update() method or 4739// you can use the cancelPreview() method to cancel the preview 4740// altogether. Note that the deployment will still exist after you 4741// cancel the preview and you must separately delete this deployment if 4742// you want to remove it. 4743func (c *DeploymentsInsertCall) Preview(preview bool) *DeploymentsInsertCall { 4744 c.urlParams_.Set("preview", fmt.Sprint(preview)) 4745 return c 4746} 4747 4748// Fields allows partial responses to be retrieved. See 4749// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4750// for more information. 4751func (c *DeploymentsInsertCall) Fields(s ...googleapi.Field) *DeploymentsInsertCall { 4752 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4753 return c 4754} 4755 4756// Context sets the context to be used in this call's Do method. Any 4757// pending HTTP request will be aborted if the provided context is 4758// canceled. 4759func (c *DeploymentsInsertCall) Context(ctx context.Context) *DeploymentsInsertCall { 4760 c.ctx_ = ctx 4761 return c 4762} 4763 4764// Header returns an http.Header that can be modified by the caller to 4765// add HTTP headers to the request. 4766func (c *DeploymentsInsertCall) Header() http.Header { 4767 if c.header_ == nil { 4768 c.header_ = make(http.Header) 4769 } 4770 return c.header_ 4771} 4772 4773func (c *DeploymentsInsertCall) doRequest(alt string) (*http.Response, error) { 4774 reqHeaders := make(http.Header) 4775 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4776 for k, v := range c.header_ { 4777 reqHeaders[k] = v 4778 } 4779 reqHeaders.Set("User-Agent", c.s.userAgent()) 4780 var body io.Reader = nil 4781 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment) 4782 if err != nil { 4783 return nil, err 4784 } 4785 reqHeaders.Set("Content-Type", "application/json") 4786 c.urlParams_.Set("alt", alt) 4787 c.urlParams_.Set("prettyPrint", "false") 4788 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments") 4789 urls += "?" + c.urlParams_.Encode() 4790 req, err := http.NewRequest("POST", urls, body) 4791 if err != nil { 4792 return nil, err 4793 } 4794 req.Header = reqHeaders 4795 googleapi.Expand(req.URL, map[string]string{ 4796 "project": c.project, 4797 }) 4798 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4799} 4800 4801// Do executes the "deploymentmanager.deployments.insert" call. 4802// Exactly one of *Operation or error will be non-nil. Any non-2xx 4803// status code is an error. Response headers are in either 4804// *Operation.ServerResponse.Header or (if a response was returned at 4805// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4806// to check whether the returned error was because 4807// http.StatusNotModified was returned. 4808func (c *DeploymentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4809 gensupport.SetOptions(c.urlParams_, opts...) 4810 res, err := c.doRequest("json") 4811 if res != nil && res.StatusCode == http.StatusNotModified { 4812 if res.Body != nil { 4813 res.Body.Close() 4814 } 4815 return nil, &googleapi.Error{ 4816 Code: res.StatusCode, 4817 Header: res.Header, 4818 } 4819 } 4820 if err != nil { 4821 return nil, err 4822 } 4823 defer googleapi.CloseBody(res) 4824 if err := googleapi.CheckResponse(res); err != nil { 4825 return nil, err 4826 } 4827 ret := &Operation{ 4828 ServerResponse: googleapi.ServerResponse{ 4829 Header: res.Header, 4830 HTTPStatusCode: res.StatusCode, 4831 }, 4832 } 4833 target := &ret 4834 if err := gensupport.DecodeResponse(target, res); err != nil { 4835 return nil, err 4836 } 4837 return ret, nil 4838 // { 4839 // "description": "Creates a deployment and all of the resources described by the deployment manifest.", 4840 // "httpMethod": "POST", 4841 // "id": "deploymentmanager.deployments.insert", 4842 // "parameterOrder": [ 4843 // "project" 4844 // ], 4845 // "parameters": { 4846 // "createPolicy": { 4847 // "default": "CREATE_OR_ACQUIRE", 4848 // "description": "Sets the policy to use for creating new resources.", 4849 // "enum": [ 4850 // "ACQUIRE", 4851 // "CREATE", 4852 // "CREATE_OR_ACQUIRE" 4853 // ], 4854 // "enumDescriptions": [ 4855 // "", 4856 // "", 4857 // "" 4858 // ], 4859 // "location": "query", 4860 // "type": "string" 4861 // }, 4862 // "preview": { 4863 // "description": "If set to true, creates a deployment and creates \"shell\" resources but does not actually instantiate these resources. This allows you to preview what your deployment looks like. After previewing a deployment, you can deploy your resources by making a request with the update() method or you can use the cancelPreview() method to cancel the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.", 4864 // "location": "query", 4865 // "type": "boolean" 4866 // }, 4867 // "project": { 4868 // "description": "The project ID for this request.", 4869 // "location": "path", 4870 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 4871 // "required": true, 4872 // "type": "string" 4873 // } 4874 // }, 4875 // "path": "{project}/global/deployments", 4876 // "request": { 4877 // "$ref": "Deployment" 4878 // }, 4879 // "response": { 4880 // "$ref": "Operation" 4881 // }, 4882 // "scopes": [ 4883 // "https://www.googleapis.com/auth/cloud-platform", 4884 // "https://www.googleapis.com/auth/ndev.cloudman" 4885 // ] 4886 // } 4887 4888} 4889 4890// method id "deploymentmanager.deployments.list": 4891 4892type DeploymentsListCall struct { 4893 s *Service 4894 project string 4895 urlParams_ gensupport.URLParams 4896 ifNoneMatch_ string 4897 ctx_ context.Context 4898 header_ http.Header 4899} 4900 4901// List: Lists all deployments for a given project. 4902func (r *DeploymentsService) List(project string) *DeploymentsListCall { 4903 c := &DeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4904 c.project = project 4905 return c 4906} 4907 4908// Filter sets the optional parameter "filter": A filter expression that 4909// filters resources listed in the response. The expression must specify 4910// the field name, a comparison operator, and the value that you want to 4911// use for filtering. The value must be a string, a number, or a 4912// boolean. The comparison operator must be either =, !=, >, or <. 4913// 4914// For example, if you are filtering Compute Engine instances, you can 4915// exclude instances named example-instance by specifying name != 4916// example-instance. 4917// 4918// You can also filter nested fields. For example, you could specify 4919// scheduling.automaticRestart = false to include instances only if they 4920// are not scheduled for automatic restarts. You can use filtering on 4921// nested fields to filter based on resource labels. 4922// 4923// To filter on multiple expressions, provide each separate expression 4924// within parentheses. For example, (scheduling.automaticRestart = true) 4925// (cpuPlatform = "Intel Skylake"). By default, each expression is an 4926// AND expression. However, you can include AND and OR expressions 4927// explicitly. For example, (cpuPlatform = "Intel Skylake") OR 4928// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = 4929// true). 4930func (c *DeploymentsListCall) Filter(filter string) *DeploymentsListCall { 4931 c.urlParams_.Set("filter", filter) 4932 return c 4933} 4934 4935// MaxResults sets the optional parameter "maxResults": The maximum 4936// number of results per page that should be returned. If the number of 4937// available results is larger than maxResults, Compute Engine returns a 4938// nextPageToken that can be used to get the next page of results in 4939// subsequent list requests. Acceptable values are 0 to 500, inclusive. 4940// (Default: 500) 4941func (c *DeploymentsListCall) MaxResults(maxResults int64) *DeploymentsListCall { 4942 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 4943 return c 4944} 4945 4946// OrderBy sets the optional parameter "orderBy": Sorts list results by 4947// a certain order. By default, results are returned in alphanumerical 4948// order based on the resource name. 4949// 4950// You can also sort results in descending order based on the creation 4951// timestamp using orderBy="creationTimestamp desc". This sorts results 4952// based on the creationTimestamp field in reverse chronological order 4953// (newest result first). Use this to sort resources like operations so 4954// that the newest operation is returned first. 4955// 4956// Currently, only sorting by name or creationTimestamp desc is 4957// supported. 4958func (c *DeploymentsListCall) OrderBy(orderBy string) *DeploymentsListCall { 4959 c.urlParams_.Set("orderBy", orderBy) 4960 return c 4961} 4962 4963// PageToken sets the optional parameter "pageToken": Specifies a page 4964// token to use. Set pageToken to the nextPageToken returned by a 4965// previous list request to get the next page of results. 4966func (c *DeploymentsListCall) PageToken(pageToken string) *DeploymentsListCall { 4967 c.urlParams_.Set("pageToken", pageToken) 4968 return c 4969} 4970 4971// Fields allows partial responses to be retrieved. See 4972// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4973// for more information. 4974func (c *DeploymentsListCall) Fields(s ...googleapi.Field) *DeploymentsListCall { 4975 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4976 return c 4977} 4978 4979// IfNoneMatch sets the optional parameter which makes the operation 4980// fail if the object's ETag matches the given value. This is useful for 4981// getting updates only after the object has changed since the last 4982// request. Use googleapi.IsNotModified to check whether the response 4983// error from Do is the result of In-None-Match. 4984func (c *DeploymentsListCall) IfNoneMatch(entityTag string) *DeploymentsListCall { 4985 c.ifNoneMatch_ = entityTag 4986 return c 4987} 4988 4989// Context sets the context to be used in this call's Do method. Any 4990// pending HTTP request will be aborted if the provided context is 4991// canceled. 4992func (c *DeploymentsListCall) Context(ctx context.Context) *DeploymentsListCall { 4993 c.ctx_ = ctx 4994 return c 4995} 4996 4997// Header returns an http.Header that can be modified by the caller to 4998// add HTTP headers to the request. 4999func (c *DeploymentsListCall) Header() http.Header { 5000 if c.header_ == nil { 5001 c.header_ = make(http.Header) 5002 } 5003 return c.header_ 5004} 5005 5006func (c *DeploymentsListCall) doRequest(alt string) (*http.Response, error) { 5007 reqHeaders := make(http.Header) 5008 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5009 for k, v := range c.header_ { 5010 reqHeaders[k] = v 5011 } 5012 reqHeaders.Set("User-Agent", c.s.userAgent()) 5013 if c.ifNoneMatch_ != "" { 5014 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5015 } 5016 var body io.Reader = nil 5017 c.urlParams_.Set("alt", alt) 5018 c.urlParams_.Set("prettyPrint", "false") 5019 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments") 5020 urls += "?" + c.urlParams_.Encode() 5021 req, err := http.NewRequest("GET", urls, body) 5022 if err != nil { 5023 return nil, err 5024 } 5025 req.Header = reqHeaders 5026 googleapi.Expand(req.URL, map[string]string{ 5027 "project": c.project, 5028 }) 5029 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5030} 5031 5032// Do executes the "deploymentmanager.deployments.list" call. 5033// Exactly one of *DeploymentsListResponse or error will be non-nil. Any 5034// non-2xx status code is an error. Response headers are in either 5035// *DeploymentsListResponse.ServerResponse.Header or (if a response was 5036// returned at all) in error.(*googleapi.Error).Header. Use 5037// googleapi.IsNotModified to check whether the returned error was 5038// because http.StatusNotModified was returned. 5039func (c *DeploymentsListCall) Do(opts ...googleapi.CallOption) (*DeploymentsListResponse, error) { 5040 gensupport.SetOptions(c.urlParams_, opts...) 5041 res, err := c.doRequest("json") 5042 if res != nil && res.StatusCode == http.StatusNotModified { 5043 if res.Body != nil { 5044 res.Body.Close() 5045 } 5046 return nil, &googleapi.Error{ 5047 Code: res.StatusCode, 5048 Header: res.Header, 5049 } 5050 } 5051 if err != nil { 5052 return nil, err 5053 } 5054 defer googleapi.CloseBody(res) 5055 if err := googleapi.CheckResponse(res); err != nil { 5056 return nil, err 5057 } 5058 ret := &DeploymentsListResponse{ 5059 ServerResponse: googleapi.ServerResponse{ 5060 Header: res.Header, 5061 HTTPStatusCode: res.StatusCode, 5062 }, 5063 } 5064 target := &ret 5065 if err := gensupport.DecodeResponse(target, res); err != nil { 5066 return nil, err 5067 } 5068 return ret, nil 5069 // { 5070 // "description": "Lists all deployments for a given project.", 5071 // "httpMethod": "GET", 5072 // "id": "deploymentmanager.deployments.list", 5073 // "parameterOrder": [ 5074 // "project" 5075 // ], 5076 // "parameters": { 5077 // "filter": { 5078 // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", 5079 // "location": "query", 5080 // "type": "string" 5081 // }, 5082 // "maxResults": { 5083 // "default": "500", 5084 // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", 5085 // "format": "uint32", 5086 // "location": "query", 5087 // "minimum": "0", 5088 // "type": "integer" 5089 // }, 5090 // "orderBy": { 5091 // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", 5092 // "location": "query", 5093 // "type": "string" 5094 // }, 5095 // "pageToken": { 5096 // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", 5097 // "location": "query", 5098 // "type": "string" 5099 // }, 5100 // "project": { 5101 // "description": "The project ID for this request.", 5102 // "location": "path", 5103 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 5104 // "required": true, 5105 // "type": "string" 5106 // } 5107 // }, 5108 // "path": "{project}/global/deployments", 5109 // "response": { 5110 // "$ref": "DeploymentsListResponse" 5111 // }, 5112 // "scopes": [ 5113 // "https://www.googleapis.com/auth/cloud-platform", 5114 // "https://www.googleapis.com/auth/cloud-platform.read-only", 5115 // "https://www.googleapis.com/auth/ndev.cloudman", 5116 // "https://www.googleapis.com/auth/ndev.cloudman.readonly" 5117 // ] 5118 // } 5119 5120} 5121 5122// Pages invokes f for each page of results. 5123// A non-nil error returned from f will halt the iteration. 5124// The provided context supersedes any context provided to the Context method. 5125func (c *DeploymentsListCall) Pages(ctx context.Context, f func(*DeploymentsListResponse) error) error { 5126 c.ctx_ = ctx 5127 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5128 for { 5129 x, err := c.Do() 5130 if err != nil { 5131 return err 5132 } 5133 if err := f(x); err != nil { 5134 return err 5135 } 5136 if x.NextPageToken == "" { 5137 return nil 5138 } 5139 c.PageToken(x.NextPageToken) 5140 } 5141} 5142 5143// method id "deploymentmanager.deployments.patch": 5144 5145type DeploymentsPatchCall struct { 5146 s *Service 5147 project string 5148 deployment string 5149 deployment2 *Deployment 5150 urlParams_ gensupport.URLParams 5151 ctx_ context.Context 5152 header_ http.Header 5153} 5154 5155// Patch: Updates a deployment and all of the resources described by the 5156// deployment manifest. This method supports patch semantics. 5157func (r *DeploymentsService) Patch(project string, deployment string, deployment2 *Deployment) *DeploymentsPatchCall { 5158 c := &DeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5159 c.project = project 5160 c.deployment = deployment 5161 c.deployment2 = deployment2 5162 return c 5163} 5164 5165// CreatePolicy sets the optional parameter "createPolicy": Sets the 5166// policy to use for creating new resources. 5167// 5168// Possible values: 5169// "ACQUIRE" 5170// "CREATE" 5171// "CREATE_OR_ACQUIRE" (default) 5172func (c *DeploymentsPatchCall) CreatePolicy(createPolicy string) *DeploymentsPatchCall { 5173 c.urlParams_.Set("createPolicy", createPolicy) 5174 return c 5175} 5176 5177// DeletePolicy sets the optional parameter "deletePolicy": Sets the 5178// policy to use for deleting resources. 5179// 5180// Possible values: 5181// "ABANDON" 5182// "DELETE" (default) 5183func (c *DeploymentsPatchCall) DeletePolicy(deletePolicy string) *DeploymentsPatchCall { 5184 c.urlParams_.Set("deletePolicy", deletePolicy) 5185 return c 5186} 5187 5188// Preview sets the optional parameter "preview": If set to true, 5189// updates the deployment and creates and updates the "shell" resources 5190// but does not actually alter or instantiate these resources. This 5191// allows you to preview what your deployment will look like. You can 5192// use this intent to preview how an update would affect your 5193// deployment. You must provide a target.config with a configuration if 5194// this is set to true. After previewing a deployment, you can deploy 5195// your resources by making a request with the update() or you can 5196// cancelPreview() to remove the preview altogether. Note that the 5197// deployment will still exist after you cancel the preview and you must 5198// separately delete this deployment if you want to remove it. 5199func (c *DeploymentsPatchCall) Preview(preview bool) *DeploymentsPatchCall { 5200 c.urlParams_.Set("preview", fmt.Sprint(preview)) 5201 return c 5202} 5203 5204// Fields allows partial responses to be retrieved. See 5205// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5206// for more information. 5207func (c *DeploymentsPatchCall) Fields(s ...googleapi.Field) *DeploymentsPatchCall { 5208 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5209 return c 5210} 5211 5212// Context sets the context to be used in this call's Do method. Any 5213// pending HTTP request will be aborted if the provided context is 5214// canceled. 5215func (c *DeploymentsPatchCall) Context(ctx context.Context) *DeploymentsPatchCall { 5216 c.ctx_ = ctx 5217 return c 5218} 5219 5220// Header returns an http.Header that can be modified by the caller to 5221// add HTTP headers to the request. 5222func (c *DeploymentsPatchCall) Header() http.Header { 5223 if c.header_ == nil { 5224 c.header_ = make(http.Header) 5225 } 5226 return c.header_ 5227} 5228 5229func (c *DeploymentsPatchCall) doRequest(alt string) (*http.Response, error) { 5230 reqHeaders := make(http.Header) 5231 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5232 for k, v := range c.header_ { 5233 reqHeaders[k] = v 5234 } 5235 reqHeaders.Set("User-Agent", c.s.userAgent()) 5236 var body io.Reader = nil 5237 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment2) 5238 if err != nil { 5239 return nil, err 5240 } 5241 reqHeaders.Set("Content-Type", "application/json") 5242 c.urlParams_.Set("alt", alt) 5243 c.urlParams_.Set("prettyPrint", "false") 5244 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}") 5245 urls += "?" + c.urlParams_.Encode() 5246 req, err := http.NewRequest("PATCH", urls, body) 5247 if err != nil { 5248 return nil, err 5249 } 5250 req.Header = reqHeaders 5251 googleapi.Expand(req.URL, map[string]string{ 5252 "project": c.project, 5253 "deployment": c.deployment, 5254 }) 5255 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5256} 5257 5258// Do executes the "deploymentmanager.deployments.patch" call. 5259// Exactly one of *Operation or error will be non-nil. Any non-2xx 5260// status code is an error. Response headers are in either 5261// *Operation.ServerResponse.Header or (if a response was returned at 5262// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5263// to check whether the returned error was because 5264// http.StatusNotModified was returned. 5265func (c *DeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5266 gensupport.SetOptions(c.urlParams_, opts...) 5267 res, err := c.doRequest("json") 5268 if res != nil && res.StatusCode == http.StatusNotModified { 5269 if res.Body != nil { 5270 res.Body.Close() 5271 } 5272 return nil, &googleapi.Error{ 5273 Code: res.StatusCode, 5274 Header: res.Header, 5275 } 5276 } 5277 if err != nil { 5278 return nil, err 5279 } 5280 defer googleapi.CloseBody(res) 5281 if err := googleapi.CheckResponse(res); err != nil { 5282 return nil, err 5283 } 5284 ret := &Operation{ 5285 ServerResponse: googleapi.ServerResponse{ 5286 Header: res.Header, 5287 HTTPStatusCode: res.StatusCode, 5288 }, 5289 } 5290 target := &ret 5291 if err := gensupport.DecodeResponse(target, res); err != nil { 5292 return nil, err 5293 } 5294 return ret, nil 5295 // { 5296 // "description": "Updates a deployment and all of the resources described by the deployment manifest. This method supports patch semantics.", 5297 // "httpMethod": "PATCH", 5298 // "id": "deploymentmanager.deployments.patch", 5299 // "parameterOrder": [ 5300 // "project", 5301 // "deployment" 5302 // ], 5303 // "parameters": { 5304 // "createPolicy": { 5305 // "default": "CREATE_OR_ACQUIRE", 5306 // "description": "Sets the policy to use for creating new resources.", 5307 // "enum": [ 5308 // "ACQUIRE", 5309 // "CREATE", 5310 // "CREATE_OR_ACQUIRE" 5311 // ], 5312 // "enumDescriptions": [ 5313 // "", 5314 // "", 5315 // "" 5316 // ], 5317 // "location": "query", 5318 // "type": "string" 5319 // }, 5320 // "deletePolicy": { 5321 // "default": "DELETE", 5322 // "description": "Sets the policy to use for deleting resources.", 5323 // "enum": [ 5324 // "ABANDON", 5325 // "DELETE" 5326 // ], 5327 // "enumDescriptions": [ 5328 // "", 5329 // "" 5330 // ], 5331 // "location": "query", 5332 // "type": "string" 5333 // }, 5334 // "deployment": { 5335 // "description": "The name of the deployment for this request.", 5336 // "location": "path", 5337 // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", 5338 // "required": true, 5339 // "type": "string" 5340 // }, 5341 // "preview": { 5342 // "default": "false", 5343 // "description": "If set to true, updates the deployment and creates and updates the \"shell\" resources but does not actually alter or instantiate these resources. This allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a target.config with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request with the update() or you can cancelPreview() to remove the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.", 5344 // "location": "query", 5345 // "type": "boolean" 5346 // }, 5347 // "project": { 5348 // "description": "The project ID for this request.", 5349 // "location": "path", 5350 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 5351 // "required": true, 5352 // "type": "string" 5353 // } 5354 // }, 5355 // "path": "{project}/global/deployments/{deployment}", 5356 // "request": { 5357 // "$ref": "Deployment" 5358 // }, 5359 // "response": { 5360 // "$ref": "Operation" 5361 // }, 5362 // "scopes": [ 5363 // "https://www.googleapis.com/auth/cloud-platform", 5364 // "https://www.googleapis.com/auth/ndev.cloudman" 5365 // ] 5366 // } 5367 5368} 5369 5370// method id "deploymentmanager.deployments.setIamPolicy": 5371 5372type DeploymentsSetIamPolicyCall struct { 5373 s *Service 5374 project string 5375 resource string 5376 globalsetpolicyrequest *GlobalSetPolicyRequest 5377 urlParams_ gensupport.URLParams 5378 ctx_ context.Context 5379 header_ http.Header 5380} 5381 5382// SetIamPolicy: Sets the access control policy on the specified 5383// resource. Replaces any existing policy. 5384func (r *DeploymentsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *DeploymentsSetIamPolicyCall { 5385 c := &DeploymentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5386 c.project = project 5387 c.resource = resource 5388 c.globalsetpolicyrequest = globalsetpolicyrequest 5389 return c 5390} 5391 5392// Fields allows partial responses to be retrieved. See 5393// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5394// for more information. 5395func (c *DeploymentsSetIamPolicyCall) Fields(s ...googleapi.Field) *DeploymentsSetIamPolicyCall { 5396 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5397 return c 5398} 5399 5400// Context sets the context to be used in this call's Do method. Any 5401// pending HTTP request will be aborted if the provided context is 5402// canceled. 5403func (c *DeploymentsSetIamPolicyCall) Context(ctx context.Context) *DeploymentsSetIamPolicyCall { 5404 c.ctx_ = ctx 5405 return c 5406} 5407 5408// Header returns an http.Header that can be modified by the caller to 5409// add HTTP headers to the request. 5410func (c *DeploymentsSetIamPolicyCall) Header() http.Header { 5411 if c.header_ == nil { 5412 c.header_ = make(http.Header) 5413 } 5414 return c.header_ 5415} 5416 5417func (c *DeploymentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 5418 reqHeaders := make(http.Header) 5419 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5420 for k, v := range c.header_ { 5421 reqHeaders[k] = v 5422 } 5423 reqHeaders.Set("User-Agent", c.s.userAgent()) 5424 var body io.Reader = nil 5425 body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) 5426 if err != nil { 5427 return nil, err 5428 } 5429 reqHeaders.Set("Content-Type", "application/json") 5430 c.urlParams_.Set("alt", alt) 5431 c.urlParams_.Set("prettyPrint", "false") 5432 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{resource}/setIamPolicy") 5433 urls += "?" + c.urlParams_.Encode() 5434 req, err := http.NewRequest("POST", urls, body) 5435 if err != nil { 5436 return nil, err 5437 } 5438 req.Header = reqHeaders 5439 googleapi.Expand(req.URL, map[string]string{ 5440 "project": c.project, 5441 "resource": c.resource, 5442 }) 5443 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5444} 5445 5446// Do executes the "deploymentmanager.deployments.setIamPolicy" call. 5447// Exactly one of *Policy or error will be non-nil. Any non-2xx status 5448// code is an error. Response headers are in either 5449// *Policy.ServerResponse.Header or (if a response was returned at all) 5450// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5451// check whether the returned error was because http.StatusNotModified 5452// was returned. 5453func (c *DeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 5454 gensupport.SetOptions(c.urlParams_, opts...) 5455 res, err := c.doRequest("json") 5456 if res != nil && res.StatusCode == http.StatusNotModified { 5457 if res.Body != nil { 5458 res.Body.Close() 5459 } 5460 return nil, &googleapi.Error{ 5461 Code: res.StatusCode, 5462 Header: res.Header, 5463 } 5464 } 5465 if err != nil { 5466 return nil, err 5467 } 5468 defer googleapi.CloseBody(res) 5469 if err := googleapi.CheckResponse(res); err != nil { 5470 return nil, err 5471 } 5472 ret := &Policy{ 5473 ServerResponse: googleapi.ServerResponse{ 5474 Header: res.Header, 5475 HTTPStatusCode: res.StatusCode, 5476 }, 5477 } 5478 target := &ret 5479 if err := gensupport.DecodeResponse(target, res); err != nil { 5480 return nil, err 5481 } 5482 return ret, nil 5483 // { 5484 // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", 5485 // "httpMethod": "POST", 5486 // "id": "deploymentmanager.deployments.setIamPolicy", 5487 // "parameterOrder": [ 5488 // "project", 5489 // "resource" 5490 // ], 5491 // "parameters": { 5492 // "project": { 5493 // "description": "Project ID for this request.", 5494 // "location": "path", 5495 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", 5496 // "required": true, 5497 // "type": "string" 5498 // }, 5499 // "resource": { 5500 // "description": "Name or id of the resource for this request.", 5501 // "location": "path", 5502 // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", 5503 // "required": true, 5504 // "type": "string" 5505 // } 5506 // }, 5507 // "path": "{project}/global/deployments/{resource}/setIamPolicy", 5508 // "request": { 5509 // "$ref": "GlobalSetPolicyRequest" 5510 // }, 5511 // "response": { 5512 // "$ref": "Policy" 5513 // }, 5514 // "scopes": [ 5515 // "https://www.googleapis.com/auth/cloud-platform", 5516 // "https://www.googleapis.com/auth/ndev.cloudman" 5517 // ] 5518 // } 5519 5520} 5521 5522// method id "deploymentmanager.deployments.stop": 5523 5524type DeploymentsStopCall struct { 5525 s *Service 5526 project string 5527 deployment string 5528 deploymentsstoprequest *DeploymentsStopRequest 5529 urlParams_ gensupport.URLParams 5530 ctx_ context.Context 5531 header_ http.Header 5532} 5533 5534// Stop: Stops an ongoing operation. This does not roll back any work 5535// that has already been completed, but prevents any new work from being 5536// started. 5537func (r *DeploymentsService) Stop(project string, deployment string, deploymentsstoprequest *DeploymentsStopRequest) *DeploymentsStopCall { 5538 c := &DeploymentsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5539 c.project = project 5540 c.deployment = deployment 5541 c.deploymentsstoprequest = deploymentsstoprequest 5542 return c 5543} 5544 5545// Fields allows partial responses to be retrieved. See 5546// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5547// for more information. 5548func (c *DeploymentsStopCall) Fields(s ...googleapi.Field) *DeploymentsStopCall { 5549 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5550 return c 5551} 5552 5553// Context sets the context to be used in this call's Do method. Any 5554// pending HTTP request will be aborted if the provided context is 5555// canceled. 5556func (c *DeploymentsStopCall) Context(ctx context.Context) *DeploymentsStopCall { 5557 c.ctx_ = ctx 5558 return c 5559} 5560 5561// Header returns an http.Header that can be modified by the caller to 5562// add HTTP headers to the request. 5563func (c *DeploymentsStopCall) Header() http.Header { 5564 if c.header_ == nil { 5565 c.header_ = make(http.Header) 5566 } 5567 return c.header_ 5568} 5569 5570func (c *DeploymentsStopCall) doRequest(alt string) (*http.Response, error) { 5571 reqHeaders := make(http.Header) 5572 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5573 for k, v := range c.header_ { 5574 reqHeaders[k] = v 5575 } 5576 reqHeaders.Set("User-Agent", c.s.userAgent()) 5577 var body io.Reader = nil 5578 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deploymentsstoprequest) 5579 if err != nil { 5580 return nil, err 5581 } 5582 reqHeaders.Set("Content-Type", "application/json") 5583 c.urlParams_.Set("alt", alt) 5584 c.urlParams_.Set("prettyPrint", "false") 5585 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/stop") 5586 urls += "?" + c.urlParams_.Encode() 5587 req, err := http.NewRequest("POST", urls, body) 5588 if err != nil { 5589 return nil, err 5590 } 5591 req.Header = reqHeaders 5592 googleapi.Expand(req.URL, map[string]string{ 5593 "project": c.project, 5594 "deployment": c.deployment, 5595 }) 5596 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5597} 5598 5599// Do executes the "deploymentmanager.deployments.stop" call. 5600// Exactly one of *Operation or error will be non-nil. Any non-2xx 5601// status code is an error. Response headers are in either 5602// *Operation.ServerResponse.Header or (if a response was returned at 5603// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5604// to check whether the returned error was because 5605// http.StatusNotModified was returned. 5606func (c *DeploymentsStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5607 gensupport.SetOptions(c.urlParams_, opts...) 5608 res, err := c.doRequest("json") 5609 if res != nil && res.StatusCode == http.StatusNotModified { 5610 if res.Body != nil { 5611 res.Body.Close() 5612 } 5613 return nil, &googleapi.Error{ 5614 Code: res.StatusCode, 5615 Header: res.Header, 5616 } 5617 } 5618 if err != nil { 5619 return nil, err 5620 } 5621 defer googleapi.CloseBody(res) 5622 if err := googleapi.CheckResponse(res); err != nil { 5623 return nil, err 5624 } 5625 ret := &Operation{ 5626 ServerResponse: googleapi.ServerResponse{ 5627 Header: res.Header, 5628 HTTPStatusCode: res.StatusCode, 5629 }, 5630 } 5631 target := &ret 5632 if err := gensupport.DecodeResponse(target, res); err != nil { 5633 return nil, err 5634 } 5635 return ret, nil 5636 // { 5637 // "description": "Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started.", 5638 // "httpMethod": "POST", 5639 // "id": "deploymentmanager.deployments.stop", 5640 // "parameterOrder": [ 5641 // "project", 5642 // "deployment" 5643 // ], 5644 // "parameters": { 5645 // "deployment": { 5646 // "description": "The name of the deployment for this request.", 5647 // "location": "path", 5648 // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", 5649 // "required": true, 5650 // "type": "string" 5651 // }, 5652 // "project": { 5653 // "description": "The project ID for this request.", 5654 // "location": "path", 5655 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 5656 // "required": true, 5657 // "type": "string" 5658 // } 5659 // }, 5660 // "path": "{project}/global/deployments/{deployment}/stop", 5661 // "request": { 5662 // "$ref": "DeploymentsStopRequest" 5663 // }, 5664 // "response": { 5665 // "$ref": "Operation" 5666 // }, 5667 // "scopes": [ 5668 // "https://www.googleapis.com/auth/cloud-platform", 5669 // "https://www.googleapis.com/auth/ndev.cloudman" 5670 // ] 5671 // } 5672 5673} 5674 5675// method id "deploymentmanager.deployments.testIamPermissions": 5676 5677type DeploymentsTestIamPermissionsCall struct { 5678 s *Service 5679 project string 5680 resource string 5681 testpermissionsrequest *TestPermissionsRequest 5682 urlParams_ gensupport.URLParams 5683 ctx_ context.Context 5684 header_ http.Header 5685} 5686 5687// TestIamPermissions: Returns permissions that a caller has on the 5688// specified resource. 5689func (r *DeploymentsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *DeploymentsTestIamPermissionsCall { 5690 c := &DeploymentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5691 c.project = project 5692 c.resource = resource 5693 c.testpermissionsrequest = testpermissionsrequest 5694 return c 5695} 5696 5697// Fields allows partial responses to be retrieved. See 5698// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5699// for more information. 5700func (c *DeploymentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *DeploymentsTestIamPermissionsCall { 5701 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5702 return c 5703} 5704 5705// Context sets the context to be used in this call's Do method. Any 5706// pending HTTP request will be aborted if the provided context is 5707// canceled. 5708func (c *DeploymentsTestIamPermissionsCall) Context(ctx context.Context) *DeploymentsTestIamPermissionsCall { 5709 c.ctx_ = ctx 5710 return c 5711} 5712 5713// Header returns an http.Header that can be modified by the caller to 5714// add HTTP headers to the request. 5715func (c *DeploymentsTestIamPermissionsCall) Header() http.Header { 5716 if c.header_ == nil { 5717 c.header_ = make(http.Header) 5718 } 5719 return c.header_ 5720} 5721 5722func (c *DeploymentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 5723 reqHeaders := make(http.Header) 5724 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5725 for k, v := range c.header_ { 5726 reqHeaders[k] = v 5727 } 5728 reqHeaders.Set("User-Agent", c.s.userAgent()) 5729 var body io.Reader = nil 5730 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) 5731 if err != nil { 5732 return nil, err 5733 } 5734 reqHeaders.Set("Content-Type", "application/json") 5735 c.urlParams_.Set("alt", alt) 5736 c.urlParams_.Set("prettyPrint", "false") 5737 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{resource}/testIamPermissions") 5738 urls += "?" + c.urlParams_.Encode() 5739 req, err := http.NewRequest("POST", urls, body) 5740 if err != nil { 5741 return nil, err 5742 } 5743 req.Header = reqHeaders 5744 googleapi.Expand(req.URL, map[string]string{ 5745 "project": c.project, 5746 "resource": c.resource, 5747 }) 5748 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5749} 5750 5751// Do executes the "deploymentmanager.deployments.testIamPermissions" call. 5752// Exactly one of *TestPermissionsResponse or error will be non-nil. Any 5753// non-2xx status code is an error. Response headers are in either 5754// *TestPermissionsResponse.ServerResponse.Header or (if a response was 5755// returned at all) in error.(*googleapi.Error).Header. Use 5756// googleapi.IsNotModified to check whether the returned error was 5757// because http.StatusNotModified was returned. 5758func (c *DeploymentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { 5759 gensupport.SetOptions(c.urlParams_, opts...) 5760 res, err := c.doRequest("json") 5761 if res != nil && res.StatusCode == http.StatusNotModified { 5762 if res.Body != nil { 5763 res.Body.Close() 5764 } 5765 return nil, &googleapi.Error{ 5766 Code: res.StatusCode, 5767 Header: res.Header, 5768 } 5769 } 5770 if err != nil { 5771 return nil, err 5772 } 5773 defer googleapi.CloseBody(res) 5774 if err := googleapi.CheckResponse(res); err != nil { 5775 return nil, err 5776 } 5777 ret := &TestPermissionsResponse{ 5778 ServerResponse: googleapi.ServerResponse{ 5779 Header: res.Header, 5780 HTTPStatusCode: res.StatusCode, 5781 }, 5782 } 5783 target := &ret 5784 if err := gensupport.DecodeResponse(target, res); err != nil { 5785 return nil, err 5786 } 5787 return ret, nil 5788 // { 5789 // "description": "Returns permissions that a caller has on the specified resource.", 5790 // "httpMethod": "POST", 5791 // "id": "deploymentmanager.deployments.testIamPermissions", 5792 // "parameterOrder": [ 5793 // "project", 5794 // "resource" 5795 // ], 5796 // "parameters": { 5797 // "project": { 5798 // "description": "Project ID for this request.", 5799 // "location": "path", 5800 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", 5801 // "required": true, 5802 // "type": "string" 5803 // }, 5804 // "resource": { 5805 // "description": "Name or id of the resource for this request.", 5806 // "location": "path", 5807 // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", 5808 // "required": true, 5809 // "type": "string" 5810 // } 5811 // }, 5812 // "path": "{project}/global/deployments/{resource}/testIamPermissions", 5813 // "request": { 5814 // "$ref": "TestPermissionsRequest" 5815 // }, 5816 // "response": { 5817 // "$ref": "TestPermissionsResponse" 5818 // }, 5819 // "scopes": [ 5820 // "https://www.googleapis.com/auth/cloud-platform", 5821 // "https://www.googleapis.com/auth/ndev.cloudman" 5822 // ] 5823 // } 5824 5825} 5826 5827// method id "deploymentmanager.deployments.update": 5828 5829type DeploymentsUpdateCall struct { 5830 s *Service 5831 project string 5832 deployment string 5833 deployment2 *Deployment 5834 urlParams_ gensupport.URLParams 5835 ctx_ context.Context 5836 header_ http.Header 5837} 5838 5839// Update: Updates a deployment and all of the resources described by 5840// the deployment manifest. 5841func (r *DeploymentsService) Update(project string, deployment string, deployment2 *Deployment) *DeploymentsUpdateCall { 5842 c := &DeploymentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5843 c.project = project 5844 c.deployment = deployment 5845 c.deployment2 = deployment2 5846 return c 5847} 5848 5849// CreatePolicy sets the optional parameter "createPolicy": Sets the 5850// policy to use for creating new resources. 5851// 5852// Possible values: 5853// "ACQUIRE" 5854// "CREATE" 5855// "CREATE_OR_ACQUIRE" (default) 5856func (c *DeploymentsUpdateCall) CreatePolicy(createPolicy string) *DeploymentsUpdateCall { 5857 c.urlParams_.Set("createPolicy", createPolicy) 5858 return c 5859} 5860 5861// DeletePolicy sets the optional parameter "deletePolicy": Sets the 5862// policy to use for deleting resources. 5863// 5864// Possible values: 5865// "ABANDON" 5866// "DELETE" (default) 5867func (c *DeploymentsUpdateCall) DeletePolicy(deletePolicy string) *DeploymentsUpdateCall { 5868 c.urlParams_.Set("deletePolicy", deletePolicy) 5869 return c 5870} 5871 5872// Preview sets the optional parameter "preview": If set to true, 5873// updates the deployment and creates and updates the "shell" resources 5874// but does not actually alter or instantiate these resources. This 5875// allows you to preview what your deployment will look like. You can 5876// use this intent to preview how an update would affect your 5877// deployment. You must provide a target.config with a configuration if 5878// this is set to true. After previewing a deployment, you can deploy 5879// your resources by making a request with the update() or you can 5880// cancelPreview() to remove the preview altogether. Note that the 5881// deployment will still exist after you cancel the preview and you must 5882// separately delete this deployment if you want to remove it. 5883func (c *DeploymentsUpdateCall) Preview(preview bool) *DeploymentsUpdateCall { 5884 c.urlParams_.Set("preview", fmt.Sprint(preview)) 5885 return c 5886} 5887 5888// Fields allows partial responses to be retrieved. See 5889// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5890// for more information. 5891func (c *DeploymentsUpdateCall) Fields(s ...googleapi.Field) *DeploymentsUpdateCall { 5892 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5893 return c 5894} 5895 5896// Context sets the context to be used in this call's Do method. Any 5897// pending HTTP request will be aborted if the provided context is 5898// canceled. 5899func (c *DeploymentsUpdateCall) Context(ctx context.Context) *DeploymentsUpdateCall { 5900 c.ctx_ = ctx 5901 return c 5902} 5903 5904// Header returns an http.Header that can be modified by the caller to 5905// add HTTP headers to the request. 5906func (c *DeploymentsUpdateCall) Header() http.Header { 5907 if c.header_ == nil { 5908 c.header_ = make(http.Header) 5909 } 5910 return c.header_ 5911} 5912 5913func (c *DeploymentsUpdateCall) doRequest(alt string) (*http.Response, error) { 5914 reqHeaders := make(http.Header) 5915 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5916 for k, v := range c.header_ { 5917 reqHeaders[k] = v 5918 } 5919 reqHeaders.Set("User-Agent", c.s.userAgent()) 5920 var body io.Reader = nil 5921 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment2) 5922 if err != nil { 5923 return nil, err 5924 } 5925 reqHeaders.Set("Content-Type", "application/json") 5926 c.urlParams_.Set("alt", alt) 5927 c.urlParams_.Set("prettyPrint", "false") 5928 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}") 5929 urls += "?" + c.urlParams_.Encode() 5930 req, err := http.NewRequest("PUT", urls, body) 5931 if err != nil { 5932 return nil, err 5933 } 5934 req.Header = reqHeaders 5935 googleapi.Expand(req.URL, map[string]string{ 5936 "project": c.project, 5937 "deployment": c.deployment, 5938 }) 5939 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5940} 5941 5942// Do executes the "deploymentmanager.deployments.update" call. 5943// Exactly one of *Operation or error will be non-nil. Any non-2xx 5944// status code is an error. Response headers are in either 5945// *Operation.ServerResponse.Header or (if a response was returned at 5946// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5947// to check whether the returned error was because 5948// http.StatusNotModified was returned. 5949func (c *DeploymentsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5950 gensupport.SetOptions(c.urlParams_, opts...) 5951 res, err := c.doRequest("json") 5952 if res != nil && res.StatusCode == http.StatusNotModified { 5953 if res.Body != nil { 5954 res.Body.Close() 5955 } 5956 return nil, &googleapi.Error{ 5957 Code: res.StatusCode, 5958 Header: res.Header, 5959 } 5960 } 5961 if err != nil { 5962 return nil, err 5963 } 5964 defer googleapi.CloseBody(res) 5965 if err := googleapi.CheckResponse(res); err != nil { 5966 return nil, err 5967 } 5968 ret := &Operation{ 5969 ServerResponse: googleapi.ServerResponse{ 5970 Header: res.Header, 5971 HTTPStatusCode: res.StatusCode, 5972 }, 5973 } 5974 target := &ret 5975 if err := gensupport.DecodeResponse(target, res); err != nil { 5976 return nil, err 5977 } 5978 return ret, nil 5979 // { 5980 // "description": "Updates a deployment and all of the resources described by the deployment manifest.", 5981 // "httpMethod": "PUT", 5982 // "id": "deploymentmanager.deployments.update", 5983 // "parameterOrder": [ 5984 // "project", 5985 // "deployment" 5986 // ], 5987 // "parameters": { 5988 // "createPolicy": { 5989 // "default": "CREATE_OR_ACQUIRE", 5990 // "description": "Sets the policy to use for creating new resources.", 5991 // "enum": [ 5992 // "ACQUIRE", 5993 // "CREATE", 5994 // "CREATE_OR_ACQUIRE" 5995 // ], 5996 // "enumDescriptions": [ 5997 // "", 5998 // "", 5999 // "" 6000 // ], 6001 // "location": "query", 6002 // "type": "string" 6003 // }, 6004 // "deletePolicy": { 6005 // "default": "DELETE", 6006 // "description": "Sets the policy to use for deleting resources.", 6007 // "enum": [ 6008 // "ABANDON", 6009 // "DELETE" 6010 // ], 6011 // "enumDescriptions": [ 6012 // "", 6013 // "" 6014 // ], 6015 // "location": "query", 6016 // "type": "string" 6017 // }, 6018 // "deployment": { 6019 // "description": "The name of the deployment for this request.", 6020 // "location": "path", 6021 // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", 6022 // "required": true, 6023 // "type": "string" 6024 // }, 6025 // "preview": { 6026 // "default": "false", 6027 // "description": "If set to true, updates the deployment and creates and updates the \"shell\" resources but does not actually alter or instantiate these resources. This allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a target.config with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request with the update() or you can cancelPreview() to remove the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.", 6028 // "location": "query", 6029 // "type": "boolean" 6030 // }, 6031 // "project": { 6032 // "description": "The project ID for this request.", 6033 // "location": "path", 6034 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 6035 // "required": true, 6036 // "type": "string" 6037 // } 6038 // }, 6039 // "path": "{project}/global/deployments/{deployment}", 6040 // "request": { 6041 // "$ref": "Deployment" 6042 // }, 6043 // "response": { 6044 // "$ref": "Operation" 6045 // }, 6046 // "scopes": [ 6047 // "https://www.googleapis.com/auth/cloud-platform", 6048 // "https://www.googleapis.com/auth/ndev.cloudman" 6049 // ] 6050 // } 6051 6052} 6053 6054// method id "deploymentmanager.manifests.get": 6055 6056type ManifestsGetCall struct { 6057 s *Service 6058 project string 6059 deployment string 6060 manifest string 6061 urlParams_ gensupport.URLParams 6062 ifNoneMatch_ string 6063 ctx_ context.Context 6064 header_ http.Header 6065} 6066 6067// Get: Gets information about a specific manifest. 6068func (r *ManifestsService) Get(project string, deployment string, manifest string) *ManifestsGetCall { 6069 c := &ManifestsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6070 c.project = project 6071 c.deployment = deployment 6072 c.manifest = manifest 6073 return c 6074} 6075 6076// Fields allows partial responses to be retrieved. See 6077// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6078// for more information. 6079func (c *ManifestsGetCall) Fields(s ...googleapi.Field) *ManifestsGetCall { 6080 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6081 return c 6082} 6083 6084// IfNoneMatch sets the optional parameter which makes the operation 6085// fail if the object's ETag matches the given value. This is useful for 6086// getting updates only after the object has changed since the last 6087// request. Use googleapi.IsNotModified to check whether the response 6088// error from Do is the result of In-None-Match. 6089func (c *ManifestsGetCall) IfNoneMatch(entityTag string) *ManifestsGetCall { 6090 c.ifNoneMatch_ = entityTag 6091 return c 6092} 6093 6094// Context sets the context to be used in this call's Do method. Any 6095// pending HTTP request will be aborted if the provided context is 6096// canceled. 6097func (c *ManifestsGetCall) Context(ctx context.Context) *ManifestsGetCall { 6098 c.ctx_ = ctx 6099 return c 6100} 6101 6102// Header returns an http.Header that can be modified by the caller to 6103// add HTTP headers to the request. 6104func (c *ManifestsGetCall) Header() http.Header { 6105 if c.header_ == nil { 6106 c.header_ = make(http.Header) 6107 } 6108 return c.header_ 6109} 6110 6111func (c *ManifestsGetCall) doRequest(alt string) (*http.Response, error) { 6112 reqHeaders := make(http.Header) 6113 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6114 for k, v := range c.header_ { 6115 reqHeaders[k] = v 6116 } 6117 reqHeaders.Set("User-Agent", c.s.userAgent()) 6118 if c.ifNoneMatch_ != "" { 6119 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6120 } 6121 var body io.Reader = nil 6122 c.urlParams_.Set("alt", alt) 6123 c.urlParams_.Set("prettyPrint", "false") 6124 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/manifests/{manifest}") 6125 urls += "?" + c.urlParams_.Encode() 6126 req, err := http.NewRequest("GET", urls, body) 6127 if err != nil { 6128 return nil, err 6129 } 6130 req.Header = reqHeaders 6131 googleapi.Expand(req.URL, map[string]string{ 6132 "project": c.project, 6133 "deployment": c.deployment, 6134 "manifest": c.manifest, 6135 }) 6136 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6137} 6138 6139// Do executes the "deploymentmanager.manifests.get" call. 6140// Exactly one of *Manifest or error will be non-nil. Any non-2xx status 6141// code is an error. Response headers are in either 6142// *Manifest.ServerResponse.Header or (if a response was returned at 6143// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6144// to check whether the returned error was because 6145// http.StatusNotModified was returned. 6146func (c *ManifestsGetCall) Do(opts ...googleapi.CallOption) (*Manifest, error) { 6147 gensupport.SetOptions(c.urlParams_, opts...) 6148 res, err := c.doRequest("json") 6149 if res != nil && res.StatusCode == http.StatusNotModified { 6150 if res.Body != nil { 6151 res.Body.Close() 6152 } 6153 return nil, &googleapi.Error{ 6154 Code: res.StatusCode, 6155 Header: res.Header, 6156 } 6157 } 6158 if err != nil { 6159 return nil, err 6160 } 6161 defer googleapi.CloseBody(res) 6162 if err := googleapi.CheckResponse(res); err != nil { 6163 return nil, err 6164 } 6165 ret := &Manifest{ 6166 ServerResponse: googleapi.ServerResponse{ 6167 Header: res.Header, 6168 HTTPStatusCode: res.StatusCode, 6169 }, 6170 } 6171 target := &ret 6172 if err := gensupport.DecodeResponse(target, res); err != nil { 6173 return nil, err 6174 } 6175 return ret, nil 6176 // { 6177 // "description": "Gets information about a specific manifest.", 6178 // "httpMethod": "GET", 6179 // "id": "deploymentmanager.manifests.get", 6180 // "parameterOrder": [ 6181 // "project", 6182 // "deployment", 6183 // "manifest" 6184 // ], 6185 // "parameters": { 6186 // "deployment": { 6187 // "description": "The name of the deployment for this request.", 6188 // "location": "path", 6189 // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", 6190 // "required": true, 6191 // "type": "string" 6192 // }, 6193 // "manifest": { 6194 // "description": "The name of the manifest for this request.", 6195 // "location": "path", 6196 // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", 6197 // "required": true, 6198 // "type": "string" 6199 // }, 6200 // "project": { 6201 // "description": "The project ID for this request.", 6202 // "location": "path", 6203 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 6204 // "required": true, 6205 // "type": "string" 6206 // } 6207 // }, 6208 // "path": "{project}/global/deployments/{deployment}/manifests/{manifest}", 6209 // "response": { 6210 // "$ref": "Manifest" 6211 // }, 6212 // "scopes": [ 6213 // "https://www.googleapis.com/auth/cloud-platform", 6214 // "https://www.googleapis.com/auth/cloud-platform.read-only", 6215 // "https://www.googleapis.com/auth/ndev.cloudman", 6216 // "https://www.googleapis.com/auth/ndev.cloudman.readonly" 6217 // ] 6218 // } 6219 6220} 6221 6222// method id "deploymentmanager.manifests.list": 6223 6224type ManifestsListCall struct { 6225 s *Service 6226 project string 6227 deployment string 6228 urlParams_ gensupport.URLParams 6229 ifNoneMatch_ string 6230 ctx_ context.Context 6231 header_ http.Header 6232} 6233 6234// List: Lists all manifests for a given deployment. 6235func (r *ManifestsService) List(project string, deployment string) *ManifestsListCall { 6236 c := &ManifestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6237 c.project = project 6238 c.deployment = deployment 6239 return c 6240} 6241 6242// Filter sets the optional parameter "filter": A filter expression that 6243// filters resources listed in the response. The expression must specify 6244// the field name, a comparison operator, and the value that you want to 6245// use for filtering. The value must be a string, a number, or a 6246// boolean. The comparison operator must be either =, !=, >, or <. 6247// 6248// For example, if you are filtering Compute Engine instances, you can 6249// exclude instances named example-instance by specifying name != 6250// example-instance. 6251// 6252// You can also filter nested fields. For example, you could specify 6253// scheduling.automaticRestart = false to include instances only if they 6254// are not scheduled for automatic restarts. You can use filtering on 6255// nested fields to filter based on resource labels. 6256// 6257// To filter on multiple expressions, provide each separate expression 6258// within parentheses. For example, (scheduling.automaticRestart = true) 6259// (cpuPlatform = "Intel Skylake"). By default, each expression is an 6260// AND expression. However, you can include AND and OR expressions 6261// explicitly. For example, (cpuPlatform = "Intel Skylake") OR 6262// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = 6263// true). 6264func (c *ManifestsListCall) Filter(filter string) *ManifestsListCall { 6265 c.urlParams_.Set("filter", filter) 6266 return c 6267} 6268 6269// MaxResults sets the optional parameter "maxResults": The maximum 6270// number of results per page that should be returned. If the number of 6271// available results is larger than maxResults, Compute Engine returns a 6272// nextPageToken that can be used to get the next page of results in 6273// subsequent list requests. Acceptable values are 0 to 500, inclusive. 6274// (Default: 500) 6275func (c *ManifestsListCall) MaxResults(maxResults int64) *ManifestsListCall { 6276 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 6277 return c 6278} 6279 6280// OrderBy sets the optional parameter "orderBy": Sorts list results by 6281// a certain order. By default, results are returned in alphanumerical 6282// order based on the resource name. 6283// 6284// You can also sort results in descending order based on the creation 6285// timestamp using orderBy="creationTimestamp desc". This sorts results 6286// based on the creationTimestamp field in reverse chronological order 6287// (newest result first). Use this to sort resources like operations so 6288// that the newest operation is returned first. 6289// 6290// Currently, only sorting by name or creationTimestamp desc is 6291// supported. 6292func (c *ManifestsListCall) OrderBy(orderBy string) *ManifestsListCall { 6293 c.urlParams_.Set("orderBy", orderBy) 6294 return c 6295} 6296 6297// PageToken sets the optional parameter "pageToken": Specifies a page 6298// token to use. Set pageToken to the nextPageToken returned by a 6299// previous list request to get the next page of results. 6300func (c *ManifestsListCall) PageToken(pageToken string) *ManifestsListCall { 6301 c.urlParams_.Set("pageToken", pageToken) 6302 return c 6303} 6304 6305// Fields allows partial responses to be retrieved. See 6306// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6307// for more information. 6308func (c *ManifestsListCall) Fields(s ...googleapi.Field) *ManifestsListCall { 6309 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6310 return c 6311} 6312 6313// IfNoneMatch sets the optional parameter which makes the operation 6314// fail if the object's ETag matches the given value. This is useful for 6315// getting updates only after the object has changed since the last 6316// request. Use googleapi.IsNotModified to check whether the response 6317// error from Do is the result of In-None-Match. 6318func (c *ManifestsListCall) IfNoneMatch(entityTag string) *ManifestsListCall { 6319 c.ifNoneMatch_ = entityTag 6320 return c 6321} 6322 6323// Context sets the context to be used in this call's Do method. Any 6324// pending HTTP request will be aborted if the provided context is 6325// canceled. 6326func (c *ManifestsListCall) Context(ctx context.Context) *ManifestsListCall { 6327 c.ctx_ = ctx 6328 return c 6329} 6330 6331// Header returns an http.Header that can be modified by the caller to 6332// add HTTP headers to the request. 6333func (c *ManifestsListCall) Header() http.Header { 6334 if c.header_ == nil { 6335 c.header_ = make(http.Header) 6336 } 6337 return c.header_ 6338} 6339 6340func (c *ManifestsListCall) doRequest(alt string) (*http.Response, error) { 6341 reqHeaders := make(http.Header) 6342 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6343 for k, v := range c.header_ { 6344 reqHeaders[k] = v 6345 } 6346 reqHeaders.Set("User-Agent", c.s.userAgent()) 6347 if c.ifNoneMatch_ != "" { 6348 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6349 } 6350 var body io.Reader = nil 6351 c.urlParams_.Set("alt", alt) 6352 c.urlParams_.Set("prettyPrint", "false") 6353 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/manifests") 6354 urls += "?" + c.urlParams_.Encode() 6355 req, err := http.NewRequest("GET", urls, body) 6356 if err != nil { 6357 return nil, err 6358 } 6359 req.Header = reqHeaders 6360 googleapi.Expand(req.URL, map[string]string{ 6361 "project": c.project, 6362 "deployment": c.deployment, 6363 }) 6364 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6365} 6366 6367// Do executes the "deploymentmanager.manifests.list" call. 6368// Exactly one of *ManifestsListResponse or error will be non-nil. Any 6369// non-2xx status code is an error. Response headers are in either 6370// *ManifestsListResponse.ServerResponse.Header or (if a response was 6371// returned at all) in error.(*googleapi.Error).Header. Use 6372// googleapi.IsNotModified to check whether the returned error was 6373// because http.StatusNotModified was returned. 6374func (c *ManifestsListCall) Do(opts ...googleapi.CallOption) (*ManifestsListResponse, error) { 6375 gensupport.SetOptions(c.urlParams_, opts...) 6376 res, err := c.doRequest("json") 6377 if res != nil && res.StatusCode == http.StatusNotModified { 6378 if res.Body != nil { 6379 res.Body.Close() 6380 } 6381 return nil, &googleapi.Error{ 6382 Code: res.StatusCode, 6383 Header: res.Header, 6384 } 6385 } 6386 if err != nil { 6387 return nil, err 6388 } 6389 defer googleapi.CloseBody(res) 6390 if err := googleapi.CheckResponse(res); err != nil { 6391 return nil, err 6392 } 6393 ret := &ManifestsListResponse{ 6394 ServerResponse: googleapi.ServerResponse{ 6395 Header: res.Header, 6396 HTTPStatusCode: res.StatusCode, 6397 }, 6398 } 6399 target := &ret 6400 if err := gensupport.DecodeResponse(target, res); err != nil { 6401 return nil, err 6402 } 6403 return ret, nil 6404 // { 6405 // "description": "Lists all manifests for a given deployment.", 6406 // "httpMethod": "GET", 6407 // "id": "deploymentmanager.manifests.list", 6408 // "parameterOrder": [ 6409 // "project", 6410 // "deployment" 6411 // ], 6412 // "parameters": { 6413 // "deployment": { 6414 // "description": "The name of the deployment for this request.", 6415 // "location": "path", 6416 // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", 6417 // "required": true, 6418 // "type": "string" 6419 // }, 6420 // "filter": { 6421 // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", 6422 // "location": "query", 6423 // "type": "string" 6424 // }, 6425 // "maxResults": { 6426 // "default": "500", 6427 // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", 6428 // "format": "uint32", 6429 // "location": "query", 6430 // "minimum": "0", 6431 // "type": "integer" 6432 // }, 6433 // "orderBy": { 6434 // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", 6435 // "location": "query", 6436 // "type": "string" 6437 // }, 6438 // "pageToken": { 6439 // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", 6440 // "location": "query", 6441 // "type": "string" 6442 // }, 6443 // "project": { 6444 // "description": "The project ID for this request.", 6445 // "location": "path", 6446 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 6447 // "required": true, 6448 // "type": "string" 6449 // } 6450 // }, 6451 // "path": "{project}/global/deployments/{deployment}/manifests", 6452 // "response": { 6453 // "$ref": "ManifestsListResponse" 6454 // }, 6455 // "scopes": [ 6456 // "https://www.googleapis.com/auth/cloud-platform", 6457 // "https://www.googleapis.com/auth/cloud-platform.read-only", 6458 // "https://www.googleapis.com/auth/ndev.cloudman", 6459 // "https://www.googleapis.com/auth/ndev.cloudman.readonly" 6460 // ] 6461 // } 6462 6463} 6464 6465// Pages invokes f for each page of results. 6466// A non-nil error returned from f will halt the iteration. 6467// The provided context supersedes any context provided to the Context method. 6468func (c *ManifestsListCall) Pages(ctx context.Context, f func(*ManifestsListResponse) error) error { 6469 c.ctx_ = ctx 6470 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6471 for { 6472 x, err := c.Do() 6473 if err != nil { 6474 return err 6475 } 6476 if err := f(x); err != nil { 6477 return err 6478 } 6479 if x.NextPageToken == "" { 6480 return nil 6481 } 6482 c.PageToken(x.NextPageToken) 6483 } 6484} 6485 6486// method id "deploymentmanager.operations.get": 6487 6488type OperationsGetCall struct { 6489 s *Service 6490 project string 6491 operation string 6492 urlParams_ gensupport.URLParams 6493 ifNoneMatch_ string 6494 ctx_ context.Context 6495 header_ http.Header 6496} 6497 6498// Get: Gets information about a specific operation. 6499func (r *OperationsService) Get(project string, operation string) *OperationsGetCall { 6500 c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6501 c.project = project 6502 c.operation = operation 6503 return c 6504} 6505 6506// Fields allows partial responses to be retrieved. See 6507// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6508// for more information. 6509func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { 6510 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6511 return c 6512} 6513 6514// IfNoneMatch sets the optional parameter which makes the operation 6515// fail if the object's ETag matches the given value. This is useful for 6516// getting updates only after the object has changed since the last 6517// request. Use googleapi.IsNotModified to check whether the response 6518// error from Do is the result of In-None-Match. 6519func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { 6520 c.ifNoneMatch_ = entityTag 6521 return c 6522} 6523 6524// Context sets the context to be used in this call's Do method. Any 6525// pending HTTP request will be aborted if the provided context is 6526// canceled. 6527func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { 6528 c.ctx_ = ctx 6529 return c 6530} 6531 6532// Header returns an http.Header that can be modified by the caller to 6533// add HTTP headers to the request. 6534func (c *OperationsGetCall) Header() http.Header { 6535 if c.header_ == nil { 6536 c.header_ = make(http.Header) 6537 } 6538 return c.header_ 6539} 6540 6541func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { 6542 reqHeaders := make(http.Header) 6543 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6544 for k, v := range c.header_ { 6545 reqHeaders[k] = v 6546 } 6547 reqHeaders.Set("User-Agent", c.s.userAgent()) 6548 if c.ifNoneMatch_ != "" { 6549 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6550 } 6551 var body io.Reader = nil 6552 c.urlParams_.Set("alt", alt) 6553 c.urlParams_.Set("prettyPrint", "false") 6554 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}") 6555 urls += "?" + c.urlParams_.Encode() 6556 req, err := http.NewRequest("GET", urls, body) 6557 if err != nil { 6558 return nil, err 6559 } 6560 req.Header = reqHeaders 6561 googleapi.Expand(req.URL, map[string]string{ 6562 "project": c.project, 6563 "operation": c.operation, 6564 }) 6565 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6566} 6567 6568// Do executes the "deploymentmanager.operations.get" call. 6569// Exactly one of *Operation or error will be non-nil. Any non-2xx 6570// status code is an error. Response headers are in either 6571// *Operation.ServerResponse.Header or (if a response was returned at 6572// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6573// to check whether the returned error was because 6574// http.StatusNotModified was returned. 6575func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6576 gensupport.SetOptions(c.urlParams_, opts...) 6577 res, err := c.doRequest("json") 6578 if res != nil && res.StatusCode == http.StatusNotModified { 6579 if res.Body != nil { 6580 res.Body.Close() 6581 } 6582 return nil, &googleapi.Error{ 6583 Code: res.StatusCode, 6584 Header: res.Header, 6585 } 6586 } 6587 if err != nil { 6588 return nil, err 6589 } 6590 defer googleapi.CloseBody(res) 6591 if err := googleapi.CheckResponse(res); err != nil { 6592 return nil, err 6593 } 6594 ret := &Operation{ 6595 ServerResponse: googleapi.ServerResponse{ 6596 Header: res.Header, 6597 HTTPStatusCode: res.StatusCode, 6598 }, 6599 } 6600 target := &ret 6601 if err := gensupport.DecodeResponse(target, res); err != nil { 6602 return nil, err 6603 } 6604 return ret, nil 6605 // { 6606 // "description": "Gets information about a specific operation.", 6607 // "httpMethod": "GET", 6608 // "id": "deploymentmanager.operations.get", 6609 // "parameterOrder": [ 6610 // "project", 6611 // "operation" 6612 // ], 6613 // "parameters": { 6614 // "operation": { 6615 // "description": "The name of the operation for this request.", 6616 // "location": "path", 6617 // "required": true, 6618 // "type": "string" 6619 // }, 6620 // "project": { 6621 // "description": "The project ID for this request.", 6622 // "location": "path", 6623 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 6624 // "required": true, 6625 // "type": "string" 6626 // } 6627 // }, 6628 // "path": "{project}/global/operations/{operation}", 6629 // "response": { 6630 // "$ref": "Operation" 6631 // }, 6632 // "scopes": [ 6633 // "https://www.googleapis.com/auth/cloud-platform", 6634 // "https://www.googleapis.com/auth/cloud-platform.read-only", 6635 // "https://www.googleapis.com/auth/ndev.cloudman", 6636 // "https://www.googleapis.com/auth/ndev.cloudman.readonly" 6637 // ] 6638 // } 6639 6640} 6641 6642// method id "deploymentmanager.operations.list": 6643 6644type OperationsListCall struct { 6645 s *Service 6646 project string 6647 urlParams_ gensupport.URLParams 6648 ifNoneMatch_ string 6649 ctx_ context.Context 6650 header_ http.Header 6651} 6652 6653// List: Lists all operations for a project. 6654func (r *OperationsService) List(project string) *OperationsListCall { 6655 c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6656 c.project = project 6657 return c 6658} 6659 6660// Filter sets the optional parameter "filter": A filter expression that 6661// filters resources listed in the response. The expression must specify 6662// the field name, a comparison operator, and the value that you want to 6663// use for filtering. The value must be a string, a number, or a 6664// boolean. The comparison operator must be either =, !=, >, or <. 6665// 6666// For example, if you are filtering Compute Engine instances, you can 6667// exclude instances named example-instance by specifying name != 6668// example-instance. 6669// 6670// You can also filter nested fields. For example, you could specify 6671// scheduling.automaticRestart = false to include instances only if they 6672// are not scheduled for automatic restarts. You can use filtering on 6673// nested fields to filter based on resource labels. 6674// 6675// To filter on multiple expressions, provide each separate expression 6676// within parentheses. For example, (scheduling.automaticRestart = true) 6677// (cpuPlatform = "Intel Skylake"). By default, each expression is an 6678// AND expression. However, you can include AND and OR expressions 6679// explicitly. For example, (cpuPlatform = "Intel Skylake") OR 6680// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = 6681// true). 6682func (c *OperationsListCall) Filter(filter string) *OperationsListCall { 6683 c.urlParams_.Set("filter", filter) 6684 return c 6685} 6686 6687// MaxResults sets the optional parameter "maxResults": The maximum 6688// number of results per page that should be returned. If the number of 6689// available results is larger than maxResults, Compute Engine returns a 6690// nextPageToken that can be used to get the next page of results in 6691// subsequent list requests. Acceptable values are 0 to 500, inclusive. 6692// (Default: 500) 6693func (c *OperationsListCall) MaxResults(maxResults int64) *OperationsListCall { 6694 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 6695 return c 6696} 6697 6698// OrderBy sets the optional parameter "orderBy": Sorts list results by 6699// a certain order. By default, results are returned in alphanumerical 6700// order based on the resource name. 6701// 6702// You can also sort results in descending order based on the creation 6703// timestamp using orderBy="creationTimestamp desc". This sorts results 6704// based on the creationTimestamp field in reverse chronological order 6705// (newest result first). Use this to sort resources like operations so 6706// that the newest operation is returned first. 6707// 6708// Currently, only sorting by name or creationTimestamp desc is 6709// supported. 6710func (c *OperationsListCall) OrderBy(orderBy string) *OperationsListCall { 6711 c.urlParams_.Set("orderBy", orderBy) 6712 return c 6713} 6714 6715// PageToken sets the optional parameter "pageToken": Specifies a page 6716// token to use. Set pageToken to the nextPageToken returned by a 6717// previous list request to get the next page of results. 6718func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { 6719 c.urlParams_.Set("pageToken", pageToken) 6720 return c 6721} 6722 6723// Fields allows partial responses to be retrieved. See 6724// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6725// for more information. 6726func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { 6727 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6728 return c 6729} 6730 6731// IfNoneMatch sets the optional parameter which makes the operation 6732// fail if the object's ETag matches the given value. This is useful for 6733// getting updates only after the object has changed since the last 6734// request. Use googleapi.IsNotModified to check whether the response 6735// error from Do is the result of In-None-Match. 6736func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { 6737 c.ifNoneMatch_ = entityTag 6738 return c 6739} 6740 6741// Context sets the context to be used in this call's Do method. Any 6742// pending HTTP request will be aborted if the provided context is 6743// canceled. 6744func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { 6745 c.ctx_ = ctx 6746 return c 6747} 6748 6749// Header returns an http.Header that can be modified by the caller to 6750// add HTTP headers to the request. 6751func (c *OperationsListCall) Header() http.Header { 6752 if c.header_ == nil { 6753 c.header_ = make(http.Header) 6754 } 6755 return c.header_ 6756} 6757 6758func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { 6759 reqHeaders := make(http.Header) 6760 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6761 for k, v := range c.header_ { 6762 reqHeaders[k] = v 6763 } 6764 reqHeaders.Set("User-Agent", c.s.userAgent()) 6765 if c.ifNoneMatch_ != "" { 6766 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6767 } 6768 var body io.Reader = nil 6769 c.urlParams_.Set("alt", alt) 6770 c.urlParams_.Set("prettyPrint", "false") 6771 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations") 6772 urls += "?" + c.urlParams_.Encode() 6773 req, err := http.NewRequest("GET", urls, body) 6774 if err != nil { 6775 return nil, err 6776 } 6777 req.Header = reqHeaders 6778 googleapi.Expand(req.URL, map[string]string{ 6779 "project": c.project, 6780 }) 6781 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6782} 6783 6784// Do executes the "deploymentmanager.operations.list" call. 6785// Exactly one of *OperationsListResponse or error will be non-nil. Any 6786// non-2xx status code is an error. Response headers are in either 6787// *OperationsListResponse.ServerResponse.Header or (if a response was 6788// returned at all) in error.(*googleapi.Error).Header. Use 6789// googleapi.IsNotModified to check whether the returned error was 6790// because http.StatusNotModified was returned. 6791func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListResponse, error) { 6792 gensupport.SetOptions(c.urlParams_, opts...) 6793 res, err := c.doRequest("json") 6794 if res != nil && res.StatusCode == http.StatusNotModified { 6795 if res.Body != nil { 6796 res.Body.Close() 6797 } 6798 return nil, &googleapi.Error{ 6799 Code: res.StatusCode, 6800 Header: res.Header, 6801 } 6802 } 6803 if err != nil { 6804 return nil, err 6805 } 6806 defer googleapi.CloseBody(res) 6807 if err := googleapi.CheckResponse(res); err != nil { 6808 return nil, err 6809 } 6810 ret := &OperationsListResponse{ 6811 ServerResponse: googleapi.ServerResponse{ 6812 Header: res.Header, 6813 HTTPStatusCode: res.StatusCode, 6814 }, 6815 } 6816 target := &ret 6817 if err := gensupport.DecodeResponse(target, res); err != nil { 6818 return nil, err 6819 } 6820 return ret, nil 6821 // { 6822 // "description": "Lists all operations for a project.", 6823 // "httpMethod": "GET", 6824 // "id": "deploymentmanager.operations.list", 6825 // "parameterOrder": [ 6826 // "project" 6827 // ], 6828 // "parameters": { 6829 // "filter": { 6830 // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", 6831 // "location": "query", 6832 // "type": "string" 6833 // }, 6834 // "maxResults": { 6835 // "default": "500", 6836 // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", 6837 // "format": "uint32", 6838 // "location": "query", 6839 // "minimum": "0", 6840 // "type": "integer" 6841 // }, 6842 // "orderBy": { 6843 // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", 6844 // "location": "query", 6845 // "type": "string" 6846 // }, 6847 // "pageToken": { 6848 // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", 6849 // "location": "query", 6850 // "type": "string" 6851 // }, 6852 // "project": { 6853 // "description": "The project ID for this request.", 6854 // "location": "path", 6855 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 6856 // "required": true, 6857 // "type": "string" 6858 // } 6859 // }, 6860 // "path": "{project}/global/operations", 6861 // "response": { 6862 // "$ref": "OperationsListResponse" 6863 // }, 6864 // "scopes": [ 6865 // "https://www.googleapis.com/auth/cloud-platform", 6866 // "https://www.googleapis.com/auth/cloud-platform.read-only", 6867 // "https://www.googleapis.com/auth/ndev.cloudman", 6868 // "https://www.googleapis.com/auth/ndev.cloudman.readonly" 6869 // ] 6870 // } 6871 6872} 6873 6874// Pages invokes f for each page of results. 6875// A non-nil error returned from f will halt the iteration. 6876// The provided context supersedes any context provided to the Context method. 6877func (c *OperationsListCall) Pages(ctx context.Context, f func(*OperationsListResponse) error) error { 6878 c.ctx_ = ctx 6879 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6880 for { 6881 x, err := c.Do() 6882 if err != nil { 6883 return err 6884 } 6885 if err := f(x); err != nil { 6886 return err 6887 } 6888 if x.NextPageToken == "" { 6889 return nil 6890 } 6891 c.PageToken(x.NextPageToken) 6892 } 6893} 6894 6895// method id "deploymentmanager.resources.get": 6896 6897type ResourcesGetCall struct { 6898 s *Service 6899 project string 6900 deployment string 6901 resource string 6902 urlParams_ gensupport.URLParams 6903 ifNoneMatch_ string 6904 ctx_ context.Context 6905 header_ http.Header 6906} 6907 6908// Get: Gets information about a single resource. 6909func (r *ResourcesService) Get(project string, deployment string, resource string) *ResourcesGetCall { 6910 c := &ResourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6911 c.project = project 6912 c.deployment = deployment 6913 c.resource = resource 6914 return c 6915} 6916 6917// Fields allows partial responses to be retrieved. See 6918// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6919// for more information. 6920func (c *ResourcesGetCall) Fields(s ...googleapi.Field) *ResourcesGetCall { 6921 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6922 return c 6923} 6924 6925// IfNoneMatch sets the optional parameter which makes the operation 6926// fail if the object's ETag matches the given value. This is useful for 6927// getting updates only after the object has changed since the last 6928// request. Use googleapi.IsNotModified to check whether the response 6929// error from Do is the result of In-None-Match. 6930func (c *ResourcesGetCall) IfNoneMatch(entityTag string) *ResourcesGetCall { 6931 c.ifNoneMatch_ = entityTag 6932 return c 6933} 6934 6935// Context sets the context to be used in this call's Do method. Any 6936// pending HTTP request will be aborted if the provided context is 6937// canceled. 6938func (c *ResourcesGetCall) Context(ctx context.Context) *ResourcesGetCall { 6939 c.ctx_ = ctx 6940 return c 6941} 6942 6943// Header returns an http.Header that can be modified by the caller to 6944// add HTTP headers to the request. 6945func (c *ResourcesGetCall) Header() http.Header { 6946 if c.header_ == nil { 6947 c.header_ = make(http.Header) 6948 } 6949 return c.header_ 6950} 6951 6952func (c *ResourcesGetCall) doRequest(alt string) (*http.Response, error) { 6953 reqHeaders := make(http.Header) 6954 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6955 for k, v := range c.header_ { 6956 reqHeaders[k] = v 6957 } 6958 reqHeaders.Set("User-Agent", c.s.userAgent()) 6959 if c.ifNoneMatch_ != "" { 6960 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6961 } 6962 var body io.Reader = nil 6963 c.urlParams_.Set("alt", alt) 6964 c.urlParams_.Set("prettyPrint", "false") 6965 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/resources/{resource}") 6966 urls += "?" + c.urlParams_.Encode() 6967 req, err := http.NewRequest("GET", urls, body) 6968 if err != nil { 6969 return nil, err 6970 } 6971 req.Header = reqHeaders 6972 googleapi.Expand(req.URL, map[string]string{ 6973 "project": c.project, 6974 "deployment": c.deployment, 6975 "resource": c.resource, 6976 }) 6977 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6978} 6979 6980// Do executes the "deploymentmanager.resources.get" call. 6981// Exactly one of *Resource or error will be non-nil. Any non-2xx status 6982// code is an error. Response headers are in either 6983// *Resource.ServerResponse.Header or (if a response was returned at 6984// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6985// to check whether the returned error was because 6986// http.StatusNotModified was returned. 6987func (c *ResourcesGetCall) Do(opts ...googleapi.CallOption) (*Resource, error) { 6988 gensupport.SetOptions(c.urlParams_, opts...) 6989 res, err := c.doRequest("json") 6990 if res != nil && res.StatusCode == http.StatusNotModified { 6991 if res.Body != nil { 6992 res.Body.Close() 6993 } 6994 return nil, &googleapi.Error{ 6995 Code: res.StatusCode, 6996 Header: res.Header, 6997 } 6998 } 6999 if err != nil { 7000 return nil, err 7001 } 7002 defer googleapi.CloseBody(res) 7003 if err := googleapi.CheckResponse(res); err != nil { 7004 return nil, err 7005 } 7006 ret := &Resource{ 7007 ServerResponse: googleapi.ServerResponse{ 7008 Header: res.Header, 7009 HTTPStatusCode: res.StatusCode, 7010 }, 7011 } 7012 target := &ret 7013 if err := gensupport.DecodeResponse(target, res); err != nil { 7014 return nil, err 7015 } 7016 return ret, nil 7017 // { 7018 // "description": "Gets information about a single resource.", 7019 // "httpMethod": "GET", 7020 // "id": "deploymentmanager.resources.get", 7021 // "parameterOrder": [ 7022 // "project", 7023 // "deployment", 7024 // "resource" 7025 // ], 7026 // "parameters": { 7027 // "deployment": { 7028 // "description": "The name of the deployment for this request.", 7029 // "location": "path", 7030 // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", 7031 // "required": true, 7032 // "type": "string" 7033 // }, 7034 // "project": { 7035 // "description": "The project ID for this request.", 7036 // "location": "path", 7037 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 7038 // "required": true, 7039 // "type": "string" 7040 // }, 7041 // "resource": { 7042 // "description": "The name of the resource for this request.", 7043 // "location": "path", 7044 // "required": true, 7045 // "type": "string" 7046 // } 7047 // }, 7048 // "path": "{project}/global/deployments/{deployment}/resources/{resource}", 7049 // "response": { 7050 // "$ref": "Resource" 7051 // }, 7052 // "scopes": [ 7053 // "https://www.googleapis.com/auth/cloud-platform", 7054 // "https://www.googleapis.com/auth/cloud-platform.read-only", 7055 // "https://www.googleapis.com/auth/ndev.cloudman", 7056 // "https://www.googleapis.com/auth/ndev.cloudman.readonly" 7057 // ] 7058 // } 7059 7060} 7061 7062// method id "deploymentmanager.resources.list": 7063 7064type ResourcesListCall struct { 7065 s *Service 7066 project string 7067 deployment string 7068 urlParams_ gensupport.URLParams 7069 ifNoneMatch_ string 7070 ctx_ context.Context 7071 header_ http.Header 7072} 7073 7074// List: Lists all resources in a given deployment. 7075func (r *ResourcesService) List(project string, deployment string) *ResourcesListCall { 7076 c := &ResourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7077 c.project = project 7078 c.deployment = deployment 7079 return c 7080} 7081 7082// Filter sets the optional parameter "filter": A filter expression that 7083// filters resources listed in the response. The expression must specify 7084// the field name, a comparison operator, and the value that you want to 7085// use for filtering. The value must be a string, a number, or a 7086// boolean. The comparison operator must be either =, !=, >, or <. 7087// 7088// For example, if you are filtering Compute Engine instances, you can 7089// exclude instances named example-instance by specifying name != 7090// example-instance. 7091// 7092// You can also filter nested fields. For example, you could specify 7093// scheduling.automaticRestart = false to include instances only if they 7094// are not scheduled for automatic restarts. You can use filtering on 7095// nested fields to filter based on resource labels. 7096// 7097// To filter on multiple expressions, provide each separate expression 7098// within parentheses. For example, (scheduling.automaticRestart = true) 7099// (cpuPlatform = "Intel Skylake"). By default, each expression is an 7100// AND expression. However, you can include AND and OR expressions 7101// explicitly. For example, (cpuPlatform = "Intel Skylake") OR 7102// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = 7103// true). 7104func (c *ResourcesListCall) Filter(filter string) *ResourcesListCall { 7105 c.urlParams_.Set("filter", filter) 7106 return c 7107} 7108 7109// MaxResults sets the optional parameter "maxResults": The maximum 7110// number of results per page that should be returned. If the number of 7111// available results is larger than maxResults, Compute Engine returns a 7112// nextPageToken that can be used to get the next page of results in 7113// subsequent list requests. Acceptable values are 0 to 500, inclusive. 7114// (Default: 500) 7115func (c *ResourcesListCall) MaxResults(maxResults int64) *ResourcesListCall { 7116 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 7117 return c 7118} 7119 7120// OrderBy sets the optional parameter "orderBy": Sorts list results by 7121// a certain order. By default, results are returned in alphanumerical 7122// order based on the resource name. 7123// 7124// You can also sort results in descending order based on the creation 7125// timestamp using orderBy="creationTimestamp desc". This sorts results 7126// based on the creationTimestamp field in reverse chronological order 7127// (newest result first). Use this to sort resources like operations so 7128// that the newest operation is returned first. 7129// 7130// Currently, only sorting by name or creationTimestamp desc is 7131// supported. 7132func (c *ResourcesListCall) OrderBy(orderBy string) *ResourcesListCall { 7133 c.urlParams_.Set("orderBy", orderBy) 7134 return c 7135} 7136 7137// PageToken sets the optional parameter "pageToken": Specifies a page 7138// token to use. Set pageToken to the nextPageToken returned by a 7139// previous list request to get the next page of results. 7140func (c *ResourcesListCall) PageToken(pageToken string) *ResourcesListCall { 7141 c.urlParams_.Set("pageToken", pageToken) 7142 return c 7143} 7144 7145// Fields allows partial responses to be retrieved. See 7146// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7147// for more information. 7148func (c *ResourcesListCall) Fields(s ...googleapi.Field) *ResourcesListCall { 7149 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7150 return c 7151} 7152 7153// IfNoneMatch sets the optional parameter which makes the operation 7154// fail if the object's ETag matches the given value. This is useful for 7155// getting updates only after the object has changed since the last 7156// request. Use googleapi.IsNotModified to check whether the response 7157// error from Do is the result of In-None-Match. 7158func (c *ResourcesListCall) IfNoneMatch(entityTag string) *ResourcesListCall { 7159 c.ifNoneMatch_ = entityTag 7160 return c 7161} 7162 7163// Context sets the context to be used in this call's Do method. Any 7164// pending HTTP request will be aborted if the provided context is 7165// canceled. 7166func (c *ResourcesListCall) Context(ctx context.Context) *ResourcesListCall { 7167 c.ctx_ = ctx 7168 return c 7169} 7170 7171// Header returns an http.Header that can be modified by the caller to 7172// add HTTP headers to the request. 7173func (c *ResourcesListCall) Header() http.Header { 7174 if c.header_ == nil { 7175 c.header_ = make(http.Header) 7176 } 7177 return c.header_ 7178} 7179 7180func (c *ResourcesListCall) doRequest(alt string) (*http.Response, error) { 7181 reqHeaders := make(http.Header) 7182 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7183 for k, v := range c.header_ { 7184 reqHeaders[k] = v 7185 } 7186 reqHeaders.Set("User-Agent", c.s.userAgent()) 7187 if c.ifNoneMatch_ != "" { 7188 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7189 } 7190 var body io.Reader = nil 7191 c.urlParams_.Set("alt", alt) 7192 c.urlParams_.Set("prettyPrint", "false") 7193 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/resources") 7194 urls += "?" + c.urlParams_.Encode() 7195 req, err := http.NewRequest("GET", urls, body) 7196 if err != nil { 7197 return nil, err 7198 } 7199 req.Header = reqHeaders 7200 googleapi.Expand(req.URL, map[string]string{ 7201 "project": c.project, 7202 "deployment": c.deployment, 7203 }) 7204 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7205} 7206 7207// Do executes the "deploymentmanager.resources.list" call. 7208// Exactly one of *ResourcesListResponse or error will be non-nil. Any 7209// non-2xx status code is an error. Response headers are in either 7210// *ResourcesListResponse.ServerResponse.Header or (if a response was 7211// returned at all) in error.(*googleapi.Error).Header. Use 7212// googleapi.IsNotModified to check whether the returned error was 7213// because http.StatusNotModified was returned. 7214func (c *ResourcesListCall) Do(opts ...googleapi.CallOption) (*ResourcesListResponse, error) { 7215 gensupport.SetOptions(c.urlParams_, opts...) 7216 res, err := c.doRequest("json") 7217 if res != nil && res.StatusCode == http.StatusNotModified { 7218 if res.Body != nil { 7219 res.Body.Close() 7220 } 7221 return nil, &googleapi.Error{ 7222 Code: res.StatusCode, 7223 Header: res.Header, 7224 } 7225 } 7226 if err != nil { 7227 return nil, err 7228 } 7229 defer googleapi.CloseBody(res) 7230 if err := googleapi.CheckResponse(res); err != nil { 7231 return nil, err 7232 } 7233 ret := &ResourcesListResponse{ 7234 ServerResponse: googleapi.ServerResponse{ 7235 Header: res.Header, 7236 HTTPStatusCode: res.StatusCode, 7237 }, 7238 } 7239 target := &ret 7240 if err := gensupport.DecodeResponse(target, res); err != nil { 7241 return nil, err 7242 } 7243 return ret, nil 7244 // { 7245 // "description": "Lists all resources in a given deployment.", 7246 // "httpMethod": "GET", 7247 // "id": "deploymentmanager.resources.list", 7248 // "parameterOrder": [ 7249 // "project", 7250 // "deployment" 7251 // ], 7252 // "parameters": { 7253 // "deployment": { 7254 // "description": "The name of the deployment for this request.", 7255 // "location": "path", 7256 // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", 7257 // "required": true, 7258 // "type": "string" 7259 // }, 7260 // "filter": { 7261 // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", 7262 // "location": "query", 7263 // "type": "string" 7264 // }, 7265 // "maxResults": { 7266 // "default": "500", 7267 // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", 7268 // "format": "uint32", 7269 // "location": "query", 7270 // "minimum": "0", 7271 // "type": "integer" 7272 // }, 7273 // "orderBy": { 7274 // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", 7275 // "location": "query", 7276 // "type": "string" 7277 // }, 7278 // "pageToken": { 7279 // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", 7280 // "location": "query", 7281 // "type": "string" 7282 // }, 7283 // "project": { 7284 // "description": "The project ID for this request.", 7285 // "location": "path", 7286 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 7287 // "required": true, 7288 // "type": "string" 7289 // } 7290 // }, 7291 // "path": "{project}/global/deployments/{deployment}/resources", 7292 // "response": { 7293 // "$ref": "ResourcesListResponse" 7294 // }, 7295 // "scopes": [ 7296 // "https://www.googleapis.com/auth/cloud-platform", 7297 // "https://www.googleapis.com/auth/cloud-platform.read-only", 7298 // "https://www.googleapis.com/auth/ndev.cloudman", 7299 // "https://www.googleapis.com/auth/ndev.cloudman.readonly" 7300 // ] 7301 // } 7302 7303} 7304 7305// Pages invokes f for each page of results. 7306// A non-nil error returned from f will halt the iteration. 7307// The provided context supersedes any context provided to the Context method. 7308func (c *ResourcesListCall) Pages(ctx context.Context, f func(*ResourcesListResponse) error) error { 7309 c.ctx_ = ctx 7310 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7311 for { 7312 x, err := c.Do() 7313 if err != nil { 7314 return err 7315 } 7316 if err := f(x); err != nil { 7317 return err 7318 } 7319 if x.NextPageToken == "" { 7320 return nil 7321 } 7322 c.PageToken(x.NextPageToken) 7323 } 7324} 7325 7326// method id "deploymentmanager.typeProviders.delete": 7327 7328type TypeProvidersDeleteCall struct { 7329 s *Service 7330 project string 7331 typeProvider string 7332 urlParams_ gensupport.URLParams 7333 ctx_ context.Context 7334 header_ http.Header 7335} 7336 7337// Delete: Deletes a type provider. 7338func (r *TypeProvidersService) Delete(project string, typeProvider string) *TypeProvidersDeleteCall { 7339 c := &TypeProvidersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7340 c.project = project 7341 c.typeProvider = typeProvider 7342 return c 7343} 7344 7345// Fields allows partial responses to be retrieved. See 7346// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7347// for more information. 7348func (c *TypeProvidersDeleteCall) Fields(s ...googleapi.Field) *TypeProvidersDeleteCall { 7349 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7350 return c 7351} 7352 7353// Context sets the context to be used in this call's Do method. Any 7354// pending HTTP request will be aborted if the provided context is 7355// canceled. 7356func (c *TypeProvidersDeleteCall) Context(ctx context.Context) *TypeProvidersDeleteCall { 7357 c.ctx_ = ctx 7358 return c 7359} 7360 7361// Header returns an http.Header that can be modified by the caller to 7362// add HTTP headers to the request. 7363func (c *TypeProvidersDeleteCall) Header() http.Header { 7364 if c.header_ == nil { 7365 c.header_ = make(http.Header) 7366 } 7367 return c.header_ 7368} 7369 7370func (c *TypeProvidersDeleteCall) doRequest(alt string) (*http.Response, error) { 7371 reqHeaders := make(http.Header) 7372 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7373 for k, v := range c.header_ { 7374 reqHeaders[k] = v 7375 } 7376 reqHeaders.Set("User-Agent", c.s.userAgent()) 7377 var body io.Reader = nil 7378 c.urlParams_.Set("alt", alt) 7379 c.urlParams_.Set("prettyPrint", "false") 7380 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}") 7381 urls += "?" + c.urlParams_.Encode() 7382 req, err := http.NewRequest("DELETE", urls, body) 7383 if err != nil { 7384 return nil, err 7385 } 7386 req.Header = reqHeaders 7387 googleapi.Expand(req.URL, map[string]string{ 7388 "project": c.project, 7389 "typeProvider": c.typeProvider, 7390 }) 7391 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7392} 7393 7394// Do executes the "deploymentmanager.typeProviders.delete" call. 7395// Exactly one of *Operation or error will be non-nil. Any non-2xx 7396// status code is an error. Response headers are in either 7397// *Operation.ServerResponse.Header or (if a response was returned at 7398// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7399// to check whether the returned error was because 7400// http.StatusNotModified was returned. 7401func (c *TypeProvidersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7402 gensupport.SetOptions(c.urlParams_, opts...) 7403 res, err := c.doRequest("json") 7404 if res != nil && res.StatusCode == http.StatusNotModified { 7405 if res.Body != nil { 7406 res.Body.Close() 7407 } 7408 return nil, &googleapi.Error{ 7409 Code: res.StatusCode, 7410 Header: res.Header, 7411 } 7412 } 7413 if err != nil { 7414 return nil, err 7415 } 7416 defer googleapi.CloseBody(res) 7417 if err := googleapi.CheckResponse(res); err != nil { 7418 return nil, err 7419 } 7420 ret := &Operation{ 7421 ServerResponse: googleapi.ServerResponse{ 7422 Header: res.Header, 7423 HTTPStatusCode: res.StatusCode, 7424 }, 7425 } 7426 target := &ret 7427 if err := gensupport.DecodeResponse(target, res); err != nil { 7428 return nil, err 7429 } 7430 return ret, nil 7431 // { 7432 // "description": "Deletes a type provider.", 7433 // "httpMethod": "DELETE", 7434 // "id": "deploymentmanager.typeProviders.delete", 7435 // "parameterOrder": [ 7436 // "project", 7437 // "typeProvider" 7438 // ], 7439 // "parameters": { 7440 // "project": { 7441 // "description": "The project ID for this request.", 7442 // "location": "path", 7443 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 7444 // "required": true, 7445 // "type": "string" 7446 // }, 7447 // "typeProvider": { 7448 // "description": "The name of the type provider for this request.", 7449 // "location": "path", 7450 // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", 7451 // "required": true, 7452 // "type": "string" 7453 // } 7454 // }, 7455 // "path": "{project}/global/typeProviders/{typeProvider}", 7456 // "response": { 7457 // "$ref": "Operation" 7458 // }, 7459 // "scopes": [ 7460 // "https://www.googleapis.com/auth/cloud-platform", 7461 // "https://www.googleapis.com/auth/ndev.cloudman" 7462 // ] 7463 // } 7464 7465} 7466 7467// method id "deploymentmanager.typeProviders.get": 7468 7469type TypeProvidersGetCall struct { 7470 s *Service 7471 project string 7472 typeProvider string 7473 urlParams_ gensupport.URLParams 7474 ifNoneMatch_ string 7475 ctx_ context.Context 7476 header_ http.Header 7477} 7478 7479// Get: Gets information about a specific type provider. 7480func (r *TypeProvidersService) Get(project string, typeProvider string) *TypeProvidersGetCall { 7481 c := &TypeProvidersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7482 c.project = project 7483 c.typeProvider = typeProvider 7484 return c 7485} 7486 7487// Fields allows partial responses to be retrieved. See 7488// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7489// for more information. 7490func (c *TypeProvidersGetCall) Fields(s ...googleapi.Field) *TypeProvidersGetCall { 7491 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7492 return c 7493} 7494 7495// IfNoneMatch sets the optional parameter which makes the operation 7496// fail if the object's ETag matches the given value. This is useful for 7497// getting updates only after the object has changed since the last 7498// request. Use googleapi.IsNotModified to check whether the response 7499// error from Do is the result of In-None-Match. 7500func (c *TypeProvidersGetCall) IfNoneMatch(entityTag string) *TypeProvidersGetCall { 7501 c.ifNoneMatch_ = entityTag 7502 return c 7503} 7504 7505// Context sets the context to be used in this call's Do method. Any 7506// pending HTTP request will be aborted if the provided context is 7507// canceled. 7508func (c *TypeProvidersGetCall) Context(ctx context.Context) *TypeProvidersGetCall { 7509 c.ctx_ = ctx 7510 return c 7511} 7512 7513// Header returns an http.Header that can be modified by the caller to 7514// add HTTP headers to the request. 7515func (c *TypeProvidersGetCall) Header() http.Header { 7516 if c.header_ == nil { 7517 c.header_ = make(http.Header) 7518 } 7519 return c.header_ 7520} 7521 7522func (c *TypeProvidersGetCall) doRequest(alt string) (*http.Response, error) { 7523 reqHeaders := make(http.Header) 7524 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7525 for k, v := range c.header_ { 7526 reqHeaders[k] = v 7527 } 7528 reqHeaders.Set("User-Agent", c.s.userAgent()) 7529 if c.ifNoneMatch_ != "" { 7530 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7531 } 7532 var body io.Reader = nil 7533 c.urlParams_.Set("alt", alt) 7534 c.urlParams_.Set("prettyPrint", "false") 7535 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}") 7536 urls += "?" + c.urlParams_.Encode() 7537 req, err := http.NewRequest("GET", urls, body) 7538 if err != nil { 7539 return nil, err 7540 } 7541 req.Header = reqHeaders 7542 googleapi.Expand(req.URL, map[string]string{ 7543 "project": c.project, 7544 "typeProvider": c.typeProvider, 7545 }) 7546 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7547} 7548 7549// Do executes the "deploymentmanager.typeProviders.get" call. 7550// Exactly one of *TypeProvider or error will be non-nil. Any non-2xx 7551// status code is an error. Response headers are in either 7552// *TypeProvider.ServerResponse.Header or (if a response was returned at 7553// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7554// to check whether the returned error was because 7555// http.StatusNotModified was returned. 7556func (c *TypeProvidersGetCall) Do(opts ...googleapi.CallOption) (*TypeProvider, error) { 7557 gensupport.SetOptions(c.urlParams_, opts...) 7558 res, err := c.doRequest("json") 7559 if res != nil && res.StatusCode == http.StatusNotModified { 7560 if res.Body != nil { 7561 res.Body.Close() 7562 } 7563 return nil, &googleapi.Error{ 7564 Code: res.StatusCode, 7565 Header: res.Header, 7566 } 7567 } 7568 if err != nil { 7569 return nil, err 7570 } 7571 defer googleapi.CloseBody(res) 7572 if err := googleapi.CheckResponse(res); err != nil { 7573 return nil, err 7574 } 7575 ret := &TypeProvider{ 7576 ServerResponse: googleapi.ServerResponse{ 7577 Header: res.Header, 7578 HTTPStatusCode: res.StatusCode, 7579 }, 7580 } 7581 target := &ret 7582 if err := gensupport.DecodeResponse(target, res); err != nil { 7583 return nil, err 7584 } 7585 return ret, nil 7586 // { 7587 // "description": "Gets information about a specific type provider.", 7588 // "httpMethod": "GET", 7589 // "id": "deploymentmanager.typeProviders.get", 7590 // "parameterOrder": [ 7591 // "project", 7592 // "typeProvider" 7593 // ], 7594 // "parameters": { 7595 // "project": { 7596 // "description": "The project ID for this request.", 7597 // "location": "path", 7598 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 7599 // "required": true, 7600 // "type": "string" 7601 // }, 7602 // "typeProvider": { 7603 // "description": "The name of the type provider for this request.", 7604 // "location": "path", 7605 // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", 7606 // "required": true, 7607 // "type": "string" 7608 // } 7609 // }, 7610 // "path": "{project}/global/typeProviders/{typeProvider}", 7611 // "response": { 7612 // "$ref": "TypeProvider" 7613 // }, 7614 // "scopes": [ 7615 // "https://www.googleapis.com/auth/cloud-platform", 7616 // "https://www.googleapis.com/auth/cloud-platform.read-only", 7617 // "https://www.googleapis.com/auth/ndev.cloudman", 7618 // "https://www.googleapis.com/auth/ndev.cloudman.readonly" 7619 // ] 7620 // } 7621 7622} 7623 7624// method id "deploymentmanager.typeProviders.getType": 7625 7626type TypeProvidersGetTypeCall struct { 7627 s *Service 7628 project string 7629 typeProvider string 7630 type_ string 7631 urlParams_ gensupport.URLParams 7632 ifNoneMatch_ string 7633 ctx_ context.Context 7634 header_ http.Header 7635} 7636 7637// GetType: Gets a type info for a type provided by a TypeProvider. 7638func (r *TypeProvidersService) GetType(project string, typeProvider string, type_ string) *TypeProvidersGetTypeCall { 7639 c := &TypeProvidersGetTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7640 c.project = project 7641 c.typeProvider = typeProvider 7642 c.type_ = type_ 7643 return c 7644} 7645 7646// Fields allows partial responses to be retrieved. See 7647// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7648// for more information. 7649func (c *TypeProvidersGetTypeCall) Fields(s ...googleapi.Field) *TypeProvidersGetTypeCall { 7650 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7651 return c 7652} 7653 7654// IfNoneMatch sets the optional parameter which makes the operation 7655// fail if the object's ETag matches the given value. This is useful for 7656// getting updates only after the object has changed since the last 7657// request. Use googleapi.IsNotModified to check whether the response 7658// error from Do is the result of In-None-Match. 7659func (c *TypeProvidersGetTypeCall) IfNoneMatch(entityTag string) *TypeProvidersGetTypeCall { 7660 c.ifNoneMatch_ = entityTag 7661 return c 7662} 7663 7664// Context sets the context to be used in this call's Do method. Any 7665// pending HTTP request will be aborted if the provided context is 7666// canceled. 7667func (c *TypeProvidersGetTypeCall) Context(ctx context.Context) *TypeProvidersGetTypeCall { 7668 c.ctx_ = ctx 7669 return c 7670} 7671 7672// Header returns an http.Header that can be modified by the caller to 7673// add HTTP headers to the request. 7674func (c *TypeProvidersGetTypeCall) Header() http.Header { 7675 if c.header_ == nil { 7676 c.header_ = make(http.Header) 7677 } 7678 return c.header_ 7679} 7680 7681func (c *TypeProvidersGetTypeCall) doRequest(alt string) (*http.Response, error) { 7682 reqHeaders := make(http.Header) 7683 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7684 for k, v := range c.header_ { 7685 reqHeaders[k] = v 7686 } 7687 reqHeaders.Set("User-Agent", c.s.userAgent()) 7688 if c.ifNoneMatch_ != "" { 7689 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7690 } 7691 var body io.Reader = nil 7692 c.urlParams_.Set("alt", alt) 7693 c.urlParams_.Set("prettyPrint", "false") 7694 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}/types/{type}") 7695 urls += "?" + c.urlParams_.Encode() 7696 req, err := http.NewRequest("GET", urls, body) 7697 if err != nil { 7698 return nil, err 7699 } 7700 req.Header = reqHeaders 7701 googleapi.Expand(req.URL, map[string]string{ 7702 "project": c.project, 7703 "typeProvider": c.typeProvider, 7704 "type": c.type_, 7705 }) 7706 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7707} 7708 7709// Do executes the "deploymentmanager.typeProviders.getType" call. 7710// Exactly one of *TypeInfo or error will be non-nil. Any non-2xx status 7711// code is an error. Response headers are in either 7712// *TypeInfo.ServerResponse.Header or (if a response was returned at 7713// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7714// to check whether the returned error was because 7715// http.StatusNotModified was returned. 7716func (c *TypeProvidersGetTypeCall) Do(opts ...googleapi.CallOption) (*TypeInfo, error) { 7717 gensupport.SetOptions(c.urlParams_, opts...) 7718 res, err := c.doRequest("json") 7719 if res != nil && res.StatusCode == http.StatusNotModified { 7720 if res.Body != nil { 7721 res.Body.Close() 7722 } 7723 return nil, &googleapi.Error{ 7724 Code: res.StatusCode, 7725 Header: res.Header, 7726 } 7727 } 7728 if err != nil { 7729 return nil, err 7730 } 7731 defer googleapi.CloseBody(res) 7732 if err := googleapi.CheckResponse(res); err != nil { 7733 return nil, err 7734 } 7735 ret := &TypeInfo{ 7736 ServerResponse: googleapi.ServerResponse{ 7737 Header: res.Header, 7738 HTTPStatusCode: res.StatusCode, 7739 }, 7740 } 7741 target := &ret 7742 if err := gensupport.DecodeResponse(target, res); err != nil { 7743 return nil, err 7744 } 7745 return ret, nil 7746 // { 7747 // "description": "Gets a type info for a type provided by a TypeProvider.", 7748 // "httpMethod": "GET", 7749 // "id": "deploymentmanager.typeProviders.getType", 7750 // "parameterOrder": [ 7751 // "project", 7752 // "typeProvider", 7753 // "type" 7754 // ], 7755 // "parameters": { 7756 // "project": { 7757 // "description": "The project ID for this request.", 7758 // "location": "path", 7759 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 7760 // "required": true, 7761 // "type": "string" 7762 // }, 7763 // "type": { 7764 // "description": "The name of the type provider type for this request.", 7765 // "location": "path", 7766 // "required": true, 7767 // "type": "string" 7768 // }, 7769 // "typeProvider": { 7770 // "description": "The name of the type provider for this request.", 7771 // "location": "path", 7772 // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", 7773 // "required": true, 7774 // "type": "string" 7775 // } 7776 // }, 7777 // "path": "{project}/global/typeProviders/{typeProvider}/types/{type}", 7778 // "response": { 7779 // "$ref": "TypeInfo" 7780 // }, 7781 // "scopes": [ 7782 // "https://www.googleapis.com/auth/cloud-platform", 7783 // "https://www.googleapis.com/auth/cloud-platform.read-only", 7784 // "https://www.googleapis.com/auth/ndev.cloudman", 7785 // "https://www.googleapis.com/auth/ndev.cloudman.readonly" 7786 // ] 7787 // } 7788 7789} 7790 7791// method id "deploymentmanager.typeProviders.insert": 7792 7793type TypeProvidersInsertCall struct { 7794 s *Service 7795 project string 7796 typeprovider *TypeProvider 7797 urlParams_ gensupport.URLParams 7798 ctx_ context.Context 7799 header_ http.Header 7800} 7801 7802// Insert: Creates a type provider. 7803func (r *TypeProvidersService) Insert(project string, typeprovider *TypeProvider) *TypeProvidersInsertCall { 7804 c := &TypeProvidersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7805 c.project = project 7806 c.typeprovider = typeprovider 7807 return c 7808} 7809 7810// Fields allows partial responses to be retrieved. See 7811// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7812// for more information. 7813func (c *TypeProvidersInsertCall) Fields(s ...googleapi.Field) *TypeProvidersInsertCall { 7814 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7815 return c 7816} 7817 7818// Context sets the context to be used in this call's Do method. Any 7819// pending HTTP request will be aborted if the provided context is 7820// canceled. 7821func (c *TypeProvidersInsertCall) Context(ctx context.Context) *TypeProvidersInsertCall { 7822 c.ctx_ = ctx 7823 return c 7824} 7825 7826// Header returns an http.Header that can be modified by the caller to 7827// add HTTP headers to the request. 7828func (c *TypeProvidersInsertCall) Header() http.Header { 7829 if c.header_ == nil { 7830 c.header_ = make(http.Header) 7831 } 7832 return c.header_ 7833} 7834 7835func (c *TypeProvidersInsertCall) doRequest(alt string) (*http.Response, error) { 7836 reqHeaders := make(http.Header) 7837 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7838 for k, v := range c.header_ { 7839 reqHeaders[k] = v 7840 } 7841 reqHeaders.Set("User-Agent", c.s.userAgent()) 7842 var body io.Reader = nil 7843 body, err := googleapi.WithoutDataWrapper.JSONReader(c.typeprovider) 7844 if err != nil { 7845 return nil, err 7846 } 7847 reqHeaders.Set("Content-Type", "application/json") 7848 c.urlParams_.Set("alt", alt) 7849 c.urlParams_.Set("prettyPrint", "false") 7850 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders") 7851 urls += "?" + c.urlParams_.Encode() 7852 req, err := http.NewRequest("POST", urls, body) 7853 if err != nil { 7854 return nil, err 7855 } 7856 req.Header = reqHeaders 7857 googleapi.Expand(req.URL, map[string]string{ 7858 "project": c.project, 7859 }) 7860 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7861} 7862 7863// Do executes the "deploymentmanager.typeProviders.insert" call. 7864// Exactly one of *Operation or error will be non-nil. Any non-2xx 7865// status code is an error. Response headers are in either 7866// *Operation.ServerResponse.Header or (if a response was returned at 7867// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7868// to check whether the returned error was because 7869// http.StatusNotModified was returned. 7870func (c *TypeProvidersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7871 gensupport.SetOptions(c.urlParams_, opts...) 7872 res, err := c.doRequest("json") 7873 if res != nil && res.StatusCode == http.StatusNotModified { 7874 if res.Body != nil { 7875 res.Body.Close() 7876 } 7877 return nil, &googleapi.Error{ 7878 Code: res.StatusCode, 7879 Header: res.Header, 7880 } 7881 } 7882 if err != nil { 7883 return nil, err 7884 } 7885 defer googleapi.CloseBody(res) 7886 if err := googleapi.CheckResponse(res); err != nil { 7887 return nil, err 7888 } 7889 ret := &Operation{ 7890 ServerResponse: googleapi.ServerResponse{ 7891 Header: res.Header, 7892 HTTPStatusCode: res.StatusCode, 7893 }, 7894 } 7895 target := &ret 7896 if err := gensupport.DecodeResponse(target, res); err != nil { 7897 return nil, err 7898 } 7899 return ret, nil 7900 // { 7901 // "description": "Creates a type provider.", 7902 // "httpMethod": "POST", 7903 // "id": "deploymentmanager.typeProviders.insert", 7904 // "parameterOrder": [ 7905 // "project" 7906 // ], 7907 // "parameters": { 7908 // "project": { 7909 // "description": "The project ID for this request.", 7910 // "location": "path", 7911 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 7912 // "required": true, 7913 // "type": "string" 7914 // } 7915 // }, 7916 // "path": "{project}/global/typeProviders", 7917 // "request": { 7918 // "$ref": "TypeProvider" 7919 // }, 7920 // "response": { 7921 // "$ref": "Operation" 7922 // }, 7923 // "scopes": [ 7924 // "https://www.googleapis.com/auth/cloud-platform", 7925 // "https://www.googleapis.com/auth/ndev.cloudman" 7926 // ] 7927 // } 7928 7929} 7930 7931// method id "deploymentmanager.typeProviders.list": 7932 7933type TypeProvidersListCall struct { 7934 s *Service 7935 project string 7936 urlParams_ gensupport.URLParams 7937 ifNoneMatch_ string 7938 ctx_ context.Context 7939 header_ http.Header 7940} 7941 7942// List: Lists all resource type providers for Deployment Manager. 7943func (r *TypeProvidersService) List(project string) *TypeProvidersListCall { 7944 c := &TypeProvidersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7945 c.project = project 7946 return c 7947} 7948 7949// Filter sets the optional parameter "filter": A filter expression that 7950// filters resources listed in the response. The expression must specify 7951// the field name, a comparison operator, and the value that you want to 7952// use for filtering. The value must be a string, a number, or a 7953// boolean. The comparison operator must be either =, !=, >, or <. 7954// 7955// For example, if you are filtering Compute Engine instances, you can 7956// exclude instances named example-instance by specifying name != 7957// example-instance. 7958// 7959// You can also filter nested fields. For example, you could specify 7960// scheduling.automaticRestart = false to include instances only if they 7961// are not scheduled for automatic restarts. You can use filtering on 7962// nested fields to filter based on resource labels. 7963// 7964// To filter on multiple expressions, provide each separate expression 7965// within parentheses. For example, (scheduling.automaticRestart = true) 7966// (cpuPlatform = "Intel Skylake"). By default, each expression is an 7967// AND expression. However, you can include AND and OR expressions 7968// explicitly. For example, (cpuPlatform = "Intel Skylake") OR 7969// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = 7970// true). 7971func (c *TypeProvidersListCall) Filter(filter string) *TypeProvidersListCall { 7972 c.urlParams_.Set("filter", filter) 7973 return c 7974} 7975 7976// MaxResults sets the optional parameter "maxResults": The maximum 7977// number of results per page that should be returned. If the number of 7978// available results is larger than maxResults, Compute Engine returns a 7979// nextPageToken that can be used to get the next page of results in 7980// subsequent list requests. Acceptable values are 0 to 500, inclusive. 7981// (Default: 500) 7982func (c *TypeProvidersListCall) MaxResults(maxResults int64) *TypeProvidersListCall { 7983 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 7984 return c 7985} 7986 7987// OrderBy sets the optional parameter "orderBy": Sorts list results by 7988// a certain order. By default, results are returned in alphanumerical 7989// order based on the resource name. 7990// 7991// You can also sort results in descending order based on the creation 7992// timestamp using orderBy="creationTimestamp desc". This sorts results 7993// based on the creationTimestamp field in reverse chronological order 7994// (newest result first). Use this to sort resources like operations so 7995// that the newest operation is returned first. 7996// 7997// Currently, only sorting by name or creationTimestamp desc is 7998// supported. 7999func (c *TypeProvidersListCall) OrderBy(orderBy string) *TypeProvidersListCall { 8000 c.urlParams_.Set("orderBy", orderBy) 8001 return c 8002} 8003 8004// PageToken sets the optional parameter "pageToken": Specifies a page 8005// token to use. Set pageToken to the nextPageToken returned by a 8006// previous list request to get the next page of results. 8007func (c *TypeProvidersListCall) PageToken(pageToken string) *TypeProvidersListCall { 8008 c.urlParams_.Set("pageToken", pageToken) 8009 return c 8010} 8011 8012// Fields allows partial responses to be retrieved. See 8013// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8014// for more information. 8015func (c *TypeProvidersListCall) Fields(s ...googleapi.Field) *TypeProvidersListCall { 8016 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8017 return c 8018} 8019 8020// IfNoneMatch sets the optional parameter which makes the operation 8021// fail if the object's ETag matches the given value. This is useful for 8022// getting updates only after the object has changed since the last 8023// request. Use googleapi.IsNotModified to check whether the response 8024// error from Do is the result of In-None-Match. 8025func (c *TypeProvidersListCall) IfNoneMatch(entityTag string) *TypeProvidersListCall { 8026 c.ifNoneMatch_ = entityTag 8027 return c 8028} 8029 8030// Context sets the context to be used in this call's Do method. Any 8031// pending HTTP request will be aborted if the provided context is 8032// canceled. 8033func (c *TypeProvidersListCall) Context(ctx context.Context) *TypeProvidersListCall { 8034 c.ctx_ = ctx 8035 return c 8036} 8037 8038// Header returns an http.Header that can be modified by the caller to 8039// add HTTP headers to the request. 8040func (c *TypeProvidersListCall) Header() http.Header { 8041 if c.header_ == nil { 8042 c.header_ = make(http.Header) 8043 } 8044 return c.header_ 8045} 8046 8047func (c *TypeProvidersListCall) doRequest(alt string) (*http.Response, error) { 8048 reqHeaders := make(http.Header) 8049 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8050 for k, v := range c.header_ { 8051 reqHeaders[k] = v 8052 } 8053 reqHeaders.Set("User-Agent", c.s.userAgent()) 8054 if c.ifNoneMatch_ != "" { 8055 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8056 } 8057 var body io.Reader = nil 8058 c.urlParams_.Set("alt", alt) 8059 c.urlParams_.Set("prettyPrint", "false") 8060 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders") 8061 urls += "?" + c.urlParams_.Encode() 8062 req, err := http.NewRequest("GET", urls, body) 8063 if err != nil { 8064 return nil, err 8065 } 8066 req.Header = reqHeaders 8067 googleapi.Expand(req.URL, map[string]string{ 8068 "project": c.project, 8069 }) 8070 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8071} 8072 8073// Do executes the "deploymentmanager.typeProviders.list" call. 8074// Exactly one of *TypeProvidersListResponse or error will be non-nil. 8075// Any non-2xx status code is an error. Response headers are in either 8076// *TypeProvidersListResponse.ServerResponse.Header or (if a response 8077// was returned at all) in error.(*googleapi.Error).Header. Use 8078// googleapi.IsNotModified to check whether the returned error was 8079// because http.StatusNotModified was returned. 8080func (c *TypeProvidersListCall) Do(opts ...googleapi.CallOption) (*TypeProvidersListResponse, error) { 8081 gensupport.SetOptions(c.urlParams_, opts...) 8082 res, err := c.doRequest("json") 8083 if res != nil && res.StatusCode == http.StatusNotModified { 8084 if res.Body != nil { 8085 res.Body.Close() 8086 } 8087 return nil, &googleapi.Error{ 8088 Code: res.StatusCode, 8089 Header: res.Header, 8090 } 8091 } 8092 if err != nil { 8093 return nil, err 8094 } 8095 defer googleapi.CloseBody(res) 8096 if err := googleapi.CheckResponse(res); err != nil { 8097 return nil, err 8098 } 8099 ret := &TypeProvidersListResponse{ 8100 ServerResponse: googleapi.ServerResponse{ 8101 Header: res.Header, 8102 HTTPStatusCode: res.StatusCode, 8103 }, 8104 } 8105 target := &ret 8106 if err := gensupport.DecodeResponse(target, res); err != nil { 8107 return nil, err 8108 } 8109 return ret, nil 8110 // { 8111 // "description": "Lists all resource type providers for Deployment Manager.", 8112 // "httpMethod": "GET", 8113 // "id": "deploymentmanager.typeProviders.list", 8114 // "parameterOrder": [ 8115 // "project" 8116 // ], 8117 // "parameters": { 8118 // "filter": { 8119 // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", 8120 // "location": "query", 8121 // "type": "string" 8122 // }, 8123 // "maxResults": { 8124 // "default": "500", 8125 // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", 8126 // "format": "uint32", 8127 // "location": "query", 8128 // "minimum": "0", 8129 // "type": "integer" 8130 // }, 8131 // "orderBy": { 8132 // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", 8133 // "location": "query", 8134 // "type": "string" 8135 // }, 8136 // "pageToken": { 8137 // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", 8138 // "location": "query", 8139 // "type": "string" 8140 // }, 8141 // "project": { 8142 // "description": "The project ID for this request.", 8143 // "location": "path", 8144 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 8145 // "required": true, 8146 // "type": "string" 8147 // } 8148 // }, 8149 // "path": "{project}/global/typeProviders", 8150 // "response": { 8151 // "$ref": "TypeProvidersListResponse" 8152 // }, 8153 // "scopes": [ 8154 // "https://www.googleapis.com/auth/cloud-platform", 8155 // "https://www.googleapis.com/auth/cloud-platform.read-only", 8156 // "https://www.googleapis.com/auth/ndev.cloudman", 8157 // "https://www.googleapis.com/auth/ndev.cloudman.readonly" 8158 // ] 8159 // } 8160 8161} 8162 8163// Pages invokes f for each page of results. 8164// A non-nil error returned from f will halt the iteration. 8165// The provided context supersedes any context provided to the Context method. 8166func (c *TypeProvidersListCall) Pages(ctx context.Context, f func(*TypeProvidersListResponse) error) error { 8167 c.ctx_ = ctx 8168 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8169 for { 8170 x, err := c.Do() 8171 if err != nil { 8172 return err 8173 } 8174 if err := f(x); err != nil { 8175 return err 8176 } 8177 if x.NextPageToken == "" { 8178 return nil 8179 } 8180 c.PageToken(x.NextPageToken) 8181 } 8182} 8183 8184// method id "deploymentmanager.typeProviders.listTypes": 8185 8186type TypeProvidersListTypesCall struct { 8187 s *Service 8188 project string 8189 typeProvider string 8190 urlParams_ gensupport.URLParams 8191 ifNoneMatch_ string 8192 ctx_ context.Context 8193 header_ http.Header 8194} 8195 8196// ListTypes: Lists all the type info for a TypeProvider. 8197func (r *TypeProvidersService) ListTypes(project string, typeProvider string) *TypeProvidersListTypesCall { 8198 c := &TypeProvidersListTypesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8199 c.project = project 8200 c.typeProvider = typeProvider 8201 return c 8202} 8203 8204// Filter sets the optional parameter "filter": A filter expression that 8205// filters resources listed in the response. The expression must specify 8206// the field name, a comparison operator, and the value that you want to 8207// use for filtering. The value must be a string, a number, or a 8208// boolean. The comparison operator must be either =, !=, >, or <. 8209// 8210// For example, if you are filtering Compute Engine instances, you can 8211// exclude instances named example-instance by specifying name != 8212// example-instance. 8213// 8214// You can also filter nested fields. For example, you could specify 8215// scheduling.automaticRestart = false to include instances only if they 8216// are not scheduled for automatic restarts. You can use filtering on 8217// nested fields to filter based on resource labels. 8218// 8219// To filter on multiple expressions, provide each separate expression 8220// within parentheses. For example, (scheduling.automaticRestart = true) 8221// (cpuPlatform = "Intel Skylake"). By default, each expression is an 8222// AND expression. However, you can include AND and OR expressions 8223// explicitly. For example, (cpuPlatform = "Intel Skylake") OR 8224// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = 8225// true). 8226func (c *TypeProvidersListTypesCall) Filter(filter string) *TypeProvidersListTypesCall { 8227 c.urlParams_.Set("filter", filter) 8228 return c 8229} 8230 8231// MaxResults sets the optional parameter "maxResults": The maximum 8232// number of results per page that should be returned. If the number of 8233// available results is larger than maxResults, Compute Engine returns a 8234// nextPageToken that can be used to get the next page of results in 8235// subsequent list requests. Acceptable values are 0 to 500, inclusive. 8236// (Default: 500) 8237func (c *TypeProvidersListTypesCall) MaxResults(maxResults int64) *TypeProvidersListTypesCall { 8238 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 8239 return c 8240} 8241 8242// OrderBy sets the optional parameter "orderBy": Sorts list results by 8243// a certain order. By default, results are returned in alphanumerical 8244// order based on the resource name. 8245// 8246// You can also sort results in descending order based on the creation 8247// timestamp using orderBy="creationTimestamp desc". This sorts results 8248// based on the creationTimestamp field in reverse chronological order 8249// (newest result first). Use this to sort resources like operations so 8250// that the newest operation is returned first. 8251// 8252// Currently, only sorting by name or creationTimestamp desc is 8253// supported. 8254func (c *TypeProvidersListTypesCall) OrderBy(orderBy string) *TypeProvidersListTypesCall { 8255 c.urlParams_.Set("orderBy", orderBy) 8256 return c 8257} 8258 8259// PageToken sets the optional parameter "pageToken": Specifies a page 8260// token to use. Set pageToken to the nextPageToken returned by a 8261// previous list request to get the next page of results. 8262func (c *TypeProvidersListTypesCall) PageToken(pageToken string) *TypeProvidersListTypesCall { 8263 c.urlParams_.Set("pageToken", pageToken) 8264 return c 8265} 8266 8267// Fields allows partial responses to be retrieved. See 8268// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8269// for more information. 8270func (c *TypeProvidersListTypesCall) Fields(s ...googleapi.Field) *TypeProvidersListTypesCall { 8271 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8272 return c 8273} 8274 8275// IfNoneMatch sets the optional parameter which makes the operation 8276// fail if the object's ETag matches the given value. This is useful for 8277// getting updates only after the object has changed since the last 8278// request. Use googleapi.IsNotModified to check whether the response 8279// error from Do is the result of In-None-Match. 8280func (c *TypeProvidersListTypesCall) IfNoneMatch(entityTag string) *TypeProvidersListTypesCall { 8281 c.ifNoneMatch_ = entityTag 8282 return c 8283} 8284 8285// Context sets the context to be used in this call's Do method. Any 8286// pending HTTP request will be aborted if the provided context is 8287// canceled. 8288func (c *TypeProvidersListTypesCall) Context(ctx context.Context) *TypeProvidersListTypesCall { 8289 c.ctx_ = ctx 8290 return c 8291} 8292 8293// Header returns an http.Header that can be modified by the caller to 8294// add HTTP headers to the request. 8295func (c *TypeProvidersListTypesCall) Header() http.Header { 8296 if c.header_ == nil { 8297 c.header_ = make(http.Header) 8298 } 8299 return c.header_ 8300} 8301 8302func (c *TypeProvidersListTypesCall) doRequest(alt string) (*http.Response, error) { 8303 reqHeaders := make(http.Header) 8304 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8305 for k, v := range c.header_ { 8306 reqHeaders[k] = v 8307 } 8308 reqHeaders.Set("User-Agent", c.s.userAgent()) 8309 if c.ifNoneMatch_ != "" { 8310 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8311 } 8312 var body io.Reader = nil 8313 c.urlParams_.Set("alt", alt) 8314 c.urlParams_.Set("prettyPrint", "false") 8315 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}/types") 8316 urls += "?" + c.urlParams_.Encode() 8317 req, err := http.NewRequest("GET", urls, body) 8318 if err != nil { 8319 return nil, err 8320 } 8321 req.Header = reqHeaders 8322 googleapi.Expand(req.URL, map[string]string{ 8323 "project": c.project, 8324 "typeProvider": c.typeProvider, 8325 }) 8326 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8327} 8328 8329// Do executes the "deploymentmanager.typeProviders.listTypes" call. 8330// Exactly one of *TypeProvidersListTypesResponse or error will be 8331// non-nil. Any non-2xx status code is an error. Response headers are in 8332// either *TypeProvidersListTypesResponse.ServerResponse.Header or (if a 8333// response was returned at all) in error.(*googleapi.Error).Header. Use 8334// googleapi.IsNotModified to check whether the returned error was 8335// because http.StatusNotModified was returned. 8336func (c *TypeProvidersListTypesCall) Do(opts ...googleapi.CallOption) (*TypeProvidersListTypesResponse, error) { 8337 gensupport.SetOptions(c.urlParams_, opts...) 8338 res, err := c.doRequest("json") 8339 if res != nil && res.StatusCode == http.StatusNotModified { 8340 if res.Body != nil { 8341 res.Body.Close() 8342 } 8343 return nil, &googleapi.Error{ 8344 Code: res.StatusCode, 8345 Header: res.Header, 8346 } 8347 } 8348 if err != nil { 8349 return nil, err 8350 } 8351 defer googleapi.CloseBody(res) 8352 if err := googleapi.CheckResponse(res); err != nil { 8353 return nil, err 8354 } 8355 ret := &TypeProvidersListTypesResponse{ 8356 ServerResponse: googleapi.ServerResponse{ 8357 Header: res.Header, 8358 HTTPStatusCode: res.StatusCode, 8359 }, 8360 } 8361 target := &ret 8362 if err := gensupport.DecodeResponse(target, res); err != nil { 8363 return nil, err 8364 } 8365 return ret, nil 8366 // { 8367 // "description": "Lists all the type info for a TypeProvider.", 8368 // "httpMethod": "GET", 8369 // "id": "deploymentmanager.typeProviders.listTypes", 8370 // "parameterOrder": [ 8371 // "project", 8372 // "typeProvider" 8373 // ], 8374 // "parameters": { 8375 // "filter": { 8376 // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", 8377 // "location": "query", 8378 // "type": "string" 8379 // }, 8380 // "maxResults": { 8381 // "default": "500", 8382 // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", 8383 // "format": "uint32", 8384 // "location": "query", 8385 // "minimum": "0", 8386 // "type": "integer" 8387 // }, 8388 // "orderBy": { 8389 // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", 8390 // "location": "query", 8391 // "type": "string" 8392 // }, 8393 // "pageToken": { 8394 // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", 8395 // "location": "query", 8396 // "type": "string" 8397 // }, 8398 // "project": { 8399 // "description": "The project ID for this request.", 8400 // "location": "path", 8401 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 8402 // "required": true, 8403 // "type": "string" 8404 // }, 8405 // "typeProvider": { 8406 // "description": "The name of the type provider for this request.", 8407 // "location": "path", 8408 // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", 8409 // "required": true, 8410 // "type": "string" 8411 // } 8412 // }, 8413 // "path": "{project}/global/typeProviders/{typeProvider}/types", 8414 // "response": { 8415 // "$ref": "TypeProvidersListTypesResponse" 8416 // }, 8417 // "scopes": [ 8418 // "https://www.googleapis.com/auth/cloud-platform", 8419 // "https://www.googleapis.com/auth/cloud-platform.read-only", 8420 // "https://www.googleapis.com/auth/ndev.cloudman", 8421 // "https://www.googleapis.com/auth/ndev.cloudman.readonly" 8422 // ] 8423 // } 8424 8425} 8426 8427// Pages invokes f for each page of results. 8428// A non-nil error returned from f will halt the iteration. 8429// The provided context supersedes any context provided to the Context method. 8430func (c *TypeProvidersListTypesCall) Pages(ctx context.Context, f func(*TypeProvidersListTypesResponse) error) error { 8431 c.ctx_ = ctx 8432 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8433 for { 8434 x, err := c.Do() 8435 if err != nil { 8436 return err 8437 } 8438 if err := f(x); err != nil { 8439 return err 8440 } 8441 if x.NextPageToken == "" { 8442 return nil 8443 } 8444 c.PageToken(x.NextPageToken) 8445 } 8446} 8447 8448// method id "deploymentmanager.typeProviders.patch": 8449 8450type TypeProvidersPatchCall struct { 8451 s *Service 8452 project string 8453 typeProvider string 8454 typeprovider *TypeProvider 8455 urlParams_ gensupport.URLParams 8456 ctx_ context.Context 8457 header_ http.Header 8458} 8459 8460// Patch: Updates a type provider. This method supports patch semantics. 8461func (r *TypeProvidersService) Patch(project string, typeProvider string, typeprovider *TypeProvider) *TypeProvidersPatchCall { 8462 c := &TypeProvidersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8463 c.project = project 8464 c.typeProvider = typeProvider 8465 c.typeprovider = typeprovider 8466 return c 8467} 8468 8469// Fields allows partial responses to be retrieved. See 8470// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8471// for more information. 8472func (c *TypeProvidersPatchCall) Fields(s ...googleapi.Field) *TypeProvidersPatchCall { 8473 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8474 return c 8475} 8476 8477// Context sets the context to be used in this call's Do method. Any 8478// pending HTTP request will be aborted if the provided context is 8479// canceled. 8480func (c *TypeProvidersPatchCall) Context(ctx context.Context) *TypeProvidersPatchCall { 8481 c.ctx_ = ctx 8482 return c 8483} 8484 8485// Header returns an http.Header that can be modified by the caller to 8486// add HTTP headers to the request. 8487func (c *TypeProvidersPatchCall) Header() http.Header { 8488 if c.header_ == nil { 8489 c.header_ = make(http.Header) 8490 } 8491 return c.header_ 8492} 8493 8494func (c *TypeProvidersPatchCall) doRequest(alt string) (*http.Response, error) { 8495 reqHeaders := make(http.Header) 8496 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8497 for k, v := range c.header_ { 8498 reqHeaders[k] = v 8499 } 8500 reqHeaders.Set("User-Agent", c.s.userAgent()) 8501 var body io.Reader = nil 8502 body, err := googleapi.WithoutDataWrapper.JSONReader(c.typeprovider) 8503 if err != nil { 8504 return nil, err 8505 } 8506 reqHeaders.Set("Content-Type", "application/json") 8507 c.urlParams_.Set("alt", alt) 8508 c.urlParams_.Set("prettyPrint", "false") 8509 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}") 8510 urls += "?" + c.urlParams_.Encode() 8511 req, err := http.NewRequest("PATCH", urls, body) 8512 if err != nil { 8513 return nil, err 8514 } 8515 req.Header = reqHeaders 8516 googleapi.Expand(req.URL, map[string]string{ 8517 "project": c.project, 8518 "typeProvider": c.typeProvider, 8519 }) 8520 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8521} 8522 8523// Do executes the "deploymentmanager.typeProviders.patch" call. 8524// Exactly one of *Operation or error will be non-nil. Any non-2xx 8525// status code is an error. Response headers are in either 8526// *Operation.ServerResponse.Header or (if a response was returned at 8527// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8528// to check whether the returned error was because 8529// http.StatusNotModified was returned. 8530func (c *TypeProvidersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8531 gensupport.SetOptions(c.urlParams_, opts...) 8532 res, err := c.doRequest("json") 8533 if res != nil && res.StatusCode == http.StatusNotModified { 8534 if res.Body != nil { 8535 res.Body.Close() 8536 } 8537 return nil, &googleapi.Error{ 8538 Code: res.StatusCode, 8539 Header: res.Header, 8540 } 8541 } 8542 if err != nil { 8543 return nil, err 8544 } 8545 defer googleapi.CloseBody(res) 8546 if err := googleapi.CheckResponse(res); err != nil { 8547 return nil, err 8548 } 8549 ret := &Operation{ 8550 ServerResponse: googleapi.ServerResponse{ 8551 Header: res.Header, 8552 HTTPStatusCode: res.StatusCode, 8553 }, 8554 } 8555 target := &ret 8556 if err := gensupport.DecodeResponse(target, res); err != nil { 8557 return nil, err 8558 } 8559 return ret, nil 8560 // { 8561 // "description": "Updates a type provider. This method supports patch semantics.", 8562 // "httpMethod": "PATCH", 8563 // "id": "deploymentmanager.typeProviders.patch", 8564 // "parameterOrder": [ 8565 // "project", 8566 // "typeProvider" 8567 // ], 8568 // "parameters": { 8569 // "project": { 8570 // "description": "The project ID for this request.", 8571 // "location": "path", 8572 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 8573 // "required": true, 8574 // "type": "string" 8575 // }, 8576 // "typeProvider": { 8577 // "description": "The name of the type provider for this request.", 8578 // "location": "path", 8579 // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", 8580 // "required": true, 8581 // "type": "string" 8582 // } 8583 // }, 8584 // "path": "{project}/global/typeProviders/{typeProvider}", 8585 // "request": { 8586 // "$ref": "TypeProvider" 8587 // }, 8588 // "response": { 8589 // "$ref": "Operation" 8590 // }, 8591 // "scopes": [ 8592 // "https://www.googleapis.com/auth/cloud-platform", 8593 // "https://www.googleapis.com/auth/ndev.cloudman" 8594 // ] 8595 // } 8596 8597} 8598 8599// method id "deploymentmanager.typeProviders.update": 8600 8601type TypeProvidersUpdateCall struct { 8602 s *Service 8603 project string 8604 typeProvider string 8605 typeprovider *TypeProvider 8606 urlParams_ gensupport.URLParams 8607 ctx_ context.Context 8608 header_ http.Header 8609} 8610 8611// Update: Updates a type provider. 8612func (r *TypeProvidersService) Update(project string, typeProvider string, typeprovider *TypeProvider) *TypeProvidersUpdateCall { 8613 c := &TypeProvidersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8614 c.project = project 8615 c.typeProvider = typeProvider 8616 c.typeprovider = typeprovider 8617 return c 8618} 8619 8620// Fields allows partial responses to be retrieved. See 8621// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8622// for more information. 8623func (c *TypeProvidersUpdateCall) Fields(s ...googleapi.Field) *TypeProvidersUpdateCall { 8624 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8625 return c 8626} 8627 8628// Context sets the context to be used in this call's Do method. Any 8629// pending HTTP request will be aborted if the provided context is 8630// canceled. 8631func (c *TypeProvidersUpdateCall) Context(ctx context.Context) *TypeProvidersUpdateCall { 8632 c.ctx_ = ctx 8633 return c 8634} 8635 8636// Header returns an http.Header that can be modified by the caller to 8637// add HTTP headers to the request. 8638func (c *TypeProvidersUpdateCall) Header() http.Header { 8639 if c.header_ == nil { 8640 c.header_ = make(http.Header) 8641 } 8642 return c.header_ 8643} 8644 8645func (c *TypeProvidersUpdateCall) doRequest(alt string) (*http.Response, error) { 8646 reqHeaders := make(http.Header) 8647 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8648 for k, v := range c.header_ { 8649 reqHeaders[k] = v 8650 } 8651 reqHeaders.Set("User-Agent", c.s.userAgent()) 8652 var body io.Reader = nil 8653 body, err := googleapi.WithoutDataWrapper.JSONReader(c.typeprovider) 8654 if err != nil { 8655 return nil, err 8656 } 8657 reqHeaders.Set("Content-Type", "application/json") 8658 c.urlParams_.Set("alt", alt) 8659 c.urlParams_.Set("prettyPrint", "false") 8660 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/typeProviders/{typeProvider}") 8661 urls += "?" + c.urlParams_.Encode() 8662 req, err := http.NewRequest("PUT", urls, body) 8663 if err != nil { 8664 return nil, err 8665 } 8666 req.Header = reqHeaders 8667 googleapi.Expand(req.URL, map[string]string{ 8668 "project": c.project, 8669 "typeProvider": c.typeProvider, 8670 }) 8671 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8672} 8673 8674// Do executes the "deploymentmanager.typeProviders.update" call. 8675// Exactly one of *Operation or error will be non-nil. Any non-2xx 8676// status code is an error. Response headers are in either 8677// *Operation.ServerResponse.Header or (if a response was returned at 8678// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8679// to check whether the returned error was because 8680// http.StatusNotModified was returned. 8681func (c *TypeProvidersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8682 gensupport.SetOptions(c.urlParams_, opts...) 8683 res, err := c.doRequest("json") 8684 if res != nil && res.StatusCode == http.StatusNotModified { 8685 if res.Body != nil { 8686 res.Body.Close() 8687 } 8688 return nil, &googleapi.Error{ 8689 Code: res.StatusCode, 8690 Header: res.Header, 8691 } 8692 } 8693 if err != nil { 8694 return nil, err 8695 } 8696 defer googleapi.CloseBody(res) 8697 if err := googleapi.CheckResponse(res); err != nil { 8698 return nil, err 8699 } 8700 ret := &Operation{ 8701 ServerResponse: googleapi.ServerResponse{ 8702 Header: res.Header, 8703 HTTPStatusCode: res.StatusCode, 8704 }, 8705 } 8706 target := &ret 8707 if err := gensupport.DecodeResponse(target, res); err != nil { 8708 return nil, err 8709 } 8710 return ret, nil 8711 // { 8712 // "description": "Updates a type provider.", 8713 // "httpMethod": "PUT", 8714 // "id": "deploymentmanager.typeProviders.update", 8715 // "parameterOrder": [ 8716 // "project", 8717 // "typeProvider" 8718 // ], 8719 // "parameters": { 8720 // "project": { 8721 // "description": "The project ID for this request.", 8722 // "location": "path", 8723 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 8724 // "required": true, 8725 // "type": "string" 8726 // }, 8727 // "typeProvider": { 8728 // "description": "The name of the type provider for this request.", 8729 // "location": "path", 8730 // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", 8731 // "required": true, 8732 // "type": "string" 8733 // } 8734 // }, 8735 // "path": "{project}/global/typeProviders/{typeProvider}", 8736 // "request": { 8737 // "$ref": "TypeProvider" 8738 // }, 8739 // "response": { 8740 // "$ref": "Operation" 8741 // }, 8742 // "scopes": [ 8743 // "https://www.googleapis.com/auth/cloud-platform", 8744 // "https://www.googleapis.com/auth/ndev.cloudman" 8745 // ] 8746 // } 8747 8748} 8749 8750// method id "deploymentmanager.types.list": 8751 8752type TypesListCall struct { 8753 s *Service 8754 project string 8755 urlParams_ gensupport.URLParams 8756 ifNoneMatch_ string 8757 ctx_ context.Context 8758 header_ http.Header 8759} 8760 8761// List: Lists all resource types for Deployment Manager. 8762func (r *TypesService) List(project string) *TypesListCall { 8763 c := &TypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8764 c.project = project 8765 return c 8766} 8767 8768// Filter sets the optional parameter "filter": A filter expression that 8769// filters resources listed in the response. The expression must specify 8770// the field name, a comparison operator, and the value that you want to 8771// use for filtering. The value must be a string, a number, or a 8772// boolean. The comparison operator must be either =, !=, >, or <. 8773// 8774// For example, if you are filtering Compute Engine instances, you can 8775// exclude instances named example-instance by specifying name != 8776// example-instance. 8777// 8778// You can also filter nested fields. For example, you could specify 8779// scheduling.automaticRestart = false to include instances only if they 8780// are not scheduled for automatic restarts. You can use filtering on 8781// nested fields to filter based on resource labels. 8782// 8783// To filter on multiple expressions, provide each separate expression 8784// within parentheses. For example, (scheduling.automaticRestart = true) 8785// (cpuPlatform = "Intel Skylake"). By default, each expression is an 8786// AND expression. However, you can include AND and OR expressions 8787// explicitly. For example, (cpuPlatform = "Intel Skylake") OR 8788// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = 8789// true). 8790func (c *TypesListCall) Filter(filter string) *TypesListCall { 8791 c.urlParams_.Set("filter", filter) 8792 return c 8793} 8794 8795// MaxResults sets the optional parameter "maxResults": The maximum 8796// number of results per page that should be returned. If the number of 8797// available results is larger than maxResults, Compute Engine returns a 8798// nextPageToken that can be used to get the next page of results in 8799// subsequent list requests. Acceptable values are 0 to 500, inclusive. 8800// (Default: 500) 8801func (c *TypesListCall) MaxResults(maxResults int64) *TypesListCall { 8802 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 8803 return c 8804} 8805 8806// OrderBy sets the optional parameter "orderBy": Sorts list results by 8807// a certain order. By default, results are returned in alphanumerical 8808// order based on the resource name. 8809// 8810// You can also sort results in descending order based on the creation 8811// timestamp using orderBy="creationTimestamp desc". This sorts results 8812// based on the creationTimestamp field in reverse chronological order 8813// (newest result first). Use this to sort resources like operations so 8814// that the newest operation is returned first. 8815// 8816// Currently, only sorting by name or creationTimestamp desc is 8817// supported. 8818func (c *TypesListCall) OrderBy(orderBy string) *TypesListCall { 8819 c.urlParams_.Set("orderBy", orderBy) 8820 return c 8821} 8822 8823// PageToken sets the optional parameter "pageToken": Specifies a page 8824// token to use. Set pageToken to the nextPageToken returned by a 8825// previous list request to get the next page of results. 8826func (c *TypesListCall) PageToken(pageToken string) *TypesListCall { 8827 c.urlParams_.Set("pageToken", pageToken) 8828 return c 8829} 8830 8831// Fields allows partial responses to be retrieved. See 8832// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8833// for more information. 8834func (c *TypesListCall) Fields(s ...googleapi.Field) *TypesListCall { 8835 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8836 return c 8837} 8838 8839// IfNoneMatch sets the optional parameter which makes the operation 8840// fail if the object's ETag matches the given value. This is useful for 8841// getting updates only after the object has changed since the last 8842// request. Use googleapi.IsNotModified to check whether the response 8843// error from Do is the result of In-None-Match. 8844func (c *TypesListCall) IfNoneMatch(entityTag string) *TypesListCall { 8845 c.ifNoneMatch_ = entityTag 8846 return c 8847} 8848 8849// Context sets the context to be used in this call's Do method. Any 8850// pending HTTP request will be aborted if the provided context is 8851// canceled. 8852func (c *TypesListCall) Context(ctx context.Context) *TypesListCall { 8853 c.ctx_ = ctx 8854 return c 8855} 8856 8857// Header returns an http.Header that can be modified by the caller to 8858// add HTTP headers to the request. 8859func (c *TypesListCall) Header() http.Header { 8860 if c.header_ == nil { 8861 c.header_ = make(http.Header) 8862 } 8863 return c.header_ 8864} 8865 8866func (c *TypesListCall) doRequest(alt string) (*http.Response, error) { 8867 reqHeaders := make(http.Header) 8868 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8869 for k, v := range c.header_ { 8870 reqHeaders[k] = v 8871 } 8872 reqHeaders.Set("User-Agent", c.s.userAgent()) 8873 if c.ifNoneMatch_ != "" { 8874 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8875 } 8876 var body io.Reader = nil 8877 c.urlParams_.Set("alt", alt) 8878 c.urlParams_.Set("prettyPrint", "false") 8879 urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/types") 8880 urls += "?" + c.urlParams_.Encode() 8881 req, err := http.NewRequest("GET", urls, body) 8882 if err != nil { 8883 return nil, err 8884 } 8885 req.Header = reqHeaders 8886 googleapi.Expand(req.URL, map[string]string{ 8887 "project": c.project, 8888 }) 8889 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8890} 8891 8892// Do executes the "deploymentmanager.types.list" call. 8893// Exactly one of *TypesListResponse or error will be non-nil. Any 8894// non-2xx status code is an error. Response headers are in either 8895// *TypesListResponse.ServerResponse.Header or (if a response was 8896// returned at all) in error.(*googleapi.Error).Header. Use 8897// googleapi.IsNotModified to check whether the returned error was 8898// because http.StatusNotModified was returned. 8899func (c *TypesListCall) Do(opts ...googleapi.CallOption) (*TypesListResponse, error) { 8900 gensupport.SetOptions(c.urlParams_, opts...) 8901 res, err := c.doRequest("json") 8902 if res != nil && res.StatusCode == http.StatusNotModified { 8903 if res.Body != nil { 8904 res.Body.Close() 8905 } 8906 return nil, &googleapi.Error{ 8907 Code: res.StatusCode, 8908 Header: res.Header, 8909 } 8910 } 8911 if err != nil { 8912 return nil, err 8913 } 8914 defer googleapi.CloseBody(res) 8915 if err := googleapi.CheckResponse(res); err != nil { 8916 return nil, err 8917 } 8918 ret := &TypesListResponse{ 8919 ServerResponse: googleapi.ServerResponse{ 8920 Header: res.Header, 8921 HTTPStatusCode: res.StatusCode, 8922 }, 8923 } 8924 target := &ret 8925 if err := gensupport.DecodeResponse(target, res); err != nil { 8926 return nil, err 8927 } 8928 return ret, nil 8929 // { 8930 // "description": "Lists all resource types for Deployment Manager.", 8931 // "httpMethod": "GET", 8932 // "id": "deploymentmanager.types.list", 8933 // "parameterOrder": [ 8934 // "project" 8935 // ], 8936 // "parameters": { 8937 // "filter": { 8938 // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", 8939 // "location": "query", 8940 // "type": "string" 8941 // }, 8942 // "maxResults": { 8943 // "default": "500", 8944 // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", 8945 // "format": "uint32", 8946 // "location": "query", 8947 // "minimum": "0", 8948 // "type": "integer" 8949 // }, 8950 // "orderBy": { 8951 // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", 8952 // "location": "query", 8953 // "type": "string" 8954 // }, 8955 // "pageToken": { 8956 // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", 8957 // "location": "query", 8958 // "type": "string" 8959 // }, 8960 // "project": { 8961 // "description": "The project ID for this request.", 8962 // "location": "path", 8963 // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", 8964 // "required": true, 8965 // "type": "string" 8966 // } 8967 // }, 8968 // "path": "{project}/global/types", 8969 // "response": { 8970 // "$ref": "TypesListResponse" 8971 // }, 8972 // "scopes": [ 8973 // "https://www.googleapis.com/auth/cloud-platform", 8974 // "https://www.googleapis.com/auth/cloud-platform.read-only", 8975 // "https://www.googleapis.com/auth/ndev.cloudman", 8976 // "https://www.googleapis.com/auth/ndev.cloudman.readonly" 8977 // ] 8978 // } 8979 8980} 8981 8982// Pages invokes f for each page of results. 8983// A non-nil error returned from f will halt the iteration. 8984// The provided context supersedes any context provided to the Context method. 8985func (c *TypesListCall) Pages(ctx context.Context, f func(*TypesListResponse) error) error { 8986 c.ctx_ = ctx 8987 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8988 for { 8989 x, err := c.Do() 8990 if err != nil { 8991 return err 8992 } 8993 if err := f(x); err != nil { 8994 return err 8995 } 8996 if x.NextPageToken == "" { 8997 return nil 8998 } 8999 c.PageToken(x.NextPageToken) 9000 } 9001} 9002