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