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