1 // Copyright 2024 Google LLC. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Code generated file. DO NOT EDIT. 6 7 // Package deploymentmanager provides access to the Cloud Deployment Manager V2 API. 8 // 9 // For product documentation, see: https://cloud.google.com/deployment-manager 10 // 11 // # Library status 12 // 13 // These client libraries are officially supported by Google. However, this 14 // library is considered complete and is in maintenance mode. This means 15 // that we will address critical bugs and security issues but will not add 16 // any new features. 17 // 18 // When possible, we recommend using our newer 19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) 20 // that are still actively being worked and iterated on. 21 // 22 // # Creating a client 23 // 24 // Usage example: 25 // 26 // import "google.golang.org/api/deploymentmanager/v0.alpha" 27 // ... 28 // ctx := context.Background() 29 // deploymentmanagerService, err := deploymentmanager.NewService(ctx) 30 // 31 // In this example, Google Application Default Credentials are used for 32 // authentication. For information on how to create and obtain Application 33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 34 // 35 // # Other authentication options 36 // 37 // By default, all available scopes (see "Constants") are used to authenticate. 38 // To restrict scopes, use [google.golang.org/api/option.WithScopes]: 39 // 40 // deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithScopes(deploymentmanager.NdevCloudmanReadonlyScope)) 41 // 42 // To use an API key for authentication (note: some APIs do not support API 43 // keys), use [google.golang.org/api/option.WithAPIKey]: 44 // 45 // deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithAPIKey("AIza...")) 46 // 47 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth 48 // flow, use [google.golang.org/api/option.WithTokenSource]: 49 // 50 // config := &oauth2.Config{...} 51 // // ... 52 // token, err := config.Exchange(ctx, ...) 53 // deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 54 // 55 // See [google.golang.org/api/option.ClientOption] for details on options. 56 package deploymentmanager // import "google.golang.org/api/deploymentmanager/v0.alpha" 57 58 import ( 59 "bytes" 60 "context" 61 "encoding/json" 62 "errors" 63 "fmt" 64 "io" 65 "net/http" 66 "net/url" 67 "strconv" 68 "strings" 69 70 googleapi "google.golang.org/api/googleapi" 71 internal "google.golang.org/api/internal" 72 gensupport "google.golang.org/api/internal/gensupport" 73 option "google.golang.org/api/option" 74 internaloption "google.golang.org/api/option/internaloption" 75 htransport "google.golang.org/api/transport/http" 76 ) 77 78 // Always reference these packages, just in case the auto-generated code 79 // below doesn't. 80 var _ = bytes.NewBuffer 81 var _ = strconv.Itoa 82 var _ = fmt.Sprintf 83 var _ = json.NewDecoder 84 var _ = io.Copy 85 var _ = url.Parse 86 var _ = gensupport.MarshalJSON 87 var _ = googleapi.Version 88 var _ = errors.New 89 var _ = strings.Replace 90 var _ = context.Canceled 91 var _ = internaloption.WithDefaultEndpoint 92 var _ = internal.Version 93 94 const apiId = "deploymentmanager:alpha" 95 const apiName = "deploymentmanager" 96 const apiVersion = "alpha" 97 const basePath = "https://deploymentmanager.googleapis.com/" 98 const basePathTemplate = "https://deploymentmanager.UNIVERSE_DOMAIN/" 99 const mtlsBasePath = "https://deploymentmanager.mtls.googleapis.com/" 100 101 // OAuth2 scopes used by this API. 102 const ( 103 // See, edit, configure, and delete your Google Cloud data and see the email 104 // address for your Google Account. 105 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 106 107 // View your data across Google Cloud services and see the email address of 108 // your Google Account 109 CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" 110 111 // View and manage your Google Cloud Platform management resources and 112 // deployment status information 113 NdevCloudmanScope = "https://www.googleapis.com/auth/ndev.cloudman" 114 115 // View your Google Cloud Platform management resources and deployment status 116 // information 117 NdevCloudmanReadonlyScope = "https://www.googleapis.com/auth/ndev.cloudman.readonly" 118 ) 119 120 // NewService creates a new Service. 121 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 122 scopesOption := internaloption.WithDefaultScopes( 123 "https://www.googleapis.com/auth/cloud-platform", 124 "https://www.googleapis.com/auth/cloud-platform.read-only", 125 "https://www.googleapis.com/auth/ndev.cloudman", 126 "https://www.googleapis.com/auth/ndev.cloudman.readonly", 127 ) 128 // NOTE: prepend, so we don't override user-specified scopes. 129 opts = append([]option.ClientOption{scopesOption}, opts...) 130 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 131 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) 132 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 133 opts = append(opts, internaloption.EnableNewAuthLibrary()) 134 client, endpoint, err := htransport.NewClient(ctx, opts...) 135 if err != nil { 136 return nil, err 137 } 138 s, err := New(client) 139 if err != nil { 140 return nil, err 141 } 142 if endpoint != "" { 143 s.BasePath = endpoint 144 } 145 return s, nil 146 } 147 148 // New creates a new Service. It uses the provided http.Client for requests. 149 // 150 // Deprecated: please use NewService instead. 151 // To provide a custom HTTP client, use option.WithHTTPClient. 152 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 153 func New(client *http.Client) (*Service, error) { 154 if client == nil { 155 return nil, errors.New("client is nil") 156 } 157 s := &Service{client: client, BasePath: basePath} 158 s.CompositeTypes = NewCompositeTypesService(s) 159 s.Deployments = NewDeploymentsService(s) 160 s.Manifests = NewManifestsService(s) 161 s.Operations = NewOperationsService(s) 162 s.Resources = NewResourcesService(s) 163 s.TypeProviders = NewTypeProvidersService(s) 164 s.Types = NewTypesService(s) 165 return s, nil 166 } 167 168 type Service struct { 169 client *http.Client 170 BasePath string // API endpoint base URL 171 UserAgent string // optional additional User-Agent fragment 172 173 CompositeTypes *CompositeTypesService 174 175 Deployments *DeploymentsService 176 177 Manifests *ManifestsService 178 179 Operations *OperationsService 180 181 Resources *ResourcesService 182 183 TypeProviders *TypeProvidersService 184 185 Types *TypesService 186 } 187 188 func (s *Service) userAgent() string { 189 if s.UserAgent == "" { 190 return googleapi.UserAgent 191 } 192 return googleapi.UserAgent + " " + s.UserAgent 193 } 194 195 func NewCompositeTypesService(s *Service) *CompositeTypesService { 196 rs := &CompositeTypesService{s: s} 197 return rs 198 } 199 200 type CompositeTypesService struct { 201 s *Service 202 } 203 204 func NewDeploymentsService(s *Service) *DeploymentsService { 205 rs := &DeploymentsService{s: s} 206 return rs 207 } 208 209 type DeploymentsService struct { 210 s *Service 211 } 212 213 func NewManifestsService(s *Service) *ManifestsService { 214 rs := &ManifestsService{s: s} 215 return rs 216 } 217 218 type ManifestsService struct { 219 s *Service 220 } 221 222 func NewOperationsService(s *Service) *OperationsService { 223 rs := &OperationsService{s: s} 224 return rs 225 } 226 227 type OperationsService struct { 228 s *Service 229 } 230 231 func NewResourcesService(s *Service) *ResourcesService { 232 rs := &ResourcesService{s: s} 233 return rs 234 } 235 236 type ResourcesService struct { 237 s *Service 238 } 239 240 func NewTypeProvidersService(s *Service) *TypeProvidersService { 241 rs := &TypeProvidersService{s: s} 242 return rs 243 } 244 245 type TypeProvidersService struct { 246 s *Service 247 } 248 249 func NewTypesService(s *Service) *TypesService { 250 rs := &TypesService{s: s} 251 return rs 252 } 253 254 type TypesService struct { 255 s *Service 256 } 257 258 // AsyncOptions: Async options that determine when a resource should finish. 259 type AsyncOptions struct { 260 // MethodMatch: Method regex where this policy will apply. 261 MethodMatch string `json:"methodMatch,omitempty"` 262 // PollingOptions: Deployment manager will poll instances for this API resource 263 // setting a RUNNING state, and blocking until polling conditions tell whether 264 // the resource is completed or failed. 265 PollingOptions *PollingOptions `json:"pollingOptions,omitempty"` 266 // ForceSendFields is a list of field names (e.g. "MethodMatch") to 267 // unconditionally include in API requests. By default, fields with empty or 268 // default values are omitted from API requests. See 269 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 270 // details. 271 ForceSendFields []string `json:"-"` 272 // NullFields is a list of field names (e.g. "MethodMatch") to include in API 273 // requests with the JSON null value. By default, fields with empty values are 274 // omitted from API requests. See 275 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 276 NullFields []string `json:"-"` 277 } 278 279 func (s *AsyncOptions) MarshalJSON() ([]byte, error) { 280 type NoMethod AsyncOptions 281 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 282 } 283 284 // AuditConfig: Specifies the audit configuration for a service. The 285 // configuration determines which permission types are logged, and what 286 // identities, if any, are exempted from logging. An AuditConfig must have one 287 // or more AuditLogConfigs. If there are AuditConfigs for both `allServices` 288 // and a specific service, the union of the two AuditConfigs is used for that 289 // service: the log_types specified in each AuditConfig are enabled, and the 290 // exempted_members in each AuditLogConfig are exempted. Example Policy with 291 // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", 292 // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ 293 // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": 294 // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", 295 // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": 296 // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For 297 // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ 298 // logging. It also exempts `jose@example.com` from DATA_READ logging, and 299 // `aliya@example.com` from DATA_WRITE logging. 300 type AuditConfig struct { 301 // AuditLogConfigs: The configuration for logging of each type of permission. 302 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` 303 // Service: Specifies a service that will be enabled for audit logging. For 304 // example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` 305 // is a special value that covers all services. 306 Service string `json:"service,omitempty"` 307 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to 308 // unconditionally include in API requests. By default, fields with empty or 309 // default values are omitted from API requests. See 310 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 311 // details. 312 ForceSendFields []string `json:"-"` 313 // NullFields is a list of field names (e.g. "AuditLogConfigs") to include in 314 // API requests with the JSON null value. By default, fields with empty values 315 // are omitted from API requests. See 316 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 317 NullFields []string `json:"-"` 318 } 319 320 func (s *AuditConfig) MarshalJSON() ([]byte, error) { 321 type NoMethod AuditConfig 322 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 323 } 324 325 // AuditLogConfig: Provides the configuration for logging a type of 326 // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", 327 // "exempted_members": [ "user:jose@example.com" ] }, { "log_type": 328 // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while 329 // exempting jose@example.com from DATA_READ logging. 330 type AuditLogConfig struct { 331 // ExemptedMembers: Specifies the identities that do not cause logging for this 332 // type of permission. Follows the same format of Binding.members. 333 ExemptedMembers []string `json:"exemptedMembers,omitempty"` 334 // LogType: The log type that this config enables. 335 // 336 // Possible values: 337 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. 338 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy 339 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create 340 // "DATA_READ" - Data reads. Example: CloudSQL Users list 341 LogType string `json:"logType,omitempty"` 342 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to 343 // unconditionally include in API requests. By default, fields with empty or 344 // default values are omitted from API requests. See 345 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 346 // details. 347 ForceSendFields []string `json:"-"` 348 // NullFields is a list of field names (e.g. "ExemptedMembers") to include in 349 // API requests with the JSON null value. By default, fields with empty values 350 // are omitted from API requests. See 351 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 352 NullFields []string `json:"-"` 353 } 354 355 func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { 356 type NoMethod AuditLogConfig 357 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 358 } 359 360 // BaseType: BaseType that describes a service-backed Type. 361 type BaseType struct { 362 // CollectionOverrides: Allows resource handling overrides for specific 363 // collections 364 CollectionOverrides []*CollectionOverride `json:"collectionOverrides,omitempty"` 365 // Credential: Credential used when interacting with this type. 366 Credential *Credential `json:"credential,omitempty"` 367 // DescriptorUrl: Descriptor Url for the this type. 368 DescriptorUrl string `json:"descriptorUrl,omitempty"` 369 // Options: Options to apply when handling any resources in this service. 370 Options *Options `json:"options,omitempty"` 371 // ForceSendFields is a list of field names (e.g. "CollectionOverrides") to 372 // unconditionally include in API requests. By default, fields with empty or 373 // default values are omitted from API requests. See 374 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 375 // details. 376 ForceSendFields []string `json:"-"` 377 // NullFields is a list of field names (e.g. "CollectionOverrides") to include 378 // in API requests with the JSON null value. By default, fields with empty 379 // values are omitted from API requests. See 380 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 381 NullFields []string `json:"-"` 382 } 383 384 func (s *BaseType) MarshalJSON() ([]byte, error) { 385 type NoMethod BaseType 386 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 387 } 388 389 // BasicAuth: Basic Auth used as a credential. 390 type BasicAuth struct { 391 Password string `json:"password,omitempty"` 392 User string `json:"user,omitempty"` 393 // ForceSendFields is a list of field names (e.g. "Password") to 394 // unconditionally include in API requests. By default, fields with empty or 395 // default values are omitted from API requests. See 396 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 397 // details. 398 ForceSendFields []string `json:"-"` 399 // NullFields is a list of field names (e.g. "Password") to include in API 400 // requests with the JSON null value. By default, fields with empty values are 401 // omitted from API requests. See 402 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 403 NullFields []string `json:"-"` 404 } 405 406 func (s *BasicAuth) MarshalJSON() ([]byte, error) { 407 type NoMethod BasicAuth 408 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 409 } 410 411 // Binding: Associates `members`, or principals, with a `role`. 412 type Binding struct { 413 // Condition: The condition that is associated with this binding. If the 414 // condition evaluates to `true`, then this binding applies to the current 415 // request. If the condition evaluates to `false`, then this binding does not 416 // apply to the current request. However, a different role binding might grant 417 // the same role to one or more of the principals in this binding. To learn 418 // which resources support conditions in their IAM policies, see the IAM 419 // documentation 420 // (https://cloud.google.com/iam/help/conditions/resource-policies). 421 Condition *Expr `json:"condition,omitempty"` 422 // Members: Specifies the principals requesting access for a Google Cloud 423 // resource. `members` can have the following values: * `allUsers`: A special 424 // identifier that represents anyone who is on the internet; with or without a 425 // Google account. * `allAuthenticatedUsers`: A special identifier that 426 // represents anyone who is authenticated with a Google account or a service 427 // account. Does not include identities that come from external identity 428 // providers (IdPs) through identity federation. * `user:{emailid}`: An email 429 // address that represents a specific Google account. For example, 430 // `alice@example.com` . * `serviceAccount:{emailid}`: An email address that 431 // represents a Google service account. For example, 432 // `my-other-app@appspot.gserviceaccount.com`. * 433 // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An 434 // identifier for a Kubernetes service account 435 // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). 436 // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * 437 // `group:{emailid}`: An email address that represents a Google group. For 438 // example, `admins@example.com`. * `domain:{domain}`: The G Suite domain 439 // (primary) that represents all the users of that domain. For example, 440 // `google.com` or `example.com`. * 441 // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub 442 // ject/{subject_attribute_value}`: A single identity in a workforce identity 443 // pool. * 444 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 445 // group/{group_id}`: All workforce identities in a group. * 446 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 447 // attribute.{attribute_name}/{attribute_value}`: All workforce identities with 448 // a specific attribute value. * 449 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 450 // *`: All identities in a workforce identity pool. * 451 // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo 452 // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single 453 // identity in a workload identity pool. * 454 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 455 // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool 456 // group. * 457 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 458 // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} 459 // `: All identities in a workload identity pool with a certain attribute. * 460 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 461 // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity 462 // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus 463 // unique identifier) representing a user that has been recently deleted. For 464 // example, `alice@example.com?uid=123456789012345678901`. If the user is 465 // recovered, this value reverts to `user:{emailid}` and the recovered user 466 // retains the role in the binding. * 467 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus 468 // unique identifier) representing a service account that has been recently 469 // deleted. For example, 470 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the 471 // service account is undeleted, this value reverts to 472 // `serviceAccount:{emailid}` and the undeleted service account retains the 473 // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email 474 // address (plus unique identifier) representing a Google group that has been 475 // recently deleted. For example, 476 // `admins@example.com?uid=123456789012345678901`. If the group is recovered, 477 // this value reverts to `group:{emailid}` and the recovered group retains the 478 // role in the binding. * 479 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool 480 // _id}/subject/{subject_attribute_value}`: Deleted single identity in a 481 // workforce identity pool. For example, 482 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po 483 // ol-id/subject/my-subject-attribute-value`. 484 Members []string `json:"members,omitempty"` 485 // Role: Role that is assigned to the list of `members`, or principals. For 486 // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview 487 // of the IAM roles and permissions, see the IAM documentation 488 // (https://cloud.google.com/iam/docs/roles-overview). For a list of the 489 // available pre-defined roles, see here 490 // (https://cloud.google.com/iam/docs/understanding-roles). 491 Role string `json:"role,omitempty"` 492 // ForceSendFields is a list of field names (e.g. "Condition") to 493 // unconditionally include in API requests. By default, fields with empty or 494 // default values are omitted from API requests. See 495 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 496 // details. 497 ForceSendFields []string `json:"-"` 498 // NullFields is a list of field names (e.g. "Condition") to include in API 499 // requests with the JSON null value. By default, fields with empty values are 500 // omitted from API requests. See 501 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 502 NullFields []string `json:"-"` 503 } 504 505 func (s *Binding) MarshalJSON() ([]byte, error) { 506 type NoMethod Binding 507 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 508 } 509 510 type BulkInsertOperationStatus struct { 511 // CreatedVmCount: [Output Only] Count of VMs successfully created so far. 512 CreatedVmCount int64 `json:"createdVmCount,omitempty"` 513 // DeletedVmCount: [Output Only] Count of VMs that got deleted during rollback. 514 DeletedVmCount int64 `json:"deletedVmCount,omitempty"` 515 // FailedToCreateVmCount: [Output Only] Count of VMs that started creating but 516 // encountered an error. 517 FailedToCreateVmCount int64 `json:"failedToCreateVmCount,omitempty"` 518 // Status: [Output Only] Creation status of BulkInsert operation - information 519 // if the flow is rolling forward or rolling back. 520 // 521 // Possible values: 522 // "STATUS_UNSPECIFIED" 523 // "CREATING" - Rolling forward - creating VMs. 524 // "ROLLING_BACK" - Rolling back - cleaning up after an error. 525 // "DONE" - Done 526 Status string `json:"status,omitempty"` 527 // TargetVmCount: [Output Only] Count of VMs originally planned to be created. 528 TargetVmCount int64 `json:"targetVmCount,omitempty"` 529 // ForceSendFields is a list of field names (e.g. "CreatedVmCount") to 530 // unconditionally include in API requests. By default, fields with empty or 531 // default values are omitted from API requests. See 532 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 533 // details. 534 ForceSendFields []string `json:"-"` 535 // NullFields is a list of field names (e.g. "CreatedVmCount") to include in 536 // API requests with the JSON null value. By default, fields with empty values 537 // are omitted from API requests. See 538 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 539 NullFields []string `json:"-"` 540 } 541 542 func (s *BulkInsertOperationStatus) MarshalJSON() ([]byte, error) { 543 type NoMethod BulkInsertOperationStatus 544 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 545 } 546 547 // CollectionOverride: CollectionOverride allows resource handling overrides 548 // for specific resources within a BaseType 549 type CollectionOverride struct { 550 // Collection: The collection that identifies this resource within its service. 551 Collection string `json:"collection,omitempty"` 552 // MethodMap: Custom verb method mappings to support unordered list API 553 // mappings. 554 MethodMap *MethodMap `json:"methodMap,omitempty"` 555 // Options: The options to apply to this resource-level override 556 Options *Options `json:"options,omitempty"` 557 // ForceSendFields is a list of field names (e.g. "Collection") to 558 // unconditionally include in API requests. By default, fields with empty or 559 // default values are omitted from API requests. See 560 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 561 // details. 562 ForceSendFields []string `json:"-"` 563 // NullFields is a list of field names (e.g. "Collection") to include in API 564 // requests with the JSON null value. By default, fields with empty values are 565 // omitted from API requests. See 566 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 567 NullFields []string `json:"-"` 568 } 569 570 func (s *CollectionOverride) MarshalJSON() ([]byte, error) { 571 type NoMethod CollectionOverride 572 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 573 } 574 575 // CompositeType: Holds the composite type. 576 type CompositeType struct { 577 // Description: An optional textual description of the resource; provided by 578 // the client when the resource is created. 579 Description string `json:"description,omitempty"` 580 Id uint64 `json:"id,omitempty,string"` 581 // InsertTime: Output only. Creation timestamp in RFC3339 text format. 582 InsertTime string `json:"insertTime,omitempty"` 583 // Labels: Map of labels; provided by the client when the resource is created 584 // or updated. Specifically: Label keys must be between 1 and 63 characters 585 // long and must conform to the following regular expression: `a-z 586 // ([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long 587 // and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. 588 Labels []*CompositeTypeLabelEntry `json:"labels,omitempty"` 589 // Name: Name of the composite type, must follow the expression: 590 // `[a-z]([-a-z0-9_.]{0,61}[a-z0-9])?`. 591 Name string `json:"name,omitempty"` 592 // Operation: Output only. The Operation that most recently ran, or is 593 // currently running, on this composite type. 594 Operation *Operation `json:"operation,omitempty"` 595 // SelfLink: Output only. Server defined URL for the resource. 596 SelfLink string `json:"selfLink,omitempty"` 597 // Possible values: 598 // "UNKNOWN_STATUS" 599 // "DEPRECATED" 600 // "EXPERIMENTAL" 601 // "SUPPORTED" 602 Status string `json:"status,omitempty"` 603 // TemplateContents: Files for the template type. 604 TemplateContents *TemplateContents `json:"templateContents,omitempty"` 605 606 // ServerResponse contains the HTTP response code and headers from the server. 607 googleapi.ServerResponse `json:"-"` 608 // ForceSendFields is a list of field names (e.g. "Description") to 609 // unconditionally include in API requests. By default, fields with empty or 610 // default values are omitted from API requests. See 611 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 612 // details. 613 ForceSendFields []string `json:"-"` 614 // NullFields is a list of field names (e.g. "Description") to include in API 615 // requests with the JSON null value. By default, fields with empty values are 616 // omitted from API requests. See 617 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 618 NullFields []string `json:"-"` 619 } 620 621 func (s *CompositeType) MarshalJSON() ([]byte, error) { 622 type NoMethod CompositeType 623 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 624 } 625 626 // CompositeTypeLabelEntry: Label object for CompositeTypes 627 type CompositeTypeLabelEntry struct { 628 // Key: Key of the label 629 Key string `json:"key,omitempty"` 630 // Value: Value of the label 631 Value string `json:"value,omitempty"` 632 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally 633 // include in API requests. By default, fields with empty or default values are 634 // omitted from API requests. See 635 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 636 // details. 637 ForceSendFields []string `json:"-"` 638 // NullFields is a list of field names (e.g. "Key") to include in API requests 639 // with the JSON null value. By default, fields with empty values are omitted 640 // from API requests. See 641 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 642 NullFields []string `json:"-"` 643 } 644 645 func (s *CompositeTypeLabelEntry) MarshalJSON() ([]byte, error) { 646 type NoMethod CompositeTypeLabelEntry 647 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 648 } 649 650 // CompositeTypesListResponse: A response that returns all Composite Types 651 // supported by Deployment Manager 652 type CompositeTypesListResponse struct { 653 // CompositeTypes: Output only. A list of resource composite types supported by 654 // Deployment Manager. 655 CompositeTypes []*CompositeType `json:"compositeTypes,omitempty"` 656 // NextPageToken: A token used to continue a truncated list request. 657 NextPageToken string `json:"nextPageToken,omitempty"` 658 659 // ServerResponse contains the HTTP response code and headers from the server. 660 googleapi.ServerResponse `json:"-"` 661 // ForceSendFields is a list of field names (e.g. "CompositeTypes") to 662 // unconditionally include in API requests. By default, fields with empty or 663 // default values are omitted from API requests. See 664 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 665 // details. 666 ForceSendFields []string `json:"-"` 667 // NullFields is a list of field names (e.g. "CompositeTypes") to include in 668 // API requests with the JSON null value. By default, fields with empty values 669 // are omitted from API requests. See 670 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 671 NullFields []string `json:"-"` 672 } 673 674 func (s *CompositeTypesListResponse) MarshalJSON() ([]byte, error) { 675 type NoMethod CompositeTypesListResponse 676 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 677 } 678 679 type ConfigFile struct { 680 // Content: The contents of the file. 681 Content string `json:"content,omitempty"` 682 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally 683 // include in API requests. By default, fields with empty or default values are 684 // omitted from API requests. See 685 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 686 // details. 687 ForceSendFields []string `json:"-"` 688 // NullFields is a list of field names (e.g. "Content") to include in API 689 // requests with the JSON null value. By default, fields with empty values are 690 // omitted from API requests. See 691 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 692 NullFields []string `json:"-"` 693 } 694 695 func (s *ConfigFile) MarshalJSON() ([]byte, error) { 696 type NoMethod ConfigFile 697 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 698 } 699 700 // Credential: The credential used by Deployment Manager and TypeProvider. Only 701 // one of the options is permitted. 702 type Credential struct { 703 // BasicAuth: Basic Auth Credential, only used by TypeProvider. 704 BasicAuth *BasicAuth `json:"basicAuth,omitempty"` 705 // ServiceAccount: Service Account Credential, only used by Deployment. 706 ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"` 707 // UseProjectDefault: Specify to use the project default credential, only 708 // supported by Deployment. 709 UseProjectDefault bool `json:"useProjectDefault,omitempty"` 710 // ForceSendFields is a list of field names (e.g. "BasicAuth") to 711 // unconditionally include in API requests. By default, fields with empty or 712 // default values are omitted from API requests. See 713 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 714 // details. 715 ForceSendFields []string `json:"-"` 716 // NullFields is a list of field names (e.g. "BasicAuth") to include in API 717 // requests with the JSON null value. By default, fields with empty values are 718 // omitted from API requests. See 719 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 720 NullFields []string `json:"-"` 721 } 722 723 func (s *Credential) MarshalJSON() ([]byte, error) { 724 type NoMethod Credential 725 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 726 } 727 728 type Deployment struct { 729 // Credential: User provided default credential for the deployment. 730 Credential *Credential `json:"credential,omitempty"` 731 // Description: An optional user-provided description of the deployment. 732 Description string `json:"description,omitempty"` 733 // Fingerprint: Provides a fingerprint to use in requests to modify a 734 // deployment, such as `update()`, `stop()`, and `cancelPreview()` requests. A 735 // fingerprint is a randomly generated value that must be provided with 736 // `update()`, `stop()`, and `cancelPreview()` requests to perform optimistic 737 // locking. This ensures optimistic concurrency so that only one request 738 // happens at a time. The fingerprint is initially generated by Deployment 739 // Manager and changes after every request to modify data. To get the latest 740 // fingerprint value, perform a `get()` request to a deployment. 741 Fingerprint string `json:"fingerprint,omitempty"` 742 Id uint64 `json:"id,omitempty,string"` 743 // InsertTime: Output only. Creation timestamp in RFC3339 text format. 744 InsertTime string `json:"insertTime,omitempty"` 745 // Labels: Map of One Platform labels; provided by the client when the resource 746 // is created or updated. Specifically: Label keys must be between 1 and 63 747 // characters long and must conform to the following regular expression: `a-z 748 // ([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long 749 // and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. 750 Labels []*DeploymentLabelEntry `json:"labels,omitempty"` 751 // Manifest: Output only. URL of the manifest representing the last manifest 752 // that was successfully deployed. If no manifest has been successfully 753 // deployed, this field will be absent. 754 Manifest string `json:"manifest,omitempty"` 755 // Name: Name of the resource; provided by the client when the resource is 756 // created. The name must be 1-63 characters long, and comply with RFC1035. 757 // Specifically, the name must be 1-63 characters long and match the regular 758 // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must 759 // be a lowercase letter, and all following characters must be a dash, 760 // lowercase letter, or digit, except the last character, which cannot be a 761 // dash. 762 Name string `json:"name,omitempty"` 763 // Operation: Output only. The Operation that most recently ran, or is 764 // currently running, on this deployment. 765 Operation *Operation `json:"operation,omitempty"` 766 // Outputs: Output only. List of outputs from the last manifest that deployed 767 // successfully. 768 Outputs []*DeploymentOutputEntry `json:"outputs,omitempty"` 769 // SelfLink: Output only. Server defined URL for the resource. 770 SelfLink string `json:"selfLink,omitempty"` 771 // Target: [Input Only] The parameters that define your deployment, including 772 // the deployment configuration and relevant templates. 773 Target *TargetConfiguration `json:"target,omitempty"` 774 // Update: Output only. If Deployment Manager is currently updating or 775 // previewing an update to this deployment, the updated configuration appears 776 // here. 777 Update *DeploymentUpdate `json:"update,omitempty"` 778 // UpdateTime: Output only. Update timestamp in RFC3339 text format. 779 UpdateTime string `json:"updateTime,omitempty"` 780 781 // ServerResponse contains the HTTP response code and headers from the server. 782 googleapi.ServerResponse `json:"-"` 783 // ForceSendFields is a list of field names (e.g. "Credential") to 784 // unconditionally include in API requests. By default, fields with empty or 785 // default values are omitted from API requests. See 786 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 787 // details. 788 ForceSendFields []string `json:"-"` 789 // NullFields is a list of field names (e.g. "Credential") to include in API 790 // requests with the JSON null value. By default, fields with empty values are 791 // omitted from API requests. See 792 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 793 NullFields []string `json:"-"` 794 } 795 796 func (s *Deployment) MarshalJSON() ([]byte, error) { 797 type NoMethod Deployment 798 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 799 } 800 801 // DeploymentLabelEntry: Label object for Deployments 802 type DeploymentLabelEntry struct { 803 // Key: Key of the label 804 Key string `json:"key,omitempty"` 805 // Value: Value of the label 806 Value string `json:"value,omitempty"` 807 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally 808 // include in API requests. By default, fields with empty or default values are 809 // omitted from API requests. See 810 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 811 // details. 812 ForceSendFields []string `json:"-"` 813 // NullFields is a list of field names (e.g. "Key") to include in API requests 814 // with the JSON null value. By default, fields with empty values are omitted 815 // from API requests. See 816 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 817 NullFields []string `json:"-"` 818 } 819 820 func (s *DeploymentLabelEntry) MarshalJSON() ([]byte, error) { 821 type NoMethod DeploymentLabelEntry 822 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 823 } 824 825 // DeploymentOutputEntry: Output object for Deployments 826 type DeploymentOutputEntry struct { 827 // Key: Key of the output 828 Key string `json:"key,omitempty"` 829 // Value: Value of the label 830 Value string `json:"value,omitempty"` 831 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally 832 // include in API requests. By default, fields with empty or default values are 833 // omitted from API requests. See 834 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 835 // details. 836 ForceSendFields []string `json:"-"` 837 // NullFields is a list of field names (e.g. "Key") to include in API requests 838 // with the JSON null value. By default, fields with empty values are omitted 839 // from API requests. See 840 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 841 NullFields []string `json:"-"` 842 } 843 844 func (s *DeploymentOutputEntry) MarshalJSON() ([]byte, error) { 845 type NoMethod DeploymentOutputEntry 846 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 847 } 848 849 type DeploymentUpdate struct { 850 // Credential: Output only. The user-provided default credential to use when 851 // deploying this preview. 852 Credential *Credential `json:"credential,omitempty"` 853 // Description: Output only. An optional user-provided description of the 854 // deployment after the current update has been applied. 855 Description string `json:"description,omitempty"` 856 // Labels: Map of One Platform labels; provided by the client when the resource 857 // is created or updated. Specifically: Label keys must be between 1 and 63 858 // characters long and must conform to the following regular expression: `a-z 859 // ([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long 860 // and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. 861 Labels []*DeploymentUpdateLabelEntry `json:"labels,omitempty"` 862 // Manifest: Output only. URL of the manifest representing the update 863 // configuration of this deployment. 864 Manifest string `json:"manifest,omitempty"` 865 // ForceSendFields is a list of field names (e.g. "Credential") to 866 // unconditionally include in API requests. By default, fields with empty or 867 // default values are omitted from API requests. See 868 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 869 // details. 870 ForceSendFields []string `json:"-"` 871 // NullFields is a list of field names (e.g. "Credential") to include in API 872 // requests with the JSON null value. By default, fields with empty values are 873 // omitted from API requests. See 874 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 875 NullFields []string `json:"-"` 876 } 877 878 func (s *DeploymentUpdate) MarshalJSON() ([]byte, error) { 879 type NoMethod DeploymentUpdate 880 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 881 } 882 883 // DeploymentUpdateLabelEntry: Label object for DeploymentUpdate 884 type DeploymentUpdateLabelEntry struct { 885 // Key: Key of the label 886 Key string `json:"key,omitempty"` 887 // Value: Value of the label 888 Value string `json:"value,omitempty"` 889 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally 890 // include in API requests. By default, fields with empty or default values are 891 // omitted from API requests. See 892 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 893 // details. 894 ForceSendFields []string `json:"-"` 895 // NullFields is a list of field names (e.g. "Key") to include in API requests 896 // with the JSON null value. By default, fields with empty values are omitted 897 // from API requests. See 898 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 899 NullFields []string `json:"-"` 900 } 901 902 func (s *DeploymentUpdateLabelEntry) MarshalJSON() ([]byte, error) { 903 type NoMethod DeploymentUpdateLabelEntry 904 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 905 } 906 907 type DeploymentsCancelPreviewRequest struct { 908 // Fingerprint: Specifies a fingerprint for `cancelPreview()` requests. A 909 // fingerprint is a randomly generated value that must be provided in 910 // `cancelPreview()` requests to perform optimistic locking. This ensures 911 // optimistic concurrency so that the deployment does not have conflicting 912 // requests (e.g. if someone attempts to make a new update request while 913 // another user attempts to cancel a preview, this would prevent one of the 914 // requests). The fingerprint is initially generated by Deployment Manager and 915 // changes after every request to modify a deployment. To get the latest 916 // fingerprint value, perform a `get()` request on the deployment. 917 Fingerprint string `json:"fingerprint,omitempty"` 918 // ForceSendFields is a list of field names (e.g. "Fingerprint") to 919 // unconditionally include in API requests. By default, fields with empty or 920 // default values are omitted from API requests. See 921 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 922 // details. 923 ForceSendFields []string `json:"-"` 924 // NullFields is a list of field names (e.g. "Fingerprint") to include in API 925 // requests with the JSON null value. By default, fields with empty values are 926 // omitted from API requests. See 927 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 928 NullFields []string `json:"-"` 929 } 930 931 func (s *DeploymentsCancelPreviewRequest) MarshalJSON() ([]byte, error) { 932 type NoMethod DeploymentsCancelPreviewRequest 933 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 934 } 935 936 // DeploymentsListResponse: A response containing a partial list of deployments 937 // and a page token used to build the next request if the request has been 938 // truncated. 939 type DeploymentsListResponse struct { 940 // Deployments: Output only. The deployments contained in this response. 941 Deployments []*Deployment `json:"deployments,omitempty"` 942 // NextPageToken: Output only. A token used to continue a truncated list 943 // request. 944 NextPageToken string `json:"nextPageToken,omitempty"` 945 946 // ServerResponse contains the HTTP response code and headers from the server. 947 googleapi.ServerResponse `json:"-"` 948 // ForceSendFields is a list of field names (e.g. "Deployments") to 949 // unconditionally include in API requests. By default, fields with empty or 950 // default values are omitted from API requests. See 951 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 952 // details. 953 ForceSendFields []string `json:"-"` 954 // NullFields is a list of field names (e.g. "Deployments") to include in API 955 // requests with the JSON null value. By default, fields with empty values are 956 // omitted from API requests. See 957 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 958 NullFields []string `json:"-"` 959 } 960 961 func (s *DeploymentsListResponse) MarshalJSON() ([]byte, error) { 962 type NoMethod DeploymentsListResponse 963 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 964 } 965 966 type DeploymentsStopRequest struct { 967 // Fingerprint: Specifies a fingerprint for `stop()` requests. A fingerprint is 968 // a randomly generated value that must be provided in `stop()` requests to 969 // perform optimistic locking. This ensures optimistic concurrency so that the 970 // deployment does not have conflicting requests (e.g. if someone attempts to 971 // make a new update request while another user attempts to stop an ongoing 972 // update request, this would prevent a collision). The fingerprint is 973 // initially generated by Deployment Manager and changes after every request to 974 // modify a deployment. To get the latest fingerprint value, perform a `get()` 975 // request on the deployment. 976 Fingerprint string `json:"fingerprint,omitempty"` 977 // ForceSendFields is a list of field names (e.g. "Fingerprint") to 978 // unconditionally include in API requests. By default, fields with empty or 979 // default values are omitted from API requests. See 980 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 981 // details. 982 ForceSendFields []string `json:"-"` 983 // NullFields is a list of field names (e.g. "Fingerprint") to include in API 984 // requests with the JSON null value. By default, fields with empty values are 985 // omitted from API requests. See 986 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 987 NullFields []string `json:"-"` 988 } 989 990 func (s *DeploymentsStopRequest) MarshalJSON() ([]byte, error) { 991 type NoMethod DeploymentsStopRequest 992 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 993 } 994 995 type Diagnostic struct { 996 // Field: JsonPath expression on the resource that if non empty, indicates that 997 // this field needs to be extracted as a diagnostic. 998 Field string `json:"field,omitempty"` 999 // Level: Level to record this diagnostic. 1000 // 1001 // Possible values: 1002 // "UNKNOWN" 1003 // "INFORMATION" - If level is informational, it only gets displayed as part 1004 // of the resource. 1005 // "WARNING" - If level is warning, will end up in the resource as a warning. 1006 // "ERROR" - If level is error, it will indicate an error occurred after 1007 // finishCondition is set, and this field will populate resource errors and 1008 // operation errors. 1009 Level string `json:"level,omitempty"` 1010 // ForceSendFields is a list of field names (e.g. "Field") to unconditionally 1011 // include in API requests. By default, fields with empty or default values are 1012 // omitted from API requests. See 1013 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1014 // details. 1015 ForceSendFields []string `json:"-"` 1016 // NullFields is a list of field names (e.g. "Field") to include in API 1017 // requests with the JSON null value. By default, fields with empty values are 1018 // omitted from API requests. See 1019 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1020 NullFields []string `json:"-"` 1021 } 1022 1023 func (s *Diagnostic) MarshalJSON() ([]byte, error) { 1024 type NoMethod Diagnostic 1025 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1026 } 1027 1028 // Expr: Represents a textual expression in the Common Expression Language 1029 // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics 1030 // of CEL are documented at https://github.com/google/cel-spec. Example 1031 // (Comparison): title: "Summary size limit" description: "Determines if a 1032 // summary is less than 100 chars" expression: "document.summary.size() < 100" 1033 // Example (Equality): title: "Requestor is owner" description: "Determines if 1034 // requestor is the document owner" expression: "document.owner == 1035 // request.auth.claims.email" Example (Logic): title: "Public documents" 1036 // description: "Determine whether the document should be publicly visible" 1037 // expression: "document.type != 'private' && document.type != 'internal'" 1038 // Example (Data Manipulation): title: "Notification string" description: 1039 // "Create a notification string with a timestamp." expression: "'New message 1040 // received at ' + string(document.create_time)" The exact variables and 1041 // functions that may be referenced within an expression are determined by the 1042 // service that evaluates it. See the service documentation for additional 1043 // information. 1044 type Expr struct { 1045 // Description: Optional. Description of the expression. This is a longer text 1046 // which describes the expression, e.g. when hovered over it in a UI. 1047 Description string `json:"description,omitempty"` 1048 // Expression: Textual representation of an expression in Common Expression 1049 // Language syntax. 1050 Expression string `json:"expression,omitempty"` 1051 // Location: Optional. String indicating the location of the expression for 1052 // error reporting, e.g. a file name and a position in the file. 1053 Location string `json:"location,omitempty"` 1054 // Title: Optional. Title for the expression, i.e. a short string describing 1055 // its purpose. This can be used e.g. in UIs which allow to enter the 1056 // expression. 1057 Title string `json:"title,omitempty"` 1058 // ForceSendFields is a list of field names (e.g. "Description") to 1059 // unconditionally include in API requests. By default, fields with empty or 1060 // default values are omitted from API requests. See 1061 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1062 // details. 1063 ForceSendFields []string `json:"-"` 1064 // NullFields is a list of field names (e.g. "Description") to include in API 1065 // requests with the JSON null value. By default, fields with empty values are 1066 // omitted from API requests. See 1067 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1068 NullFields []string `json:"-"` 1069 } 1070 1071 func (s *Expr) MarshalJSON() ([]byte, error) { 1072 type NoMethod Expr 1073 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1074 } 1075 1076 type GlobalSetPolicyRequest struct { 1077 // Bindings: Flatten Policy to create a backward compatible wire-format. 1078 // Deprecated. Use 'policy' to specify bindings. 1079 Bindings []*Binding `json:"bindings,omitempty"` 1080 // Etag: Flatten Policy to create a backward compatible wire-format. 1081 // Deprecated. Use 'policy' to specify the etag. 1082 Etag string `json:"etag,omitempty"` 1083 // Policy: REQUIRED: The complete policy to be applied to the 'resource'. The 1084 // size of the policy is limited to a few 10s of KB. An empty policy is in 1085 // general a valid policy but certain services (like Projects) might reject 1086 // them. 1087 Policy *Policy `json:"policy,omitempty"` 1088 // ForceSendFields is a list of field names (e.g. "Bindings") to 1089 // unconditionally include in API requests. By default, fields with empty or 1090 // default values are omitted from API requests. See 1091 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1092 // details. 1093 ForceSendFields []string `json:"-"` 1094 // NullFields is a list of field names (e.g. "Bindings") to include in API 1095 // requests with the JSON null value. By default, fields with empty values are 1096 // omitted from API requests. See 1097 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1098 NullFields []string `json:"-"` 1099 } 1100 1101 func (s *GlobalSetPolicyRequest) MarshalJSON() ([]byte, error) { 1102 type NoMethod GlobalSetPolicyRequest 1103 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1104 } 1105 1106 type ImportFile struct { 1107 // Content: The contents of the file. 1108 Content string `json:"content,omitempty"` 1109 // Name: The name of the file. 1110 Name string `json:"name,omitempty"` 1111 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally 1112 // include in API requests. By default, fields with empty or default values are 1113 // omitted from API requests. See 1114 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1115 // details. 1116 ForceSendFields []string `json:"-"` 1117 // NullFields is a list of field names (e.g. "Content") to include in API 1118 // requests with the JSON null value. By default, fields with empty values are 1119 // omitted from API requests. See 1120 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1121 NullFields []string `json:"-"` 1122 } 1123 1124 func (s *ImportFile) MarshalJSON() ([]byte, error) { 1125 type NoMethod ImportFile 1126 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1127 } 1128 1129 // InputMapping: InputMapping creates a 'virtual' property that will be 1130 // injected into the properties before sending the request to the underlying 1131 // API. 1132 type InputMapping struct { 1133 // FieldName: The name of the field that is going to be injected. 1134 FieldName string `json:"fieldName,omitempty"` 1135 // Location: The location where this mapping applies. 1136 // 1137 // Possible values: 1138 // "UNKNOWN" 1139 // "PATH" 1140 // "QUERY" 1141 // "BODY" 1142 // "HEADER" 1143 Location string `json:"location,omitempty"` 1144 // MethodMatch: Regex to evaluate on method to decide if input applies. 1145 MethodMatch string `json:"methodMatch,omitempty"` 1146 // Value: A jsonPath expression to select an element. 1147 Value string `json:"value,omitempty"` 1148 // ForceSendFields is a list of field names (e.g. "FieldName") to 1149 // unconditionally include in API requests. By default, fields with empty or 1150 // default values are omitted from API requests. See 1151 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1152 // details. 1153 ForceSendFields []string `json:"-"` 1154 // NullFields is a list of field names (e.g. "FieldName") to include in API 1155 // requests with the JSON null value. By default, fields with empty values are 1156 // omitted from API requests. See 1157 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1158 NullFields []string `json:"-"` 1159 } 1160 1161 func (s *InputMapping) MarshalJSON() ([]byte, error) { 1162 type NoMethod InputMapping 1163 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1164 } 1165 1166 type InstancesBulkInsertOperationMetadata struct { 1167 // PerLocationStatus: Status information per location (location name is key). 1168 // Example key: zones/us-central1-a 1169 PerLocationStatus map[string]BulkInsertOperationStatus `json:"perLocationStatus,omitempty"` 1170 // ForceSendFields is a list of field names (e.g. "PerLocationStatus") to 1171 // unconditionally include in API requests. By default, fields with empty or 1172 // default values are omitted from API requests. See 1173 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1174 // details. 1175 ForceSendFields []string `json:"-"` 1176 // NullFields is a list of field names (e.g. "PerLocationStatus") to include in 1177 // API requests with the JSON null value. By default, fields with empty values 1178 // are omitted from API requests. See 1179 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1180 NullFields []string `json:"-"` 1181 } 1182 1183 func (s *InstancesBulkInsertOperationMetadata) MarshalJSON() ([]byte, error) { 1184 type NoMethod InstancesBulkInsertOperationMetadata 1185 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1186 } 1187 1188 type Manifest struct { 1189 // Config: Output only. The YAML configuration for this manifest. 1190 Config *ConfigFile `json:"config,omitempty"` 1191 // ExpandedConfig: Output only. The fully-expanded configuration file, 1192 // including any templates and references. 1193 ExpandedConfig string `json:"expandedConfig,omitempty"` 1194 Id uint64 `json:"id,omitempty,string"` 1195 // Imports: Output only. The imported files for this manifest. 1196 Imports []*ImportFile `json:"imports,omitempty"` 1197 // InsertTime: Output only. Creation timestamp in RFC3339 text format. 1198 InsertTime string `json:"insertTime,omitempty"` 1199 // Layout: Output only. The YAML layout for this manifest. 1200 Layout string `json:"layout,omitempty"` 1201 // ManifestSizeBytes: Output only. The computed size of the fully expanded 1202 // manifest. 1203 ManifestSizeBytes int64 `json:"manifestSizeBytes,omitempty,string"` 1204 // ManifestSizeLimitBytes: Output only. The size limit for expanded manifests 1205 // in the project. 1206 ManifestSizeLimitBytes int64 `json:"manifestSizeLimitBytes,omitempty,string"` 1207 // Name: Output only. The name of the manifest. 1208 Name string `json:"name,omitempty"` 1209 // SelfLink: Output only. Self link for the manifest. 1210 SelfLink string `json:"selfLink,omitempty"` 1211 1212 // ServerResponse contains the HTTP response code and headers from the server. 1213 googleapi.ServerResponse `json:"-"` 1214 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally 1215 // include in API requests. By default, fields with empty or default values are 1216 // omitted from API requests. See 1217 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1218 // details. 1219 ForceSendFields []string `json:"-"` 1220 // NullFields is a list of field names (e.g. "Config") to include in API 1221 // requests with the JSON null value. By default, fields with empty values are 1222 // omitted from API requests. See 1223 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1224 NullFields []string `json:"-"` 1225 } 1226 1227 func (s *Manifest) MarshalJSON() ([]byte, error) { 1228 type NoMethod Manifest 1229 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1230 } 1231 1232 // ManifestsListResponse: A response containing a partial list of manifests and 1233 // a page token used to build the next request if the request has been 1234 // truncated. 1235 type ManifestsListResponse struct { 1236 // Manifests: Output only. Manifests contained in this list response. 1237 Manifests []*Manifest `json:"manifests,omitempty"` 1238 // NextPageToken: Output only. A token used to continue a truncated list 1239 // request. 1240 NextPageToken string `json:"nextPageToken,omitempty"` 1241 1242 // ServerResponse contains the HTTP response code and headers from the server. 1243 googleapi.ServerResponse `json:"-"` 1244 // ForceSendFields is a list of field names (e.g. "Manifests") to 1245 // unconditionally include in API requests. By default, fields with empty or 1246 // default values are omitted from API requests. See 1247 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1248 // details. 1249 ForceSendFields []string `json:"-"` 1250 // NullFields is a list of field names (e.g. "Manifests") to include in API 1251 // requests with the JSON null value. By default, fields with empty values are 1252 // omitted from API requests. See 1253 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1254 NullFields []string `json:"-"` 1255 } 1256 1257 func (s *ManifestsListResponse) MarshalJSON() ([]byte, error) { 1258 type NoMethod ManifestsListResponse 1259 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1260 } 1261 1262 // MethodMap: Deployment Manager will call these methods during the events of 1263 // creation/deletion/update/get/setIamPolicy 1264 type MethodMap struct { 1265 // Create: The action identifier for the create method to be used for this 1266 // collection 1267 Create string `json:"create,omitempty"` 1268 // Delete: The action identifier for the delete method to be used for this 1269 // collection 1270 Delete string `json:"delete,omitempty"` 1271 // Get: The action identifier for the get method to be used for this collection 1272 Get string `json:"get,omitempty"` 1273 // SetIamPolicy: The action identifier for the setIamPolicy method to be used 1274 // for this collection 1275 SetIamPolicy string `json:"setIamPolicy,omitempty"` 1276 // Update: The action identifier for the update method to be used for this 1277 // collection 1278 Update string `json:"update,omitempty"` 1279 // ForceSendFields is a list of field names (e.g. "Create") to unconditionally 1280 // include in API requests. By default, fields with empty or default values are 1281 // omitted from API requests. See 1282 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1283 // details. 1284 ForceSendFields []string `json:"-"` 1285 // NullFields is a list of field names (e.g. "Create") to include in API 1286 // requests with the JSON null value. By default, fields with empty values are 1287 // omitted from API requests. See 1288 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1289 NullFields []string `json:"-"` 1290 } 1291 1292 func (s *MethodMap) MarshalJSON() ([]byte, error) { 1293 type NoMethod MethodMap 1294 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1295 } 1296 1297 // Operation: Represents an Operation resource. Google Compute Engine has three 1298 // Operation resources: * Global 1299 // (/compute/docs/reference/rest/{$api_version}/globalOperations) * Regional 1300 // (/compute/docs/reference/rest/{$api_version}/regionOperations) * Zonal 1301 // (/compute/docs/reference/rest/{$api_version}/zoneOperations) You can use an 1302 // operation resource to manage asynchronous API requests. For more 1303 // information, read Handling API responses. Operations can be global, regional 1304 // or zonal. - For global operations, use the `globalOperations` resource. - 1305 // For regional operations, use the `regionOperations` resource. - For zonal 1306 // operations, use the `zoneOperations` resource. For more information, read 1307 // Global, Regional, and Zonal Resources. Note that completed Operation 1308 // resources have a limited retention period. 1309 type Operation struct { 1310 // ClientOperationId: [Output Only] The value of `requestId` if you provided it 1311 // in the request. Not present otherwise. 1312 ClientOperationId string `json:"clientOperationId,omitempty"` 1313 // CreationTimestamp: [Deprecated] This field is deprecated. 1314 CreationTimestamp string `json:"creationTimestamp,omitempty"` 1315 // Description: [Output Only] A textual description of the operation, which is 1316 // set when the operation is created. 1317 Description string `json:"description,omitempty"` 1318 // EndTime: [Output Only] The time that this operation was completed. This 1319 // value is in RFC3339 text format. 1320 EndTime string `json:"endTime,omitempty"` 1321 // Error: [Output Only] If errors are generated during processing of the 1322 // operation, this field will be populated. 1323 Error *OperationError `json:"error,omitempty"` 1324 // HttpErrorMessage: [Output Only] If the operation fails, this field contains 1325 // the HTTP error message that was returned, such as `NOT FOUND`. 1326 HttpErrorMessage string `json:"httpErrorMessage,omitempty"` 1327 // HttpErrorStatusCode: [Output Only] If the operation fails, this field 1328 // contains the HTTP error status code that was returned. For example, a `404` 1329 // means the resource was not found. 1330 HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` 1331 // Id: [Output Only] The unique identifier for the operation. This identifier 1332 // is defined by the server. 1333 Id uint64 `json:"id,omitempty,string"` 1334 // InsertTime: [Output Only] The time that this operation was requested. This 1335 // value is in RFC3339 text format. 1336 InsertTime string `json:"insertTime,omitempty"` 1337 InstancesBulkInsertOperationMetadata *InstancesBulkInsertOperationMetadata `json:"instancesBulkInsertOperationMetadata,omitempty"` 1338 // Kind: [Output Only] Type of the resource. Always `compute#operation` for 1339 // Operation resources. 1340 Kind string `json:"kind,omitempty"` 1341 // Name: [Output Only] Name of the operation. 1342 Name string `json:"name,omitempty"` 1343 // OperationGroupId: [Output Only] An ID that represents a group of operations, 1344 // such as when a group of operations results from a `bulkInsert` API request. 1345 OperationGroupId string `json:"operationGroupId,omitempty"` 1346 // OperationType: [Output Only] The type of operation, such as `insert`, 1347 // `update`, or `delete`, and so on. 1348 OperationType string `json:"operationType,omitempty"` 1349 // Progress: [Output Only] An optional progress indicator that ranges from 0 to 1350 // 100. There is no requirement that this be linear or support any granularity 1351 // of operations. This should not be used to guess when the operation will be 1352 // complete. This number should monotonically increase as the operation 1353 // progresses. 1354 Progress int64 `json:"progress,omitempty"` 1355 // Region: [Output Only] The URL of the region where the operation resides. 1356 // Only applicable when performing regional operations. 1357 Region string `json:"region,omitempty"` 1358 // SelfLink: [Output Only] Server-defined URL for the resource. 1359 SelfLink string `json:"selfLink,omitempty"` 1360 // SetCommonInstanceMetadataOperationMetadata: [Output Only] If the operation 1361 // is for projects.setCommonInstanceMetadata, this field will contain 1362 // information on all underlying zonal actions and their state. 1363 SetCommonInstanceMetadataOperationMetadata *SetCommonInstanceMetadataOperationMetadata `json:"setCommonInstanceMetadataOperationMetadata,omitempty"` 1364 // StartTime: [Output Only] The time that this operation was started by the 1365 // server. This value is in RFC3339 text format. 1366 StartTime string `json:"startTime,omitempty"` 1367 // Status: [Output Only] The status of the operation, which can be one of the 1368 // following: `PENDING`, `RUNNING`, or `DONE`. 1369 // 1370 // Possible values: 1371 // "PENDING" 1372 // "RUNNING" 1373 // "DONE" 1374 Status string `json:"status,omitempty"` 1375 // StatusMessage: [Output Only] An optional textual description of the current 1376 // status of the operation. 1377 StatusMessage string `json:"statusMessage,omitempty"` 1378 // TargetId: [Output Only] The unique target ID, which identifies a specific 1379 // incarnation of the target resource. 1380 TargetId uint64 `json:"targetId,omitempty,string"` 1381 // TargetLink: [Output Only] The URL of the resource that the operation 1382 // modifies. For operations related to creating a snapshot, this points to the 1383 // persistent disk that the snapshot was created from. 1384 TargetLink string `json:"targetLink,omitempty"` 1385 // User: [Output Only] User who requested the operation, for example: 1386 // `user@example.com` or `alice_smith_identifier 1387 // (global/workforcePools/example-com-us-employees)`. 1388 User string `json:"user,omitempty"` 1389 // Warnings: [Output Only] If warning messages are generated during processing 1390 // of the operation, this field will be populated. 1391 Warnings []*OperationWarnings `json:"warnings,omitempty"` 1392 // Zone: [Output Only] The URL of the zone where the operation resides. Only 1393 // applicable when performing per-zone operations. 1394 Zone string `json:"zone,omitempty"` 1395 1396 // ServerResponse contains the HTTP response code and headers from the server. 1397 googleapi.ServerResponse `json:"-"` 1398 // ForceSendFields is a list of field names (e.g. "ClientOperationId") to 1399 // unconditionally include in API requests. By default, fields with empty or 1400 // default values are omitted from API requests. See 1401 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1402 // details. 1403 ForceSendFields []string `json:"-"` 1404 // NullFields is a list of field names (e.g. "ClientOperationId") to include in 1405 // API requests with the JSON null value. By default, fields with empty values 1406 // are omitted from API requests. See 1407 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1408 NullFields []string `json:"-"` 1409 } 1410 1411 func (s *Operation) MarshalJSON() ([]byte, error) { 1412 type NoMethod Operation 1413 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1414 } 1415 1416 // OperationError: [Output Only] If errors are generated during processing of 1417 // the operation, this field will be populated. 1418 type OperationError struct { 1419 // Errors: [Output Only] The array of errors encountered while processing this 1420 // operation. 1421 Errors []*OperationErrorErrors `json:"errors,omitempty"` 1422 // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally 1423 // include in API requests. By default, fields with empty or default values are 1424 // omitted from API requests. See 1425 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1426 // details. 1427 ForceSendFields []string `json:"-"` 1428 // NullFields is a list of field names (e.g. "Errors") to include in API 1429 // requests with the JSON null value. By default, fields with empty values are 1430 // omitted from API requests. See 1431 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1432 NullFields []string `json:"-"` 1433 } 1434 1435 func (s *OperationError) MarshalJSON() ([]byte, error) { 1436 type NoMethod OperationError 1437 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1438 } 1439 1440 type OperationErrorErrors struct { 1441 // Code: [Output Only] The error type identifier for this error. 1442 Code string `json:"code,omitempty"` 1443 // Location: [Output Only] Indicates the field in the request that caused the 1444 // error. This property is optional. 1445 Location string `json:"location,omitempty"` 1446 // Message: [Output Only] An optional, human-readable error message. 1447 Message string `json:"message,omitempty"` 1448 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 1449 // include in API requests. By default, fields with empty or default values are 1450 // omitted from API requests. See 1451 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1452 // details. 1453 ForceSendFields []string `json:"-"` 1454 // NullFields is a list of field names (e.g. "Code") to include in API requests 1455 // with the JSON null value. By default, fields with empty values are omitted 1456 // from API requests. See 1457 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1458 NullFields []string `json:"-"` 1459 } 1460 1461 func (s *OperationErrorErrors) MarshalJSON() ([]byte, error) { 1462 type NoMethod OperationErrorErrors 1463 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1464 } 1465 1466 type OperationWarnings struct { 1467 // Code: [Output Only] A warning code, if applicable. For example, Compute 1468 // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 1469 // 1470 // Possible values: 1471 // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. 1472 // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. 1473 // "UNREACHABLE" - A given scope cannot be reached. 1474 // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not 1475 // assigned to an instance on the network. 1476 // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to 1477 // an instance that does not exist. 1478 // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL 1479 // refers to an instance that is not on the same network as the route. 1480 // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip 1481 // forward. 1482 // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a 1483 // status of RUNNING. 1484 // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected 1485 // kernel, which is deprecated. 1486 // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that 1487 // requires a TOS they have not accepted. 1488 // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is 1489 // larger than image size. 1490 // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete 1491 // could not be deleted because they were in use. 1492 // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance 1493 // group manager is valid as such, but its application does not make a lot of 1494 // sense, because it allows only single instance in instance group. 1495 // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue 1496 // the process despite the mentioned error. 1497 // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made 1498 // by a failed operation. 1499 // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been 1500 // overridden. Deprecated unused field. 1501 // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is 1502 // in use. 1503 // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type 1504 // "EXTERNAL_API_WARNING" - Warning that is present in an external api call 1505 // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is 1506 // ignored. 1507 // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are 1508 // present 1509 // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the 1510 // resources has a type marked as experimental 1511 // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources 1512 // has a type marked as deprecated 1513 // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing 1514 // due to errors 1515 // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a 1516 // exceedingly large number of resources 1517 // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance 1518 // URL refers to an instance that does not have an ipv6 interface on the same 1519 // network as the route. 1520 // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend 1521 // service is associated with a health check that is not of type 1522 // HTTP/HTTPS/HTTP2. 1523 // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list 1524 // overhead quota exceed which captures the amount of resources filtered out by 1525 // user-defined list filter. 1526 Code string `json:"code,omitempty"` 1527 // Data: [Output Only] Metadata about this warning in key: value format. For 1528 // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1529 Data []*OperationWarningsData `json:"data,omitempty"` 1530 // Message: [Output Only] A human-readable description of the warning code. 1531 Message string `json:"message,omitempty"` 1532 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 1533 // include in API requests. By default, fields with empty or default values are 1534 // omitted from API requests. See 1535 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1536 // details. 1537 ForceSendFields []string `json:"-"` 1538 // NullFields is a list of field names (e.g. "Code") to include in API requests 1539 // with the JSON null value. By default, fields with empty values are omitted 1540 // from API requests. See 1541 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1542 NullFields []string `json:"-"` 1543 } 1544 1545 func (s *OperationWarnings) MarshalJSON() ([]byte, error) { 1546 type NoMethod OperationWarnings 1547 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1548 } 1549 1550 type OperationWarningsData struct { 1551 // Key: [Output Only] A key that provides more detail on the warning being 1552 // returned. For example, for warnings where there are no results in a list 1553 // request for a particular zone, this key might be scope and the key value 1554 // might be the zone name. Other examples might be a key indicating a 1555 // deprecated resource and a suggested replacement, or a warning about invalid 1556 // network settings (for example, if an instance attempts to perform IP 1557 // forwarding but is not enabled for IP forwarding). 1558 Key string `json:"key,omitempty"` 1559 // Value: [Output Only] A warning data value corresponding to the key. 1560 Value string `json:"value,omitempty"` 1561 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally 1562 // include in API requests. By default, fields with empty or default values are 1563 // omitted from API requests. See 1564 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1565 // details. 1566 ForceSendFields []string `json:"-"` 1567 // NullFields is a list of field names (e.g. "Key") to include in API requests 1568 // with the JSON null value. By default, fields with empty values are omitted 1569 // from API requests. See 1570 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1571 NullFields []string `json:"-"` 1572 } 1573 1574 func (s *OperationWarningsData) MarshalJSON() ([]byte, error) { 1575 type NoMethod OperationWarningsData 1576 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1577 } 1578 1579 // OperationsListResponse: A response containing a partial list of operations 1580 // and a page token used to build the next request if the request has been 1581 // truncated. 1582 type OperationsListResponse struct { 1583 // NextPageToken: Output only. A token used to continue a truncated list 1584 // request. 1585 NextPageToken string `json:"nextPageToken,omitempty"` 1586 // Operations: Output only. Operations contained in this list response. 1587 Operations []*Operation `json:"operations,omitempty"` 1588 1589 // ServerResponse contains the HTTP response code and headers from the server. 1590 googleapi.ServerResponse `json:"-"` 1591 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1592 // unconditionally include in API requests. By default, fields with empty or 1593 // default values are omitted from API requests. See 1594 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1595 // details. 1596 ForceSendFields []string `json:"-"` 1597 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 1598 // requests with the JSON null value. By default, fields with empty values are 1599 // omitted from API requests. See 1600 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1601 NullFields []string `json:"-"` 1602 } 1603 1604 func (s *OperationsListResponse) MarshalJSON() ([]byte, error) { 1605 type NoMethod OperationsListResponse 1606 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1607 } 1608 1609 // Options: Options allows customized resource handling by Deployment Manager. 1610 type Options struct { 1611 // AsyncOptions: Options regarding how to thread async requests. 1612 AsyncOptions []*AsyncOptions `json:"asyncOptions,omitempty"` 1613 // InputMappings: The mappings that apply for requests. 1614 InputMappings []*InputMapping `json:"inputMappings,omitempty"` 1615 // NameProperty: The json path to the field in the resource JSON body into 1616 // which the resource name should be mapped. Leaving this empty indicates that 1617 // there should be no mapping performed. 1618 NameProperty string `json:"nameProperty,omitempty"` 1619 // ValidationOptions: Options for how to validate and process properties on a 1620 // resource. 1621 ValidationOptions *ValidationOptions `json:"validationOptions,omitempty"` 1622 // ForceSendFields is a list of field names (e.g. "AsyncOptions") to 1623 // unconditionally include in API requests. By default, fields with empty or 1624 // default values are omitted from API requests. See 1625 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1626 // details. 1627 ForceSendFields []string `json:"-"` 1628 // NullFields is a list of field names (e.g. "AsyncOptions") to include in API 1629 // requests with the JSON null value. By default, fields with empty values are 1630 // omitted from API requests. See 1631 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1632 NullFields []string `json:"-"` 1633 } 1634 1635 func (s *Options) MarshalJSON() ([]byte, error) { 1636 type NoMethod Options 1637 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1638 } 1639 1640 // Policy: An Identity and Access Management (IAM) policy, which specifies 1641 // access controls for Google Cloud resources. A `Policy` is a collection of 1642 // `bindings`. A `binding` binds one or more `members`, or principals, to a 1643 // single `role`. Principals can be user accounts, service accounts, Google 1644 // groups, and domains (such as G Suite). A `role` is a named list of 1645 // permissions; each `role` can be an IAM predefined role or a user-created 1646 // custom role. For some types of Google Cloud resources, a `binding` can also 1647 // specify a `condition`, which is a logical expression that allows access to a 1648 // resource only if the expression evaluates to `true`. A condition can add 1649 // constraints based on attributes of the request, the resource, or both. To 1650 // learn which resources support conditions in their IAM policies, see the IAM 1651 // documentation 1652 // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON 1653 // example:** ``` { "bindings": [ { "role": 1654 // "roles/resourcemanager.organizationAdmin", "members": [ 1655 // "user:mike@example.com", "group:admins@example.com", "domain:google.com", 1656 // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": 1657 // "roles/resourcemanager.organizationViewer", "members": [ 1658 // "user:eve@example.com" ], "condition": { "title": "expirable access", 1659 // "description": "Does not grant access after Sep 2020", "expression": 1660 // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": 1661 // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - 1662 // members: - user:mike@example.com - group:admins@example.com - 1663 // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com 1664 // role: roles/resourcemanager.organizationAdmin - members: - 1665 // user:eve@example.com role: roles/resourcemanager.organizationViewer 1666 // condition: title: expirable access description: Does not grant access after 1667 // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') 1668 // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, 1669 // see the IAM documentation (https://cloud.google.com/iam/docs/). 1670 type Policy struct { 1671 // AuditConfigs: Specifies cloud audit logging configuration for this policy. 1672 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` 1673 // Bindings: Associates a list of `members`, or principals, with a `role`. 1674 // Optionally, may specify a `condition` that determines how and when the 1675 // `bindings` are applied. Each of the `bindings` must contain at least one 1676 // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; 1677 // up to 250 of these principals can be Google groups. Each occurrence of a 1678 // principal counts towards these limits. For example, if the `bindings` grant 1679 // 50 different roles to `user:alice@example.com`, and not to any other 1680 // principal, then you can add another 1,450 principals to the `bindings` in 1681 // the `Policy`. 1682 Bindings []*Binding `json:"bindings,omitempty"` 1683 // Etag: `etag` is used for optimistic concurrency control as a way to help 1684 // prevent simultaneous updates of a policy from overwriting each other. It is 1685 // strongly suggested that systems make use of the `etag` in the 1686 // read-modify-write cycle to perform policy updates in order to avoid race 1687 // conditions: An `etag` is returned in the response to `getIamPolicy`, and 1688 // systems are expected to put that etag in the request to `setIamPolicy` to 1689 // ensure that their change will be applied to the same version of the policy. 1690 // **Important:** If you use IAM Conditions, you must include the `etag` field 1691 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows 1692 // you to overwrite a version `3` policy with a version `1` policy, and all of 1693 // the conditions in the version `3` policy are lost. 1694 Etag string `json:"etag,omitempty"` 1695 // Version: Specifies the format of the policy. Valid values are `0`, `1`, and 1696 // `3`. Requests that specify an invalid value are rejected. Any operation that 1697 // affects conditional role bindings must specify version `3`. This requirement 1698 // applies to the following operations: * Getting a policy that includes a 1699 // conditional role binding * Adding a conditional role binding to a policy * 1700 // Changing a conditional role binding in a policy * Removing any role binding, 1701 // with or without a condition, from a policy that includes conditions 1702 // **Important:** If you use IAM Conditions, you must include the `etag` field 1703 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows 1704 // you to overwrite a version `3` policy with a version `1` policy, and all of 1705 // the conditions in the version `3` policy are lost. If a policy does not 1706 // include any conditions, operations on that policy may specify any valid 1707 // version or leave the field unset. To learn which resources support 1708 // conditions in their IAM policies, see the IAM documentation 1709 // (https://cloud.google.com/iam/help/conditions/resource-policies). 1710 Version int64 `json:"version,omitempty"` 1711 1712 // ServerResponse contains the HTTP response code and headers from the server. 1713 googleapi.ServerResponse `json:"-"` 1714 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to 1715 // unconditionally include in API requests. By default, fields with empty or 1716 // default values are omitted from API requests. See 1717 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1718 // details. 1719 ForceSendFields []string `json:"-"` 1720 // NullFields is a list of field names (e.g. "AuditConfigs") to include in API 1721 // requests with the JSON null value. By default, fields with empty values are 1722 // omitted from API requests. See 1723 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1724 NullFields []string `json:"-"` 1725 } 1726 1727 func (s *Policy) MarshalJSON() ([]byte, error) { 1728 type NoMethod Policy 1729 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1730 } 1731 1732 type PollingOptions struct { 1733 // Diagnostics: An array of diagnostics to be collected by Deployment Manager, 1734 // these diagnostics will be displayed to the user. 1735 Diagnostics []*Diagnostic `json:"diagnostics,omitempty"` 1736 // FailCondition: JsonPath expression that determines if the request failed. 1737 FailCondition string `json:"failCondition,omitempty"` 1738 // FinishCondition: JsonPath expression that determines if the request is 1739 // completed. 1740 FinishCondition string `json:"finishCondition,omitempty"` 1741 // PollingLink: JsonPath expression that evaluates to string, it indicates 1742 // where to poll. 1743 PollingLink string `json:"pollingLink,omitempty"` 1744 // TargetLink: JsonPath expression, after polling is completed, indicates where 1745 // to fetch the resource. 1746 TargetLink string `json:"targetLink,omitempty"` 1747 // ForceSendFields is a list of field names (e.g. "Diagnostics") to 1748 // unconditionally include in API requests. By default, fields with empty or 1749 // default values are omitted from API requests. See 1750 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1751 // details. 1752 ForceSendFields []string `json:"-"` 1753 // NullFields is a list of field names (e.g. "Diagnostics") to include in API 1754 // requests with the JSON null value. By default, fields with empty values are 1755 // omitted from API requests. See 1756 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1757 NullFields []string `json:"-"` 1758 } 1759 1760 func (s *PollingOptions) MarshalJSON() ([]byte, error) { 1761 type NoMethod PollingOptions 1762 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1763 } 1764 1765 type Resource struct { 1766 // AccessControl: The Access Control Policy set on this resource. 1767 AccessControl *ResourceAccessControl `json:"accessControl,omitempty"` 1768 // FinalProperties: Output only. The evaluated properties of the resource with 1769 // references expanded. Returned as serialized YAML. 1770 FinalProperties string `json:"finalProperties,omitempty"` 1771 Id uint64 `json:"id,omitempty,string"` 1772 // InsertTime: Output only. Creation timestamp in RFC3339 text format. 1773 InsertTime string `json:"insertTime,omitempty"` 1774 // LastUsedCredential: Output only. The last used credential that successfully 1775 // created/updated the resource. 1776 LastUsedCredential *Credential `json:"lastUsedCredential,omitempty"` 1777 // Manifest: Output only. URL of the manifest representing the current 1778 // configuration of this resource. 1779 Manifest string `json:"manifest,omitempty"` 1780 // Name: Output only. The name of the resource as it appears in the YAML 1781 // config. 1782 Name string `json:"name,omitempty"` 1783 // Properties: Output only. The current properties of the resource before any 1784 // references have been filled in. Returned as serialized YAML. 1785 Properties string `json:"properties,omitempty"` 1786 // RuntimePolicies: Output only. In case this is an action, it will show the 1787 // runtimePolicies on which this action will run in the deployment 1788 // 1789 // Possible values: 1790 // "CREATE" - The action will only be fired during create. 1791 // "DELETE" - The action will only be fired when the action is removed from 1792 // the deployment. 1793 // "UPDATE_ON_CHANGE" - The action will fire during create, and if there is 1794 // any changes on the inputs. 1795 // "UPDATE_ALWAYS" - The action will fire during create, and every time there 1796 // is an update to the deployment. 1797 RuntimePolicies []string `json:"runtimePolicies,omitempty"` 1798 // Type: Output only. The type of the resource, for example 1799 // `compute.v1.instance`, or `cloudfunctions.v1beta1.function`. 1800 Type string `json:"type,omitempty"` 1801 // Update: Output only. If Deployment Manager is currently updating or 1802 // previewing an update to this resource, the updated configuration appears 1803 // here. 1804 Update *ResourceUpdate `json:"update,omitempty"` 1805 // UpdateTime: Output only. Update timestamp in RFC3339 text format. 1806 UpdateTime string `json:"updateTime,omitempty"` 1807 // Url: Output only. The URL of the actual resource. 1808 Url string `json:"url,omitempty"` 1809 // Warnings: Output only. If warning messages are generated during processing 1810 // of this resource, this field will be populated. 1811 Warnings []*ResourceWarnings `json:"warnings,omitempty"` 1812 1813 // ServerResponse contains the HTTP response code and headers from the server. 1814 googleapi.ServerResponse `json:"-"` 1815 // ForceSendFields is a list of field names (e.g. "AccessControl") to 1816 // unconditionally include in API requests. By default, fields with empty or 1817 // default values are omitted from API requests. See 1818 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1819 // details. 1820 ForceSendFields []string `json:"-"` 1821 // NullFields is a list of field names (e.g. "AccessControl") to include in API 1822 // requests with the JSON null value. By default, fields with empty values are 1823 // omitted from API requests. See 1824 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1825 NullFields []string `json:"-"` 1826 } 1827 1828 func (s *Resource) MarshalJSON() ([]byte, error) { 1829 type NoMethod Resource 1830 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1831 } 1832 1833 type ResourceWarnings struct { 1834 // Code: [Output Only] A warning code, if applicable. For example, Compute 1835 // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 1836 // 1837 // Possible values: 1838 // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. 1839 // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. 1840 // "UNREACHABLE" - A given scope cannot be reached. 1841 // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not 1842 // assigned to an instance on the network. 1843 // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to 1844 // an instance that does not exist. 1845 // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL 1846 // refers to an instance that is not on the same network as the route. 1847 // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip 1848 // forward. 1849 // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a 1850 // status of RUNNING. 1851 // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected 1852 // kernel, which is deprecated. 1853 // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that 1854 // requires a TOS they have not accepted. 1855 // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is 1856 // larger than image size. 1857 // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete 1858 // could not be deleted because they were in use. 1859 // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance 1860 // group manager is valid as such, but its application does not make a lot of 1861 // sense, because it allows only single instance in instance group. 1862 // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue 1863 // the process despite the mentioned error. 1864 // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made 1865 // by a failed operation. 1866 // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been 1867 // overridden. Deprecated unused field. 1868 // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is 1869 // in use. 1870 // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type 1871 // "EXTERNAL_API_WARNING" - Warning that is present in an external api call 1872 // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is 1873 // ignored. 1874 // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are 1875 // present 1876 // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the 1877 // resources has a type marked as experimental 1878 // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources 1879 // has a type marked as deprecated 1880 // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing 1881 // due to errors 1882 // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a 1883 // exceedingly large number of resources 1884 // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance 1885 // URL refers to an instance that does not have an ipv6 interface on the same 1886 // network as the route. 1887 // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend 1888 // service is associated with a health check that is not of type 1889 // HTTP/HTTPS/HTTP2. 1890 // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list 1891 // overhead quota exceed which captures the amount of resources filtered out by 1892 // user-defined list filter. 1893 Code string `json:"code,omitempty"` 1894 // Data: [Output Only] Metadata about this warning in key: value format. For 1895 // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1896 Data []*ResourceWarningsData `json:"data,omitempty"` 1897 // Message: [Output Only] A human-readable description of the warning code. 1898 Message string `json:"message,omitempty"` 1899 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 1900 // include in API requests. By default, fields with empty or default values are 1901 // omitted from API requests. See 1902 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1903 // details. 1904 ForceSendFields []string `json:"-"` 1905 // NullFields is a list of field names (e.g. "Code") to include in API requests 1906 // with the JSON null value. By default, fields with empty values are omitted 1907 // from API requests. See 1908 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1909 NullFields []string `json:"-"` 1910 } 1911 1912 func (s *ResourceWarnings) MarshalJSON() ([]byte, error) { 1913 type NoMethod ResourceWarnings 1914 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1915 } 1916 1917 type ResourceWarningsData struct { 1918 // Key: [Output Only] A key that provides more detail on the warning being 1919 // returned. For example, for warnings where there are no results in a list 1920 // request for a particular zone, this key might be scope and the key value 1921 // might be the zone name. Other examples might be a key indicating a 1922 // deprecated resource and a suggested replacement, or a warning about invalid 1923 // network settings (for example, if an instance attempts to perform IP 1924 // forwarding but is not enabled for IP forwarding). 1925 Key string `json:"key,omitempty"` 1926 // Value: [Output Only] A warning data value corresponding to the key. 1927 Value string `json:"value,omitempty"` 1928 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally 1929 // include in API requests. By default, fields with empty or default values are 1930 // omitted from API requests. See 1931 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1932 // details. 1933 ForceSendFields []string `json:"-"` 1934 // NullFields is a list of field names (e.g. "Key") to include in API requests 1935 // with the JSON null value. By default, fields with empty values are omitted 1936 // from API requests. See 1937 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1938 NullFields []string `json:"-"` 1939 } 1940 1941 func (s *ResourceWarningsData) MarshalJSON() ([]byte, error) { 1942 type NoMethod ResourceWarningsData 1943 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1944 } 1945 1946 // ResourceAccessControl: The access controls set on the resource. 1947 type ResourceAccessControl struct { 1948 // GcpIamPolicy: The GCP IAM Policy to set on the resource. 1949 GcpIamPolicy string `json:"gcpIamPolicy,omitempty"` 1950 // ForceSendFields is a list of field names (e.g. "GcpIamPolicy") to 1951 // unconditionally include in API requests. By default, fields with empty or 1952 // default values are omitted from API requests. See 1953 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1954 // details. 1955 ForceSendFields []string `json:"-"` 1956 // NullFields is a list of field names (e.g. "GcpIamPolicy") to include in API 1957 // requests with the JSON null value. By default, fields with empty values are 1958 // omitted from API requests. See 1959 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1960 NullFields []string `json:"-"` 1961 } 1962 1963 func (s *ResourceAccessControl) MarshalJSON() ([]byte, error) { 1964 type NoMethod ResourceAccessControl 1965 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1966 } 1967 1968 type ResourceUpdate struct { 1969 // AccessControl: The Access Control Policy to set on this resource after 1970 // updating the resource itself. 1971 AccessControl *ResourceAccessControl `json:"accessControl,omitempty"` 1972 // Credential: Output only. The credential that will be used creating/updating 1973 // this resource. 1974 Credential *Credential `json:"credential,omitempty"` 1975 // Error: Output only. If errors are generated during update of the resource, 1976 // this field will be populated. 1977 Error *ResourceUpdateError `json:"error,omitempty"` 1978 // FinalProperties: Output only. The expanded properties of the resource with 1979 // reference values expanded. Returned as serialized YAML. 1980 FinalProperties string `json:"finalProperties,omitempty"` 1981 // Intent: Output only. The intent of the resource: `PREVIEW`, `UPDATE`, or 1982 // `CANCEL`. 1983 // 1984 // Possible values: 1985 // "CREATE_OR_ACQUIRE" - The resource is scheduled to be created, or if it 1986 // already exists, acquired. 1987 // "DELETE" - The resource is scheduled to be deleted. 1988 // "ACQUIRE" - The resource is scheduled to be acquired. 1989 // "UPDATE" - The resource is scheduled to be updated via the UPDATE method. 1990 // "ABANDON" - The resource is scheduled to be abandoned. 1991 // "CREATE" - The resource is scheduled to be created. 1992 Intent string `json:"intent,omitempty"` 1993 // Manifest: Output only. URL of the manifest representing the update 1994 // configuration of this resource. 1995 Manifest string `json:"manifest,omitempty"` 1996 // Properties: Output only. The set of updated properties for this resource, 1997 // before references are expanded. Returned as serialized YAML. 1998 Properties string `json:"properties,omitempty"` 1999 // RuntimePolicies: Output only. In case this is an action, it will show the 2000 // runtimePolicies that this action will have after updating the deployment. 2001 // 2002 // Possible values: 2003 // "CREATE" - The action will only be fired during create. 2004 // "DELETE" - The action will only be fired when the action is removed from 2005 // the deployment. 2006 // "UPDATE_ON_CHANGE" - The action will fire during create, and if there is 2007 // any changes on the inputs. 2008 // "UPDATE_ALWAYS" - The action will fire during create, and every time there 2009 // is an update to the deployment. 2010 RuntimePolicies []string `json:"runtimePolicies,omitempty"` 2011 // State: Output only. The state of the resource. 2012 // 2013 // Possible values: 2014 // "PENDING" - There are changes pending for this resource. 2015 // "IN_PROGRESS" - The service is executing changes on the resource. 2016 // "IN_PREVIEW" - The service is previewing changes on the resource. 2017 // "FAILED" - The service has failed to change the resource. 2018 // "ABORTED" - The service has aborted trying to change the resource. 2019 State string `json:"state,omitempty"` 2020 // Warnings: Output only. If warning messages are generated during processing 2021 // of this resource, this field will be populated. 2022 Warnings []*ResourceUpdateWarnings `json:"warnings,omitempty"` 2023 // ForceSendFields is a list of field names (e.g. "AccessControl") to 2024 // unconditionally include in API requests. By default, fields with empty or 2025 // default values are omitted from API requests. See 2026 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2027 // details. 2028 ForceSendFields []string `json:"-"` 2029 // NullFields is a list of field names (e.g. "AccessControl") to include in API 2030 // requests with the JSON null value. By default, fields with empty values are 2031 // omitted from API requests. See 2032 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2033 NullFields []string `json:"-"` 2034 } 2035 2036 func (s *ResourceUpdate) MarshalJSON() ([]byte, error) { 2037 type NoMethod ResourceUpdate 2038 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2039 } 2040 2041 // ResourceUpdateError: Output only. If errors are generated during update of 2042 // the resource, this field will be populated. 2043 type ResourceUpdateError struct { 2044 // Errors: [Output Only] The array of errors encountered while processing this 2045 // operation. 2046 Errors []*ResourceUpdateErrorErrors `json:"errors,omitempty"` 2047 // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally 2048 // include in API requests. By default, fields with empty or default values are 2049 // omitted from API requests. See 2050 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2051 // details. 2052 ForceSendFields []string `json:"-"` 2053 // NullFields is a list of field names (e.g. "Errors") to include in API 2054 // requests with the JSON null value. By default, fields with empty values are 2055 // omitted from API requests. See 2056 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2057 NullFields []string `json:"-"` 2058 } 2059 2060 func (s *ResourceUpdateError) MarshalJSON() ([]byte, error) { 2061 type NoMethod ResourceUpdateError 2062 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2063 } 2064 2065 type ResourceUpdateErrorErrors struct { 2066 // Code: [Output Only] The error type identifier for this error. 2067 Code string `json:"code,omitempty"` 2068 // Location: [Output Only] Indicates the field in the request that caused the 2069 // error. This property is optional. 2070 Location string `json:"location,omitempty"` 2071 // Message: [Output Only] An optional, human-readable error message. 2072 Message string `json:"message,omitempty"` 2073 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 2074 // include in API requests. By default, fields with empty or default values are 2075 // omitted from API requests. See 2076 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2077 // details. 2078 ForceSendFields []string `json:"-"` 2079 // NullFields is a list of field names (e.g. "Code") to include in API requests 2080 // with the JSON null value. By default, fields with empty values are omitted 2081 // from API requests. See 2082 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2083 NullFields []string `json:"-"` 2084 } 2085 2086 func (s *ResourceUpdateErrorErrors) MarshalJSON() ([]byte, error) { 2087 type NoMethod ResourceUpdateErrorErrors 2088 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2089 } 2090 2091 type ResourceUpdateWarnings struct { 2092 // Code: [Output Only] A warning code, if applicable. For example, Compute 2093 // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 2094 // 2095 // Possible values: 2096 // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. 2097 // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. 2098 // "UNREACHABLE" - A given scope cannot be reached. 2099 // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not 2100 // assigned to an instance on the network. 2101 // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to 2102 // an instance that does not exist. 2103 // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL 2104 // refers to an instance that is not on the same network as the route. 2105 // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip 2106 // forward. 2107 // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a 2108 // status of RUNNING. 2109 // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected 2110 // kernel, which is deprecated. 2111 // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that 2112 // requires a TOS they have not accepted. 2113 // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is 2114 // larger than image size. 2115 // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete 2116 // could not be deleted because they were in use. 2117 // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance 2118 // group manager is valid as such, but its application does not make a lot of 2119 // sense, because it allows only single instance in instance group. 2120 // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue 2121 // the process despite the mentioned error. 2122 // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made 2123 // by a failed operation. 2124 // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been 2125 // overridden. Deprecated unused field. 2126 // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is 2127 // in use. 2128 // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type 2129 // "EXTERNAL_API_WARNING" - Warning that is present in an external api call 2130 // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is 2131 // ignored. 2132 // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are 2133 // present 2134 // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the 2135 // resources has a type marked as experimental 2136 // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources 2137 // has a type marked as deprecated 2138 // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing 2139 // due to errors 2140 // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a 2141 // exceedingly large number of resources 2142 // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance 2143 // URL refers to an instance that does not have an ipv6 interface on the same 2144 // network as the route. 2145 // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend 2146 // service is associated with a health check that is not of type 2147 // HTTP/HTTPS/HTTP2. 2148 // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list 2149 // overhead quota exceed which captures the amount of resources filtered out by 2150 // user-defined list filter. 2151 Code string `json:"code,omitempty"` 2152 // Data: [Output Only] Metadata about this warning in key: value format. For 2153 // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 2154 Data []*ResourceUpdateWarningsData `json:"data,omitempty"` 2155 // Message: [Output Only] A human-readable description of the warning code. 2156 Message string `json:"message,omitempty"` 2157 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 2158 // include in API requests. By default, fields with empty or default values are 2159 // omitted from API requests. See 2160 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2161 // details. 2162 ForceSendFields []string `json:"-"` 2163 // NullFields is a list of field names (e.g. "Code") to include in API requests 2164 // with the JSON null value. By default, fields with empty values are omitted 2165 // from API requests. See 2166 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2167 NullFields []string `json:"-"` 2168 } 2169 2170 func (s *ResourceUpdateWarnings) MarshalJSON() ([]byte, error) { 2171 type NoMethod ResourceUpdateWarnings 2172 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2173 } 2174 2175 type ResourceUpdateWarningsData struct { 2176 // Key: [Output Only] A key that provides more detail on the warning being 2177 // returned. For example, for warnings where there are no results in a list 2178 // request for a particular zone, this key might be scope and the key value 2179 // might be the zone name. Other examples might be a key indicating a 2180 // deprecated resource and a suggested replacement, or a warning about invalid 2181 // network settings (for example, if an instance attempts to perform IP 2182 // forwarding but is not enabled for IP forwarding). 2183 Key string `json:"key,omitempty"` 2184 // Value: [Output Only] A warning data value corresponding to the key. 2185 Value string `json:"value,omitempty"` 2186 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally 2187 // include in API requests. By default, fields with empty or default values are 2188 // omitted from API requests. See 2189 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2190 // details. 2191 ForceSendFields []string `json:"-"` 2192 // NullFields is a list of field names (e.g. "Key") to include in API requests 2193 // with the JSON null value. By default, fields with empty values are omitted 2194 // from API requests. See 2195 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2196 NullFields []string `json:"-"` 2197 } 2198 2199 func (s *ResourceUpdateWarningsData) MarshalJSON() ([]byte, error) { 2200 type NoMethod ResourceUpdateWarningsData 2201 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2202 } 2203 2204 // ResourcesListResponse: A response containing a partial list of resources and 2205 // a page token used to build the next request if the request has been 2206 // truncated. 2207 type ResourcesListResponse struct { 2208 // NextPageToken: A token used to continue a truncated list request. 2209 NextPageToken string `json:"nextPageToken,omitempty"` 2210 // Resources: Resources contained in this list response. 2211 Resources []*Resource `json:"resources,omitempty"` 2212 2213 // ServerResponse contains the HTTP response code and headers from the server. 2214 googleapi.ServerResponse `json:"-"` 2215 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2216 // unconditionally include in API requests. By default, fields with empty or 2217 // default values are omitted from API requests. See 2218 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2219 // details. 2220 ForceSendFields []string `json:"-"` 2221 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 2222 // requests with the JSON null value. By default, fields with empty values are 2223 // omitted from API requests. See 2224 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2225 NullFields []string `json:"-"` 2226 } 2227 2228 func (s *ResourcesListResponse) MarshalJSON() ([]byte, error) { 2229 type NoMethod ResourcesListResponse 2230 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2231 } 2232 2233 // ServiceAccount: Service Account used as a credential. 2234 type ServiceAccount struct { 2235 // Email: The IAM service account email address like 2236 // test@myproject.iam.gserviceaccount.com 2237 Email string `json:"email,omitempty"` 2238 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally 2239 // include in API requests. By default, fields with empty or default values are 2240 // omitted from API requests. See 2241 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2242 // details. 2243 ForceSendFields []string `json:"-"` 2244 // NullFields is a list of field names (e.g. "Email") to include in API 2245 // requests with the JSON null value. By default, fields with empty values are 2246 // omitted from API requests. See 2247 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2248 NullFields []string `json:"-"` 2249 } 2250 2251 func (s *ServiceAccount) MarshalJSON() ([]byte, error) { 2252 type NoMethod ServiceAccount 2253 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2254 } 2255 2256 type SetCommonInstanceMetadataOperationMetadata struct { 2257 // ClientOperationId: [Output Only] The client operation id. 2258 ClientOperationId string `json:"clientOperationId,omitempty"` 2259 // PerLocationOperations: [Output Only] Status information per location 2260 // (location name is key). Example key: zones/us-central1-a 2261 PerLocationOperations map[string]SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo `json:"perLocationOperations,omitempty"` 2262 // ForceSendFields is a list of field names (e.g. "ClientOperationId") to 2263 // unconditionally include in API requests. By default, fields with empty or 2264 // default values are omitted from API requests. See 2265 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2266 // details. 2267 ForceSendFields []string `json:"-"` 2268 // NullFields is a list of field names (e.g. "ClientOperationId") to include in 2269 // API requests with the JSON null value. By default, fields with empty values 2270 // are omitted from API requests. See 2271 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2272 NullFields []string `json:"-"` 2273 } 2274 2275 func (s *SetCommonInstanceMetadataOperationMetadata) MarshalJSON() ([]byte, error) { 2276 type NoMethod SetCommonInstanceMetadataOperationMetadata 2277 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2278 } 2279 2280 type SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo struct { 2281 // Error: [Output Only] If state is `ABANDONED` or `FAILED`, this field is 2282 // populated. 2283 Error *Status `json:"error,omitempty"` 2284 // State: [Output Only] Status of the action, which can be one of the 2285 // following: `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`. 2286 // 2287 // Possible values: 2288 // "UNSPECIFIED" 2289 // "PROPAGATING" - Operation is not yet confirmed to have been created in the 2290 // location. 2291 // "PROPAGATED" - Operation is confirmed to be in the location. 2292 // "ABANDONED" - Operation not tracked in this location e.g. zone is marked 2293 // as DOWN. 2294 // "FAILED" - Operation is in an error state. 2295 // "DONE" - Operation has completed successfully. 2296 State string `json:"state,omitempty"` 2297 // ForceSendFields is a list of field names (e.g. "Error") to unconditionally 2298 // include in API requests. By default, fields with empty or default values are 2299 // omitted from API requests. See 2300 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2301 // details. 2302 ForceSendFields []string `json:"-"` 2303 // NullFields is a list of field names (e.g. "Error") to include in API 2304 // requests with the JSON null value. By default, fields with empty values are 2305 // omitted from API requests. See 2306 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2307 NullFields []string `json:"-"` 2308 } 2309 2310 func (s *SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo) MarshalJSON() ([]byte, error) { 2311 type NoMethod SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo 2312 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2313 } 2314 2315 // Status: The `Status` type defines a logical error model that is suitable for 2316 // different programming environments, including REST APIs and RPC APIs. It is 2317 // used by gRPC (https://github.com/grpc). Each `Status` message contains three 2318 // pieces of data: error code, error message, and error details. You can find 2319 // out more about this error model and how to work with it in the API Design 2320 // Guide (https://cloud.google.com/apis/design/errors). 2321 type Status struct { 2322 // Code: The status code, which should be an enum value of google.rpc.Code. 2323 Code int64 `json:"code,omitempty"` 2324 // Details: A list of messages that carry the error details. There is a common 2325 // set of message types for APIs to use. 2326 Details []googleapi.RawMessage `json:"details,omitempty"` 2327 // Message: A developer-facing error message, which should be in English. Any 2328 // user-facing error message should be localized and sent in the 2329 // google.rpc.Status.details field, or localized by the client. 2330 Message string `json:"message,omitempty"` 2331 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 2332 // include in API requests. By default, fields with empty or default values are 2333 // omitted from API requests. See 2334 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2335 // details. 2336 ForceSendFields []string `json:"-"` 2337 // NullFields is a list of field names (e.g. "Code") to include in API requests 2338 // with the JSON null value. By default, fields with empty values are omitted 2339 // from API requests. See 2340 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2341 NullFields []string `json:"-"` 2342 } 2343 2344 func (s *Status) MarshalJSON() ([]byte, error) { 2345 type NoMethod Status 2346 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2347 } 2348 2349 type TargetConfiguration struct { 2350 // Config: The configuration to use for this deployment. 2351 Config *ConfigFile `json:"config,omitempty"` 2352 // Imports: Specifies any files to import for this configuration. This can be 2353 // used to import templates or other files. For example, you might import a 2354 // text file in order to use the file in a template. 2355 Imports []*ImportFile `json:"imports,omitempty"` 2356 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally 2357 // include in API requests. By default, fields with empty or default values are 2358 // omitted from API requests. See 2359 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2360 // details. 2361 ForceSendFields []string `json:"-"` 2362 // NullFields is a list of field names (e.g. "Config") to include in API 2363 // requests with the JSON null value. By default, fields with empty values are 2364 // omitted from API requests. See 2365 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2366 NullFields []string `json:"-"` 2367 } 2368 2369 func (s *TargetConfiguration) MarshalJSON() ([]byte, error) { 2370 type NoMethod TargetConfiguration 2371 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2372 } 2373 2374 // TemplateContents: Files that make up the template contents of a template 2375 // type. 2376 type TemplateContents struct { 2377 // Imports: Import files referenced by the main template. 2378 Imports []*ImportFile `json:"imports,omitempty"` 2379 // Interpreter: Which interpreter (python or jinja) should be used during 2380 // expansion. 2381 // 2382 // Possible values: 2383 // "UNKNOWN_INTERPRETER" 2384 // "PYTHON" 2385 // "JINJA" 2386 Interpreter string `json:"interpreter,omitempty"` 2387 // MainTemplate: The filename of the mainTemplate 2388 MainTemplate string `json:"mainTemplate,omitempty"` 2389 // Schema: The contents of the template schema. 2390 Schema string `json:"schema,omitempty"` 2391 // Template: The contents of the main template file. 2392 Template string `json:"template,omitempty"` 2393 // ForceSendFields is a list of field names (e.g. "Imports") to unconditionally 2394 // include in API requests. By default, fields with empty or default values are 2395 // omitted from API requests. See 2396 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2397 // details. 2398 ForceSendFields []string `json:"-"` 2399 // NullFields is a list of field names (e.g. "Imports") to include in API 2400 // requests with the JSON null value. By default, fields with empty values are 2401 // omitted from API requests. See 2402 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2403 NullFields []string `json:"-"` 2404 } 2405 2406 func (s *TemplateContents) MarshalJSON() ([]byte, error) { 2407 type NoMethod TemplateContents 2408 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2409 } 2410 2411 type TestPermissionsRequest struct { 2412 // Permissions: The set of permissions to check for the 'resource'. Permissions 2413 // with wildcards (such as '*' or 'storage.*') are not allowed. 2414 Permissions []string `json:"permissions,omitempty"` 2415 // ForceSendFields is a list of field names (e.g. "Permissions") to 2416 // unconditionally include in API requests. By default, fields with empty or 2417 // default values are omitted from API requests. See 2418 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2419 // details. 2420 ForceSendFields []string `json:"-"` 2421 // NullFields is a list of field names (e.g. "Permissions") to include in API 2422 // requests with the JSON null value. By default, fields with empty values are 2423 // omitted from API requests. See 2424 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2425 NullFields []string `json:"-"` 2426 } 2427 2428 func (s *TestPermissionsRequest) MarshalJSON() ([]byte, error) { 2429 type NoMethod TestPermissionsRequest 2430 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2431 } 2432 2433 type TestPermissionsResponse struct { 2434 // Permissions: A subset of `TestPermissionsRequest.permissions` that the 2435 // caller is allowed. 2436 Permissions []string `json:"permissions,omitempty"` 2437 2438 // ServerResponse contains the HTTP response code and headers from the server. 2439 googleapi.ServerResponse `json:"-"` 2440 // ForceSendFields is a list of field names (e.g. "Permissions") to 2441 // unconditionally include in API requests. By default, fields with empty or 2442 // default values are omitted from API requests. See 2443 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2444 // details. 2445 ForceSendFields []string `json:"-"` 2446 // NullFields is a list of field names (e.g. "Permissions") to include in API 2447 // requests with the JSON null value. By default, fields with empty values are 2448 // omitted from API requests. See 2449 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2450 NullFields []string `json:"-"` 2451 } 2452 2453 func (s *TestPermissionsResponse) MarshalJSON() ([]byte, error) { 2454 type NoMethod TestPermissionsResponse 2455 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2456 } 2457 2458 // Type: A resource type supported by Deployment Manager. 2459 type Type struct { 2460 // Base: Base Type (configurable service) that backs this Type. 2461 Base *BaseType `json:"base,omitempty"` 2462 // Description: An optional textual description of the resource; provided by 2463 // the client when the resource is created. 2464 Description string `json:"description,omitempty"` 2465 Id uint64 `json:"id,omitempty,string"` 2466 // InsertTime: Output only. Creation timestamp in RFC3339 text format. 2467 InsertTime string `json:"insertTime,omitempty"` 2468 // Labels: Map of One Platform labels; provided by the client when the resource 2469 // is created or updated. Specifically: Label keys must be between 1 and 63 2470 // characters long and must conform to the following regular expression: `a-z 2471 // ([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long 2472 // and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. 2473 Labels []*TypeLabelEntry `json:"labels,omitempty"` 2474 // Name: Name of the type. 2475 Name string `json:"name,omitempty"` 2476 // Operation: Output only. The Operation that most recently ran, or is 2477 // currently running, on this type. 2478 Operation *Operation `json:"operation,omitempty"` 2479 // SelfLink: Output only. Server defined URL for the resource. 2480 SelfLink string `json:"selfLink,omitempty"` 2481 2482 // ServerResponse contains the HTTP response code and headers from the server. 2483 googleapi.ServerResponse `json:"-"` 2484 // ForceSendFields is a list of field names (e.g. "Base") to unconditionally 2485 // include in API requests. By default, fields with empty or default values are 2486 // omitted from API requests. See 2487 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2488 // details. 2489 ForceSendFields []string `json:"-"` 2490 // NullFields is a list of field names (e.g. "Base") to include in API requests 2491 // with the JSON null value. By default, fields with empty values are omitted 2492 // from API requests. See 2493 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2494 NullFields []string `json:"-"` 2495 } 2496 2497 func (s *Type) MarshalJSON() ([]byte, error) { 2498 type NoMethod Type 2499 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2500 } 2501 2502 // TypeInfo: Type Information. Contains detailed information about a composite 2503 // type, base type, or base type with specific collection. 2504 type TypeInfo struct { 2505 // Description: The description of the type. 2506 Description string `json:"description,omitempty"` 2507 // DocumentationLink: For swagger 2.0 externalDocs field will be used. For 2508 // swagger 1.2 this field will be empty. 2509 DocumentationLink string `json:"documentationLink,omitempty"` 2510 // Kind: Output only. Type of the output. Always `deploymentManager#TypeInfo` 2511 // for TypeInfo. 2512 Kind string `json:"kind,omitempty"` 2513 // Name: The base type or composite type name. 2514 Name string `json:"name,omitempty"` 2515 // Schema: For base types with a collection, we return a schema and 2516 // documentation link For template types, we return only a schema 2517 Schema *TypeInfoSchemaInfo `json:"schema,omitempty"` 2518 // SelfLink: Output only. Self link for the type provider. 2519 SelfLink string `json:"selfLink,omitempty"` 2520 // Title: The title on the API descriptor URL provided. 2521 Title string `json:"title,omitempty"` 2522 2523 // ServerResponse contains the HTTP response code and headers from the server. 2524 googleapi.ServerResponse `json:"-"` 2525 // ForceSendFields is a list of field names (e.g. "Description") to 2526 // unconditionally include in API requests. By default, fields with empty or 2527 // default values are omitted from API requests. See 2528 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2529 // details. 2530 ForceSendFields []string `json:"-"` 2531 // NullFields is a list of field names (e.g. "Description") to include in API 2532 // requests with the JSON null value. By default, fields with empty values are 2533 // omitted from API requests. See 2534 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2535 NullFields []string `json:"-"` 2536 } 2537 2538 func (s *TypeInfo) MarshalJSON() ([]byte, error) { 2539 type NoMethod TypeInfo 2540 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2541 } 2542 2543 type TypeInfoSchemaInfo struct { 2544 // Input: The properties that this composite type or base type collection 2545 // accept as input, represented as a json blob, format is: JSON Schema Draft V4 2546 Input string `json:"input,omitempty"` 2547 // Output: The properties that this composite type or base type collection 2548 // exposes as output, these properties can be used for references, represented 2549 // as json blob, format is: JSON Schema Draft V4 2550 Output string `json:"output,omitempty"` 2551 // ForceSendFields is a list of field names (e.g. "Input") to unconditionally 2552 // include in API requests. By default, fields with empty or default values are 2553 // omitted from API requests. See 2554 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2555 // details. 2556 ForceSendFields []string `json:"-"` 2557 // NullFields is a list of field names (e.g. "Input") to include in API 2558 // requests with the JSON null value. By default, fields with empty values are 2559 // omitted from API requests. See 2560 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2561 NullFields []string `json:"-"` 2562 } 2563 2564 func (s *TypeInfoSchemaInfo) MarshalJSON() ([]byte, error) { 2565 type NoMethod TypeInfoSchemaInfo 2566 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2567 } 2568 2569 // TypeLabelEntry: Label object for Types 2570 type TypeLabelEntry struct { 2571 // Key: Key of the label 2572 Key string `json:"key,omitempty"` 2573 // Value: Value of the label 2574 Value string `json:"value,omitempty"` 2575 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally 2576 // include in API requests. By default, fields with empty or default values are 2577 // omitted from API requests. See 2578 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2579 // details. 2580 ForceSendFields []string `json:"-"` 2581 // NullFields is a list of field names (e.g. "Key") to include in API requests 2582 // with the JSON null value. By default, fields with empty values are omitted 2583 // from API requests. See 2584 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2585 NullFields []string `json:"-"` 2586 } 2587 2588 func (s *TypeLabelEntry) MarshalJSON() ([]byte, error) { 2589 type NoMethod TypeLabelEntry 2590 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2591 } 2592 2593 // TypeProvider: A type provider that describes a service-backed Type. 2594 type TypeProvider struct { 2595 // CollectionOverrides: Allows resource handling overrides for specific 2596 // collections 2597 CollectionOverrides []*CollectionOverride `json:"collectionOverrides,omitempty"` 2598 // Credential: Credential used when interacting with this type. 2599 Credential *Credential `json:"credential,omitempty"` 2600 // CustomCertificateAuthorityRoots: List of up to 2 custom certificate 2601 // authority roots to use for TLS authentication when making calls on behalf of 2602 // this type provider. If set, TLS authentication will exclusively use these 2603 // roots instead of relying on publicly trusted certificate authorities when 2604 // validating TLS certificate authenticity. The certificates must be in 2605 // base64-encoded PEM format. The maximum size of each certificate must not 2606 // exceed 10KB. 2607 CustomCertificateAuthorityRoots []string `json:"customCertificateAuthorityRoots,omitempty"` 2608 // Description: An optional textual description of the resource; provided by 2609 // the client when the resource is created. 2610 Description string `json:"description,omitempty"` 2611 // DescriptorUrl: Descriptor Url for the this type provider. 2612 DescriptorUrl string `json:"descriptorUrl,omitempty"` 2613 // Id: Output only. Unique identifier for the resource defined by the server. 2614 Id uint64 `json:"id,omitempty,string"` 2615 // InsertTime: Output only. Creation timestamp in RFC3339 text format. 2616 InsertTime string `json:"insertTime,omitempty"` 2617 // Labels: Map of One Platform labels; provided by the client when the resource 2618 // is created or updated. Specifically: Label keys must be between 1 and 63 2619 // characters long and must conform to the following regular expression: `a-z 2620 // ([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long 2621 // and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?` 2622 Labels []*TypeProviderLabelEntry `json:"labels,omitempty"` 2623 // Name: Name of the resource; provided by the client when the resource is 2624 // created. The name must be 1-63 characters long, and comply with RFC1035. 2625 // Specifically, the name must be 1-63 characters long and match the regular 2626 // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must 2627 // be a lowercase letter, and all following characters must be a dash, 2628 // lowercase letter, or digit, except the last character, which cannot be a 2629 // dash. 2630 Name string `json:"name,omitempty"` 2631 // Operation: Output only. The Operation that most recently ran, or is 2632 // currently running, on this type provider. 2633 Operation *Operation `json:"operation,omitempty"` 2634 // Options: Options to apply when handling any resources in this service. 2635 Options *Options `json:"options,omitempty"` 2636 // SelfLink: Output only. Self link for the type provider. 2637 SelfLink string `json:"selfLink,omitempty"` 2638 2639 // ServerResponse contains the HTTP response code and headers from the server. 2640 googleapi.ServerResponse `json:"-"` 2641 // ForceSendFields is a list of field names (e.g. "CollectionOverrides") to 2642 // unconditionally include in API requests. By default, fields with empty or 2643 // default values are omitted from API requests. See 2644 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2645 // details. 2646 ForceSendFields []string `json:"-"` 2647 // NullFields is a list of field names (e.g. "CollectionOverrides") to include 2648 // in API requests with the JSON null value. By default, fields with empty 2649 // values are omitted from API requests. See 2650 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2651 NullFields []string `json:"-"` 2652 } 2653 2654 func (s *TypeProvider) MarshalJSON() ([]byte, error) { 2655 type NoMethod TypeProvider 2656 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2657 } 2658 2659 // TypeProviderLabelEntry: Label object for TypeProviders 2660 type TypeProviderLabelEntry struct { 2661 // Key: Key of the label 2662 Key string `json:"key,omitempty"` 2663 // Value: Value of the label 2664 Value string `json:"value,omitempty"` 2665 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally 2666 // include in API requests. By default, fields with empty or default values are 2667 // omitted from API requests. See 2668 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2669 // details. 2670 ForceSendFields []string `json:"-"` 2671 // NullFields is a list of field names (e.g. "Key") to include in API requests 2672 // with the JSON null value. By default, fields with empty values are omitted 2673 // from API requests. See 2674 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2675 NullFields []string `json:"-"` 2676 } 2677 2678 func (s *TypeProviderLabelEntry) MarshalJSON() ([]byte, error) { 2679 type NoMethod TypeProviderLabelEntry 2680 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2681 } 2682 2683 // TypeProvidersListResponse: A response that returns all Type Providers 2684 // supported by Deployment Manager 2685 type TypeProvidersListResponse struct { 2686 // NextPageToken: A token used to continue a truncated list request. 2687 NextPageToken string `json:"nextPageToken,omitempty"` 2688 // TypeProviders: Output only. A list of resource type providers supported by 2689 // Deployment Manager. 2690 TypeProviders []*TypeProvider `json:"typeProviders,omitempty"` 2691 2692 // ServerResponse contains the HTTP response code and headers from the server. 2693 googleapi.ServerResponse `json:"-"` 2694 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2695 // unconditionally include in API requests. By default, fields with empty or 2696 // default values are omitted from API requests. See 2697 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2698 // details. 2699 ForceSendFields []string `json:"-"` 2700 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 2701 // requests with the JSON null value. By default, fields with empty values are 2702 // omitted from API requests. See 2703 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2704 NullFields []string `json:"-"` 2705 } 2706 2707 func (s *TypeProvidersListResponse) MarshalJSON() ([]byte, error) { 2708 type NoMethod TypeProvidersListResponse 2709 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2710 } 2711 2712 type TypeProvidersListTypesResponse struct { 2713 // NextPageToken: A token used to continue a truncated list request. 2714 NextPageToken string `json:"nextPageToken,omitempty"` 2715 // Types: Output only. A list of resource type info. 2716 Types []*TypeInfo `json:"types,omitempty"` 2717 2718 // ServerResponse contains the HTTP response code and headers from the server. 2719 googleapi.ServerResponse `json:"-"` 2720 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2721 // unconditionally include in API requests. By default, fields with empty or 2722 // default values are omitted from API requests. See 2723 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2724 // details. 2725 ForceSendFields []string `json:"-"` 2726 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 2727 // requests with the JSON null value. By default, fields with empty values are 2728 // omitted from API requests. See 2729 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2730 NullFields []string `json:"-"` 2731 } 2732 2733 func (s *TypeProvidersListTypesResponse) MarshalJSON() ([]byte, error) { 2734 type NoMethod TypeProvidersListTypesResponse 2735 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2736 } 2737 2738 // TypesListResponse: A response that returns all Types supported by Deployment 2739 // Manager 2740 type TypesListResponse struct { 2741 // NextPageToken: A token used to continue a truncated list request. 2742 NextPageToken string `json:"nextPageToken,omitempty"` 2743 // Types: Output only. A list of resource types supported by Deployment 2744 // Manager. 2745 Types []*Type `json:"types,omitempty"` 2746 2747 // ServerResponse contains the HTTP response code and headers from the server. 2748 googleapi.ServerResponse `json:"-"` 2749 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2750 // unconditionally include in API requests. By default, fields with empty or 2751 // default values are omitted from API requests. See 2752 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2753 // details. 2754 ForceSendFields []string `json:"-"` 2755 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 2756 // requests with the JSON null value. By default, fields with empty values are 2757 // omitted from API requests. See 2758 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2759 NullFields []string `json:"-"` 2760 } 2761 2762 func (s *TypesListResponse) MarshalJSON() ([]byte, error) { 2763 type NoMethod TypesListResponse 2764 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2765 } 2766 2767 // ValidationOptions: Options for how to validate and process properties on a 2768 // resource. 2769 type ValidationOptions struct { 2770 // SchemaValidation: Customize how deployment manager will validate the 2771 // resource against schema errors. 2772 // 2773 // Possible values: 2774 // "UNKNOWN" 2775 // "IGNORE" - Ignore schema failures. 2776 // "IGNORE_WITH_WARNINGS" - Ignore schema failures but display them as 2777 // warnings. 2778 // "FAIL" - Fail the resource if the schema is not valid, this is the default 2779 // behavior. 2780 SchemaValidation string `json:"schemaValidation,omitempty"` 2781 // UndeclaredProperties: Specify what to do with extra properties when 2782 // executing a request. 2783 // 2784 // Possible values: 2785 // "UNKNOWN" 2786 // "INCLUDE" - Always include even if not present on discovery doc. 2787 // "IGNORE" - Always ignore if not present on discovery doc. 2788 // "INCLUDE_WITH_WARNINGS" - Include on request, but emit a warning. 2789 // "IGNORE_WITH_WARNINGS" - Ignore properties, but emit a warning. 2790 // "FAIL" - Always fail if undeclared properties are present. 2791 UndeclaredProperties string `json:"undeclaredProperties,omitempty"` 2792 // ForceSendFields is a list of field names (e.g. "SchemaValidation") to 2793 // unconditionally include in API requests. By default, fields with empty or 2794 // default values are omitted from API requests. See 2795 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2796 // details. 2797 ForceSendFields []string `json:"-"` 2798 // NullFields is a list of field names (e.g. "SchemaValidation") to include in 2799 // API requests with the JSON null value. By default, fields with empty values 2800 // are omitted from API requests. See 2801 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2802 NullFields []string `json:"-"` 2803 } 2804 2805 func (s *ValidationOptions) MarshalJSON() ([]byte, error) { 2806 type NoMethod ValidationOptions 2807 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2808 } 2809 2810 type CompositeTypesDeleteCall struct { 2811 s *Service 2812 project string 2813 compositeType string 2814 urlParams_ gensupport.URLParams 2815 ctx_ context.Context 2816 header_ http.Header 2817 } 2818 2819 // Delete: Deletes a composite type. 2820 // 2821 // - compositeType: The name of the type for this request. 2822 // - project: The project ID for this request. 2823 func (r *CompositeTypesService) Delete(project string, compositeType string) *CompositeTypesDeleteCall { 2824 c := &CompositeTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2825 c.project = project 2826 c.compositeType = compositeType 2827 return c 2828 } 2829 2830 // Fields allows partial responses to be retrieved. See 2831 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2832 // details. 2833 func (c *CompositeTypesDeleteCall) Fields(s ...googleapi.Field) *CompositeTypesDeleteCall { 2834 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2835 return c 2836 } 2837 2838 // Context sets the context to be used in this call's Do method. 2839 func (c *CompositeTypesDeleteCall) Context(ctx context.Context) *CompositeTypesDeleteCall { 2840 c.ctx_ = ctx 2841 return c 2842 } 2843 2844 // Header returns a http.Header that can be modified by the caller to add 2845 // headers to the request. 2846 func (c *CompositeTypesDeleteCall) Header() http.Header { 2847 if c.header_ == nil { 2848 c.header_ = make(http.Header) 2849 } 2850 return c.header_ 2851 } 2852 2853 func (c *CompositeTypesDeleteCall) doRequest(alt string) (*http.Response, error) { 2854 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 2855 var body io.Reader = nil 2856 c.urlParams_.Set("alt", alt) 2857 c.urlParams_.Set("prettyPrint", "false") 2858 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/compositeTypes/{compositeType}") 2859 urls += "?" + c.urlParams_.Encode() 2860 req, err := http.NewRequest("DELETE", urls, body) 2861 if err != nil { 2862 return nil, err 2863 } 2864 req.Header = reqHeaders 2865 googleapi.Expand(req.URL, map[string]string{ 2866 "project": c.project, 2867 "compositeType": c.compositeType, 2868 }) 2869 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2870 } 2871 2872 // Do executes the "deploymentmanager.compositeTypes.delete" call. 2873 // Any non-2xx status code is an error. Response headers are in either 2874 // *Operation.ServerResponse.Header or (if a response was returned at all) in 2875 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2876 // whether the returned error was because http.StatusNotModified was returned. 2877 func (c *CompositeTypesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 2878 gensupport.SetOptions(c.urlParams_, opts...) 2879 res, err := c.doRequest("json") 2880 if res != nil && res.StatusCode == http.StatusNotModified { 2881 if res.Body != nil { 2882 res.Body.Close() 2883 } 2884 return nil, gensupport.WrapError(&googleapi.Error{ 2885 Code: res.StatusCode, 2886 Header: res.Header, 2887 }) 2888 } 2889 if err != nil { 2890 return nil, err 2891 } 2892 defer googleapi.CloseBody(res) 2893 if err := googleapi.CheckResponse(res); err != nil { 2894 return nil, gensupport.WrapError(err) 2895 } 2896 ret := &Operation{ 2897 ServerResponse: googleapi.ServerResponse{ 2898 Header: res.Header, 2899 HTTPStatusCode: res.StatusCode, 2900 }, 2901 } 2902 target := &ret 2903 if err := gensupport.DecodeResponse(target, res); err != nil { 2904 return nil, err 2905 } 2906 return ret, nil 2907 } 2908 2909 type CompositeTypesGetCall struct { 2910 s *Service 2911 project string 2912 compositeType string 2913 urlParams_ gensupport.URLParams 2914 ifNoneMatch_ string 2915 ctx_ context.Context 2916 header_ http.Header 2917 } 2918 2919 // Get: Gets information about a specific composite type. 2920 // 2921 // - compositeType: The name of the composite type for this request. 2922 // - project: The project ID for this request. 2923 func (r *CompositeTypesService) Get(project string, compositeType string) *CompositeTypesGetCall { 2924 c := &CompositeTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2925 c.project = project 2926 c.compositeType = compositeType 2927 return c 2928 } 2929 2930 // Fields allows partial responses to be retrieved. See 2931 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2932 // details. 2933 func (c *CompositeTypesGetCall) Fields(s ...googleapi.Field) *CompositeTypesGetCall { 2934 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2935 return c 2936 } 2937 2938 // IfNoneMatch sets an optional parameter which makes the operation fail if the 2939 // object's ETag matches the given value. This is useful for getting updates 2940 // only after the object has changed since the last request. 2941 func (c *CompositeTypesGetCall) IfNoneMatch(entityTag string) *CompositeTypesGetCall { 2942 c.ifNoneMatch_ = entityTag 2943 return c 2944 } 2945 2946 // Context sets the context to be used in this call's Do method. 2947 func (c *CompositeTypesGetCall) Context(ctx context.Context) *CompositeTypesGetCall { 2948 c.ctx_ = ctx 2949 return c 2950 } 2951 2952 // Header returns a http.Header that can be modified by the caller to add 2953 // headers to the request. 2954 func (c *CompositeTypesGetCall) Header() http.Header { 2955 if c.header_ == nil { 2956 c.header_ = make(http.Header) 2957 } 2958 return c.header_ 2959 } 2960 2961 func (c *CompositeTypesGetCall) doRequest(alt string) (*http.Response, error) { 2962 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 2963 if c.ifNoneMatch_ != "" { 2964 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2965 } 2966 var body io.Reader = nil 2967 c.urlParams_.Set("alt", alt) 2968 c.urlParams_.Set("prettyPrint", "false") 2969 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/compositeTypes/{compositeType}") 2970 urls += "?" + c.urlParams_.Encode() 2971 req, err := http.NewRequest("GET", urls, body) 2972 if err != nil { 2973 return nil, err 2974 } 2975 req.Header = reqHeaders 2976 googleapi.Expand(req.URL, map[string]string{ 2977 "project": c.project, 2978 "compositeType": c.compositeType, 2979 }) 2980 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2981 } 2982 2983 // Do executes the "deploymentmanager.compositeTypes.get" call. 2984 // Any non-2xx status code is an error. Response headers are in either 2985 // *CompositeType.ServerResponse.Header or (if a response was returned at all) 2986 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2987 // whether the returned error was because http.StatusNotModified was returned. 2988 func (c *CompositeTypesGetCall) Do(opts ...googleapi.CallOption) (*CompositeType, error) { 2989 gensupport.SetOptions(c.urlParams_, opts...) 2990 res, err := c.doRequest("json") 2991 if res != nil && res.StatusCode == http.StatusNotModified { 2992 if res.Body != nil { 2993 res.Body.Close() 2994 } 2995 return nil, gensupport.WrapError(&googleapi.Error{ 2996 Code: res.StatusCode, 2997 Header: res.Header, 2998 }) 2999 } 3000 if err != nil { 3001 return nil, err 3002 } 3003 defer googleapi.CloseBody(res) 3004 if err := googleapi.CheckResponse(res); err != nil { 3005 return nil, gensupport.WrapError(err) 3006 } 3007 ret := &CompositeType{ 3008 ServerResponse: googleapi.ServerResponse{ 3009 Header: res.Header, 3010 HTTPStatusCode: res.StatusCode, 3011 }, 3012 } 3013 target := &ret 3014 if err := gensupport.DecodeResponse(target, res); err != nil { 3015 return nil, err 3016 } 3017 return ret, nil 3018 } 3019 3020 type CompositeTypesInsertCall struct { 3021 s *Service 3022 project string 3023 compositetype *CompositeType 3024 urlParams_ gensupport.URLParams 3025 ctx_ context.Context 3026 header_ http.Header 3027 } 3028 3029 // Insert: Creates a composite type. 3030 // 3031 // - project: The project ID for this request. 3032 func (r *CompositeTypesService) Insert(project string, compositetype *CompositeType) *CompositeTypesInsertCall { 3033 c := &CompositeTypesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3034 c.project = project 3035 c.compositetype = compositetype 3036 return c 3037 } 3038 3039 // Fields allows partial responses to be retrieved. See 3040 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3041 // details. 3042 func (c *CompositeTypesInsertCall) Fields(s ...googleapi.Field) *CompositeTypesInsertCall { 3043 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3044 return c 3045 } 3046 3047 // Context sets the context to be used in this call's Do method. 3048 func (c *CompositeTypesInsertCall) Context(ctx context.Context) *CompositeTypesInsertCall { 3049 c.ctx_ = ctx 3050 return c 3051 } 3052 3053 // Header returns a http.Header that can be modified by the caller to add 3054 // headers to the request. 3055 func (c *CompositeTypesInsertCall) Header() http.Header { 3056 if c.header_ == nil { 3057 c.header_ = make(http.Header) 3058 } 3059 return c.header_ 3060 } 3061 3062 func (c *CompositeTypesInsertCall) doRequest(alt string) (*http.Response, error) { 3063 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3064 var body io.Reader = nil 3065 body, err := googleapi.WithoutDataWrapper.JSONReader(c.compositetype) 3066 if err != nil { 3067 return nil, err 3068 } 3069 c.urlParams_.Set("alt", alt) 3070 c.urlParams_.Set("prettyPrint", "false") 3071 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/compositeTypes") 3072 urls += "?" + c.urlParams_.Encode() 3073 req, err := http.NewRequest("POST", urls, body) 3074 if err != nil { 3075 return nil, err 3076 } 3077 req.Header = reqHeaders 3078 googleapi.Expand(req.URL, map[string]string{ 3079 "project": c.project, 3080 }) 3081 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3082 } 3083 3084 // Do executes the "deploymentmanager.compositeTypes.insert" call. 3085 // Any non-2xx status code is an error. Response headers are in either 3086 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3087 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3088 // whether the returned error was because http.StatusNotModified was returned. 3089 func (c *CompositeTypesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3090 gensupport.SetOptions(c.urlParams_, opts...) 3091 res, err := c.doRequest("json") 3092 if res != nil && res.StatusCode == http.StatusNotModified { 3093 if res.Body != nil { 3094 res.Body.Close() 3095 } 3096 return nil, gensupport.WrapError(&googleapi.Error{ 3097 Code: res.StatusCode, 3098 Header: res.Header, 3099 }) 3100 } 3101 if err != nil { 3102 return nil, err 3103 } 3104 defer googleapi.CloseBody(res) 3105 if err := googleapi.CheckResponse(res); err != nil { 3106 return nil, gensupport.WrapError(err) 3107 } 3108 ret := &Operation{ 3109 ServerResponse: googleapi.ServerResponse{ 3110 Header: res.Header, 3111 HTTPStatusCode: res.StatusCode, 3112 }, 3113 } 3114 target := &ret 3115 if err := gensupport.DecodeResponse(target, res); err != nil { 3116 return nil, err 3117 } 3118 return ret, nil 3119 } 3120 3121 type CompositeTypesListCall struct { 3122 s *Service 3123 project string 3124 urlParams_ gensupport.URLParams 3125 ifNoneMatch_ string 3126 ctx_ context.Context 3127 header_ http.Header 3128 } 3129 3130 // List: Lists all composite types for Deployment Manager. 3131 // 3132 // - project: The project ID for this request. 3133 func (r *CompositeTypesService) List(project string) *CompositeTypesListCall { 3134 c := &CompositeTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3135 c.project = project 3136 return c 3137 } 3138 3139 // Filter sets the optional parameter "filter": A filter expression that 3140 // filters resources listed in the response. Most Compute resources support two 3141 // types of filter expressions: expressions that support regular expressions 3142 // and expressions that follow API improvement proposal AIP-160. These two 3143 // types of filter expressions cannot be mixed in one request. If you want to 3144 // use AIP-160, your expression must specify the field name, an operator, and 3145 // the value that you want to use for filtering. The value must be a string, a 3146 // number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, 3147 // `>=` or `:`. For example, if you are filtering Compute Engine instances, you 3148 // can exclude instances named `example-instance` by specifying `name != 3149 // example-instance`. The `:*` comparison can be used to test whether a key has 3150 // been defined. For example, to find all objects with `owner` label use: ``` 3151 // labels.owner:* ``` You can also filter nested fields. For example, you could 3152 // specify `scheduling.automaticRestart = false` to include instances only if 3153 // they are not scheduled for automatic restarts. You can use filtering on 3154 // nested fields to filter based on resource labels. To filter on multiple 3155 // expressions, provide each separate expression within parentheses. For 3156 // example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel 3157 // Skylake") ``` By default, each expression is an `AND` expression. However, 3158 // you can include `AND` and `OR` expressions explicitly. For example: ``` 3159 // (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND 3160 // (scheduling.automaticRestart = true) ``` If you want to use a regular 3161 // expression, use the `eq` (equal) or `ne` (not equal) operator against a 3162 // single un-parenthesized expression with or without quotes or against 3163 // multiple parenthesized expressions. Examples: `fieldname eq unquoted 3164 // literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted 3165 // literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal 3166 // value is interpreted as a regular expression using Google RE2 library 3167 // syntax. The literal value must match the entire field. For example, to 3168 // filter for instances that do not end with name "instance", you would use 3169 // `name ne .*instance`. You cannot combine constraints on multiple fields 3170 // using regular expressions. 3171 func (c *CompositeTypesListCall) Filter(filter string) *CompositeTypesListCall { 3172 c.urlParams_.Set("filter", filter) 3173 return c 3174 } 3175 3176 // MaxResults sets the optional parameter "maxResults": The maximum number of 3177 // results per page that should be returned. If the number of available results 3178 // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that 3179 // can be used to get the next page of results in subsequent list requests. 3180 // Acceptable values are `0` to `500`, inclusive. (Default: `500`) 3181 func (c *CompositeTypesListCall) MaxResults(maxResults int64) *CompositeTypesListCall { 3182 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 3183 return c 3184 } 3185 3186 // OrderBy sets the optional parameter "orderBy": Sorts list results by a 3187 // certain order. By default, results are returned in alphanumerical order 3188 // based on the resource name. You can also sort results in descending order 3189 // based on the creation timestamp using `orderBy="creationTimestamp desc". 3190 // This sorts results based on the `creationTimestamp` field in reverse 3191 // chronological order (newest result first). Use this to sort resources like 3192 // operations so that the newest operation is returned first. Currently, only 3193 // sorting by `name` or `creationTimestamp desc` is supported. 3194 func (c *CompositeTypesListCall) OrderBy(orderBy string) *CompositeTypesListCall { 3195 c.urlParams_.Set("orderBy", orderBy) 3196 return c 3197 } 3198 3199 // PageToken sets the optional parameter "pageToken": Specifies a page token to 3200 // use. Set `pageToken` to the `nextPageToken` returned by a previous list 3201 // request to get the next page of results. 3202 func (c *CompositeTypesListCall) PageToken(pageToken string) *CompositeTypesListCall { 3203 c.urlParams_.Set("pageToken", pageToken) 3204 return c 3205 } 3206 3207 // Fields allows partial responses to be retrieved. See 3208 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3209 // details. 3210 func (c *CompositeTypesListCall) Fields(s ...googleapi.Field) *CompositeTypesListCall { 3211 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3212 return c 3213 } 3214 3215 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3216 // object's ETag matches the given value. This is useful for getting updates 3217 // only after the object has changed since the last request. 3218 func (c *CompositeTypesListCall) IfNoneMatch(entityTag string) *CompositeTypesListCall { 3219 c.ifNoneMatch_ = entityTag 3220 return c 3221 } 3222 3223 // Context sets the context to be used in this call's Do method. 3224 func (c *CompositeTypesListCall) Context(ctx context.Context) *CompositeTypesListCall { 3225 c.ctx_ = ctx 3226 return c 3227 } 3228 3229 // Header returns a http.Header that can be modified by the caller to add 3230 // headers to the request. 3231 func (c *CompositeTypesListCall) Header() http.Header { 3232 if c.header_ == nil { 3233 c.header_ = make(http.Header) 3234 } 3235 return c.header_ 3236 } 3237 3238 func (c *CompositeTypesListCall) doRequest(alt string) (*http.Response, error) { 3239 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3240 if c.ifNoneMatch_ != "" { 3241 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3242 } 3243 var body io.Reader = nil 3244 c.urlParams_.Set("alt", alt) 3245 c.urlParams_.Set("prettyPrint", "false") 3246 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/compositeTypes") 3247 urls += "?" + c.urlParams_.Encode() 3248 req, err := http.NewRequest("GET", urls, body) 3249 if err != nil { 3250 return nil, err 3251 } 3252 req.Header = reqHeaders 3253 googleapi.Expand(req.URL, map[string]string{ 3254 "project": c.project, 3255 }) 3256 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3257 } 3258 3259 // Do executes the "deploymentmanager.compositeTypes.list" call. 3260 // Any non-2xx status code is an error. Response headers are in either 3261 // *CompositeTypesListResponse.ServerResponse.Header or (if a response was 3262 // returned at all) in error.(*googleapi.Error).Header. Use 3263 // googleapi.IsNotModified to check whether the returned error was because 3264 // http.StatusNotModified was returned. 3265 func (c *CompositeTypesListCall) Do(opts ...googleapi.CallOption) (*CompositeTypesListResponse, error) { 3266 gensupport.SetOptions(c.urlParams_, opts...) 3267 res, err := c.doRequest("json") 3268 if res != nil && res.StatusCode == http.StatusNotModified { 3269 if res.Body != nil { 3270 res.Body.Close() 3271 } 3272 return nil, gensupport.WrapError(&googleapi.Error{ 3273 Code: res.StatusCode, 3274 Header: res.Header, 3275 }) 3276 } 3277 if err != nil { 3278 return nil, err 3279 } 3280 defer googleapi.CloseBody(res) 3281 if err := googleapi.CheckResponse(res); err != nil { 3282 return nil, gensupport.WrapError(err) 3283 } 3284 ret := &CompositeTypesListResponse{ 3285 ServerResponse: googleapi.ServerResponse{ 3286 Header: res.Header, 3287 HTTPStatusCode: res.StatusCode, 3288 }, 3289 } 3290 target := &ret 3291 if err := gensupport.DecodeResponse(target, res); err != nil { 3292 return nil, err 3293 } 3294 return ret, nil 3295 } 3296 3297 // Pages invokes f for each page of results. 3298 // A non-nil error returned from f will halt the iteration. 3299 // The provided context supersedes any context provided to the Context method. 3300 func (c *CompositeTypesListCall) Pages(ctx context.Context, f func(*CompositeTypesListResponse) error) error { 3301 c.ctx_ = ctx 3302 defer c.PageToken(c.urlParams_.Get("pageToken")) 3303 for { 3304 x, err := c.Do() 3305 if err != nil { 3306 return err 3307 } 3308 if err := f(x); err != nil { 3309 return err 3310 } 3311 if x.NextPageToken == "" { 3312 return nil 3313 } 3314 c.PageToken(x.NextPageToken) 3315 } 3316 } 3317 3318 type CompositeTypesPatchCall struct { 3319 s *Service 3320 project string 3321 compositeType string 3322 compositetype *CompositeType 3323 urlParams_ gensupport.URLParams 3324 ctx_ context.Context 3325 header_ http.Header 3326 } 3327 3328 // Patch: Patches a composite type. 3329 // 3330 // - compositeType: The name of the composite type for this request. 3331 // - project: The project ID for this request. 3332 func (r *CompositeTypesService) Patch(project string, compositeType string, compositetype *CompositeType) *CompositeTypesPatchCall { 3333 c := &CompositeTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3334 c.project = project 3335 c.compositeType = compositeType 3336 c.compositetype = compositetype 3337 return c 3338 } 3339 3340 // Fields allows partial responses to be retrieved. See 3341 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3342 // details. 3343 func (c *CompositeTypesPatchCall) Fields(s ...googleapi.Field) *CompositeTypesPatchCall { 3344 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3345 return c 3346 } 3347 3348 // Context sets the context to be used in this call's Do method. 3349 func (c *CompositeTypesPatchCall) Context(ctx context.Context) *CompositeTypesPatchCall { 3350 c.ctx_ = ctx 3351 return c 3352 } 3353 3354 // Header returns a http.Header that can be modified by the caller to add 3355 // headers to the request. 3356 func (c *CompositeTypesPatchCall) Header() http.Header { 3357 if c.header_ == nil { 3358 c.header_ = make(http.Header) 3359 } 3360 return c.header_ 3361 } 3362 3363 func (c *CompositeTypesPatchCall) doRequest(alt string) (*http.Response, error) { 3364 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3365 var body io.Reader = nil 3366 body, err := googleapi.WithoutDataWrapper.JSONReader(c.compositetype) 3367 if err != nil { 3368 return nil, err 3369 } 3370 c.urlParams_.Set("alt", alt) 3371 c.urlParams_.Set("prettyPrint", "false") 3372 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/compositeTypes/{compositeType}") 3373 urls += "?" + c.urlParams_.Encode() 3374 req, err := http.NewRequest("PATCH", urls, body) 3375 if err != nil { 3376 return nil, err 3377 } 3378 req.Header = reqHeaders 3379 googleapi.Expand(req.URL, map[string]string{ 3380 "project": c.project, 3381 "compositeType": c.compositeType, 3382 }) 3383 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3384 } 3385 3386 // Do executes the "deploymentmanager.compositeTypes.patch" call. 3387 // Any non-2xx status code is an error. Response headers are in either 3388 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3389 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3390 // whether the returned error was because http.StatusNotModified was returned. 3391 func (c *CompositeTypesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3392 gensupport.SetOptions(c.urlParams_, opts...) 3393 res, err := c.doRequest("json") 3394 if res != nil && res.StatusCode == http.StatusNotModified { 3395 if res.Body != nil { 3396 res.Body.Close() 3397 } 3398 return nil, gensupport.WrapError(&googleapi.Error{ 3399 Code: res.StatusCode, 3400 Header: res.Header, 3401 }) 3402 } 3403 if err != nil { 3404 return nil, err 3405 } 3406 defer googleapi.CloseBody(res) 3407 if err := googleapi.CheckResponse(res); err != nil { 3408 return nil, gensupport.WrapError(err) 3409 } 3410 ret := &Operation{ 3411 ServerResponse: googleapi.ServerResponse{ 3412 Header: res.Header, 3413 HTTPStatusCode: res.StatusCode, 3414 }, 3415 } 3416 target := &ret 3417 if err := gensupport.DecodeResponse(target, res); err != nil { 3418 return nil, err 3419 } 3420 return ret, nil 3421 } 3422 3423 type CompositeTypesUpdateCall struct { 3424 s *Service 3425 project string 3426 compositeType string 3427 compositetype *CompositeType 3428 urlParams_ gensupport.URLParams 3429 ctx_ context.Context 3430 header_ http.Header 3431 } 3432 3433 // Update: Updates a composite type. 3434 // 3435 // - compositeType: The name of the composite type for this request. 3436 // - project: The project ID for this request. 3437 func (r *CompositeTypesService) Update(project string, compositeType string, compositetype *CompositeType) *CompositeTypesUpdateCall { 3438 c := &CompositeTypesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3439 c.project = project 3440 c.compositeType = compositeType 3441 c.compositetype = compositetype 3442 return c 3443 } 3444 3445 // Fields allows partial responses to be retrieved. See 3446 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3447 // details. 3448 func (c *CompositeTypesUpdateCall) Fields(s ...googleapi.Field) *CompositeTypesUpdateCall { 3449 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3450 return c 3451 } 3452 3453 // Context sets the context to be used in this call's Do method. 3454 func (c *CompositeTypesUpdateCall) Context(ctx context.Context) *CompositeTypesUpdateCall { 3455 c.ctx_ = ctx 3456 return c 3457 } 3458 3459 // Header returns a http.Header that can be modified by the caller to add 3460 // headers to the request. 3461 func (c *CompositeTypesUpdateCall) Header() http.Header { 3462 if c.header_ == nil { 3463 c.header_ = make(http.Header) 3464 } 3465 return c.header_ 3466 } 3467 3468 func (c *CompositeTypesUpdateCall) doRequest(alt string) (*http.Response, error) { 3469 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3470 var body io.Reader = nil 3471 body, err := googleapi.WithoutDataWrapper.JSONReader(c.compositetype) 3472 if err != nil { 3473 return nil, err 3474 } 3475 c.urlParams_.Set("alt", alt) 3476 c.urlParams_.Set("prettyPrint", "false") 3477 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/compositeTypes/{compositeType}") 3478 urls += "?" + c.urlParams_.Encode() 3479 req, err := http.NewRequest("PUT", urls, body) 3480 if err != nil { 3481 return nil, err 3482 } 3483 req.Header = reqHeaders 3484 googleapi.Expand(req.URL, map[string]string{ 3485 "project": c.project, 3486 "compositeType": c.compositeType, 3487 }) 3488 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3489 } 3490 3491 // Do executes the "deploymentmanager.compositeTypes.update" call. 3492 // Any non-2xx status code is an error. Response headers are in either 3493 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3494 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3495 // whether the returned error was because http.StatusNotModified was returned. 3496 func (c *CompositeTypesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3497 gensupport.SetOptions(c.urlParams_, opts...) 3498 res, err := c.doRequest("json") 3499 if res != nil && res.StatusCode == http.StatusNotModified { 3500 if res.Body != nil { 3501 res.Body.Close() 3502 } 3503 return nil, gensupport.WrapError(&googleapi.Error{ 3504 Code: res.StatusCode, 3505 Header: res.Header, 3506 }) 3507 } 3508 if err != nil { 3509 return nil, err 3510 } 3511 defer googleapi.CloseBody(res) 3512 if err := googleapi.CheckResponse(res); err != nil { 3513 return nil, gensupport.WrapError(err) 3514 } 3515 ret := &Operation{ 3516 ServerResponse: googleapi.ServerResponse{ 3517 Header: res.Header, 3518 HTTPStatusCode: res.StatusCode, 3519 }, 3520 } 3521 target := &ret 3522 if err := gensupport.DecodeResponse(target, res); err != nil { 3523 return nil, err 3524 } 3525 return ret, nil 3526 } 3527 3528 type DeploymentsCancelPreviewCall struct { 3529 s *Service 3530 project string 3531 deployment string 3532 deploymentscancelpreviewrequest *DeploymentsCancelPreviewRequest 3533 urlParams_ gensupport.URLParams 3534 ctx_ context.Context 3535 header_ http.Header 3536 } 3537 3538 // CancelPreview: Cancels and removes the preview currently associated with the 3539 // deployment. 3540 // 3541 // - deployment: The name of the deployment for this request. 3542 // - project: The project ID for this request. 3543 func (r *DeploymentsService) CancelPreview(project string, deployment string, deploymentscancelpreviewrequest *DeploymentsCancelPreviewRequest) *DeploymentsCancelPreviewCall { 3544 c := &DeploymentsCancelPreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3545 c.project = project 3546 c.deployment = deployment 3547 c.deploymentscancelpreviewrequest = deploymentscancelpreviewrequest 3548 return c 3549 } 3550 3551 // Fields allows partial responses to be retrieved. See 3552 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3553 // details. 3554 func (c *DeploymentsCancelPreviewCall) Fields(s ...googleapi.Field) *DeploymentsCancelPreviewCall { 3555 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3556 return c 3557 } 3558 3559 // Context sets the context to be used in this call's Do method. 3560 func (c *DeploymentsCancelPreviewCall) Context(ctx context.Context) *DeploymentsCancelPreviewCall { 3561 c.ctx_ = ctx 3562 return c 3563 } 3564 3565 // Header returns a http.Header that can be modified by the caller to add 3566 // headers to the request. 3567 func (c *DeploymentsCancelPreviewCall) Header() http.Header { 3568 if c.header_ == nil { 3569 c.header_ = make(http.Header) 3570 } 3571 return c.header_ 3572 } 3573 3574 func (c *DeploymentsCancelPreviewCall) doRequest(alt string) (*http.Response, error) { 3575 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3576 var body io.Reader = nil 3577 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deploymentscancelpreviewrequest) 3578 if err != nil { 3579 return nil, err 3580 } 3581 c.urlParams_.Set("alt", alt) 3582 c.urlParams_.Set("prettyPrint", "false") 3583 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/deployments/{deployment}/cancelPreview") 3584 urls += "?" + c.urlParams_.Encode() 3585 req, err := http.NewRequest("POST", urls, body) 3586 if err != nil { 3587 return nil, err 3588 } 3589 req.Header = reqHeaders 3590 googleapi.Expand(req.URL, map[string]string{ 3591 "project": c.project, 3592 "deployment": c.deployment, 3593 }) 3594 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3595 } 3596 3597 // Do executes the "deploymentmanager.deployments.cancelPreview" call. 3598 // Any non-2xx status code is an error. Response headers are in either 3599 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3600 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3601 // whether the returned error was because http.StatusNotModified was returned. 3602 func (c *DeploymentsCancelPreviewCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3603 gensupport.SetOptions(c.urlParams_, opts...) 3604 res, err := c.doRequest("json") 3605 if res != nil && res.StatusCode == http.StatusNotModified { 3606 if res.Body != nil { 3607 res.Body.Close() 3608 } 3609 return nil, gensupport.WrapError(&googleapi.Error{ 3610 Code: res.StatusCode, 3611 Header: res.Header, 3612 }) 3613 } 3614 if err != nil { 3615 return nil, err 3616 } 3617 defer googleapi.CloseBody(res) 3618 if err := googleapi.CheckResponse(res); err != nil { 3619 return nil, gensupport.WrapError(err) 3620 } 3621 ret := &Operation{ 3622 ServerResponse: googleapi.ServerResponse{ 3623 Header: res.Header, 3624 HTTPStatusCode: res.StatusCode, 3625 }, 3626 } 3627 target := &ret 3628 if err := gensupport.DecodeResponse(target, res); err != nil { 3629 return nil, err 3630 } 3631 return ret, nil 3632 } 3633 3634 type DeploymentsDeleteCall struct { 3635 s *Service 3636 project string 3637 deployment string 3638 urlParams_ gensupport.URLParams 3639 ctx_ context.Context 3640 header_ http.Header 3641 } 3642 3643 // Delete: Deletes a deployment and all of the resources in the deployment. 3644 // 3645 // - deployment: The name of the deployment for this request. 3646 // - project: The project ID for this request. 3647 func (r *DeploymentsService) Delete(project string, deployment string) *DeploymentsDeleteCall { 3648 c := &DeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3649 c.project = project 3650 c.deployment = deployment 3651 return c 3652 } 3653 3654 // DeletePolicy sets the optional parameter "deletePolicy": Sets the policy to 3655 // use for deleting resources. 3656 // 3657 // Possible values: 3658 // 3659 // "DELETE" (default) 3660 // "ABANDON" 3661 func (c *DeploymentsDeleteCall) DeletePolicy(deletePolicy string) *DeploymentsDeleteCall { 3662 c.urlParams_.Set("deletePolicy", deletePolicy) 3663 return c 3664 } 3665 3666 // Fields allows partial responses to be retrieved. See 3667 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3668 // details. 3669 func (c *DeploymentsDeleteCall) Fields(s ...googleapi.Field) *DeploymentsDeleteCall { 3670 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3671 return c 3672 } 3673 3674 // Context sets the context to be used in this call's Do method. 3675 func (c *DeploymentsDeleteCall) Context(ctx context.Context) *DeploymentsDeleteCall { 3676 c.ctx_ = ctx 3677 return c 3678 } 3679 3680 // Header returns a http.Header that can be modified by the caller to add 3681 // headers to the request. 3682 func (c *DeploymentsDeleteCall) Header() http.Header { 3683 if c.header_ == nil { 3684 c.header_ = make(http.Header) 3685 } 3686 return c.header_ 3687 } 3688 3689 func (c *DeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) { 3690 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3691 var body io.Reader = nil 3692 c.urlParams_.Set("alt", alt) 3693 c.urlParams_.Set("prettyPrint", "false") 3694 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/deployments/{deployment}") 3695 urls += "?" + c.urlParams_.Encode() 3696 req, err := http.NewRequest("DELETE", urls, body) 3697 if err != nil { 3698 return nil, err 3699 } 3700 req.Header = reqHeaders 3701 googleapi.Expand(req.URL, map[string]string{ 3702 "project": c.project, 3703 "deployment": c.deployment, 3704 }) 3705 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3706 } 3707 3708 // Do executes the "deploymentmanager.deployments.delete" call. 3709 // Any non-2xx status code is an error. Response headers are in either 3710 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3711 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3712 // whether the returned error was because http.StatusNotModified was returned. 3713 func (c *DeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3714 gensupport.SetOptions(c.urlParams_, opts...) 3715 res, err := c.doRequest("json") 3716 if res != nil && res.StatusCode == http.StatusNotModified { 3717 if res.Body != nil { 3718 res.Body.Close() 3719 } 3720 return nil, gensupport.WrapError(&googleapi.Error{ 3721 Code: res.StatusCode, 3722 Header: res.Header, 3723 }) 3724 } 3725 if err != nil { 3726 return nil, err 3727 } 3728 defer googleapi.CloseBody(res) 3729 if err := googleapi.CheckResponse(res); err != nil { 3730 return nil, gensupport.WrapError(err) 3731 } 3732 ret := &Operation{ 3733 ServerResponse: googleapi.ServerResponse{ 3734 Header: res.Header, 3735 HTTPStatusCode: res.StatusCode, 3736 }, 3737 } 3738 target := &ret 3739 if err := gensupport.DecodeResponse(target, res); err != nil { 3740 return nil, err 3741 } 3742 return ret, nil 3743 } 3744 3745 type DeploymentsGetCall struct { 3746 s *Service 3747 project string 3748 deployment string 3749 urlParams_ gensupport.URLParams 3750 ifNoneMatch_ string 3751 ctx_ context.Context 3752 header_ http.Header 3753 } 3754 3755 // Get: Gets information about a specific deployment. 3756 // 3757 // - deployment: The name of the deployment for this request. 3758 // - project: The project ID for this request. 3759 func (r *DeploymentsService) Get(project string, deployment string) *DeploymentsGetCall { 3760 c := &DeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3761 c.project = project 3762 c.deployment = deployment 3763 return c 3764 } 3765 3766 // Fields allows partial responses to be retrieved. See 3767 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3768 // details. 3769 func (c *DeploymentsGetCall) Fields(s ...googleapi.Field) *DeploymentsGetCall { 3770 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3771 return c 3772 } 3773 3774 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3775 // object's ETag matches the given value. This is useful for getting updates 3776 // only after the object has changed since the last request. 3777 func (c *DeploymentsGetCall) IfNoneMatch(entityTag string) *DeploymentsGetCall { 3778 c.ifNoneMatch_ = entityTag 3779 return c 3780 } 3781 3782 // Context sets the context to be used in this call's Do method. 3783 func (c *DeploymentsGetCall) Context(ctx context.Context) *DeploymentsGetCall { 3784 c.ctx_ = ctx 3785 return c 3786 } 3787 3788 // Header returns a http.Header that can be modified by the caller to add 3789 // headers to the request. 3790 func (c *DeploymentsGetCall) Header() http.Header { 3791 if c.header_ == nil { 3792 c.header_ = make(http.Header) 3793 } 3794 return c.header_ 3795 } 3796 3797 func (c *DeploymentsGetCall) doRequest(alt string) (*http.Response, error) { 3798 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3799 if c.ifNoneMatch_ != "" { 3800 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3801 } 3802 var body io.Reader = nil 3803 c.urlParams_.Set("alt", alt) 3804 c.urlParams_.Set("prettyPrint", "false") 3805 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/deployments/{deployment}") 3806 urls += "?" + c.urlParams_.Encode() 3807 req, err := http.NewRequest("GET", urls, body) 3808 if err != nil { 3809 return nil, err 3810 } 3811 req.Header = reqHeaders 3812 googleapi.Expand(req.URL, map[string]string{ 3813 "project": c.project, 3814 "deployment": c.deployment, 3815 }) 3816 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3817 } 3818 3819 // Do executes the "deploymentmanager.deployments.get" call. 3820 // Any non-2xx status code is an error. Response headers are in either 3821 // *Deployment.ServerResponse.Header or (if a response was returned at all) in 3822 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3823 // whether the returned error was because http.StatusNotModified was returned. 3824 func (c *DeploymentsGetCall) Do(opts ...googleapi.CallOption) (*Deployment, error) { 3825 gensupport.SetOptions(c.urlParams_, opts...) 3826 res, err := c.doRequest("json") 3827 if res != nil && res.StatusCode == http.StatusNotModified { 3828 if res.Body != nil { 3829 res.Body.Close() 3830 } 3831 return nil, gensupport.WrapError(&googleapi.Error{ 3832 Code: res.StatusCode, 3833 Header: res.Header, 3834 }) 3835 } 3836 if err != nil { 3837 return nil, err 3838 } 3839 defer googleapi.CloseBody(res) 3840 if err := googleapi.CheckResponse(res); err != nil { 3841 return nil, gensupport.WrapError(err) 3842 } 3843 ret := &Deployment{ 3844 ServerResponse: googleapi.ServerResponse{ 3845 Header: res.Header, 3846 HTTPStatusCode: res.StatusCode, 3847 }, 3848 } 3849 target := &ret 3850 if err := gensupport.DecodeResponse(target, res); err != nil { 3851 return nil, err 3852 } 3853 return ret, nil 3854 } 3855 3856 type DeploymentsGetIamPolicyCall struct { 3857 s *Service 3858 project string 3859 resource string 3860 urlParams_ gensupport.URLParams 3861 ifNoneMatch_ string 3862 ctx_ context.Context 3863 header_ http.Header 3864 } 3865 3866 // GetIamPolicy: Gets the access control policy for a resource. May be empty if 3867 // no such policy or resource exists. 3868 // 3869 // - project: Project ID for this request. 3870 // - resource: Name or id of the resource for this request. 3871 func (r *DeploymentsService) GetIamPolicy(project string, resource string) *DeploymentsGetIamPolicyCall { 3872 c := &DeploymentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3873 c.project = project 3874 c.resource = resource 3875 return c 3876 } 3877 3878 // OptionsRequestedPolicyVersion sets the optional parameter 3879 // "optionsRequestedPolicyVersion": Requested IAM Policy version. 3880 func (c *DeploymentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *DeploymentsGetIamPolicyCall { 3881 c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 3882 return c 3883 } 3884 3885 // Fields allows partial responses to be retrieved. See 3886 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3887 // details. 3888 func (c *DeploymentsGetIamPolicyCall) Fields(s ...googleapi.Field) *DeploymentsGetIamPolicyCall { 3889 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3890 return c 3891 } 3892 3893 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3894 // object's ETag matches the given value. This is useful for getting updates 3895 // only after the object has changed since the last request. 3896 func (c *DeploymentsGetIamPolicyCall) IfNoneMatch(entityTag string) *DeploymentsGetIamPolicyCall { 3897 c.ifNoneMatch_ = entityTag 3898 return c 3899 } 3900 3901 // Context sets the context to be used in this call's Do method. 3902 func (c *DeploymentsGetIamPolicyCall) Context(ctx context.Context) *DeploymentsGetIamPolicyCall { 3903 c.ctx_ = ctx 3904 return c 3905 } 3906 3907 // Header returns a http.Header that can be modified by the caller to add 3908 // headers to the request. 3909 func (c *DeploymentsGetIamPolicyCall) Header() http.Header { 3910 if c.header_ == nil { 3911 c.header_ = make(http.Header) 3912 } 3913 return c.header_ 3914 } 3915 3916 func (c *DeploymentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 3917 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3918 if c.ifNoneMatch_ != "" { 3919 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3920 } 3921 var body io.Reader = nil 3922 c.urlParams_.Set("alt", alt) 3923 c.urlParams_.Set("prettyPrint", "false") 3924 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/deployments/{resource}/getIamPolicy") 3925 urls += "?" + c.urlParams_.Encode() 3926 req, err := http.NewRequest("GET", urls, body) 3927 if err != nil { 3928 return nil, err 3929 } 3930 req.Header = reqHeaders 3931 googleapi.Expand(req.URL, map[string]string{ 3932 "project": c.project, 3933 "resource": c.resource, 3934 }) 3935 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3936 } 3937 3938 // Do executes the "deploymentmanager.deployments.getIamPolicy" call. 3939 // Any non-2xx status code is an error. Response headers are in either 3940 // *Policy.ServerResponse.Header or (if a response was returned at all) in 3941 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3942 // whether the returned error was because http.StatusNotModified was returned. 3943 func (c *DeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 3944 gensupport.SetOptions(c.urlParams_, opts...) 3945 res, err := c.doRequest("json") 3946 if res != nil && res.StatusCode == http.StatusNotModified { 3947 if res.Body != nil { 3948 res.Body.Close() 3949 } 3950 return nil, gensupport.WrapError(&googleapi.Error{ 3951 Code: res.StatusCode, 3952 Header: res.Header, 3953 }) 3954 } 3955 if err != nil { 3956 return nil, err 3957 } 3958 defer googleapi.CloseBody(res) 3959 if err := googleapi.CheckResponse(res); err != nil { 3960 return nil, gensupport.WrapError(err) 3961 } 3962 ret := &Policy{ 3963 ServerResponse: googleapi.ServerResponse{ 3964 Header: res.Header, 3965 HTTPStatusCode: res.StatusCode, 3966 }, 3967 } 3968 target := &ret 3969 if err := gensupport.DecodeResponse(target, res); err != nil { 3970 return nil, err 3971 } 3972 return ret, nil 3973 } 3974 3975 type DeploymentsInsertCall struct { 3976 s *Service 3977 project string 3978 deployment *Deployment 3979 urlParams_ gensupport.URLParams 3980 ctx_ context.Context 3981 header_ http.Header 3982 } 3983 3984 // Insert: Creates a deployment and all of the resources described by the 3985 // deployment manifest. 3986 // 3987 // - project: The project ID for this request. 3988 func (r *DeploymentsService) Insert(project string, deployment *Deployment) *DeploymentsInsertCall { 3989 c := &DeploymentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3990 c.project = project 3991 c.deployment = deployment 3992 return c 3993 } 3994 3995 // CreatePolicy sets the optional parameter "createPolicy": Sets the policy to 3996 // use for creating new resources. 3997 // 3998 // Possible values: 3999 // 4000 // "CREATE_OR_ACQUIRE" (default) 4001 // "ACQUIRE" 4002 // "CREATE" 4003 func (c *DeploymentsInsertCall) CreatePolicy(createPolicy string) *DeploymentsInsertCall { 4004 c.urlParams_.Set("createPolicy", createPolicy) 4005 return c 4006 } 4007 4008 // Preview sets the optional parameter "preview": If set to true, creates a 4009 // deployment and creates "shell" resources but does not actually instantiate 4010 // these resources. This allows you to preview what your deployment looks like. 4011 // After previewing a deployment, you can deploy your resources by making a 4012 // request with the `update()` method or you can use the `cancelPreview()` 4013 // method to cancel the preview altogether. Note that the deployment will still 4014 // exist after you cancel the preview and you must separately delete this 4015 // deployment if you want to remove it. 4016 func (c *DeploymentsInsertCall) Preview(preview bool) *DeploymentsInsertCall { 4017 c.urlParams_.Set("preview", fmt.Sprint(preview)) 4018 return c 4019 } 4020 4021 // Fields allows partial responses to be retrieved. See 4022 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4023 // details. 4024 func (c *DeploymentsInsertCall) Fields(s ...googleapi.Field) *DeploymentsInsertCall { 4025 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4026 return c 4027 } 4028 4029 // Context sets the context to be used in this call's Do method. 4030 func (c *DeploymentsInsertCall) Context(ctx context.Context) *DeploymentsInsertCall { 4031 c.ctx_ = ctx 4032 return c 4033 } 4034 4035 // Header returns a http.Header that can be modified by the caller to add 4036 // headers to the request. 4037 func (c *DeploymentsInsertCall) Header() http.Header { 4038 if c.header_ == nil { 4039 c.header_ = make(http.Header) 4040 } 4041 return c.header_ 4042 } 4043 4044 func (c *DeploymentsInsertCall) doRequest(alt string) (*http.Response, error) { 4045 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4046 var body io.Reader = nil 4047 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment) 4048 if err != nil { 4049 return nil, err 4050 } 4051 c.urlParams_.Set("alt", alt) 4052 c.urlParams_.Set("prettyPrint", "false") 4053 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/deployments") 4054 urls += "?" + c.urlParams_.Encode() 4055 req, err := http.NewRequest("POST", urls, body) 4056 if err != nil { 4057 return nil, err 4058 } 4059 req.Header = reqHeaders 4060 googleapi.Expand(req.URL, map[string]string{ 4061 "project": c.project, 4062 }) 4063 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4064 } 4065 4066 // Do executes the "deploymentmanager.deployments.insert" call. 4067 // Any non-2xx status code is an error. Response headers are in either 4068 // *Operation.ServerResponse.Header or (if a response was returned at all) in 4069 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4070 // whether the returned error was because http.StatusNotModified was returned. 4071 func (c *DeploymentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4072 gensupport.SetOptions(c.urlParams_, opts...) 4073 res, err := c.doRequest("json") 4074 if res != nil && res.StatusCode == http.StatusNotModified { 4075 if res.Body != nil { 4076 res.Body.Close() 4077 } 4078 return nil, gensupport.WrapError(&googleapi.Error{ 4079 Code: res.StatusCode, 4080 Header: res.Header, 4081 }) 4082 } 4083 if err != nil { 4084 return nil, err 4085 } 4086 defer googleapi.CloseBody(res) 4087 if err := googleapi.CheckResponse(res); err != nil { 4088 return nil, gensupport.WrapError(err) 4089 } 4090 ret := &Operation{ 4091 ServerResponse: googleapi.ServerResponse{ 4092 Header: res.Header, 4093 HTTPStatusCode: res.StatusCode, 4094 }, 4095 } 4096 target := &ret 4097 if err := gensupport.DecodeResponse(target, res); err != nil { 4098 return nil, err 4099 } 4100 return ret, nil 4101 } 4102 4103 type DeploymentsListCall struct { 4104 s *Service 4105 project string 4106 urlParams_ gensupport.URLParams 4107 ifNoneMatch_ string 4108 ctx_ context.Context 4109 header_ http.Header 4110 } 4111 4112 // List: Lists all deployments for a given project. 4113 // 4114 // - project: The project ID for this request. 4115 func (r *DeploymentsService) List(project string) *DeploymentsListCall { 4116 c := &DeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4117 c.project = project 4118 return c 4119 } 4120 4121 // Filter sets the optional parameter "filter": A filter expression that 4122 // filters resources listed in the response. Most Compute resources support two 4123 // types of filter expressions: expressions that support regular expressions 4124 // and expressions that follow API improvement proposal AIP-160. These two 4125 // types of filter expressions cannot be mixed in one request. If you want to 4126 // use AIP-160, your expression must specify the field name, an operator, and 4127 // the value that you want to use for filtering. The value must be a string, a 4128 // number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, 4129 // `>=` or `:`. For example, if you are filtering Compute Engine instances, you 4130 // can exclude instances named `example-instance` by specifying `name != 4131 // example-instance`. The `:*` comparison can be used to test whether a key has 4132 // been defined. For example, to find all objects with `owner` label use: ``` 4133 // labels.owner:* ``` You can also filter nested fields. For example, you could 4134 // specify `scheduling.automaticRestart = false` to include instances only if 4135 // they are not scheduled for automatic restarts. You can use filtering on 4136 // nested fields to filter based on resource labels. To filter on multiple 4137 // expressions, provide each separate expression within parentheses. For 4138 // example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel 4139 // Skylake") ``` By default, each expression is an `AND` expression. However, 4140 // you can include `AND` and `OR` expressions explicitly. For example: ``` 4141 // (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND 4142 // (scheduling.automaticRestart = true) ``` If you want to use a regular 4143 // expression, use the `eq` (equal) or `ne` (not equal) operator against a 4144 // single un-parenthesized expression with or without quotes or against 4145 // multiple parenthesized expressions. Examples: `fieldname eq unquoted 4146 // literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted 4147 // literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal 4148 // value is interpreted as a regular expression using Google RE2 library 4149 // syntax. The literal value must match the entire field. For example, to 4150 // filter for instances that do not end with name "instance", you would use 4151 // `name ne .*instance`. You cannot combine constraints on multiple fields 4152 // using regular expressions. 4153 func (c *DeploymentsListCall) Filter(filter string) *DeploymentsListCall { 4154 c.urlParams_.Set("filter", filter) 4155 return c 4156 } 4157 4158 // MaxResults sets the optional parameter "maxResults": The maximum number of 4159 // results per page that should be returned. If the number of available results 4160 // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that 4161 // can be used to get the next page of results in subsequent list requests. 4162 // Acceptable values are `0` to `500`, inclusive. (Default: `500`) 4163 func (c *DeploymentsListCall) MaxResults(maxResults int64) *DeploymentsListCall { 4164 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 4165 return c 4166 } 4167 4168 // OrderBy sets the optional parameter "orderBy": Sorts list results by a 4169 // certain order. By default, results are returned in alphanumerical order 4170 // based on the resource name. You can also sort results in descending order 4171 // based on the creation timestamp using `orderBy="creationTimestamp desc". 4172 // This sorts results based on the `creationTimestamp` field in reverse 4173 // chronological order (newest result first). Use this to sort resources like 4174 // operations so that the newest operation is returned first. Currently, only 4175 // sorting by `name` or `creationTimestamp desc` is supported. 4176 func (c *DeploymentsListCall) OrderBy(orderBy string) *DeploymentsListCall { 4177 c.urlParams_.Set("orderBy", orderBy) 4178 return c 4179 } 4180 4181 // PageToken sets the optional parameter "pageToken": Specifies a page token to 4182 // use. Set `pageToken` to the `nextPageToken` returned by a previous list 4183 // request to get the next page of results. 4184 func (c *DeploymentsListCall) PageToken(pageToken string) *DeploymentsListCall { 4185 c.urlParams_.Set("pageToken", pageToken) 4186 return c 4187 } 4188 4189 // Fields allows partial responses to be retrieved. See 4190 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4191 // details. 4192 func (c *DeploymentsListCall) Fields(s ...googleapi.Field) *DeploymentsListCall { 4193 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4194 return c 4195 } 4196 4197 // IfNoneMatch sets an optional parameter which makes the operation fail if the 4198 // object's ETag matches the given value. This is useful for getting updates 4199 // only after the object has changed since the last request. 4200 func (c *DeploymentsListCall) IfNoneMatch(entityTag string) *DeploymentsListCall { 4201 c.ifNoneMatch_ = entityTag 4202 return c 4203 } 4204 4205 // Context sets the context to be used in this call's Do method. 4206 func (c *DeploymentsListCall) Context(ctx context.Context) *DeploymentsListCall { 4207 c.ctx_ = ctx 4208 return c 4209 } 4210 4211 // Header returns a http.Header that can be modified by the caller to add 4212 // headers to the request. 4213 func (c *DeploymentsListCall) Header() http.Header { 4214 if c.header_ == nil { 4215 c.header_ = make(http.Header) 4216 } 4217 return c.header_ 4218 } 4219 4220 func (c *DeploymentsListCall) doRequest(alt string) (*http.Response, error) { 4221 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 4222 if c.ifNoneMatch_ != "" { 4223 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4224 } 4225 var body io.Reader = nil 4226 c.urlParams_.Set("alt", alt) 4227 c.urlParams_.Set("prettyPrint", "false") 4228 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/deployments") 4229 urls += "?" + c.urlParams_.Encode() 4230 req, err := http.NewRequest("GET", urls, body) 4231 if err != nil { 4232 return nil, err 4233 } 4234 req.Header = reqHeaders 4235 googleapi.Expand(req.URL, map[string]string{ 4236 "project": c.project, 4237 }) 4238 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4239 } 4240 4241 // Do executes the "deploymentmanager.deployments.list" call. 4242 // Any non-2xx status code is an error. Response headers are in either 4243 // *DeploymentsListResponse.ServerResponse.Header or (if a response was 4244 // returned at all) in error.(*googleapi.Error).Header. Use 4245 // googleapi.IsNotModified to check whether the returned error was because 4246 // http.StatusNotModified was returned. 4247 func (c *DeploymentsListCall) Do(opts ...googleapi.CallOption) (*DeploymentsListResponse, error) { 4248 gensupport.SetOptions(c.urlParams_, opts...) 4249 res, err := c.doRequest("json") 4250 if res != nil && res.StatusCode == http.StatusNotModified { 4251 if res.Body != nil { 4252 res.Body.Close() 4253 } 4254 return nil, gensupport.WrapError(&googleapi.Error{ 4255 Code: res.StatusCode, 4256 Header: res.Header, 4257 }) 4258 } 4259 if err != nil { 4260 return nil, err 4261 } 4262 defer googleapi.CloseBody(res) 4263 if err := googleapi.CheckResponse(res); err != nil { 4264 return nil, gensupport.WrapError(err) 4265 } 4266 ret := &DeploymentsListResponse{ 4267 ServerResponse: googleapi.ServerResponse{ 4268 Header: res.Header, 4269 HTTPStatusCode: res.StatusCode, 4270 }, 4271 } 4272 target := &ret 4273 if err := gensupport.DecodeResponse(target, res); err != nil { 4274 return nil, err 4275 } 4276 return ret, nil 4277 } 4278 4279 // Pages invokes f for each page of results. 4280 // A non-nil error returned from f will halt the iteration. 4281 // The provided context supersedes any context provided to the Context method. 4282 func (c *DeploymentsListCall) Pages(ctx context.Context, f func(*DeploymentsListResponse) error) error { 4283 c.ctx_ = ctx 4284 defer c.PageToken(c.urlParams_.Get("pageToken")) 4285 for { 4286 x, err := c.Do() 4287 if err != nil { 4288 return err 4289 } 4290 if err := f(x); err != nil { 4291 return err 4292 } 4293 if x.NextPageToken == "" { 4294 return nil 4295 } 4296 c.PageToken(x.NextPageToken) 4297 } 4298 } 4299 4300 type DeploymentsPatchCall struct { 4301 s *Service 4302 project string 4303 deployment string 4304 deployment2 *Deployment 4305 urlParams_ gensupport.URLParams 4306 ctx_ context.Context 4307 header_ http.Header 4308 } 4309 4310 // Patch: Patches a deployment and all of the resources described by the 4311 // deployment manifest. 4312 // 4313 // - deployment: The name of the deployment for this request. 4314 // - project: The project ID for this request. 4315 func (r *DeploymentsService) Patch(project string, deployment string, deployment2 *Deployment) *DeploymentsPatchCall { 4316 c := &DeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4317 c.project = project 4318 c.deployment = deployment 4319 c.deployment2 = deployment2 4320 return c 4321 } 4322 4323 // CreatePolicy sets the optional parameter "createPolicy": Sets the policy to 4324 // use for creating new resources. 4325 // 4326 // Possible values: 4327 // 4328 // "CREATE_OR_ACQUIRE" (default) 4329 // "ACQUIRE" 4330 // "CREATE" 4331 func (c *DeploymentsPatchCall) CreatePolicy(createPolicy string) *DeploymentsPatchCall { 4332 c.urlParams_.Set("createPolicy", createPolicy) 4333 return c 4334 } 4335 4336 // DeletePolicy sets the optional parameter "deletePolicy": Sets the policy to 4337 // use for deleting resources. 4338 // 4339 // Possible values: 4340 // 4341 // "DELETE" (default) 4342 // "ABANDON" 4343 func (c *DeploymentsPatchCall) DeletePolicy(deletePolicy string) *DeploymentsPatchCall { 4344 c.urlParams_.Set("deletePolicy", deletePolicy) 4345 return c 4346 } 4347 4348 // Preview sets the optional parameter "preview": If set to true, updates the 4349 // deployment and creates and updates the "shell" resources but does not 4350 // actually alter or instantiate these resources. This allows you to preview 4351 // what your deployment will look like. You can use this intent to preview how 4352 // an update would affect your deployment. You must provide a `target.config` 4353 // with a configuration if this is set to true. After previewing a deployment, 4354 // you can deploy your resources by making a request with the `update()` or you 4355 // can `cancelPreview()` to remove the preview altogether. Note that the 4356 // deployment will still exist after you cancel the preview and you must 4357 // separately delete this deployment if you want to remove it. 4358 func (c *DeploymentsPatchCall) Preview(preview bool) *DeploymentsPatchCall { 4359 c.urlParams_.Set("preview", fmt.Sprint(preview)) 4360 return c 4361 } 4362 4363 // Fields allows partial responses to be retrieved. See 4364 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4365 // details. 4366 func (c *DeploymentsPatchCall) Fields(s ...googleapi.Field) *DeploymentsPatchCall { 4367 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4368 return c 4369 } 4370 4371 // Context sets the context to be used in this call's Do method. 4372 func (c *DeploymentsPatchCall) Context(ctx context.Context) *DeploymentsPatchCall { 4373 c.ctx_ = ctx 4374 return c 4375 } 4376 4377 // Header returns a http.Header that can be modified by the caller to add 4378 // headers to the request. 4379 func (c *DeploymentsPatchCall) Header() http.Header { 4380 if c.header_ == nil { 4381 c.header_ = make(http.Header) 4382 } 4383 return c.header_ 4384 } 4385 4386 func (c *DeploymentsPatchCall) doRequest(alt string) (*http.Response, error) { 4387 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4388 var body io.Reader = nil 4389 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment2) 4390 if err != nil { 4391 return nil, err 4392 } 4393 c.urlParams_.Set("alt", alt) 4394 c.urlParams_.Set("prettyPrint", "false") 4395 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/deployments/{deployment}") 4396 urls += "?" + c.urlParams_.Encode() 4397 req, err := http.NewRequest("PATCH", urls, body) 4398 if err != nil { 4399 return nil, err 4400 } 4401 req.Header = reqHeaders 4402 googleapi.Expand(req.URL, map[string]string{ 4403 "project": c.project, 4404 "deployment": c.deployment, 4405 }) 4406 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4407 } 4408 4409 // Do executes the "deploymentmanager.deployments.patch" call. 4410 // Any non-2xx status code is an error. Response headers are in either 4411 // *Operation.ServerResponse.Header or (if a response was returned at all) in 4412 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4413 // whether the returned error was because http.StatusNotModified was returned. 4414 func (c *DeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4415 gensupport.SetOptions(c.urlParams_, opts...) 4416 res, err := c.doRequest("json") 4417 if res != nil && res.StatusCode == http.StatusNotModified { 4418 if res.Body != nil { 4419 res.Body.Close() 4420 } 4421 return nil, gensupport.WrapError(&googleapi.Error{ 4422 Code: res.StatusCode, 4423 Header: res.Header, 4424 }) 4425 } 4426 if err != nil { 4427 return nil, err 4428 } 4429 defer googleapi.CloseBody(res) 4430 if err := googleapi.CheckResponse(res); err != nil { 4431 return nil, gensupport.WrapError(err) 4432 } 4433 ret := &Operation{ 4434 ServerResponse: googleapi.ServerResponse{ 4435 Header: res.Header, 4436 HTTPStatusCode: res.StatusCode, 4437 }, 4438 } 4439 target := &ret 4440 if err := gensupport.DecodeResponse(target, res); err != nil { 4441 return nil, err 4442 } 4443 return ret, nil 4444 } 4445 4446 type DeploymentsSetIamPolicyCall struct { 4447 s *Service 4448 project string 4449 resource string 4450 globalsetpolicyrequest *GlobalSetPolicyRequest 4451 urlParams_ gensupport.URLParams 4452 ctx_ context.Context 4453 header_ http.Header 4454 } 4455 4456 // SetIamPolicy: Sets the access control policy on the specified resource. 4457 // Replaces any existing policy. 4458 // 4459 // - project: Project ID for this request. 4460 // - resource: Name or id of the resource for this request. 4461 func (r *DeploymentsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *DeploymentsSetIamPolicyCall { 4462 c := &DeploymentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4463 c.project = project 4464 c.resource = resource 4465 c.globalsetpolicyrequest = globalsetpolicyrequest 4466 return c 4467 } 4468 4469 // Fields allows partial responses to be retrieved. See 4470 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4471 // details. 4472 func (c *DeploymentsSetIamPolicyCall) Fields(s ...googleapi.Field) *DeploymentsSetIamPolicyCall { 4473 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4474 return c 4475 } 4476 4477 // Context sets the context to be used in this call's Do method. 4478 func (c *DeploymentsSetIamPolicyCall) Context(ctx context.Context) *DeploymentsSetIamPolicyCall { 4479 c.ctx_ = ctx 4480 return c 4481 } 4482 4483 // Header returns a http.Header that can be modified by the caller to add 4484 // headers to the request. 4485 func (c *DeploymentsSetIamPolicyCall) Header() http.Header { 4486 if c.header_ == nil { 4487 c.header_ = make(http.Header) 4488 } 4489 return c.header_ 4490 } 4491 4492 func (c *DeploymentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 4493 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4494 var body io.Reader = nil 4495 body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) 4496 if err != nil { 4497 return nil, err 4498 } 4499 c.urlParams_.Set("alt", alt) 4500 c.urlParams_.Set("prettyPrint", "false") 4501 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/deployments/{resource}/setIamPolicy") 4502 urls += "?" + c.urlParams_.Encode() 4503 req, err := http.NewRequest("POST", urls, body) 4504 if err != nil { 4505 return nil, err 4506 } 4507 req.Header = reqHeaders 4508 googleapi.Expand(req.URL, map[string]string{ 4509 "project": c.project, 4510 "resource": c.resource, 4511 }) 4512 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4513 } 4514 4515 // Do executes the "deploymentmanager.deployments.setIamPolicy" call. 4516 // Any non-2xx status code is an error. Response headers are in either 4517 // *Policy.ServerResponse.Header or (if a response was returned at all) in 4518 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4519 // whether the returned error was because http.StatusNotModified was returned. 4520 func (c *DeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 4521 gensupport.SetOptions(c.urlParams_, opts...) 4522 res, err := c.doRequest("json") 4523 if res != nil && res.StatusCode == http.StatusNotModified { 4524 if res.Body != nil { 4525 res.Body.Close() 4526 } 4527 return nil, gensupport.WrapError(&googleapi.Error{ 4528 Code: res.StatusCode, 4529 Header: res.Header, 4530 }) 4531 } 4532 if err != nil { 4533 return nil, err 4534 } 4535 defer googleapi.CloseBody(res) 4536 if err := googleapi.CheckResponse(res); err != nil { 4537 return nil, gensupport.WrapError(err) 4538 } 4539 ret := &Policy{ 4540 ServerResponse: googleapi.ServerResponse{ 4541 Header: res.Header, 4542 HTTPStatusCode: res.StatusCode, 4543 }, 4544 } 4545 target := &ret 4546 if err := gensupport.DecodeResponse(target, res); err != nil { 4547 return nil, err 4548 } 4549 return ret, nil 4550 } 4551 4552 type DeploymentsStopCall struct { 4553 s *Service 4554 project string 4555 deployment string 4556 deploymentsstoprequest *DeploymentsStopRequest 4557 urlParams_ gensupport.URLParams 4558 ctx_ context.Context 4559 header_ http.Header 4560 } 4561 4562 // Stop: Stops an ongoing operation. This does not roll back any work that has 4563 // already been completed, but prevents any new work from being started. 4564 // 4565 // - deployment: The name of the deployment for this request. 4566 // - project: The project ID for this request. 4567 func (r *DeploymentsService) Stop(project string, deployment string, deploymentsstoprequest *DeploymentsStopRequest) *DeploymentsStopCall { 4568 c := &DeploymentsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4569 c.project = project 4570 c.deployment = deployment 4571 c.deploymentsstoprequest = deploymentsstoprequest 4572 return c 4573 } 4574 4575 // Fields allows partial responses to be retrieved. See 4576 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4577 // details. 4578 func (c *DeploymentsStopCall) Fields(s ...googleapi.Field) *DeploymentsStopCall { 4579 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4580 return c 4581 } 4582 4583 // Context sets the context to be used in this call's Do method. 4584 func (c *DeploymentsStopCall) Context(ctx context.Context) *DeploymentsStopCall { 4585 c.ctx_ = ctx 4586 return c 4587 } 4588 4589 // Header returns a http.Header that can be modified by the caller to add 4590 // headers to the request. 4591 func (c *DeploymentsStopCall) Header() http.Header { 4592 if c.header_ == nil { 4593 c.header_ = make(http.Header) 4594 } 4595 return c.header_ 4596 } 4597 4598 func (c *DeploymentsStopCall) doRequest(alt string) (*http.Response, error) { 4599 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4600 var body io.Reader = nil 4601 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deploymentsstoprequest) 4602 if err != nil { 4603 return nil, err 4604 } 4605 c.urlParams_.Set("alt", alt) 4606 c.urlParams_.Set("prettyPrint", "false") 4607 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/deployments/{deployment}/stop") 4608 urls += "?" + c.urlParams_.Encode() 4609 req, err := http.NewRequest("POST", urls, body) 4610 if err != nil { 4611 return nil, err 4612 } 4613 req.Header = reqHeaders 4614 googleapi.Expand(req.URL, map[string]string{ 4615 "project": c.project, 4616 "deployment": c.deployment, 4617 }) 4618 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4619 } 4620 4621 // Do executes the "deploymentmanager.deployments.stop" call. 4622 // Any non-2xx status code is an error. Response headers are in either 4623 // *Operation.ServerResponse.Header or (if a response was returned at all) in 4624 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4625 // whether the returned error was because http.StatusNotModified was returned. 4626 func (c *DeploymentsStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4627 gensupport.SetOptions(c.urlParams_, opts...) 4628 res, err := c.doRequest("json") 4629 if res != nil && res.StatusCode == http.StatusNotModified { 4630 if res.Body != nil { 4631 res.Body.Close() 4632 } 4633 return nil, gensupport.WrapError(&googleapi.Error{ 4634 Code: res.StatusCode, 4635 Header: res.Header, 4636 }) 4637 } 4638 if err != nil { 4639 return nil, err 4640 } 4641 defer googleapi.CloseBody(res) 4642 if err := googleapi.CheckResponse(res); err != nil { 4643 return nil, gensupport.WrapError(err) 4644 } 4645 ret := &Operation{ 4646 ServerResponse: googleapi.ServerResponse{ 4647 Header: res.Header, 4648 HTTPStatusCode: res.StatusCode, 4649 }, 4650 } 4651 target := &ret 4652 if err := gensupport.DecodeResponse(target, res); err != nil { 4653 return nil, err 4654 } 4655 return ret, nil 4656 } 4657 4658 type DeploymentsTestIamPermissionsCall struct { 4659 s *Service 4660 project string 4661 resource string 4662 testpermissionsrequest *TestPermissionsRequest 4663 urlParams_ gensupport.URLParams 4664 ctx_ context.Context 4665 header_ http.Header 4666 } 4667 4668 // TestIamPermissions: Returns permissions that a caller has on the specified 4669 // resource. 4670 // 4671 // - project: Project ID for this request. 4672 // - resource: Name or id of the resource for this request. 4673 func (r *DeploymentsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *DeploymentsTestIamPermissionsCall { 4674 c := &DeploymentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4675 c.project = project 4676 c.resource = resource 4677 c.testpermissionsrequest = testpermissionsrequest 4678 return c 4679 } 4680 4681 // Fields allows partial responses to be retrieved. See 4682 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4683 // details. 4684 func (c *DeploymentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *DeploymentsTestIamPermissionsCall { 4685 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4686 return c 4687 } 4688 4689 // Context sets the context to be used in this call's Do method. 4690 func (c *DeploymentsTestIamPermissionsCall) Context(ctx context.Context) *DeploymentsTestIamPermissionsCall { 4691 c.ctx_ = ctx 4692 return c 4693 } 4694 4695 // Header returns a http.Header that can be modified by the caller to add 4696 // headers to the request. 4697 func (c *DeploymentsTestIamPermissionsCall) Header() http.Header { 4698 if c.header_ == nil { 4699 c.header_ = make(http.Header) 4700 } 4701 return c.header_ 4702 } 4703 4704 func (c *DeploymentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 4705 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4706 var body io.Reader = nil 4707 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) 4708 if err != nil { 4709 return nil, err 4710 } 4711 c.urlParams_.Set("alt", alt) 4712 c.urlParams_.Set("prettyPrint", "false") 4713 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/deployments/{resource}/testIamPermissions") 4714 urls += "?" + c.urlParams_.Encode() 4715 req, err := http.NewRequest("POST", urls, body) 4716 if err != nil { 4717 return nil, err 4718 } 4719 req.Header = reqHeaders 4720 googleapi.Expand(req.URL, map[string]string{ 4721 "project": c.project, 4722 "resource": c.resource, 4723 }) 4724 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4725 } 4726 4727 // Do executes the "deploymentmanager.deployments.testIamPermissions" call. 4728 // Any non-2xx status code is an error. Response headers are in either 4729 // *TestPermissionsResponse.ServerResponse.Header or (if a response was 4730 // returned at all) in error.(*googleapi.Error).Header. Use 4731 // googleapi.IsNotModified to check whether the returned error was because 4732 // http.StatusNotModified was returned. 4733 func (c *DeploymentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { 4734 gensupport.SetOptions(c.urlParams_, opts...) 4735 res, err := c.doRequest("json") 4736 if res != nil && res.StatusCode == http.StatusNotModified { 4737 if res.Body != nil { 4738 res.Body.Close() 4739 } 4740 return nil, gensupport.WrapError(&googleapi.Error{ 4741 Code: res.StatusCode, 4742 Header: res.Header, 4743 }) 4744 } 4745 if err != nil { 4746 return nil, err 4747 } 4748 defer googleapi.CloseBody(res) 4749 if err := googleapi.CheckResponse(res); err != nil { 4750 return nil, gensupport.WrapError(err) 4751 } 4752 ret := &TestPermissionsResponse{ 4753 ServerResponse: googleapi.ServerResponse{ 4754 Header: res.Header, 4755 HTTPStatusCode: res.StatusCode, 4756 }, 4757 } 4758 target := &ret 4759 if err := gensupport.DecodeResponse(target, res); err != nil { 4760 return nil, err 4761 } 4762 return ret, nil 4763 } 4764 4765 type DeploymentsUpdateCall struct { 4766 s *Service 4767 project string 4768 deployment string 4769 deployment2 *Deployment 4770 urlParams_ gensupport.URLParams 4771 ctx_ context.Context 4772 header_ http.Header 4773 } 4774 4775 // Update: Updates a deployment and all of the resources described by the 4776 // deployment manifest. 4777 // 4778 // - deployment: The name of the deployment for this request. 4779 // - project: The project ID for this request. 4780 func (r *DeploymentsService) Update(project string, deployment string, deployment2 *Deployment) *DeploymentsUpdateCall { 4781 c := &DeploymentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4782 c.project = project 4783 c.deployment = deployment 4784 c.deployment2 = deployment2 4785 return c 4786 } 4787 4788 // CreatePolicy sets the optional parameter "createPolicy": Sets the policy to 4789 // use for creating new resources. 4790 // 4791 // Possible values: 4792 // 4793 // "CREATE_OR_ACQUIRE" (default) 4794 // "ACQUIRE" 4795 // "CREATE" 4796 func (c *DeploymentsUpdateCall) CreatePolicy(createPolicy string) *DeploymentsUpdateCall { 4797 c.urlParams_.Set("createPolicy", createPolicy) 4798 return c 4799 } 4800 4801 // DeletePolicy sets the optional parameter "deletePolicy": Sets the policy to 4802 // use for deleting resources. 4803 // 4804 // Possible values: 4805 // 4806 // "DELETE" (default) 4807 // "ABANDON" 4808 func (c *DeploymentsUpdateCall) DeletePolicy(deletePolicy string) *DeploymentsUpdateCall { 4809 c.urlParams_.Set("deletePolicy", deletePolicy) 4810 return c 4811 } 4812 4813 // Preview sets the optional parameter "preview": If set to true, updates the 4814 // deployment and creates and updates the "shell" resources but does not 4815 // actually alter or instantiate these resources. This allows you to preview 4816 // what your deployment will look like. You can use this intent to preview how 4817 // an update would affect your deployment. You must provide a `target.config` 4818 // with a configuration if this is set to true. After previewing a deployment, 4819 // you can deploy your resources by making a request with the `update()` or you 4820 // can `cancelPreview()` to remove the preview altogether. Note that the 4821 // deployment will still exist after you cancel the preview and you must 4822 // separately delete this deployment if you want to remove it. 4823 func (c *DeploymentsUpdateCall) Preview(preview bool) *DeploymentsUpdateCall { 4824 c.urlParams_.Set("preview", fmt.Sprint(preview)) 4825 return c 4826 } 4827 4828 // Fields allows partial responses to be retrieved. See 4829 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4830 // details. 4831 func (c *DeploymentsUpdateCall) Fields(s ...googleapi.Field) *DeploymentsUpdateCall { 4832 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4833 return c 4834 } 4835 4836 // Context sets the context to be used in this call's Do method. 4837 func (c *DeploymentsUpdateCall) Context(ctx context.Context) *DeploymentsUpdateCall { 4838 c.ctx_ = ctx 4839 return c 4840 } 4841 4842 // Header returns a http.Header that can be modified by the caller to add 4843 // headers to the request. 4844 func (c *DeploymentsUpdateCall) Header() http.Header { 4845 if c.header_ == nil { 4846 c.header_ = make(http.Header) 4847 } 4848 return c.header_ 4849 } 4850 4851 func (c *DeploymentsUpdateCall) doRequest(alt string) (*http.Response, error) { 4852 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4853 var body io.Reader = nil 4854 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment2) 4855 if err != nil { 4856 return nil, err 4857 } 4858 c.urlParams_.Set("alt", alt) 4859 c.urlParams_.Set("prettyPrint", "false") 4860 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/deployments/{deployment}") 4861 urls += "?" + c.urlParams_.Encode() 4862 req, err := http.NewRequest("PUT", urls, body) 4863 if err != nil { 4864 return nil, err 4865 } 4866 req.Header = reqHeaders 4867 googleapi.Expand(req.URL, map[string]string{ 4868 "project": c.project, 4869 "deployment": c.deployment, 4870 }) 4871 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4872 } 4873 4874 // Do executes the "deploymentmanager.deployments.update" call. 4875 // Any non-2xx status code is an error. Response headers are in either 4876 // *Operation.ServerResponse.Header or (if a response was returned at all) in 4877 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4878 // whether the returned error was because http.StatusNotModified was returned. 4879 func (c *DeploymentsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4880 gensupport.SetOptions(c.urlParams_, opts...) 4881 res, err := c.doRequest("json") 4882 if res != nil && res.StatusCode == http.StatusNotModified { 4883 if res.Body != nil { 4884 res.Body.Close() 4885 } 4886 return nil, gensupport.WrapError(&googleapi.Error{ 4887 Code: res.StatusCode, 4888 Header: res.Header, 4889 }) 4890 } 4891 if err != nil { 4892 return nil, err 4893 } 4894 defer googleapi.CloseBody(res) 4895 if err := googleapi.CheckResponse(res); err != nil { 4896 return nil, gensupport.WrapError(err) 4897 } 4898 ret := &Operation{ 4899 ServerResponse: googleapi.ServerResponse{ 4900 Header: res.Header, 4901 HTTPStatusCode: res.StatusCode, 4902 }, 4903 } 4904 target := &ret 4905 if err := gensupport.DecodeResponse(target, res); err != nil { 4906 return nil, err 4907 } 4908 return ret, nil 4909 } 4910 4911 type ManifestsGetCall struct { 4912 s *Service 4913 project string 4914 deployment string 4915 manifest string 4916 urlParams_ gensupport.URLParams 4917 ifNoneMatch_ string 4918 ctx_ context.Context 4919 header_ http.Header 4920 } 4921 4922 // Get: Gets information about a specific manifest. 4923 // 4924 // - deployment: The name of the deployment for this request. 4925 // - manifest: The name of the manifest for this request. 4926 // - project: The project ID for this request. 4927 func (r *ManifestsService) Get(project string, deployment string, manifest string) *ManifestsGetCall { 4928 c := &ManifestsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4929 c.project = project 4930 c.deployment = deployment 4931 c.manifest = manifest 4932 return c 4933 } 4934 4935 // Fields allows partial responses to be retrieved. See 4936 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4937 // details. 4938 func (c *ManifestsGetCall) Fields(s ...googleapi.Field) *ManifestsGetCall { 4939 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4940 return c 4941 } 4942 4943 // IfNoneMatch sets an optional parameter which makes the operation fail if the 4944 // object's ETag matches the given value. This is useful for getting updates 4945 // only after the object has changed since the last request. 4946 func (c *ManifestsGetCall) IfNoneMatch(entityTag string) *ManifestsGetCall { 4947 c.ifNoneMatch_ = entityTag 4948 return c 4949 } 4950 4951 // Context sets the context to be used in this call's Do method. 4952 func (c *ManifestsGetCall) Context(ctx context.Context) *ManifestsGetCall { 4953 c.ctx_ = ctx 4954 return c 4955 } 4956 4957 // Header returns a http.Header that can be modified by the caller to add 4958 // headers to the request. 4959 func (c *ManifestsGetCall) Header() http.Header { 4960 if c.header_ == nil { 4961 c.header_ = make(http.Header) 4962 } 4963 return c.header_ 4964 } 4965 4966 func (c *ManifestsGetCall) doRequest(alt string) (*http.Response, error) { 4967 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 4968 if c.ifNoneMatch_ != "" { 4969 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4970 } 4971 var body io.Reader = nil 4972 c.urlParams_.Set("alt", alt) 4973 c.urlParams_.Set("prettyPrint", "false") 4974 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/deployments/{deployment}/manifests/{manifest}") 4975 urls += "?" + c.urlParams_.Encode() 4976 req, err := http.NewRequest("GET", urls, body) 4977 if err != nil { 4978 return nil, err 4979 } 4980 req.Header = reqHeaders 4981 googleapi.Expand(req.URL, map[string]string{ 4982 "project": c.project, 4983 "deployment": c.deployment, 4984 "manifest": c.manifest, 4985 }) 4986 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4987 } 4988 4989 // Do executes the "deploymentmanager.manifests.get" call. 4990 // Any non-2xx status code is an error. Response headers are in either 4991 // *Manifest.ServerResponse.Header or (if a response was returned at all) in 4992 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4993 // whether the returned error was because http.StatusNotModified was returned. 4994 func (c *ManifestsGetCall) Do(opts ...googleapi.CallOption) (*Manifest, error) { 4995 gensupport.SetOptions(c.urlParams_, opts...) 4996 res, err := c.doRequest("json") 4997 if res != nil && res.StatusCode == http.StatusNotModified { 4998 if res.Body != nil { 4999 res.Body.Close() 5000 } 5001 return nil, gensupport.WrapError(&googleapi.Error{ 5002 Code: res.StatusCode, 5003 Header: res.Header, 5004 }) 5005 } 5006 if err != nil { 5007 return nil, err 5008 } 5009 defer googleapi.CloseBody(res) 5010 if err := googleapi.CheckResponse(res); err != nil { 5011 return nil, gensupport.WrapError(err) 5012 } 5013 ret := &Manifest{ 5014 ServerResponse: googleapi.ServerResponse{ 5015 Header: res.Header, 5016 HTTPStatusCode: res.StatusCode, 5017 }, 5018 } 5019 target := &ret 5020 if err := gensupport.DecodeResponse(target, res); err != nil { 5021 return nil, err 5022 } 5023 return ret, nil 5024 } 5025 5026 type ManifestsListCall struct { 5027 s *Service 5028 project string 5029 deployment string 5030 urlParams_ gensupport.URLParams 5031 ifNoneMatch_ string 5032 ctx_ context.Context 5033 header_ http.Header 5034 } 5035 5036 // List: Lists all manifests for a given deployment. 5037 // 5038 // - deployment: The name of the deployment for this request. 5039 // - project: The project ID for this request. 5040 func (r *ManifestsService) List(project string, deployment string) *ManifestsListCall { 5041 c := &ManifestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5042 c.project = project 5043 c.deployment = deployment 5044 return c 5045 } 5046 5047 // Filter sets the optional parameter "filter": A filter expression that 5048 // filters resources listed in the response. Most Compute resources support two 5049 // types of filter expressions: expressions that support regular expressions 5050 // and expressions that follow API improvement proposal AIP-160. These two 5051 // types of filter expressions cannot be mixed in one request. If you want to 5052 // use AIP-160, your expression must specify the field name, an operator, and 5053 // the value that you want to use for filtering. The value must be a string, a 5054 // number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, 5055 // `>=` or `:`. For example, if you are filtering Compute Engine instances, you 5056 // can exclude instances named `example-instance` by specifying `name != 5057 // example-instance`. The `:*` comparison can be used to test whether a key has 5058 // been defined. For example, to find all objects with `owner` label use: ``` 5059 // labels.owner:* ``` You can also filter nested fields. For example, you could 5060 // specify `scheduling.automaticRestart = false` to include instances only if 5061 // they are not scheduled for automatic restarts. You can use filtering on 5062 // nested fields to filter based on resource labels. To filter on multiple 5063 // expressions, provide each separate expression within parentheses. For 5064 // example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel 5065 // Skylake") ``` By default, each expression is an `AND` expression. However, 5066 // you can include `AND` and `OR` expressions explicitly. For example: ``` 5067 // (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND 5068 // (scheduling.automaticRestart = true) ``` If you want to use a regular 5069 // expression, use the `eq` (equal) or `ne` (not equal) operator against a 5070 // single un-parenthesized expression with or without quotes or against 5071 // multiple parenthesized expressions. Examples: `fieldname eq unquoted 5072 // literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted 5073 // literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal 5074 // value is interpreted as a regular expression using Google RE2 library 5075 // syntax. The literal value must match the entire field. For example, to 5076 // filter for instances that do not end with name "instance", you would use 5077 // `name ne .*instance`. You cannot combine constraints on multiple fields 5078 // using regular expressions. 5079 func (c *ManifestsListCall) Filter(filter string) *ManifestsListCall { 5080 c.urlParams_.Set("filter", filter) 5081 return c 5082 } 5083 5084 // MaxResults sets the optional parameter "maxResults": The maximum number of 5085 // results per page that should be returned. If the number of available results 5086 // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that 5087 // can be used to get the next page of results in subsequent list requests. 5088 // Acceptable values are `0` to `500`, inclusive. (Default: `500`) 5089 func (c *ManifestsListCall) MaxResults(maxResults int64) *ManifestsListCall { 5090 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 5091 return c 5092 } 5093 5094 // OrderBy sets the optional parameter "orderBy": Sorts list results by a 5095 // certain order. By default, results are returned in alphanumerical order 5096 // based on the resource name. You can also sort results in descending order 5097 // based on the creation timestamp using `orderBy="creationTimestamp desc". 5098 // This sorts results based on the `creationTimestamp` field in reverse 5099 // chronological order (newest result first). Use this to sort resources like 5100 // operations so that the newest operation is returned first. Currently, only 5101 // sorting by `name` or `creationTimestamp desc` is supported. 5102 func (c *ManifestsListCall) OrderBy(orderBy string) *ManifestsListCall { 5103 c.urlParams_.Set("orderBy", orderBy) 5104 return c 5105 } 5106 5107 // PageToken sets the optional parameter "pageToken": Specifies a page token to 5108 // use. Set `pageToken` to the `nextPageToken` returned by a previous list 5109 // request to get the next page of results. 5110 func (c *ManifestsListCall) PageToken(pageToken string) *ManifestsListCall { 5111 c.urlParams_.Set("pageToken", pageToken) 5112 return c 5113 } 5114 5115 // Fields allows partial responses to be retrieved. See 5116 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 5117 // details. 5118 func (c *ManifestsListCall) Fields(s ...googleapi.Field) *ManifestsListCall { 5119 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5120 return c 5121 } 5122 5123 // IfNoneMatch sets an optional parameter which makes the operation fail if the 5124 // object's ETag matches the given value. This is useful for getting updates 5125 // only after the object has changed since the last request. 5126 func (c *ManifestsListCall) IfNoneMatch(entityTag string) *ManifestsListCall { 5127 c.ifNoneMatch_ = entityTag 5128 return c 5129 } 5130 5131 // Context sets the context to be used in this call's Do method. 5132 func (c *ManifestsListCall) Context(ctx context.Context) *ManifestsListCall { 5133 c.ctx_ = ctx 5134 return c 5135 } 5136 5137 // Header returns a http.Header that can be modified by the caller to add 5138 // headers to the request. 5139 func (c *ManifestsListCall) Header() http.Header { 5140 if c.header_ == nil { 5141 c.header_ = make(http.Header) 5142 } 5143 return c.header_ 5144 } 5145 5146 func (c *ManifestsListCall) doRequest(alt string) (*http.Response, error) { 5147 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 5148 if c.ifNoneMatch_ != "" { 5149 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5150 } 5151 var body io.Reader = nil 5152 c.urlParams_.Set("alt", alt) 5153 c.urlParams_.Set("prettyPrint", "false") 5154 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/deployments/{deployment}/manifests") 5155 urls += "?" + c.urlParams_.Encode() 5156 req, err := http.NewRequest("GET", urls, body) 5157 if err != nil { 5158 return nil, err 5159 } 5160 req.Header = reqHeaders 5161 googleapi.Expand(req.URL, map[string]string{ 5162 "project": c.project, 5163 "deployment": c.deployment, 5164 }) 5165 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5166 } 5167 5168 // Do executes the "deploymentmanager.manifests.list" call. 5169 // Any non-2xx status code is an error. Response headers are in either 5170 // *ManifestsListResponse.ServerResponse.Header or (if a response was returned 5171 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5172 // check whether the returned error was because http.StatusNotModified was 5173 // returned. 5174 func (c *ManifestsListCall) Do(opts ...googleapi.CallOption) (*ManifestsListResponse, error) { 5175 gensupport.SetOptions(c.urlParams_, opts...) 5176 res, err := c.doRequest("json") 5177 if res != nil && res.StatusCode == http.StatusNotModified { 5178 if res.Body != nil { 5179 res.Body.Close() 5180 } 5181 return nil, gensupport.WrapError(&googleapi.Error{ 5182 Code: res.StatusCode, 5183 Header: res.Header, 5184 }) 5185 } 5186 if err != nil { 5187 return nil, err 5188 } 5189 defer googleapi.CloseBody(res) 5190 if err := googleapi.CheckResponse(res); err != nil { 5191 return nil, gensupport.WrapError(err) 5192 } 5193 ret := &ManifestsListResponse{ 5194 ServerResponse: googleapi.ServerResponse{ 5195 Header: res.Header, 5196 HTTPStatusCode: res.StatusCode, 5197 }, 5198 } 5199 target := &ret 5200 if err := gensupport.DecodeResponse(target, res); err != nil { 5201 return nil, err 5202 } 5203 return ret, nil 5204 } 5205 5206 // Pages invokes f for each page of results. 5207 // A non-nil error returned from f will halt the iteration. 5208 // The provided context supersedes any context provided to the Context method. 5209 func (c *ManifestsListCall) Pages(ctx context.Context, f func(*ManifestsListResponse) error) error { 5210 c.ctx_ = ctx 5211 defer c.PageToken(c.urlParams_.Get("pageToken")) 5212 for { 5213 x, err := c.Do() 5214 if err != nil { 5215 return err 5216 } 5217 if err := f(x); err != nil { 5218 return err 5219 } 5220 if x.NextPageToken == "" { 5221 return nil 5222 } 5223 c.PageToken(x.NextPageToken) 5224 } 5225 } 5226 5227 type OperationsGetCall struct { 5228 s *Service 5229 project string 5230 operation string 5231 urlParams_ gensupport.URLParams 5232 ifNoneMatch_ string 5233 ctx_ context.Context 5234 header_ http.Header 5235 } 5236 5237 // Get: Gets information about a specific operation. 5238 // 5239 // - operation: The name of the operation for this request. 5240 // - project: The project ID for this request. 5241 func (r *OperationsService) Get(project string, operation string) *OperationsGetCall { 5242 c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5243 c.project = project 5244 c.operation = operation 5245 return c 5246 } 5247 5248 // Fields allows partial responses to be retrieved. See 5249 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 5250 // details. 5251 func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { 5252 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5253 return c 5254 } 5255 5256 // IfNoneMatch sets an optional parameter which makes the operation fail if the 5257 // object's ETag matches the given value. This is useful for getting updates 5258 // only after the object has changed since the last request. 5259 func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { 5260 c.ifNoneMatch_ = entityTag 5261 return c 5262 } 5263 5264 // Context sets the context to be used in this call's Do method. 5265 func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { 5266 c.ctx_ = ctx 5267 return c 5268 } 5269 5270 // Header returns a http.Header that can be modified by the caller to add 5271 // headers to the request. 5272 func (c *OperationsGetCall) Header() http.Header { 5273 if c.header_ == nil { 5274 c.header_ = make(http.Header) 5275 } 5276 return c.header_ 5277 } 5278 5279 func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { 5280 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 5281 if c.ifNoneMatch_ != "" { 5282 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5283 } 5284 var body io.Reader = nil 5285 c.urlParams_.Set("alt", alt) 5286 c.urlParams_.Set("prettyPrint", "false") 5287 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/operations/{operation}") 5288 urls += "?" + c.urlParams_.Encode() 5289 req, err := http.NewRequest("GET", urls, body) 5290 if err != nil { 5291 return nil, err 5292 } 5293 req.Header = reqHeaders 5294 googleapi.Expand(req.URL, map[string]string{ 5295 "project": c.project, 5296 "operation": c.operation, 5297 }) 5298 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5299 } 5300 5301 // Do executes the "deploymentmanager.operations.get" call. 5302 // Any non-2xx status code is an error. Response headers are in either 5303 // *Operation.ServerResponse.Header or (if a response was returned at all) in 5304 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5305 // whether the returned error was because http.StatusNotModified was returned. 5306 func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5307 gensupport.SetOptions(c.urlParams_, opts...) 5308 res, err := c.doRequest("json") 5309 if res != nil && res.StatusCode == http.StatusNotModified { 5310 if res.Body != nil { 5311 res.Body.Close() 5312 } 5313 return nil, gensupport.WrapError(&googleapi.Error{ 5314 Code: res.StatusCode, 5315 Header: res.Header, 5316 }) 5317 } 5318 if err != nil { 5319 return nil, err 5320 } 5321 defer googleapi.CloseBody(res) 5322 if err := googleapi.CheckResponse(res); err != nil { 5323 return nil, gensupport.WrapError(err) 5324 } 5325 ret := &Operation{ 5326 ServerResponse: googleapi.ServerResponse{ 5327 Header: res.Header, 5328 HTTPStatusCode: res.StatusCode, 5329 }, 5330 } 5331 target := &ret 5332 if err := gensupport.DecodeResponse(target, res); err != nil { 5333 return nil, err 5334 } 5335 return ret, nil 5336 } 5337 5338 type OperationsListCall struct { 5339 s *Service 5340 project string 5341 urlParams_ gensupport.URLParams 5342 ifNoneMatch_ string 5343 ctx_ context.Context 5344 header_ http.Header 5345 } 5346 5347 // List: Lists all operations for a project. 5348 // 5349 // - project: The project ID for this request. 5350 func (r *OperationsService) List(project string) *OperationsListCall { 5351 c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5352 c.project = project 5353 return c 5354 } 5355 5356 // Filter sets the optional parameter "filter": A filter expression that 5357 // filters resources listed in the response. Most Compute resources support two 5358 // types of filter expressions: expressions that support regular expressions 5359 // and expressions that follow API improvement proposal AIP-160. These two 5360 // types of filter expressions cannot be mixed in one request. If you want to 5361 // use AIP-160, your expression must specify the field name, an operator, and 5362 // the value that you want to use for filtering. The value must be a string, a 5363 // number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, 5364 // `>=` or `:`. For example, if you are filtering Compute Engine instances, you 5365 // can exclude instances named `example-instance` by specifying `name != 5366 // example-instance`. The `:*` comparison can be used to test whether a key has 5367 // been defined. For example, to find all objects with `owner` label use: ``` 5368 // labels.owner:* ``` You can also filter nested fields. For example, you could 5369 // specify `scheduling.automaticRestart = false` to include instances only if 5370 // they are not scheduled for automatic restarts. You can use filtering on 5371 // nested fields to filter based on resource labels. To filter on multiple 5372 // expressions, provide each separate expression within parentheses. For 5373 // example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel 5374 // Skylake") ``` By default, each expression is an `AND` expression. However, 5375 // you can include `AND` and `OR` expressions explicitly. For example: ``` 5376 // (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND 5377 // (scheduling.automaticRestart = true) ``` If you want to use a regular 5378 // expression, use the `eq` (equal) or `ne` (not equal) operator against a 5379 // single un-parenthesized expression with or without quotes or against 5380 // multiple parenthesized expressions. Examples: `fieldname eq unquoted 5381 // literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted 5382 // literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal 5383 // value is interpreted as a regular expression using Google RE2 library 5384 // syntax. The literal value must match the entire field. For example, to 5385 // filter for instances that do not end with name "instance", you would use 5386 // `name ne .*instance`. You cannot combine constraints on multiple fields 5387 // using regular expressions. 5388 func (c *OperationsListCall) Filter(filter string) *OperationsListCall { 5389 c.urlParams_.Set("filter", filter) 5390 return c 5391 } 5392 5393 // MaxResults sets the optional parameter "maxResults": The maximum number of 5394 // results per page that should be returned. If the number of available results 5395 // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that 5396 // can be used to get the next page of results in subsequent list requests. 5397 // Acceptable values are `0` to `500`, inclusive. (Default: `500`) 5398 func (c *OperationsListCall) MaxResults(maxResults int64) *OperationsListCall { 5399 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 5400 return c 5401 } 5402 5403 // OrderBy sets the optional parameter "orderBy": Sorts list results by a 5404 // certain order. By default, results are returned in alphanumerical order 5405 // based on the resource name. You can also sort results in descending order 5406 // based on the creation timestamp using `orderBy="creationTimestamp desc". 5407 // This sorts results based on the `creationTimestamp` field in reverse 5408 // chronological order (newest result first). Use this to sort resources like 5409 // operations so that the newest operation is returned first. Currently, only 5410 // sorting by `name` or `creationTimestamp desc` is supported. 5411 func (c *OperationsListCall) OrderBy(orderBy string) *OperationsListCall { 5412 c.urlParams_.Set("orderBy", orderBy) 5413 return c 5414 } 5415 5416 // PageToken sets the optional parameter "pageToken": Specifies a page token to 5417 // use. Set `pageToken` to the `nextPageToken` returned by a previous list 5418 // request to get the next page of results. 5419 func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { 5420 c.urlParams_.Set("pageToken", pageToken) 5421 return c 5422 } 5423 5424 // Fields allows partial responses to be retrieved. See 5425 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 5426 // details. 5427 func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { 5428 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5429 return c 5430 } 5431 5432 // IfNoneMatch sets an optional parameter which makes the operation fail if the 5433 // object's ETag matches the given value. This is useful for getting updates 5434 // only after the object has changed since the last request. 5435 func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { 5436 c.ifNoneMatch_ = entityTag 5437 return c 5438 } 5439 5440 // Context sets the context to be used in this call's Do method. 5441 func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { 5442 c.ctx_ = ctx 5443 return c 5444 } 5445 5446 // Header returns a http.Header that can be modified by the caller to add 5447 // headers to the request. 5448 func (c *OperationsListCall) Header() http.Header { 5449 if c.header_ == nil { 5450 c.header_ = make(http.Header) 5451 } 5452 return c.header_ 5453 } 5454 5455 func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { 5456 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 5457 if c.ifNoneMatch_ != "" { 5458 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5459 } 5460 var body io.Reader = nil 5461 c.urlParams_.Set("alt", alt) 5462 c.urlParams_.Set("prettyPrint", "false") 5463 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/operations") 5464 urls += "?" + c.urlParams_.Encode() 5465 req, err := http.NewRequest("GET", urls, body) 5466 if err != nil { 5467 return nil, err 5468 } 5469 req.Header = reqHeaders 5470 googleapi.Expand(req.URL, map[string]string{ 5471 "project": c.project, 5472 }) 5473 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5474 } 5475 5476 // Do executes the "deploymentmanager.operations.list" call. 5477 // Any non-2xx status code is an error. Response headers are in either 5478 // *OperationsListResponse.ServerResponse.Header or (if a response was returned 5479 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5480 // check whether the returned error was because http.StatusNotModified was 5481 // returned. 5482 func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListResponse, error) { 5483 gensupport.SetOptions(c.urlParams_, opts...) 5484 res, err := c.doRequest("json") 5485 if res != nil && res.StatusCode == http.StatusNotModified { 5486 if res.Body != nil { 5487 res.Body.Close() 5488 } 5489 return nil, gensupport.WrapError(&googleapi.Error{ 5490 Code: res.StatusCode, 5491 Header: res.Header, 5492 }) 5493 } 5494 if err != nil { 5495 return nil, err 5496 } 5497 defer googleapi.CloseBody(res) 5498 if err := googleapi.CheckResponse(res); err != nil { 5499 return nil, gensupport.WrapError(err) 5500 } 5501 ret := &OperationsListResponse{ 5502 ServerResponse: googleapi.ServerResponse{ 5503 Header: res.Header, 5504 HTTPStatusCode: res.StatusCode, 5505 }, 5506 } 5507 target := &ret 5508 if err := gensupport.DecodeResponse(target, res); err != nil { 5509 return nil, err 5510 } 5511 return ret, nil 5512 } 5513 5514 // Pages invokes f for each page of results. 5515 // A non-nil error returned from f will halt the iteration. 5516 // The provided context supersedes any context provided to the Context method. 5517 func (c *OperationsListCall) Pages(ctx context.Context, f func(*OperationsListResponse) error) error { 5518 c.ctx_ = ctx 5519 defer c.PageToken(c.urlParams_.Get("pageToken")) 5520 for { 5521 x, err := c.Do() 5522 if err != nil { 5523 return err 5524 } 5525 if err := f(x); err != nil { 5526 return err 5527 } 5528 if x.NextPageToken == "" { 5529 return nil 5530 } 5531 c.PageToken(x.NextPageToken) 5532 } 5533 } 5534 5535 type ResourcesGetCall struct { 5536 s *Service 5537 project string 5538 deployment string 5539 resource string 5540 urlParams_ gensupport.URLParams 5541 ifNoneMatch_ string 5542 ctx_ context.Context 5543 header_ http.Header 5544 } 5545 5546 // Get: Gets information about a single resource. 5547 // 5548 // - deployment: The name of the deployment for this request. 5549 // - project: The project ID for this request. 5550 // - resource: The name of the resource for this request. 5551 func (r *ResourcesService) Get(project string, deployment string, resource string) *ResourcesGetCall { 5552 c := &ResourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5553 c.project = project 5554 c.deployment = deployment 5555 c.resource = resource 5556 return c 5557 } 5558 5559 // Fields allows partial responses to be retrieved. See 5560 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 5561 // details. 5562 func (c *ResourcesGetCall) Fields(s ...googleapi.Field) *ResourcesGetCall { 5563 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5564 return c 5565 } 5566 5567 // IfNoneMatch sets an optional parameter which makes the operation fail if the 5568 // object's ETag matches the given value. This is useful for getting updates 5569 // only after the object has changed since the last request. 5570 func (c *ResourcesGetCall) IfNoneMatch(entityTag string) *ResourcesGetCall { 5571 c.ifNoneMatch_ = entityTag 5572 return c 5573 } 5574 5575 // Context sets the context to be used in this call's Do method. 5576 func (c *ResourcesGetCall) Context(ctx context.Context) *ResourcesGetCall { 5577 c.ctx_ = ctx 5578 return c 5579 } 5580 5581 // Header returns a http.Header that can be modified by the caller to add 5582 // headers to the request. 5583 func (c *ResourcesGetCall) Header() http.Header { 5584 if c.header_ == nil { 5585 c.header_ = make(http.Header) 5586 } 5587 return c.header_ 5588 } 5589 5590 func (c *ResourcesGetCall) doRequest(alt string) (*http.Response, error) { 5591 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 5592 if c.ifNoneMatch_ != "" { 5593 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5594 } 5595 var body io.Reader = nil 5596 c.urlParams_.Set("alt", alt) 5597 c.urlParams_.Set("prettyPrint", "false") 5598 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/deployments/{deployment}/resources/{resource}") 5599 urls += "?" + c.urlParams_.Encode() 5600 req, err := http.NewRequest("GET", urls, body) 5601 if err != nil { 5602 return nil, err 5603 } 5604 req.Header = reqHeaders 5605 googleapi.Expand(req.URL, map[string]string{ 5606 "project": c.project, 5607 "deployment": c.deployment, 5608 "resource": c.resource, 5609 }) 5610 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5611 } 5612 5613 // Do executes the "deploymentmanager.resources.get" call. 5614 // Any non-2xx status code is an error. Response headers are in either 5615 // *Resource.ServerResponse.Header or (if a response was returned at all) in 5616 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5617 // whether the returned error was because http.StatusNotModified was returned. 5618 func (c *ResourcesGetCall) Do(opts ...googleapi.CallOption) (*Resource, error) { 5619 gensupport.SetOptions(c.urlParams_, opts...) 5620 res, err := c.doRequest("json") 5621 if res != nil && res.StatusCode == http.StatusNotModified { 5622 if res.Body != nil { 5623 res.Body.Close() 5624 } 5625 return nil, gensupport.WrapError(&googleapi.Error{ 5626 Code: res.StatusCode, 5627 Header: res.Header, 5628 }) 5629 } 5630 if err != nil { 5631 return nil, err 5632 } 5633 defer googleapi.CloseBody(res) 5634 if err := googleapi.CheckResponse(res); err != nil { 5635 return nil, gensupport.WrapError(err) 5636 } 5637 ret := &Resource{ 5638 ServerResponse: googleapi.ServerResponse{ 5639 Header: res.Header, 5640 HTTPStatusCode: res.StatusCode, 5641 }, 5642 } 5643 target := &ret 5644 if err := gensupport.DecodeResponse(target, res); err != nil { 5645 return nil, err 5646 } 5647 return ret, nil 5648 } 5649 5650 type ResourcesListCall struct { 5651 s *Service 5652 project string 5653 deployment string 5654 urlParams_ gensupport.URLParams 5655 ifNoneMatch_ string 5656 ctx_ context.Context 5657 header_ http.Header 5658 } 5659 5660 // List: Lists all resources in a given deployment. 5661 // 5662 // - deployment: The name of the deployment for this request. 5663 // - project: The project ID for this request. 5664 func (r *ResourcesService) List(project string, deployment string) *ResourcesListCall { 5665 c := &ResourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5666 c.project = project 5667 c.deployment = deployment 5668 return c 5669 } 5670 5671 // Filter sets the optional parameter "filter": A filter expression that 5672 // filters resources listed in the response. Most Compute resources support two 5673 // types of filter expressions: expressions that support regular expressions 5674 // and expressions that follow API improvement proposal AIP-160. These two 5675 // types of filter expressions cannot be mixed in one request. If you want to 5676 // use AIP-160, your expression must specify the field name, an operator, and 5677 // the value that you want to use for filtering. The value must be a string, a 5678 // number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, 5679 // `>=` or `:`. For example, if you are filtering Compute Engine instances, you 5680 // can exclude instances named `example-instance` by specifying `name != 5681 // example-instance`. The `:*` comparison can be used to test whether a key has 5682 // been defined. For example, to find all objects with `owner` label use: ``` 5683 // labels.owner:* ``` You can also filter nested fields. For example, you could 5684 // specify `scheduling.automaticRestart = false` to include instances only if 5685 // they are not scheduled for automatic restarts. You can use filtering on 5686 // nested fields to filter based on resource labels. To filter on multiple 5687 // expressions, provide each separate expression within parentheses. For 5688 // example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel 5689 // Skylake") ``` By default, each expression is an `AND` expression. However, 5690 // you can include `AND` and `OR` expressions explicitly. For example: ``` 5691 // (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND 5692 // (scheduling.automaticRestart = true) ``` If you want to use a regular 5693 // expression, use the `eq` (equal) or `ne` (not equal) operator against a 5694 // single un-parenthesized expression with or without quotes or against 5695 // multiple parenthesized expressions. Examples: `fieldname eq unquoted 5696 // literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted 5697 // literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal 5698 // value is interpreted as a regular expression using Google RE2 library 5699 // syntax. The literal value must match the entire field. For example, to 5700 // filter for instances that do not end with name "instance", you would use 5701 // `name ne .*instance`. You cannot combine constraints on multiple fields 5702 // using regular expressions. 5703 func (c *ResourcesListCall) Filter(filter string) *ResourcesListCall { 5704 c.urlParams_.Set("filter", filter) 5705 return c 5706 } 5707 5708 // MaxResults sets the optional parameter "maxResults": The maximum number of 5709 // results per page that should be returned. If the number of available results 5710 // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that 5711 // can be used to get the next page of results in subsequent list requests. 5712 // Acceptable values are `0` to `500`, inclusive. (Default: `500`) 5713 func (c *ResourcesListCall) MaxResults(maxResults int64) *ResourcesListCall { 5714 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 5715 return c 5716 } 5717 5718 // OrderBy sets the optional parameter "orderBy": Sorts list results by a 5719 // certain order. By default, results are returned in alphanumerical order 5720 // based on the resource name. You can also sort results in descending order 5721 // based on the creation timestamp using `orderBy="creationTimestamp desc". 5722 // This sorts results based on the `creationTimestamp` field in reverse 5723 // chronological order (newest result first). Use this to sort resources like 5724 // operations so that the newest operation is returned first. Currently, only 5725 // sorting by `name` or `creationTimestamp desc` is supported. 5726 func (c *ResourcesListCall) OrderBy(orderBy string) *ResourcesListCall { 5727 c.urlParams_.Set("orderBy", orderBy) 5728 return c 5729 } 5730 5731 // PageToken sets the optional parameter "pageToken": Specifies a page token to 5732 // use. Set `pageToken` to the `nextPageToken` returned by a previous list 5733 // request to get the next page of results. 5734 func (c *ResourcesListCall) PageToken(pageToken string) *ResourcesListCall { 5735 c.urlParams_.Set("pageToken", pageToken) 5736 return c 5737 } 5738 5739 // Fields allows partial responses to be retrieved. See 5740 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 5741 // details. 5742 func (c *ResourcesListCall) Fields(s ...googleapi.Field) *ResourcesListCall { 5743 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5744 return c 5745 } 5746 5747 // IfNoneMatch sets an optional parameter which makes the operation fail if the 5748 // object's ETag matches the given value. This is useful for getting updates 5749 // only after the object has changed since the last request. 5750 func (c *ResourcesListCall) IfNoneMatch(entityTag string) *ResourcesListCall { 5751 c.ifNoneMatch_ = entityTag 5752 return c 5753 } 5754 5755 // Context sets the context to be used in this call's Do method. 5756 func (c *ResourcesListCall) Context(ctx context.Context) *ResourcesListCall { 5757 c.ctx_ = ctx 5758 return c 5759 } 5760 5761 // Header returns a http.Header that can be modified by the caller to add 5762 // headers to the request. 5763 func (c *ResourcesListCall) Header() http.Header { 5764 if c.header_ == nil { 5765 c.header_ = make(http.Header) 5766 } 5767 return c.header_ 5768 } 5769 5770 func (c *ResourcesListCall) doRequest(alt string) (*http.Response, error) { 5771 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 5772 if c.ifNoneMatch_ != "" { 5773 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5774 } 5775 var body io.Reader = nil 5776 c.urlParams_.Set("alt", alt) 5777 c.urlParams_.Set("prettyPrint", "false") 5778 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/deployments/{deployment}/resources") 5779 urls += "?" + c.urlParams_.Encode() 5780 req, err := http.NewRequest("GET", urls, body) 5781 if err != nil { 5782 return nil, err 5783 } 5784 req.Header = reqHeaders 5785 googleapi.Expand(req.URL, map[string]string{ 5786 "project": c.project, 5787 "deployment": c.deployment, 5788 }) 5789 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5790 } 5791 5792 // Do executes the "deploymentmanager.resources.list" call. 5793 // Any non-2xx status code is an error. Response headers are in either 5794 // *ResourcesListResponse.ServerResponse.Header or (if a response was returned 5795 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5796 // check whether the returned error was because http.StatusNotModified was 5797 // returned. 5798 func (c *ResourcesListCall) Do(opts ...googleapi.CallOption) (*ResourcesListResponse, error) { 5799 gensupport.SetOptions(c.urlParams_, opts...) 5800 res, err := c.doRequest("json") 5801 if res != nil && res.StatusCode == http.StatusNotModified { 5802 if res.Body != nil { 5803 res.Body.Close() 5804 } 5805 return nil, gensupport.WrapError(&googleapi.Error{ 5806 Code: res.StatusCode, 5807 Header: res.Header, 5808 }) 5809 } 5810 if err != nil { 5811 return nil, err 5812 } 5813 defer googleapi.CloseBody(res) 5814 if err := googleapi.CheckResponse(res); err != nil { 5815 return nil, gensupport.WrapError(err) 5816 } 5817 ret := &ResourcesListResponse{ 5818 ServerResponse: googleapi.ServerResponse{ 5819 Header: res.Header, 5820 HTTPStatusCode: res.StatusCode, 5821 }, 5822 } 5823 target := &ret 5824 if err := gensupport.DecodeResponse(target, res); err != nil { 5825 return nil, err 5826 } 5827 return ret, nil 5828 } 5829 5830 // Pages invokes f for each page of results. 5831 // A non-nil error returned from f will halt the iteration. 5832 // The provided context supersedes any context provided to the Context method. 5833 func (c *ResourcesListCall) Pages(ctx context.Context, f func(*ResourcesListResponse) error) error { 5834 c.ctx_ = ctx 5835 defer c.PageToken(c.urlParams_.Get("pageToken")) 5836 for { 5837 x, err := c.Do() 5838 if err != nil { 5839 return err 5840 } 5841 if err := f(x); err != nil { 5842 return err 5843 } 5844 if x.NextPageToken == "" { 5845 return nil 5846 } 5847 c.PageToken(x.NextPageToken) 5848 } 5849 } 5850 5851 type TypeProvidersDeleteCall struct { 5852 s *Service 5853 project string 5854 typeProvider string 5855 urlParams_ gensupport.URLParams 5856 ctx_ context.Context 5857 header_ http.Header 5858 } 5859 5860 // Delete: Deletes a type provider. 5861 // 5862 // - project: The project ID for this request. 5863 // - typeProvider: The name of the type provider for this request. 5864 func (r *TypeProvidersService) Delete(project string, typeProvider string) *TypeProvidersDeleteCall { 5865 c := &TypeProvidersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5866 c.project = project 5867 c.typeProvider = typeProvider 5868 return c 5869 } 5870 5871 // Fields allows partial responses to be retrieved. See 5872 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 5873 // details. 5874 func (c *TypeProvidersDeleteCall) Fields(s ...googleapi.Field) *TypeProvidersDeleteCall { 5875 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5876 return c 5877 } 5878 5879 // Context sets the context to be used in this call's Do method. 5880 func (c *TypeProvidersDeleteCall) Context(ctx context.Context) *TypeProvidersDeleteCall { 5881 c.ctx_ = ctx 5882 return c 5883 } 5884 5885 // Header returns a http.Header that can be modified by the caller to add 5886 // headers to the request. 5887 func (c *TypeProvidersDeleteCall) Header() http.Header { 5888 if c.header_ == nil { 5889 c.header_ = make(http.Header) 5890 } 5891 return c.header_ 5892 } 5893 5894 func (c *TypeProvidersDeleteCall) doRequest(alt string) (*http.Response, error) { 5895 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 5896 var body io.Reader = nil 5897 c.urlParams_.Set("alt", alt) 5898 c.urlParams_.Set("prettyPrint", "false") 5899 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/typeProviders/{typeProvider}") 5900 urls += "?" + c.urlParams_.Encode() 5901 req, err := http.NewRequest("DELETE", urls, body) 5902 if err != nil { 5903 return nil, err 5904 } 5905 req.Header = reqHeaders 5906 googleapi.Expand(req.URL, map[string]string{ 5907 "project": c.project, 5908 "typeProvider": c.typeProvider, 5909 }) 5910 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5911 } 5912 5913 // Do executes the "deploymentmanager.typeProviders.delete" call. 5914 // Any non-2xx status code is an error. Response headers are in either 5915 // *Operation.ServerResponse.Header or (if a response was returned at all) in 5916 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5917 // whether the returned error was because http.StatusNotModified was returned. 5918 func (c *TypeProvidersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5919 gensupport.SetOptions(c.urlParams_, opts...) 5920 res, err := c.doRequest("json") 5921 if res != nil && res.StatusCode == http.StatusNotModified { 5922 if res.Body != nil { 5923 res.Body.Close() 5924 } 5925 return nil, gensupport.WrapError(&googleapi.Error{ 5926 Code: res.StatusCode, 5927 Header: res.Header, 5928 }) 5929 } 5930 if err != nil { 5931 return nil, err 5932 } 5933 defer googleapi.CloseBody(res) 5934 if err := googleapi.CheckResponse(res); err != nil { 5935 return nil, gensupport.WrapError(err) 5936 } 5937 ret := &Operation{ 5938 ServerResponse: googleapi.ServerResponse{ 5939 Header: res.Header, 5940 HTTPStatusCode: res.StatusCode, 5941 }, 5942 } 5943 target := &ret 5944 if err := gensupport.DecodeResponse(target, res); err != nil { 5945 return nil, err 5946 } 5947 return ret, nil 5948 } 5949 5950 type TypeProvidersGetCall struct { 5951 s *Service 5952 project string 5953 typeProvider string 5954 urlParams_ gensupport.URLParams 5955 ifNoneMatch_ string 5956 ctx_ context.Context 5957 header_ http.Header 5958 } 5959 5960 // Get: Gets information about a specific type provider. 5961 // 5962 // - project: The project ID for this request. 5963 // - typeProvider: The name of the type provider for this request. 5964 func (r *TypeProvidersService) Get(project string, typeProvider string) *TypeProvidersGetCall { 5965 c := &TypeProvidersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5966 c.project = project 5967 c.typeProvider = typeProvider 5968 return c 5969 } 5970 5971 // Fields allows partial responses to be retrieved. See 5972 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 5973 // details. 5974 func (c *TypeProvidersGetCall) Fields(s ...googleapi.Field) *TypeProvidersGetCall { 5975 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5976 return c 5977 } 5978 5979 // IfNoneMatch sets an optional parameter which makes the operation fail if the 5980 // object's ETag matches the given value. This is useful for getting updates 5981 // only after the object has changed since the last request. 5982 func (c *TypeProvidersGetCall) IfNoneMatch(entityTag string) *TypeProvidersGetCall { 5983 c.ifNoneMatch_ = entityTag 5984 return c 5985 } 5986 5987 // Context sets the context to be used in this call's Do method. 5988 func (c *TypeProvidersGetCall) Context(ctx context.Context) *TypeProvidersGetCall { 5989 c.ctx_ = ctx 5990 return c 5991 } 5992 5993 // Header returns a http.Header that can be modified by the caller to add 5994 // headers to the request. 5995 func (c *TypeProvidersGetCall) Header() http.Header { 5996 if c.header_ == nil { 5997 c.header_ = make(http.Header) 5998 } 5999 return c.header_ 6000 } 6001 6002 func (c *TypeProvidersGetCall) doRequest(alt string) (*http.Response, error) { 6003 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 6004 if c.ifNoneMatch_ != "" { 6005 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6006 } 6007 var body io.Reader = nil 6008 c.urlParams_.Set("alt", alt) 6009 c.urlParams_.Set("prettyPrint", "false") 6010 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/typeProviders/{typeProvider}") 6011 urls += "?" + c.urlParams_.Encode() 6012 req, err := http.NewRequest("GET", urls, body) 6013 if err != nil { 6014 return nil, err 6015 } 6016 req.Header = reqHeaders 6017 googleapi.Expand(req.URL, map[string]string{ 6018 "project": c.project, 6019 "typeProvider": c.typeProvider, 6020 }) 6021 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6022 } 6023 6024 // Do executes the "deploymentmanager.typeProviders.get" call. 6025 // Any non-2xx status code is an error. Response headers are in either 6026 // *TypeProvider.ServerResponse.Header or (if a response was returned at all) 6027 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6028 // whether the returned error was because http.StatusNotModified was returned. 6029 func (c *TypeProvidersGetCall) Do(opts ...googleapi.CallOption) (*TypeProvider, error) { 6030 gensupport.SetOptions(c.urlParams_, opts...) 6031 res, err := c.doRequest("json") 6032 if res != nil && res.StatusCode == http.StatusNotModified { 6033 if res.Body != nil { 6034 res.Body.Close() 6035 } 6036 return nil, gensupport.WrapError(&googleapi.Error{ 6037 Code: res.StatusCode, 6038 Header: res.Header, 6039 }) 6040 } 6041 if err != nil { 6042 return nil, err 6043 } 6044 defer googleapi.CloseBody(res) 6045 if err := googleapi.CheckResponse(res); err != nil { 6046 return nil, gensupport.WrapError(err) 6047 } 6048 ret := &TypeProvider{ 6049 ServerResponse: googleapi.ServerResponse{ 6050 Header: res.Header, 6051 HTTPStatusCode: res.StatusCode, 6052 }, 6053 } 6054 target := &ret 6055 if err := gensupport.DecodeResponse(target, res); err != nil { 6056 return nil, err 6057 } 6058 return ret, nil 6059 } 6060 6061 type TypeProvidersGetTypeCall struct { 6062 s *Service 6063 project string 6064 typeProvider string 6065 type_ string 6066 urlParams_ gensupport.URLParams 6067 ifNoneMatch_ string 6068 ctx_ context.Context 6069 header_ http.Header 6070 } 6071 6072 // GetType: Gets a type info for a type provided by a TypeProvider. 6073 // 6074 // - project: The project ID for this request. 6075 // - type: The name of the type provider type for this request. 6076 // - typeProvider: The name of the type provider for this request. 6077 func (r *TypeProvidersService) GetType(project string, typeProvider string, type_ string) *TypeProvidersGetTypeCall { 6078 c := &TypeProvidersGetTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6079 c.project = project 6080 c.typeProvider = typeProvider 6081 c.type_ = type_ 6082 return c 6083 } 6084 6085 // Fields allows partial responses to be retrieved. See 6086 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6087 // details. 6088 func (c *TypeProvidersGetTypeCall) Fields(s ...googleapi.Field) *TypeProvidersGetTypeCall { 6089 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6090 return c 6091 } 6092 6093 // IfNoneMatch sets an optional parameter which makes the operation fail if the 6094 // object's ETag matches the given value. This is useful for getting updates 6095 // only after the object has changed since the last request. 6096 func (c *TypeProvidersGetTypeCall) IfNoneMatch(entityTag string) *TypeProvidersGetTypeCall { 6097 c.ifNoneMatch_ = entityTag 6098 return c 6099 } 6100 6101 // Context sets the context to be used in this call's Do method. 6102 func (c *TypeProvidersGetTypeCall) Context(ctx context.Context) *TypeProvidersGetTypeCall { 6103 c.ctx_ = ctx 6104 return c 6105 } 6106 6107 // Header returns a http.Header that can be modified by the caller to add 6108 // headers to the request. 6109 func (c *TypeProvidersGetTypeCall) Header() http.Header { 6110 if c.header_ == nil { 6111 c.header_ = make(http.Header) 6112 } 6113 return c.header_ 6114 } 6115 6116 func (c *TypeProvidersGetTypeCall) doRequest(alt string) (*http.Response, error) { 6117 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 6118 if c.ifNoneMatch_ != "" { 6119 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6120 } 6121 var body io.Reader = nil 6122 c.urlParams_.Set("alt", alt) 6123 c.urlParams_.Set("prettyPrint", "false") 6124 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/typeProviders/{typeProvider}/types/{type}") 6125 urls += "?" + c.urlParams_.Encode() 6126 req, err := http.NewRequest("GET", urls, body) 6127 if err != nil { 6128 return nil, err 6129 } 6130 req.Header = reqHeaders 6131 googleapi.Expand(req.URL, map[string]string{ 6132 "project": c.project, 6133 "typeProvider": c.typeProvider, 6134 "type": c.type_, 6135 }) 6136 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6137 } 6138 6139 // Do executes the "deploymentmanager.typeProviders.getType" call. 6140 // Any non-2xx status code is an error. Response headers are in either 6141 // *TypeInfo.ServerResponse.Header or (if a response was returned at all) in 6142 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6143 // whether the returned error was because http.StatusNotModified was returned. 6144 func (c *TypeProvidersGetTypeCall) Do(opts ...googleapi.CallOption) (*TypeInfo, error) { 6145 gensupport.SetOptions(c.urlParams_, opts...) 6146 res, err := c.doRequest("json") 6147 if res != nil && res.StatusCode == http.StatusNotModified { 6148 if res.Body != nil { 6149 res.Body.Close() 6150 } 6151 return nil, gensupport.WrapError(&googleapi.Error{ 6152 Code: res.StatusCode, 6153 Header: res.Header, 6154 }) 6155 } 6156 if err != nil { 6157 return nil, err 6158 } 6159 defer googleapi.CloseBody(res) 6160 if err := googleapi.CheckResponse(res); err != nil { 6161 return nil, gensupport.WrapError(err) 6162 } 6163 ret := &TypeInfo{ 6164 ServerResponse: googleapi.ServerResponse{ 6165 Header: res.Header, 6166 HTTPStatusCode: res.StatusCode, 6167 }, 6168 } 6169 target := &ret 6170 if err := gensupport.DecodeResponse(target, res); err != nil { 6171 return nil, err 6172 } 6173 return ret, nil 6174 } 6175 6176 type TypeProvidersInsertCall struct { 6177 s *Service 6178 project string 6179 typeprovider *TypeProvider 6180 urlParams_ gensupport.URLParams 6181 ctx_ context.Context 6182 header_ http.Header 6183 } 6184 6185 // Insert: Creates a type provider. 6186 // 6187 // - project: The project ID for this request. 6188 func (r *TypeProvidersService) Insert(project string, typeprovider *TypeProvider) *TypeProvidersInsertCall { 6189 c := &TypeProvidersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6190 c.project = project 6191 c.typeprovider = typeprovider 6192 return c 6193 } 6194 6195 // Fields allows partial responses to be retrieved. See 6196 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6197 // details. 6198 func (c *TypeProvidersInsertCall) Fields(s ...googleapi.Field) *TypeProvidersInsertCall { 6199 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6200 return c 6201 } 6202 6203 // Context sets the context to be used in this call's Do method. 6204 func (c *TypeProvidersInsertCall) Context(ctx context.Context) *TypeProvidersInsertCall { 6205 c.ctx_ = ctx 6206 return c 6207 } 6208 6209 // Header returns a http.Header that can be modified by the caller to add 6210 // headers to the request. 6211 func (c *TypeProvidersInsertCall) Header() http.Header { 6212 if c.header_ == nil { 6213 c.header_ = make(http.Header) 6214 } 6215 return c.header_ 6216 } 6217 6218 func (c *TypeProvidersInsertCall) doRequest(alt string) (*http.Response, error) { 6219 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 6220 var body io.Reader = nil 6221 body, err := googleapi.WithoutDataWrapper.JSONReader(c.typeprovider) 6222 if err != nil { 6223 return nil, err 6224 } 6225 c.urlParams_.Set("alt", alt) 6226 c.urlParams_.Set("prettyPrint", "false") 6227 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/typeProviders") 6228 urls += "?" + c.urlParams_.Encode() 6229 req, err := http.NewRequest("POST", urls, body) 6230 if err != nil { 6231 return nil, err 6232 } 6233 req.Header = reqHeaders 6234 googleapi.Expand(req.URL, map[string]string{ 6235 "project": c.project, 6236 }) 6237 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6238 } 6239 6240 // Do executes the "deploymentmanager.typeProviders.insert" call. 6241 // Any non-2xx status code is an error. Response headers are in either 6242 // *Operation.ServerResponse.Header or (if a response was returned at all) in 6243 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6244 // whether the returned error was because http.StatusNotModified was returned. 6245 func (c *TypeProvidersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6246 gensupport.SetOptions(c.urlParams_, opts...) 6247 res, err := c.doRequest("json") 6248 if res != nil && res.StatusCode == http.StatusNotModified { 6249 if res.Body != nil { 6250 res.Body.Close() 6251 } 6252 return nil, gensupport.WrapError(&googleapi.Error{ 6253 Code: res.StatusCode, 6254 Header: res.Header, 6255 }) 6256 } 6257 if err != nil { 6258 return nil, err 6259 } 6260 defer googleapi.CloseBody(res) 6261 if err := googleapi.CheckResponse(res); err != nil { 6262 return nil, gensupport.WrapError(err) 6263 } 6264 ret := &Operation{ 6265 ServerResponse: googleapi.ServerResponse{ 6266 Header: res.Header, 6267 HTTPStatusCode: res.StatusCode, 6268 }, 6269 } 6270 target := &ret 6271 if err := gensupport.DecodeResponse(target, res); err != nil { 6272 return nil, err 6273 } 6274 return ret, nil 6275 } 6276 6277 type TypeProvidersListCall struct { 6278 s *Service 6279 project string 6280 urlParams_ gensupport.URLParams 6281 ifNoneMatch_ string 6282 ctx_ context.Context 6283 header_ http.Header 6284 } 6285 6286 // List: Lists all resource type providers for Deployment Manager. 6287 // 6288 // - project: The project ID for this request. 6289 func (r *TypeProvidersService) List(project string) *TypeProvidersListCall { 6290 c := &TypeProvidersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6291 c.project = project 6292 return c 6293 } 6294 6295 // Filter sets the optional parameter "filter": A filter expression that 6296 // filters resources listed in the response. Most Compute resources support two 6297 // types of filter expressions: expressions that support regular expressions 6298 // and expressions that follow API improvement proposal AIP-160. These two 6299 // types of filter expressions cannot be mixed in one request. If you want to 6300 // use AIP-160, your expression must specify the field name, an operator, and 6301 // the value that you want to use for filtering. The value must be a string, a 6302 // number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, 6303 // `>=` or `:`. For example, if you are filtering Compute Engine instances, you 6304 // can exclude instances named `example-instance` by specifying `name != 6305 // example-instance`. The `:*` comparison can be used to test whether a key has 6306 // been defined. For example, to find all objects with `owner` label use: ``` 6307 // labels.owner:* ``` You can also filter nested fields. For example, you could 6308 // specify `scheduling.automaticRestart = false` to include instances only if 6309 // they are not scheduled for automatic restarts. You can use filtering on 6310 // nested fields to filter based on resource labels. To filter on multiple 6311 // expressions, provide each separate expression within parentheses. For 6312 // example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel 6313 // Skylake") ``` By default, each expression is an `AND` expression. However, 6314 // you can include `AND` and `OR` expressions explicitly. For example: ``` 6315 // (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND 6316 // (scheduling.automaticRestart = true) ``` If you want to use a regular 6317 // expression, use the `eq` (equal) or `ne` (not equal) operator against a 6318 // single un-parenthesized expression with or without quotes or against 6319 // multiple parenthesized expressions. Examples: `fieldname eq unquoted 6320 // literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted 6321 // literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal 6322 // value is interpreted as a regular expression using Google RE2 library 6323 // syntax. The literal value must match the entire field. For example, to 6324 // filter for instances that do not end with name "instance", you would use 6325 // `name ne .*instance`. You cannot combine constraints on multiple fields 6326 // using regular expressions. 6327 func (c *TypeProvidersListCall) Filter(filter string) *TypeProvidersListCall { 6328 c.urlParams_.Set("filter", filter) 6329 return c 6330 } 6331 6332 // MaxResults sets the optional parameter "maxResults": The maximum number of 6333 // results per page that should be returned. If the number of available results 6334 // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that 6335 // can be used to get the next page of results in subsequent list requests. 6336 // Acceptable values are `0` to `500`, inclusive. (Default: `500`) 6337 func (c *TypeProvidersListCall) MaxResults(maxResults int64) *TypeProvidersListCall { 6338 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 6339 return c 6340 } 6341 6342 // OrderBy sets the optional parameter "orderBy": Sorts list results by a 6343 // certain order. By default, results are returned in alphanumerical order 6344 // based on the resource name. You can also sort results in descending order 6345 // based on the creation timestamp using `orderBy="creationTimestamp desc". 6346 // This sorts results based on the `creationTimestamp` field in reverse 6347 // chronological order (newest result first). Use this to sort resources like 6348 // operations so that the newest operation is returned first. Currently, only 6349 // sorting by `name` or `creationTimestamp desc` is supported. 6350 func (c *TypeProvidersListCall) OrderBy(orderBy string) *TypeProvidersListCall { 6351 c.urlParams_.Set("orderBy", orderBy) 6352 return c 6353 } 6354 6355 // PageToken sets the optional parameter "pageToken": Specifies a page token to 6356 // use. Set `pageToken` to the `nextPageToken` returned by a previous list 6357 // request to get the next page of results. 6358 func (c *TypeProvidersListCall) PageToken(pageToken string) *TypeProvidersListCall { 6359 c.urlParams_.Set("pageToken", pageToken) 6360 return c 6361 } 6362 6363 // Fields allows partial responses to be retrieved. See 6364 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6365 // details. 6366 func (c *TypeProvidersListCall) Fields(s ...googleapi.Field) *TypeProvidersListCall { 6367 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6368 return c 6369 } 6370 6371 // IfNoneMatch sets an optional parameter which makes the operation fail if the 6372 // object's ETag matches the given value. This is useful for getting updates 6373 // only after the object has changed since the last request. 6374 func (c *TypeProvidersListCall) IfNoneMatch(entityTag string) *TypeProvidersListCall { 6375 c.ifNoneMatch_ = entityTag 6376 return c 6377 } 6378 6379 // Context sets the context to be used in this call's Do method. 6380 func (c *TypeProvidersListCall) Context(ctx context.Context) *TypeProvidersListCall { 6381 c.ctx_ = ctx 6382 return c 6383 } 6384 6385 // Header returns a http.Header that can be modified by the caller to add 6386 // headers to the request. 6387 func (c *TypeProvidersListCall) Header() http.Header { 6388 if c.header_ == nil { 6389 c.header_ = make(http.Header) 6390 } 6391 return c.header_ 6392 } 6393 6394 func (c *TypeProvidersListCall) doRequest(alt string) (*http.Response, error) { 6395 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 6396 if c.ifNoneMatch_ != "" { 6397 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6398 } 6399 var body io.Reader = nil 6400 c.urlParams_.Set("alt", alt) 6401 c.urlParams_.Set("prettyPrint", "false") 6402 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/typeProviders") 6403 urls += "?" + c.urlParams_.Encode() 6404 req, err := http.NewRequest("GET", urls, body) 6405 if err != nil { 6406 return nil, err 6407 } 6408 req.Header = reqHeaders 6409 googleapi.Expand(req.URL, map[string]string{ 6410 "project": c.project, 6411 }) 6412 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6413 } 6414 6415 // Do executes the "deploymentmanager.typeProviders.list" call. 6416 // Any non-2xx status code is an error. Response headers are in either 6417 // *TypeProvidersListResponse.ServerResponse.Header or (if a response was 6418 // returned at all) in error.(*googleapi.Error).Header. Use 6419 // googleapi.IsNotModified to check whether the returned error was because 6420 // http.StatusNotModified was returned. 6421 func (c *TypeProvidersListCall) Do(opts ...googleapi.CallOption) (*TypeProvidersListResponse, error) { 6422 gensupport.SetOptions(c.urlParams_, opts...) 6423 res, err := c.doRequest("json") 6424 if res != nil && res.StatusCode == http.StatusNotModified { 6425 if res.Body != nil { 6426 res.Body.Close() 6427 } 6428 return nil, gensupport.WrapError(&googleapi.Error{ 6429 Code: res.StatusCode, 6430 Header: res.Header, 6431 }) 6432 } 6433 if err != nil { 6434 return nil, err 6435 } 6436 defer googleapi.CloseBody(res) 6437 if err := googleapi.CheckResponse(res); err != nil { 6438 return nil, gensupport.WrapError(err) 6439 } 6440 ret := &TypeProvidersListResponse{ 6441 ServerResponse: googleapi.ServerResponse{ 6442 Header: res.Header, 6443 HTTPStatusCode: res.StatusCode, 6444 }, 6445 } 6446 target := &ret 6447 if err := gensupport.DecodeResponse(target, res); err != nil { 6448 return nil, err 6449 } 6450 return ret, nil 6451 } 6452 6453 // Pages invokes f for each page of results. 6454 // A non-nil error returned from f will halt the iteration. 6455 // The provided context supersedes any context provided to the Context method. 6456 func (c *TypeProvidersListCall) Pages(ctx context.Context, f func(*TypeProvidersListResponse) error) error { 6457 c.ctx_ = ctx 6458 defer c.PageToken(c.urlParams_.Get("pageToken")) 6459 for { 6460 x, err := c.Do() 6461 if err != nil { 6462 return err 6463 } 6464 if err := f(x); err != nil { 6465 return err 6466 } 6467 if x.NextPageToken == "" { 6468 return nil 6469 } 6470 c.PageToken(x.NextPageToken) 6471 } 6472 } 6473 6474 type TypeProvidersListTypesCall struct { 6475 s *Service 6476 project string 6477 typeProvider string 6478 urlParams_ gensupport.URLParams 6479 ifNoneMatch_ string 6480 ctx_ context.Context 6481 header_ http.Header 6482 } 6483 6484 // ListTypes: Lists all the type info for a TypeProvider. 6485 // 6486 // - project: The project ID for this request. 6487 // - typeProvider: The name of the type provider for this request. 6488 func (r *TypeProvidersService) ListTypes(project string, typeProvider string) *TypeProvidersListTypesCall { 6489 c := &TypeProvidersListTypesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6490 c.project = project 6491 c.typeProvider = typeProvider 6492 return c 6493 } 6494 6495 // Filter sets the optional parameter "filter": A filter expression that 6496 // filters resources listed in the response. Most Compute resources support two 6497 // types of filter expressions: expressions that support regular expressions 6498 // and expressions that follow API improvement proposal AIP-160. These two 6499 // types of filter expressions cannot be mixed in one request. If you want to 6500 // use AIP-160, your expression must specify the field name, an operator, and 6501 // the value that you want to use for filtering. The value must be a string, a 6502 // number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, 6503 // `>=` or `:`. For example, if you are filtering Compute Engine instances, you 6504 // can exclude instances named `example-instance` by specifying `name != 6505 // example-instance`. The `:*` comparison can be used to test whether a key has 6506 // been defined. For example, to find all objects with `owner` label use: ``` 6507 // labels.owner:* ``` You can also filter nested fields. For example, you could 6508 // specify `scheduling.automaticRestart = false` to include instances only if 6509 // they are not scheduled for automatic restarts. You can use filtering on 6510 // nested fields to filter based on resource labels. To filter on multiple 6511 // expressions, provide each separate expression within parentheses. For 6512 // example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel 6513 // Skylake") ``` By default, each expression is an `AND` expression. However, 6514 // you can include `AND` and `OR` expressions explicitly. For example: ``` 6515 // (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND 6516 // (scheduling.automaticRestart = true) ``` If you want to use a regular 6517 // expression, use the `eq` (equal) or `ne` (not equal) operator against a 6518 // single un-parenthesized expression with or without quotes or against 6519 // multiple parenthesized expressions. Examples: `fieldname eq unquoted 6520 // literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted 6521 // literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal 6522 // value is interpreted as a regular expression using Google RE2 library 6523 // syntax. The literal value must match the entire field. For example, to 6524 // filter for instances that do not end with name "instance", you would use 6525 // `name ne .*instance`. You cannot combine constraints on multiple fields 6526 // using regular expressions. 6527 func (c *TypeProvidersListTypesCall) Filter(filter string) *TypeProvidersListTypesCall { 6528 c.urlParams_.Set("filter", filter) 6529 return c 6530 } 6531 6532 // MaxResults sets the optional parameter "maxResults": The maximum number of 6533 // results per page that should be returned. If the number of available results 6534 // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that 6535 // can be used to get the next page of results in subsequent list requests. 6536 // Acceptable values are `0` to `500`, inclusive. (Default: `500`) 6537 func (c *TypeProvidersListTypesCall) MaxResults(maxResults int64) *TypeProvidersListTypesCall { 6538 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 6539 return c 6540 } 6541 6542 // OrderBy sets the optional parameter "orderBy": Sorts list results by a 6543 // certain order. By default, results are returned in alphanumerical order 6544 // based on the resource name. You can also sort results in descending order 6545 // based on the creation timestamp using `orderBy="creationTimestamp desc". 6546 // This sorts results based on the `creationTimestamp` field in reverse 6547 // chronological order (newest result first). Use this to sort resources like 6548 // operations so that the newest operation is returned first. Currently, only 6549 // sorting by `name` or `creationTimestamp desc` is supported. 6550 func (c *TypeProvidersListTypesCall) OrderBy(orderBy string) *TypeProvidersListTypesCall { 6551 c.urlParams_.Set("orderBy", orderBy) 6552 return c 6553 } 6554 6555 // PageToken sets the optional parameter "pageToken": Specifies a page token to 6556 // use. Set `pageToken` to the `nextPageToken` returned by a previous list 6557 // request to get the next page of results. 6558 func (c *TypeProvidersListTypesCall) PageToken(pageToken string) *TypeProvidersListTypesCall { 6559 c.urlParams_.Set("pageToken", pageToken) 6560 return c 6561 } 6562 6563 // Fields allows partial responses to be retrieved. See 6564 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6565 // details. 6566 func (c *TypeProvidersListTypesCall) Fields(s ...googleapi.Field) *TypeProvidersListTypesCall { 6567 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6568 return c 6569 } 6570 6571 // IfNoneMatch sets an optional parameter which makes the operation fail if the 6572 // object's ETag matches the given value. This is useful for getting updates 6573 // only after the object has changed since the last request. 6574 func (c *TypeProvidersListTypesCall) IfNoneMatch(entityTag string) *TypeProvidersListTypesCall { 6575 c.ifNoneMatch_ = entityTag 6576 return c 6577 } 6578 6579 // Context sets the context to be used in this call's Do method. 6580 func (c *TypeProvidersListTypesCall) Context(ctx context.Context) *TypeProvidersListTypesCall { 6581 c.ctx_ = ctx 6582 return c 6583 } 6584 6585 // Header returns a http.Header that can be modified by the caller to add 6586 // headers to the request. 6587 func (c *TypeProvidersListTypesCall) Header() http.Header { 6588 if c.header_ == nil { 6589 c.header_ = make(http.Header) 6590 } 6591 return c.header_ 6592 } 6593 6594 func (c *TypeProvidersListTypesCall) doRequest(alt string) (*http.Response, error) { 6595 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 6596 if c.ifNoneMatch_ != "" { 6597 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6598 } 6599 var body io.Reader = nil 6600 c.urlParams_.Set("alt", alt) 6601 c.urlParams_.Set("prettyPrint", "false") 6602 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/typeProviders/{typeProvider}/types") 6603 urls += "?" + c.urlParams_.Encode() 6604 req, err := http.NewRequest("GET", urls, body) 6605 if err != nil { 6606 return nil, err 6607 } 6608 req.Header = reqHeaders 6609 googleapi.Expand(req.URL, map[string]string{ 6610 "project": c.project, 6611 "typeProvider": c.typeProvider, 6612 }) 6613 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6614 } 6615 6616 // Do executes the "deploymentmanager.typeProviders.listTypes" call. 6617 // Any non-2xx status code is an error. Response headers are in either 6618 // *TypeProvidersListTypesResponse.ServerResponse.Header or (if a response was 6619 // returned at all) in error.(*googleapi.Error).Header. Use 6620 // googleapi.IsNotModified to check whether the returned error was because 6621 // http.StatusNotModified was returned. 6622 func (c *TypeProvidersListTypesCall) Do(opts ...googleapi.CallOption) (*TypeProvidersListTypesResponse, error) { 6623 gensupport.SetOptions(c.urlParams_, opts...) 6624 res, err := c.doRequest("json") 6625 if res != nil && res.StatusCode == http.StatusNotModified { 6626 if res.Body != nil { 6627 res.Body.Close() 6628 } 6629 return nil, gensupport.WrapError(&googleapi.Error{ 6630 Code: res.StatusCode, 6631 Header: res.Header, 6632 }) 6633 } 6634 if err != nil { 6635 return nil, err 6636 } 6637 defer googleapi.CloseBody(res) 6638 if err := googleapi.CheckResponse(res); err != nil { 6639 return nil, gensupport.WrapError(err) 6640 } 6641 ret := &TypeProvidersListTypesResponse{ 6642 ServerResponse: googleapi.ServerResponse{ 6643 Header: res.Header, 6644 HTTPStatusCode: res.StatusCode, 6645 }, 6646 } 6647 target := &ret 6648 if err := gensupport.DecodeResponse(target, res); err != nil { 6649 return nil, err 6650 } 6651 return ret, nil 6652 } 6653 6654 // Pages invokes f for each page of results. 6655 // A non-nil error returned from f will halt the iteration. 6656 // The provided context supersedes any context provided to the Context method. 6657 func (c *TypeProvidersListTypesCall) Pages(ctx context.Context, f func(*TypeProvidersListTypesResponse) error) error { 6658 c.ctx_ = ctx 6659 defer c.PageToken(c.urlParams_.Get("pageToken")) 6660 for { 6661 x, err := c.Do() 6662 if err != nil { 6663 return err 6664 } 6665 if err := f(x); err != nil { 6666 return err 6667 } 6668 if x.NextPageToken == "" { 6669 return nil 6670 } 6671 c.PageToken(x.NextPageToken) 6672 } 6673 } 6674 6675 type TypeProvidersPatchCall struct { 6676 s *Service 6677 project string 6678 typeProvider string 6679 typeprovider *TypeProvider 6680 urlParams_ gensupport.URLParams 6681 ctx_ context.Context 6682 header_ http.Header 6683 } 6684 6685 // Patch: Patches a type provider. 6686 // 6687 // - project: The project ID for this request. 6688 // - typeProvider: The name of the type provider for this request. 6689 func (r *TypeProvidersService) Patch(project string, typeProvider string, typeprovider *TypeProvider) *TypeProvidersPatchCall { 6690 c := &TypeProvidersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6691 c.project = project 6692 c.typeProvider = typeProvider 6693 c.typeprovider = typeprovider 6694 return c 6695 } 6696 6697 // Fields allows partial responses to be retrieved. See 6698 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6699 // details. 6700 func (c *TypeProvidersPatchCall) Fields(s ...googleapi.Field) *TypeProvidersPatchCall { 6701 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6702 return c 6703 } 6704 6705 // Context sets the context to be used in this call's Do method. 6706 func (c *TypeProvidersPatchCall) Context(ctx context.Context) *TypeProvidersPatchCall { 6707 c.ctx_ = ctx 6708 return c 6709 } 6710 6711 // Header returns a http.Header that can be modified by the caller to add 6712 // headers to the request. 6713 func (c *TypeProvidersPatchCall) Header() http.Header { 6714 if c.header_ == nil { 6715 c.header_ = make(http.Header) 6716 } 6717 return c.header_ 6718 } 6719 6720 func (c *TypeProvidersPatchCall) doRequest(alt string) (*http.Response, error) { 6721 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 6722 var body io.Reader = nil 6723 body, err := googleapi.WithoutDataWrapper.JSONReader(c.typeprovider) 6724 if err != nil { 6725 return nil, err 6726 } 6727 c.urlParams_.Set("alt", alt) 6728 c.urlParams_.Set("prettyPrint", "false") 6729 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/typeProviders/{typeProvider}") 6730 urls += "?" + c.urlParams_.Encode() 6731 req, err := http.NewRequest("PATCH", urls, body) 6732 if err != nil { 6733 return nil, err 6734 } 6735 req.Header = reqHeaders 6736 googleapi.Expand(req.URL, map[string]string{ 6737 "project": c.project, 6738 "typeProvider": c.typeProvider, 6739 }) 6740 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6741 } 6742 6743 // Do executes the "deploymentmanager.typeProviders.patch" call. 6744 // Any non-2xx status code is an error. Response headers are in either 6745 // *Operation.ServerResponse.Header or (if a response was returned at all) in 6746 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6747 // whether the returned error was because http.StatusNotModified was returned. 6748 func (c *TypeProvidersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6749 gensupport.SetOptions(c.urlParams_, opts...) 6750 res, err := c.doRequest("json") 6751 if res != nil && res.StatusCode == http.StatusNotModified { 6752 if res.Body != nil { 6753 res.Body.Close() 6754 } 6755 return nil, gensupport.WrapError(&googleapi.Error{ 6756 Code: res.StatusCode, 6757 Header: res.Header, 6758 }) 6759 } 6760 if err != nil { 6761 return nil, err 6762 } 6763 defer googleapi.CloseBody(res) 6764 if err := googleapi.CheckResponse(res); err != nil { 6765 return nil, gensupport.WrapError(err) 6766 } 6767 ret := &Operation{ 6768 ServerResponse: googleapi.ServerResponse{ 6769 Header: res.Header, 6770 HTTPStatusCode: res.StatusCode, 6771 }, 6772 } 6773 target := &ret 6774 if err := gensupport.DecodeResponse(target, res); err != nil { 6775 return nil, err 6776 } 6777 return ret, nil 6778 } 6779 6780 type TypeProvidersUpdateCall struct { 6781 s *Service 6782 project string 6783 typeProvider string 6784 typeprovider *TypeProvider 6785 urlParams_ gensupport.URLParams 6786 ctx_ context.Context 6787 header_ http.Header 6788 } 6789 6790 // Update: Updates a type provider. 6791 // 6792 // - project: The project ID for this request. 6793 // - typeProvider: The name of the type provider for this request. 6794 func (r *TypeProvidersService) Update(project string, typeProvider string, typeprovider *TypeProvider) *TypeProvidersUpdateCall { 6795 c := &TypeProvidersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6796 c.project = project 6797 c.typeProvider = typeProvider 6798 c.typeprovider = typeprovider 6799 return c 6800 } 6801 6802 // Fields allows partial responses to be retrieved. See 6803 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6804 // details. 6805 func (c *TypeProvidersUpdateCall) Fields(s ...googleapi.Field) *TypeProvidersUpdateCall { 6806 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6807 return c 6808 } 6809 6810 // Context sets the context to be used in this call's Do method. 6811 func (c *TypeProvidersUpdateCall) Context(ctx context.Context) *TypeProvidersUpdateCall { 6812 c.ctx_ = ctx 6813 return c 6814 } 6815 6816 // Header returns a http.Header that can be modified by the caller to add 6817 // headers to the request. 6818 func (c *TypeProvidersUpdateCall) Header() http.Header { 6819 if c.header_ == nil { 6820 c.header_ = make(http.Header) 6821 } 6822 return c.header_ 6823 } 6824 6825 func (c *TypeProvidersUpdateCall) doRequest(alt string) (*http.Response, error) { 6826 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 6827 var body io.Reader = nil 6828 body, err := googleapi.WithoutDataWrapper.JSONReader(c.typeprovider) 6829 if err != nil { 6830 return nil, err 6831 } 6832 c.urlParams_.Set("alt", alt) 6833 c.urlParams_.Set("prettyPrint", "false") 6834 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/typeProviders/{typeProvider}") 6835 urls += "?" + c.urlParams_.Encode() 6836 req, err := http.NewRequest("PUT", urls, body) 6837 if err != nil { 6838 return nil, err 6839 } 6840 req.Header = reqHeaders 6841 googleapi.Expand(req.URL, map[string]string{ 6842 "project": c.project, 6843 "typeProvider": c.typeProvider, 6844 }) 6845 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6846 } 6847 6848 // Do executes the "deploymentmanager.typeProviders.update" call. 6849 // Any non-2xx status code is an error. Response headers are in either 6850 // *Operation.ServerResponse.Header or (if a response was returned at all) in 6851 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6852 // whether the returned error was because http.StatusNotModified was returned. 6853 func (c *TypeProvidersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6854 gensupport.SetOptions(c.urlParams_, opts...) 6855 res, err := c.doRequest("json") 6856 if res != nil && res.StatusCode == http.StatusNotModified { 6857 if res.Body != nil { 6858 res.Body.Close() 6859 } 6860 return nil, gensupport.WrapError(&googleapi.Error{ 6861 Code: res.StatusCode, 6862 Header: res.Header, 6863 }) 6864 } 6865 if err != nil { 6866 return nil, err 6867 } 6868 defer googleapi.CloseBody(res) 6869 if err := googleapi.CheckResponse(res); err != nil { 6870 return nil, gensupport.WrapError(err) 6871 } 6872 ret := &Operation{ 6873 ServerResponse: googleapi.ServerResponse{ 6874 Header: res.Header, 6875 HTTPStatusCode: res.StatusCode, 6876 }, 6877 } 6878 target := &ret 6879 if err := gensupport.DecodeResponse(target, res); err != nil { 6880 return nil, err 6881 } 6882 return ret, nil 6883 } 6884 6885 type TypesGetCall struct { 6886 s *Service 6887 project string 6888 type_ string 6889 urlParams_ gensupport.URLParams 6890 ifNoneMatch_ string 6891 ctx_ context.Context 6892 header_ http.Header 6893 } 6894 6895 // Get: Gets information about a specific type. 6896 // 6897 // - project: The project ID for this request. 6898 // - type: The name of the type for this request. 6899 func (r *TypesService) Get(project string, type_ string) *TypesGetCall { 6900 c := &TypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6901 c.project = project 6902 c.type_ = type_ 6903 return c 6904 } 6905 6906 // Fields allows partial responses to be retrieved. See 6907 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6908 // details. 6909 func (c *TypesGetCall) Fields(s ...googleapi.Field) *TypesGetCall { 6910 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6911 return c 6912 } 6913 6914 // IfNoneMatch sets an optional parameter which makes the operation fail if the 6915 // object's ETag matches the given value. This is useful for getting updates 6916 // only after the object has changed since the last request. 6917 func (c *TypesGetCall) IfNoneMatch(entityTag string) *TypesGetCall { 6918 c.ifNoneMatch_ = entityTag 6919 return c 6920 } 6921 6922 // Context sets the context to be used in this call's Do method. 6923 func (c *TypesGetCall) Context(ctx context.Context) *TypesGetCall { 6924 c.ctx_ = ctx 6925 return c 6926 } 6927 6928 // Header returns a http.Header that can be modified by the caller to add 6929 // headers to the request. 6930 func (c *TypesGetCall) Header() http.Header { 6931 if c.header_ == nil { 6932 c.header_ = make(http.Header) 6933 } 6934 return c.header_ 6935 } 6936 6937 func (c *TypesGetCall) doRequest(alt string) (*http.Response, error) { 6938 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 6939 if c.ifNoneMatch_ != "" { 6940 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6941 } 6942 var body io.Reader = nil 6943 c.urlParams_.Set("alt", alt) 6944 c.urlParams_.Set("prettyPrint", "false") 6945 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/types/{type}") 6946 urls += "?" + c.urlParams_.Encode() 6947 req, err := http.NewRequest("GET", urls, body) 6948 if err != nil { 6949 return nil, err 6950 } 6951 req.Header = reqHeaders 6952 googleapi.Expand(req.URL, map[string]string{ 6953 "project": c.project, 6954 "type": c.type_, 6955 }) 6956 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6957 } 6958 6959 // Do executes the "deploymentmanager.types.get" call. 6960 // Any non-2xx status code is an error. Response headers are in either 6961 // *Type.ServerResponse.Header or (if a response was returned at all) in 6962 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6963 // whether the returned error was because http.StatusNotModified was returned. 6964 func (c *TypesGetCall) Do(opts ...googleapi.CallOption) (*Type, error) { 6965 gensupport.SetOptions(c.urlParams_, opts...) 6966 res, err := c.doRequest("json") 6967 if res != nil && res.StatusCode == http.StatusNotModified { 6968 if res.Body != nil { 6969 res.Body.Close() 6970 } 6971 return nil, gensupport.WrapError(&googleapi.Error{ 6972 Code: res.StatusCode, 6973 Header: res.Header, 6974 }) 6975 } 6976 if err != nil { 6977 return nil, err 6978 } 6979 defer googleapi.CloseBody(res) 6980 if err := googleapi.CheckResponse(res); err != nil { 6981 return nil, gensupport.WrapError(err) 6982 } 6983 ret := &Type{ 6984 ServerResponse: googleapi.ServerResponse{ 6985 Header: res.Header, 6986 HTTPStatusCode: res.StatusCode, 6987 }, 6988 } 6989 target := &ret 6990 if err := gensupport.DecodeResponse(target, res); err != nil { 6991 return nil, err 6992 } 6993 return ret, nil 6994 } 6995 6996 type TypesListCall struct { 6997 s *Service 6998 project string 6999 urlParams_ gensupport.URLParams 7000 ifNoneMatch_ string 7001 ctx_ context.Context 7002 header_ http.Header 7003 } 7004 7005 // List: Lists all resource types for Deployment Manager. 7006 // 7007 // - project: The project ID for this request. 7008 func (r *TypesService) List(project string) *TypesListCall { 7009 c := &TypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7010 c.project = project 7011 return c 7012 } 7013 7014 // Filter sets the optional parameter "filter": A filter expression that 7015 // filters resources listed in the response. Most Compute resources support two 7016 // types of filter expressions: expressions that support regular expressions 7017 // and expressions that follow API improvement proposal AIP-160. These two 7018 // types of filter expressions cannot be mixed in one request. If you want to 7019 // use AIP-160, your expression must specify the field name, an operator, and 7020 // the value that you want to use for filtering. The value must be a string, a 7021 // number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, 7022 // `>=` or `:`. For example, if you are filtering Compute Engine instances, you 7023 // can exclude instances named `example-instance` by specifying `name != 7024 // example-instance`. The `:*` comparison can be used to test whether a key has 7025 // been defined. For example, to find all objects with `owner` label use: ``` 7026 // labels.owner:* ``` You can also filter nested fields. For example, you could 7027 // specify `scheduling.automaticRestart = false` to include instances only if 7028 // they are not scheduled for automatic restarts. You can use filtering on 7029 // nested fields to filter based on resource labels. To filter on multiple 7030 // expressions, provide each separate expression within parentheses. For 7031 // example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel 7032 // Skylake") ``` By default, each expression is an `AND` expression. However, 7033 // you can include `AND` and `OR` expressions explicitly. For example: ``` 7034 // (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND 7035 // (scheduling.automaticRestart = true) ``` If you want to use a regular 7036 // expression, use the `eq` (equal) or `ne` (not equal) operator against a 7037 // single un-parenthesized expression with or without quotes or against 7038 // multiple parenthesized expressions. Examples: `fieldname eq unquoted 7039 // literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted 7040 // literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal 7041 // value is interpreted as a regular expression using Google RE2 library 7042 // syntax. The literal value must match the entire field. For example, to 7043 // filter for instances that do not end with name "instance", you would use 7044 // `name ne .*instance`. You cannot combine constraints on multiple fields 7045 // using regular expressions. 7046 func (c *TypesListCall) Filter(filter string) *TypesListCall { 7047 c.urlParams_.Set("filter", filter) 7048 return c 7049 } 7050 7051 // MaxResults sets the optional parameter "maxResults": The maximum number of 7052 // results per page that should be returned. If the number of available results 7053 // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that 7054 // can be used to get the next page of results in subsequent list requests. 7055 // Acceptable values are `0` to `500`, inclusive. (Default: `500`) 7056 func (c *TypesListCall) MaxResults(maxResults int64) *TypesListCall { 7057 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 7058 return c 7059 } 7060 7061 // OrderBy sets the optional parameter "orderBy": Sorts list results by a 7062 // certain order. By default, results are returned in alphanumerical order 7063 // based on the resource name. You can also sort results in descending order 7064 // based on the creation timestamp using `orderBy="creationTimestamp desc". 7065 // This sorts results based on the `creationTimestamp` field in reverse 7066 // chronological order (newest result first). Use this to sort resources like 7067 // operations so that the newest operation is returned first. Currently, only 7068 // sorting by `name` or `creationTimestamp desc` is supported. 7069 func (c *TypesListCall) OrderBy(orderBy string) *TypesListCall { 7070 c.urlParams_.Set("orderBy", orderBy) 7071 return c 7072 } 7073 7074 // PageToken sets the optional parameter "pageToken": Specifies a page token to 7075 // use. Set `pageToken` to the `nextPageToken` returned by a previous list 7076 // request to get the next page of results. 7077 func (c *TypesListCall) PageToken(pageToken string) *TypesListCall { 7078 c.urlParams_.Set("pageToken", pageToken) 7079 return c 7080 } 7081 7082 // Fields allows partial responses to be retrieved. See 7083 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7084 // details. 7085 func (c *TypesListCall) Fields(s ...googleapi.Field) *TypesListCall { 7086 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7087 return c 7088 } 7089 7090 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7091 // object's ETag matches the given value. This is useful for getting updates 7092 // only after the object has changed since the last request. 7093 func (c *TypesListCall) IfNoneMatch(entityTag string) *TypesListCall { 7094 c.ifNoneMatch_ = entityTag 7095 return c 7096 } 7097 7098 // Context sets the context to be used in this call's Do method. 7099 func (c *TypesListCall) Context(ctx context.Context) *TypesListCall { 7100 c.ctx_ = ctx 7101 return c 7102 } 7103 7104 // Header returns a http.Header that can be modified by the caller to add 7105 // headers to the request. 7106 func (c *TypesListCall) Header() http.Header { 7107 if c.header_ == nil { 7108 c.header_ = make(http.Header) 7109 } 7110 return c.header_ 7111 } 7112 7113 func (c *TypesListCall) doRequest(alt string) (*http.Response, error) { 7114 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7115 if c.ifNoneMatch_ != "" { 7116 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7117 } 7118 var body io.Reader = nil 7119 c.urlParams_.Set("alt", alt) 7120 c.urlParams_.Set("prettyPrint", "false") 7121 urls := googleapi.ResolveRelative(c.s.BasePath, "deploymentmanager/alpha/projects/{project}/global/types") 7122 urls += "?" + c.urlParams_.Encode() 7123 req, err := http.NewRequest("GET", urls, body) 7124 if err != nil { 7125 return nil, err 7126 } 7127 req.Header = reqHeaders 7128 googleapi.Expand(req.URL, map[string]string{ 7129 "project": c.project, 7130 }) 7131 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7132 } 7133 7134 // Do executes the "deploymentmanager.types.list" call. 7135 // Any non-2xx status code is an error. Response headers are in either 7136 // *TypesListResponse.ServerResponse.Header or (if a response was returned at 7137 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7138 // check whether the returned error was because http.StatusNotModified was 7139 // returned. 7140 func (c *TypesListCall) Do(opts ...googleapi.CallOption) (*TypesListResponse, error) { 7141 gensupport.SetOptions(c.urlParams_, opts...) 7142 res, err := c.doRequest("json") 7143 if res != nil && res.StatusCode == http.StatusNotModified { 7144 if res.Body != nil { 7145 res.Body.Close() 7146 } 7147 return nil, gensupport.WrapError(&googleapi.Error{ 7148 Code: res.StatusCode, 7149 Header: res.Header, 7150 }) 7151 } 7152 if err != nil { 7153 return nil, err 7154 } 7155 defer googleapi.CloseBody(res) 7156 if err := googleapi.CheckResponse(res); err != nil { 7157 return nil, gensupport.WrapError(err) 7158 } 7159 ret := &TypesListResponse{ 7160 ServerResponse: googleapi.ServerResponse{ 7161 Header: res.Header, 7162 HTTPStatusCode: res.StatusCode, 7163 }, 7164 } 7165 target := &ret 7166 if err := gensupport.DecodeResponse(target, res); err != nil { 7167 return nil, err 7168 } 7169 return ret, nil 7170 } 7171 7172 // Pages invokes f for each page of results. 7173 // A non-nil error returned from f will halt the iteration. 7174 // The provided context supersedes any context provided to the Context method. 7175 func (c *TypesListCall) Pages(ctx context.Context, f func(*TypesListResponse) error) error { 7176 c.ctx_ = ctx 7177 defer c.PageToken(c.urlParams_.Get("pageToken")) 7178 for { 7179 x, err := c.Do() 7180 if err != nil { 7181 return err 7182 } 7183 if err := f(x); err != nil { 7184 return err 7185 } 7186 if x.NextPageToken == "" { 7187 return nil 7188 } 7189 c.PageToken(x.NextPageToken) 7190 } 7191 } 7192