1// Copyright 2020 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package managedidentities provides access to the Managed Service for Microsoft Active Directory API. 8// 9// For product documentation, see: https://cloud.google.com/managed-microsoft-ad/ 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/managedidentities/v1alpha1" 16// ... 17// ctx := context.Background() 18// managedidentitiesService, err := managedidentities.NewService(ctx) 19// 20// In this example, Google Application Default Credentials are used for authentication. 21// 22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23// 24// Other authentication options 25// 26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 27// 28// managedidentitiesService, err := managedidentities.NewService(ctx, option.WithAPIKey("AIza...")) 29// 30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 31// 32// config := &oauth2.Config{...} 33// // ... 34// token, err := config.Exchange(ctx, ...) 35// managedidentitiesService, err := managedidentities.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36// 37// See https://godoc.org/google.golang.org/api/option/ for details on options. 38package managedidentities // import "google.golang.org/api/managedidentities/v1alpha1" 39 40import ( 41 "bytes" 42 "context" 43 "encoding/json" 44 "errors" 45 "fmt" 46 "io" 47 "net/http" 48 "net/url" 49 "strconv" 50 "strings" 51 52 googleapi "google.golang.org/api/googleapi" 53 gensupport "google.golang.org/api/internal/gensupport" 54 option "google.golang.org/api/option" 55 internaloption "google.golang.org/api/option/internaloption" 56 htransport "google.golang.org/api/transport/http" 57) 58 59// Always reference these packages, just in case the auto-generated code 60// below doesn't. 61var _ = bytes.NewBuffer 62var _ = strconv.Itoa 63var _ = fmt.Sprintf 64var _ = json.NewDecoder 65var _ = io.Copy 66var _ = url.Parse 67var _ = gensupport.MarshalJSON 68var _ = googleapi.Version 69var _ = errors.New 70var _ = strings.Replace 71var _ = context.Canceled 72var _ = internaloption.WithDefaultEndpoint 73 74const apiId = "managedidentities:v1alpha1" 75const apiName = "managedidentities" 76const apiVersion = "v1alpha1" 77const basePath = "https://managedidentities.googleapis.com/" 78 79// OAuth2 scopes used by this API. 80const ( 81 // View and manage your data across Google Cloud Platform services 82 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 83) 84 85// NewService creates a new Service. 86func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 87 scopesOption := option.WithScopes( 88 "https://www.googleapis.com/auth/cloud-platform", 89 ) 90 // NOTE: prepend, so we don't override user-specified scopes. 91 opts = append([]option.ClientOption{scopesOption}, opts...) 92 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 93 client, endpoint, err := htransport.NewClient(ctx, opts...) 94 if err != nil { 95 return nil, err 96 } 97 s, err := New(client) 98 if err != nil { 99 return nil, err 100 } 101 if endpoint != "" { 102 s.BasePath = endpoint 103 } 104 return s, nil 105} 106 107// New creates a new Service. It uses the provided http.Client for requests. 108// 109// Deprecated: please use NewService instead. 110// To provide a custom HTTP client, use option.WithHTTPClient. 111// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 112func New(client *http.Client) (*Service, error) { 113 if client == nil { 114 return nil, errors.New("client is nil") 115 } 116 s := &Service{client: client, BasePath: basePath} 117 s.Projects = NewProjectsService(s) 118 return s, nil 119} 120 121type Service struct { 122 client *http.Client 123 BasePath string // API endpoint base URL 124 UserAgent string // optional additional User-Agent fragment 125 126 Projects *ProjectsService 127} 128 129func (s *Service) userAgent() string { 130 if s.UserAgent == "" { 131 return googleapi.UserAgent 132 } 133 return googleapi.UserAgent + " " + s.UserAgent 134} 135 136func NewProjectsService(s *Service) *ProjectsService { 137 rs := &ProjectsService{s: s} 138 rs.Locations = NewProjectsLocationsService(s) 139 return rs 140} 141 142type ProjectsService struct { 143 s *Service 144 145 Locations *ProjectsLocationsService 146} 147 148func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 149 rs := &ProjectsLocationsService{s: s} 150 rs.Global = NewProjectsLocationsGlobalService(s) 151 return rs 152} 153 154type ProjectsLocationsService struct { 155 s *Service 156 157 Global *ProjectsLocationsGlobalService 158} 159 160func NewProjectsLocationsGlobalService(s *Service) *ProjectsLocationsGlobalService { 161 rs := &ProjectsLocationsGlobalService{s: s} 162 rs.Domains = NewProjectsLocationsGlobalDomainsService(s) 163 rs.Operations = NewProjectsLocationsGlobalOperationsService(s) 164 return rs 165} 166 167type ProjectsLocationsGlobalService struct { 168 s *Service 169 170 Domains *ProjectsLocationsGlobalDomainsService 171 172 Operations *ProjectsLocationsGlobalOperationsService 173} 174 175func NewProjectsLocationsGlobalDomainsService(s *Service) *ProjectsLocationsGlobalDomainsService { 176 rs := &ProjectsLocationsGlobalDomainsService{s: s} 177 return rs 178} 179 180type ProjectsLocationsGlobalDomainsService struct { 181 s *Service 182} 183 184func NewProjectsLocationsGlobalOperationsService(s *Service) *ProjectsLocationsGlobalOperationsService { 185 rs := &ProjectsLocationsGlobalOperationsService{s: s} 186 return rs 187} 188 189type ProjectsLocationsGlobalOperationsService struct { 190 s *Service 191} 192 193type AttachTrustRequest struct { 194 // Trust: The domain trust resource. 195 Trust *Trust `json:"trust,omitempty"` 196 197 // ForceSendFields is a list of field names (e.g. "Trust") to 198 // unconditionally include in API requests. By default, fields with 199 // empty values are omitted from API requests. However, any non-pointer, 200 // non-interface field appearing in ForceSendFields will be sent to the 201 // server regardless of whether the field is empty or not. This may be 202 // used to include empty fields in Patch requests. 203 ForceSendFields []string `json:"-"` 204 205 // NullFields is a list of field names (e.g. "Trust") to include in API 206 // requests with the JSON null value. By default, fields with empty 207 // values are omitted from API requests. However, any field with an 208 // empty value appearing in NullFields will be sent to the server as 209 // null. It is an error if a field in this list has a non-empty value. 210 // This may be used to include null fields in Patch requests. 211 NullFields []string `json:"-"` 212} 213 214func (s *AttachTrustRequest) MarshalJSON() ([]byte, error) { 215 type NoMethod AttachTrustRequest 216 raw := NoMethod(*s) 217 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 218} 219 220// Binding: Associates `members` with a `role`. 221type Binding struct { 222 // Condition: The condition that is associated with this binding. 223 // NOTE: An unsatisfied condition will not allow user access via 224 // current 225 // binding. Different bindings, including their conditions, are 226 // examined 227 // independently. 228 Condition *Expr `json:"condition,omitempty"` 229 230 // Members: Specifies the identities requesting access for a Cloud 231 // Platform resource. 232 // `members` can have the following values: 233 // 234 // * `allUsers`: A special identifier that represents anyone who is 235 // on the internet; with or without a Google account. 236 // 237 // * `allAuthenticatedUsers`: A special identifier that represents 238 // anyone 239 // who is authenticated with a Google account or a service 240 // account. 241 // 242 // * `user:{emailid}`: An email address that represents a specific 243 // Google 244 // account. For example, `alice@example.com` . 245 // 246 // 247 // * `serviceAccount:{emailid}`: An email address that represents a 248 // service 249 // account. For example, 250 // `my-other-app@appspot.gserviceaccount.com`. 251 // 252 // * `group:{emailid}`: An email address that represents a Google 253 // group. 254 // For example, `admins@example.com`. 255 // 256 // * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus 257 // unique 258 // identifier) representing a user that has been recently deleted. 259 // For 260 // example, `alice@example.com?uid=123456789012345678901`. If the 261 // user is 262 // recovered, this value reverts to `user:{emailid}` and the 263 // recovered user 264 // retains the role in the binding. 265 // 266 // * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address 267 // (plus 268 // unique identifier) representing a service account that has been 269 // recently 270 // deleted. For example, 271 // 272 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. 273 // 274 // If the service account is undeleted, this value reverts to 275 // `serviceAccount:{emailid}` and the undeleted service account 276 // retains the 277 // role in the binding. 278 // 279 // * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus 280 // unique 281 // identifier) representing a Google group that has been recently 282 // deleted. For example, 283 // `admins@example.com?uid=123456789012345678901`. If 284 // the group is recovered, this value reverts to `group:{emailid}` 285 // and the 286 // recovered group retains the role in the binding. 287 // 288 // 289 // * `domain:{domain}`: The G Suite domain (primary) that represents all 290 // the 291 // users of that domain. For example, `google.com` or 292 // `example.com`. 293 // 294 // 295 Members []string `json:"members,omitempty"` 296 297 // Role: Role that is assigned to `members`. 298 // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 299 Role string `json:"role,omitempty"` 300 301 // ForceSendFields is a list of field names (e.g. "Condition") to 302 // unconditionally include in API requests. By default, fields with 303 // empty values are omitted from API requests. However, any non-pointer, 304 // non-interface field appearing in ForceSendFields will be sent to the 305 // server regardless of whether the field is empty or not. This may be 306 // used to include empty fields in Patch requests. 307 ForceSendFields []string `json:"-"` 308 309 // NullFields is a list of field names (e.g. "Condition") to include in 310 // API requests with the JSON null value. By default, fields with empty 311 // values are omitted from API requests. However, any field with an 312 // empty value appearing in NullFields will be sent to the server as 313 // null. It is an error if a field in this list has a non-empty value. 314 // This may be used to include null fields in Patch requests. 315 NullFields []string `json:"-"` 316} 317 318func (s *Binding) MarshalJSON() ([]byte, error) { 319 type NoMethod Binding 320 raw := NoMethod(*s) 321 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 322} 323 324// CancelOperationRequest: The request message for 325// Operations.CancelOperation. 326type CancelOperationRequest struct { 327} 328 329type DetachTrustRequest struct { 330 // Trust: The domain trust resource to removed. 331 Trust *Trust `json:"trust,omitempty"` 332 333 // ForceSendFields is a list of field names (e.g. "Trust") to 334 // unconditionally include in API requests. By default, fields with 335 // empty values are omitted from API requests. However, any non-pointer, 336 // non-interface field appearing in ForceSendFields will be sent to the 337 // server regardless of whether the field is empty or not. This may be 338 // used to include empty fields in Patch requests. 339 ForceSendFields []string `json:"-"` 340 341 // NullFields is a list of field names (e.g. "Trust") to include in API 342 // requests with the JSON null value. By default, fields with empty 343 // values are omitted from API requests. However, any field with an 344 // empty value appearing in NullFields will be sent to the server as 345 // null. It is an error if a field in this list has a non-empty value. 346 // This may be used to include null fields in Patch requests. 347 NullFields []string `json:"-"` 348} 349 350func (s *DetachTrustRequest) MarshalJSON() ([]byte, error) { 351 type NoMethod DetachTrustRequest 352 raw := NoMethod(*s) 353 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 354} 355 356type Domain struct { 357 // AuthorizedNetworks: Optional. The full names of the Google Compute 358 // Engine 359 // [networks](/compute/docs/networks-and-firewalls#networks) to which 360 // the 361 // instance is connected. Network can be added using UpdateDomain 362 // later. 363 // Domain is only available on network part of 364 // authorized_networks. 365 // Caller needs to make sure that CIDR subnets do not overlap 366 // between 367 // networks, else domain creation will fail. 368 AuthorizedNetworks []string `json:"authorizedNetworks,omitempty"` 369 370 // CreateTime: Output only. The time the instance was created. Synthetic 371 // field is 372 // populated automatically by CCFE. go/ccfe-synthetic-field-user-guide 373 CreateTime string `json:"createTime,omitempty"` 374 375 // Fqdn: Output only. Fully-qualified domain name of the exposed domain 376 // used by 377 // clients to connect to the service. Similar to what would be chosen 378 // for an 379 // Active Directory that is set up on an internal network. 380 Fqdn string `json:"fqdn,omitempty"` 381 382 // Labels: Optional. Resource labels to represent user provided metadata 383 Labels map[string]string `json:"labels,omitempty"` 384 385 // Locations: Required. Locations where domain needs to be 386 // provisioned. 387 // regions 388 // e.g. us-west1 or us-east4 389 // Service supports up to 4 locations at once. Each location will use a 390 // /26 391 // block. 392 Locations []string `json:"locations,omitempty"` 393 394 // ManagedIdentitiesAdminName: Optional. Name of customer-visible admin 395 // used to perform Active Directory 396 // operations. If not specified `setupadmin` would be used. 397 ManagedIdentitiesAdminName string `json:"managedIdentitiesAdminName,omitempty"` 398 399 // Name: Output only. Unique name of the domain in this scope including 400 // projects and 401 // location using the 402 // form: 403 // `projects/{project_id}/locations/global/domains/{domain_name}`. 404 Name string `json:"name,omitempty"` 405 406 // ReservedIpRange: Required. The CIDR range of internal addresses that 407 // are reserved for this 408 // domain. Reserved networks must be /24 or larger. Ranges must 409 // be 410 // unique and non-overlapping with existing subnets 411 // in 412 // [Domain].[authorized_networks]. 413 ReservedIpRange string `json:"reservedIpRange,omitempty"` 414 415 // State: Output only. The current state of this domain. 416 // 417 // Possible values: 418 // "STATE_UNSPECIFIED" - Not set. 419 // "CREATING" - ManagedIdentities domain is being created. 420 // "READY" - ManagedIdentities domain has been created and is fully 421 // usable. 422 // "UPDATING" - ManagedIdentities domain configuration is being 423 // updated. 424 // "DELETING" - ManagedIdentities domain is being deleted. 425 // "REPAIRING" - ManagedIdentities domain is being repaired and may be 426 // unusable. Details 427 // can be found in the `status_message` field. 428 // "PERFORMING_MAINTENANCE" - ManagedIdentities domain is undergoing 429 // maintenance. 430 // "DOWN" - ManagedIdentities domain is not serving customer requests. 431 State string `json:"state,omitempty"` 432 433 // StatusMessage: Output only. Additional information about the current 434 // status of this 435 // domain, if available. 436 StatusMessage string `json:"statusMessage,omitempty"` 437 438 // Trusts: Output only. The current trusts associated with the domain. 439 Trusts []*Trust `json:"trusts,omitempty"` 440 441 // UpdateTime: Output only. Last update time. Synthetic field is 442 // populated automatically 443 // by CCFE. 444 UpdateTime string `json:"updateTime,omitempty"` 445 446 // ServerResponse contains the HTTP response code and headers from the 447 // server. 448 googleapi.ServerResponse `json:"-"` 449 450 // ForceSendFields is a list of field names (e.g. "AuthorizedNetworks") 451 // to unconditionally include in API requests. By default, fields with 452 // empty values are omitted from API requests. However, any non-pointer, 453 // non-interface field appearing in ForceSendFields will be sent to the 454 // server regardless of whether the field is empty or not. This may be 455 // used to include empty fields in Patch requests. 456 ForceSendFields []string `json:"-"` 457 458 // NullFields is a list of field names (e.g. "AuthorizedNetworks") to 459 // include in API requests with the JSON null value. By default, fields 460 // with empty values are omitted from API requests. However, any field 461 // with an empty value appearing in NullFields will be sent to the 462 // server as null. It is an error if a field in this list has a 463 // non-empty value. This may be used to include null fields in Patch 464 // requests. 465 NullFields []string `json:"-"` 466} 467 468func (s *Domain) MarshalJSON() ([]byte, error) { 469 type NoMethod Domain 470 raw := NoMethod(*s) 471 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 472} 473 474// Empty: A generic empty message that you can re-use to avoid defining 475// duplicated 476// empty messages in your APIs. A typical example is to use it as the 477// request 478// or the response type of an API method. For instance: 479// 480// service Foo { 481// rpc Bar(google.protobuf.Empty) returns 482// (google.protobuf.Empty); 483// } 484// 485// The JSON representation for `Empty` is empty JSON object `{}`. 486type Empty struct { 487 // ServerResponse contains the HTTP response code and headers from the 488 // server. 489 googleapi.ServerResponse `json:"-"` 490} 491 492// Expr: Represents a textual expression in the Common Expression 493// Language (CEL) 494// syntax. CEL is a C-like expression language. The syntax and semantics 495// of CEL 496// are documented at https://github.com/google/cel-spec. 497// 498// Example (Comparison): 499// 500// title: "Summary size limit" 501// description: "Determines if a summary is less than 100 chars" 502// expression: "document.summary.size() < 100" 503// 504// Example (Equality): 505// 506// title: "Requestor is owner" 507// description: "Determines if requestor is the document owner" 508// expression: "document.owner == 509// request.auth.claims.email" 510// 511// Example (Logic): 512// 513// title: "Public documents" 514// description: "Determine whether the document should be publicly 515// visible" 516// expression: "document.type != 'private' && document.type != 517// 'internal'" 518// 519// Example (Data Manipulation): 520// 521// title: "Notification string" 522// description: "Create a notification string with a timestamp." 523// expression: "'New message received at ' + 524// string(document.create_time)" 525// 526// The exact variables and functions that may be referenced within an 527// expression 528// are determined by the service that evaluates it. See the 529// service 530// documentation for additional information. 531type Expr struct { 532 // Description: Optional. Description of the expression. This is a 533 // longer text which 534 // describes the expression, e.g. when hovered over it in a UI. 535 Description string `json:"description,omitempty"` 536 537 // Expression: Textual representation of an expression in Common 538 // Expression Language 539 // syntax. 540 Expression string `json:"expression,omitempty"` 541 542 // Location: Optional. String indicating the location of the expression 543 // for error 544 // reporting, e.g. a file name and a position in the file. 545 Location string `json:"location,omitempty"` 546 547 // Title: Optional. Title for the expression, i.e. a short string 548 // describing 549 // its purpose. This can be used e.g. in UIs which allow to enter 550 // the 551 // expression. 552 Title string `json:"title,omitempty"` 553 554 // ForceSendFields is a list of field names (e.g. "Description") to 555 // unconditionally include in API requests. By default, fields with 556 // empty values are omitted from API requests. However, any non-pointer, 557 // non-interface field appearing in ForceSendFields will be sent to the 558 // server regardless of whether the field is empty or not. This may be 559 // used to include empty fields in Patch requests. 560 ForceSendFields []string `json:"-"` 561 562 // NullFields is a list of field names (e.g. "Description") to include 563 // in API requests with the JSON null value. By default, fields with 564 // empty values are omitted from API requests. However, any field with 565 // an empty value appearing in NullFields will be sent to the server as 566 // null. It is an error if a field in this list has a non-empty value. 567 // This may be used to include null fields in Patch requests. 568 NullFields []string `json:"-"` 569} 570 571func (s *Expr) MarshalJSON() ([]byte, error) { 572 type NoMethod Expr 573 raw := NoMethod(*s) 574 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 575} 576 577// GoogleCloudManagedidentitiesV1OpMetadata: Represents the metadata of 578// the long-running operation. 579type GoogleCloudManagedidentitiesV1OpMetadata struct { 580 // ApiVersion: Output only. API version used to start the operation. 581 ApiVersion string `json:"apiVersion,omitempty"` 582 583 // CreateTime: Output only. The time the operation was created. 584 CreateTime string `json:"createTime,omitempty"` 585 586 // EndTime: Output only. The time the operation finished running. 587 EndTime string `json:"endTime,omitempty"` 588 589 // RequestedCancellation: Output only. Identifies whether the user has 590 // requested cancellation 591 // of the operation. Operations that have successfully been 592 // cancelled 593 // have Operation.error value with a google.rpc.Status.code of 594 // 1, 595 // corresponding to `Code.CANCELLED`. 596 RequestedCancellation bool `json:"requestedCancellation,omitempty"` 597 598 // Target: Output only. Server-defined resource path for the target of 599 // the operation. 600 Target string `json:"target,omitempty"` 601 602 // Verb: Output only. Name of the verb executed by the operation. 603 Verb string `json:"verb,omitempty"` 604 605 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 606 // unconditionally include in API requests. By default, fields with 607 // empty values are omitted from API requests. However, any non-pointer, 608 // non-interface field appearing in ForceSendFields will be sent to the 609 // server regardless of whether the field is empty or not. This may be 610 // used to include empty fields in Patch requests. 611 ForceSendFields []string `json:"-"` 612 613 // NullFields is a list of field names (e.g. "ApiVersion") to include in 614 // API requests with the JSON null value. By default, fields with empty 615 // values are omitted from API requests. However, any field with an 616 // empty value appearing in NullFields will be sent to the server as 617 // null. It is an error if a field in this list has a non-empty value. 618 // This may be used to include null fields in Patch requests. 619 NullFields []string `json:"-"` 620} 621 622func (s *GoogleCloudManagedidentitiesV1OpMetadata) MarshalJSON() ([]byte, error) { 623 type NoMethod GoogleCloudManagedidentitiesV1OpMetadata 624 raw := NoMethod(*s) 625 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 626} 627 628// GoogleCloudManagedidentitiesV1beta1OpMetadata: Represents the 629// metadata of the long-running operation. 630type GoogleCloudManagedidentitiesV1beta1OpMetadata struct { 631 // ApiVersion: Output only. API version used to start the operation. 632 ApiVersion string `json:"apiVersion,omitempty"` 633 634 // CreateTime: Output only. The time the operation was created. 635 CreateTime string `json:"createTime,omitempty"` 636 637 // EndTime: Output only. The time the operation finished running. 638 EndTime string `json:"endTime,omitempty"` 639 640 // RequestedCancellation: Output only. Identifies whether the user has 641 // requested cancellation 642 // of the operation. Operations that have successfully been 643 // cancelled 644 // have Operation.error value with a google.rpc.Status.code of 645 // 1, 646 // corresponding to `Code.CANCELLED`. 647 RequestedCancellation bool `json:"requestedCancellation,omitempty"` 648 649 // Target: Output only. Server-defined resource path for the target of 650 // the operation. 651 Target string `json:"target,omitempty"` 652 653 // Verb: Output only. Name of the verb executed by the operation. 654 Verb string `json:"verb,omitempty"` 655 656 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 657 // unconditionally include in API requests. By default, fields with 658 // empty values are omitted from API requests. However, any non-pointer, 659 // non-interface field appearing in ForceSendFields will be sent to the 660 // server regardless of whether the field is empty or not. This may be 661 // used to include empty fields in Patch requests. 662 ForceSendFields []string `json:"-"` 663 664 // NullFields is a list of field names (e.g. "ApiVersion") to include in 665 // API requests with the JSON null value. By default, fields with empty 666 // values are omitted from API requests. However, any field with an 667 // empty value appearing in NullFields will be sent to the server as 668 // null. It is an error if a field in this list has a non-empty value. 669 // This may be used to include null fields in Patch requests. 670 NullFields []string `json:"-"` 671} 672 673func (s *GoogleCloudManagedidentitiesV1beta1OpMetadata) MarshalJSON() ([]byte, error) { 674 type NoMethod GoogleCloudManagedidentitiesV1beta1OpMetadata 675 raw := NoMethod(*s) 676 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 677} 678 679// GoogleCloudSaasacceleratorManagementProvidersV1Instance: Instance 680// represents the interface for SLM services to actuate the state 681// of control plane resources. 682// 683// Example Instance in JSON, where 684// consumer-project=snapchat, 685// producer-project=cloud-sql: 686// 687// ```json 688// Instance: 689// { 690// "name": 691// "projects/snapchat/locations/us-east1/instances/prod-instance", 692// "create_time": { 693// "seconds": 1526406431, 694// }, 695// "labels": { 696// "env": "prod", 697// "foo": "bar" 698// }, 699// "state": READY, 700// "software_versions": { 701// "software_update": "cloud-sql-09-28-2018", 702// }, 703// "maintenance_policy_names": { 704// "UpdatePolicy": 705// 706// "projects/snapchat/locations/us-east1/maintenancePolicies/prod-update- 707// policy", 708// } 709// "tenant_project_id": "cloud-sql-test-tenant", 710// "producer_metadata": { 711// "cloud-sql-tier": "basic", 712// "cloud-sql-instance-size": "1G", 713// }, 714// "provisioned_resources": [ 715// { 716// "resource-type": "compute-instance", 717// "resource-url": 718// 719// "https://www.googleapis.com/compute/v1/projects/cloud-sql/zones/us-eas 720// t1-b/instances/vm-1", 721// } 722// ], 723// "maintenance_schedules": { 724// "csa_rollout": { 725// "start_time": { 726// "seconds": 1526406431, 727// }, 728// "end_time": { 729// "seconds": 1535406431, 730// }, 731// }, 732// "ncsa_rollout": { 733// "start_time": { 734// "seconds": 1526406431, 735// }, 736// "end_time": { 737// "seconds": 1535406431, 738// }, 739// } 740// }, 741// "consumer_defined_name": "my-sql-instance1", 742// } 743// ``` 744type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct { 745 // ConsumerDefinedName: consumer_defined_name is the name that is set by 746 // the consumer. On the other 747 // hand Name field represents system-assigned id of an instance so 748 // consumers 749 // are not necessarily aware of it. 750 // consumer_defined_name is used for notification/UI purposes for 751 // consumer to 752 // recognize their instances. 753 ConsumerDefinedName string `json:"consumerDefinedName,omitempty"` 754 755 // CreateTime: Output only. Timestamp when the resource was created. 756 CreateTime string `json:"createTime,omitempty"` 757 758 // Labels: Optional. Resource labels to represent user provided 759 // metadata. Each label 760 // is a key-value pair, where both the key and the value are arbitrary 761 // strings 762 // provided by the user. 763 Labels map[string]string `json:"labels,omitempty"` 764 765 // MaintenancePolicyNames: The MaintenancePolicies that have been 766 // attached to the instance. 767 // The key must be of the type name of the oneof policy name defined 768 // in 769 // MaintenancePolicy, and the referenced policy must define the same 770 // policy 771 // type. For complete details of MaintenancePolicy, please refer 772 // to 773 // go/cloud-saas-mw-ug. 774 MaintenancePolicyNames map[string]string `json:"maintenancePolicyNames,omitempty"` 775 776 // MaintenanceSchedules: The MaintenanceSchedule contains the scheduling 777 // information of published 778 // maintenance schedule. 779 MaintenanceSchedules map[string]GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule `json:"maintenanceSchedules,omitempty"` 780 781 // Name: Unique name of the resource. It uses the form: 782 // 783 // `projects/{project_id}/locations/{location_id}/instances/{instance_id} 784 // ` 785 Name string `json:"name,omitempty"` 786 787 // ProducerMetadata: Output only. Custom string attributes used 788 // primarily to expose 789 // producer-specific information in monitoring dashboards. 790 // See go/get-instance-metadata. 791 ProducerMetadata map[string]string `json:"producerMetadata,omitempty"` 792 793 // ProvisionedResources: Output only. The list of data plane resources 794 // provisioned for this 795 // instance, e.g. compute VMs. See go/get-instance-metadata. 796 ProvisionedResources []*GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource `json:"provisionedResources,omitempty"` 797 798 // RolloutMetadata: The map between RolloutType and the corresponding 799 // RolloutMetadata. 800 // This is only mutated by rollout service. For actuation 801 // implementation, 802 // this information is pass-through for Rollout management. Producer 803 // shall 804 // not modify by itself. 805 // For update of a single entry in this map, the update field mask 806 // shall 807 // follow this sementics: go/advanced-field-masks 808 RolloutMetadata map[string]GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata `json:"rolloutMetadata,omitempty"` 809 810 // SlmInstanceTemplate: Link to the SLM instance template. Only 811 // populated when updating SLM 812 // instances via SSA's Actuation service adaptor. 813 // Service producers with custom control plane (e.g. Cloud SQL) 814 // doesn't 815 // need to populate this field. Instead they should use 816 // software_versions. 817 SlmInstanceTemplate string `json:"slmInstanceTemplate,omitempty"` 818 819 // SloMetadata: Output only. SLO metadata for instance classification in 820 // the 821 // Standardized dataplane SLO platform. 822 // See go/cloud-ssa-standard-slo for feature description. 823 SloMetadata *GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata `json:"sloMetadata,omitempty"` 824 825 // SoftwareVersions: Software versions that are used to deploy this 826 // instance. This can be 827 // mutated by rollout services. 828 SoftwareVersions map[string]string `json:"softwareVersions,omitempty"` 829 830 // State: Output only. Current lifecycle state of the resource (e.g. if 831 // it's being 832 // created or ready to use). 833 // 834 // Possible values: 835 // "STATE_UNSPECIFIED" - Unspecified state. 836 // "CREATING" - Instance is being created. 837 // "READY" - Instance has been created and is ready to use. 838 // "UPDATING" - Instance is being updated. 839 // "REPAIRING" - Instance is unheathy and under repair. 840 // "DELETING" - Instance is being deleted. 841 // "ERROR" - Instance encountered an error and is in indeterministic 842 // state. 843 State string `json:"state,omitempty"` 844 845 // TenantProjectId: Output only. ID of the associated GCP tenant 846 // project. 847 // See go/get-instance-metadata. 848 TenantProjectId string `json:"tenantProjectId,omitempty"` 849 850 // UpdateTime: Output only. Timestamp when the resource was last 851 // modified. 852 UpdateTime string `json:"updateTime,omitempty"` 853 854 // ForceSendFields is a list of field names (e.g. "ConsumerDefinedName") 855 // to unconditionally include in API requests. By default, fields with 856 // empty values are omitted from API requests. However, any non-pointer, 857 // non-interface field appearing in ForceSendFields will be sent to the 858 // server regardless of whether the field is empty or not. This may be 859 // used to include empty fields in Patch requests. 860 ForceSendFields []string `json:"-"` 861 862 // NullFields is a list of field names (e.g. "ConsumerDefinedName") to 863 // include in API requests with the JSON null value. By default, fields 864 // with empty values are omitted from API requests. However, any field 865 // with an empty value appearing in NullFields will be sent to the 866 // server as null. It is an error if a field in this list has a 867 // non-empty value. This may be used to include null fields in Patch 868 // requests. 869 NullFields []string `json:"-"` 870} 871 872func (s *GoogleCloudSaasacceleratorManagementProvidersV1Instance) MarshalJSON() ([]byte, error) { 873 type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1Instance 874 raw := NoMethod(*s) 875 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 876} 877 878// GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule: 879// Maintenance schedule which is exposed to customer and potentially end 880// user, 881// indicating published upcoming future maintenance schedule 882type GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule struct { 883 // CanReschedule: Can this scheduled update be rescheduled? 884 // By default, it's true and API needs to do explicitly check whether 885 // it's 886 // set, if it's set as false explicitly, it's false 887 CanReschedule bool `json:"canReschedule,omitempty"` 888 889 // EndTime: The scheduled end time for the maintenance. 890 EndTime string `json:"endTime,omitempty"` 891 892 // RolloutManagementPolicy: The rollout management policy this 893 // maintenance schedule is associated 894 // with. When doing reschedule update request, the reschedule should 895 // be 896 // against this given policy. 897 RolloutManagementPolicy string `json:"rolloutManagementPolicy,omitempty"` 898 899 // StartTime: The scheduled start time for the maintenance. 900 StartTime string `json:"startTime,omitempty"` 901 902 // ForceSendFields is a list of field names (e.g. "CanReschedule") to 903 // unconditionally include in API requests. By default, fields with 904 // empty values are omitted from API requests. However, any non-pointer, 905 // non-interface field appearing in ForceSendFields will be sent to the 906 // server regardless of whether the field is empty or not. This may be 907 // used to include empty fields in Patch requests. 908 ForceSendFields []string `json:"-"` 909 910 // NullFields is a list of field names (e.g. "CanReschedule") to include 911 // in API requests with the JSON null value. By default, fields with 912 // empty values are omitted from API requests. However, any field with 913 // an empty value appearing in NullFields will be sent to the server as 914 // null. It is an error if a field in this list has a non-empty value. 915 // This may be used to include null fields in Patch requests. 916 NullFields []string `json:"-"` 917} 918 919func (s *GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule) MarshalJSON() ([]byte, error) { 920 type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule 921 raw := NoMethod(*s) 922 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 923} 924 925// GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata: Node 926// information for custom per-node SLO implementations. 927// SSA does not support per-node SLO, but producers can populate 928// per-node 929// information in SloMetadata for custom precomputations. 930// SSA Eligibility Exporter will emit per-node metric based on this 931// information. 932type GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata struct { 933 // Exclusions: By default node is eligible if instance is eligible. 934 // But individual node might be excluded from SLO by adding entry 935 // here. 936 // For semantic see SloMetadata.exclusions. 937 // If both instance and node level exclusions are present for time 938 // period, 939 // the node level's reason will be reported by Eligibility Exporter. 940 Exclusions []*GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion `json:"exclusions,omitempty"` 941 942 // Location: The location of the node, if different from instance 943 // location. 944 Location string `json:"location,omitempty"` 945 946 // NodeId: The id of the node. 947 // This should be equal to SaasInstanceNode.node_id. 948 NodeId string `json:"nodeId,omitempty"` 949 950 // ForceSendFields is a list of field names (e.g. "Exclusions") to 951 // unconditionally include in API requests. By default, fields with 952 // empty values are omitted from API requests. However, any non-pointer, 953 // non-interface field appearing in ForceSendFields will be sent to the 954 // server regardless of whether the field is empty or not. This may be 955 // used to include empty fields in Patch requests. 956 ForceSendFields []string `json:"-"` 957 958 // NullFields is a list of field names (e.g. "Exclusions") to include in 959 // API requests with the JSON null value. By default, fields with empty 960 // values are omitted from API requests. However, any field with an 961 // empty value appearing in NullFields will be sent to the server as 962 // null. It is an error if a field in this list has a non-empty value. 963 // This may be used to include null fields in Patch requests. 964 NullFields []string `json:"-"` 965} 966 967func (s *GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata) MarshalJSON() ([]byte, error) { 968 type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata 969 raw := NoMethod(*s) 970 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 971} 972 973// GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata: 974// This message has been deprecated. 975// NotificationMetadata is the notification state for an instance. 976type GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata struct { 977 // Rescheduled: Whether the instance update has been rescheduled. 978 Rescheduled bool `json:"rescheduled,omitempty"` 979 980 // ScheduledEndTime: The scheduled end time for the maintenance window 981 // during which update 982 // can be performed on the instance. 983 ScheduledEndTime string `json:"scheduledEndTime,omitempty"` 984 985 // ScheduledStartTime: The scheduled start time for the maintenance 986 // window during which 987 // update can be performed on the instance. 988 ScheduledStartTime string `json:"scheduledStartTime,omitempty"` 989 990 // TargetRelease: The target release to be applied to the instance. 991 TargetRelease string `json:"targetRelease,omitempty"` 992 993 // ForceSendFields is a list of field names (e.g. "Rescheduled") to 994 // unconditionally include in API requests. By default, fields with 995 // empty values are omitted from API requests. However, any non-pointer, 996 // non-interface field appearing in ForceSendFields will be sent to the 997 // server regardless of whether the field is empty or not. This may be 998 // used to include empty fields in Patch requests. 999 ForceSendFields []string `json:"-"` 1000 1001 // NullFields is a list of field names (e.g. "Rescheduled") to include 1002 // in API requests with the JSON null value. By default, fields with 1003 // empty values are omitted from API requests. However, any field with 1004 // an empty value appearing in NullFields will be sent to the server as 1005 // null. It is an error if a field in this list has a non-empty value. 1006 // This may be used to include null fields in Patch requests. 1007 NullFields []string `json:"-"` 1008} 1009 1010func (s *GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata) MarshalJSON() ([]byte, error) { 1011 type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata 1012 raw := NoMethod(*s) 1013 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1014} 1015 1016// GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource: 1017// Describes provisioned dataplane resources. 1018type GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource struct { 1019 // ResourceType: Type of the resource. This can be either a GCP resource 1020 // or a custom one 1021 // (e.g. another cloud provider's VM). For GCP compute resources use 1022 // singular 1023 // form of the names listed in GCP compute API 1024 // documentation 1025 // (https://cloud.google.com/compute/docs/reference/rest/v1 1026 // /), prefixed with 1027 // 'compute-', for example: 'compute-instance', 1028 // 'compute-disk', 1029 // 'compute-autoscaler'. 1030 ResourceType string `json:"resourceType,omitempty"` 1031 1032 // ResourceUrl: URL identifying the resource, 1033 // e.g. 1034 // "https://www.googleapis.com/compute/v1/projects/...)". 1035 ResourceUrl string `json:"resourceUrl,omitempty"` 1036 1037 // ForceSendFields is a list of field names (e.g. "ResourceType") to 1038 // unconditionally include in API requests. By default, fields with 1039 // empty values are omitted from API requests. However, any non-pointer, 1040 // non-interface field appearing in ForceSendFields will be sent to the 1041 // server regardless of whether the field is empty or not. This may be 1042 // used to include empty fields in Patch requests. 1043 ForceSendFields []string `json:"-"` 1044 1045 // NullFields is a list of field names (e.g. "ResourceType") to include 1046 // in API requests with the JSON null value. By default, fields with 1047 // empty values are omitted from API requests. However, any field with 1048 // an empty value appearing in NullFields will be sent to the server as 1049 // null. It is an error if a field in this list has a non-empty value. 1050 // This may be used to include null fields in Patch requests. 1051 NullFields []string `json:"-"` 1052} 1053 1054func (s *GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource) MarshalJSON() ([]byte, error) { 1055 type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource 1056 raw := NoMethod(*s) 1057 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1058} 1059 1060// GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata: This 1061// message has been deprecated. 1062// RolloutMetadata for an actuation instance. It maps to a single 1063// RolloutType. 1064type GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata struct { 1065 // Notification: Instance level notification metadata. 1066 Notification *GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata `json:"notification,omitempty"` 1067 1068 // ReleaseName: The last Release that has been applied to the instance. 1069 ReleaseName string `json:"releaseName,omitempty"` 1070 1071 // RolloutName: The last rollout that has been applied to the instance. 1072 RolloutName string `json:"rolloutName,omitempty"` 1073 1074 // ForceSendFields is a list of field names (e.g. "Notification") to 1075 // unconditionally include in API requests. By default, fields with 1076 // empty values are omitted from API requests. However, any non-pointer, 1077 // non-interface field appearing in ForceSendFields will be sent to the 1078 // server regardless of whether the field is empty or not. This may be 1079 // used to include empty fields in Patch requests. 1080 ForceSendFields []string `json:"-"` 1081 1082 // NullFields is a list of field names (e.g. "Notification") to include 1083 // in API requests with the JSON null value. By default, fields with 1084 // empty values are omitted from API requests. However, any field with 1085 // an empty value appearing in NullFields will be sent to the server as 1086 // null. It is an error if a field in this list has a non-empty value. 1087 // This may be used to include null fields in Patch requests. 1088 NullFields []string `json:"-"` 1089} 1090 1091func (s *GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata) MarshalJSON() ([]byte, error) { 1092 type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata 1093 raw := NoMethod(*s) 1094 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1095} 1096 1097// GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility: 1098// SloEligibility is a tuple containing eligibility value: true if an 1099// instance 1100// is eligible for SLO calculation or false if it should be excluded 1101// from all 1102// SLO-related calculations along with a user-defined reason. 1103type GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility struct { 1104 // Eligible: Whether an instance is eligible or ineligible. 1105 Eligible bool `json:"eligible,omitempty"` 1106 1107 // Reason: User-defined reason for the current value of instance 1108 // eligibility. Usually, 1109 // this can be directly mapped to the internal state. An empty reason 1110 // is 1111 // allowed. 1112 Reason string `json:"reason,omitempty"` 1113 1114 // ForceSendFields is a list of field names (e.g. "Eligible") to 1115 // unconditionally include in API requests. By default, fields with 1116 // empty values are omitted from API requests. However, any non-pointer, 1117 // non-interface field appearing in ForceSendFields will be sent to the 1118 // server regardless of whether the field is empty or not. This may be 1119 // used to include empty fields in Patch requests. 1120 ForceSendFields []string `json:"-"` 1121 1122 // NullFields is a list of field names (e.g. "Eligible") to include in 1123 // API requests with the JSON null value. By default, fields with empty 1124 // values are omitted from API requests. However, any field with an 1125 // empty value appearing in NullFields will be sent to the server as 1126 // null. It is an error if a field in this list has a non-empty value. 1127 // This may be used to include null fields in Patch requests. 1128 NullFields []string `json:"-"` 1129} 1130 1131func (s *GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility) MarshalJSON() ([]byte, error) { 1132 type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility 1133 raw := NoMethod(*s) 1134 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1135} 1136 1137// GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion: 1138// SloExclusion represents an exclusion in SLI calculation applies to 1139// all SLOs. 1140type GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion struct { 1141 // Duration: Exclusion duration. No restrictions on the possible 1142 // values. 1143 // 1144 // When an ongoing operation is taking longer than initially 1145 // expected, 1146 // an existing entry in the exclusion list can be updated by extending 1147 // the 1148 // duration. This is supported by the subsystem exporting eligibility 1149 // data 1150 // as long as such extension is committed at least 10 minutes before 1151 // the 1152 // original exclusion expiration - otherwise it is possible that there 1153 // will 1154 // be "gaps" in the exclusion application in the exported timeseries. 1155 Duration string `json:"duration,omitempty"` 1156 1157 // Reason: Human-readable reason for the exclusion. 1158 // This should be a static string (e.g. "Disruptive update in 1159 // progress") 1160 // and should not contain dynamically generated data (e.g. instance 1161 // name). 1162 // Can be left empty. 1163 Reason string `json:"reason,omitempty"` 1164 1165 // SliName: Name of an SLI that this exclusion applies to. Can be left 1166 // empty, 1167 // signaling that the instance should be excluded from all SLIs 1168 // defined 1169 // in the service SLO configuration. 1170 SliName string `json:"sliName,omitempty"` 1171 1172 // StartTime: Start time of the exclusion. No alignment (e.g. to a full 1173 // minute) needed. 1174 StartTime string `json:"startTime,omitempty"` 1175 1176 // ForceSendFields is a list of field names (e.g. "Duration") to 1177 // unconditionally include in API requests. By default, fields with 1178 // empty values are omitted from API requests. However, any non-pointer, 1179 // non-interface field appearing in ForceSendFields will be sent to the 1180 // server regardless of whether the field is empty or not. This may be 1181 // used to include empty fields in Patch requests. 1182 ForceSendFields []string `json:"-"` 1183 1184 // NullFields is a list of field names (e.g. "Duration") to include in 1185 // API requests with the JSON null value. By default, fields with empty 1186 // values are omitted from API requests. However, any field with an 1187 // empty value appearing in NullFields will be sent to the server as 1188 // null. It is an error if a field in this list has a non-empty value. 1189 // This may be used to include null fields in Patch requests. 1190 NullFields []string `json:"-"` 1191} 1192 1193func (s *GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion) MarshalJSON() ([]byte, error) { 1194 type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion 1195 raw := NoMethod(*s) 1196 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1197} 1198 1199// GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata: 1200// SloMetadata contains resources required for proper SLO classification 1201// of the 1202// instance. 1203type GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata struct { 1204 // Eligibility: Optional. User-defined instance eligibility. 1205 Eligibility *GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility `json:"eligibility,omitempty"` 1206 1207 // Exclusions: List of SLO exclusion windows. When multiple entries in 1208 // the list match 1209 // (matching the exclusion time-window against current time point) 1210 // the exclusion reason used in the first matching entry will be 1211 // published. 1212 // 1213 // It is not needed to include expired exclusion in this list, as only 1214 // the 1215 // currently applicable exclusions are taken into account by the 1216 // eligibility 1217 // exporting subsystem (the historical state of exclusions will be 1218 // reflected 1219 // in the historically produced timeseries regardless of the current 1220 // state). 1221 // 1222 // This field can be used to mark the instance as temporary 1223 // ineligible 1224 // for the purpose of SLO calculation. For permanent instance SLO 1225 // exclusion, 1226 // use of custom instance eligibility is recommended. See 'eligibility' 1227 // field 1228 // below. 1229 Exclusions []*GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion `json:"exclusions,omitempty"` 1230 1231 // Nodes: Optional. List of nodes. 1232 // Some producers need to use per-node metadata to calculate SLO. 1233 // This field allows such producers to publish per-node SLO meta 1234 // data, 1235 // which will be consumed by SSA Eligibility Exporter and published in 1236 // the 1237 // form of per node metric to Monarch. 1238 Nodes []*GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata `json:"nodes,omitempty"` 1239 1240 // Tier: Name of the SLO tier the Instance belongs to. This name will be 1241 // expected to 1242 // match the tiers specified in the service SLO configuration. 1243 // 1244 // Field is mandatory and must not be empty. 1245 Tier string `json:"tier,omitempty"` 1246 1247 // ForceSendFields is a list of field names (e.g. "Eligibility") to 1248 // unconditionally include in API requests. By default, fields with 1249 // empty values are omitted from API requests. However, any non-pointer, 1250 // non-interface field appearing in ForceSendFields will be sent to the 1251 // server regardless of whether the field is empty or not. This may be 1252 // used to include empty fields in Patch requests. 1253 ForceSendFields []string `json:"-"` 1254 1255 // NullFields is a list of field names (e.g. "Eligibility") to include 1256 // in API requests with the JSON null value. By default, fields with 1257 // empty values are omitted from API requests. However, any field with 1258 // an empty value appearing in NullFields will be sent to the server as 1259 // null. It is an error if a field in this list has a non-empty value. 1260 // This may be used to include null fields in Patch requests. 1261 NullFields []string `json:"-"` 1262} 1263 1264func (s *GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata) MarshalJSON() ([]byte, error) { 1265 type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata 1266 raw := NoMethod(*s) 1267 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1268} 1269 1270type ListDomainsResponse struct { 1271 // Domains: A list of Managed Identities Service domains in the project. 1272 Domains []*Domain `json:"domains,omitempty"` 1273 1274 // NextPageToken: Token to retrieve the next page of results, or empty 1275 // if there are no more 1276 // results in the list. 1277 NextPageToken string `json:"nextPageToken,omitempty"` 1278 1279 // Unreachable: Locations that could not be reached. 1280 Unreachable []string `json:"unreachable,omitempty"` 1281 1282 // ServerResponse contains the HTTP response code and headers from the 1283 // server. 1284 googleapi.ServerResponse `json:"-"` 1285 1286 // ForceSendFields is a list of field names (e.g. "Domains") to 1287 // unconditionally include in API requests. By default, fields with 1288 // empty values are omitted from API requests. However, any non-pointer, 1289 // non-interface field appearing in ForceSendFields will be sent to the 1290 // server regardless of whether the field is empty or not. This may be 1291 // used to include empty fields in Patch requests. 1292 ForceSendFields []string `json:"-"` 1293 1294 // NullFields is a list of field names (e.g. "Domains") to include in 1295 // API requests with the JSON null value. By default, fields with empty 1296 // values are omitted from API requests. However, any field with an 1297 // empty value appearing in NullFields will be sent to the server as 1298 // null. It is an error if a field in this list has a non-empty value. 1299 // This may be used to include null fields in Patch requests. 1300 NullFields []string `json:"-"` 1301} 1302 1303func (s *ListDomainsResponse) MarshalJSON() ([]byte, error) { 1304 type NoMethod ListDomainsResponse 1305 raw := NoMethod(*s) 1306 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1307} 1308 1309// ListLocationsResponse: The response message for 1310// Locations.ListLocations. 1311type ListLocationsResponse struct { 1312 // Locations: A list of locations that matches the specified filter in 1313 // the request. 1314 Locations []*Location `json:"locations,omitempty"` 1315 1316 // NextPageToken: The standard List next-page token. 1317 NextPageToken string `json:"nextPageToken,omitempty"` 1318 1319 // ServerResponse contains the HTTP response code and headers from the 1320 // server. 1321 googleapi.ServerResponse `json:"-"` 1322 1323 // ForceSendFields is a list of field names (e.g. "Locations") to 1324 // unconditionally include in API requests. By default, fields with 1325 // empty values are omitted from API requests. However, any non-pointer, 1326 // non-interface field appearing in ForceSendFields will be sent to the 1327 // server regardless of whether the field is empty or not. This may be 1328 // used to include empty fields in Patch requests. 1329 ForceSendFields []string `json:"-"` 1330 1331 // NullFields is a list of field names (e.g. "Locations") to include in 1332 // API requests with the JSON null value. By default, fields with empty 1333 // values are omitted from API requests. However, any field with an 1334 // empty value appearing in NullFields will be sent to the server as 1335 // null. It is an error if a field in this list has a non-empty value. 1336 // This may be used to include null fields in Patch requests. 1337 NullFields []string `json:"-"` 1338} 1339 1340func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 1341 type NoMethod ListLocationsResponse 1342 raw := NoMethod(*s) 1343 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1344} 1345 1346// ListOperationsResponse: The response message for 1347// Operations.ListOperations. 1348type ListOperationsResponse struct { 1349 // NextPageToken: The standard List next-page token. 1350 NextPageToken string `json:"nextPageToken,omitempty"` 1351 1352 // Operations: A list of operations that matches the specified filter in 1353 // the request. 1354 Operations []*Operation `json:"operations,omitempty"` 1355 1356 // ServerResponse contains the HTTP response code and headers from the 1357 // server. 1358 googleapi.ServerResponse `json:"-"` 1359 1360 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1361 // unconditionally include in API requests. By default, fields with 1362 // empty values are omitted from API requests. However, any non-pointer, 1363 // non-interface field appearing in ForceSendFields will be sent to the 1364 // server regardless of whether the field is empty or not. This may be 1365 // used to include empty fields in Patch requests. 1366 ForceSendFields []string `json:"-"` 1367 1368 // NullFields is a list of field names (e.g. "NextPageToken") to include 1369 // in API requests with the JSON null value. By default, fields with 1370 // empty values are omitted from API requests. However, any field with 1371 // an empty value appearing in NullFields will be sent to the server as 1372 // null. It is an error if a field in this list has a non-empty value. 1373 // This may be used to include null fields in Patch requests. 1374 NullFields []string `json:"-"` 1375} 1376 1377func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 1378 type NoMethod ListOperationsResponse 1379 raw := NoMethod(*s) 1380 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1381} 1382 1383// Location: A resource that represents Google Cloud Platform location. 1384type Location struct { 1385 // DisplayName: The friendly name for this location, typically a nearby 1386 // city name. 1387 // For example, "Tokyo". 1388 DisplayName string `json:"displayName,omitempty"` 1389 1390 // Labels: Cross-service attributes for the location. For example 1391 // 1392 // {"cloud.googleapis.com/region": "us-east1"} 1393 Labels map[string]string `json:"labels,omitempty"` 1394 1395 // LocationId: The canonical id for this location. For example: 1396 // "us-east1". 1397 LocationId string `json:"locationId,omitempty"` 1398 1399 // Metadata: Service-specific metadata. For example the available 1400 // capacity at the given 1401 // location. 1402 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 1403 1404 // Name: Resource name for the location, which may vary between 1405 // implementations. 1406 // For example: "projects/example-project/locations/us-east1" 1407 Name string `json:"name,omitempty"` 1408 1409 // ServerResponse contains the HTTP response code and headers from the 1410 // server. 1411 googleapi.ServerResponse `json:"-"` 1412 1413 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1414 // unconditionally include in API requests. By default, fields with 1415 // empty values are omitted from API requests. However, any non-pointer, 1416 // non-interface field appearing in ForceSendFields will be sent to the 1417 // server regardless of whether the field is empty or not. This may be 1418 // used to include empty fields in Patch requests. 1419 ForceSendFields []string `json:"-"` 1420 1421 // NullFields is a list of field names (e.g. "DisplayName") to include 1422 // in API requests with the JSON null value. By default, fields with 1423 // empty values are omitted from API requests. However, any field with 1424 // an empty value appearing in NullFields will be sent to the server as 1425 // null. It is an error if a field in this list has a non-empty value. 1426 // This may be used to include null fields in Patch requests. 1427 NullFields []string `json:"-"` 1428} 1429 1430func (s *Location) MarshalJSON() ([]byte, error) { 1431 type NoMethod Location 1432 raw := NoMethod(*s) 1433 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1434} 1435 1436// Operation: This resource represents a long-running operation that is 1437// the result of a 1438// network API call. 1439type Operation struct { 1440 // Done: If the value is `false`, it means the operation is still in 1441 // progress. 1442 // If `true`, the operation is completed, and either `error` or 1443 // `response` is 1444 // available. 1445 Done bool `json:"done,omitempty"` 1446 1447 // Error: The error result of the operation in case of failure or 1448 // cancellation. 1449 Error *Status `json:"error,omitempty"` 1450 1451 // Metadata: Service-specific metadata associated with the operation. 1452 // It typically 1453 // contains progress information and common metadata such as create 1454 // time. 1455 // Some services might not provide such metadata. Any method that 1456 // returns a 1457 // long-running operation should document the metadata type, if any. 1458 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 1459 1460 // Name: The server-assigned name, which is only unique within the same 1461 // service that 1462 // originally returns it. If you use the default HTTP mapping, 1463 // the 1464 // `name` should be a resource name ending with 1465 // `operations/{unique_id}`. 1466 Name string `json:"name,omitempty"` 1467 1468 // Response: The normal response of the operation in case of success. 1469 // If the original 1470 // method returns no data on success, such as `Delete`, the response 1471 // is 1472 // `google.protobuf.Empty`. If the original method is 1473 // standard 1474 // `Get`/`Create`/`Update`, the response should be the resource. For 1475 // other 1476 // methods, the response should have the type `XxxResponse`, where 1477 // `Xxx` 1478 // is the original method name. For example, if the original method 1479 // name 1480 // is `TakeSnapshot()`, the inferred response type 1481 // is 1482 // `TakeSnapshotResponse`. 1483 Response googleapi.RawMessage `json:"response,omitempty"` 1484 1485 // ServerResponse contains the HTTP response code and headers from the 1486 // server. 1487 googleapi.ServerResponse `json:"-"` 1488 1489 // ForceSendFields is a list of field names (e.g. "Done") to 1490 // unconditionally include in API requests. By default, fields with 1491 // empty values are omitted from API requests. However, any non-pointer, 1492 // non-interface field appearing in ForceSendFields will be sent to the 1493 // server regardless of whether the field is empty or not. This may be 1494 // used to include empty fields in Patch requests. 1495 ForceSendFields []string `json:"-"` 1496 1497 // NullFields is a list of field names (e.g. "Done") to include in API 1498 // requests with the JSON null value. By default, fields with empty 1499 // values are omitted from API requests. However, any field with an 1500 // empty value appearing in NullFields will be sent to the server as 1501 // null. It is an error if a field in this list has a non-empty value. 1502 // This may be used to include null fields in Patch requests. 1503 NullFields []string `json:"-"` 1504} 1505 1506func (s *Operation) MarshalJSON() ([]byte, error) { 1507 type NoMethod Operation 1508 raw := NoMethod(*s) 1509 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1510} 1511 1512// OperationMetadata: Represents the metadata of the long-running 1513// operation. 1514type OperationMetadata struct { 1515 // ApiVersion: [Output only] API version used to start the operation. 1516 ApiVersion string `json:"apiVersion,omitempty"` 1517 1518 // CancelRequested: [Output only] Identifies whether the user has 1519 // requested cancellation 1520 // of the operation. Operations that have successfully been 1521 // cancelled 1522 // have Operation.error value with a google.rpc.Status.code of 1523 // 1, 1524 // corresponding to `Code.CANCELLED`. 1525 CancelRequested bool `json:"cancelRequested,omitempty"` 1526 1527 // CreateTime: [Output only] The time the operation was created. 1528 CreateTime string `json:"createTime,omitempty"` 1529 1530 // EndTime: [Output only] The time the operation finished running. 1531 EndTime string `json:"endTime,omitempty"` 1532 1533 // StatusDetail: [Output only] Human-readable status of the operation, 1534 // if any. 1535 StatusDetail string `json:"statusDetail,omitempty"` 1536 1537 // Target: [Output only] Server-defined resource path for the target of 1538 // the operation. 1539 Target string `json:"target,omitempty"` 1540 1541 // Verb: [Output only] Name of the verb executed by the operation. 1542 Verb string `json:"verb,omitempty"` 1543 1544 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1545 // unconditionally include in API requests. By default, fields with 1546 // empty values are omitted from API requests. However, any non-pointer, 1547 // non-interface field appearing in ForceSendFields will be sent to the 1548 // server regardless of whether the field is empty or not. This may be 1549 // used to include empty fields in Patch requests. 1550 ForceSendFields []string `json:"-"` 1551 1552 // NullFields is a list of field names (e.g. "ApiVersion") to include in 1553 // API requests with the JSON null value. By default, fields with empty 1554 // values are omitted from API requests. However, any field with an 1555 // empty value appearing in NullFields will be sent to the server as 1556 // null. It is an error if a field in this list has a non-empty value. 1557 // This may be used to include null fields in Patch requests. 1558 NullFields []string `json:"-"` 1559} 1560 1561func (s *OperationMetadata) MarshalJSON() ([]byte, error) { 1562 type NoMethod OperationMetadata 1563 raw := NoMethod(*s) 1564 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1565} 1566 1567// Policy: An Identity and Access Management (IAM) policy, which 1568// specifies access 1569// controls for Google Cloud resources. 1570// 1571// 1572// A `Policy` is a collection of `bindings`. A `binding` binds one or 1573// more 1574// `members` to a single `role`. Members can be user accounts, service 1575// accounts, 1576// Google groups, and domains (such as G Suite). A `role` is a named 1577// list of 1578// permissions; each `role` can be an IAM predefined role or a 1579// user-created 1580// custom role. 1581// 1582// Optionally, a `binding` can specify a `condition`, which is a 1583// logical 1584// expression that allows access to a resource only if the expression 1585// evaluates 1586// to `true`. A condition can add constraints based on attributes of 1587// the 1588// request, the resource, or both. 1589// 1590// **JSON example:** 1591// 1592// { 1593// "bindings": [ 1594// { 1595// "role": "roles/resourcemanager.organizationAdmin", 1596// "members": [ 1597// "user:mike@example.com", 1598// "group:admins@example.com", 1599// "domain:google.com", 1600// 1601// "serviceAccount:my-project-id@appspot.gserviceaccount.com" 1602// ] 1603// }, 1604// { 1605// "role": "roles/resourcemanager.organizationViewer", 1606// "members": ["user:eve@example.com"], 1607// "condition": { 1608// "title": "expirable access", 1609// "description": "Does not grant access after Sep 2020", 1610// "expression": "request.time < 1611// timestamp('2020-10-01T00:00:00.000Z')", 1612// } 1613// } 1614// ], 1615// "etag": "BwWWja0YfJA=", 1616// "version": 3 1617// } 1618// 1619// **YAML example:** 1620// 1621// bindings: 1622// - members: 1623// - user:mike@example.com 1624// - group:admins@example.com 1625// - domain:google.com 1626// - serviceAccount:my-project-id@appspot.gserviceaccount.com 1627// role: roles/resourcemanager.organizationAdmin 1628// - members: 1629// - user:eve@example.com 1630// role: roles/resourcemanager.organizationViewer 1631// condition: 1632// title: expirable access 1633// description: Does not grant access after Sep 2020 1634// expression: request.time < 1635// timestamp('2020-10-01T00:00:00.000Z') 1636// - etag: BwWWja0YfJA= 1637// - version: 3 1638// 1639// For a description of IAM and its features, see the 1640// [IAM documentation](https://cloud.google.com/iam/docs/). 1641type Policy struct { 1642 // Bindings: Associates a list of `members` to a `role`. Optionally, may 1643 // specify a 1644 // `condition` that determines how and when the `bindings` are applied. 1645 // Each 1646 // of the `bindings` must contain at least one member. 1647 Bindings []*Binding `json:"bindings,omitempty"` 1648 1649 // Etag: `etag` is used for optimistic concurrency control as a way to 1650 // help 1651 // prevent simultaneous updates of a policy from overwriting each 1652 // other. 1653 // It is strongly suggested that systems make use of the `etag` in 1654 // the 1655 // read-modify-write cycle to perform policy updates in order to avoid 1656 // race 1657 // conditions: An `etag` is returned in the response to `getIamPolicy`, 1658 // and 1659 // systems are expected to put that etag in the request to 1660 // `setIamPolicy` to 1661 // ensure that their change will be applied to the same version of the 1662 // policy. 1663 // 1664 // **Important:** If you use IAM Conditions, you must include the `etag` 1665 // field 1666 // whenever you call `setIamPolicy`. If you omit this field, then IAM 1667 // allows 1668 // you to overwrite a version `3` policy with a version `1` policy, and 1669 // all of 1670 // the conditions in the version `3` policy are lost. 1671 Etag string `json:"etag,omitempty"` 1672 1673 // Version: Specifies the format of the policy. 1674 // 1675 // Valid values are `0`, `1`, and `3`. Requests that specify an invalid 1676 // value 1677 // are rejected. 1678 // 1679 // Any operation that affects conditional role bindings must specify 1680 // version 1681 // `3`. This requirement applies to the following operations: 1682 // 1683 // * Getting a policy that includes a conditional role binding 1684 // * Adding a conditional role binding to a policy 1685 // * Changing a conditional role binding in a policy 1686 // * Removing any role binding, with or without a condition, from a 1687 // policy 1688 // that includes conditions 1689 // 1690 // **Important:** If you use IAM Conditions, you must include the `etag` 1691 // field 1692 // whenever you call `setIamPolicy`. If you omit this field, then IAM 1693 // allows 1694 // you to overwrite a version `3` policy with a version `1` policy, and 1695 // all of 1696 // the conditions in the version `3` policy are lost. 1697 // 1698 // If a policy does not include any conditions, operations on that 1699 // policy may 1700 // specify any valid version or leave the field unset. 1701 Version int64 `json:"version,omitempty"` 1702 1703 // ServerResponse contains the HTTP response code and headers from the 1704 // server. 1705 googleapi.ServerResponse `json:"-"` 1706 1707 // ForceSendFields is a list of field names (e.g. "Bindings") to 1708 // unconditionally include in API requests. By default, fields with 1709 // empty values are omitted from API requests. However, any non-pointer, 1710 // non-interface field appearing in ForceSendFields will be sent to the 1711 // server regardless of whether the field is empty or not. This may be 1712 // used to include empty fields in Patch requests. 1713 ForceSendFields []string `json:"-"` 1714 1715 // NullFields is a list of field names (e.g. "Bindings") to include in 1716 // API requests with the JSON null value. By default, fields with empty 1717 // values are omitted from API requests. However, any field with an 1718 // empty value appearing in NullFields will be sent to the server as 1719 // null. It is an error if a field in this list has a non-empty value. 1720 // This may be used to include null fields in Patch requests. 1721 NullFields []string `json:"-"` 1722} 1723 1724func (s *Policy) MarshalJSON() ([]byte, error) { 1725 type NoMethod Policy 1726 raw := NoMethod(*s) 1727 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1728} 1729 1730type ReconfigureTrustRequest struct { 1731 // Trust: The domain trust resource with updated dns conditional 1732 // forwarder. 1733 Trust *Trust `json:"trust,omitempty"` 1734 1735 // ForceSendFields is a list of field names (e.g. "Trust") to 1736 // unconditionally include in API requests. By default, fields with 1737 // empty values are omitted from API requests. However, any non-pointer, 1738 // non-interface field appearing in ForceSendFields will be sent to the 1739 // server regardless of whether the field is empty or not. This may be 1740 // used to include empty fields in Patch requests. 1741 ForceSendFields []string `json:"-"` 1742 1743 // NullFields is a list of field names (e.g. "Trust") to include in API 1744 // requests with the JSON null value. By default, fields with empty 1745 // values are omitted from API requests. However, any field with an 1746 // empty value appearing in NullFields will be sent to the server as 1747 // null. It is an error if a field in this list has a non-empty value. 1748 // This may be used to include null fields in Patch requests. 1749 NullFields []string `json:"-"` 1750} 1751 1752func (s *ReconfigureTrustRequest) MarshalJSON() ([]byte, error) { 1753 type NoMethod ReconfigureTrustRequest 1754 raw := NoMethod(*s) 1755 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1756} 1757 1758type ResetAdminPasswordRequest struct { 1759} 1760 1761type ResetAdminPasswordResponse struct { 1762 // Password: A random password. See admin for more information. 1763 Password string `json:"password,omitempty"` 1764 1765 // ServerResponse contains the HTTP response code and headers from the 1766 // server. 1767 googleapi.ServerResponse `json:"-"` 1768 1769 // ForceSendFields is a list of field names (e.g. "Password") to 1770 // unconditionally include in API requests. By default, fields with 1771 // empty values are omitted from API requests. However, any non-pointer, 1772 // non-interface field appearing in ForceSendFields will be sent to the 1773 // server regardless of whether the field is empty or not. This may be 1774 // used to include empty fields in Patch requests. 1775 ForceSendFields []string `json:"-"` 1776 1777 // NullFields is a list of field names (e.g. "Password") to include in 1778 // API requests with the JSON null value. By default, fields with empty 1779 // values are omitted from API requests. However, any field with an 1780 // empty value appearing in NullFields will be sent to the server as 1781 // null. It is an error if a field in this list has a non-empty value. 1782 // This may be used to include null fields in Patch requests. 1783 NullFields []string `json:"-"` 1784} 1785 1786func (s *ResetAdminPasswordResponse) MarshalJSON() ([]byte, error) { 1787 type NoMethod ResetAdminPasswordResponse 1788 raw := NoMethod(*s) 1789 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1790} 1791 1792// SetIamPolicyRequest: Request message for `SetIamPolicy` method. 1793type SetIamPolicyRequest struct { 1794 // Policy: REQUIRED: The complete policy to be applied to the 1795 // `resource`. The size of 1796 // the policy is limited to a few 10s of KB. An empty policy is a 1797 // valid policy but certain Cloud Platform services (such as 1798 // Projects) 1799 // might reject them. 1800 Policy *Policy `json:"policy,omitempty"` 1801 1802 // ForceSendFields is a list of field names (e.g. "Policy") to 1803 // unconditionally include in API requests. By default, fields with 1804 // empty values are omitted from API requests. However, any non-pointer, 1805 // non-interface field appearing in ForceSendFields will be sent to the 1806 // server regardless of whether the field is empty or not. This may be 1807 // used to include empty fields in Patch requests. 1808 ForceSendFields []string `json:"-"` 1809 1810 // NullFields is a list of field names (e.g. "Policy") to include in API 1811 // requests with the JSON null value. By default, fields with empty 1812 // values are omitted from API requests. However, any field with an 1813 // empty value appearing in NullFields will be sent to the server as 1814 // null. It is an error if a field in this list has a non-empty value. 1815 // This may be used to include null fields in Patch requests. 1816 NullFields []string `json:"-"` 1817} 1818 1819func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 1820 type NoMethod SetIamPolicyRequest 1821 raw := NoMethod(*s) 1822 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1823} 1824 1825// Status: The `Status` type defines a logical error model that is 1826// suitable for 1827// different programming environments, including REST APIs and RPC APIs. 1828// It is 1829// used by [gRPC](https://github.com/grpc). Each `Status` message 1830// contains 1831// three pieces of data: error code, error message, and error 1832// details. 1833// 1834// You can find out more about this error model and how to work with it 1835// in the 1836// [API Design Guide](https://cloud.google.com/apis/design/errors). 1837type Status struct { 1838 // Code: The status code, which should be an enum value of 1839 // google.rpc.Code. 1840 Code int64 `json:"code,omitempty"` 1841 1842 // Details: A list of messages that carry the error details. There is a 1843 // common set of 1844 // message types for APIs to use. 1845 Details []googleapi.RawMessage `json:"details,omitempty"` 1846 1847 // Message: A developer-facing error message, which should be in 1848 // English. Any 1849 // user-facing error message should be localized and sent in 1850 // the 1851 // google.rpc.Status.details field, or localized by the client. 1852 Message string `json:"message,omitempty"` 1853 1854 // ForceSendFields is a list of field names (e.g. "Code") to 1855 // unconditionally include in API requests. By default, fields with 1856 // empty values are omitted from API requests. However, any non-pointer, 1857 // non-interface field appearing in ForceSendFields will be sent to the 1858 // server regardless of whether the field is empty or not. This may be 1859 // used to include empty fields in Patch requests. 1860 ForceSendFields []string `json:"-"` 1861 1862 // NullFields is a list of field names (e.g. "Code") to include in API 1863 // requests with the JSON null value. By default, fields with empty 1864 // values are omitted from API requests. However, any field with an 1865 // empty value appearing in NullFields will be sent to the server as 1866 // null. It is an error if a field in this list has a non-empty value. 1867 // This may be used to include null fields in Patch requests. 1868 NullFields []string `json:"-"` 1869} 1870 1871func (s *Status) MarshalJSON() ([]byte, error) { 1872 type NoMethod Status 1873 raw := NoMethod(*s) 1874 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1875} 1876 1877// TestIamPermissionsRequest: Request message for `TestIamPermissions` 1878// method. 1879type TestIamPermissionsRequest struct { 1880 // Permissions: The set of permissions to check for the `resource`. 1881 // Permissions with 1882 // wildcards (such as '*' or 'storage.*') are not allowed. For 1883 // more 1884 // information see 1885 // [IAM 1886 // Overview](https://cloud.google.com/iam/docs/overview#permissions). 1887 Permissions []string `json:"permissions,omitempty"` 1888 1889 // ForceSendFields is a list of field names (e.g. "Permissions") to 1890 // unconditionally include in API requests. By default, fields with 1891 // empty values are omitted from API requests. However, any non-pointer, 1892 // non-interface field appearing in ForceSendFields will be sent to the 1893 // server regardless of whether the field is empty or not. This may be 1894 // used to include empty fields in Patch requests. 1895 ForceSendFields []string `json:"-"` 1896 1897 // NullFields is a list of field names (e.g. "Permissions") to include 1898 // in API requests with the JSON null value. By default, fields with 1899 // empty values are omitted from API requests. However, any field with 1900 // an empty value appearing in NullFields will be sent to the server as 1901 // null. It is an error if a field in this list has a non-empty value. 1902 // This may be used to include null fields in Patch requests. 1903 NullFields []string `json:"-"` 1904} 1905 1906func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 1907 type NoMethod TestIamPermissionsRequest 1908 raw := NoMethod(*s) 1909 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1910} 1911 1912// TestIamPermissionsResponse: Response message for `TestIamPermissions` 1913// method. 1914type TestIamPermissionsResponse struct { 1915 // Permissions: A subset of `TestPermissionsRequest.permissions` that 1916 // the caller is 1917 // allowed. 1918 Permissions []string `json:"permissions,omitempty"` 1919 1920 // ServerResponse contains the HTTP response code and headers from the 1921 // server. 1922 googleapi.ServerResponse `json:"-"` 1923 1924 // ForceSendFields is a list of field names (e.g. "Permissions") to 1925 // unconditionally include in API requests. By default, fields with 1926 // empty values are omitted from API requests. However, any non-pointer, 1927 // non-interface field appearing in ForceSendFields will be sent to the 1928 // server regardless of whether the field is empty or not. This may be 1929 // used to include empty fields in Patch requests. 1930 ForceSendFields []string `json:"-"` 1931 1932 // NullFields is a list of field names (e.g. "Permissions") to include 1933 // in API requests with the JSON null value. By default, fields with 1934 // empty values are omitted from API requests. However, any field with 1935 // an empty value appearing in NullFields will be sent to the server as 1936 // null. It is an error if a field in this list has a non-empty value. 1937 // This may be used to include null fields in Patch requests. 1938 NullFields []string `json:"-"` 1939} 1940 1941func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 1942 type NoMethod TestIamPermissionsResponse 1943 raw := NoMethod(*s) 1944 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1945} 1946 1947// Trust: Represents a relationship between two domains which makes it 1948// possible 1949// for users in one domain to be authenticated by a dc in another 1950// domain. 1951// Refer 1952// https://docs.microsoft.com/en-us/previous-versions/windo 1953// ws/it-pro/windows-server-2008-R2-and-2008/cc731335(v%3dws.10) 1954type Trust struct { 1955 // CreateTime: Output only. The time the instance was created. 1956 CreateTime string `json:"createTime,omitempty"` 1957 1958 // LastKnownTrustConnectedHeartbeatTime: Output only. The last heartbeat 1959 // time when the trust was known to be 1960 // connected. 1961 LastKnownTrustConnectedHeartbeatTime string `json:"lastKnownTrustConnectedHeartbeatTime,omitempty"` 1962 1963 // SelectiveAuthentication: The trust authentication type which decides 1964 // whether the trusted side has 1965 // forest/domain wide access or selective access to approved set of 1966 // resources. 1967 SelectiveAuthentication bool `json:"selectiveAuthentication,omitempty"` 1968 1969 // State: Output only. The current state of this trust. 1970 // 1971 // Possible values: 1972 // "STATE_UNSPECIFIED" - Not Set 1973 // "CREATING" - Domain trust is being created. 1974 // "UPDATING" - Domain trust is being updated. 1975 // "DELETING" - Domain trust is being deleted. 1976 // "CONNECTED" - Domain trust is connected. 1977 // "DISCONNECTED" - Domain trust is disconnected. 1978 State string `json:"state,omitempty"` 1979 1980 // StateDescription: Output only. Additional information about the 1981 // current state of this 1982 // trust, if available. 1983 StateDescription string `json:"stateDescription,omitempty"` 1984 1985 // TargetDnsIpAddresses: The target dns server ip addresses which can 1986 // resolve the remote domain 1987 // involved in trust. 1988 TargetDnsIpAddresses []string `json:"targetDnsIpAddresses,omitempty"` 1989 1990 // TargetDomainName: The fully qualified target domain name which will 1991 // be in trust with current 1992 // domain. 1993 TargetDomainName string `json:"targetDomainName,omitempty"` 1994 1995 // TrustDirection: The trust direction decides the current domain is 1996 // trusted, trusting or 1997 // both. 1998 // 1999 // Possible values: 2000 // "TRUST_DIRECTION_UNSPECIFIED" - Not Set 2001 // "INBOUND" - The inbound direction represents the trusting side. 2002 // "OUTBOUND" - The outboud direction represents the trusted side. 2003 // "BIDIRECTIONAL" - The bidirectional direction represents the 2004 // trusted / trusting side. 2005 TrustDirection string `json:"trustDirection,omitempty"` 2006 2007 // TrustHandshakeSecret: Input only, and will not be stored. The trust 2008 // secret used for handshake 2009 // with target domain. 2010 TrustHandshakeSecret string `json:"trustHandshakeSecret,omitempty"` 2011 2012 // TrustType: The type of trust represented by the trust resource. 2013 // 2014 // Possible values: 2015 // "TRUST_TYPE_UNSPECIFIED" - Not Set 2016 // "FOREST" - The forest trust. 2017 // "EXTERNAL" - The external domain trust. 2018 TrustType string `json:"trustType,omitempty"` 2019 2020 // UpdateTime: Output only. Last update time. 2021 UpdateTime string `json:"updateTime,omitempty"` 2022 2023 // ForceSendFields is a list of field names (e.g. "CreateTime") to 2024 // unconditionally include in API requests. By default, fields with 2025 // empty values are omitted from API requests. However, any non-pointer, 2026 // non-interface field appearing in ForceSendFields will be sent to the 2027 // server regardless of whether the field is empty or not. This may be 2028 // used to include empty fields in Patch requests. 2029 ForceSendFields []string `json:"-"` 2030 2031 // NullFields is a list of field names (e.g. "CreateTime") to include in 2032 // API requests with the JSON null value. By default, fields with empty 2033 // values are omitted from API requests. However, any field with an 2034 // empty value appearing in NullFields will be sent to the server as 2035 // null. It is an error if a field in this list has a non-empty value. 2036 // This may be used to include null fields in Patch requests. 2037 NullFields []string `json:"-"` 2038} 2039 2040func (s *Trust) MarshalJSON() ([]byte, error) { 2041 type NoMethod Trust 2042 raw := NoMethod(*s) 2043 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2044} 2045 2046type ValidateTrustRequest struct { 2047 // Trust: The domain trust to validate trust state for. 2048 Trust *Trust `json:"trust,omitempty"` 2049 2050 // ForceSendFields is a list of field names (e.g. "Trust") to 2051 // unconditionally include in API requests. By default, fields with 2052 // empty values are omitted from API requests. However, any non-pointer, 2053 // non-interface field appearing in ForceSendFields will be sent to the 2054 // server regardless of whether the field is empty or not. This may be 2055 // used to include empty fields in Patch requests. 2056 ForceSendFields []string `json:"-"` 2057 2058 // NullFields is a list of field names (e.g. "Trust") to include in API 2059 // requests with the JSON null value. By default, fields with empty 2060 // values are omitted from API requests. However, any field with an 2061 // empty value appearing in NullFields will be sent to the server as 2062 // null. It is an error if a field in this list has a non-empty value. 2063 // This may be used to include null fields in Patch requests. 2064 NullFields []string `json:"-"` 2065} 2066 2067func (s *ValidateTrustRequest) MarshalJSON() ([]byte, error) { 2068 type NoMethod ValidateTrustRequest 2069 raw := NoMethod(*s) 2070 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2071} 2072 2073// method id "managedidentities.projects.locations.get": 2074 2075type ProjectsLocationsGetCall struct { 2076 s *Service 2077 name string 2078 urlParams_ gensupport.URLParams 2079 ifNoneMatch_ string 2080 ctx_ context.Context 2081 header_ http.Header 2082} 2083 2084// Get: Gets information about a location. 2085func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { 2086 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2087 c.name = name 2088 return c 2089} 2090 2091// Fields allows partial responses to be retrieved. See 2092// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2093// for more information. 2094func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { 2095 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2096 return c 2097} 2098 2099// IfNoneMatch sets the optional parameter which makes the operation 2100// fail if the object's ETag matches the given value. This is useful for 2101// getting updates only after the object has changed since the last 2102// request. Use googleapi.IsNotModified to check whether the response 2103// error from Do is the result of In-None-Match. 2104func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { 2105 c.ifNoneMatch_ = entityTag 2106 return c 2107} 2108 2109// Context sets the context to be used in this call's Do method. Any 2110// pending HTTP request will be aborted if the provided context is 2111// canceled. 2112func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { 2113 c.ctx_ = ctx 2114 return c 2115} 2116 2117// Header returns an http.Header that can be modified by the caller to 2118// add HTTP headers to the request. 2119func (c *ProjectsLocationsGetCall) Header() http.Header { 2120 if c.header_ == nil { 2121 c.header_ = make(http.Header) 2122 } 2123 return c.header_ 2124} 2125 2126func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { 2127 reqHeaders := make(http.Header) 2128 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 2129 for k, v := range c.header_ { 2130 reqHeaders[k] = v 2131 } 2132 reqHeaders.Set("User-Agent", c.s.userAgent()) 2133 if c.ifNoneMatch_ != "" { 2134 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2135 } 2136 var body io.Reader = nil 2137 c.urlParams_.Set("alt", alt) 2138 c.urlParams_.Set("prettyPrint", "false") 2139 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 2140 urls += "?" + c.urlParams_.Encode() 2141 req, err := http.NewRequest("GET", urls, body) 2142 if err != nil { 2143 return nil, err 2144 } 2145 req.Header = reqHeaders 2146 googleapi.Expand(req.URL, map[string]string{ 2147 "name": c.name, 2148 }) 2149 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2150} 2151 2152// Do executes the "managedidentities.projects.locations.get" call. 2153// Exactly one of *Location or error will be non-nil. Any non-2xx status 2154// code is an error. Response headers are in either 2155// *Location.ServerResponse.Header or (if a response was returned at 2156// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 2157// to check whether the returned error was because 2158// http.StatusNotModified was returned. 2159func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { 2160 gensupport.SetOptions(c.urlParams_, opts...) 2161 res, err := c.doRequest("json") 2162 if res != nil && res.StatusCode == http.StatusNotModified { 2163 if res.Body != nil { 2164 res.Body.Close() 2165 } 2166 return nil, &googleapi.Error{ 2167 Code: res.StatusCode, 2168 Header: res.Header, 2169 } 2170 } 2171 if err != nil { 2172 return nil, err 2173 } 2174 defer googleapi.CloseBody(res) 2175 if err := googleapi.CheckResponse(res); err != nil { 2176 return nil, err 2177 } 2178 ret := &Location{ 2179 ServerResponse: googleapi.ServerResponse{ 2180 Header: res.Header, 2181 HTTPStatusCode: res.StatusCode, 2182 }, 2183 } 2184 target := &ret 2185 if err := gensupport.DecodeResponse(target, res); err != nil { 2186 return nil, err 2187 } 2188 return ret, nil 2189 // { 2190 // "description": "Gets information about a location.", 2191 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}", 2192 // "httpMethod": "GET", 2193 // "id": "managedidentities.projects.locations.get", 2194 // "parameterOrder": [ 2195 // "name" 2196 // ], 2197 // "parameters": { 2198 // "name": { 2199 // "description": "Resource name for the location.", 2200 // "location": "path", 2201 // "pattern": "^projects/[^/]+/locations/[^/]+$", 2202 // "required": true, 2203 // "type": "string" 2204 // } 2205 // }, 2206 // "path": "v1alpha1/{+name}", 2207 // "response": { 2208 // "$ref": "Location" 2209 // }, 2210 // "scopes": [ 2211 // "https://www.googleapis.com/auth/cloud-platform" 2212 // ] 2213 // } 2214 2215} 2216 2217// method id "managedidentities.projects.locations.list": 2218 2219type ProjectsLocationsListCall struct { 2220 s *Service 2221 name string 2222 urlParams_ gensupport.URLParams 2223 ifNoneMatch_ string 2224 ctx_ context.Context 2225 header_ http.Header 2226} 2227 2228// List: Lists information about the supported locations for this 2229// service. 2230func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { 2231 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2232 c.name = name 2233 return c 2234} 2235 2236// Filter sets the optional parameter "filter": The standard list 2237// filter. 2238func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { 2239 c.urlParams_.Set("filter", filter) 2240 return c 2241} 2242 2243// IncludeUnrevealedLocations sets the optional parameter 2244// "includeUnrevealedLocations": If true, the returned list will include 2245// locations which are not yet 2246// revealed. 2247func (c *ProjectsLocationsListCall) IncludeUnrevealedLocations(includeUnrevealedLocations bool) *ProjectsLocationsListCall { 2248 c.urlParams_.Set("includeUnrevealedLocations", fmt.Sprint(includeUnrevealedLocations)) 2249 return c 2250} 2251 2252// PageSize sets the optional parameter "pageSize": The standard list 2253// page size. 2254func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { 2255 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 2256 return c 2257} 2258 2259// PageToken sets the optional parameter "pageToken": The standard list 2260// page token. 2261func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { 2262 c.urlParams_.Set("pageToken", pageToken) 2263 return c 2264} 2265 2266// Fields allows partial responses to be retrieved. See 2267// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2268// for more information. 2269func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 2270 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2271 return c 2272} 2273 2274// IfNoneMatch sets the optional parameter which makes the operation 2275// fail if the object's ETag matches the given value. This is useful for 2276// getting updates only after the object has changed since the last 2277// request. Use googleapi.IsNotModified to check whether the response 2278// error from Do is the result of In-None-Match. 2279func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { 2280 c.ifNoneMatch_ = entityTag 2281 return c 2282} 2283 2284// Context sets the context to be used in this call's Do method. Any 2285// pending HTTP request will be aborted if the provided context is 2286// canceled. 2287func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 2288 c.ctx_ = ctx 2289 return c 2290} 2291 2292// Header returns an http.Header that can be modified by the caller to 2293// add HTTP headers to the request. 2294func (c *ProjectsLocationsListCall) Header() http.Header { 2295 if c.header_ == nil { 2296 c.header_ = make(http.Header) 2297 } 2298 return c.header_ 2299} 2300 2301func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { 2302 reqHeaders := make(http.Header) 2303 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 2304 for k, v := range c.header_ { 2305 reqHeaders[k] = v 2306 } 2307 reqHeaders.Set("User-Agent", c.s.userAgent()) 2308 if c.ifNoneMatch_ != "" { 2309 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2310 } 2311 var body io.Reader = nil 2312 c.urlParams_.Set("alt", alt) 2313 c.urlParams_.Set("prettyPrint", "false") 2314 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/locations") 2315 urls += "?" + c.urlParams_.Encode() 2316 req, err := http.NewRequest("GET", urls, body) 2317 if err != nil { 2318 return nil, err 2319 } 2320 req.Header = reqHeaders 2321 googleapi.Expand(req.URL, map[string]string{ 2322 "name": c.name, 2323 }) 2324 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2325} 2326 2327// Do executes the "managedidentities.projects.locations.list" call. 2328// Exactly one of *ListLocationsResponse or error will be non-nil. Any 2329// non-2xx status code is an error. Response headers are in either 2330// *ListLocationsResponse.ServerResponse.Header or (if a response was 2331// returned at all) in error.(*googleapi.Error).Header. Use 2332// googleapi.IsNotModified to check whether the returned error was 2333// because http.StatusNotModified was returned. 2334func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 2335 gensupport.SetOptions(c.urlParams_, opts...) 2336 res, err := c.doRequest("json") 2337 if res != nil && res.StatusCode == http.StatusNotModified { 2338 if res.Body != nil { 2339 res.Body.Close() 2340 } 2341 return nil, &googleapi.Error{ 2342 Code: res.StatusCode, 2343 Header: res.Header, 2344 } 2345 } 2346 if err != nil { 2347 return nil, err 2348 } 2349 defer googleapi.CloseBody(res) 2350 if err := googleapi.CheckResponse(res); err != nil { 2351 return nil, err 2352 } 2353 ret := &ListLocationsResponse{ 2354 ServerResponse: googleapi.ServerResponse{ 2355 Header: res.Header, 2356 HTTPStatusCode: res.StatusCode, 2357 }, 2358 } 2359 target := &ret 2360 if err := gensupport.DecodeResponse(target, res); err != nil { 2361 return nil, err 2362 } 2363 return ret, nil 2364 // { 2365 // "description": "Lists information about the supported locations for this service.", 2366 // "flatPath": "v1alpha1/projects/{projectsId}/locations", 2367 // "httpMethod": "GET", 2368 // "id": "managedidentities.projects.locations.list", 2369 // "parameterOrder": [ 2370 // "name" 2371 // ], 2372 // "parameters": { 2373 // "filter": { 2374 // "description": "The standard list filter.", 2375 // "location": "query", 2376 // "type": "string" 2377 // }, 2378 // "includeUnrevealedLocations": { 2379 // "description": "If true, the returned list will include locations which are not yet\nrevealed.", 2380 // "location": "query", 2381 // "type": "boolean" 2382 // }, 2383 // "name": { 2384 // "description": "The resource that owns the locations collection, if applicable.", 2385 // "location": "path", 2386 // "pattern": "^projects/[^/]+$", 2387 // "required": true, 2388 // "type": "string" 2389 // }, 2390 // "pageSize": { 2391 // "description": "The standard list page size.", 2392 // "format": "int32", 2393 // "location": "query", 2394 // "type": "integer" 2395 // }, 2396 // "pageToken": { 2397 // "description": "The standard list page token.", 2398 // "location": "query", 2399 // "type": "string" 2400 // } 2401 // }, 2402 // "path": "v1alpha1/{+name}/locations", 2403 // "response": { 2404 // "$ref": "ListLocationsResponse" 2405 // }, 2406 // "scopes": [ 2407 // "https://www.googleapis.com/auth/cloud-platform" 2408 // ] 2409 // } 2410 2411} 2412 2413// Pages invokes f for each page of results. 2414// A non-nil error returned from f will halt the iteration. 2415// The provided context supersedes any context provided to the Context method. 2416func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { 2417 c.ctx_ = ctx 2418 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 2419 for { 2420 x, err := c.Do() 2421 if err != nil { 2422 return err 2423 } 2424 if err := f(x); err != nil { 2425 return err 2426 } 2427 if x.NextPageToken == "" { 2428 return nil 2429 } 2430 c.PageToken(x.NextPageToken) 2431 } 2432} 2433 2434// method id "managedidentities.projects.locations.global.domains.attachTrust": 2435 2436type ProjectsLocationsGlobalDomainsAttachTrustCall struct { 2437 s *Service 2438 name string 2439 attachtrustrequest *AttachTrustRequest 2440 urlParams_ gensupport.URLParams 2441 ctx_ context.Context 2442 header_ http.Header 2443} 2444 2445// AttachTrust: Adds AD trust in a given domain. 2446// Operation<response: google.protobuf.Empty> 2447func (r *ProjectsLocationsGlobalDomainsService) AttachTrust(name string, attachtrustrequest *AttachTrustRequest) *ProjectsLocationsGlobalDomainsAttachTrustCall { 2448 c := &ProjectsLocationsGlobalDomainsAttachTrustCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2449 c.name = name 2450 c.attachtrustrequest = attachtrustrequest 2451 return c 2452} 2453 2454// Fields allows partial responses to be retrieved. See 2455// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2456// for more information. 2457func (c *ProjectsLocationsGlobalDomainsAttachTrustCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsAttachTrustCall { 2458 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2459 return c 2460} 2461 2462// Context sets the context to be used in this call's Do method. Any 2463// pending HTTP request will be aborted if the provided context is 2464// canceled. 2465func (c *ProjectsLocationsGlobalDomainsAttachTrustCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsAttachTrustCall { 2466 c.ctx_ = ctx 2467 return c 2468} 2469 2470// Header returns an http.Header that can be modified by the caller to 2471// add HTTP headers to the request. 2472func (c *ProjectsLocationsGlobalDomainsAttachTrustCall) Header() http.Header { 2473 if c.header_ == nil { 2474 c.header_ = make(http.Header) 2475 } 2476 return c.header_ 2477} 2478 2479func (c *ProjectsLocationsGlobalDomainsAttachTrustCall) doRequest(alt string) (*http.Response, error) { 2480 reqHeaders := make(http.Header) 2481 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 2482 for k, v := range c.header_ { 2483 reqHeaders[k] = v 2484 } 2485 reqHeaders.Set("User-Agent", c.s.userAgent()) 2486 var body io.Reader = nil 2487 body, err := googleapi.WithoutDataWrapper.JSONReader(c.attachtrustrequest) 2488 if err != nil { 2489 return nil, err 2490 } 2491 reqHeaders.Set("Content-Type", "application/json") 2492 c.urlParams_.Set("alt", alt) 2493 c.urlParams_.Set("prettyPrint", "false") 2494 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:attachTrust") 2495 urls += "?" + c.urlParams_.Encode() 2496 req, err := http.NewRequest("POST", urls, body) 2497 if err != nil { 2498 return nil, err 2499 } 2500 req.Header = reqHeaders 2501 googleapi.Expand(req.URL, map[string]string{ 2502 "name": c.name, 2503 }) 2504 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2505} 2506 2507// Do executes the "managedidentities.projects.locations.global.domains.attachTrust" call. 2508// Exactly one of *Operation or error will be non-nil. Any non-2xx 2509// status code is an error. Response headers are in either 2510// *Operation.ServerResponse.Header or (if a response was returned at 2511// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 2512// to check whether the returned error was because 2513// http.StatusNotModified was returned. 2514func (c *ProjectsLocationsGlobalDomainsAttachTrustCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 2515 gensupport.SetOptions(c.urlParams_, opts...) 2516 res, err := c.doRequest("json") 2517 if res != nil && res.StatusCode == http.StatusNotModified { 2518 if res.Body != nil { 2519 res.Body.Close() 2520 } 2521 return nil, &googleapi.Error{ 2522 Code: res.StatusCode, 2523 Header: res.Header, 2524 } 2525 } 2526 if err != nil { 2527 return nil, err 2528 } 2529 defer googleapi.CloseBody(res) 2530 if err := googleapi.CheckResponse(res); err != nil { 2531 return nil, err 2532 } 2533 ret := &Operation{ 2534 ServerResponse: googleapi.ServerResponse{ 2535 Header: res.Header, 2536 HTTPStatusCode: res.StatusCode, 2537 }, 2538 } 2539 target := &ret 2540 if err := gensupport.DecodeResponse(target, res); err != nil { 2541 return nil, err 2542 } 2543 return ret, nil 2544 // { 2545 // "description": "Adds AD trust in a given domain.\nOperation\u003cresponse: google.protobuf.Empty\u003e", 2546 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}:attachTrust", 2547 // "httpMethod": "POST", 2548 // "id": "managedidentities.projects.locations.global.domains.attachTrust", 2549 // "parameterOrder": [ 2550 // "name" 2551 // ], 2552 // "parameters": { 2553 // "name": { 2554 // "description": "The resource domain name, project name and location using the form:\n`projects/{project_id}/locations/global/domains/{domain_name}`", 2555 // "location": "path", 2556 // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", 2557 // "required": true, 2558 // "type": "string" 2559 // } 2560 // }, 2561 // "path": "v1alpha1/{+name}:attachTrust", 2562 // "request": { 2563 // "$ref": "AttachTrustRequest" 2564 // }, 2565 // "response": { 2566 // "$ref": "Operation" 2567 // }, 2568 // "scopes": [ 2569 // "https://www.googleapis.com/auth/cloud-platform" 2570 // ] 2571 // } 2572 2573} 2574 2575// method id "managedidentities.projects.locations.global.domains.create": 2576 2577type ProjectsLocationsGlobalDomainsCreateCall struct { 2578 s *Service 2579 parent string 2580 domain *Domain 2581 urlParams_ gensupport.URLParams 2582 ctx_ context.Context 2583 header_ http.Header 2584} 2585 2586// Create: Creates a Microsoft AD Domain in a given 2587// project. 2588// Operation<response: google.protobuf.Empty> 2589func (r *ProjectsLocationsGlobalDomainsService) Create(parent string, domain *Domain) *ProjectsLocationsGlobalDomainsCreateCall { 2590 c := &ProjectsLocationsGlobalDomainsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2591 c.parent = parent 2592 c.domain = domain 2593 return c 2594} 2595 2596// DomainName sets the optional parameter "domainName": The fully 2597// qualified domain name. 2598// e.g. mydomain.myorganization.com, with the following restrictions: 2599// 2600// * Must contain only lowercase letters, numbers, periods and 2601// hyphens. 2602// * Must start with a letter. 2603// * Must contain between 2-64 characters. 2604// * Must end with a number or a letter. 2605// * Must not start with period. 2606// * Must be unique within the project. 2607// * First segement length (mydomain form example above) shouldn't 2608// exceed 2609// 15 chars. 2610// * The last segment cannot be fully numeric. 2611func (c *ProjectsLocationsGlobalDomainsCreateCall) DomainName(domainName string) *ProjectsLocationsGlobalDomainsCreateCall { 2612 c.urlParams_.Set("domainName", domainName) 2613 return c 2614} 2615 2616// Fields allows partial responses to be retrieved. See 2617// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2618// for more information. 2619func (c *ProjectsLocationsGlobalDomainsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsCreateCall { 2620 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2621 return c 2622} 2623 2624// Context sets the context to be used in this call's Do method. Any 2625// pending HTTP request will be aborted if the provided context is 2626// canceled. 2627func (c *ProjectsLocationsGlobalDomainsCreateCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsCreateCall { 2628 c.ctx_ = ctx 2629 return c 2630} 2631 2632// Header returns an http.Header that can be modified by the caller to 2633// add HTTP headers to the request. 2634func (c *ProjectsLocationsGlobalDomainsCreateCall) Header() http.Header { 2635 if c.header_ == nil { 2636 c.header_ = make(http.Header) 2637 } 2638 return c.header_ 2639} 2640 2641func (c *ProjectsLocationsGlobalDomainsCreateCall) doRequest(alt string) (*http.Response, error) { 2642 reqHeaders := make(http.Header) 2643 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 2644 for k, v := range c.header_ { 2645 reqHeaders[k] = v 2646 } 2647 reqHeaders.Set("User-Agent", c.s.userAgent()) 2648 var body io.Reader = nil 2649 body, err := googleapi.WithoutDataWrapper.JSONReader(c.domain) 2650 if err != nil { 2651 return nil, err 2652 } 2653 reqHeaders.Set("Content-Type", "application/json") 2654 c.urlParams_.Set("alt", alt) 2655 c.urlParams_.Set("prettyPrint", "false") 2656 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/domains") 2657 urls += "?" + c.urlParams_.Encode() 2658 req, err := http.NewRequest("POST", urls, body) 2659 if err != nil { 2660 return nil, err 2661 } 2662 req.Header = reqHeaders 2663 googleapi.Expand(req.URL, map[string]string{ 2664 "parent": c.parent, 2665 }) 2666 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2667} 2668 2669// Do executes the "managedidentities.projects.locations.global.domains.create" call. 2670// Exactly one of *Operation or error will be non-nil. Any non-2xx 2671// status code is an error. Response headers are in either 2672// *Operation.ServerResponse.Header or (if a response was returned at 2673// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 2674// to check whether the returned error was because 2675// http.StatusNotModified was returned. 2676func (c *ProjectsLocationsGlobalDomainsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 2677 gensupport.SetOptions(c.urlParams_, opts...) 2678 res, err := c.doRequest("json") 2679 if res != nil && res.StatusCode == http.StatusNotModified { 2680 if res.Body != nil { 2681 res.Body.Close() 2682 } 2683 return nil, &googleapi.Error{ 2684 Code: res.StatusCode, 2685 Header: res.Header, 2686 } 2687 } 2688 if err != nil { 2689 return nil, err 2690 } 2691 defer googleapi.CloseBody(res) 2692 if err := googleapi.CheckResponse(res); err != nil { 2693 return nil, err 2694 } 2695 ret := &Operation{ 2696 ServerResponse: googleapi.ServerResponse{ 2697 Header: res.Header, 2698 HTTPStatusCode: res.StatusCode, 2699 }, 2700 } 2701 target := &ret 2702 if err := gensupport.DecodeResponse(target, res); err != nil { 2703 return nil, err 2704 } 2705 return ret, nil 2706 // { 2707 // "description": "Creates a Microsoft AD Domain in a given project.\nOperation\u003cresponse: google.protobuf.Empty\u003e", 2708 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains", 2709 // "httpMethod": "POST", 2710 // "id": "managedidentities.projects.locations.global.domains.create", 2711 // "parameterOrder": [ 2712 // "parent" 2713 // ], 2714 // "parameters": { 2715 // "domainName": { 2716 // "description": "The fully qualified domain name.\ne.g. mydomain.myorganization.com, with the following restrictions:\n\n * Must contain only lowercase letters, numbers, periods and hyphens.\n * Must start with a letter.\n * Must contain between 2-64 characters.\n * Must end with a number or a letter.\n * Must not start with period.\n * Must be unique within the project.\n * First segement length (mydomain form example above) shouldn't exceed\n 15 chars.\n * The last segment cannot be fully numeric.", 2717 // "location": "query", 2718 // "type": "string" 2719 // }, 2720 // "parent": { 2721 // "description": "Resource project name and location using the form:\n`projects/{project_id}/locations/global`", 2722 // "location": "path", 2723 // "pattern": "^projects/[^/]+/locations/global$", 2724 // "required": true, 2725 // "type": "string" 2726 // } 2727 // }, 2728 // "path": "v1alpha1/{+parent}/domains", 2729 // "request": { 2730 // "$ref": "Domain" 2731 // }, 2732 // "response": { 2733 // "$ref": "Operation" 2734 // }, 2735 // "scopes": [ 2736 // "https://www.googleapis.com/auth/cloud-platform" 2737 // ] 2738 // } 2739 2740} 2741 2742// method id "managedidentities.projects.locations.global.domains.delete": 2743 2744type ProjectsLocationsGlobalDomainsDeleteCall struct { 2745 s *Service 2746 name string 2747 urlParams_ gensupport.URLParams 2748 ctx_ context.Context 2749 header_ http.Header 2750} 2751 2752// Delete: Deletes identified domain. 2753// Operation<response: google.protobuf.Empty> 2754func (r *ProjectsLocationsGlobalDomainsService) Delete(name string) *ProjectsLocationsGlobalDomainsDeleteCall { 2755 c := &ProjectsLocationsGlobalDomainsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2756 c.name = name 2757 return c 2758} 2759 2760// Fields allows partial responses to be retrieved. See 2761// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2762// for more information. 2763func (c *ProjectsLocationsGlobalDomainsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsDeleteCall { 2764 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2765 return c 2766} 2767 2768// Context sets the context to be used in this call's Do method. Any 2769// pending HTTP request will be aborted if the provided context is 2770// canceled. 2771func (c *ProjectsLocationsGlobalDomainsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsDeleteCall { 2772 c.ctx_ = ctx 2773 return c 2774} 2775 2776// Header returns an http.Header that can be modified by the caller to 2777// add HTTP headers to the request. 2778func (c *ProjectsLocationsGlobalDomainsDeleteCall) Header() http.Header { 2779 if c.header_ == nil { 2780 c.header_ = make(http.Header) 2781 } 2782 return c.header_ 2783} 2784 2785func (c *ProjectsLocationsGlobalDomainsDeleteCall) doRequest(alt string) (*http.Response, error) { 2786 reqHeaders := make(http.Header) 2787 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 2788 for k, v := range c.header_ { 2789 reqHeaders[k] = v 2790 } 2791 reqHeaders.Set("User-Agent", c.s.userAgent()) 2792 var body io.Reader = nil 2793 c.urlParams_.Set("alt", alt) 2794 c.urlParams_.Set("prettyPrint", "false") 2795 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 2796 urls += "?" + c.urlParams_.Encode() 2797 req, err := http.NewRequest("DELETE", urls, body) 2798 if err != nil { 2799 return nil, err 2800 } 2801 req.Header = reqHeaders 2802 googleapi.Expand(req.URL, map[string]string{ 2803 "name": c.name, 2804 }) 2805 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2806} 2807 2808// Do executes the "managedidentities.projects.locations.global.domains.delete" call. 2809// Exactly one of *Operation or error will be non-nil. Any non-2xx 2810// status code is an error. Response headers are in either 2811// *Operation.ServerResponse.Header or (if a response was returned at 2812// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 2813// to check whether the returned error was because 2814// http.StatusNotModified was returned. 2815func (c *ProjectsLocationsGlobalDomainsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 2816 gensupport.SetOptions(c.urlParams_, opts...) 2817 res, err := c.doRequest("json") 2818 if res != nil && res.StatusCode == http.StatusNotModified { 2819 if res.Body != nil { 2820 res.Body.Close() 2821 } 2822 return nil, &googleapi.Error{ 2823 Code: res.StatusCode, 2824 Header: res.Header, 2825 } 2826 } 2827 if err != nil { 2828 return nil, err 2829 } 2830 defer googleapi.CloseBody(res) 2831 if err := googleapi.CheckResponse(res); err != nil { 2832 return nil, err 2833 } 2834 ret := &Operation{ 2835 ServerResponse: googleapi.ServerResponse{ 2836 Header: res.Header, 2837 HTTPStatusCode: res.StatusCode, 2838 }, 2839 } 2840 target := &ret 2841 if err := gensupport.DecodeResponse(target, res); err != nil { 2842 return nil, err 2843 } 2844 return ret, nil 2845 // { 2846 // "description": "Deletes identified domain.\nOperation\u003cresponse: google.protobuf.Empty\u003e", 2847 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}", 2848 // "httpMethod": "DELETE", 2849 // "id": "managedidentities.projects.locations.global.domains.delete", 2850 // "parameterOrder": [ 2851 // "name" 2852 // ], 2853 // "parameters": { 2854 // "name": { 2855 // "description": "Domain resource name using the form:\n`projects/{project_id}/locations/global/domains/{domain_name}`", 2856 // "location": "path", 2857 // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", 2858 // "required": true, 2859 // "type": "string" 2860 // } 2861 // }, 2862 // "path": "v1alpha1/{+name}", 2863 // "response": { 2864 // "$ref": "Operation" 2865 // }, 2866 // "scopes": [ 2867 // "https://www.googleapis.com/auth/cloud-platform" 2868 // ] 2869 // } 2870 2871} 2872 2873// method id "managedidentities.projects.locations.global.domains.detachTrust": 2874 2875type ProjectsLocationsGlobalDomainsDetachTrustCall struct { 2876 s *Service 2877 name string 2878 detachtrustrequest *DetachTrustRequest 2879 urlParams_ gensupport.URLParams 2880 ctx_ context.Context 2881 header_ http.Header 2882} 2883 2884// DetachTrust: Removes identified trust. 2885// Operation<response: google.protobuf.Empty> 2886func (r *ProjectsLocationsGlobalDomainsService) DetachTrust(name string, detachtrustrequest *DetachTrustRequest) *ProjectsLocationsGlobalDomainsDetachTrustCall { 2887 c := &ProjectsLocationsGlobalDomainsDetachTrustCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2888 c.name = name 2889 c.detachtrustrequest = detachtrustrequest 2890 return c 2891} 2892 2893// Fields allows partial responses to be retrieved. See 2894// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2895// for more information. 2896func (c *ProjectsLocationsGlobalDomainsDetachTrustCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsDetachTrustCall { 2897 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2898 return c 2899} 2900 2901// Context sets the context to be used in this call's Do method. Any 2902// pending HTTP request will be aborted if the provided context is 2903// canceled. 2904func (c *ProjectsLocationsGlobalDomainsDetachTrustCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsDetachTrustCall { 2905 c.ctx_ = ctx 2906 return c 2907} 2908 2909// Header returns an http.Header that can be modified by the caller to 2910// add HTTP headers to the request. 2911func (c *ProjectsLocationsGlobalDomainsDetachTrustCall) Header() http.Header { 2912 if c.header_ == nil { 2913 c.header_ = make(http.Header) 2914 } 2915 return c.header_ 2916} 2917 2918func (c *ProjectsLocationsGlobalDomainsDetachTrustCall) doRequest(alt string) (*http.Response, error) { 2919 reqHeaders := make(http.Header) 2920 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 2921 for k, v := range c.header_ { 2922 reqHeaders[k] = v 2923 } 2924 reqHeaders.Set("User-Agent", c.s.userAgent()) 2925 var body io.Reader = nil 2926 body, err := googleapi.WithoutDataWrapper.JSONReader(c.detachtrustrequest) 2927 if err != nil { 2928 return nil, err 2929 } 2930 reqHeaders.Set("Content-Type", "application/json") 2931 c.urlParams_.Set("alt", alt) 2932 c.urlParams_.Set("prettyPrint", "false") 2933 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:detachTrust") 2934 urls += "?" + c.urlParams_.Encode() 2935 req, err := http.NewRequest("POST", urls, body) 2936 if err != nil { 2937 return nil, err 2938 } 2939 req.Header = reqHeaders 2940 googleapi.Expand(req.URL, map[string]string{ 2941 "name": c.name, 2942 }) 2943 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2944} 2945 2946// Do executes the "managedidentities.projects.locations.global.domains.detachTrust" call. 2947// Exactly one of *Operation or error will be non-nil. Any non-2xx 2948// status code is an error. Response headers are in either 2949// *Operation.ServerResponse.Header or (if a response was returned at 2950// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 2951// to check whether the returned error was because 2952// http.StatusNotModified was returned. 2953func (c *ProjectsLocationsGlobalDomainsDetachTrustCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 2954 gensupport.SetOptions(c.urlParams_, opts...) 2955 res, err := c.doRequest("json") 2956 if res != nil && res.StatusCode == http.StatusNotModified { 2957 if res.Body != nil { 2958 res.Body.Close() 2959 } 2960 return nil, &googleapi.Error{ 2961 Code: res.StatusCode, 2962 Header: res.Header, 2963 } 2964 } 2965 if err != nil { 2966 return nil, err 2967 } 2968 defer googleapi.CloseBody(res) 2969 if err := googleapi.CheckResponse(res); err != nil { 2970 return nil, err 2971 } 2972 ret := &Operation{ 2973 ServerResponse: googleapi.ServerResponse{ 2974 Header: res.Header, 2975 HTTPStatusCode: res.StatusCode, 2976 }, 2977 } 2978 target := &ret 2979 if err := gensupport.DecodeResponse(target, res); err != nil { 2980 return nil, err 2981 } 2982 return ret, nil 2983 // { 2984 // "description": "Removes identified trust.\nOperation\u003cresponse: google.protobuf.Empty\u003e", 2985 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}:detachTrust", 2986 // "httpMethod": "POST", 2987 // "id": "managedidentities.projects.locations.global.domains.detachTrust", 2988 // "parameterOrder": [ 2989 // "name" 2990 // ], 2991 // "parameters": { 2992 // "name": { 2993 // "description": "The resource domain name, project name, and location using the form:\n`projects/{project_id}/locations/global/domains/{domain_name}`", 2994 // "location": "path", 2995 // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", 2996 // "required": true, 2997 // "type": "string" 2998 // } 2999 // }, 3000 // "path": "v1alpha1/{+name}:detachTrust", 3001 // "request": { 3002 // "$ref": "DetachTrustRequest" 3003 // }, 3004 // "response": { 3005 // "$ref": "Operation" 3006 // }, 3007 // "scopes": [ 3008 // "https://www.googleapis.com/auth/cloud-platform" 3009 // ] 3010 // } 3011 3012} 3013 3014// method id "managedidentities.projects.locations.global.domains.get": 3015 3016type ProjectsLocationsGlobalDomainsGetCall struct { 3017 s *Service 3018 name string 3019 urlParams_ gensupport.URLParams 3020 ifNoneMatch_ string 3021 ctx_ context.Context 3022 header_ http.Header 3023} 3024 3025// Get: Gets details of a single Domain. 3026func (r *ProjectsLocationsGlobalDomainsService) Get(name string) *ProjectsLocationsGlobalDomainsGetCall { 3027 c := &ProjectsLocationsGlobalDomainsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3028 c.name = name 3029 return c 3030} 3031 3032// Fields allows partial responses to be retrieved. See 3033// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3034// for more information. 3035func (c *ProjectsLocationsGlobalDomainsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsGetCall { 3036 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3037 return c 3038} 3039 3040// IfNoneMatch sets the optional parameter which makes the operation 3041// fail if the object's ETag matches the given value. This is useful for 3042// getting updates only after the object has changed since the last 3043// request. Use googleapi.IsNotModified to check whether the response 3044// error from Do is the result of In-None-Match. 3045func (c *ProjectsLocationsGlobalDomainsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalDomainsGetCall { 3046 c.ifNoneMatch_ = entityTag 3047 return c 3048} 3049 3050// Context sets the context to be used in this call's Do method. Any 3051// pending HTTP request will be aborted if the provided context is 3052// canceled. 3053func (c *ProjectsLocationsGlobalDomainsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsGetCall { 3054 c.ctx_ = ctx 3055 return c 3056} 3057 3058// Header returns an http.Header that can be modified by the caller to 3059// add HTTP headers to the request. 3060func (c *ProjectsLocationsGlobalDomainsGetCall) Header() http.Header { 3061 if c.header_ == nil { 3062 c.header_ = make(http.Header) 3063 } 3064 return c.header_ 3065} 3066 3067func (c *ProjectsLocationsGlobalDomainsGetCall) doRequest(alt string) (*http.Response, error) { 3068 reqHeaders := make(http.Header) 3069 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 3070 for k, v := range c.header_ { 3071 reqHeaders[k] = v 3072 } 3073 reqHeaders.Set("User-Agent", c.s.userAgent()) 3074 if c.ifNoneMatch_ != "" { 3075 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3076 } 3077 var body io.Reader = nil 3078 c.urlParams_.Set("alt", alt) 3079 c.urlParams_.Set("prettyPrint", "false") 3080 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 3081 urls += "?" + c.urlParams_.Encode() 3082 req, err := http.NewRequest("GET", urls, body) 3083 if err != nil { 3084 return nil, err 3085 } 3086 req.Header = reqHeaders 3087 googleapi.Expand(req.URL, map[string]string{ 3088 "name": c.name, 3089 }) 3090 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3091} 3092 3093// Do executes the "managedidentities.projects.locations.global.domains.get" call. 3094// Exactly one of *Domain or error will be non-nil. Any non-2xx status 3095// code is an error. Response headers are in either 3096// *Domain.ServerResponse.Header or (if a response was returned at all) 3097// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3098// check whether the returned error was because http.StatusNotModified 3099// was returned. 3100func (c *ProjectsLocationsGlobalDomainsGetCall) Do(opts ...googleapi.CallOption) (*Domain, error) { 3101 gensupport.SetOptions(c.urlParams_, opts...) 3102 res, err := c.doRequest("json") 3103 if res != nil && res.StatusCode == http.StatusNotModified { 3104 if res.Body != nil { 3105 res.Body.Close() 3106 } 3107 return nil, &googleapi.Error{ 3108 Code: res.StatusCode, 3109 Header: res.Header, 3110 } 3111 } 3112 if err != nil { 3113 return nil, err 3114 } 3115 defer googleapi.CloseBody(res) 3116 if err := googleapi.CheckResponse(res); err != nil { 3117 return nil, err 3118 } 3119 ret := &Domain{ 3120 ServerResponse: googleapi.ServerResponse{ 3121 Header: res.Header, 3122 HTTPStatusCode: res.StatusCode, 3123 }, 3124 } 3125 target := &ret 3126 if err := gensupport.DecodeResponse(target, res); err != nil { 3127 return nil, err 3128 } 3129 return ret, nil 3130 // { 3131 // "description": "Gets details of a single Domain.", 3132 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}", 3133 // "httpMethod": "GET", 3134 // "id": "managedidentities.projects.locations.global.domains.get", 3135 // "parameterOrder": [ 3136 // "name" 3137 // ], 3138 // "parameters": { 3139 // "name": { 3140 // "description": "Domain resource name using the form:\n`projects/{project_id}/locations/global/domains/{domain_name}`", 3141 // "location": "path", 3142 // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", 3143 // "required": true, 3144 // "type": "string" 3145 // } 3146 // }, 3147 // "path": "v1alpha1/{+name}", 3148 // "response": { 3149 // "$ref": "Domain" 3150 // }, 3151 // "scopes": [ 3152 // "https://www.googleapis.com/auth/cloud-platform" 3153 // ] 3154 // } 3155 3156} 3157 3158// method id "managedidentities.projects.locations.global.domains.getIamPolicy": 3159 3160type ProjectsLocationsGlobalDomainsGetIamPolicyCall struct { 3161 s *Service 3162 resource string 3163 urlParams_ gensupport.URLParams 3164 ifNoneMatch_ string 3165 ctx_ context.Context 3166 header_ http.Header 3167} 3168 3169// GetIamPolicy: Gets the access control policy for a resource. 3170// Returns an empty policy if the resource exists and does not have a 3171// policy 3172// set. 3173func (r *ProjectsLocationsGlobalDomainsService) GetIamPolicy(resource string) *ProjectsLocationsGlobalDomainsGetIamPolicyCall { 3174 c := &ProjectsLocationsGlobalDomainsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3175 c.resource = resource 3176 return c 3177} 3178 3179// OptionsRequestedPolicyVersion sets the optional parameter 3180// "options.requestedPolicyVersion": The policy format version to be 3181// returned. 3182// 3183// Valid values are 0, 1, and 3. Requests specifying an invalid value 3184// will be 3185// rejected. 3186// 3187// Requests for policies with any conditional bindings must specify 3188// version 3. 3189// Policies without any conditional bindings may specify any valid value 3190// or 3191// leave the field unset. 3192func (c *ProjectsLocationsGlobalDomainsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlobalDomainsGetIamPolicyCall { 3193 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 3194 return c 3195} 3196 3197// Fields allows partial responses to be retrieved. See 3198// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3199// for more information. 3200func (c *ProjectsLocationsGlobalDomainsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsGetIamPolicyCall { 3201 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3202 return c 3203} 3204 3205// IfNoneMatch sets the optional parameter which makes the operation 3206// fail if the object's ETag matches the given value. This is useful for 3207// getting updates only after the object has changed since the last 3208// request. Use googleapi.IsNotModified to check whether the response 3209// error from Do is the result of In-None-Match. 3210func (c *ProjectsLocationsGlobalDomainsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalDomainsGetIamPolicyCall { 3211 c.ifNoneMatch_ = entityTag 3212 return c 3213} 3214 3215// Context sets the context to be used in this call's Do method. Any 3216// pending HTTP request will be aborted if the provided context is 3217// canceled. 3218func (c *ProjectsLocationsGlobalDomainsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsGetIamPolicyCall { 3219 c.ctx_ = ctx 3220 return c 3221} 3222 3223// Header returns an http.Header that can be modified by the caller to 3224// add HTTP headers to the request. 3225func (c *ProjectsLocationsGlobalDomainsGetIamPolicyCall) Header() http.Header { 3226 if c.header_ == nil { 3227 c.header_ = make(http.Header) 3228 } 3229 return c.header_ 3230} 3231 3232func (c *ProjectsLocationsGlobalDomainsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 3233 reqHeaders := make(http.Header) 3234 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 3235 for k, v := range c.header_ { 3236 reqHeaders[k] = v 3237 } 3238 reqHeaders.Set("User-Agent", c.s.userAgent()) 3239 if c.ifNoneMatch_ != "" { 3240 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3241 } 3242 var body io.Reader = nil 3243 c.urlParams_.Set("alt", alt) 3244 c.urlParams_.Set("prettyPrint", "false") 3245 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:getIamPolicy") 3246 urls += "?" + c.urlParams_.Encode() 3247 req, err := http.NewRequest("GET", urls, body) 3248 if err != nil { 3249 return nil, err 3250 } 3251 req.Header = reqHeaders 3252 googleapi.Expand(req.URL, map[string]string{ 3253 "resource": c.resource, 3254 }) 3255 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3256} 3257 3258// Do executes the "managedidentities.projects.locations.global.domains.getIamPolicy" call. 3259// Exactly one of *Policy or error will be non-nil. Any non-2xx status 3260// code is an error. Response headers are in either 3261// *Policy.ServerResponse.Header or (if a response was returned at all) 3262// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3263// check whether the returned error was because http.StatusNotModified 3264// was returned. 3265func (c *ProjectsLocationsGlobalDomainsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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, &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, err 3283 } 3284 ret := &Policy{ 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 // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", 3297 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}:getIamPolicy", 3298 // "httpMethod": "GET", 3299 // "id": "managedidentities.projects.locations.global.domains.getIamPolicy", 3300 // "parameterOrder": [ 3301 // "resource" 3302 // ], 3303 // "parameters": { 3304 // "options.requestedPolicyVersion": { 3305 // "description": "Optional. The policy format version to be returned.\n\nValid values are 0, 1, and 3. Requests specifying an invalid value will be\nrejected.\n\nRequests for policies with any conditional bindings must specify version 3.\nPolicies without any conditional bindings may specify any valid value or\nleave the field unset.", 3306 // "format": "int32", 3307 // "location": "query", 3308 // "type": "integer" 3309 // }, 3310 // "resource": { 3311 // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", 3312 // "location": "path", 3313 // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", 3314 // "required": true, 3315 // "type": "string" 3316 // } 3317 // }, 3318 // "path": "v1alpha1/{+resource}:getIamPolicy", 3319 // "response": { 3320 // "$ref": "Policy" 3321 // }, 3322 // "scopes": [ 3323 // "https://www.googleapis.com/auth/cloud-platform" 3324 // ] 3325 // } 3326 3327} 3328 3329// method id "managedidentities.projects.locations.global.domains.list": 3330 3331type ProjectsLocationsGlobalDomainsListCall struct { 3332 s *Service 3333 parent string 3334 urlParams_ gensupport.URLParams 3335 ifNoneMatch_ string 3336 ctx_ context.Context 3337 header_ http.Header 3338} 3339 3340// List: Lists Domains in a given project. 3341func (r *ProjectsLocationsGlobalDomainsService) List(parent string) *ProjectsLocationsGlobalDomainsListCall { 3342 c := &ProjectsLocationsGlobalDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3343 c.parent = parent 3344 return c 3345} 3346 3347// Filter sets the optional parameter "filter": Filter specifying 3348// constraints of a list operation. 3349// For example, `Domain.fqdn="mydomain.myorginization". 3350func (c *ProjectsLocationsGlobalDomainsListCall) Filter(filter string) *ProjectsLocationsGlobalDomainsListCall { 3351 c.urlParams_.Set("filter", filter) 3352 return c 3353} 3354 3355// OrderBy sets the optional parameter "orderBy": Specifies the ordering 3356// of results following syntax 3357// at 3358// https://cloud.google.com/apis/design/design_patterns#sorting_order. 3359func (c *ProjectsLocationsGlobalDomainsListCall) OrderBy(orderBy string) *ProjectsLocationsGlobalDomainsListCall { 3360 c.urlParams_.Set("orderBy", orderBy) 3361 return c 3362} 3363 3364// PageSize sets the optional parameter "pageSize": If not specified, a 3365// default value of 1000 will be used by the service. 3366// Regardless of the page_size value, the response may include a partial 3367// list 3368// and a caller should only rely on response's 3369// next_page_token 3370// to determine if there are more instances left to be queried. 3371func (c *ProjectsLocationsGlobalDomainsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalDomainsListCall { 3372 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 3373 return c 3374} 3375 3376// PageToken sets the optional parameter "pageToken": The 3377// next_page_token value returned from a previous List request, if any. 3378func (c *ProjectsLocationsGlobalDomainsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalDomainsListCall { 3379 c.urlParams_.Set("pageToken", pageToken) 3380 return c 3381} 3382 3383// Fields allows partial responses to be retrieved. See 3384// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3385// for more information. 3386func (c *ProjectsLocationsGlobalDomainsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsListCall { 3387 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3388 return c 3389} 3390 3391// IfNoneMatch sets the optional parameter which makes the operation 3392// fail if the object's ETag matches the given value. This is useful for 3393// getting updates only after the object has changed since the last 3394// request. Use googleapi.IsNotModified to check whether the response 3395// error from Do is the result of In-None-Match. 3396func (c *ProjectsLocationsGlobalDomainsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalDomainsListCall { 3397 c.ifNoneMatch_ = entityTag 3398 return c 3399} 3400 3401// Context sets the context to be used in this call's Do method. Any 3402// pending HTTP request will be aborted if the provided context is 3403// canceled. 3404func (c *ProjectsLocationsGlobalDomainsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsListCall { 3405 c.ctx_ = ctx 3406 return c 3407} 3408 3409// Header returns an http.Header that can be modified by the caller to 3410// add HTTP headers to the request. 3411func (c *ProjectsLocationsGlobalDomainsListCall) Header() http.Header { 3412 if c.header_ == nil { 3413 c.header_ = make(http.Header) 3414 } 3415 return c.header_ 3416} 3417 3418func (c *ProjectsLocationsGlobalDomainsListCall) doRequest(alt string) (*http.Response, error) { 3419 reqHeaders := make(http.Header) 3420 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 3421 for k, v := range c.header_ { 3422 reqHeaders[k] = v 3423 } 3424 reqHeaders.Set("User-Agent", c.s.userAgent()) 3425 if c.ifNoneMatch_ != "" { 3426 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3427 } 3428 var body io.Reader = nil 3429 c.urlParams_.Set("alt", alt) 3430 c.urlParams_.Set("prettyPrint", "false") 3431 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/domains") 3432 urls += "?" + c.urlParams_.Encode() 3433 req, err := http.NewRequest("GET", urls, body) 3434 if err != nil { 3435 return nil, err 3436 } 3437 req.Header = reqHeaders 3438 googleapi.Expand(req.URL, map[string]string{ 3439 "parent": c.parent, 3440 }) 3441 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3442} 3443 3444// Do executes the "managedidentities.projects.locations.global.domains.list" call. 3445// Exactly one of *ListDomainsResponse or error will be non-nil. Any 3446// non-2xx status code is an error. Response headers are in either 3447// *ListDomainsResponse.ServerResponse.Header or (if a response was 3448// returned at all) in error.(*googleapi.Error).Header. Use 3449// googleapi.IsNotModified to check whether the returned error was 3450// because http.StatusNotModified was returned. 3451func (c *ProjectsLocationsGlobalDomainsListCall) Do(opts ...googleapi.CallOption) (*ListDomainsResponse, error) { 3452 gensupport.SetOptions(c.urlParams_, opts...) 3453 res, err := c.doRequest("json") 3454 if res != nil && res.StatusCode == http.StatusNotModified { 3455 if res.Body != nil { 3456 res.Body.Close() 3457 } 3458 return nil, &googleapi.Error{ 3459 Code: res.StatusCode, 3460 Header: res.Header, 3461 } 3462 } 3463 if err != nil { 3464 return nil, err 3465 } 3466 defer googleapi.CloseBody(res) 3467 if err := googleapi.CheckResponse(res); err != nil { 3468 return nil, err 3469 } 3470 ret := &ListDomainsResponse{ 3471 ServerResponse: googleapi.ServerResponse{ 3472 Header: res.Header, 3473 HTTPStatusCode: res.StatusCode, 3474 }, 3475 } 3476 target := &ret 3477 if err := gensupport.DecodeResponse(target, res); err != nil { 3478 return nil, err 3479 } 3480 return ret, nil 3481 // { 3482 // "description": "Lists Domains in a given project.", 3483 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains", 3484 // "httpMethod": "GET", 3485 // "id": "managedidentities.projects.locations.global.domains.list", 3486 // "parameterOrder": [ 3487 // "parent" 3488 // ], 3489 // "parameters": { 3490 // "filter": { 3491 // "description": "Optional. Filter specifying constraints of a list operation.\nFor example, `Domain.fqdn=\"mydomain.myorginization\"`.", 3492 // "location": "query", 3493 // "type": "string" 3494 // }, 3495 // "orderBy": { 3496 // "description": "Optional. Specifies the ordering of results following syntax at\nhttps://cloud.google.com/apis/design/design_patterns#sorting_order.", 3497 // "location": "query", 3498 // "type": "string" 3499 // }, 3500 // "pageSize": { 3501 // "description": "If not specified, a default value of 1000 will be used by the service.\nRegardless of the page_size value, the response may include a partial list\nand a caller should only rely on response's\nnext_page_token\nto determine if there are more instances left to be queried.", 3502 // "format": "int32", 3503 // "location": "query", 3504 // "type": "integer" 3505 // }, 3506 // "pageToken": { 3507 // "description": "The next_page_token value returned from a previous List request, if any.", 3508 // "location": "query", 3509 // "type": "string" 3510 // }, 3511 // "parent": { 3512 // "description": "Required. The resource name of the domain location using the form:\n`projects/{project_id}/locations/global`", 3513 // "location": "path", 3514 // "pattern": "^projects/[^/]+/locations/global$", 3515 // "required": true, 3516 // "type": "string" 3517 // } 3518 // }, 3519 // "path": "v1alpha1/{+parent}/domains", 3520 // "response": { 3521 // "$ref": "ListDomainsResponse" 3522 // }, 3523 // "scopes": [ 3524 // "https://www.googleapis.com/auth/cloud-platform" 3525 // ] 3526 // } 3527 3528} 3529 3530// Pages invokes f for each page of results. 3531// A non-nil error returned from f will halt the iteration. 3532// The provided context supersedes any context provided to the Context method. 3533func (c *ProjectsLocationsGlobalDomainsListCall) Pages(ctx context.Context, f func(*ListDomainsResponse) error) error { 3534 c.ctx_ = ctx 3535 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 3536 for { 3537 x, err := c.Do() 3538 if err != nil { 3539 return err 3540 } 3541 if err := f(x); err != nil { 3542 return err 3543 } 3544 if x.NextPageToken == "" { 3545 return nil 3546 } 3547 c.PageToken(x.NextPageToken) 3548 } 3549} 3550 3551// method id "managedidentities.projects.locations.global.domains.patch": 3552 3553type ProjectsLocationsGlobalDomainsPatchCall struct { 3554 s *Service 3555 name string 3556 domain *Domain 3557 urlParams_ gensupport.URLParams 3558 ctx_ context.Context 3559 header_ http.Header 3560} 3561 3562// Patch: Updates the metadata and configuration of a specified 3563// domain. 3564// Operation<response: google.protobuf.Empty> 3565func (r *ProjectsLocationsGlobalDomainsService) Patch(name string, domain *Domain) *ProjectsLocationsGlobalDomainsPatchCall { 3566 c := &ProjectsLocationsGlobalDomainsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3567 c.name = name 3568 c.domain = domain 3569 return c 3570} 3571 3572// UpdateMask sets the optional parameter "updateMask": Mask of fields 3573// to update. At least one path must be supplied in this 3574// field. The elements of the repeated paths field may only include 3575// these 3576// fields from Domain: 3577// * `labels` 3578// * `locations` 3579// * `authorized_networks` 3580func (c *ProjectsLocationsGlobalDomainsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalDomainsPatchCall { 3581 c.urlParams_.Set("updateMask", updateMask) 3582 return c 3583} 3584 3585// Fields allows partial responses to be retrieved. See 3586// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3587// for more information. 3588func (c *ProjectsLocationsGlobalDomainsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsPatchCall { 3589 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3590 return c 3591} 3592 3593// Context sets the context to be used in this call's Do method. Any 3594// pending HTTP request will be aborted if the provided context is 3595// canceled. 3596func (c *ProjectsLocationsGlobalDomainsPatchCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsPatchCall { 3597 c.ctx_ = ctx 3598 return c 3599} 3600 3601// Header returns an http.Header that can be modified by the caller to 3602// add HTTP headers to the request. 3603func (c *ProjectsLocationsGlobalDomainsPatchCall) Header() http.Header { 3604 if c.header_ == nil { 3605 c.header_ = make(http.Header) 3606 } 3607 return c.header_ 3608} 3609 3610func (c *ProjectsLocationsGlobalDomainsPatchCall) doRequest(alt string) (*http.Response, error) { 3611 reqHeaders := make(http.Header) 3612 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 3613 for k, v := range c.header_ { 3614 reqHeaders[k] = v 3615 } 3616 reqHeaders.Set("User-Agent", c.s.userAgent()) 3617 var body io.Reader = nil 3618 body, err := googleapi.WithoutDataWrapper.JSONReader(c.domain) 3619 if err != nil { 3620 return nil, err 3621 } 3622 reqHeaders.Set("Content-Type", "application/json") 3623 c.urlParams_.Set("alt", alt) 3624 c.urlParams_.Set("prettyPrint", "false") 3625 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 3626 urls += "?" + c.urlParams_.Encode() 3627 req, err := http.NewRequest("PATCH", urls, body) 3628 if err != nil { 3629 return nil, err 3630 } 3631 req.Header = reqHeaders 3632 googleapi.Expand(req.URL, map[string]string{ 3633 "name": c.name, 3634 }) 3635 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3636} 3637 3638// Do executes the "managedidentities.projects.locations.global.domains.patch" call. 3639// Exactly one of *Operation or error will be non-nil. Any non-2xx 3640// status code is an error. Response headers are in either 3641// *Operation.ServerResponse.Header or (if a response was returned at 3642// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3643// to check whether the returned error was because 3644// http.StatusNotModified was returned. 3645func (c *ProjectsLocationsGlobalDomainsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3646 gensupport.SetOptions(c.urlParams_, opts...) 3647 res, err := c.doRequest("json") 3648 if res != nil && res.StatusCode == http.StatusNotModified { 3649 if res.Body != nil { 3650 res.Body.Close() 3651 } 3652 return nil, &googleapi.Error{ 3653 Code: res.StatusCode, 3654 Header: res.Header, 3655 } 3656 } 3657 if err != nil { 3658 return nil, err 3659 } 3660 defer googleapi.CloseBody(res) 3661 if err := googleapi.CheckResponse(res); err != nil { 3662 return nil, err 3663 } 3664 ret := &Operation{ 3665 ServerResponse: googleapi.ServerResponse{ 3666 Header: res.Header, 3667 HTTPStatusCode: res.StatusCode, 3668 }, 3669 } 3670 target := &ret 3671 if err := gensupport.DecodeResponse(target, res); err != nil { 3672 return nil, err 3673 } 3674 return ret, nil 3675 // { 3676 // "description": "Updates the metadata and configuration of a specified domain.\nOperation\u003cresponse: google.protobuf.Empty\u003e", 3677 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}", 3678 // "httpMethod": "PATCH", 3679 // "id": "managedidentities.projects.locations.global.domains.patch", 3680 // "parameterOrder": [ 3681 // "name" 3682 // ], 3683 // "parameters": { 3684 // "name": { 3685 // "description": "Output only. Unique name of the domain in this scope including projects and\nlocation using the form:\n`projects/{project_id}/locations/global/domains/{domain_name}`.", 3686 // "location": "path", 3687 // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", 3688 // "required": true, 3689 // "type": "string" 3690 // }, 3691 // "updateMask": { 3692 // "description": "Mask of fields to update. At least one path must be supplied in this\nfield. The elements of the repeated paths field may only include these\nfields from Domain:\n * `labels`\n * `locations`\n * `authorized_networks`", 3693 // "format": "google-fieldmask", 3694 // "location": "query", 3695 // "type": "string" 3696 // } 3697 // }, 3698 // "path": "v1alpha1/{+name}", 3699 // "request": { 3700 // "$ref": "Domain" 3701 // }, 3702 // "response": { 3703 // "$ref": "Operation" 3704 // }, 3705 // "scopes": [ 3706 // "https://www.googleapis.com/auth/cloud-platform" 3707 // ] 3708 // } 3709 3710} 3711 3712// method id "managedidentities.projects.locations.global.domains.reconfigureTrust": 3713 3714type ProjectsLocationsGlobalDomainsReconfigureTrustCall struct { 3715 s *Service 3716 name string 3717 reconfiguretrustrequest *ReconfigureTrustRequest 3718 urlParams_ gensupport.URLParams 3719 ctx_ context.Context 3720 header_ http.Header 3721} 3722 3723// ReconfigureTrust: Updates the dns conditional 3724// forwarder. 3725// Operation<response: google.protobuf.Empty> 3726func (r *ProjectsLocationsGlobalDomainsService) ReconfigureTrust(name string, reconfiguretrustrequest *ReconfigureTrustRequest) *ProjectsLocationsGlobalDomainsReconfigureTrustCall { 3727 c := &ProjectsLocationsGlobalDomainsReconfigureTrustCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3728 c.name = name 3729 c.reconfiguretrustrequest = reconfiguretrustrequest 3730 return c 3731} 3732 3733// Fields allows partial responses to be retrieved. See 3734// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3735// for more information. 3736func (c *ProjectsLocationsGlobalDomainsReconfigureTrustCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsReconfigureTrustCall { 3737 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3738 return c 3739} 3740 3741// Context sets the context to be used in this call's Do method. Any 3742// pending HTTP request will be aborted if the provided context is 3743// canceled. 3744func (c *ProjectsLocationsGlobalDomainsReconfigureTrustCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsReconfigureTrustCall { 3745 c.ctx_ = ctx 3746 return c 3747} 3748 3749// Header returns an http.Header that can be modified by the caller to 3750// add HTTP headers to the request. 3751func (c *ProjectsLocationsGlobalDomainsReconfigureTrustCall) Header() http.Header { 3752 if c.header_ == nil { 3753 c.header_ = make(http.Header) 3754 } 3755 return c.header_ 3756} 3757 3758func (c *ProjectsLocationsGlobalDomainsReconfigureTrustCall) doRequest(alt string) (*http.Response, error) { 3759 reqHeaders := make(http.Header) 3760 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 3761 for k, v := range c.header_ { 3762 reqHeaders[k] = v 3763 } 3764 reqHeaders.Set("User-Agent", c.s.userAgent()) 3765 var body io.Reader = nil 3766 body, err := googleapi.WithoutDataWrapper.JSONReader(c.reconfiguretrustrequest) 3767 if err != nil { 3768 return nil, err 3769 } 3770 reqHeaders.Set("Content-Type", "application/json") 3771 c.urlParams_.Set("alt", alt) 3772 c.urlParams_.Set("prettyPrint", "false") 3773 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:reconfigureTrust") 3774 urls += "?" + c.urlParams_.Encode() 3775 req, err := http.NewRequest("POST", urls, body) 3776 if err != nil { 3777 return nil, err 3778 } 3779 req.Header = reqHeaders 3780 googleapi.Expand(req.URL, map[string]string{ 3781 "name": c.name, 3782 }) 3783 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3784} 3785 3786// Do executes the "managedidentities.projects.locations.global.domains.reconfigureTrust" call. 3787// Exactly one of *Operation or error will be non-nil. Any non-2xx 3788// status code is an error. Response headers are in either 3789// *Operation.ServerResponse.Header or (if a response was returned at 3790// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3791// to check whether the returned error was because 3792// http.StatusNotModified was returned. 3793func (c *ProjectsLocationsGlobalDomainsReconfigureTrustCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3794 gensupport.SetOptions(c.urlParams_, opts...) 3795 res, err := c.doRequest("json") 3796 if res != nil && res.StatusCode == http.StatusNotModified { 3797 if res.Body != nil { 3798 res.Body.Close() 3799 } 3800 return nil, &googleapi.Error{ 3801 Code: res.StatusCode, 3802 Header: res.Header, 3803 } 3804 } 3805 if err != nil { 3806 return nil, err 3807 } 3808 defer googleapi.CloseBody(res) 3809 if err := googleapi.CheckResponse(res); err != nil { 3810 return nil, err 3811 } 3812 ret := &Operation{ 3813 ServerResponse: googleapi.ServerResponse{ 3814 Header: res.Header, 3815 HTTPStatusCode: res.StatusCode, 3816 }, 3817 } 3818 target := &ret 3819 if err := gensupport.DecodeResponse(target, res); err != nil { 3820 return nil, err 3821 } 3822 return ret, nil 3823 // { 3824 // "description": "Updates the dns conditional forwarder.\nOperation\u003cresponse: google.protobuf.Empty\u003e", 3825 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}:reconfigureTrust", 3826 // "httpMethod": "POST", 3827 // "id": "managedidentities.projects.locations.global.domains.reconfigureTrust", 3828 // "parameterOrder": [ 3829 // "name" 3830 // ], 3831 // "parameters": { 3832 // "name": { 3833 // "description": "The resource domain name, project name and location using the form:\n`projects/{project_id}/locations/global/domains/{domain_name}`", 3834 // "location": "path", 3835 // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", 3836 // "required": true, 3837 // "type": "string" 3838 // } 3839 // }, 3840 // "path": "v1alpha1/{+name}:reconfigureTrust", 3841 // "request": { 3842 // "$ref": "ReconfigureTrustRequest" 3843 // }, 3844 // "response": { 3845 // "$ref": "Operation" 3846 // }, 3847 // "scopes": [ 3848 // "https://www.googleapis.com/auth/cloud-platform" 3849 // ] 3850 // } 3851 3852} 3853 3854// method id "managedidentities.projects.locations.global.domains.resetAdminPassword": 3855 3856type ProjectsLocationsGlobalDomainsResetAdminPasswordCall struct { 3857 s *Service 3858 name string 3859 resetadminpasswordrequest *ResetAdminPasswordRequest 3860 urlParams_ gensupport.URLParams 3861 ctx_ context.Context 3862 header_ http.Header 3863} 3864 3865// ResetAdminPassword: Resets managed identities admin password 3866// identified by 3867// managed_identities_admin_name 3868func (r *ProjectsLocationsGlobalDomainsService) ResetAdminPassword(name string, resetadminpasswordrequest *ResetAdminPasswordRequest) *ProjectsLocationsGlobalDomainsResetAdminPasswordCall { 3869 c := &ProjectsLocationsGlobalDomainsResetAdminPasswordCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3870 c.name = name 3871 c.resetadminpasswordrequest = resetadminpasswordrequest 3872 return c 3873} 3874 3875// Fields allows partial responses to be retrieved. See 3876// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3877// for more information. 3878func (c *ProjectsLocationsGlobalDomainsResetAdminPasswordCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsResetAdminPasswordCall { 3879 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3880 return c 3881} 3882 3883// Context sets the context to be used in this call's Do method. Any 3884// pending HTTP request will be aborted if the provided context is 3885// canceled. 3886func (c *ProjectsLocationsGlobalDomainsResetAdminPasswordCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsResetAdminPasswordCall { 3887 c.ctx_ = ctx 3888 return c 3889} 3890 3891// Header returns an http.Header that can be modified by the caller to 3892// add HTTP headers to the request. 3893func (c *ProjectsLocationsGlobalDomainsResetAdminPasswordCall) Header() http.Header { 3894 if c.header_ == nil { 3895 c.header_ = make(http.Header) 3896 } 3897 return c.header_ 3898} 3899 3900func (c *ProjectsLocationsGlobalDomainsResetAdminPasswordCall) doRequest(alt string) (*http.Response, error) { 3901 reqHeaders := make(http.Header) 3902 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 3903 for k, v := range c.header_ { 3904 reqHeaders[k] = v 3905 } 3906 reqHeaders.Set("User-Agent", c.s.userAgent()) 3907 var body io.Reader = nil 3908 body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetadminpasswordrequest) 3909 if err != nil { 3910 return nil, err 3911 } 3912 reqHeaders.Set("Content-Type", "application/json") 3913 c.urlParams_.Set("alt", alt) 3914 c.urlParams_.Set("prettyPrint", "false") 3915 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:resetAdminPassword") 3916 urls += "?" + c.urlParams_.Encode() 3917 req, err := http.NewRequest("POST", urls, body) 3918 if err != nil { 3919 return nil, err 3920 } 3921 req.Header = reqHeaders 3922 googleapi.Expand(req.URL, map[string]string{ 3923 "name": c.name, 3924 }) 3925 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3926} 3927 3928// Do executes the "managedidentities.projects.locations.global.domains.resetAdminPassword" call. 3929// Exactly one of *ResetAdminPasswordResponse or error will be non-nil. 3930// Any non-2xx status code is an error. Response headers are in either 3931// *ResetAdminPasswordResponse.ServerResponse.Header or (if a response 3932// was returned at all) in error.(*googleapi.Error).Header. Use 3933// googleapi.IsNotModified to check whether the returned error was 3934// because http.StatusNotModified was returned. 3935func (c *ProjectsLocationsGlobalDomainsResetAdminPasswordCall) Do(opts ...googleapi.CallOption) (*ResetAdminPasswordResponse, error) { 3936 gensupport.SetOptions(c.urlParams_, opts...) 3937 res, err := c.doRequest("json") 3938 if res != nil && res.StatusCode == http.StatusNotModified { 3939 if res.Body != nil { 3940 res.Body.Close() 3941 } 3942 return nil, &googleapi.Error{ 3943 Code: res.StatusCode, 3944 Header: res.Header, 3945 } 3946 } 3947 if err != nil { 3948 return nil, err 3949 } 3950 defer googleapi.CloseBody(res) 3951 if err := googleapi.CheckResponse(res); err != nil { 3952 return nil, err 3953 } 3954 ret := &ResetAdminPasswordResponse{ 3955 ServerResponse: googleapi.ServerResponse{ 3956 Header: res.Header, 3957 HTTPStatusCode: res.StatusCode, 3958 }, 3959 } 3960 target := &ret 3961 if err := gensupport.DecodeResponse(target, res); err != nil { 3962 return nil, err 3963 } 3964 return ret, nil 3965 // { 3966 // "description": "Resets managed identities admin password identified by\nmanaged_identities_admin_name", 3967 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}:resetAdminPassword", 3968 // "httpMethod": "POST", 3969 // "id": "managedidentities.projects.locations.global.domains.resetAdminPassword", 3970 // "parameterOrder": [ 3971 // "name" 3972 // ], 3973 // "parameters": { 3974 // "name": { 3975 // "description": "The domain resource name using the form:\n`projects/{project_id}/locations/global/domains/{domain_name}`", 3976 // "location": "path", 3977 // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", 3978 // "required": true, 3979 // "type": "string" 3980 // } 3981 // }, 3982 // "path": "v1alpha1/{+name}:resetAdminPassword", 3983 // "request": { 3984 // "$ref": "ResetAdminPasswordRequest" 3985 // }, 3986 // "response": { 3987 // "$ref": "ResetAdminPasswordResponse" 3988 // }, 3989 // "scopes": [ 3990 // "https://www.googleapis.com/auth/cloud-platform" 3991 // ] 3992 // } 3993 3994} 3995 3996// method id "managedidentities.projects.locations.global.domains.setIamPolicy": 3997 3998type ProjectsLocationsGlobalDomainsSetIamPolicyCall struct { 3999 s *Service 4000 resource string 4001 setiampolicyrequest *SetIamPolicyRequest 4002 urlParams_ gensupport.URLParams 4003 ctx_ context.Context 4004 header_ http.Header 4005} 4006 4007// SetIamPolicy: Sets the access control policy on the specified 4008// resource. Replaces any 4009// existing policy. 4010// 4011// Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and 4012// PERMISSION_DENIED 4013func (r *ProjectsLocationsGlobalDomainsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGlobalDomainsSetIamPolicyCall { 4014 c := &ProjectsLocationsGlobalDomainsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4015 c.resource = resource 4016 c.setiampolicyrequest = setiampolicyrequest 4017 return c 4018} 4019 4020// Fields allows partial responses to be retrieved. See 4021// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4022// for more information. 4023func (c *ProjectsLocationsGlobalDomainsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsSetIamPolicyCall { 4024 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4025 return c 4026} 4027 4028// Context sets the context to be used in this call's Do method. Any 4029// pending HTTP request will be aborted if the provided context is 4030// canceled. 4031func (c *ProjectsLocationsGlobalDomainsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsSetIamPolicyCall { 4032 c.ctx_ = ctx 4033 return c 4034} 4035 4036// Header returns an http.Header that can be modified by the caller to 4037// add HTTP headers to the request. 4038func (c *ProjectsLocationsGlobalDomainsSetIamPolicyCall) Header() http.Header { 4039 if c.header_ == nil { 4040 c.header_ = make(http.Header) 4041 } 4042 return c.header_ 4043} 4044 4045func (c *ProjectsLocationsGlobalDomainsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 4046 reqHeaders := make(http.Header) 4047 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4048 for k, v := range c.header_ { 4049 reqHeaders[k] = v 4050 } 4051 reqHeaders.Set("User-Agent", c.s.userAgent()) 4052 var body io.Reader = nil 4053 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 4054 if err != nil { 4055 return nil, err 4056 } 4057 reqHeaders.Set("Content-Type", "application/json") 4058 c.urlParams_.Set("alt", alt) 4059 c.urlParams_.Set("prettyPrint", "false") 4060 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:setIamPolicy") 4061 urls += "?" + c.urlParams_.Encode() 4062 req, err := http.NewRequest("POST", urls, body) 4063 if err != nil { 4064 return nil, err 4065 } 4066 req.Header = reqHeaders 4067 googleapi.Expand(req.URL, map[string]string{ 4068 "resource": c.resource, 4069 }) 4070 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4071} 4072 4073// Do executes the "managedidentities.projects.locations.global.domains.setIamPolicy" call. 4074// Exactly one of *Policy or error will be non-nil. Any non-2xx status 4075// code is an error. Response headers are in either 4076// *Policy.ServerResponse.Header or (if a response was returned at all) 4077// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4078// check whether the returned error was because http.StatusNotModified 4079// was returned. 4080func (c *ProjectsLocationsGlobalDomainsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 4081 gensupport.SetOptions(c.urlParams_, opts...) 4082 res, err := c.doRequest("json") 4083 if res != nil && res.StatusCode == http.StatusNotModified { 4084 if res.Body != nil { 4085 res.Body.Close() 4086 } 4087 return nil, &googleapi.Error{ 4088 Code: res.StatusCode, 4089 Header: res.Header, 4090 } 4091 } 4092 if err != nil { 4093 return nil, err 4094 } 4095 defer googleapi.CloseBody(res) 4096 if err := googleapi.CheckResponse(res); err != nil { 4097 return nil, err 4098 } 4099 ret := &Policy{ 4100 ServerResponse: googleapi.ServerResponse{ 4101 Header: res.Header, 4102 HTTPStatusCode: res.StatusCode, 4103 }, 4104 } 4105 target := &ret 4106 if err := gensupport.DecodeResponse(target, res); err != nil { 4107 return nil, err 4108 } 4109 return ret, nil 4110 // { 4111 // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.\n\nCan return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED", 4112 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}:setIamPolicy", 4113 // "httpMethod": "POST", 4114 // "id": "managedidentities.projects.locations.global.domains.setIamPolicy", 4115 // "parameterOrder": [ 4116 // "resource" 4117 // ], 4118 // "parameters": { 4119 // "resource": { 4120 // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", 4121 // "location": "path", 4122 // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", 4123 // "required": true, 4124 // "type": "string" 4125 // } 4126 // }, 4127 // "path": "v1alpha1/{+resource}:setIamPolicy", 4128 // "request": { 4129 // "$ref": "SetIamPolicyRequest" 4130 // }, 4131 // "response": { 4132 // "$ref": "Policy" 4133 // }, 4134 // "scopes": [ 4135 // "https://www.googleapis.com/auth/cloud-platform" 4136 // ] 4137 // } 4138 4139} 4140 4141// method id "managedidentities.projects.locations.global.domains.testIamPermissions": 4142 4143type ProjectsLocationsGlobalDomainsTestIamPermissionsCall struct { 4144 s *Service 4145 resource string 4146 testiampermissionsrequest *TestIamPermissionsRequest 4147 urlParams_ gensupport.URLParams 4148 ctx_ context.Context 4149 header_ http.Header 4150} 4151 4152// TestIamPermissions: Returns permissions that a caller has on the 4153// specified resource. 4154// If the resource does not exist, this will return an empty set 4155// of 4156// permissions, not a NOT_FOUND error. 4157// 4158// Note: This operation is designed to be used for building 4159// permission-aware 4160// UIs and command-line tools, not for authorization checking. This 4161// operation 4162// may "fail open" without warning. 4163func (r *ProjectsLocationsGlobalDomainsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGlobalDomainsTestIamPermissionsCall { 4164 c := &ProjectsLocationsGlobalDomainsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4165 c.resource = resource 4166 c.testiampermissionsrequest = testiampermissionsrequest 4167 return c 4168} 4169 4170// Fields allows partial responses to be retrieved. See 4171// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4172// for more information. 4173func (c *ProjectsLocationsGlobalDomainsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsTestIamPermissionsCall { 4174 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4175 return c 4176} 4177 4178// Context sets the context to be used in this call's Do method. Any 4179// pending HTTP request will be aborted if the provided context is 4180// canceled. 4181func (c *ProjectsLocationsGlobalDomainsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsTestIamPermissionsCall { 4182 c.ctx_ = ctx 4183 return c 4184} 4185 4186// Header returns an http.Header that can be modified by the caller to 4187// add HTTP headers to the request. 4188func (c *ProjectsLocationsGlobalDomainsTestIamPermissionsCall) Header() http.Header { 4189 if c.header_ == nil { 4190 c.header_ = make(http.Header) 4191 } 4192 return c.header_ 4193} 4194 4195func (c *ProjectsLocationsGlobalDomainsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 4196 reqHeaders := make(http.Header) 4197 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4198 for k, v := range c.header_ { 4199 reqHeaders[k] = v 4200 } 4201 reqHeaders.Set("User-Agent", c.s.userAgent()) 4202 var body io.Reader = nil 4203 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 4204 if err != nil { 4205 return nil, err 4206 } 4207 reqHeaders.Set("Content-Type", "application/json") 4208 c.urlParams_.Set("alt", alt) 4209 c.urlParams_.Set("prettyPrint", "false") 4210 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+resource}:testIamPermissions") 4211 urls += "?" + c.urlParams_.Encode() 4212 req, err := http.NewRequest("POST", urls, body) 4213 if err != nil { 4214 return nil, err 4215 } 4216 req.Header = reqHeaders 4217 googleapi.Expand(req.URL, map[string]string{ 4218 "resource": c.resource, 4219 }) 4220 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4221} 4222 4223// Do executes the "managedidentities.projects.locations.global.domains.testIamPermissions" call. 4224// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 4225// Any non-2xx status code is an error. Response headers are in either 4226// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 4227// was returned at all) in error.(*googleapi.Error).Header. Use 4228// googleapi.IsNotModified to check whether the returned error was 4229// because http.StatusNotModified was returned. 4230func (c *ProjectsLocationsGlobalDomainsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 4231 gensupport.SetOptions(c.urlParams_, opts...) 4232 res, err := c.doRequest("json") 4233 if res != nil && res.StatusCode == http.StatusNotModified { 4234 if res.Body != nil { 4235 res.Body.Close() 4236 } 4237 return nil, &googleapi.Error{ 4238 Code: res.StatusCode, 4239 Header: res.Header, 4240 } 4241 } 4242 if err != nil { 4243 return nil, err 4244 } 4245 defer googleapi.CloseBody(res) 4246 if err := googleapi.CheckResponse(res); err != nil { 4247 return nil, err 4248 } 4249 ret := &TestIamPermissionsResponse{ 4250 ServerResponse: googleapi.ServerResponse{ 4251 Header: res.Header, 4252 HTTPStatusCode: res.StatusCode, 4253 }, 4254 } 4255 target := &ret 4256 if err := gensupport.DecodeResponse(target, res); err != nil { 4257 return nil, err 4258 } 4259 return ret, nil 4260 // { 4261 // "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", 4262 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}:testIamPermissions", 4263 // "httpMethod": "POST", 4264 // "id": "managedidentities.projects.locations.global.domains.testIamPermissions", 4265 // "parameterOrder": [ 4266 // "resource" 4267 // ], 4268 // "parameters": { 4269 // "resource": { 4270 // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", 4271 // "location": "path", 4272 // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", 4273 // "required": true, 4274 // "type": "string" 4275 // } 4276 // }, 4277 // "path": "v1alpha1/{+resource}:testIamPermissions", 4278 // "request": { 4279 // "$ref": "TestIamPermissionsRequest" 4280 // }, 4281 // "response": { 4282 // "$ref": "TestIamPermissionsResponse" 4283 // }, 4284 // "scopes": [ 4285 // "https://www.googleapis.com/auth/cloud-platform" 4286 // ] 4287 // } 4288 4289} 4290 4291// method id "managedidentities.projects.locations.global.domains.validateTrust": 4292 4293type ProjectsLocationsGlobalDomainsValidateTrustCall struct { 4294 s *Service 4295 name string 4296 validatetrustrequest *ValidateTrustRequest 4297 urlParams_ gensupport.URLParams 4298 ctx_ context.Context 4299 header_ http.Header 4300} 4301 4302// ValidateTrust: Validate the trust state 4303// Operation<response: google.protobuf.Empty> 4304func (r *ProjectsLocationsGlobalDomainsService) ValidateTrust(name string, validatetrustrequest *ValidateTrustRequest) *ProjectsLocationsGlobalDomainsValidateTrustCall { 4305 c := &ProjectsLocationsGlobalDomainsValidateTrustCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4306 c.name = name 4307 c.validatetrustrequest = validatetrustrequest 4308 return c 4309} 4310 4311// Fields allows partial responses to be retrieved. See 4312// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4313// for more information. 4314func (c *ProjectsLocationsGlobalDomainsValidateTrustCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsValidateTrustCall { 4315 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4316 return c 4317} 4318 4319// Context sets the context to be used in this call's Do method. Any 4320// pending HTTP request will be aborted if the provided context is 4321// canceled. 4322func (c *ProjectsLocationsGlobalDomainsValidateTrustCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsValidateTrustCall { 4323 c.ctx_ = ctx 4324 return c 4325} 4326 4327// Header returns an http.Header that can be modified by the caller to 4328// add HTTP headers to the request. 4329func (c *ProjectsLocationsGlobalDomainsValidateTrustCall) Header() http.Header { 4330 if c.header_ == nil { 4331 c.header_ = make(http.Header) 4332 } 4333 return c.header_ 4334} 4335 4336func (c *ProjectsLocationsGlobalDomainsValidateTrustCall) doRequest(alt string) (*http.Response, error) { 4337 reqHeaders := make(http.Header) 4338 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4339 for k, v := range c.header_ { 4340 reqHeaders[k] = v 4341 } 4342 reqHeaders.Set("User-Agent", c.s.userAgent()) 4343 var body io.Reader = nil 4344 body, err := googleapi.WithoutDataWrapper.JSONReader(c.validatetrustrequest) 4345 if err != nil { 4346 return nil, err 4347 } 4348 reqHeaders.Set("Content-Type", "application/json") 4349 c.urlParams_.Set("alt", alt) 4350 c.urlParams_.Set("prettyPrint", "false") 4351 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:validateTrust") 4352 urls += "?" + c.urlParams_.Encode() 4353 req, err := http.NewRequest("POST", urls, body) 4354 if err != nil { 4355 return nil, err 4356 } 4357 req.Header = reqHeaders 4358 googleapi.Expand(req.URL, map[string]string{ 4359 "name": c.name, 4360 }) 4361 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4362} 4363 4364// Do executes the "managedidentities.projects.locations.global.domains.validateTrust" call. 4365// Exactly one of *Operation or error will be non-nil. Any non-2xx 4366// status code is an error. Response headers are in either 4367// *Operation.ServerResponse.Header or (if a response was returned at 4368// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4369// to check whether the returned error was because 4370// http.StatusNotModified was returned. 4371func (c *ProjectsLocationsGlobalDomainsValidateTrustCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4372 gensupport.SetOptions(c.urlParams_, opts...) 4373 res, err := c.doRequest("json") 4374 if res != nil && res.StatusCode == http.StatusNotModified { 4375 if res.Body != nil { 4376 res.Body.Close() 4377 } 4378 return nil, &googleapi.Error{ 4379 Code: res.StatusCode, 4380 Header: res.Header, 4381 } 4382 } 4383 if err != nil { 4384 return nil, err 4385 } 4386 defer googleapi.CloseBody(res) 4387 if err := googleapi.CheckResponse(res); err != nil { 4388 return nil, err 4389 } 4390 ret := &Operation{ 4391 ServerResponse: googleapi.ServerResponse{ 4392 Header: res.Header, 4393 HTTPStatusCode: res.StatusCode, 4394 }, 4395 } 4396 target := &ret 4397 if err := gensupport.DecodeResponse(target, res); err != nil { 4398 return nil, err 4399 } 4400 return ret, nil 4401 // { 4402 // "description": "Validate the trust state\nOperation\u003cresponse: google.protobuf.Empty\u003e", 4403 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}:validateTrust", 4404 // "httpMethod": "POST", 4405 // "id": "managedidentities.projects.locations.global.domains.validateTrust", 4406 // "parameterOrder": [ 4407 // "name" 4408 // ], 4409 // "parameters": { 4410 // "name": { 4411 // "description": "The resource domain name, project name, and location using the form:\n`projects/{project_id}/locations/global/domains/{domain_name}`", 4412 // "location": "path", 4413 // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", 4414 // "required": true, 4415 // "type": "string" 4416 // } 4417 // }, 4418 // "path": "v1alpha1/{+name}:validateTrust", 4419 // "request": { 4420 // "$ref": "ValidateTrustRequest" 4421 // }, 4422 // "response": { 4423 // "$ref": "Operation" 4424 // }, 4425 // "scopes": [ 4426 // "https://www.googleapis.com/auth/cloud-platform" 4427 // ] 4428 // } 4429 4430} 4431 4432// method id "managedidentities.projects.locations.global.operations.cancel": 4433 4434type ProjectsLocationsGlobalOperationsCancelCall struct { 4435 s *Service 4436 name string 4437 canceloperationrequest *CancelOperationRequest 4438 urlParams_ gensupport.URLParams 4439 ctx_ context.Context 4440 header_ http.Header 4441} 4442 4443// Cancel: Starts asynchronous cancellation on a long-running operation. 4444// The server 4445// makes a best effort to cancel the operation, but success is 4446// not 4447// guaranteed. If the server doesn't support this method, it 4448// returns 4449// `google.rpc.Code.UNIMPLEMENTED`. Clients can 4450// use 4451// Operations.GetOperation or 4452// other methods to check whether the cancellation succeeded or whether 4453// the 4454// operation completed despite cancellation. On successful 4455// cancellation, 4456// the operation is not deleted; instead, it becomes an operation 4457// with 4458// an Operation.error value with a google.rpc.Status.code of 4459// 1, 4460// corresponding to `Code.CANCELLED`. 4461func (r *ProjectsLocationsGlobalOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsGlobalOperationsCancelCall { 4462 c := &ProjectsLocationsGlobalOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4463 c.name = name 4464 c.canceloperationrequest = canceloperationrequest 4465 return c 4466} 4467 4468// Fields allows partial responses to be retrieved. See 4469// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4470// for more information. 4471func (c *ProjectsLocationsGlobalOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalOperationsCancelCall { 4472 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4473 return c 4474} 4475 4476// Context sets the context to be used in this call's Do method. Any 4477// pending HTTP request will be aborted if the provided context is 4478// canceled. 4479func (c *ProjectsLocationsGlobalOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsGlobalOperationsCancelCall { 4480 c.ctx_ = ctx 4481 return c 4482} 4483 4484// Header returns an http.Header that can be modified by the caller to 4485// add HTTP headers to the request. 4486func (c *ProjectsLocationsGlobalOperationsCancelCall) Header() http.Header { 4487 if c.header_ == nil { 4488 c.header_ = make(http.Header) 4489 } 4490 return c.header_ 4491} 4492 4493func (c *ProjectsLocationsGlobalOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 4494 reqHeaders := make(http.Header) 4495 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4496 for k, v := range c.header_ { 4497 reqHeaders[k] = v 4498 } 4499 reqHeaders.Set("User-Agent", c.s.userAgent()) 4500 var body io.Reader = nil 4501 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 4502 if err != nil { 4503 return nil, err 4504 } 4505 reqHeaders.Set("Content-Type", "application/json") 4506 c.urlParams_.Set("alt", alt) 4507 c.urlParams_.Set("prettyPrint", "false") 4508 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:cancel") 4509 urls += "?" + c.urlParams_.Encode() 4510 req, err := http.NewRequest("POST", urls, body) 4511 if err != nil { 4512 return nil, err 4513 } 4514 req.Header = reqHeaders 4515 googleapi.Expand(req.URL, map[string]string{ 4516 "name": c.name, 4517 }) 4518 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4519} 4520 4521// Do executes the "managedidentities.projects.locations.global.operations.cancel" call. 4522// Exactly one of *Empty or error will be non-nil. Any non-2xx status 4523// code is an error. Response headers are in either 4524// *Empty.ServerResponse.Header or (if a response was returned at all) 4525// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4526// check whether the returned error was because http.StatusNotModified 4527// was returned. 4528func (c *ProjectsLocationsGlobalOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 4529 gensupport.SetOptions(c.urlParams_, opts...) 4530 res, err := c.doRequest("json") 4531 if res != nil && res.StatusCode == http.StatusNotModified { 4532 if res.Body != nil { 4533 res.Body.Close() 4534 } 4535 return nil, &googleapi.Error{ 4536 Code: res.StatusCode, 4537 Header: res.Header, 4538 } 4539 } 4540 if err != nil { 4541 return nil, err 4542 } 4543 defer googleapi.CloseBody(res) 4544 if err := googleapi.CheckResponse(res); err != nil { 4545 return nil, err 4546 } 4547 ret := &Empty{ 4548 ServerResponse: googleapi.ServerResponse{ 4549 Header: res.Header, 4550 HTTPStatusCode: res.StatusCode, 4551 }, 4552 } 4553 target := &ret 4554 if err := gensupport.DecodeResponse(target, res); err != nil { 4555 return nil, err 4556 } 4557 return ret, nil 4558 // { 4559 // "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", 4560 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/operations/{operationsId}:cancel", 4561 // "httpMethod": "POST", 4562 // "id": "managedidentities.projects.locations.global.operations.cancel", 4563 // "parameterOrder": [ 4564 // "name" 4565 // ], 4566 // "parameters": { 4567 // "name": { 4568 // "description": "The name of the operation resource to be cancelled.", 4569 // "location": "path", 4570 // "pattern": "^projects/[^/]+/locations/global/operations/[^/]+$", 4571 // "required": true, 4572 // "type": "string" 4573 // } 4574 // }, 4575 // "path": "v1alpha1/{+name}:cancel", 4576 // "request": { 4577 // "$ref": "CancelOperationRequest" 4578 // }, 4579 // "response": { 4580 // "$ref": "Empty" 4581 // }, 4582 // "scopes": [ 4583 // "https://www.googleapis.com/auth/cloud-platform" 4584 // ] 4585 // } 4586 4587} 4588 4589// method id "managedidentities.projects.locations.global.operations.delete": 4590 4591type ProjectsLocationsGlobalOperationsDeleteCall struct { 4592 s *Service 4593 name string 4594 urlParams_ gensupport.URLParams 4595 ctx_ context.Context 4596 header_ http.Header 4597} 4598 4599// Delete: Deletes a long-running operation. This method indicates that 4600// the client is 4601// no longer interested in the operation result. It does not cancel 4602// the 4603// operation. If the server doesn't support this method, it 4604// returns 4605// `google.rpc.Code.UNIMPLEMENTED`. 4606func (r *ProjectsLocationsGlobalOperationsService) Delete(name string) *ProjectsLocationsGlobalOperationsDeleteCall { 4607 c := &ProjectsLocationsGlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4608 c.name = name 4609 return c 4610} 4611 4612// Fields allows partial responses to be retrieved. See 4613// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4614// for more information. 4615func (c *ProjectsLocationsGlobalOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalOperationsDeleteCall { 4616 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4617 return c 4618} 4619 4620// Context sets the context to be used in this call's Do method. Any 4621// pending HTTP request will be aborted if the provided context is 4622// canceled. 4623func (c *ProjectsLocationsGlobalOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlobalOperationsDeleteCall { 4624 c.ctx_ = ctx 4625 return c 4626} 4627 4628// Header returns an http.Header that can be modified by the caller to 4629// add HTTP headers to the request. 4630func (c *ProjectsLocationsGlobalOperationsDeleteCall) Header() http.Header { 4631 if c.header_ == nil { 4632 c.header_ = make(http.Header) 4633 } 4634 return c.header_ 4635} 4636 4637func (c *ProjectsLocationsGlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { 4638 reqHeaders := make(http.Header) 4639 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4640 for k, v := range c.header_ { 4641 reqHeaders[k] = v 4642 } 4643 reqHeaders.Set("User-Agent", c.s.userAgent()) 4644 var body io.Reader = nil 4645 c.urlParams_.Set("alt", alt) 4646 c.urlParams_.Set("prettyPrint", "false") 4647 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 4648 urls += "?" + c.urlParams_.Encode() 4649 req, err := http.NewRequest("DELETE", urls, body) 4650 if err != nil { 4651 return nil, err 4652 } 4653 req.Header = reqHeaders 4654 googleapi.Expand(req.URL, map[string]string{ 4655 "name": c.name, 4656 }) 4657 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4658} 4659 4660// Do executes the "managedidentities.projects.locations.global.operations.delete" call. 4661// Exactly one of *Empty or error will be non-nil. Any non-2xx status 4662// code is an error. Response headers are in either 4663// *Empty.ServerResponse.Header or (if a response was returned at all) 4664// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4665// check whether the returned error was because http.StatusNotModified 4666// was returned. 4667func (c *ProjectsLocationsGlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 4668 gensupport.SetOptions(c.urlParams_, opts...) 4669 res, err := c.doRequest("json") 4670 if res != nil && res.StatusCode == http.StatusNotModified { 4671 if res.Body != nil { 4672 res.Body.Close() 4673 } 4674 return nil, &googleapi.Error{ 4675 Code: res.StatusCode, 4676 Header: res.Header, 4677 } 4678 } 4679 if err != nil { 4680 return nil, err 4681 } 4682 defer googleapi.CloseBody(res) 4683 if err := googleapi.CheckResponse(res); err != nil { 4684 return nil, err 4685 } 4686 ret := &Empty{ 4687 ServerResponse: googleapi.ServerResponse{ 4688 Header: res.Header, 4689 HTTPStatusCode: res.StatusCode, 4690 }, 4691 } 4692 target := &ret 4693 if err := gensupport.DecodeResponse(target, res); err != nil { 4694 return nil, err 4695 } 4696 return ret, nil 4697 // { 4698 // "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", 4699 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/operations/{operationsId}", 4700 // "httpMethod": "DELETE", 4701 // "id": "managedidentities.projects.locations.global.operations.delete", 4702 // "parameterOrder": [ 4703 // "name" 4704 // ], 4705 // "parameters": { 4706 // "name": { 4707 // "description": "The name of the operation resource to be deleted.", 4708 // "location": "path", 4709 // "pattern": "^projects/[^/]+/locations/global/operations/[^/]+$", 4710 // "required": true, 4711 // "type": "string" 4712 // } 4713 // }, 4714 // "path": "v1alpha1/{+name}", 4715 // "response": { 4716 // "$ref": "Empty" 4717 // }, 4718 // "scopes": [ 4719 // "https://www.googleapis.com/auth/cloud-platform" 4720 // ] 4721 // } 4722 4723} 4724 4725// method id "managedidentities.projects.locations.global.operations.get": 4726 4727type ProjectsLocationsGlobalOperationsGetCall struct { 4728 s *Service 4729 name string 4730 urlParams_ gensupport.URLParams 4731 ifNoneMatch_ string 4732 ctx_ context.Context 4733 header_ http.Header 4734} 4735 4736// Get: Gets the latest state of a long-running operation. Clients can 4737// use this 4738// method to poll the operation result at intervals as recommended by 4739// the API 4740// service. 4741func (r *ProjectsLocationsGlobalOperationsService) Get(name string) *ProjectsLocationsGlobalOperationsGetCall { 4742 c := &ProjectsLocationsGlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4743 c.name = name 4744 return c 4745} 4746 4747// Fields allows partial responses to be retrieved. See 4748// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4749// for more information. 4750func (c *ProjectsLocationsGlobalOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalOperationsGetCall { 4751 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4752 return c 4753} 4754 4755// IfNoneMatch sets the optional parameter which makes the operation 4756// fail if the object's ETag matches the given value. This is useful for 4757// getting updates only after the object has changed since the last 4758// request. Use googleapi.IsNotModified to check whether the response 4759// error from Do is the result of In-None-Match. 4760func (c *ProjectsLocationsGlobalOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalOperationsGetCall { 4761 c.ifNoneMatch_ = entityTag 4762 return c 4763} 4764 4765// Context sets the context to be used in this call's Do method. Any 4766// pending HTTP request will be aborted if the provided context is 4767// canceled. 4768func (c *ProjectsLocationsGlobalOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalOperationsGetCall { 4769 c.ctx_ = ctx 4770 return c 4771} 4772 4773// Header returns an http.Header that can be modified by the caller to 4774// add HTTP headers to the request. 4775func (c *ProjectsLocationsGlobalOperationsGetCall) Header() http.Header { 4776 if c.header_ == nil { 4777 c.header_ = make(http.Header) 4778 } 4779 return c.header_ 4780} 4781 4782func (c *ProjectsLocationsGlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) { 4783 reqHeaders := make(http.Header) 4784 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4785 for k, v := range c.header_ { 4786 reqHeaders[k] = v 4787 } 4788 reqHeaders.Set("User-Agent", c.s.userAgent()) 4789 if c.ifNoneMatch_ != "" { 4790 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4791 } 4792 var body io.Reader = nil 4793 c.urlParams_.Set("alt", alt) 4794 c.urlParams_.Set("prettyPrint", "false") 4795 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 4796 urls += "?" + c.urlParams_.Encode() 4797 req, err := http.NewRequest("GET", urls, body) 4798 if err != nil { 4799 return nil, err 4800 } 4801 req.Header = reqHeaders 4802 googleapi.Expand(req.URL, map[string]string{ 4803 "name": c.name, 4804 }) 4805 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4806} 4807 4808// Do executes the "managedidentities.projects.locations.global.operations.get" call. 4809// Exactly one of *Operation or error will be non-nil. Any non-2xx 4810// status code is an error. Response headers are in either 4811// *Operation.ServerResponse.Header or (if a response was returned at 4812// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4813// to check whether the returned error was because 4814// http.StatusNotModified was returned. 4815func (c *ProjectsLocationsGlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4816 gensupport.SetOptions(c.urlParams_, opts...) 4817 res, err := c.doRequest("json") 4818 if res != nil && res.StatusCode == http.StatusNotModified { 4819 if res.Body != nil { 4820 res.Body.Close() 4821 } 4822 return nil, &googleapi.Error{ 4823 Code: res.StatusCode, 4824 Header: res.Header, 4825 } 4826 } 4827 if err != nil { 4828 return nil, err 4829 } 4830 defer googleapi.CloseBody(res) 4831 if err := googleapi.CheckResponse(res); err != nil { 4832 return nil, err 4833 } 4834 ret := &Operation{ 4835 ServerResponse: googleapi.ServerResponse{ 4836 Header: res.Header, 4837 HTTPStatusCode: res.StatusCode, 4838 }, 4839 } 4840 target := &ret 4841 if err := gensupport.DecodeResponse(target, res); err != nil { 4842 return nil, err 4843 } 4844 return ret, nil 4845 // { 4846 // "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", 4847 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/operations/{operationsId}", 4848 // "httpMethod": "GET", 4849 // "id": "managedidentities.projects.locations.global.operations.get", 4850 // "parameterOrder": [ 4851 // "name" 4852 // ], 4853 // "parameters": { 4854 // "name": { 4855 // "description": "The name of the operation resource.", 4856 // "location": "path", 4857 // "pattern": "^projects/[^/]+/locations/global/operations/[^/]+$", 4858 // "required": true, 4859 // "type": "string" 4860 // } 4861 // }, 4862 // "path": "v1alpha1/{+name}", 4863 // "response": { 4864 // "$ref": "Operation" 4865 // }, 4866 // "scopes": [ 4867 // "https://www.googleapis.com/auth/cloud-platform" 4868 // ] 4869 // } 4870 4871} 4872 4873// method id "managedidentities.projects.locations.global.operations.list": 4874 4875type ProjectsLocationsGlobalOperationsListCall struct { 4876 s *Service 4877 name string 4878 urlParams_ gensupport.URLParams 4879 ifNoneMatch_ string 4880 ctx_ context.Context 4881 header_ http.Header 4882} 4883 4884// List: Lists operations that match the specified filter in the 4885// request. If the 4886// server doesn't support this method, it returns 4887// `UNIMPLEMENTED`. 4888// 4889// NOTE: the `name` binding allows API services to override the 4890// binding 4891// to use different resource name schemes, such as `users/*/operations`. 4892// To 4893// override the binding, API services can add a binding such 4894// as 4895// "/v1/{name=users/*}/operations" to their service configuration. 4896// For backwards compatibility, the default name includes the 4897// operations 4898// collection id, however overriding users must ensure the name 4899// binding 4900// is the parent resource, without the operations collection id. 4901func (r *ProjectsLocationsGlobalOperationsService) List(name string) *ProjectsLocationsGlobalOperationsListCall { 4902 c := &ProjectsLocationsGlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4903 c.name = name 4904 return c 4905} 4906 4907// Filter sets the optional parameter "filter": The standard list 4908// filter. 4909func (c *ProjectsLocationsGlobalOperationsListCall) Filter(filter string) *ProjectsLocationsGlobalOperationsListCall { 4910 c.urlParams_.Set("filter", filter) 4911 return c 4912} 4913 4914// PageSize sets the optional parameter "pageSize": The standard list 4915// page size. 4916func (c *ProjectsLocationsGlobalOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalOperationsListCall { 4917 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 4918 return c 4919} 4920 4921// PageToken sets the optional parameter "pageToken": The standard list 4922// page token. 4923func (c *ProjectsLocationsGlobalOperationsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalOperationsListCall { 4924 c.urlParams_.Set("pageToken", pageToken) 4925 return c 4926} 4927 4928// Fields allows partial responses to be retrieved. See 4929// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4930// for more information. 4931func (c *ProjectsLocationsGlobalOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalOperationsListCall { 4932 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4933 return c 4934} 4935 4936// IfNoneMatch sets the optional parameter which makes the operation 4937// fail if the object's ETag matches the given value. This is useful for 4938// getting updates only after the object has changed since the last 4939// request. Use googleapi.IsNotModified to check whether the response 4940// error from Do is the result of In-None-Match. 4941func (c *ProjectsLocationsGlobalOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalOperationsListCall { 4942 c.ifNoneMatch_ = entityTag 4943 return c 4944} 4945 4946// Context sets the context to be used in this call's Do method. Any 4947// pending HTTP request will be aborted if the provided context is 4948// canceled. 4949func (c *ProjectsLocationsGlobalOperationsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalOperationsListCall { 4950 c.ctx_ = ctx 4951 return c 4952} 4953 4954// Header returns an http.Header that can be modified by the caller to 4955// add HTTP headers to the request. 4956func (c *ProjectsLocationsGlobalOperationsListCall) Header() http.Header { 4957 if c.header_ == nil { 4958 c.header_ = make(http.Header) 4959 } 4960 return c.header_ 4961} 4962 4963func (c *ProjectsLocationsGlobalOperationsListCall) doRequest(alt string) (*http.Response, error) { 4964 reqHeaders := make(http.Header) 4965 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4966 for k, v := range c.header_ { 4967 reqHeaders[k] = v 4968 } 4969 reqHeaders.Set("User-Agent", c.s.userAgent()) 4970 if c.ifNoneMatch_ != "" { 4971 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4972 } 4973 var body io.Reader = nil 4974 c.urlParams_.Set("alt", alt) 4975 c.urlParams_.Set("prettyPrint", "false") 4976 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/operations") 4977 urls += "?" + c.urlParams_.Encode() 4978 req, err := http.NewRequest("GET", urls, body) 4979 if err != nil { 4980 return nil, err 4981 } 4982 req.Header = reqHeaders 4983 googleapi.Expand(req.URL, map[string]string{ 4984 "name": c.name, 4985 }) 4986 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4987} 4988 4989// Do executes the "managedidentities.projects.locations.global.operations.list" call. 4990// Exactly one of *ListOperationsResponse or error will be non-nil. Any 4991// non-2xx status code is an error. Response headers are in either 4992// *ListOperationsResponse.ServerResponse.Header or (if a response was 4993// returned at all) in error.(*googleapi.Error).Header. Use 4994// googleapi.IsNotModified to check whether the returned error was 4995// because http.StatusNotModified was returned. 4996func (c *ProjectsLocationsGlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 4997 gensupport.SetOptions(c.urlParams_, opts...) 4998 res, err := c.doRequest("json") 4999 if res != nil && res.StatusCode == http.StatusNotModified { 5000 if res.Body != nil { 5001 res.Body.Close() 5002 } 5003 return nil, &googleapi.Error{ 5004 Code: res.StatusCode, 5005 Header: res.Header, 5006 } 5007 } 5008 if err != nil { 5009 return nil, err 5010 } 5011 defer googleapi.CloseBody(res) 5012 if err := googleapi.CheckResponse(res); err != nil { 5013 return nil, err 5014 } 5015 ret := &ListOperationsResponse{ 5016 ServerResponse: googleapi.ServerResponse{ 5017 Header: res.Header, 5018 HTTPStatusCode: res.StatusCode, 5019 }, 5020 } 5021 target := &ret 5022 if err := gensupport.DecodeResponse(target, res); err != nil { 5023 return nil, err 5024 } 5025 return ret, nil 5026 // { 5027 // "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", 5028 // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/operations", 5029 // "httpMethod": "GET", 5030 // "id": "managedidentities.projects.locations.global.operations.list", 5031 // "parameterOrder": [ 5032 // "name" 5033 // ], 5034 // "parameters": { 5035 // "filter": { 5036 // "description": "The standard list filter.", 5037 // "location": "query", 5038 // "type": "string" 5039 // }, 5040 // "name": { 5041 // "description": "The name of the operation's parent resource.", 5042 // "location": "path", 5043 // "pattern": "^projects/[^/]+/locations/global$", 5044 // "required": true, 5045 // "type": "string" 5046 // }, 5047 // "pageSize": { 5048 // "description": "The standard list page size.", 5049 // "format": "int32", 5050 // "location": "query", 5051 // "type": "integer" 5052 // }, 5053 // "pageToken": { 5054 // "description": "The standard list page token.", 5055 // "location": "query", 5056 // "type": "string" 5057 // } 5058 // }, 5059 // "path": "v1alpha1/{+name}/operations", 5060 // "response": { 5061 // "$ref": "ListOperationsResponse" 5062 // }, 5063 // "scopes": [ 5064 // "https://www.googleapis.com/auth/cloud-platform" 5065 // ] 5066 // } 5067 5068} 5069 5070// Pages invokes f for each page of results. 5071// A non-nil error returned from f will halt the iteration. 5072// The provided context supersedes any context provided to the Context method. 5073func (c *ProjectsLocationsGlobalOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 5074 c.ctx_ = ctx 5075 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5076 for { 5077 x, err := c.Do() 5078 if err != nil { 5079 return err 5080 } 5081 if err := f(x); err != nil { 5082 return err 5083 } 5084 if x.NextPageToken == "" { 5085 return nil 5086 } 5087 c.PageToken(x.NextPageToken) 5088 } 5089} 5090