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