1 // Copyright 2024 Google LLC. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Code generated file. DO NOT EDIT. 6 7 // Package domains provides access to the Cloud Domains API. 8 // 9 // For product documentation, see: https://cloud.google.com/domains/ 10 // 11 // # Library status 12 // 13 // These client libraries are officially supported by Google. However, this 14 // library is considered complete and is in maintenance mode. This means 15 // that we will address critical bugs and security issues but will not add 16 // any new features. 17 // 18 // When possible, we recommend using our newer 19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) 20 // that are still actively being worked and iterated on. 21 // 22 // # Creating a client 23 // 24 // Usage example: 25 // 26 // import "google.golang.org/api/domains/v1" 27 // ... 28 // ctx := context.Background() 29 // domainsService, err := domains.NewService(ctx) 30 // 31 // In this example, Google Application Default Credentials are used for 32 // authentication. For information on how to create and obtain Application 33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 34 // 35 // # Other authentication options 36 // 37 // To use an API key for authentication (note: some APIs do not support API 38 // keys), use [google.golang.org/api/option.WithAPIKey]: 39 // 40 // domainsService, err := domains.NewService(ctx, option.WithAPIKey("AIza...")) 41 // 42 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth 43 // flow, use [google.golang.org/api/option.WithTokenSource]: 44 // 45 // config := &oauth2.Config{...} 46 // // ... 47 // token, err := config.Exchange(ctx, ...) 48 // domainsService, err := domains.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 49 // 50 // See [google.golang.org/api/option.ClientOption] for details on options. 51 package domains // import "google.golang.org/api/domains/v1" 52 53 import ( 54 "bytes" 55 "context" 56 "encoding/json" 57 "errors" 58 "fmt" 59 "io" 60 "net/http" 61 "net/url" 62 "strconv" 63 "strings" 64 65 googleapi "google.golang.org/api/googleapi" 66 internal "google.golang.org/api/internal" 67 gensupport "google.golang.org/api/internal/gensupport" 68 option "google.golang.org/api/option" 69 internaloption "google.golang.org/api/option/internaloption" 70 htransport "google.golang.org/api/transport/http" 71 ) 72 73 // Always reference these packages, just in case the auto-generated code 74 // below doesn't. 75 var _ = bytes.NewBuffer 76 var _ = strconv.Itoa 77 var _ = fmt.Sprintf 78 var _ = json.NewDecoder 79 var _ = io.Copy 80 var _ = url.Parse 81 var _ = gensupport.MarshalJSON 82 var _ = googleapi.Version 83 var _ = errors.New 84 var _ = strings.Replace 85 var _ = context.Canceled 86 var _ = internaloption.WithDefaultEndpoint 87 var _ = internal.Version 88 89 const apiId = "domains:v1" 90 const apiName = "domains" 91 const apiVersion = "v1" 92 const basePath = "https://domains.googleapis.com/" 93 const basePathTemplate = "https://domains.UNIVERSE_DOMAIN/" 94 const mtlsBasePath = "https://domains.mtls.googleapis.com/" 95 96 // OAuth2 scopes used by this API. 97 const ( 98 // See, edit, configure, and delete your Google Cloud data and see the email 99 // address for your Google Account. 100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 101 ) 102 103 // NewService creates a new Service. 104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 105 scopesOption := internaloption.WithDefaultScopes( 106 "https://www.googleapis.com/auth/cloud-platform", 107 ) 108 // NOTE: prepend, so we don't override user-specified scopes. 109 opts = append([]option.ClientOption{scopesOption}, opts...) 110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) 112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 113 opts = append(opts, internaloption.EnableNewAuthLibrary()) 114 client, endpoint, err := htransport.NewClient(ctx, opts...) 115 if err != nil { 116 return nil, err 117 } 118 s, err := New(client) 119 if err != nil { 120 return nil, err 121 } 122 if endpoint != "" { 123 s.BasePath = endpoint 124 } 125 return s, nil 126 } 127 128 // New creates a new Service. It uses the provided http.Client for requests. 129 // 130 // Deprecated: please use NewService instead. 131 // To provide a custom HTTP client, use option.WithHTTPClient. 132 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 133 func New(client *http.Client) (*Service, error) { 134 if client == nil { 135 return nil, errors.New("client is nil") 136 } 137 s := &Service{client: client, BasePath: basePath} 138 s.Projects = NewProjectsService(s) 139 return s, nil 140 } 141 142 type Service struct { 143 client *http.Client 144 BasePath string // API endpoint base URL 145 UserAgent string // optional additional User-Agent fragment 146 147 Projects *ProjectsService 148 } 149 150 func (s *Service) userAgent() string { 151 if s.UserAgent == "" { 152 return googleapi.UserAgent 153 } 154 return googleapi.UserAgent + " " + s.UserAgent 155 } 156 157 func NewProjectsService(s *Service) *ProjectsService { 158 rs := &ProjectsService{s: s} 159 rs.Locations = NewProjectsLocationsService(s) 160 return rs 161 } 162 163 type ProjectsService struct { 164 s *Service 165 166 Locations *ProjectsLocationsService 167 } 168 169 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 170 rs := &ProjectsLocationsService{s: s} 171 rs.Operations = NewProjectsLocationsOperationsService(s) 172 rs.Registrations = NewProjectsLocationsRegistrationsService(s) 173 return rs 174 } 175 176 type ProjectsLocationsService struct { 177 s *Service 178 179 Operations *ProjectsLocationsOperationsService 180 181 Registrations *ProjectsLocationsRegistrationsService 182 } 183 184 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { 185 rs := &ProjectsLocationsOperationsService{s: s} 186 return rs 187 } 188 189 type ProjectsLocationsOperationsService struct { 190 s *Service 191 } 192 193 func NewProjectsLocationsRegistrationsService(s *Service) *ProjectsLocationsRegistrationsService { 194 rs := &ProjectsLocationsRegistrationsService{s: s} 195 return rs 196 } 197 198 type ProjectsLocationsRegistrationsService struct { 199 s *Service 200 } 201 202 // AuditConfig: Specifies the audit configuration for a service. The 203 // configuration determines which permission types are logged, and what 204 // identities, if any, are exempted from logging. An AuditConfig must have one 205 // or more AuditLogConfigs. If there are AuditConfigs for both `allServices` 206 // and a specific service, the union of the two AuditConfigs is used for that 207 // service: the log_types specified in each AuditConfig are enabled, and the 208 // exempted_members in each AuditLogConfig are exempted. Example Policy with 209 // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", 210 // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ 211 // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": 212 // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", 213 // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": 214 // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For 215 // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ 216 // logging. It also exempts `jose@example.com` from DATA_READ logging, and 217 // `aliya@example.com` from DATA_WRITE logging. 218 type AuditConfig struct { 219 // AuditLogConfigs: The configuration for logging of each type of permission. 220 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` 221 // Service: Specifies a service that will be enabled for audit logging. For 222 // example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` 223 // is a special value that covers all services. 224 Service string `json:"service,omitempty"` 225 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to 226 // unconditionally include in API requests. By default, fields with empty or 227 // default values are omitted from API requests. See 228 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 229 // details. 230 ForceSendFields []string `json:"-"` 231 // NullFields is a list of field names (e.g. "AuditLogConfigs") to include in 232 // API requests with the JSON null value. By default, fields with empty values 233 // are omitted from API requests. See 234 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 235 NullFields []string `json:"-"` 236 } 237 238 func (s *AuditConfig) MarshalJSON() ([]byte, error) { 239 type NoMethod AuditConfig 240 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 241 } 242 243 // AuditLogConfig: Provides the configuration for logging a type of 244 // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", 245 // "exempted_members": [ "user:jose@example.com" ] }, { "log_type": 246 // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while 247 // exempting jose@example.com from DATA_READ logging. 248 type AuditLogConfig struct { 249 // ExemptedMembers: Specifies the identities that do not cause logging for this 250 // type of permission. Follows the same format of Binding.members. 251 ExemptedMembers []string `json:"exemptedMembers,omitempty"` 252 // LogType: The log type that this config enables. 253 // 254 // Possible values: 255 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. 256 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy 257 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create 258 // "DATA_READ" - Data reads. Example: CloudSQL Users list 259 LogType string `json:"logType,omitempty"` 260 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to 261 // unconditionally include in API requests. By default, fields with empty or 262 // default values are omitted from API requests. See 263 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 264 // details. 265 ForceSendFields []string `json:"-"` 266 // NullFields is a list of field names (e.g. "ExemptedMembers") to include in 267 // API requests with the JSON null value. By default, fields with empty values 268 // are omitted from API requests. See 269 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 270 NullFields []string `json:"-"` 271 } 272 273 func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { 274 type NoMethod AuditLogConfig 275 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 276 } 277 278 // AuthorizationCode: Defines an authorization code. 279 type AuthorizationCode struct { 280 // Code: The Authorization Code in ASCII. It can be used to transfer the domain 281 // to or from another registrar. 282 Code string `json:"code,omitempty"` 283 284 // ServerResponse contains the HTTP response code and headers from the server. 285 googleapi.ServerResponse `json:"-"` 286 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 287 // include in API requests. By default, fields with empty or default values are 288 // omitted from API requests. See 289 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 290 // details. 291 ForceSendFields []string `json:"-"` 292 // NullFields is a list of field names (e.g. "Code") to include in API requests 293 // with the JSON null value. By default, fields with empty values are omitted 294 // from API requests. See 295 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 296 NullFields []string `json:"-"` 297 } 298 299 func (s *AuthorizationCode) MarshalJSON() ([]byte, error) { 300 type NoMethod AuthorizationCode 301 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 302 } 303 304 // Binding: Associates `members`, or principals, with a `role`. 305 type Binding struct { 306 // Condition: The condition that is associated with this binding. If the 307 // condition evaluates to `true`, then this binding applies to the current 308 // request. If the condition evaluates to `false`, then this binding does not 309 // apply to the current request. However, a different role binding might grant 310 // the same role to one or more of the principals in this binding. To learn 311 // which resources support conditions in their IAM policies, see the IAM 312 // documentation 313 // (https://cloud.google.com/iam/help/conditions/resource-policies). 314 Condition *Expr `json:"condition,omitempty"` 315 // Members: Specifies the principals requesting access for a Google Cloud 316 // resource. `members` can have the following values: * `allUsers`: A special 317 // identifier that represents anyone who is on the internet; with or without a 318 // Google account. * `allAuthenticatedUsers`: A special identifier that 319 // represents anyone who is authenticated with a Google account or a service 320 // account. Does not include identities that come from external identity 321 // providers (IdPs) through identity federation. * `user:{emailid}`: An email 322 // address that represents a specific Google account. For example, 323 // `alice@example.com` . * `serviceAccount:{emailid}`: An email address that 324 // represents a Google service account. For example, 325 // `my-other-app@appspot.gserviceaccount.com`. * 326 // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An 327 // identifier for a Kubernetes service account 328 // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). 329 // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * 330 // `group:{emailid}`: An email address that represents a Google group. For 331 // example, `admins@example.com`. * `domain:{domain}`: The G Suite domain 332 // (primary) that represents all the users of that domain. For example, 333 // `google.com` or `example.com`. * 334 // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub 335 // ject/{subject_attribute_value}`: A single identity in a workforce identity 336 // pool. * 337 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 338 // group/{group_id}`: All workforce identities in a group. * 339 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 340 // attribute.{attribute_name}/{attribute_value}`: All workforce identities with 341 // a specific attribute value. * 342 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 343 // *`: All identities in a workforce identity pool. * 344 // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo 345 // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single 346 // identity in a workload identity pool. * 347 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 348 // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool 349 // group. * 350 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 351 // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} 352 // `: All identities in a workload identity pool with a certain attribute. * 353 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 354 // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity 355 // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus 356 // unique identifier) representing a user that has been recently deleted. For 357 // example, `alice@example.com?uid=123456789012345678901`. If the user is 358 // recovered, this value reverts to `user:{emailid}` and the recovered user 359 // retains the role in the binding. * 360 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus 361 // unique identifier) representing a service account that has been recently 362 // deleted. For example, 363 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the 364 // service account is undeleted, this value reverts to 365 // `serviceAccount:{emailid}` and the undeleted service account retains the 366 // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email 367 // address (plus unique identifier) representing a Google group that has been 368 // recently deleted. For example, 369 // `admins@example.com?uid=123456789012345678901`. If the group is recovered, 370 // this value reverts to `group:{emailid}` and the recovered group retains the 371 // role in the binding. * 372 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool 373 // _id}/subject/{subject_attribute_value}`: Deleted single identity in a 374 // workforce identity pool. For example, 375 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po 376 // ol-id/subject/my-subject-attribute-value`. 377 Members []string `json:"members,omitempty"` 378 // Role: Role that is assigned to the list of `members`, or principals. For 379 // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview 380 // of the IAM roles and permissions, see the IAM documentation 381 // (https://cloud.google.com/iam/docs/roles-overview). For a list of the 382 // available pre-defined roles, see here 383 // (https://cloud.google.com/iam/docs/understanding-roles). 384 Role string `json:"role,omitempty"` 385 // ForceSendFields is a list of field names (e.g. "Condition") to 386 // unconditionally include in API requests. By default, fields with empty or 387 // default values are omitted from API requests. See 388 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 389 // details. 390 ForceSendFields []string `json:"-"` 391 // NullFields is a list of field names (e.g. "Condition") to include in API 392 // requests with the JSON null value. By default, fields with empty values are 393 // omitted from API requests. See 394 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 395 NullFields []string `json:"-"` 396 } 397 398 func (s *Binding) MarshalJSON() ([]byte, error) { 399 type NoMethod Binding 400 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 401 } 402 403 // ConfigureContactSettingsRequest: Request for the `ConfigureContactSettings` 404 // method. 405 type ConfigureContactSettingsRequest struct { 406 // ContactNotices: The list of contact notices that the caller acknowledges. 407 // The notices needed here depend on the values specified in 408 // `contact_settings`. 409 // 410 // Possible values: 411 // "CONTACT_NOTICE_UNSPECIFIED" - The notice is undefined. 412 // "PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT" - Required when setting the 413 // `privacy` field of `ContactSettings` to `PUBLIC_CONTACT_DATA`, which exposes 414 // contact data publicly. 415 ContactNotices []string `json:"contactNotices,omitempty"` 416 // ContactSettings: Fields of the `ContactSettings` to update. 417 ContactSettings *ContactSettings `json:"contactSettings,omitempty"` 418 // UpdateMask: Required. The field mask describing which fields to update as a 419 // comma-separated list. For example, if only the registrant contact is being 420 // updated, the `update_mask` is "registrant_contact". 421 UpdateMask string `json:"updateMask,omitempty"` 422 // ValidateOnly: Validate the request without actually updating the contact 423 // settings. 424 ValidateOnly bool `json:"validateOnly,omitempty"` 425 // ForceSendFields is a list of field names (e.g. "ContactNotices") to 426 // unconditionally include in API requests. By default, fields with empty or 427 // default values are omitted from API requests. See 428 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 429 // details. 430 ForceSendFields []string `json:"-"` 431 // NullFields is a list of field names (e.g. "ContactNotices") to include in 432 // API requests with the JSON null value. By default, fields with empty values 433 // are omitted from API requests. See 434 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 435 NullFields []string `json:"-"` 436 } 437 438 func (s *ConfigureContactSettingsRequest) MarshalJSON() ([]byte, error) { 439 type NoMethod ConfigureContactSettingsRequest 440 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 441 } 442 443 // ConfigureDnsSettingsRequest: Request for the `ConfigureDnsSettings` method. 444 type ConfigureDnsSettingsRequest struct { 445 // DnsSettings: Fields of the `DnsSettings` to update. 446 DnsSettings *DnsSettings `json:"dnsSettings,omitempty"` 447 // UpdateMask: Required. The field mask describing which fields to update as a 448 // comma-separated list. For example, if only the name servers are being 449 // updated for an existing Custom DNS configuration, the `update_mask` is 450 // "custom_dns.name_servers". When changing the DNS provider from one type to 451 // another, pass the new provider's field name as part of the field mask. For 452 // example, when changing from a Google Domains DNS configuration to a Custom 453 // DNS configuration, the `update_mask` is "custom_dns". // 454 UpdateMask string `json:"updateMask,omitempty"` 455 // ValidateOnly: Validate the request without actually updating the DNS 456 // settings. 457 ValidateOnly bool `json:"validateOnly,omitempty"` 458 // ForceSendFields is a list of field names (e.g. "DnsSettings") to 459 // unconditionally include in API requests. By default, fields with empty or 460 // default values are omitted from API requests. See 461 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 462 // details. 463 ForceSendFields []string `json:"-"` 464 // NullFields is a list of field names (e.g. "DnsSettings") to include in API 465 // requests with the JSON null value. By default, fields with empty values are 466 // omitted from API requests. See 467 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 468 NullFields []string `json:"-"` 469 } 470 471 func (s *ConfigureDnsSettingsRequest) MarshalJSON() ([]byte, error) { 472 type NoMethod ConfigureDnsSettingsRequest 473 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 474 } 475 476 // ConfigureManagementSettingsRequest: Request for the 477 // `ConfigureManagementSettings` method. 478 type ConfigureManagementSettingsRequest struct { 479 // ManagementSettings: Fields of the `ManagementSettings` to update. 480 ManagementSettings *ManagementSettings `json:"managementSettings,omitempty"` 481 // UpdateMask: Required. The field mask describing which fields to update as a 482 // comma-separated list. For example, if only the transfer lock is being 483 // updated, the `update_mask` is "transfer_lock_state". 484 UpdateMask string `json:"updateMask,omitempty"` 485 // ForceSendFields is a list of field names (e.g. "ManagementSettings") to 486 // unconditionally include in API requests. By default, fields with empty or 487 // default values are omitted from API requests. See 488 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 489 // details. 490 ForceSendFields []string `json:"-"` 491 // NullFields is a list of field names (e.g. "ManagementSettings") to include 492 // in API requests with the JSON null value. By default, fields with empty 493 // values are omitted from API requests. See 494 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 495 NullFields []string `json:"-"` 496 } 497 498 func (s *ConfigureManagementSettingsRequest) MarshalJSON() ([]byte, error) { 499 type NoMethod ConfigureManagementSettingsRequest 500 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 501 } 502 503 // Contact: Details required for a contact associated with a `Registration`. 504 type Contact struct { 505 // Email: Required. Email address of the contact. 506 Email string `json:"email,omitempty"` 507 // FaxNumber: Fax number of the contact in international format. For example, 508 // "+1-800-555-0123". 509 FaxNumber string `json:"faxNumber,omitempty"` 510 // PhoneNumber: Required. Phone number of the contact in international format. 511 // For example, "+1-800-555-0123". 512 PhoneNumber string `json:"phoneNumber,omitempty"` 513 // PostalAddress: Required. Postal address of the contact. 514 PostalAddress *PostalAddress `json:"postalAddress,omitempty"` 515 // ForceSendFields is a list of field names (e.g. "Email") to unconditionally 516 // include in API requests. By default, fields with empty or default values are 517 // omitted from API requests. See 518 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 519 // details. 520 ForceSendFields []string `json:"-"` 521 // NullFields is a list of field names (e.g. "Email") to include in API 522 // requests with the JSON null value. By default, fields with empty values are 523 // omitted from API requests. See 524 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 525 NullFields []string `json:"-"` 526 } 527 528 func (s *Contact) MarshalJSON() ([]byte, error) { 529 type NoMethod Contact 530 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 531 } 532 533 // ContactSettings: Defines the contact information associated with a 534 // `Registration`. ICANN (https://icann.org/) requires all domain names to have 535 // associated contact information. The `registrant_contact` is considered the 536 // domain's legal owner, and often the other contacts are identical. 537 type ContactSettings struct { 538 // AdminContact: Required. The administrative contact for the `Registration`. 539 AdminContact *Contact `json:"adminContact,omitempty"` 540 // Privacy: Required. Privacy setting for the contacts associated with the 541 // `Registration`. 542 // 543 // Possible values: 544 // "CONTACT_PRIVACY_UNSPECIFIED" - The contact privacy settings are 545 // undefined. 546 // "PUBLIC_CONTACT_DATA" - All the data from `ContactSettings` is publicly 547 // available. When setting this option, you must also provide a 548 // `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the 549 // request. 550 // "PRIVATE_CONTACT_DATA" - Deprecated: For more information, see [Cloud 551 // Domains feature 552 // deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre 553 // cations). None of the data from `ContactSettings` is publicly available. 554 // Instead, proxy contact data is published for your domain. Email sent to the 555 // proxy email address is forwarded to the registrant's email address. Cloud 556 // Domains provides this privacy proxy service at no additional cost. 557 // "REDACTED_CONTACT_DATA" - The organization name (if provided) and limited 558 // non-identifying data from `ContactSettings` is available to the public (e.g. 559 // country and state). The remaining data is marked as `REDACTED FOR PRIVACY` 560 // in the WHOIS database. The actual information redacted depends on the 561 // domain. For details, see [the registration privacy 562 // article](https://support.google.com/domains/answer/3251242). 563 Privacy string `json:"privacy,omitempty"` 564 // RegistrantContact: Required. The registrant contact for the `Registration`. 565 // *Caution: Anyone with access to this email address, phone number, and/or 566 // postal address can take control of the domain.* *Warning: For new 567 // `Registration`s, the registrant receives an email confirmation that they 568 // must complete within 15 days to avoid domain suspension.* 569 RegistrantContact *Contact `json:"registrantContact,omitempty"` 570 // TechnicalContact: Required. The technical contact for the `Registration`. 571 TechnicalContact *Contact `json:"technicalContact,omitempty"` 572 // ForceSendFields is a list of field names (e.g. "AdminContact") to 573 // unconditionally include in API requests. By default, fields with empty or 574 // default values are omitted from API requests. See 575 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 576 // details. 577 ForceSendFields []string `json:"-"` 578 // NullFields is a list of field names (e.g. "AdminContact") to include in API 579 // requests with the JSON null value. By default, fields with empty values are 580 // omitted from API requests. See 581 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 582 NullFields []string `json:"-"` 583 } 584 585 func (s *ContactSettings) MarshalJSON() ([]byte, error) { 586 type NoMethod ContactSettings 587 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 588 } 589 590 // CustomDns: Configuration for an arbitrary DNS provider. 591 type CustomDns struct { 592 // DsRecords: The list of DS records for this domain, which are used to enable 593 // DNSSEC. The domain's DNS provider can provide the values to set here. If 594 // this field is empty, DNSSEC is disabled. 595 DsRecords []*DsRecord `json:"dsRecords,omitempty"` 596 // NameServers: Required. A list of name servers that store the DNS zone for 597 // this domain. Each name server is a domain name, with Unicode domain names 598 // expressed in Punycode format. 599 NameServers []string `json:"nameServers,omitempty"` 600 // ForceSendFields is a list of field names (e.g. "DsRecords") to 601 // unconditionally include in API requests. By default, fields with empty or 602 // default values are omitted from API requests. See 603 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 604 // details. 605 ForceSendFields []string `json:"-"` 606 // NullFields is a list of field names (e.g. "DsRecords") to include in API 607 // requests with the JSON null value. By default, fields with empty values are 608 // omitted from API requests. See 609 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 610 NullFields []string `json:"-"` 611 } 612 613 func (s *CustomDns) MarshalJSON() ([]byte, error) { 614 type NoMethod CustomDns 615 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 616 } 617 618 // DnsSettings: Defines the DNS configuration of a `Registration`, including 619 // name servers, DNSSEC, and glue records. 620 type DnsSettings struct { 621 // CustomDns: An arbitrary DNS provider identified by its name servers. 622 CustomDns *CustomDns `json:"customDns,omitempty"` 623 // GlueRecords: The list of glue records for this `Registration`. Commonly 624 // empty. 625 GlueRecords []*GlueRecord `json:"glueRecords,omitempty"` 626 // GoogleDomainsDns: Deprecated: For more information, see Cloud Domains 627 // feature deprecation 628 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations). 629 // The free DNS zone provided by Google Domains (https://domains.google/). 630 GoogleDomainsDns *GoogleDomainsDns `json:"googleDomainsDns,omitempty"` 631 // ForceSendFields is a list of field names (e.g. "CustomDns") to 632 // unconditionally include in API requests. By default, fields with empty or 633 // default values are omitted from API requests. See 634 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 635 // details. 636 ForceSendFields []string `json:"-"` 637 // NullFields is a list of field names (e.g. "CustomDns") to include in API 638 // requests with the JSON null value. By default, fields with empty values are 639 // omitted from API requests. See 640 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 641 NullFields []string `json:"-"` 642 } 643 644 func (s *DnsSettings) MarshalJSON() ([]byte, error) { 645 type NoMethod DnsSettings 646 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 647 } 648 649 // Domain: A domain that the calling user manages in Google Domains. 650 type Domain struct { 651 // DomainName: The domain name. Unicode domain names are expressed in Punycode 652 // format. 653 DomainName string `json:"domainName,omitempty"` 654 // ResourceState: The state of this domain as a `Registration` resource. 655 // 656 // Possible values: 657 // "RESOURCE_STATE_UNSPECIFIED" - The assessment is undefined. 658 // "IMPORTABLE" - A `Registration` resource can be created for this domain by 659 // calling `ImportDomain`. 660 // "UNSUPPORTED" - A `Registration` resource cannot be created for this 661 // domain because it is not supported by Cloud Domains; for example, the 662 // top-level domain is not supported or the registry charges non-standard 663 // pricing for yearly renewals. 664 // "SUSPENDED" - A `Registration` resource cannot be created for this domain 665 // because it is suspended and needs to be resolved with Google Domains. 666 // "EXPIRED" - A `Registration` resource cannot be created for this domain 667 // because it is expired and needs to be renewed with Google Domains. 668 // "DELETED" - A `Registration` resource cannot be created for this domain 669 // because it is deleted, but it may be possible to restore it with Google 670 // Domains. 671 ResourceState string `json:"resourceState,omitempty"` 672 // YearlyPrice: Price to renew the domain for one year. Only set when 673 // `resource_state` is `IMPORTABLE`. 674 YearlyPrice *Money `json:"yearlyPrice,omitempty"` 675 // ForceSendFields is a list of field names (e.g. "DomainName") to 676 // unconditionally include in API requests. By default, fields with empty or 677 // default values are omitted from API requests. See 678 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 679 // details. 680 ForceSendFields []string `json:"-"` 681 // NullFields is a list of field names (e.g. "DomainName") to include in API 682 // requests with the JSON null value. By default, fields with empty values are 683 // omitted from API requests. See 684 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 685 NullFields []string `json:"-"` 686 } 687 688 func (s *Domain) MarshalJSON() ([]byte, error) { 689 type NoMethod Domain 690 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 691 } 692 693 // DsRecord: Defines a Delegation Signer (DS) record, which is needed to enable 694 // DNSSEC for a domain. It contains a digest (hash) of a DNSKEY record that 695 // must be present in the domain's DNS zone. 696 type DsRecord struct { 697 // Algorithm: The algorithm used to generate the referenced DNSKEY. 698 // 699 // Possible values: 700 // "ALGORITHM_UNSPECIFIED" - The algorithm is unspecified. 701 // "RSAMD5" - RSA/MD5. Cannot be used for new deployments. 702 // "DH" - Diffie-Hellman. Cannot be used for new deployments. 703 // "DSA" - DSA/SHA1. Not recommended for new deployments. 704 // "ECC" - ECC. Not recommended for new deployments. 705 // "RSASHA1" - RSA/SHA-1. Not recommended for new deployments. 706 // "DSANSEC3SHA1" - DSA-NSEC3-SHA1. Not recommended for new deployments. 707 // "RSASHA1NSEC3SHA1" - RSA/SHA1-NSEC3-SHA1. Not recommended for new 708 // deployments. 709 // "RSASHA256" - RSA/SHA-256. 710 // "RSASHA512" - RSA/SHA-512. 711 // "ECCGOST" - GOST R 34.10-2001. 712 // "ECDSAP256SHA256" - ECDSA Curve P-256 with SHA-256. 713 // "ECDSAP384SHA384" - ECDSA Curve P-384 with SHA-384. 714 // "ED25519" - Ed25519. 715 // "ED448" - Ed448. 716 // "INDIRECT" - Reserved for Indirect Keys. Cannot be used for new 717 // deployments. 718 // "PRIVATEDNS" - Private algorithm. Cannot be used for new deployments. 719 // "PRIVATEOID" - Private algorithm OID. Cannot be used for new deployments. 720 Algorithm string `json:"algorithm,omitempty"` 721 // Digest: The digest generated from the referenced DNSKEY. 722 Digest string `json:"digest,omitempty"` 723 // DigestType: The hash function used to generate the digest of the referenced 724 // DNSKEY. 725 // 726 // Possible values: 727 // "DIGEST_TYPE_UNSPECIFIED" - The DigestType is unspecified. 728 // "SHA1" - SHA-1. Not recommended for new deployments. 729 // "SHA256" - SHA-256. 730 // "GOST3411" - GOST R 34.11-94. 731 // "SHA384" - SHA-384. 732 DigestType string `json:"digestType,omitempty"` 733 // KeyTag: The key tag of the record. Must be set in range 0 -- 65535. 734 KeyTag int64 `json:"keyTag,omitempty"` 735 // ForceSendFields is a list of field names (e.g. "Algorithm") to 736 // unconditionally include in API requests. By default, fields with empty or 737 // default values are omitted from API requests. See 738 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 739 // details. 740 ForceSendFields []string `json:"-"` 741 // NullFields is a list of field names (e.g. "Algorithm") to include in API 742 // requests with the JSON null value. By default, fields with empty values are 743 // omitted from API requests. See 744 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 745 NullFields []string `json:"-"` 746 } 747 748 func (s *DsRecord) MarshalJSON() ([]byte, error) { 749 type NoMethod DsRecord 750 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 751 } 752 753 // ExportRegistrationRequest: Deprecated: For more information, see Cloud 754 // Domains feature deprecation 755 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations). 756 // Request for the `ExportRegistration` method. 757 type ExportRegistrationRequest struct { 758 } 759 760 // Expr: Represents a textual expression in the Common Expression Language 761 // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics 762 // of CEL are documented at https://github.com/google/cel-spec. Example 763 // (Comparison): title: "Summary size limit" description: "Determines if a 764 // summary is less than 100 chars" expression: "document.summary.size() < 100" 765 // Example (Equality): title: "Requestor is owner" description: "Determines if 766 // requestor is the document owner" expression: "document.owner == 767 // request.auth.claims.email" Example (Logic): title: "Public documents" 768 // description: "Determine whether the document should be publicly visible" 769 // expression: "document.type != 'private' && document.type != 'internal'" 770 // Example (Data Manipulation): title: "Notification string" description: 771 // "Create a notification string with a timestamp." expression: "'New message 772 // received at ' + string(document.create_time)" The exact variables and 773 // functions that may be referenced within an expression are determined by the 774 // service that evaluates it. See the service documentation for additional 775 // information. 776 type Expr struct { 777 // Description: Optional. Description of the expression. This is a longer text 778 // which describes the expression, e.g. when hovered over it in a UI. 779 Description string `json:"description,omitempty"` 780 // Expression: Textual representation of an expression in Common Expression 781 // Language syntax. 782 Expression string `json:"expression,omitempty"` 783 // Location: Optional. String indicating the location of the expression for 784 // error reporting, e.g. a file name and a position in the file. 785 Location string `json:"location,omitempty"` 786 // Title: Optional. Title for the expression, i.e. a short string describing 787 // its purpose. This can be used e.g. in UIs which allow to enter the 788 // expression. 789 Title string `json:"title,omitempty"` 790 // ForceSendFields is a list of field names (e.g. "Description") to 791 // unconditionally include in API requests. By default, fields with empty or 792 // default values are omitted from API requests. See 793 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 794 // details. 795 ForceSendFields []string `json:"-"` 796 // NullFields is a list of field names (e.g. "Description") to include in API 797 // requests with the JSON null value. By default, fields with empty values are 798 // omitted from API requests. See 799 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 800 NullFields []string `json:"-"` 801 } 802 803 func (s *Expr) MarshalJSON() ([]byte, error) { 804 type NoMethod Expr 805 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 806 } 807 808 // GlueRecord: Defines a host on your domain that is a DNS name server for your 809 // domain and/or other domains. Glue records are a way of making the IP address 810 // of a name server known, even when it serves DNS queries for its parent 811 // domain. For example, when `ns.example.com` is a name server for 812 // `example.com`, the host `ns.example.com` must have a glue record to break 813 // the circular DNS reference. 814 type GlueRecord struct { 815 // HostName: Required. Domain name of the host in Punycode format. 816 HostName string `json:"hostName,omitempty"` 817 // Ipv4Addresses: List of IPv4 addresses corresponding to this host in the 818 // standard decimal format (e.g. `198.51.100.1`). At least one of 819 // `ipv4_address` and `ipv6_address` must be set. 820 Ipv4Addresses []string `json:"ipv4Addresses,omitempty"` 821 // Ipv6Addresses: List of IPv6 addresses corresponding to this host in the 822 // standard hexadecimal format (e.g. `2001:db8::`). At least one of 823 // `ipv4_address` and `ipv6_address` must be set. 824 Ipv6Addresses []string `json:"ipv6Addresses,omitempty"` 825 // ForceSendFields is a list of field names (e.g. "HostName") to 826 // unconditionally include in API requests. By default, fields with empty or 827 // default values are omitted from API requests. See 828 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 829 // details. 830 ForceSendFields []string `json:"-"` 831 // NullFields is a list of field names (e.g. "HostName") to include in API 832 // requests with the JSON null value. By default, fields with empty values are 833 // omitted from API requests. See 834 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 835 NullFields []string `json:"-"` 836 } 837 838 func (s *GlueRecord) MarshalJSON() ([]byte, error) { 839 type NoMethod GlueRecord 840 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 841 } 842 843 // GoogleDomainsDns: Deprecated: For more information, see Cloud Domains 844 // feature deprecation 845 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations). 846 // Configuration for using the free DNS zone provided by Google Domains as a 847 // `Registration`'s `dns_provider`. You cannot configure the DNS zone itself 848 // using the API. To configure the DNS zone, go to Google Domains 849 // (https://domains.google/). 850 type GoogleDomainsDns struct { 851 // DsRecords: Output only. The list of DS records published for this domain. 852 // The list is automatically populated when `ds_state` is 853 // `DS_RECORDS_PUBLISHED`, otherwise it remains empty. 854 DsRecords []*DsRecord `json:"dsRecords,omitempty"` 855 // DsState: Required. The state of DS records for this domain. Used to enable 856 // or disable automatic DNSSEC. 857 // 858 // Possible values: 859 // "DS_STATE_UNSPECIFIED" - DS state is unspecified. 860 // "DS_RECORDS_UNPUBLISHED" - DNSSEC is disabled for this domain. No DS 861 // records for this domain are published in the parent DNS zone. 862 // "DS_RECORDS_PUBLISHED" - DNSSEC is enabled for this domain. Appropriate DS 863 // records for this domain are published in the parent DNS zone. This option is 864 // valid only if the DNS zone referenced in the `Registration`'s `dns_provider` 865 // field is already DNSSEC-signed. 866 DsState string `json:"dsState,omitempty"` 867 // NameServers: Output only. A list of name servers that store the DNS zone for 868 // this domain. Each name server is a domain name, with Unicode domain names 869 // expressed in Punycode format. This field is automatically populated with the 870 // name servers assigned to the Google Domains DNS zone. 871 NameServers []string `json:"nameServers,omitempty"` 872 // ForceSendFields is a list of field names (e.g. "DsRecords") to 873 // unconditionally include in API requests. By default, fields with empty or 874 // default values are omitted from API requests. See 875 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 876 // details. 877 ForceSendFields []string `json:"-"` 878 // NullFields is a list of field names (e.g. "DsRecords") to include in API 879 // requests with the JSON null value. By default, fields with empty values are 880 // omitted from API requests. See 881 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 882 NullFields []string `json:"-"` 883 } 884 885 func (s *GoogleDomainsDns) MarshalJSON() ([]byte, error) { 886 type NoMethod GoogleDomainsDns 887 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 888 } 889 890 // ImportDomainRequest: Deprecated: For more information, see Cloud Domains 891 // feature deprecation 892 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations). 893 // Request for the `ImportDomain` method. 894 type ImportDomainRequest struct { 895 // DomainName: Required. The domain name. Unicode domain names must be 896 // expressed in Punycode format. 897 DomainName string `json:"domainName,omitempty"` 898 // Labels: Set of labels associated with the `Registration`. 899 Labels map[string]string `json:"labels,omitempty"` 900 // ForceSendFields is a list of field names (e.g. "DomainName") to 901 // unconditionally include in API requests. By default, fields with empty or 902 // default values are omitted from API requests. See 903 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 904 // details. 905 ForceSendFields []string `json:"-"` 906 // NullFields is a list of field names (e.g. "DomainName") to include in API 907 // requests with the JSON null value. By default, fields with empty values are 908 // omitted from API requests. See 909 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 910 NullFields []string `json:"-"` 911 } 912 913 func (s *ImportDomainRequest) MarshalJSON() ([]byte, error) { 914 type NoMethod ImportDomainRequest 915 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 916 } 917 918 // ListLocationsResponse: The response message for Locations.ListLocations. 919 type ListLocationsResponse struct { 920 // Locations: A list of locations that matches the specified filter in the 921 // request. 922 Locations []*Location `json:"locations,omitempty"` 923 // NextPageToken: The standard List next-page token. 924 NextPageToken string `json:"nextPageToken,omitempty"` 925 926 // ServerResponse contains the HTTP response code and headers from the server. 927 googleapi.ServerResponse `json:"-"` 928 // ForceSendFields is a list of field names (e.g. "Locations") to 929 // unconditionally include in API requests. By default, fields with empty or 930 // default values are omitted from API requests. See 931 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 932 // details. 933 ForceSendFields []string `json:"-"` 934 // NullFields is a list of field names (e.g. "Locations") to include in API 935 // requests with the JSON null value. By default, fields with empty values are 936 // omitted from API requests. See 937 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 938 NullFields []string `json:"-"` 939 } 940 941 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 942 type NoMethod ListLocationsResponse 943 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 944 } 945 946 // ListOperationsResponse: The response message for Operations.ListOperations. 947 type ListOperationsResponse struct { 948 // NextPageToken: The standard List next-page token. 949 NextPageToken string `json:"nextPageToken,omitempty"` 950 // Operations: A list of operations that matches the specified filter in the 951 // request. 952 Operations []*Operation `json:"operations,omitempty"` 953 954 // ServerResponse contains the HTTP response code and headers from the server. 955 googleapi.ServerResponse `json:"-"` 956 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 957 // unconditionally include in API requests. By default, fields with empty or 958 // default values are omitted from API requests. See 959 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 960 // details. 961 ForceSendFields []string `json:"-"` 962 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 963 // requests with the JSON null value. By default, fields with empty values are 964 // omitted from API requests. See 965 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 966 NullFields []string `json:"-"` 967 } 968 969 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 970 type NoMethod ListOperationsResponse 971 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 972 } 973 974 // ListRegistrationsResponse: Response for the `ListRegistrations` method. 975 type ListRegistrationsResponse struct { 976 // NextPageToken: When present, there are more results to retrieve. Set 977 // `page_token` to this value on a subsequent call to get the next page of 978 // results. 979 NextPageToken string `json:"nextPageToken,omitempty"` 980 // Registrations: A list of `Registration`s. 981 Registrations []*Registration `json:"registrations,omitempty"` 982 983 // ServerResponse contains the HTTP response code and headers from the server. 984 googleapi.ServerResponse `json:"-"` 985 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 986 // unconditionally include in API requests. By default, fields with empty or 987 // default values are omitted from API requests. See 988 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 989 // details. 990 ForceSendFields []string `json:"-"` 991 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 992 // requests with the JSON null value. By default, fields with empty values are 993 // omitted from API requests. See 994 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 995 NullFields []string `json:"-"` 996 } 997 998 func (s *ListRegistrationsResponse) MarshalJSON() ([]byte, error) { 999 type NoMethod ListRegistrationsResponse 1000 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1001 } 1002 1003 // Location: A resource that represents a Google Cloud location. 1004 type Location struct { 1005 // DisplayName: The friendly name for this location, typically a nearby city 1006 // name. For example, "Tokyo". 1007 DisplayName string `json:"displayName,omitempty"` 1008 // Labels: Cross-service attributes for the location. For example 1009 // {"cloud.googleapis.com/region": "us-east1"} 1010 Labels map[string]string `json:"labels,omitempty"` 1011 // LocationId: The canonical id for this location. For example: "us-east1". 1012 LocationId string `json:"locationId,omitempty"` 1013 // Metadata: Service-specific metadata. For example the available capacity at 1014 // the given location. 1015 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 1016 // Name: Resource name for the location, which may vary between 1017 // implementations. For example: 1018 // "projects/example-project/locations/us-east1" 1019 Name string `json:"name,omitempty"` 1020 1021 // ServerResponse contains the HTTP response code and headers from the server. 1022 googleapi.ServerResponse `json:"-"` 1023 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1024 // unconditionally include in API requests. By default, fields with empty or 1025 // default values are omitted from API requests. See 1026 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1027 // details. 1028 ForceSendFields []string `json:"-"` 1029 // NullFields is a list of field names (e.g. "DisplayName") to include in API 1030 // requests with the JSON null value. By default, fields with empty values are 1031 // omitted from API requests. See 1032 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1033 NullFields []string `json:"-"` 1034 } 1035 1036 func (s *Location) MarshalJSON() ([]byte, error) { 1037 type NoMethod Location 1038 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1039 } 1040 1041 // ManagementSettings: Defines renewal, billing, and transfer settings for a 1042 // `Registration`. 1043 type ManagementSettings struct { 1044 // PreferredRenewalMethod: Optional. The desired renewal method for this 1045 // `Registration`. The actual `renewal_method` is automatically updated to 1046 // reflect this choice. If unset or equal to `RENEWAL_METHOD_UNSPECIFIED`, the 1047 // actual `renewalMethod` is treated as if it were set to `AUTOMATIC_RENEWAL`. 1048 // You cannot use `RENEWAL_DISABLED` during resource creation, and you can 1049 // update the renewal status only when the `Registration` resource has state 1050 // `ACTIVE` or `SUSPENDED`. When `preferred_renewal_method` is set to 1051 // `AUTOMATIC_RENEWAL`, the actual `renewal_method` can be set to 1052 // `RENEWAL_DISABLED` in case of problems with the billing account or reported 1053 // domain abuse. In such cases, check the `issues` field on the `Registration`. 1054 // After the problem is resolved, the `renewal_method` is automatically updated 1055 // to `preferred_renewal_method` in a few hours. 1056 // 1057 // Possible values: 1058 // "RENEWAL_METHOD_UNSPECIFIED" - The renewal method is undefined. 1059 // "AUTOMATIC_RENEWAL" - The domain is automatically renewed each year. 1060 // "MANUAL_RENEWAL" - Deprecated: For more information, see [Cloud Domains 1061 // feature 1062 // deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre 1063 // cations). This option was never used. Use `RENEWAL_DISABLED` instead. 1064 // "RENEWAL_DISABLED" - The domain won't be renewed and will expire at its 1065 // expiration time. 1066 PreferredRenewalMethod string `json:"preferredRenewalMethod,omitempty"` 1067 // RenewalMethod: Output only. The actual renewal method for this 1068 // `Registration`. When `preferred_renewal_method` is set to 1069 // `AUTOMATIC_RENEWAL`, the actual `renewal_method` can be equal to 1070 // `RENEWAL_DISABLED`—for example, when there are problems with the billing 1071 // account or reported domain abuse. In such cases, check the `issues` field on 1072 // the `Registration`. After the problem is resolved, the `renewal_method` is 1073 // automatically updated to `preferred_renewal_method` in a few hours. 1074 // 1075 // Possible values: 1076 // "RENEWAL_METHOD_UNSPECIFIED" - The renewal method is undefined. 1077 // "AUTOMATIC_RENEWAL" - The domain is automatically renewed each year. 1078 // "MANUAL_RENEWAL" - Deprecated: For more information, see [Cloud Domains 1079 // feature 1080 // deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre 1081 // cations). This option was never used. Use `RENEWAL_DISABLED` instead. 1082 // "RENEWAL_DISABLED" - The domain won't be renewed and will expire at its 1083 // expiration time. 1084 RenewalMethod string `json:"renewalMethod,omitempty"` 1085 // TransferLockState: Controls whether the domain can be transferred to another 1086 // registrar. 1087 // 1088 // Possible values: 1089 // "TRANSFER_LOCK_STATE_UNSPECIFIED" - The state is unspecified. 1090 // "UNLOCKED" - The domain is unlocked and can be transferred to another 1091 // registrar. 1092 // "LOCKED" - The domain is locked and cannot be transferred to another 1093 // registrar. 1094 TransferLockState string `json:"transferLockState,omitempty"` 1095 // ForceSendFields is a list of field names (e.g. "PreferredRenewalMethod") to 1096 // unconditionally include in API requests. By default, fields with empty or 1097 // default values are omitted from API requests. See 1098 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1099 // details. 1100 ForceSendFields []string `json:"-"` 1101 // NullFields is a list of field names (e.g. "PreferredRenewalMethod") to 1102 // include in API requests with the JSON null value. By default, fields with 1103 // empty values are omitted from API requests. See 1104 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1105 NullFields []string `json:"-"` 1106 } 1107 1108 func (s *ManagementSettings) MarshalJSON() ([]byte, error) { 1109 type NoMethod ManagementSettings 1110 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1111 } 1112 1113 // Money: Represents an amount of money with its currency type. 1114 type Money struct { 1115 // CurrencyCode: The three-letter currency code defined in ISO 4217. 1116 CurrencyCode string `json:"currencyCode,omitempty"` 1117 // Nanos: Number of nano (10^-9) units of the amount. The value must be between 1118 // -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` 1119 // must be positive or zero. If `units` is zero, `nanos` can be positive, zero, 1120 // or negative. If `units` is negative, `nanos` must be negative or zero. For 1121 // example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. 1122 Nanos int64 `json:"nanos,omitempty"` 1123 // Units: The whole units of the amount. For example if `currencyCode` is 1124 // "USD", then 1 unit is one US dollar. 1125 Units int64 `json:"units,omitempty,string"` 1126 // ForceSendFields is a list of field names (e.g. "CurrencyCode") to 1127 // unconditionally include in API requests. By default, fields with empty or 1128 // default values are omitted from API requests. See 1129 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1130 // details. 1131 ForceSendFields []string `json:"-"` 1132 // NullFields is a list of field names (e.g. "CurrencyCode") to include in API 1133 // requests with the JSON null value. By default, fields with empty values are 1134 // omitted from API requests. See 1135 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1136 NullFields []string `json:"-"` 1137 } 1138 1139 func (s *Money) MarshalJSON() ([]byte, error) { 1140 type NoMethod Money 1141 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1142 } 1143 1144 // Operation: This resource represents a long-running operation that is the 1145 // result of a network API call. 1146 type Operation struct { 1147 // Done: If the value is `false`, it means the operation is still in progress. 1148 // If `true`, the operation is completed, and either `error` or `response` is 1149 // available. 1150 Done bool `json:"done,omitempty"` 1151 // Error: The error result of the operation in case of failure or cancellation. 1152 Error *Status `json:"error,omitempty"` 1153 // Metadata: Service-specific metadata associated with the operation. It 1154 // typically contains progress information and common metadata such as create 1155 // time. Some services might not provide such metadata. Any method that returns 1156 // a long-running operation should document the metadata type, if any. 1157 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 1158 // Name: The server-assigned name, which is only unique within the same service 1159 // that originally returns it. If you use the default HTTP mapping, the `name` 1160 // should be a resource name ending with `operations/{unique_id}`. 1161 Name string `json:"name,omitempty"` 1162 // Response: The normal, successful response of the operation. If the original 1163 // method returns no data on success, such as `Delete`, the response is 1164 // `google.protobuf.Empty`. If the original method is standard 1165 // `Get`/`Create`/`Update`, the response should be the resource. For other 1166 // methods, the response should have the type `XxxResponse`, where `Xxx` is the 1167 // original method name. For example, if the original method name is 1168 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. 1169 Response googleapi.RawMessage `json:"response,omitempty"` 1170 1171 // ServerResponse contains the HTTP response code and headers from the server. 1172 googleapi.ServerResponse `json:"-"` 1173 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally 1174 // include in API requests. By default, fields with empty or default values are 1175 // omitted from API requests. See 1176 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1177 // details. 1178 ForceSendFields []string `json:"-"` 1179 // NullFields is a list of field names (e.g. "Done") to include in API requests 1180 // with the JSON null value. By default, fields with empty values are omitted 1181 // from API requests. See 1182 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1183 NullFields []string `json:"-"` 1184 } 1185 1186 func (s *Operation) MarshalJSON() ([]byte, error) { 1187 type NoMethod Operation 1188 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1189 } 1190 1191 // OperationMetadata: Represents the metadata of the long-running operation. 1192 // Output only. 1193 type OperationMetadata struct { 1194 // ApiVersion: API version used to start the operation. 1195 ApiVersion string `json:"apiVersion,omitempty"` 1196 // CreateTime: The time the operation was created. 1197 CreateTime string `json:"createTime,omitempty"` 1198 // EndTime: The time the operation finished running. 1199 EndTime string `json:"endTime,omitempty"` 1200 // StatusDetail: Human-readable status of the operation, if any. 1201 StatusDetail string `json:"statusDetail,omitempty"` 1202 // Target: Server-defined resource path for the target of the operation. 1203 Target string `json:"target,omitempty"` 1204 // Verb: Name of the verb executed by the operation. 1205 Verb string `json:"verb,omitempty"` 1206 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1207 // unconditionally include in API requests. By default, fields with empty or 1208 // default values are omitted from API requests. See 1209 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1210 // details. 1211 ForceSendFields []string `json:"-"` 1212 // NullFields is a list of field names (e.g. "ApiVersion") to include in API 1213 // requests with the JSON null value. By default, fields with empty values are 1214 // omitted from API requests. See 1215 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1216 NullFields []string `json:"-"` 1217 } 1218 1219 func (s *OperationMetadata) MarshalJSON() ([]byte, error) { 1220 type NoMethod OperationMetadata 1221 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1222 } 1223 1224 // Policy: An Identity and Access Management (IAM) policy, which specifies 1225 // access controls for Google Cloud resources. A `Policy` is a collection of 1226 // `bindings`. A `binding` binds one or more `members`, or principals, to a 1227 // single `role`. Principals can be user accounts, service accounts, Google 1228 // groups, and domains (such as G Suite). A `role` is a named list of 1229 // permissions; each `role` can be an IAM predefined role or a user-created 1230 // custom role. For some types of Google Cloud resources, a `binding` can also 1231 // specify a `condition`, which is a logical expression that allows access to a 1232 // resource only if the expression evaluates to `true`. A condition can add 1233 // constraints based on attributes of the request, the resource, or both. To 1234 // learn which resources support conditions in their IAM policies, see the IAM 1235 // documentation 1236 // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON 1237 // example:** ``` { "bindings": [ { "role": 1238 // "roles/resourcemanager.organizationAdmin", "members": [ 1239 // "user:mike@example.com", "group:admins@example.com", "domain:google.com", 1240 // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": 1241 // "roles/resourcemanager.organizationViewer", "members": [ 1242 // "user:eve@example.com" ], "condition": { "title": "expirable access", 1243 // "description": "Does not grant access after Sep 2020", "expression": 1244 // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": 1245 // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - 1246 // members: - user:mike@example.com - group:admins@example.com - 1247 // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com 1248 // role: roles/resourcemanager.organizationAdmin - members: - 1249 // user:eve@example.com role: roles/resourcemanager.organizationViewer 1250 // condition: title: expirable access description: Does not grant access after 1251 // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') 1252 // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, 1253 // see the IAM documentation (https://cloud.google.com/iam/docs/). 1254 type Policy struct { 1255 // AuditConfigs: Specifies cloud audit logging configuration for this policy. 1256 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` 1257 // Bindings: Associates a list of `members`, or principals, with a `role`. 1258 // Optionally, may specify a `condition` that determines how and when the 1259 // `bindings` are applied. Each of the `bindings` must contain at least one 1260 // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; 1261 // up to 250 of these principals can be Google groups. Each occurrence of a 1262 // principal counts towards these limits. For example, if the `bindings` grant 1263 // 50 different roles to `user:alice@example.com`, and not to any other 1264 // principal, then you can add another 1,450 principals to the `bindings` in 1265 // the `Policy`. 1266 Bindings []*Binding `json:"bindings,omitempty"` 1267 // Etag: `etag` is used for optimistic concurrency control as a way to help 1268 // prevent simultaneous updates of a policy from overwriting each other. It is 1269 // strongly suggested that systems make use of the `etag` in the 1270 // read-modify-write cycle to perform policy updates in order to avoid race 1271 // conditions: An `etag` is returned in the response to `getIamPolicy`, and 1272 // systems are expected to put that etag in the request to `setIamPolicy` to 1273 // ensure that their change will be applied to the same version of the policy. 1274 // **Important:** If you use IAM Conditions, you must include the `etag` field 1275 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows 1276 // you to overwrite a version `3` policy with a version `1` policy, and all of 1277 // the conditions in the version `3` policy are lost. 1278 Etag string `json:"etag,omitempty"` 1279 // Version: Specifies the format of the policy. Valid values are `0`, `1`, and 1280 // `3`. Requests that specify an invalid value are rejected. Any operation that 1281 // affects conditional role bindings must specify version `3`. This requirement 1282 // applies to the following operations: * Getting a policy that includes a 1283 // conditional role binding * Adding a conditional role binding to a policy * 1284 // Changing a conditional role binding in a policy * Removing any role binding, 1285 // with or without a condition, from a policy that includes conditions 1286 // **Important:** If you use IAM Conditions, you must include the `etag` field 1287 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows 1288 // you to overwrite a version `3` policy with a version `1` policy, and all of 1289 // the conditions in the version `3` policy are lost. If a policy does not 1290 // include any conditions, operations on that policy may specify any valid 1291 // version or leave the field unset. To learn which resources support 1292 // conditions in their IAM policies, see the IAM documentation 1293 // (https://cloud.google.com/iam/help/conditions/resource-policies). 1294 Version int64 `json:"version,omitempty"` 1295 1296 // ServerResponse contains the HTTP response code and headers from the server. 1297 googleapi.ServerResponse `json:"-"` 1298 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to 1299 // unconditionally include in API requests. By default, fields with empty or 1300 // default values are omitted from API requests. See 1301 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1302 // details. 1303 ForceSendFields []string `json:"-"` 1304 // NullFields is a list of field names (e.g. "AuditConfigs") to include in API 1305 // requests with the JSON null value. By default, fields with empty values are 1306 // omitted from API requests. See 1307 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1308 NullFields []string `json:"-"` 1309 } 1310 1311 func (s *Policy) MarshalJSON() ([]byte, error) { 1312 type NoMethod Policy 1313 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1314 } 1315 1316 // PostalAddress: Represents a postal address, e.g. for postal delivery or 1317 // payments addresses. Given a postal address, a postal service can deliver 1318 // items to a premise, P.O. Box or similar. It is not intended to model 1319 // geographical locations (roads, towns, mountains). In typical usage an 1320 // address would be created via user input or from importing existing data, 1321 // depending on the type of process. Advice on address input / editing: - Use 1322 // an internationalization-ready address widget such as 1323 // https://github.com/google/libaddressinput) - Users should not be presented 1324 // with UI elements for input or editing of fields outside countries where that 1325 // field is used. For more guidance on how to use this schema, please see: 1326 // https://support.google.com/business/answer/6397478 1327 type PostalAddress struct { 1328 // AddressLines: Unstructured address lines describing the lower levels of an 1329 // address. Because values in address_lines do not have type information and 1330 // may sometimes contain multiple values in a single field (e.g. "Austin, TX"), 1331 // it is important that the line order is clear. The order of address lines 1332 // should be "envelope order" for the country/region of the address. In places 1333 // where this can vary (e.g. Japan), address_language is used to make it 1334 // explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for 1335 // small-to-large). This way, the most specific line of an address can be 1336 // selected based on the language. The minimum permitted structural 1337 // representation of an address consists of a region_code with all remaining 1338 // information placed in the address_lines. It would be possible to format such 1339 // an address very approximately without geocoding, but no semantic reasoning 1340 // could be made about any of the address components until it was at least 1341 // partially resolved. Creating an address only containing a region_code and 1342 // address_lines, and then geocoding is the recommended way to handle 1343 // completely unstructured addresses (as opposed to guessing which parts of the 1344 // address should be localities or administrative areas). 1345 AddressLines []string `json:"addressLines,omitempty"` 1346 // AdministrativeArea: Optional. Highest administrative subdivision which is 1347 // used for postal addresses of a country or region. For example, this can be a 1348 // state, a province, an oblast, or a prefecture. Specifically, for Spain this 1349 // is the province and not the autonomous community (e.g. "Barcelona" and not 1350 // "Catalonia"). Many countries don't use an administrative area in postal 1351 // addresses. E.g. in Switzerland this should be left unpopulated. 1352 AdministrativeArea string `json:"administrativeArea,omitempty"` 1353 // LanguageCode: Optional. BCP-47 language code of the contents of this address 1354 // (if known). This is often the UI language of the input form or is expected 1355 // to match one of the languages used in the address' country/region, or their 1356 // transliterated equivalents. This can affect formatting in certain countries, 1357 // but is not critical to the correctness of the data and will never affect any 1358 // validation or other non-formatting related operations. If this value is not 1359 // known, it should be omitted (rather than specifying a possibly incorrect 1360 // default). Examples: "zh-Hant", "ja", "ja-Latn", "en". 1361 LanguageCode string `json:"languageCode,omitempty"` 1362 // Locality: Optional. Generally refers to the city/town portion of the 1363 // address. Examples: US city, IT comune, UK post town. In regions of the world 1364 // where localities are not well defined or do not fit into this structure 1365 // well, leave locality empty and use address_lines. 1366 Locality string `json:"locality,omitempty"` 1367 // Organization: Optional. The name of the organization at the address. 1368 Organization string `json:"organization,omitempty"` 1369 // PostalCode: Optional. Postal code of the address. Not all countries use or 1370 // require postal codes to be present, but where they are used, they may 1371 // trigger additional validation with other parts of the address (e.g. 1372 // state/zip validation in the U.S.A.). 1373 PostalCode string `json:"postalCode,omitempty"` 1374 // Recipients: Optional. The recipient at the address. This field may, under 1375 // certain circumstances, contain multiline information. For example, it might 1376 // contain "care of" information. 1377 Recipients []string `json:"recipients,omitempty"` 1378 // RegionCode: Required. CLDR region code of the country/region of the address. 1379 // This is never inferred and it is up to the user to ensure the value is 1380 // correct. See https://cldr.unicode.org/ and 1381 // https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html 1382 // for details. Example: "CH" for Switzerland. 1383 RegionCode string `json:"regionCode,omitempty"` 1384 // Revision: The schema revision of the `PostalAddress`. This must be set to 0, 1385 // which is the latest revision. All new revisions **must** be backward 1386 // compatible with old revisions. 1387 Revision int64 `json:"revision,omitempty"` 1388 // SortingCode: Optional. Additional, country-specific, sorting code. This is 1389 // not used in most regions. Where it is used, the value is either a string 1390 // like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a 1391 // number alone, representing the "sector code" (Jamaica), "delivery area 1392 // indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire). 1393 SortingCode string `json:"sortingCode,omitempty"` 1394 // Sublocality: Optional. Sublocality of the address. For example, this can be 1395 // neighborhoods, boroughs, districts. 1396 Sublocality string `json:"sublocality,omitempty"` 1397 // ForceSendFields is a list of field names (e.g. "AddressLines") to 1398 // unconditionally include in API requests. By default, fields with empty or 1399 // default values are omitted from API requests. See 1400 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1401 // details. 1402 ForceSendFields []string `json:"-"` 1403 // NullFields is a list of field names (e.g. "AddressLines") to include in API 1404 // requests with the JSON null value. By default, fields with empty values are 1405 // omitted from API requests. See 1406 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1407 NullFields []string `json:"-"` 1408 } 1409 1410 func (s *PostalAddress) MarshalJSON() ([]byte, error) { 1411 type NoMethod PostalAddress 1412 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1413 } 1414 1415 // RegisterDomainRequest: Request for the `RegisterDomain` method. 1416 type RegisterDomainRequest struct { 1417 // ContactNotices: The list of contact notices that the caller acknowledges. 1418 // The notices needed here depend on the values specified in 1419 // `registration.contact_settings`. 1420 // 1421 // Possible values: 1422 // "CONTACT_NOTICE_UNSPECIFIED" - The notice is undefined. 1423 // "PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT" - Required when setting the 1424 // `privacy` field of `ContactSettings` to `PUBLIC_CONTACT_DATA`, which exposes 1425 // contact data publicly. 1426 ContactNotices []string `json:"contactNotices,omitempty"` 1427 // DomainNotices: The list of domain notices that you acknowledge. Call 1428 // `RetrieveRegisterParameters` to see the notices that need acknowledgement. 1429 // 1430 // Possible values: 1431 // "DOMAIN_NOTICE_UNSPECIFIED" - The notice is undefined. 1432 // "HSTS_PRELOADED" - Indicates that the domain is preloaded on the HTTP 1433 // Strict Transport Security list in browsers. Serving a website on such domain 1434 // requires an SSL certificate. For details, see [how to get an SSL 1435 // certificate](https://support.google.com/domains/answer/7638036). 1436 DomainNotices []string `json:"domainNotices,omitempty"` 1437 // Registration: Required. The complete `Registration` resource to be created. 1438 Registration *Registration `json:"registration,omitempty"` 1439 // ValidateOnly: When true, only validation is performed, without actually 1440 // registering the domain. Follows: 1441 // https://cloud.google.com/apis/design/design_patterns#request_validation 1442 ValidateOnly bool `json:"validateOnly,omitempty"` 1443 // YearlyPrice: Required. Yearly price to register or renew the domain. The 1444 // value that should be put here can be obtained from 1445 // RetrieveRegisterParameters or SearchDomains calls. 1446 YearlyPrice *Money `json:"yearlyPrice,omitempty"` 1447 // ForceSendFields is a list of field names (e.g. "ContactNotices") to 1448 // unconditionally include in API requests. By default, fields with empty or 1449 // default values are omitted from API requests. See 1450 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1451 // details. 1452 ForceSendFields []string `json:"-"` 1453 // NullFields is a list of field names (e.g. "ContactNotices") to include in 1454 // API requests with the JSON null value. By default, fields with empty values 1455 // are omitted from API requests. See 1456 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1457 NullFields []string `json:"-"` 1458 } 1459 1460 func (s *RegisterDomainRequest) MarshalJSON() ([]byte, error) { 1461 type NoMethod RegisterDomainRequest 1462 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1463 } 1464 1465 // RegisterParameters: Parameters required to register a new domain. 1466 type RegisterParameters struct { 1467 // Availability: Indicates whether the domain is available for registration. 1468 // This value is accurate when obtained by calling 1469 // `RetrieveRegisterParameters`, but is approximate when obtained by calling 1470 // `SearchDomains`. 1471 // 1472 // Possible values: 1473 // "AVAILABILITY_UNSPECIFIED" - The availability is unspecified. 1474 // "AVAILABLE" - The domain is available for registration. 1475 // "UNAVAILABLE" - The domain is not available for registration. Generally 1476 // this means it is already registered to another party. 1477 // "UNSUPPORTED" - The domain is not currently supported by Cloud Domains, 1478 // but may be available elsewhere. 1479 // "UNKNOWN" - Cloud Domains is unable to determine domain availability, 1480 // generally due to system maintenance at the domain name registry. 1481 Availability string `json:"availability,omitempty"` 1482 // DomainName: The domain name. Unicode domain names are expressed in Punycode 1483 // format. 1484 DomainName string `json:"domainName,omitempty"` 1485 // DomainNotices: Notices about special properties of the domain. 1486 // 1487 // Possible values: 1488 // "DOMAIN_NOTICE_UNSPECIFIED" - The notice is undefined. 1489 // "HSTS_PRELOADED" - Indicates that the domain is preloaded on the HTTP 1490 // Strict Transport Security list in browsers. Serving a website on such domain 1491 // requires an SSL certificate. For details, see [how to get an SSL 1492 // certificate](https://support.google.com/domains/answer/7638036). 1493 DomainNotices []string `json:"domainNotices,omitempty"` 1494 // SupportedPrivacy: Contact privacy options that the domain supports. 1495 // 1496 // Possible values: 1497 // "CONTACT_PRIVACY_UNSPECIFIED" - The contact privacy settings are 1498 // undefined. 1499 // "PUBLIC_CONTACT_DATA" - All the data from `ContactSettings` is publicly 1500 // available. When setting this option, you must also provide a 1501 // `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the 1502 // request. 1503 // "PRIVATE_CONTACT_DATA" - Deprecated: For more information, see [Cloud 1504 // Domains feature 1505 // deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre 1506 // cations). None of the data from `ContactSettings` is publicly available. 1507 // Instead, proxy contact data is published for your domain. Email sent to the 1508 // proxy email address is forwarded to the registrant's email address. Cloud 1509 // Domains provides this privacy proxy service at no additional cost. 1510 // "REDACTED_CONTACT_DATA" - The organization name (if provided) and limited 1511 // non-identifying data from `ContactSettings` is available to the public (e.g. 1512 // country and state). The remaining data is marked as `REDACTED FOR PRIVACY` 1513 // in the WHOIS database. The actual information redacted depends on the 1514 // domain. For details, see [the registration privacy 1515 // article](https://support.google.com/domains/answer/3251242). 1516 SupportedPrivacy []string `json:"supportedPrivacy,omitempty"` 1517 // YearlyPrice: Price to register or renew the domain for one year. 1518 YearlyPrice *Money `json:"yearlyPrice,omitempty"` 1519 // ForceSendFields is a list of field names (e.g. "Availability") to 1520 // unconditionally include in API requests. By default, fields with empty or 1521 // default values are omitted from API requests. See 1522 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1523 // details. 1524 ForceSendFields []string `json:"-"` 1525 // NullFields is a list of field names (e.g. "Availability") to include in API 1526 // requests with the JSON null value. By default, fields with empty values are 1527 // omitted from API requests. See 1528 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1529 NullFields []string `json:"-"` 1530 } 1531 1532 func (s *RegisterParameters) MarshalJSON() ([]byte, error) { 1533 type NoMethod RegisterParameters 1534 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1535 } 1536 1537 // Registration: The `Registration` resource facilitates managing and 1538 // configuring domain name registrations. There are several ways to create a 1539 // new `Registration` resource: To create a new `Registration` resource, find a 1540 // suitable domain name by calling the `SearchDomains` method with a query to 1541 // see available domain name options. After choosing a name, call 1542 // `RetrieveRegisterParameters` to ensure availability and obtain information 1543 // like pricing, which is needed to build a call to `RegisterDomain`. Another 1544 // way to create a new `Registration` is to transfer an existing domain from 1545 // another registrar (Deprecated: For more information, see Cloud Domains 1546 // feature deprecation 1547 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)). 1548 // First, go to the current registrar to unlock the domain for transfer and 1549 // retrieve the domain's transfer authorization code. Then call 1550 // `RetrieveTransferParameters` to confirm that the domain is unlocked and to 1551 // get values needed to build a call to `TransferDomain`. Finally, you can 1552 // create a new `Registration` by importing an existing domain managed with 1553 // Google Domains (https://domains.google/) (Deprecated: For more information, 1554 // see Cloud Domains feature deprecation 1555 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations)). 1556 // First, call `RetrieveImportableDomains` to list domains to which the calling 1557 // user has sufficient access. Then call `ImportDomain` on any domain names you 1558 // want to use with Cloud Domains. 1559 type Registration struct { 1560 // ContactSettings: Required. Settings for contact information linked to the 1561 // `Registration`. You cannot update these with the `UpdateRegistration` 1562 // method. To update these settings, use the `ConfigureContactSettings` method. 1563 ContactSettings *ContactSettings `json:"contactSettings,omitempty"` 1564 // CreateTime: Output only. The creation timestamp of the `Registration` 1565 // resource. 1566 CreateTime string `json:"createTime,omitempty"` 1567 // DnsSettings: Settings controlling the DNS configuration of the 1568 // `Registration`. You cannot update these with the `UpdateRegistration` 1569 // method. To update these settings, use the `ConfigureDnsSettings` method. 1570 DnsSettings *DnsSettings `json:"dnsSettings,omitempty"` 1571 // DomainName: Required. Immutable. The domain name. Unicode domain names must 1572 // be expressed in Punycode format. 1573 DomainName string `json:"domainName,omitempty"` 1574 // ExpireTime: Output only. The expiration timestamp of the `Registration`. 1575 ExpireTime string `json:"expireTime,omitempty"` 1576 // Issues: Output only. The set of issues with the `Registration` that require 1577 // attention. 1578 // 1579 // Possible values: 1580 // "ISSUE_UNSPECIFIED" - The issue is undefined. 1581 // "CONTACT_SUPPORT" - Contact the Cloud Support team to resolve a problem 1582 // with this domain. 1583 // "UNVERIFIED_EMAIL" - [ICANN](https://icann.org/) requires verification of 1584 // the email address in the `Registration`'s 1585 // `contact_settings.registrant_contact` field. To verify the email address, 1586 // follow the instructions in the email the `registrant_contact` receives 1587 // following registration. If you do not complete email verification within 15 1588 // days of registration, the domain is suspended. To resend the verification 1589 // email, call ConfigureContactSettings and provide the current 1590 // `registrant_contact.email`. 1591 // "PROBLEM_WITH_BILLING" - The billing account is not in good standing. The 1592 // domain is not automatically renewed at its expiration time unless you 1593 // resolve problems with your billing account. 1594 Issues []string `json:"issues,omitempty"` 1595 // Labels: Set of labels associated with the `Registration`. 1596 Labels map[string]string `json:"labels,omitempty"` 1597 // ManagementSettings: Settings for management of the `Registration`, including 1598 // renewal, billing, and transfer. You cannot update these with the 1599 // `UpdateRegistration` method. To update these settings, use the 1600 // `ConfigureManagementSettings` method. 1601 ManagementSettings *ManagementSettings `json:"managementSettings,omitempty"` 1602 // Name: Output only. Name of the `Registration` resource, in the format 1603 // `projects/*/locations/*/registrations/`. 1604 Name string `json:"name,omitempty"` 1605 // PendingContactSettings: Output only. Pending contact settings for the 1606 // `Registration`. Updates to the `contact_settings` field that change its 1607 // `registrant_contact` or `privacy` fields require email confirmation by the 1608 // `registrant_contact` before taking effect. This field is set only if there 1609 // are pending updates to the `contact_settings` that have not been confirmed. 1610 // To confirm the changes, the `registrant_contact` must follow the 1611 // instructions in the email they receive. 1612 PendingContactSettings *ContactSettings `json:"pendingContactSettings,omitempty"` 1613 // RegisterFailureReason: Output only. The reason the domain registration 1614 // failed. Only set for domains in REGISTRATION_FAILED state. 1615 // 1616 // Possible values: 1617 // "REGISTER_FAILURE_REASON_UNSPECIFIED" - Register failure unspecified. 1618 // "REGISTER_FAILURE_REASON_UNKNOWN" - Registration failed for an unknown 1619 // reason. 1620 // "DOMAIN_NOT_AVAILABLE" - The domain is not available for registration. 1621 // "INVALID_CONTACTS" - The provided contact information was rejected. 1622 RegisterFailureReason string `json:"registerFailureReason,omitempty"` 1623 // State: Output only. The state of the `Registration` 1624 // 1625 // Possible values: 1626 // "STATE_UNSPECIFIED" - The state is undefined. 1627 // "REGISTRATION_PENDING" - The domain is being registered. 1628 // "REGISTRATION_FAILED" - The domain registration failed. You can delete 1629 // resources in this state to allow registration to be retried. 1630 // "TRANSFER_PENDING" - The domain is being transferred from another 1631 // registrar to Cloud Domains. 1632 // "TRANSFER_FAILED" - The attempt to transfer the domain from another 1633 // registrar to Cloud Domains failed. You can delete resources in this state 1634 // and retry the transfer. 1635 // "IMPORT_PENDING" - The domain is being imported from Google Domains to 1636 // Cloud Domains. 1637 // "ACTIVE" - The domain is registered and operational. The domain renews 1638 // automatically as long as it remains in this state and the `RenewalMethod` is 1639 // set to `AUTOMATIC_RENEWAL`. 1640 // "SUSPENDED" - The domain is suspended and inoperative. For more details, 1641 // see the `issues` field. 1642 // "EXPORTED" - The domain is no longer managed with Cloud Domains. It may 1643 // have been transferred to another registrar or exported for management in 1644 // [Google Domains](https://domains.google/). You can no longer update it with 1645 // this API, and information shown about it may be stale. Domains in this state 1646 // are not automatically renewed by Cloud Domains. 1647 // "EXPIRED" - The domain is expired. 1648 State string `json:"state,omitempty"` 1649 // SupportedPrivacy: Output only. Set of options for the 1650 // `contact_settings.privacy` field that this `Registration` supports. 1651 // 1652 // Possible values: 1653 // "CONTACT_PRIVACY_UNSPECIFIED" - The contact privacy settings are 1654 // undefined. 1655 // "PUBLIC_CONTACT_DATA" - All the data from `ContactSettings` is publicly 1656 // available. When setting this option, you must also provide a 1657 // `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the 1658 // request. 1659 // "PRIVATE_CONTACT_DATA" - Deprecated: For more information, see [Cloud 1660 // Domains feature 1661 // deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre 1662 // cations). None of the data from `ContactSettings` is publicly available. 1663 // Instead, proxy contact data is published for your domain. Email sent to the 1664 // proxy email address is forwarded to the registrant's email address. Cloud 1665 // Domains provides this privacy proxy service at no additional cost. 1666 // "REDACTED_CONTACT_DATA" - The organization name (if provided) and limited 1667 // non-identifying data from `ContactSettings` is available to the public (e.g. 1668 // country and state). The remaining data is marked as `REDACTED FOR PRIVACY` 1669 // in the WHOIS database. The actual information redacted depends on the 1670 // domain. For details, see [the registration privacy 1671 // article](https://support.google.com/domains/answer/3251242). 1672 SupportedPrivacy []string `json:"supportedPrivacy,omitempty"` 1673 // TransferFailureReason: Output only. Deprecated: For more information, see 1674 // Cloud Domains feature deprecation 1675 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations). 1676 // The reason the domain transfer failed. Only set for domains in 1677 // TRANSFER_FAILED state. 1678 // 1679 // Possible values: 1680 // "TRANSFER_FAILURE_REASON_UNSPECIFIED" - Transfer failure unspecified. 1681 // "TRANSFER_FAILURE_REASON_UNKNOWN" - Transfer failed for an unknown reason. 1682 // "EMAIL_CONFIRMATION_FAILURE" - An email confirmation sent to the user was 1683 // rejected or expired. 1684 // "DOMAIN_NOT_REGISTERED" - The domain is available for registration. 1685 // "DOMAIN_HAS_TRANSFER_LOCK" - The domain has a transfer lock with its 1686 // current registrar which must be removed prior to transfer. 1687 // "INVALID_AUTHORIZATION_CODE" - The authorization code entered is not 1688 // valid. 1689 // "TRANSFER_CANCELLED" - The transfer was cancelled by the domain owner, 1690 // current registrar, or TLD registry. 1691 // "TRANSFER_REJECTED" - The transfer was rejected by the current registrar. 1692 // Contact the current registrar for more information. 1693 // "INVALID_REGISTRANT_EMAIL_ADDRESS" - The registrant email address cannot 1694 // be parsed from the domain's current public contact data. 1695 // "DOMAIN_NOT_ELIGIBLE_FOR_TRANSFER" - The domain is not eligible for 1696 // transfer due requirements imposed by the current registrar or TLD registry. 1697 // "TRANSFER_ALREADY_PENDING" - Another transfer is already pending for this 1698 // domain. The existing transfer attempt must expire or be cancelled in order 1699 // to proceed. 1700 TransferFailureReason string `json:"transferFailureReason,omitempty"` 1701 1702 // ServerResponse contains the HTTP response code and headers from the server. 1703 googleapi.ServerResponse `json:"-"` 1704 // ForceSendFields is a list of field names (e.g. "ContactSettings") to 1705 // unconditionally include in API requests. By default, fields with empty or 1706 // default values are omitted from API requests. See 1707 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1708 // details. 1709 ForceSendFields []string `json:"-"` 1710 // NullFields is a list of field names (e.g. "ContactSettings") to include in 1711 // API requests with the JSON null value. By default, fields with empty values 1712 // are omitted from API requests. See 1713 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1714 NullFields []string `json:"-"` 1715 } 1716 1717 func (s *Registration) MarshalJSON() ([]byte, error) { 1718 type NoMethod Registration 1719 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1720 } 1721 1722 // ResetAuthorizationCodeRequest: Request for the `ResetAuthorizationCode` 1723 // method. 1724 type ResetAuthorizationCodeRequest struct { 1725 } 1726 1727 // RetrieveImportableDomainsResponse: Deprecated: For more information, see 1728 // Cloud Domains feature deprecation 1729 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations). 1730 // Response for the `RetrieveImportableDomains` method. 1731 type RetrieveImportableDomainsResponse struct { 1732 // Domains: A list of domains that the calling user manages in Google Domains. 1733 Domains []*Domain `json:"domains,omitempty"` 1734 // NextPageToken: When present, there are more results to retrieve. Set 1735 // `page_token` to this value on a subsequent call to get the next page of 1736 // results. 1737 NextPageToken string `json:"nextPageToken,omitempty"` 1738 1739 // ServerResponse contains the HTTP response code and headers from the server. 1740 googleapi.ServerResponse `json:"-"` 1741 // ForceSendFields is a list of field names (e.g. "Domains") to unconditionally 1742 // include in API requests. By default, fields with empty or default values are 1743 // omitted from API requests. See 1744 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1745 // details. 1746 ForceSendFields []string `json:"-"` 1747 // NullFields is a list of field names (e.g. "Domains") to include in API 1748 // requests with the JSON null value. By default, fields with empty values are 1749 // omitted from API requests. See 1750 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1751 NullFields []string `json:"-"` 1752 } 1753 1754 func (s *RetrieveImportableDomainsResponse) MarshalJSON() ([]byte, error) { 1755 type NoMethod RetrieveImportableDomainsResponse 1756 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1757 } 1758 1759 // RetrieveRegisterParametersResponse: Response for the 1760 // `RetrieveRegisterParameters` method. 1761 type RetrieveRegisterParametersResponse struct { 1762 // RegisterParameters: Parameters to use when calling the `RegisterDomain` 1763 // method. 1764 RegisterParameters *RegisterParameters `json:"registerParameters,omitempty"` 1765 1766 // ServerResponse contains the HTTP response code and headers from the server. 1767 googleapi.ServerResponse `json:"-"` 1768 // ForceSendFields is a list of field names (e.g. "RegisterParameters") to 1769 // unconditionally include in API requests. By default, fields with empty or 1770 // default values are omitted from API requests. See 1771 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1772 // details. 1773 ForceSendFields []string `json:"-"` 1774 // NullFields is a list of field names (e.g. "RegisterParameters") to include 1775 // in API requests with the JSON null value. By default, fields with empty 1776 // values are omitted from API requests. See 1777 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1778 NullFields []string `json:"-"` 1779 } 1780 1781 func (s *RetrieveRegisterParametersResponse) MarshalJSON() ([]byte, error) { 1782 type NoMethod RetrieveRegisterParametersResponse 1783 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1784 } 1785 1786 // RetrieveTransferParametersResponse: Deprecated: For more information, see 1787 // Cloud Domains feature deprecation 1788 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations). 1789 // Response for the `RetrieveTransferParameters` method. 1790 type RetrieveTransferParametersResponse struct { 1791 // TransferParameters: Parameters to use when calling the `TransferDomain` 1792 // method. 1793 TransferParameters *TransferParameters `json:"transferParameters,omitempty"` 1794 1795 // ServerResponse contains the HTTP response code and headers from the server. 1796 googleapi.ServerResponse `json:"-"` 1797 // ForceSendFields is a list of field names (e.g. "TransferParameters") to 1798 // unconditionally include in API requests. By default, fields with empty or 1799 // default values are omitted from API requests. See 1800 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1801 // details. 1802 ForceSendFields []string `json:"-"` 1803 // NullFields is a list of field names (e.g. "TransferParameters") to include 1804 // in API requests with the JSON null value. By default, fields with empty 1805 // values are omitted from API requests. See 1806 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1807 NullFields []string `json:"-"` 1808 } 1809 1810 func (s *RetrieveTransferParametersResponse) MarshalJSON() ([]byte, error) { 1811 type NoMethod RetrieveTransferParametersResponse 1812 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1813 } 1814 1815 // SearchDomainsResponse: Response for the `SearchDomains` method. 1816 type SearchDomainsResponse struct { 1817 // RegisterParameters: Results of the domain name search. 1818 RegisterParameters []*RegisterParameters `json:"registerParameters,omitempty"` 1819 1820 // ServerResponse contains the HTTP response code and headers from the server. 1821 googleapi.ServerResponse `json:"-"` 1822 // ForceSendFields is a list of field names (e.g. "RegisterParameters") to 1823 // unconditionally include in API requests. By default, fields with empty or 1824 // default values are omitted from API requests. See 1825 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1826 // details. 1827 ForceSendFields []string `json:"-"` 1828 // NullFields is a list of field names (e.g. "RegisterParameters") to include 1829 // in API requests with the JSON null value. By default, fields with empty 1830 // values are omitted from API requests. See 1831 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1832 NullFields []string `json:"-"` 1833 } 1834 1835 func (s *SearchDomainsResponse) MarshalJSON() ([]byte, error) { 1836 type NoMethod SearchDomainsResponse 1837 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1838 } 1839 1840 // SetIamPolicyRequest: Request message for `SetIamPolicy` method. 1841 type SetIamPolicyRequest struct { 1842 // Policy: REQUIRED: The complete policy to be applied to the `resource`. The 1843 // size of the policy is limited to a few 10s of KB. An empty policy is a valid 1844 // policy but certain Google Cloud services (such as Projects) might reject 1845 // them. 1846 Policy *Policy `json:"policy,omitempty"` 1847 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to 1848 // modify. Only the fields in the mask will be modified. If no mask is 1849 // provided, the following default mask is used: `paths: "bindings, etag" 1850 UpdateMask string `json:"updateMask,omitempty"` 1851 // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally 1852 // include in API requests. By default, fields with empty or default values are 1853 // omitted from API requests. See 1854 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1855 // details. 1856 ForceSendFields []string `json:"-"` 1857 // NullFields is a list of field names (e.g. "Policy") to include in API 1858 // requests with the JSON null value. By default, fields with empty values are 1859 // omitted from API requests. See 1860 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1861 NullFields []string `json:"-"` 1862 } 1863 1864 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 1865 type NoMethod SetIamPolicyRequest 1866 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1867 } 1868 1869 // Status: The `Status` type defines a logical error model that is suitable for 1870 // different programming environments, including REST APIs and RPC APIs. It is 1871 // used by gRPC (https://github.com/grpc). Each `Status` message contains three 1872 // pieces of data: error code, error message, and error details. You can find 1873 // out more about this error model and how to work with it in the API Design 1874 // Guide (https://cloud.google.com/apis/design/errors). 1875 type Status struct { 1876 // Code: The status code, which should be an enum value of google.rpc.Code. 1877 Code int64 `json:"code,omitempty"` 1878 // Details: A list of messages that carry the error details. There is a common 1879 // set of message types for APIs to use. 1880 Details []googleapi.RawMessage `json:"details,omitempty"` 1881 // Message: A developer-facing error message, which should be in English. Any 1882 // user-facing error message should be localized and sent in the 1883 // google.rpc.Status.details field, or localized by the client. 1884 Message string `json:"message,omitempty"` 1885 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 1886 // include in API requests. By default, fields with empty or default values are 1887 // omitted from API requests. See 1888 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1889 // details. 1890 ForceSendFields []string `json:"-"` 1891 // NullFields is a list of field names (e.g. "Code") to include in API requests 1892 // with the JSON null value. By default, fields with empty values are omitted 1893 // from API requests. See 1894 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1895 NullFields []string `json:"-"` 1896 } 1897 1898 func (s *Status) MarshalJSON() ([]byte, error) { 1899 type NoMethod Status 1900 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1901 } 1902 1903 // TestIamPermissionsRequest: Request message for `TestIamPermissions` method. 1904 type TestIamPermissionsRequest struct { 1905 // Permissions: The set of permissions to check for the `resource`. Permissions 1906 // with wildcards (such as `*` or `storage.*`) are not allowed. For more 1907 // information see IAM Overview 1908 // (https://cloud.google.com/iam/docs/overview#permissions). 1909 Permissions []string `json:"permissions,omitempty"` 1910 // ForceSendFields is a list of field names (e.g. "Permissions") to 1911 // unconditionally include in API requests. By default, fields with empty or 1912 // default values are omitted from API requests. See 1913 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1914 // details. 1915 ForceSendFields []string `json:"-"` 1916 // NullFields is a list of field names (e.g. "Permissions") to include in API 1917 // requests with the JSON null value. By default, fields with empty values are 1918 // omitted from API requests. See 1919 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1920 NullFields []string `json:"-"` 1921 } 1922 1923 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 1924 type NoMethod TestIamPermissionsRequest 1925 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1926 } 1927 1928 // TestIamPermissionsResponse: Response message for `TestIamPermissions` 1929 // method. 1930 type TestIamPermissionsResponse struct { 1931 // Permissions: A subset of `TestPermissionsRequest.permissions` that the 1932 // caller is allowed. 1933 Permissions []string `json:"permissions,omitempty"` 1934 1935 // ServerResponse contains the HTTP response code and headers from the server. 1936 googleapi.ServerResponse `json:"-"` 1937 // ForceSendFields is a list of field names (e.g. "Permissions") to 1938 // unconditionally include in API requests. By default, fields with empty or 1939 // default values are omitted from API requests. See 1940 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1941 // details. 1942 ForceSendFields []string `json:"-"` 1943 // NullFields is a list of field names (e.g. "Permissions") to include in API 1944 // requests with the JSON null value. By default, fields with empty values are 1945 // omitted from API requests. See 1946 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1947 NullFields []string `json:"-"` 1948 } 1949 1950 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 1951 type NoMethod TestIamPermissionsResponse 1952 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1953 } 1954 1955 // TransferDomainRequest: Deprecated: For more information, see Cloud Domains 1956 // feature deprecation 1957 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations). 1958 // Request for the `TransferDomain` method. 1959 type TransferDomainRequest struct { 1960 // AuthorizationCode: The domain's transfer authorization code. You can obtain 1961 // this from the domain's current registrar. 1962 AuthorizationCode *AuthorizationCode `json:"authorizationCode,omitempty"` 1963 // ContactNotices: The list of contact notices that you acknowledge. The 1964 // notices needed here depend on the values specified in 1965 // `registration.contact_settings`. 1966 // 1967 // Possible values: 1968 // "CONTACT_NOTICE_UNSPECIFIED" - The notice is undefined. 1969 // "PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT" - Required when setting the 1970 // `privacy` field of `ContactSettings` to `PUBLIC_CONTACT_DATA`, which exposes 1971 // contact data publicly. 1972 ContactNotices []string `json:"contactNotices,omitempty"` 1973 // Registration: Required. The complete `Registration` resource to be created. 1974 // You can leave `registration.dns_settings` unset to import the domain's 1975 // current DNS configuration from its current registrar. Use this option only 1976 // if you are sure that the domain's current DNS service does not cease upon 1977 // transfer, as is often the case for DNS services provided for free by the 1978 // registrar. 1979 Registration *Registration `json:"registration,omitempty"` 1980 // ValidateOnly: Validate the request without actually transferring the domain. 1981 ValidateOnly bool `json:"validateOnly,omitempty"` 1982 // YearlyPrice: Required. Acknowledgement of the price to transfer or renew the 1983 // domain for one year. Call `RetrieveTransferParameters` to obtain the price, 1984 // which you must acknowledge. 1985 YearlyPrice *Money `json:"yearlyPrice,omitempty"` 1986 // ForceSendFields is a list of field names (e.g. "AuthorizationCode") to 1987 // unconditionally include in API requests. By default, fields with empty or 1988 // default values are omitted from API requests. See 1989 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1990 // details. 1991 ForceSendFields []string `json:"-"` 1992 // NullFields is a list of field names (e.g. "AuthorizationCode") to include in 1993 // API requests with the JSON null value. By default, fields with empty values 1994 // are omitted from API requests. See 1995 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1996 NullFields []string `json:"-"` 1997 } 1998 1999 func (s *TransferDomainRequest) MarshalJSON() ([]byte, error) { 2000 type NoMethod TransferDomainRequest 2001 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2002 } 2003 2004 // TransferParameters: Deprecated: For more information, see Cloud Domains 2005 // feature deprecation 2006 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations). 2007 // Parameters required to transfer a domain from another registrar. 2008 type TransferParameters struct { 2009 // CurrentRegistrar: The registrar that currently manages the domain. 2010 CurrentRegistrar string `json:"currentRegistrar,omitempty"` 2011 // CurrentRegistrarUri: The URL of the registrar that currently manages the 2012 // domain. 2013 CurrentRegistrarUri string `json:"currentRegistrarUri,omitempty"` 2014 // DomainName: The domain name. Unicode domain names are expressed in Punycode 2015 // format. 2016 DomainName string `json:"domainName,omitempty"` 2017 // NameServers: The name servers that currently store the configuration of the 2018 // domain. 2019 NameServers []string `json:"nameServers,omitempty"` 2020 // SupportedPrivacy: Contact privacy options that the domain supports. 2021 // 2022 // Possible values: 2023 // "CONTACT_PRIVACY_UNSPECIFIED" - The contact privacy settings are 2024 // undefined. 2025 // "PUBLIC_CONTACT_DATA" - All the data from `ContactSettings` is publicly 2026 // available. When setting this option, you must also provide a 2027 // `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the 2028 // request. 2029 // "PRIVATE_CONTACT_DATA" - Deprecated: For more information, see [Cloud 2030 // Domains feature 2031 // deprecation](https://cloud.google.com/domains/docs/deprecations/feature-depre 2032 // cations). None of the data from `ContactSettings` is publicly available. 2033 // Instead, proxy contact data is published for your domain. Email sent to the 2034 // proxy email address is forwarded to the registrant's email address. Cloud 2035 // Domains provides this privacy proxy service at no additional cost. 2036 // "REDACTED_CONTACT_DATA" - The organization name (if provided) and limited 2037 // non-identifying data from `ContactSettings` is available to the public (e.g. 2038 // country and state). The remaining data is marked as `REDACTED FOR PRIVACY` 2039 // in the WHOIS database. The actual information redacted depends on the 2040 // domain. For details, see [the registration privacy 2041 // article](https://support.google.com/domains/answer/3251242). 2042 SupportedPrivacy []string `json:"supportedPrivacy,omitempty"` 2043 // TransferLockState: Indicates whether the domain is protected by a transfer 2044 // lock. For a transfer to succeed, this must show `UNLOCKED`. To unlock a 2045 // domain, go to its current registrar. 2046 // 2047 // Possible values: 2048 // "TRANSFER_LOCK_STATE_UNSPECIFIED" - The state is unspecified. 2049 // "UNLOCKED" - The domain is unlocked and can be transferred to another 2050 // registrar. 2051 // "LOCKED" - The domain is locked and cannot be transferred to another 2052 // registrar. 2053 TransferLockState string `json:"transferLockState,omitempty"` 2054 // YearlyPrice: Price to transfer or renew the domain for one year. 2055 YearlyPrice *Money `json:"yearlyPrice,omitempty"` 2056 // ForceSendFields is a list of field names (e.g. "CurrentRegistrar") to 2057 // unconditionally include in API requests. By default, fields with empty or 2058 // default values are omitted from API requests. See 2059 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2060 // details. 2061 ForceSendFields []string `json:"-"` 2062 // NullFields is a list of field names (e.g. "CurrentRegistrar") to include in 2063 // API requests with the JSON null value. By default, fields with empty values 2064 // are omitted from API requests. See 2065 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2066 NullFields []string `json:"-"` 2067 } 2068 2069 func (s *TransferParameters) MarshalJSON() ([]byte, error) { 2070 type NoMethod TransferParameters 2071 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2072 } 2073 2074 type ProjectsLocationsGetCall struct { 2075 s *Service 2076 name string 2077 urlParams_ gensupport.URLParams 2078 ifNoneMatch_ string 2079 ctx_ context.Context 2080 header_ http.Header 2081 } 2082 2083 // Get: Gets information about a location. 2084 // 2085 // - name: Resource name for the location. 2086 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { 2087 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2088 c.name = name 2089 return c 2090 } 2091 2092 // Fields allows partial responses to be retrieved. See 2093 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2094 // details. 2095 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { 2096 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2097 return c 2098 } 2099 2100 // IfNoneMatch sets an optional parameter which makes the operation fail if the 2101 // object's ETag matches the given value. This is useful for getting updates 2102 // only after the object has changed since the last request. 2103 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { 2104 c.ifNoneMatch_ = entityTag 2105 return c 2106 } 2107 2108 // Context sets the context to be used in this call's Do method. 2109 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { 2110 c.ctx_ = ctx 2111 return c 2112 } 2113 2114 // Header returns a http.Header that can be modified by the caller to add 2115 // headers to the request. 2116 func (c *ProjectsLocationsGetCall) Header() http.Header { 2117 if c.header_ == nil { 2118 c.header_ = make(http.Header) 2119 } 2120 return c.header_ 2121 } 2122 2123 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { 2124 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 2125 if c.ifNoneMatch_ != "" { 2126 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2127 } 2128 var body io.Reader = nil 2129 c.urlParams_.Set("alt", alt) 2130 c.urlParams_.Set("prettyPrint", "false") 2131 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 2132 urls += "?" + c.urlParams_.Encode() 2133 req, err := http.NewRequest("GET", urls, body) 2134 if err != nil { 2135 return nil, err 2136 } 2137 req.Header = reqHeaders 2138 googleapi.Expand(req.URL, map[string]string{ 2139 "name": c.name, 2140 }) 2141 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2142 } 2143 2144 // Do executes the "domains.projects.locations.get" call. 2145 // Any non-2xx status code is an error. Response headers are in either 2146 // *Location.ServerResponse.Header or (if a response was returned at all) in 2147 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2148 // whether the returned error was because http.StatusNotModified was returned. 2149 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { 2150 gensupport.SetOptions(c.urlParams_, opts...) 2151 res, err := c.doRequest("json") 2152 if res != nil && res.StatusCode == http.StatusNotModified { 2153 if res.Body != nil { 2154 res.Body.Close() 2155 } 2156 return nil, gensupport.WrapError(&googleapi.Error{ 2157 Code: res.StatusCode, 2158 Header: res.Header, 2159 }) 2160 } 2161 if err != nil { 2162 return nil, err 2163 } 2164 defer googleapi.CloseBody(res) 2165 if err := googleapi.CheckResponse(res); err != nil { 2166 return nil, gensupport.WrapError(err) 2167 } 2168 ret := &Location{ 2169 ServerResponse: googleapi.ServerResponse{ 2170 Header: res.Header, 2171 HTTPStatusCode: res.StatusCode, 2172 }, 2173 } 2174 target := &ret 2175 if err := gensupport.DecodeResponse(target, res); err != nil { 2176 return nil, err 2177 } 2178 return ret, nil 2179 } 2180 2181 type ProjectsLocationsListCall struct { 2182 s *Service 2183 name string 2184 urlParams_ gensupport.URLParams 2185 ifNoneMatch_ string 2186 ctx_ context.Context 2187 header_ http.Header 2188 } 2189 2190 // List: Lists information about the supported locations for this service. 2191 // 2192 // - name: The resource that owns the locations collection, if applicable. 2193 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { 2194 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2195 c.name = name 2196 return c 2197 } 2198 2199 // Filter sets the optional parameter "filter": A filter to narrow down results 2200 // to a preferred subset. The filtering language accepts strings like 2201 // "displayName=tokyo", and is documented in more detail in AIP-160 2202 // (https://google.aip.dev/160). 2203 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { 2204 c.urlParams_.Set("filter", filter) 2205 return c 2206 } 2207 2208 // PageSize sets the optional parameter "pageSize": The maximum number of 2209 // results to return. If not set, the service selects a default. 2210 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { 2211 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 2212 return c 2213 } 2214 2215 // PageToken sets the optional parameter "pageToken": A page token received 2216 // from the `next_page_token` field in the response. Send that page token to 2217 // receive the subsequent page. 2218 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { 2219 c.urlParams_.Set("pageToken", pageToken) 2220 return c 2221 } 2222 2223 // Fields allows partial responses to be retrieved. See 2224 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2225 // details. 2226 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 2227 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2228 return c 2229 } 2230 2231 // IfNoneMatch sets an optional parameter which makes the operation fail if the 2232 // object's ETag matches the given value. This is useful for getting updates 2233 // only after the object has changed since the last request. 2234 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { 2235 c.ifNoneMatch_ = entityTag 2236 return c 2237 } 2238 2239 // Context sets the context to be used in this call's Do method. 2240 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 2241 c.ctx_ = ctx 2242 return c 2243 } 2244 2245 // Header returns a http.Header that can be modified by the caller to add 2246 // headers to the request. 2247 func (c *ProjectsLocationsListCall) Header() http.Header { 2248 if c.header_ == nil { 2249 c.header_ = make(http.Header) 2250 } 2251 return c.header_ 2252 } 2253 2254 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { 2255 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 2256 if c.ifNoneMatch_ != "" { 2257 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2258 } 2259 var body io.Reader = nil 2260 c.urlParams_.Set("alt", alt) 2261 c.urlParams_.Set("prettyPrint", "false") 2262 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") 2263 urls += "?" + c.urlParams_.Encode() 2264 req, err := http.NewRequest("GET", urls, body) 2265 if err != nil { 2266 return nil, err 2267 } 2268 req.Header = reqHeaders 2269 googleapi.Expand(req.URL, map[string]string{ 2270 "name": c.name, 2271 }) 2272 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2273 } 2274 2275 // Do executes the "domains.projects.locations.list" call. 2276 // Any non-2xx status code is an error. Response headers are in either 2277 // *ListLocationsResponse.ServerResponse.Header or (if a response was returned 2278 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 2279 // check whether the returned error was because http.StatusNotModified was 2280 // returned. 2281 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 2282 gensupport.SetOptions(c.urlParams_, opts...) 2283 res, err := c.doRequest("json") 2284 if res != nil && res.StatusCode == http.StatusNotModified { 2285 if res.Body != nil { 2286 res.Body.Close() 2287 } 2288 return nil, gensupport.WrapError(&googleapi.Error{ 2289 Code: res.StatusCode, 2290 Header: res.Header, 2291 }) 2292 } 2293 if err != nil { 2294 return nil, err 2295 } 2296 defer googleapi.CloseBody(res) 2297 if err := googleapi.CheckResponse(res); err != nil { 2298 return nil, gensupport.WrapError(err) 2299 } 2300 ret := &ListLocationsResponse{ 2301 ServerResponse: googleapi.ServerResponse{ 2302 Header: res.Header, 2303 HTTPStatusCode: res.StatusCode, 2304 }, 2305 } 2306 target := &ret 2307 if err := gensupport.DecodeResponse(target, res); err != nil { 2308 return nil, err 2309 } 2310 return ret, nil 2311 } 2312 2313 // Pages invokes f for each page of results. 2314 // A non-nil error returned from f will halt the iteration. 2315 // The provided context supersedes any context provided to the Context method. 2316 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { 2317 c.ctx_ = ctx 2318 defer c.PageToken(c.urlParams_.Get("pageToken")) 2319 for { 2320 x, err := c.Do() 2321 if err != nil { 2322 return err 2323 } 2324 if err := f(x); err != nil { 2325 return err 2326 } 2327 if x.NextPageToken == "" { 2328 return nil 2329 } 2330 c.PageToken(x.NextPageToken) 2331 } 2332 } 2333 2334 type ProjectsLocationsOperationsGetCall struct { 2335 s *Service 2336 name string 2337 urlParams_ gensupport.URLParams 2338 ifNoneMatch_ string 2339 ctx_ context.Context 2340 header_ http.Header 2341 } 2342 2343 // Get: Gets the latest state of a long-running operation. Clients can use this 2344 // method to poll the operation result at intervals as recommended by the API 2345 // service. 2346 // 2347 // - name: The name of the operation resource. 2348 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { 2349 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2350 c.name = name 2351 return c 2352 } 2353 2354 // Fields allows partial responses to be retrieved. See 2355 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2356 // details. 2357 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { 2358 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2359 return c 2360 } 2361 2362 // IfNoneMatch sets an optional parameter which makes the operation fail if the 2363 // object's ETag matches the given value. This is useful for getting updates 2364 // only after the object has changed since the last request. 2365 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { 2366 c.ifNoneMatch_ = entityTag 2367 return c 2368 } 2369 2370 // Context sets the context to be used in this call's Do method. 2371 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { 2372 c.ctx_ = ctx 2373 return c 2374 } 2375 2376 // Header returns a http.Header that can be modified by the caller to add 2377 // headers to the request. 2378 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { 2379 if c.header_ == nil { 2380 c.header_ = make(http.Header) 2381 } 2382 return c.header_ 2383 } 2384 2385 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 2386 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 2387 if c.ifNoneMatch_ != "" { 2388 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2389 } 2390 var body io.Reader = nil 2391 c.urlParams_.Set("alt", alt) 2392 c.urlParams_.Set("prettyPrint", "false") 2393 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 2394 urls += "?" + c.urlParams_.Encode() 2395 req, err := http.NewRequest("GET", urls, body) 2396 if err != nil { 2397 return nil, err 2398 } 2399 req.Header = reqHeaders 2400 googleapi.Expand(req.URL, map[string]string{ 2401 "name": c.name, 2402 }) 2403 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2404 } 2405 2406 // Do executes the "domains.projects.locations.operations.get" call. 2407 // Any non-2xx status code is an error. Response headers are in either 2408 // *Operation.ServerResponse.Header or (if a response was returned at all) in 2409 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2410 // whether the returned error was because http.StatusNotModified was returned. 2411 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 2412 gensupport.SetOptions(c.urlParams_, opts...) 2413 res, err := c.doRequest("json") 2414 if res != nil && res.StatusCode == http.StatusNotModified { 2415 if res.Body != nil { 2416 res.Body.Close() 2417 } 2418 return nil, gensupport.WrapError(&googleapi.Error{ 2419 Code: res.StatusCode, 2420 Header: res.Header, 2421 }) 2422 } 2423 if err != nil { 2424 return nil, err 2425 } 2426 defer googleapi.CloseBody(res) 2427 if err := googleapi.CheckResponse(res); err != nil { 2428 return nil, gensupport.WrapError(err) 2429 } 2430 ret := &Operation{ 2431 ServerResponse: googleapi.ServerResponse{ 2432 Header: res.Header, 2433 HTTPStatusCode: res.StatusCode, 2434 }, 2435 } 2436 target := &ret 2437 if err := gensupport.DecodeResponse(target, res); err != nil { 2438 return nil, err 2439 } 2440 return ret, nil 2441 } 2442 2443 type ProjectsLocationsOperationsListCall struct { 2444 s *Service 2445 name string 2446 urlParams_ gensupport.URLParams 2447 ifNoneMatch_ string 2448 ctx_ context.Context 2449 header_ http.Header 2450 } 2451 2452 // List: Lists operations that match the specified filter in the request. If 2453 // the server doesn't support this method, it returns `UNIMPLEMENTED`. 2454 // 2455 // - name: The name of the operation's parent resource. 2456 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { 2457 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2458 c.name = name 2459 return c 2460 } 2461 2462 // Filter sets the optional parameter "filter": The standard list filter. 2463 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { 2464 c.urlParams_.Set("filter", filter) 2465 return c 2466 } 2467 2468 // PageSize sets the optional parameter "pageSize": The standard list page 2469 // size. 2470 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { 2471 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 2472 return c 2473 } 2474 2475 // PageToken sets the optional parameter "pageToken": The standard list page 2476 // token. 2477 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { 2478 c.urlParams_.Set("pageToken", pageToken) 2479 return c 2480 } 2481 2482 // Fields allows partial responses to be retrieved. See 2483 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2484 // details. 2485 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { 2486 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2487 return c 2488 } 2489 2490 // IfNoneMatch sets an optional parameter which makes the operation fail if the 2491 // object's ETag matches the given value. This is useful for getting updates 2492 // only after the object has changed since the last request. 2493 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { 2494 c.ifNoneMatch_ = entityTag 2495 return c 2496 } 2497 2498 // Context sets the context to be used in this call's Do method. 2499 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { 2500 c.ctx_ = ctx 2501 return c 2502 } 2503 2504 // Header returns a http.Header that can be modified by the caller to add 2505 // headers to the request. 2506 func (c *ProjectsLocationsOperationsListCall) Header() http.Header { 2507 if c.header_ == nil { 2508 c.header_ = make(http.Header) 2509 } 2510 return c.header_ 2511 } 2512 2513 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { 2514 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 2515 if c.ifNoneMatch_ != "" { 2516 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2517 } 2518 var body io.Reader = nil 2519 c.urlParams_.Set("alt", alt) 2520 c.urlParams_.Set("prettyPrint", "false") 2521 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") 2522 urls += "?" + c.urlParams_.Encode() 2523 req, err := http.NewRequest("GET", urls, body) 2524 if err != nil { 2525 return nil, err 2526 } 2527 req.Header = reqHeaders 2528 googleapi.Expand(req.URL, map[string]string{ 2529 "name": c.name, 2530 }) 2531 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2532 } 2533 2534 // Do executes the "domains.projects.locations.operations.list" call. 2535 // Any non-2xx status code is an error. Response headers are in either 2536 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned 2537 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 2538 // check whether the returned error was because http.StatusNotModified was 2539 // returned. 2540 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 2541 gensupport.SetOptions(c.urlParams_, opts...) 2542 res, err := c.doRequest("json") 2543 if res != nil && res.StatusCode == http.StatusNotModified { 2544 if res.Body != nil { 2545 res.Body.Close() 2546 } 2547 return nil, gensupport.WrapError(&googleapi.Error{ 2548 Code: res.StatusCode, 2549 Header: res.Header, 2550 }) 2551 } 2552 if err != nil { 2553 return nil, err 2554 } 2555 defer googleapi.CloseBody(res) 2556 if err := googleapi.CheckResponse(res); err != nil { 2557 return nil, gensupport.WrapError(err) 2558 } 2559 ret := &ListOperationsResponse{ 2560 ServerResponse: googleapi.ServerResponse{ 2561 Header: res.Header, 2562 HTTPStatusCode: res.StatusCode, 2563 }, 2564 } 2565 target := &ret 2566 if err := gensupport.DecodeResponse(target, res); err != nil { 2567 return nil, err 2568 } 2569 return ret, nil 2570 } 2571 2572 // Pages invokes f for each page of results. 2573 // A non-nil error returned from f will halt the iteration. 2574 // The provided context supersedes any context provided to the Context method. 2575 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 2576 c.ctx_ = ctx 2577 defer c.PageToken(c.urlParams_.Get("pageToken")) 2578 for { 2579 x, err := c.Do() 2580 if err != nil { 2581 return err 2582 } 2583 if err := f(x); err != nil { 2584 return err 2585 } 2586 if x.NextPageToken == "" { 2587 return nil 2588 } 2589 c.PageToken(x.NextPageToken) 2590 } 2591 } 2592 2593 type ProjectsLocationsRegistrationsConfigureContactSettingsCall struct { 2594 s *Service 2595 registration string 2596 configurecontactsettingsrequest *ConfigureContactSettingsRequest 2597 urlParams_ gensupport.URLParams 2598 ctx_ context.Context 2599 header_ http.Header 2600 } 2601 2602 // ConfigureContactSettings: Updates a `Registration`'s contact settings. Some 2603 // changes require confirmation by the domain's registrant contact . Caution: 2604 // Please consider carefully any changes to contact privacy settings when 2605 // changing from `REDACTED_CONTACT_DATA` to `PUBLIC_CONTACT_DATA.` There may be 2606 // a delay in reflecting updates you make to registrant contact information 2607 // such that any changes you make to contact privacy (including from 2608 // `REDACTED_CONTACT_DATA` to `PUBLIC_CONTACT_DATA`) will be applied without 2609 // delay but changes to registrant contact information may take a limited time 2610 // to be publicized. This means that changes to contact privacy from 2611 // `REDACTED_CONTACT_DATA` to `PUBLIC_CONTACT_DATA` may make the previous 2612 // registrant contact data public until the modified registrant contact details 2613 // are published. 2614 // 2615 // - registration: The name of the `Registration` whose contact settings are 2616 // being updated, in the format `projects/*/locations/*/registrations/*`. 2617 func (r *ProjectsLocationsRegistrationsService) ConfigureContactSettings(registration string, configurecontactsettingsrequest *ConfigureContactSettingsRequest) *ProjectsLocationsRegistrationsConfigureContactSettingsCall { 2618 c := &ProjectsLocationsRegistrationsConfigureContactSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2619 c.registration = registration 2620 c.configurecontactsettingsrequest = configurecontactsettingsrequest 2621 return c 2622 } 2623 2624 // Fields allows partial responses to be retrieved. See 2625 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2626 // details. 2627 func (c *ProjectsLocationsRegistrationsConfigureContactSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsConfigureContactSettingsCall { 2628 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2629 return c 2630 } 2631 2632 // Context sets the context to be used in this call's Do method. 2633 func (c *ProjectsLocationsRegistrationsConfigureContactSettingsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsConfigureContactSettingsCall { 2634 c.ctx_ = ctx 2635 return c 2636 } 2637 2638 // Header returns a http.Header that can be modified by the caller to add 2639 // headers to the request. 2640 func (c *ProjectsLocationsRegistrationsConfigureContactSettingsCall) Header() http.Header { 2641 if c.header_ == nil { 2642 c.header_ = make(http.Header) 2643 } 2644 return c.header_ 2645 } 2646 2647 func (c *ProjectsLocationsRegistrationsConfigureContactSettingsCall) doRequest(alt string) (*http.Response, error) { 2648 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 2649 var body io.Reader = nil 2650 body, err := googleapi.WithoutDataWrapper.JSONReader(c.configurecontactsettingsrequest) 2651 if err != nil { 2652 return nil, err 2653 } 2654 c.urlParams_.Set("alt", alt) 2655 c.urlParams_.Set("prettyPrint", "false") 2656 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+registration}:configureContactSettings") 2657 urls += "?" + c.urlParams_.Encode() 2658 req, err := http.NewRequest("POST", urls, body) 2659 if err != nil { 2660 return nil, err 2661 } 2662 req.Header = reqHeaders 2663 googleapi.Expand(req.URL, map[string]string{ 2664 "registration": c.registration, 2665 }) 2666 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2667 } 2668 2669 // Do executes the "domains.projects.locations.registrations.configureContactSettings" call. 2670 // Any non-2xx status code is an error. Response headers are in either 2671 // *Operation.ServerResponse.Header or (if a response was returned at all) in 2672 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2673 // whether the returned error was because http.StatusNotModified was returned. 2674 func (c *ProjectsLocationsRegistrationsConfigureContactSettingsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 2675 gensupport.SetOptions(c.urlParams_, opts...) 2676 res, err := c.doRequest("json") 2677 if res != nil && res.StatusCode == http.StatusNotModified { 2678 if res.Body != nil { 2679 res.Body.Close() 2680 } 2681 return nil, gensupport.WrapError(&googleapi.Error{ 2682 Code: res.StatusCode, 2683 Header: res.Header, 2684 }) 2685 } 2686 if err != nil { 2687 return nil, err 2688 } 2689 defer googleapi.CloseBody(res) 2690 if err := googleapi.CheckResponse(res); err != nil { 2691 return nil, gensupport.WrapError(err) 2692 } 2693 ret := &Operation{ 2694 ServerResponse: googleapi.ServerResponse{ 2695 Header: res.Header, 2696 HTTPStatusCode: res.StatusCode, 2697 }, 2698 } 2699 target := &ret 2700 if err := gensupport.DecodeResponse(target, res); err != nil { 2701 return nil, err 2702 } 2703 return ret, nil 2704 } 2705 2706 type ProjectsLocationsRegistrationsConfigureDnsSettingsCall struct { 2707 s *Service 2708 registration string 2709 configurednssettingsrequest *ConfigureDnsSettingsRequest 2710 urlParams_ gensupport.URLParams 2711 ctx_ context.Context 2712 header_ http.Header 2713 } 2714 2715 // ConfigureDnsSettings: Updates a `Registration`'s DNS settings. 2716 // 2717 // - registration: The name of the `Registration` whose DNS settings are being 2718 // updated, in the format `projects/*/locations/*/registrations/*`. 2719 func (r *ProjectsLocationsRegistrationsService) ConfigureDnsSettings(registration string, configurednssettingsrequest *ConfigureDnsSettingsRequest) *ProjectsLocationsRegistrationsConfigureDnsSettingsCall { 2720 c := &ProjectsLocationsRegistrationsConfigureDnsSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2721 c.registration = registration 2722 c.configurednssettingsrequest = configurednssettingsrequest 2723 return c 2724 } 2725 2726 // Fields allows partial responses to be retrieved. See 2727 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2728 // details. 2729 func (c *ProjectsLocationsRegistrationsConfigureDnsSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsConfigureDnsSettingsCall { 2730 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2731 return c 2732 } 2733 2734 // Context sets the context to be used in this call's Do method. 2735 func (c *ProjectsLocationsRegistrationsConfigureDnsSettingsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsConfigureDnsSettingsCall { 2736 c.ctx_ = ctx 2737 return c 2738 } 2739 2740 // Header returns a http.Header that can be modified by the caller to add 2741 // headers to the request. 2742 func (c *ProjectsLocationsRegistrationsConfigureDnsSettingsCall) Header() http.Header { 2743 if c.header_ == nil { 2744 c.header_ = make(http.Header) 2745 } 2746 return c.header_ 2747 } 2748 2749 func (c *ProjectsLocationsRegistrationsConfigureDnsSettingsCall) doRequest(alt string) (*http.Response, error) { 2750 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 2751 var body io.Reader = nil 2752 body, err := googleapi.WithoutDataWrapper.JSONReader(c.configurednssettingsrequest) 2753 if err != nil { 2754 return nil, err 2755 } 2756 c.urlParams_.Set("alt", alt) 2757 c.urlParams_.Set("prettyPrint", "false") 2758 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+registration}:configureDnsSettings") 2759 urls += "?" + c.urlParams_.Encode() 2760 req, err := http.NewRequest("POST", urls, body) 2761 if err != nil { 2762 return nil, err 2763 } 2764 req.Header = reqHeaders 2765 googleapi.Expand(req.URL, map[string]string{ 2766 "registration": c.registration, 2767 }) 2768 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2769 } 2770 2771 // Do executes the "domains.projects.locations.registrations.configureDnsSettings" call. 2772 // Any non-2xx status code is an error. Response headers are in either 2773 // *Operation.ServerResponse.Header or (if a response was returned at all) in 2774 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2775 // whether the returned error was because http.StatusNotModified was returned. 2776 func (c *ProjectsLocationsRegistrationsConfigureDnsSettingsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 2777 gensupport.SetOptions(c.urlParams_, opts...) 2778 res, err := c.doRequest("json") 2779 if res != nil && res.StatusCode == http.StatusNotModified { 2780 if res.Body != nil { 2781 res.Body.Close() 2782 } 2783 return nil, gensupport.WrapError(&googleapi.Error{ 2784 Code: res.StatusCode, 2785 Header: res.Header, 2786 }) 2787 } 2788 if err != nil { 2789 return nil, err 2790 } 2791 defer googleapi.CloseBody(res) 2792 if err := googleapi.CheckResponse(res); err != nil { 2793 return nil, gensupport.WrapError(err) 2794 } 2795 ret := &Operation{ 2796 ServerResponse: googleapi.ServerResponse{ 2797 Header: res.Header, 2798 HTTPStatusCode: res.StatusCode, 2799 }, 2800 } 2801 target := &ret 2802 if err := gensupport.DecodeResponse(target, res); err != nil { 2803 return nil, err 2804 } 2805 return ret, nil 2806 } 2807 2808 type ProjectsLocationsRegistrationsConfigureManagementSettingsCall struct { 2809 s *Service 2810 registration string 2811 configuremanagementsettingsrequest *ConfigureManagementSettingsRequest 2812 urlParams_ gensupport.URLParams 2813 ctx_ context.Context 2814 header_ http.Header 2815 } 2816 2817 // ConfigureManagementSettings: Updates a `Registration`'s management settings. 2818 // 2819 // - registration: The name of the `Registration` whose management settings are 2820 // being updated, in the format `projects/*/locations/*/registrations/*`. 2821 func (r *ProjectsLocationsRegistrationsService) ConfigureManagementSettings(registration string, configuremanagementsettingsrequest *ConfigureManagementSettingsRequest) *ProjectsLocationsRegistrationsConfigureManagementSettingsCall { 2822 c := &ProjectsLocationsRegistrationsConfigureManagementSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2823 c.registration = registration 2824 c.configuremanagementsettingsrequest = configuremanagementsettingsrequest 2825 return c 2826 } 2827 2828 // Fields allows partial responses to be retrieved. See 2829 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2830 // details. 2831 func (c *ProjectsLocationsRegistrationsConfigureManagementSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsConfigureManagementSettingsCall { 2832 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2833 return c 2834 } 2835 2836 // Context sets the context to be used in this call's Do method. 2837 func (c *ProjectsLocationsRegistrationsConfigureManagementSettingsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsConfigureManagementSettingsCall { 2838 c.ctx_ = ctx 2839 return c 2840 } 2841 2842 // Header returns a http.Header that can be modified by the caller to add 2843 // headers to the request. 2844 func (c *ProjectsLocationsRegistrationsConfigureManagementSettingsCall) Header() http.Header { 2845 if c.header_ == nil { 2846 c.header_ = make(http.Header) 2847 } 2848 return c.header_ 2849 } 2850 2851 func (c *ProjectsLocationsRegistrationsConfigureManagementSettingsCall) doRequest(alt string) (*http.Response, error) { 2852 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 2853 var body io.Reader = nil 2854 body, err := googleapi.WithoutDataWrapper.JSONReader(c.configuremanagementsettingsrequest) 2855 if err != nil { 2856 return nil, err 2857 } 2858 c.urlParams_.Set("alt", alt) 2859 c.urlParams_.Set("prettyPrint", "false") 2860 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+registration}:configureManagementSettings") 2861 urls += "?" + c.urlParams_.Encode() 2862 req, err := http.NewRequest("POST", urls, body) 2863 if err != nil { 2864 return nil, err 2865 } 2866 req.Header = reqHeaders 2867 googleapi.Expand(req.URL, map[string]string{ 2868 "registration": c.registration, 2869 }) 2870 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2871 } 2872 2873 // Do executes the "domains.projects.locations.registrations.configureManagementSettings" call. 2874 // Any non-2xx status code is an error. Response headers are in either 2875 // *Operation.ServerResponse.Header or (if a response was returned at all) in 2876 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2877 // whether the returned error was because http.StatusNotModified was returned. 2878 func (c *ProjectsLocationsRegistrationsConfigureManagementSettingsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 2879 gensupport.SetOptions(c.urlParams_, opts...) 2880 res, err := c.doRequest("json") 2881 if res != nil && res.StatusCode == http.StatusNotModified { 2882 if res.Body != nil { 2883 res.Body.Close() 2884 } 2885 return nil, gensupport.WrapError(&googleapi.Error{ 2886 Code: res.StatusCode, 2887 Header: res.Header, 2888 }) 2889 } 2890 if err != nil { 2891 return nil, err 2892 } 2893 defer googleapi.CloseBody(res) 2894 if err := googleapi.CheckResponse(res); err != nil { 2895 return nil, gensupport.WrapError(err) 2896 } 2897 ret := &Operation{ 2898 ServerResponse: googleapi.ServerResponse{ 2899 Header: res.Header, 2900 HTTPStatusCode: res.StatusCode, 2901 }, 2902 } 2903 target := &ret 2904 if err := gensupport.DecodeResponse(target, res); err != nil { 2905 return nil, err 2906 } 2907 return ret, nil 2908 } 2909 2910 type ProjectsLocationsRegistrationsDeleteCall struct { 2911 s *Service 2912 name string 2913 urlParams_ gensupport.URLParams 2914 ctx_ context.Context 2915 header_ http.Header 2916 } 2917 2918 // Delete: Deletes a `Registration` resource. This method works on any 2919 // `Registration` resource using Subscription or Commitment billing 2920 // (/domains/pricing#billing-models), provided that the resource was created at 2921 // least 1 day in the past. When an active registration is successfully 2922 // deleted, you can continue to use the domain in Google Domains 2923 // (https://domains.google/) until it expires. The calling user becomes the 2924 // domain's sole owner in Google Domains, and permissions for the domain are 2925 // subsequently managed there. The domain does not renew automatically unless 2926 // the new owner sets up billing in Google Domains. After January 2024 you will 2927 // only be able to delete `Registration` resources when `state` is one of: 2928 // `EXPORTED`, `EXPIRED`,`REGISTRATION_FAILED` or `TRANSFER_FAILED`. See Cloud 2929 // Domains feature deprecation 2930 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations) 2931 // for more details. 2932 // 2933 // - name: The name of the `Registration` to delete, in the format 2934 // `projects/*/locations/*/registrations/*`. 2935 func (r *ProjectsLocationsRegistrationsService) Delete(name string) *ProjectsLocationsRegistrationsDeleteCall { 2936 c := &ProjectsLocationsRegistrationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2937 c.name = name 2938 return c 2939 } 2940 2941 // Fields allows partial responses to be retrieved. See 2942 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2943 // details. 2944 func (c *ProjectsLocationsRegistrationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsDeleteCall { 2945 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2946 return c 2947 } 2948 2949 // Context sets the context to be used in this call's Do method. 2950 func (c *ProjectsLocationsRegistrationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsDeleteCall { 2951 c.ctx_ = ctx 2952 return c 2953 } 2954 2955 // Header returns a http.Header that can be modified by the caller to add 2956 // headers to the request. 2957 func (c *ProjectsLocationsRegistrationsDeleteCall) Header() http.Header { 2958 if c.header_ == nil { 2959 c.header_ = make(http.Header) 2960 } 2961 return c.header_ 2962 } 2963 2964 func (c *ProjectsLocationsRegistrationsDeleteCall) doRequest(alt string) (*http.Response, error) { 2965 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 2966 var body io.Reader = nil 2967 c.urlParams_.Set("alt", alt) 2968 c.urlParams_.Set("prettyPrint", "false") 2969 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 2970 urls += "?" + c.urlParams_.Encode() 2971 req, err := http.NewRequest("DELETE", urls, body) 2972 if err != nil { 2973 return nil, err 2974 } 2975 req.Header = reqHeaders 2976 googleapi.Expand(req.URL, map[string]string{ 2977 "name": c.name, 2978 }) 2979 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2980 } 2981 2982 // Do executes the "domains.projects.locations.registrations.delete" call. 2983 // Any non-2xx status code is an error. Response headers are in either 2984 // *Operation.ServerResponse.Header or (if a response was returned at all) in 2985 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 2986 // whether the returned error was because http.StatusNotModified was returned. 2987 func (c *ProjectsLocationsRegistrationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 2988 gensupport.SetOptions(c.urlParams_, opts...) 2989 res, err := c.doRequest("json") 2990 if res != nil && res.StatusCode == http.StatusNotModified { 2991 if res.Body != nil { 2992 res.Body.Close() 2993 } 2994 return nil, gensupport.WrapError(&googleapi.Error{ 2995 Code: res.StatusCode, 2996 Header: res.Header, 2997 }) 2998 } 2999 if err != nil { 3000 return nil, err 3001 } 3002 defer googleapi.CloseBody(res) 3003 if err := googleapi.CheckResponse(res); err != nil { 3004 return nil, gensupport.WrapError(err) 3005 } 3006 ret := &Operation{ 3007 ServerResponse: googleapi.ServerResponse{ 3008 Header: res.Header, 3009 HTTPStatusCode: res.StatusCode, 3010 }, 3011 } 3012 target := &ret 3013 if err := gensupport.DecodeResponse(target, res); err != nil { 3014 return nil, err 3015 } 3016 return ret, nil 3017 } 3018 3019 type ProjectsLocationsRegistrationsExportCall struct { 3020 s *Service 3021 name string 3022 exportregistrationrequest *ExportRegistrationRequest 3023 urlParams_ gensupport.URLParams 3024 ctx_ context.Context 3025 header_ http.Header 3026 } 3027 3028 // Export: Deprecated: For more information, see Cloud Domains feature 3029 // deprecation 3030 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations) 3031 // Exports a `Registration` resource, such that it is no longer managed by 3032 // Cloud Domains. When an active domain is successfully exported, you can 3033 // continue to use the domain in Google Domains (https://domains.google/) until 3034 // it expires. The calling user becomes the domain's sole owner in Google 3035 // Domains, and permissions for the domain are subsequently managed there. The 3036 // domain does not renew automatically unless the new owner sets up billing in 3037 // Google Domains. 3038 // 3039 // - name: The name of the `Registration` to export, in the format 3040 // `projects/*/locations/*/registrations/*`. 3041 func (r *ProjectsLocationsRegistrationsService) Export(name string, exportregistrationrequest *ExportRegistrationRequest) *ProjectsLocationsRegistrationsExportCall { 3042 c := &ProjectsLocationsRegistrationsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3043 c.name = name 3044 c.exportregistrationrequest = exportregistrationrequest 3045 return c 3046 } 3047 3048 // Fields allows partial responses to be retrieved. See 3049 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3050 // details. 3051 func (c *ProjectsLocationsRegistrationsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsExportCall { 3052 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3053 return c 3054 } 3055 3056 // Context sets the context to be used in this call's Do method. 3057 func (c *ProjectsLocationsRegistrationsExportCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsExportCall { 3058 c.ctx_ = ctx 3059 return c 3060 } 3061 3062 // Header returns a http.Header that can be modified by the caller to add 3063 // headers to the request. 3064 func (c *ProjectsLocationsRegistrationsExportCall) Header() http.Header { 3065 if c.header_ == nil { 3066 c.header_ = make(http.Header) 3067 } 3068 return c.header_ 3069 } 3070 3071 func (c *ProjectsLocationsRegistrationsExportCall) doRequest(alt string) (*http.Response, error) { 3072 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3073 var body io.Reader = nil 3074 body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportregistrationrequest) 3075 if err != nil { 3076 return nil, err 3077 } 3078 c.urlParams_.Set("alt", alt) 3079 c.urlParams_.Set("prettyPrint", "false") 3080 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:export") 3081 urls += "?" + c.urlParams_.Encode() 3082 req, err := http.NewRequest("POST", urls, body) 3083 if err != nil { 3084 return nil, err 3085 } 3086 req.Header = reqHeaders 3087 googleapi.Expand(req.URL, map[string]string{ 3088 "name": c.name, 3089 }) 3090 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3091 } 3092 3093 // Do executes the "domains.projects.locations.registrations.export" call. 3094 // Any non-2xx status code is an error. Response headers are in either 3095 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3096 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3097 // whether the returned error was because http.StatusNotModified was returned. 3098 func (c *ProjectsLocationsRegistrationsExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3099 gensupport.SetOptions(c.urlParams_, opts...) 3100 res, err := c.doRequest("json") 3101 if res != nil && res.StatusCode == http.StatusNotModified { 3102 if res.Body != nil { 3103 res.Body.Close() 3104 } 3105 return nil, gensupport.WrapError(&googleapi.Error{ 3106 Code: res.StatusCode, 3107 Header: res.Header, 3108 }) 3109 } 3110 if err != nil { 3111 return nil, err 3112 } 3113 defer googleapi.CloseBody(res) 3114 if err := googleapi.CheckResponse(res); err != nil { 3115 return nil, gensupport.WrapError(err) 3116 } 3117 ret := &Operation{ 3118 ServerResponse: googleapi.ServerResponse{ 3119 Header: res.Header, 3120 HTTPStatusCode: res.StatusCode, 3121 }, 3122 } 3123 target := &ret 3124 if err := gensupport.DecodeResponse(target, res); err != nil { 3125 return nil, err 3126 } 3127 return ret, nil 3128 } 3129 3130 type ProjectsLocationsRegistrationsGetCall struct { 3131 s *Service 3132 name string 3133 urlParams_ gensupport.URLParams 3134 ifNoneMatch_ string 3135 ctx_ context.Context 3136 header_ http.Header 3137 } 3138 3139 // Get: Gets the details of a `Registration` resource. 3140 // 3141 // - name: The name of the `Registration` to get, in the format 3142 // `projects/*/locations/*/registrations/*`. 3143 func (r *ProjectsLocationsRegistrationsService) Get(name string) *ProjectsLocationsRegistrationsGetCall { 3144 c := &ProjectsLocationsRegistrationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3145 c.name = name 3146 return c 3147 } 3148 3149 // Fields allows partial responses to be retrieved. See 3150 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3151 // details. 3152 func (c *ProjectsLocationsRegistrationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsGetCall { 3153 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3154 return c 3155 } 3156 3157 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3158 // object's ETag matches the given value. This is useful for getting updates 3159 // only after the object has changed since the last request. 3160 func (c *ProjectsLocationsRegistrationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsGetCall { 3161 c.ifNoneMatch_ = entityTag 3162 return c 3163 } 3164 3165 // Context sets the context to be used in this call's Do method. 3166 func (c *ProjectsLocationsRegistrationsGetCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsGetCall { 3167 c.ctx_ = ctx 3168 return c 3169 } 3170 3171 // Header returns a http.Header that can be modified by the caller to add 3172 // headers to the request. 3173 func (c *ProjectsLocationsRegistrationsGetCall) Header() http.Header { 3174 if c.header_ == nil { 3175 c.header_ = make(http.Header) 3176 } 3177 return c.header_ 3178 } 3179 3180 func (c *ProjectsLocationsRegistrationsGetCall) doRequest(alt string) (*http.Response, error) { 3181 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3182 if c.ifNoneMatch_ != "" { 3183 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3184 } 3185 var body io.Reader = nil 3186 c.urlParams_.Set("alt", alt) 3187 c.urlParams_.Set("prettyPrint", "false") 3188 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 3189 urls += "?" + c.urlParams_.Encode() 3190 req, err := http.NewRequest("GET", urls, body) 3191 if err != nil { 3192 return nil, err 3193 } 3194 req.Header = reqHeaders 3195 googleapi.Expand(req.URL, map[string]string{ 3196 "name": c.name, 3197 }) 3198 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3199 } 3200 3201 // Do executes the "domains.projects.locations.registrations.get" call. 3202 // Any non-2xx status code is an error. Response headers are in either 3203 // *Registration.ServerResponse.Header or (if a response was returned at all) 3204 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3205 // whether the returned error was because http.StatusNotModified was returned. 3206 func (c *ProjectsLocationsRegistrationsGetCall) Do(opts ...googleapi.CallOption) (*Registration, error) { 3207 gensupport.SetOptions(c.urlParams_, opts...) 3208 res, err := c.doRequest("json") 3209 if res != nil && res.StatusCode == http.StatusNotModified { 3210 if res.Body != nil { 3211 res.Body.Close() 3212 } 3213 return nil, gensupport.WrapError(&googleapi.Error{ 3214 Code: res.StatusCode, 3215 Header: res.Header, 3216 }) 3217 } 3218 if err != nil { 3219 return nil, err 3220 } 3221 defer googleapi.CloseBody(res) 3222 if err := googleapi.CheckResponse(res); err != nil { 3223 return nil, gensupport.WrapError(err) 3224 } 3225 ret := &Registration{ 3226 ServerResponse: googleapi.ServerResponse{ 3227 Header: res.Header, 3228 HTTPStatusCode: res.StatusCode, 3229 }, 3230 } 3231 target := &ret 3232 if err := gensupport.DecodeResponse(target, res); err != nil { 3233 return nil, err 3234 } 3235 return ret, nil 3236 } 3237 3238 type ProjectsLocationsRegistrationsGetIamPolicyCall struct { 3239 s *Service 3240 resource string 3241 urlParams_ gensupport.URLParams 3242 ifNoneMatch_ string 3243 ctx_ context.Context 3244 header_ http.Header 3245 } 3246 3247 // GetIamPolicy: Gets the access control policy for a resource. Returns an 3248 // empty policy if the resource exists and does not have a policy set. 3249 // 3250 // - resource: REQUIRED: The resource for which the policy is being requested. 3251 // See Resource names (https://cloud.google.com/apis/design/resource_names) 3252 // for the appropriate value for this field. 3253 func (r *ProjectsLocationsRegistrationsService) GetIamPolicy(resource string) *ProjectsLocationsRegistrationsGetIamPolicyCall { 3254 c := &ProjectsLocationsRegistrationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3255 c.resource = resource 3256 return c 3257 } 3258 3259 // OptionsRequestedPolicyVersion sets the optional parameter 3260 // "options.requestedPolicyVersion": The maximum policy version that will be 3261 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying 3262 // an invalid value will be rejected. Requests for policies with any 3263 // conditional role bindings must specify version 3. Policies with no 3264 // conditional role bindings may specify any valid value or leave the field 3265 // unset. The policy in the response might use the policy version that you 3266 // specified, or it might use a lower policy version. For example, if you 3267 // specify version 3, but the policy has no conditional role bindings, the 3268 // response uses version 1. To learn which resources support conditions in 3269 // their IAM policies, see the IAM documentation 3270 // (https://cloud.google.com/iam/help/conditions/resource-policies). 3271 func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRegistrationsGetIamPolicyCall { 3272 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 3273 return c 3274 } 3275 3276 // Fields allows partial responses to be retrieved. See 3277 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3278 // details. 3279 func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsGetIamPolicyCall { 3280 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3281 return c 3282 } 3283 3284 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3285 // object's ETag matches the given value. This is useful for getting updates 3286 // only after the object has changed since the last request. 3287 func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsGetIamPolicyCall { 3288 c.ifNoneMatch_ = entityTag 3289 return c 3290 } 3291 3292 // Context sets the context to be used in this call's Do method. 3293 func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsGetIamPolicyCall { 3294 c.ctx_ = ctx 3295 return c 3296 } 3297 3298 // Header returns a http.Header that can be modified by the caller to add 3299 // headers to the request. 3300 func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) Header() http.Header { 3301 if c.header_ == nil { 3302 c.header_ = make(http.Header) 3303 } 3304 return c.header_ 3305 } 3306 3307 func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 3308 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3309 if c.ifNoneMatch_ != "" { 3310 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3311 } 3312 var body io.Reader = nil 3313 c.urlParams_.Set("alt", alt) 3314 c.urlParams_.Set("prettyPrint", "false") 3315 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 3316 urls += "?" + c.urlParams_.Encode() 3317 req, err := http.NewRequest("GET", urls, body) 3318 if err != nil { 3319 return nil, err 3320 } 3321 req.Header = reqHeaders 3322 googleapi.Expand(req.URL, map[string]string{ 3323 "resource": c.resource, 3324 }) 3325 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3326 } 3327 3328 // Do executes the "domains.projects.locations.registrations.getIamPolicy" call. 3329 // Any non-2xx status code is an error. Response headers are in either 3330 // *Policy.ServerResponse.Header or (if a response was returned at all) in 3331 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3332 // whether the returned error was because http.StatusNotModified was returned. 3333 func (c *ProjectsLocationsRegistrationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 3334 gensupport.SetOptions(c.urlParams_, opts...) 3335 res, err := c.doRequest("json") 3336 if res != nil && res.StatusCode == http.StatusNotModified { 3337 if res.Body != nil { 3338 res.Body.Close() 3339 } 3340 return nil, gensupport.WrapError(&googleapi.Error{ 3341 Code: res.StatusCode, 3342 Header: res.Header, 3343 }) 3344 } 3345 if err != nil { 3346 return nil, err 3347 } 3348 defer googleapi.CloseBody(res) 3349 if err := googleapi.CheckResponse(res); err != nil { 3350 return nil, gensupport.WrapError(err) 3351 } 3352 ret := &Policy{ 3353 ServerResponse: googleapi.ServerResponse{ 3354 Header: res.Header, 3355 HTTPStatusCode: res.StatusCode, 3356 }, 3357 } 3358 target := &ret 3359 if err := gensupport.DecodeResponse(target, res); err != nil { 3360 return nil, err 3361 } 3362 return ret, nil 3363 } 3364 3365 type ProjectsLocationsRegistrationsImportCall struct { 3366 s *Service 3367 parent string 3368 importdomainrequest *ImportDomainRequest 3369 urlParams_ gensupport.URLParams 3370 ctx_ context.Context 3371 header_ http.Header 3372 } 3373 3374 // Import: Deprecated: For more information, see Cloud Domains feature 3375 // deprecation 3376 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations) 3377 // Imports a domain name from Google Domains (https://domains.google/) for use 3378 // in Cloud Domains. To transfer a domain from another registrar, use the 3379 // `TransferDomain` method instead. Since individual users can own domains in 3380 // Google Domains, the calling user must have ownership permission on the 3381 // domain. 3382 // 3383 // - parent: The parent resource of the Registration. Must be in the format 3384 // `projects/*/locations/*`. 3385 func (r *ProjectsLocationsRegistrationsService) Import(parent string, importdomainrequest *ImportDomainRequest) *ProjectsLocationsRegistrationsImportCall { 3386 c := &ProjectsLocationsRegistrationsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3387 c.parent = parent 3388 c.importdomainrequest = importdomainrequest 3389 return c 3390 } 3391 3392 // Fields allows partial responses to be retrieved. See 3393 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3394 // details. 3395 func (c *ProjectsLocationsRegistrationsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsImportCall { 3396 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3397 return c 3398 } 3399 3400 // Context sets the context to be used in this call's Do method. 3401 func (c *ProjectsLocationsRegistrationsImportCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsImportCall { 3402 c.ctx_ = ctx 3403 return c 3404 } 3405 3406 // Header returns a http.Header that can be modified by the caller to add 3407 // headers to the request. 3408 func (c *ProjectsLocationsRegistrationsImportCall) Header() http.Header { 3409 if c.header_ == nil { 3410 c.header_ = make(http.Header) 3411 } 3412 return c.header_ 3413 } 3414 3415 func (c *ProjectsLocationsRegistrationsImportCall) doRequest(alt string) (*http.Response, error) { 3416 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3417 var body io.Reader = nil 3418 body, err := googleapi.WithoutDataWrapper.JSONReader(c.importdomainrequest) 3419 if err != nil { 3420 return nil, err 3421 } 3422 c.urlParams_.Set("alt", alt) 3423 c.urlParams_.Set("prettyPrint", "false") 3424 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/registrations:import") 3425 urls += "?" + c.urlParams_.Encode() 3426 req, err := http.NewRequest("POST", urls, body) 3427 if err != nil { 3428 return nil, err 3429 } 3430 req.Header = reqHeaders 3431 googleapi.Expand(req.URL, map[string]string{ 3432 "parent": c.parent, 3433 }) 3434 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3435 } 3436 3437 // Do executes the "domains.projects.locations.registrations.import" call. 3438 // Any non-2xx status code is an error. Response headers are in either 3439 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3440 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3441 // whether the returned error was because http.StatusNotModified was returned. 3442 func (c *ProjectsLocationsRegistrationsImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3443 gensupport.SetOptions(c.urlParams_, opts...) 3444 res, err := c.doRequest("json") 3445 if res != nil && res.StatusCode == http.StatusNotModified { 3446 if res.Body != nil { 3447 res.Body.Close() 3448 } 3449 return nil, gensupport.WrapError(&googleapi.Error{ 3450 Code: res.StatusCode, 3451 Header: res.Header, 3452 }) 3453 } 3454 if err != nil { 3455 return nil, err 3456 } 3457 defer googleapi.CloseBody(res) 3458 if err := googleapi.CheckResponse(res); err != nil { 3459 return nil, gensupport.WrapError(err) 3460 } 3461 ret := &Operation{ 3462 ServerResponse: googleapi.ServerResponse{ 3463 Header: res.Header, 3464 HTTPStatusCode: res.StatusCode, 3465 }, 3466 } 3467 target := &ret 3468 if err := gensupport.DecodeResponse(target, res); err != nil { 3469 return nil, err 3470 } 3471 return ret, nil 3472 } 3473 3474 type ProjectsLocationsRegistrationsListCall struct { 3475 s *Service 3476 parent string 3477 urlParams_ gensupport.URLParams 3478 ifNoneMatch_ string 3479 ctx_ context.Context 3480 header_ http.Header 3481 } 3482 3483 // List: Lists the `Registration` resources in a project. 3484 // 3485 // - parent: The project and location from which to list `Registration`s, 3486 // specified in the format `projects/*/locations/*`. 3487 func (r *ProjectsLocationsRegistrationsService) List(parent string) *ProjectsLocationsRegistrationsListCall { 3488 c := &ProjectsLocationsRegistrationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3489 c.parent = parent 3490 return c 3491 } 3492 3493 // Filter sets the optional parameter "filter": Filter expression to restrict 3494 // the `Registration`s returned. The expression must specify the field name, a 3495 // comparison operator, and the value that you want to use for filtering. The 3496 // value must be a string, a number, a boolean, or an enum value. The 3497 // comparison operator should be one of =, !=, >, <, >=, <=, or : for prefix or 3498 // wildcard matches. For example, to filter to a specific domain name, use an 3499 // expression like `domainName="example.com". You can also check for the 3500 // existence of a field; for example, to find domains using custom DNS 3501 // settings, use an expression like `dnsSettings.customDns:*`. You can also 3502 // create compound filters by combining expressions with the `AND` and `OR` 3503 // operators. For example, to find domains that are suspended or have specific 3504 // issues flagged, use an expression like `(state=SUSPENDED) OR (issue:*)`. 3505 func (c *ProjectsLocationsRegistrationsListCall) Filter(filter string) *ProjectsLocationsRegistrationsListCall { 3506 c.urlParams_.Set("filter", filter) 3507 return c 3508 } 3509 3510 // PageSize sets the optional parameter "pageSize": Maximum number of results 3511 // to return. 3512 func (c *ProjectsLocationsRegistrationsListCall) PageSize(pageSize int64) *ProjectsLocationsRegistrationsListCall { 3513 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 3514 return c 3515 } 3516 3517 // PageToken sets the optional parameter "pageToken": When set to the 3518 // `next_page_token` from a prior response, provides the next page of results. 3519 func (c *ProjectsLocationsRegistrationsListCall) PageToken(pageToken string) *ProjectsLocationsRegistrationsListCall { 3520 c.urlParams_.Set("pageToken", pageToken) 3521 return c 3522 } 3523 3524 // Fields allows partial responses to be retrieved. See 3525 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3526 // details. 3527 func (c *ProjectsLocationsRegistrationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsListCall { 3528 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3529 return c 3530 } 3531 3532 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3533 // object's ETag matches the given value. This is useful for getting updates 3534 // only after the object has changed since the last request. 3535 func (c *ProjectsLocationsRegistrationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsListCall { 3536 c.ifNoneMatch_ = entityTag 3537 return c 3538 } 3539 3540 // Context sets the context to be used in this call's Do method. 3541 func (c *ProjectsLocationsRegistrationsListCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsListCall { 3542 c.ctx_ = ctx 3543 return c 3544 } 3545 3546 // Header returns a http.Header that can be modified by the caller to add 3547 // headers to the request. 3548 func (c *ProjectsLocationsRegistrationsListCall) Header() http.Header { 3549 if c.header_ == nil { 3550 c.header_ = make(http.Header) 3551 } 3552 return c.header_ 3553 } 3554 3555 func (c *ProjectsLocationsRegistrationsListCall) doRequest(alt string) (*http.Response, error) { 3556 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3557 if c.ifNoneMatch_ != "" { 3558 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3559 } 3560 var body io.Reader = nil 3561 c.urlParams_.Set("alt", alt) 3562 c.urlParams_.Set("prettyPrint", "false") 3563 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/registrations") 3564 urls += "?" + c.urlParams_.Encode() 3565 req, err := http.NewRequest("GET", urls, body) 3566 if err != nil { 3567 return nil, err 3568 } 3569 req.Header = reqHeaders 3570 googleapi.Expand(req.URL, map[string]string{ 3571 "parent": c.parent, 3572 }) 3573 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3574 } 3575 3576 // Do executes the "domains.projects.locations.registrations.list" call. 3577 // Any non-2xx status code is an error. Response headers are in either 3578 // *ListRegistrationsResponse.ServerResponse.Header or (if a response was 3579 // returned at all) in error.(*googleapi.Error).Header. Use 3580 // googleapi.IsNotModified to check whether the returned error was because 3581 // http.StatusNotModified was returned. 3582 func (c *ProjectsLocationsRegistrationsListCall) Do(opts ...googleapi.CallOption) (*ListRegistrationsResponse, error) { 3583 gensupport.SetOptions(c.urlParams_, opts...) 3584 res, err := c.doRequest("json") 3585 if res != nil && res.StatusCode == http.StatusNotModified { 3586 if res.Body != nil { 3587 res.Body.Close() 3588 } 3589 return nil, gensupport.WrapError(&googleapi.Error{ 3590 Code: res.StatusCode, 3591 Header: res.Header, 3592 }) 3593 } 3594 if err != nil { 3595 return nil, err 3596 } 3597 defer googleapi.CloseBody(res) 3598 if err := googleapi.CheckResponse(res); err != nil { 3599 return nil, gensupport.WrapError(err) 3600 } 3601 ret := &ListRegistrationsResponse{ 3602 ServerResponse: googleapi.ServerResponse{ 3603 Header: res.Header, 3604 HTTPStatusCode: res.StatusCode, 3605 }, 3606 } 3607 target := &ret 3608 if err := gensupport.DecodeResponse(target, res); err != nil { 3609 return nil, err 3610 } 3611 return ret, nil 3612 } 3613 3614 // Pages invokes f for each page of results. 3615 // A non-nil error returned from f will halt the iteration. 3616 // The provided context supersedes any context provided to the Context method. 3617 func (c *ProjectsLocationsRegistrationsListCall) Pages(ctx context.Context, f func(*ListRegistrationsResponse) error) error { 3618 c.ctx_ = ctx 3619 defer c.PageToken(c.urlParams_.Get("pageToken")) 3620 for { 3621 x, err := c.Do() 3622 if err != nil { 3623 return err 3624 } 3625 if err := f(x); err != nil { 3626 return err 3627 } 3628 if x.NextPageToken == "" { 3629 return nil 3630 } 3631 c.PageToken(x.NextPageToken) 3632 } 3633 } 3634 3635 type ProjectsLocationsRegistrationsPatchCall struct { 3636 s *Service 3637 name string 3638 registration *Registration 3639 urlParams_ gensupport.URLParams 3640 ctx_ context.Context 3641 header_ http.Header 3642 } 3643 3644 // Patch: Updates select fields of a `Registration` resource, notably `labels`. 3645 // To update other fields, use the appropriate custom update method: * To 3646 // update management settings, see `ConfigureManagementSettings` * To update 3647 // DNS configuration, see `ConfigureDnsSettings` * To update contact 3648 // information, see `ConfigureContactSettings` 3649 // 3650 // - name: Output only. Name of the `Registration` resource, in the format 3651 // `projects/*/locations/*/registrations/`. 3652 func (r *ProjectsLocationsRegistrationsService) Patch(name string, registration *Registration) *ProjectsLocationsRegistrationsPatchCall { 3653 c := &ProjectsLocationsRegistrationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3654 c.name = name 3655 c.registration = registration 3656 return c 3657 } 3658 3659 // UpdateMask sets the optional parameter "updateMask": Required. The field 3660 // mask describing which fields to update as a comma-separated list. For 3661 // example, if only the labels are being updated, the `update_mask` is 3662 // "labels". 3663 func (c *ProjectsLocationsRegistrationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRegistrationsPatchCall { 3664 c.urlParams_.Set("updateMask", updateMask) 3665 return c 3666 } 3667 3668 // Fields allows partial responses to be retrieved. See 3669 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3670 // details. 3671 func (c *ProjectsLocationsRegistrationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsPatchCall { 3672 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3673 return c 3674 } 3675 3676 // Context sets the context to be used in this call's Do method. 3677 func (c *ProjectsLocationsRegistrationsPatchCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsPatchCall { 3678 c.ctx_ = ctx 3679 return c 3680 } 3681 3682 // Header returns a http.Header that can be modified by the caller to add 3683 // headers to the request. 3684 func (c *ProjectsLocationsRegistrationsPatchCall) Header() http.Header { 3685 if c.header_ == nil { 3686 c.header_ = make(http.Header) 3687 } 3688 return c.header_ 3689 } 3690 3691 func (c *ProjectsLocationsRegistrationsPatchCall) doRequest(alt string) (*http.Response, error) { 3692 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3693 var body io.Reader = nil 3694 body, err := googleapi.WithoutDataWrapper.JSONReader(c.registration) 3695 if err != nil { 3696 return nil, err 3697 } 3698 c.urlParams_.Set("alt", alt) 3699 c.urlParams_.Set("prettyPrint", "false") 3700 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 3701 urls += "?" + c.urlParams_.Encode() 3702 req, err := http.NewRequest("PATCH", urls, body) 3703 if err != nil { 3704 return nil, err 3705 } 3706 req.Header = reqHeaders 3707 googleapi.Expand(req.URL, map[string]string{ 3708 "name": c.name, 3709 }) 3710 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3711 } 3712 3713 // Do executes the "domains.projects.locations.registrations.patch" call. 3714 // Any non-2xx status code is an error. Response headers are in either 3715 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3716 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3717 // whether the returned error was because http.StatusNotModified was returned. 3718 func (c *ProjectsLocationsRegistrationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3719 gensupport.SetOptions(c.urlParams_, opts...) 3720 res, err := c.doRequest("json") 3721 if res != nil && res.StatusCode == http.StatusNotModified { 3722 if res.Body != nil { 3723 res.Body.Close() 3724 } 3725 return nil, gensupport.WrapError(&googleapi.Error{ 3726 Code: res.StatusCode, 3727 Header: res.Header, 3728 }) 3729 } 3730 if err != nil { 3731 return nil, err 3732 } 3733 defer googleapi.CloseBody(res) 3734 if err := googleapi.CheckResponse(res); err != nil { 3735 return nil, gensupport.WrapError(err) 3736 } 3737 ret := &Operation{ 3738 ServerResponse: googleapi.ServerResponse{ 3739 Header: res.Header, 3740 HTTPStatusCode: res.StatusCode, 3741 }, 3742 } 3743 target := &ret 3744 if err := gensupport.DecodeResponse(target, res); err != nil { 3745 return nil, err 3746 } 3747 return ret, nil 3748 } 3749 3750 type ProjectsLocationsRegistrationsRegisterCall struct { 3751 s *Service 3752 parent string 3753 registerdomainrequest *RegisterDomainRequest 3754 urlParams_ gensupport.URLParams 3755 ctx_ context.Context 3756 header_ http.Header 3757 } 3758 3759 // Register: Registers a new domain name and creates a corresponding 3760 // `Registration` resource. Call `RetrieveRegisterParameters` first to check 3761 // availability of the domain name and determine parameters like price that are 3762 // needed to build a call to this method. A successful call creates a 3763 // `Registration` resource in state `REGISTRATION_PENDING`, which resolves to 3764 // `ACTIVE` within 1-2 minutes, indicating that the domain was successfully 3765 // registered. If the resource ends up in state `REGISTRATION_FAILED`, it 3766 // indicates that the domain was not registered successfully, and you can 3767 // safely delete the resource and retry registration. 3768 // 3769 // - parent: The parent resource of the `Registration`. Must be in the format 3770 // `projects/*/locations/*`. 3771 func (r *ProjectsLocationsRegistrationsService) Register(parent string, registerdomainrequest *RegisterDomainRequest) *ProjectsLocationsRegistrationsRegisterCall { 3772 c := &ProjectsLocationsRegistrationsRegisterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3773 c.parent = parent 3774 c.registerdomainrequest = registerdomainrequest 3775 return c 3776 } 3777 3778 // Fields allows partial responses to be retrieved. See 3779 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3780 // details. 3781 func (c *ProjectsLocationsRegistrationsRegisterCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRegisterCall { 3782 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3783 return c 3784 } 3785 3786 // Context sets the context to be used in this call's Do method. 3787 func (c *ProjectsLocationsRegistrationsRegisterCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRegisterCall { 3788 c.ctx_ = ctx 3789 return c 3790 } 3791 3792 // Header returns a http.Header that can be modified by the caller to add 3793 // headers to the request. 3794 func (c *ProjectsLocationsRegistrationsRegisterCall) Header() http.Header { 3795 if c.header_ == nil { 3796 c.header_ = make(http.Header) 3797 } 3798 return c.header_ 3799 } 3800 3801 func (c *ProjectsLocationsRegistrationsRegisterCall) doRequest(alt string) (*http.Response, error) { 3802 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3803 var body io.Reader = nil 3804 body, err := googleapi.WithoutDataWrapper.JSONReader(c.registerdomainrequest) 3805 if err != nil { 3806 return nil, err 3807 } 3808 c.urlParams_.Set("alt", alt) 3809 c.urlParams_.Set("prettyPrint", "false") 3810 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/registrations:register") 3811 urls += "?" + c.urlParams_.Encode() 3812 req, err := http.NewRequest("POST", urls, body) 3813 if err != nil { 3814 return nil, err 3815 } 3816 req.Header = reqHeaders 3817 googleapi.Expand(req.URL, map[string]string{ 3818 "parent": c.parent, 3819 }) 3820 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3821 } 3822 3823 // Do executes the "domains.projects.locations.registrations.register" call. 3824 // Any non-2xx status code is an error. Response headers are in either 3825 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3826 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3827 // whether the returned error was because http.StatusNotModified was returned. 3828 func (c *ProjectsLocationsRegistrationsRegisterCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3829 gensupport.SetOptions(c.urlParams_, opts...) 3830 res, err := c.doRequest("json") 3831 if res != nil && res.StatusCode == http.StatusNotModified { 3832 if res.Body != nil { 3833 res.Body.Close() 3834 } 3835 return nil, gensupport.WrapError(&googleapi.Error{ 3836 Code: res.StatusCode, 3837 Header: res.Header, 3838 }) 3839 } 3840 if err != nil { 3841 return nil, err 3842 } 3843 defer googleapi.CloseBody(res) 3844 if err := googleapi.CheckResponse(res); err != nil { 3845 return nil, gensupport.WrapError(err) 3846 } 3847 ret := &Operation{ 3848 ServerResponse: googleapi.ServerResponse{ 3849 Header: res.Header, 3850 HTTPStatusCode: res.StatusCode, 3851 }, 3852 } 3853 target := &ret 3854 if err := gensupport.DecodeResponse(target, res); err != nil { 3855 return nil, err 3856 } 3857 return ret, nil 3858 } 3859 3860 type ProjectsLocationsRegistrationsResetAuthorizationCodeCall struct { 3861 s *Service 3862 registration string 3863 resetauthorizationcoderequest *ResetAuthorizationCodeRequest 3864 urlParams_ gensupport.URLParams 3865 ctx_ context.Context 3866 header_ http.Header 3867 } 3868 3869 // ResetAuthorizationCode: Resets the authorization code of the `Registration` 3870 // to a new random string. You can call this method only after 60 days have 3871 // elapsed since the initial domain registration. 3872 // 3873 // - registration: The name of the `Registration` whose authorization code is 3874 // being reset, in the format `projects/*/locations/*/registrations/*`. 3875 func (r *ProjectsLocationsRegistrationsService) ResetAuthorizationCode(registration string, resetauthorizationcoderequest *ResetAuthorizationCodeRequest) *ProjectsLocationsRegistrationsResetAuthorizationCodeCall { 3876 c := &ProjectsLocationsRegistrationsResetAuthorizationCodeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3877 c.registration = registration 3878 c.resetauthorizationcoderequest = resetauthorizationcoderequest 3879 return c 3880 } 3881 3882 // Fields allows partial responses to be retrieved. See 3883 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3884 // details. 3885 func (c *ProjectsLocationsRegistrationsResetAuthorizationCodeCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsResetAuthorizationCodeCall { 3886 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3887 return c 3888 } 3889 3890 // Context sets the context to be used in this call's Do method. 3891 func (c *ProjectsLocationsRegistrationsResetAuthorizationCodeCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsResetAuthorizationCodeCall { 3892 c.ctx_ = ctx 3893 return c 3894 } 3895 3896 // Header returns a http.Header that can be modified by the caller to add 3897 // headers to the request. 3898 func (c *ProjectsLocationsRegistrationsResetAuthorizationCodeCall) Header() http.Header { 3899 if c.header_ == nil { 3900 c.header_ = make(http.Header) 3901 } 3902 return c.header_ 3903 } 3904 3905 func (c *ProjectsLocationsRegistrationsResetAuthorizationCodeCall) doRequest(alt string) (*http.Response, error) { 3906 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3907 var body io.Reader = nil 3908 body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetauthorizationcoderequest) 3909 if err != nil { 3910 return nil, err 3911 } 3912 c.urlParams_.Set("alt", alt) 3913 c.urlParams_.Set("prettyPrint", "false") 3914 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+registration}:resetAuthorizationCode") 3915 urls += "?" + c.urlParams_.Encode() 3916 req, err := http.NewRequest("POST", urls, body) 3917 if err != nil { 3918 return nil, err 3919 } 3920 req.Header = reqHeaders 3921 googleapi.Expand(req.URL, map[string]string{ 3922 "registration": c.registration, 3923 }) 3924 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3925 } 3926 3927 // Do executes the "domains.projects.locations.registrations.resetAuthorizationCode" call. 3928 // Any non-2xx status code is an error. Response headers are in either 3929 // *AuthorizationCode.ServerResponse.Header or (if a response was returned at 3930 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3931 // check whether the returned error was because http.StatusNotModified was 3932 // returned. 3933 func (c *ProjectsLocationsRegistrationsResetAuthorizationCodeCall) Do(opts ...googleapi.CallOption) (*AuthorizationCode, error) { 3934 gensupport.SetOptions(c.urlParams_, opts...) 3935 res, err := c.doRequest("json") 3936 if res != nil && res.StatusCode == http.StatusNotModified { 3937 if res.Body != nil { 3938 res.Body.Close() 3939 } 3940 return nil, gensupport.WrapError(&googleapi.Error{ 3941 Code: res.StatusCode, 3942 Header: res.Header, 3943 }) 3944 } 3945 if err != nil { 3946 return nil, err 3947 } 3948 defer googleapi.CloseBody(res) 3949 if err := googleapi.CheckResponse(res); err != nil { 3950 return nil, gensupport.WrapError(err) 3951 } 3952 ret := &AuthorizationCode{ 3953 ServerResponse: googleapi.ServerResponse{ 3954 Header: res.Header, 3955 HTTPStatusCode: res.StatusCode, 3956 }, 3957 } 3958 target := &ret 3959 if err := gensupport.DecodeResponse(target, res); err != nil { 3960 return nil, err 3961 } 3962 return ret, nil 3963 } 3964 3965 type ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall struct { 3966 s *Service 3967 registration string 3968 urlParams_ gensupport.URLParams 3969 ifNoneMatch_ string 3970 ctx_ context.Context 3971 header_ http.Header 3972 } 3973 3974 // RetrieveAuthorizationCode: Gets the authorization code of the `Registration` 3975 // for the purpose of transferring the domain to another registrar. You can 3976 // call this method only after 60 days have elapsed since the initial domain 3977 // registration. 3978 // 3979 // - registration: The name of the `Registration` whose authorization code is 3980 // being retrieved, in the format `projects/*/locations/*/registrations/*`. 3981 func (r *ProjectsLocationsRegistrationsService) RetrieveAuthorizationCode(registration string) *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall { 3982 c := &ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3983 c.registration = registration 3984 return c 3985 } 3986 3987 // Fields allows partial responses to be retrieved. See 3988 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3989 // details. 3990 func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall { 3991 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3992 return c 3993 } 3994 3995 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3996 // object's ETag matches the given value. This is useful for getting updates 3997 // only after the object has changed since the last request. 3998 func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall { 3999 c.ifNoneMatch_ = entityTag 4000 return c 4001 } 4002 4003 // Context sets the context to be used in this call's Do method. 4004 func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall { 4005 c.ctx_ = ctx 4006 return c 4007 } 4008 4009 // Header returns a http.Header that can be modified by the caller to add 4010 // headers to the request. 4011 func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Header() http.Header { 4012 if c.header_ == nil { 4013 c.header_ = make(http.Header) 4014 } 4015 return c.header_ 4016 } 4017 4018 func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) doRequest(alt string) (*http.Response, error) { 4019 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 4020 if c.ifNoneMatch_ != "" { 4021 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4022 } 4023 var body io.Reader = nil 4024 c.urlParams_.Set("alt", alt) 4025 c.urlParams_.Set("prettyPrint", "false") 4026 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+registration}:retrieveAuthorizationCode") 4027 urls += "?" + c.urlParams_.Encode() 4028 req, err := http.NewRequest("GET", urls, body) 4029 if err != nil { 4030 return nil, err 4031 } 4032 req.Header = reqHeaders 4033 googleapi.Expand(req.URL, map[string]string{ 4034 "registration": c.registration, 4035 }) 4036 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4037 } 4038 4039 // Do executes the "domains.projects.locations.registrations.retrieveAuthorizationCode" call. 4040 // Any non-2xx status code is an error. Response headers are in either 4041 // *AuthorizationCode.ServerResponse.Header or (if a response was returned at 4042 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4043 // check whether the returned error was because http.StatusNotModified was 4044 // returned. 4045 func (c *ProjectsLocationsRegistrationsRetrieveAuthorizationCodeCall) Do(opts ...googleapi.CallOption) (*AuthorizationCode, error) { 4046 gensupport.SetOptions(c.urlParams_, opts...) 4047 res, err := c.doRequest("json") 4048 if res != nil && res.StatusCode == http.StatusNotModified { 4049 if res.Body != nil { 4050 res.Body.Close() 4051 } 4052 return nil, gensupport.WrapError(&googleapi.Error{ 4053 Code: res.StatusCode, 4054 Header: res.Header, 4055 }) 4056 } 4057 if err != nil { 4058 return nil, err 4059 } 4060 defer googleapi.CloseBody(res) 4061 if err := googleapi.CheckResponse(res); err != nil { 4062 return nil, gensupport.WrapError(err) 4063 } 4064 ret := &AuthorizationCode{ 4065 ServerResponse: googleapi.ServerResponse{ 4066 Header: res.Header, 4067 HTTPStatusCode: res.StatusCode, 4068 }, 4069 } 4070 target := &ret 4071 if err := gensupport.DecodeResponse(target, res); err != nil { 4072 return nil, err 4073 } 4074 return ret, nil 4075 } 4076 4077 type ProjectsLocationsRegistrationsRetrieveImportableDomainsCall struct { 4078 s *Service 4079 location string 4080 urlParams_ gensupport.URLParams 4081 ifNoneMatch_ string 4082 ctx_ context.Context 4083 header_ http.Header 4084 } 4085 4086 // RetrieveImportableDomains: Deprecated: For more information, see Cloud 4087 // Domains feature deprecation 4088 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations) 4089 // Lists domain names from Google Domains (https://domains.google/) that can be 4090 // imported to Cloud Domains using the `ImportDomain` method. Since individual 4091 // users can own domains in Google Domains, the list of domains returned 4092 // depends on the individual user making the call. Domains already managed by 4093 // Cloud Domains are not returned. 4094 // 4095 // - location: The location. Must be in the format `projects/*/locations/*`. 4096 func (r *ProjectsLocationsRegistrationsService) RetrieveImportableDomains(location string) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { 4097 c := &ProjectsLocationsRegistrationsRetrieveImportableDomainsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4098 c.location = location 4099 return c 4100 } 4101 4102 // PageSize sets the optional parameter "pageSize": Maximum number of results 4103 // to return. 4104 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) PageSize(pageSize int64) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { 4105 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 4106 return c 4107 } 4108 4109 // PageToken sets the optional parameter "pageToken": When set to the 4110 // `next_page_token` from a prior response, provides the next page of results. 4111 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) PageToken(pageToken string) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { 4112 c.urlParams_.Set("pageToken", pageToken) 4113 return c 4114 } 4115 4116 // Fields allows partial responses to be retrieved. See 4117 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4118 // details. 4119 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { 4120 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4121 return c 4122 } 4123 4124 // IfNoneMatch sets an optional parameter which makes the operation fail if the 4125 // object's ETag matches the given value. This is useful for getting updates 4126 // only after the object has changed since the last request. 4127 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { 4128 c.ifNoneMatch_ = entityTag 4129 return c 4130 } 4131 4132 // Context sets the context to be used in this call's Do method. 4133 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall { 4134 c.ctx_ = ctx 4135 return c 4136 } 4137 4138 // Header returns a http.Header that can be modified by the caller to add 4139 // headers to the request. 4140 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Header() http.Header { 4141 if c.header_ == nil { 4142 c.header_ = make(http.Header) 4143 } 4144 return c.header_ 4145 } 4146 4147 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) doRequest(alt string) (*http.Response, error) { 4148 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 4149 if c.ifNoneMatch_ != "" { 4150 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4151 } 4152 var body io.Reader = nil 4153 c.urlParams_.Set("alt", alt) 4154 c.urlParams_.Set("prettyPrint", "false") 4155 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}/registrations:retrieveImportableDomains") 4156 urls += "?" + c.urlParams_.Encode() 4157 req, err := http.NewRequest("GET", urls, body) 4158 if err != nil { 4159 return nil, err 4160 } 4161 req.Header = reqHeaders 4162 googleapi.Expand(req.URL, map[string]string{ 4163 "location": c.location, 4164 }) 4165 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4166 } 4167 4168 // Do executes the "domains.projects.locations.registrations.retrieveImportableDomains" call. 4169 // Any non-2xx status code is an error. Response headers are in either 4170 // *RetrieveImportableDomainsResponse.ServerResponse.Header or (if a response 4171 // was returned at all) in error.(*googleapi.Error).Header. Use 4172 // googleapi.IsNotModified to check whether the returned error was because 4173 // http.StatusNotModified was returned. 4174 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Do(opts ...googleapi.CallOption) (*RetrieveImportableDomainsResponse, error) { 4175 gensupport.SetOptions(c.urlParams_, opts...) 4176 res, err := c.doRequest("json") 4177 if res != nil && res.StatusCode == http.StatusNotModified { 4178 if res.Body != nil { 4179 res.Body.Close() 4180 } 4181 return nil, gensupport.WrapError(&googleapi.Error{ 4182 Code: res.StatusCode, 4183 Header: res.Header, 4184 }) 4185 } 4186 if err != nil { 4187 return nil, err 4188 } 4189 defer googleapi.CloseBody(res) 4190 if err := googleapi.CheckResponse(res); err != nil { 4191 return nil, gensupport.WrapError(err) 4192 } 4193 ret := &RetrieveImportableDomainsResponse{ 4194 ServerResponse: googleapi.ServerResponse{ 4195 Header: res.Header, 4196 HTTPStatusCode: res.StatusCode, 4197 }, 4198 } 4199 target := &ret 4200 if err := gensupport.DecodeResponse(target, res); err != nil { 4201 return nil, err 4202 } 4203 return ret, nil 4204 } 4205 4206 // Pages invokes f for each page of results. 4207 // A non-nil error returned from f will halt the iteration. 4208 // The provided context supersedes any context provided to the Context method. 4209 func (c *ProjectsLocationsRegistrationsRetrieveImportableDomainsCall) Pages(ctx context.Context, f func(*RetrieveImportableDomainsResponse) error) error { 4210 c.ctx_ = ctx 4211 defer c.PageToken(c.urlParams_.Get("pageToken")) 4212 for { 4213 x, err := c.Do() 4214 if err != nil { 4215 return err 4216 } 4217 if err := f(x); err != nil { 4218 return err 4219 } 4220 if x.NextPageToken == "" { 4221 return nil 4222 } 4223 c.PageToken(x.NextPageToken) 4224 } 4225 } 4226 4227 type ProjectsLocationsRegistrationsRetrieveRegisterParametersCall struct { 4228 s *Service 4229 location string 4230 urlParams_ gensupport.URLParams 4231 ifNoneMatch_ string 4232 ctx_ context.Context 4233 header_ http.Header 4234 } 4235 4236 // RetrieveRegisterParameters: Gets parameters needed to register a new domain 4237 // name, including price and up-to-date availability. Use the returned values 4238 // to call `RegisterDomain`. 4239 // 4240 // - location: The location. Must be in the format `projects/*/locations/*`. 4241 func (r *ProjectsLocationsRegistrationsService) RetrieveRegisterParameters(location string) *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall { 4242 c := &ProjectsLocationsRegistrationsRetrieveRegisterParametersCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4243 c.location = location 4244 return c 4245 } 4246 4247 // DomainName sets the optional parameter "domainName": Required. The domain 4248 // name. Unicode domain names must be expressed in Punycode format. 4249 func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) DomainName(domainName string) *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall { 4250 c.urlParams_.Set("domainName", domainName) 4251 return c 4252 } 4253 4254 // Fields allows partial responses to be retrieved. See 4255 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4256 // details. 4257 func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall { 4258 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4259 return c 4260 } 4261 4262 // IfNoneMatch sets an optional parameter which makes the operation fail if the 4263 // object's ETag matches the given value. This is useful for getting updates 4264 // only after the object has changed since the last request. 4265 func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall { 4266 c.ifNoneMatch_ = entityTag 4267 return c 4268 } 4269 4270 // Context sets the context to be used in this call's Do method. 4271 func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall { 4272 c.ctx_ = ctx 4273 return c 4274 } 4275 4276 // Header returns a http.Header that can be modified by the caller to add 4277 // headers to the request. 4278 func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) Header() http.Header { 4279 if c.header_ == nil { 4280 c.header_ = make(http.Header) 4281 } 4282 return c.header_ 4283 } 4284 4285 func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) doRequest(alt string) (*http.Response, error) { 4286 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 4287 if c.ifNoneMatch_ != "" { 4288 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4289 } 4290 var body io.Reader = nil 4291 c.urlParams_.Set("alt", alt) 4292 c.urlParams_.Set("prettyPrint", "false") 4293 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}/registrations:retrieveRegisterParameters") 4294 urls += "?" + c.urlParams_.Encode() 4295 req, err := http.NewRequest("GET", urls, body) 4296 if err != nil { 4297 return nil, err 4298 } 4299 req.Header = reqHeaders 4300 googleapi.Expand(req.URL, map[string]string{ 4301 "location": c.location, 4302 }) 4303 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4304 } 4305 4306 // Do executes the "domains.projects.locations.registrations.retrieveRegisterParameters" call. 4307 // Any non-2xx status code is an error. Response headers are in either 4308 // *RetrieveRegisterParametersResponse.ServerResponse.Header or (if a response 4309 // was returned at all) in error.(*googleapi.Error).Header. Use 4310 // googleapi.IsNotModified to check whether the returned error was because 4311 // http.StatusNotModified was returned. 4312 func (c *ProjectsLocationsRegistrationsRetrieveRegisterParametersCall) Do(opts ...googleapi.CallOption) (*RetrieveRegisterParametersResponse, error) { 4313 gensupport.SetOptions(c.urlParams_, opts...) 4314 res, err := c.doRequest("json") 4315 if res != nil && res.StatusCode == http.StatusNotModified { 4316 if res.Body != nil { 4317 res.Body.Close() 4318 } 4319 return nil, gensupport.WrapError(&googleapi.Error{ 4320 Code: res.StatusCode, 4321 Header: res.Header, 4322 }) 4323 } 4324 if err != nil { 4325 return nil, err 4326 } 4327 defer googleapi.CloseBody(res) 4328 if err := googleapi.CheckResponse(res); err != nil { 4329 return nil, gensupport.WrapError(err) 4330 } 4331 ret := &RetrieveRegisterParametersResponse{ 4332 ServerResponse: googleapi.ServerResponse{ 4333 Header: res.Header, 4334 HTTPStatusCode: res.StatusCode, 4335 }, 4336 } 4337 target := &ret 4338 if err := gensupport.DecodeResponse(target, res); err != nil { 4339 return nil, err 4340 } 4341 return ret, nil 4342 } 4343 4344 type ProjectsLocationsRegistrationsRetrieveTransferParametersCall struct { 4345 s *Service 4346 location string 4347 urlParams_ gensupport.URLParams 4348 ifNoneMatch_ string 4349 ctx_ context.Context 4350 header_ http.Header 4351 } 4352 4353 // RetrieveTransferParameters: Deprecated: For more information, see Cloud 4354 // Domains feature deprecation 4355 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations) 4356 // Gets parameters needed to transfer a domain name from another registrar to 4357 // Cloud Domains. For domains already managed by Google Domains 4358 // (https://domains.google/), use `ImportDomain` instead. Use the returned 4359 // values to call `TransferDomain`. 4360 // 4361 // - location: The location. Must be in the format `projects/*/locations/*`. 4362 func (r *ProjectsLocationsRegistrationsService) RetrieveTransferParameters(location string) *ProjectsLocationsRegistrationsRetrieveTransferParametersCall { 4363 c := &ProjectsLocationsRegistrationsRetrieveTransferParametersCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4364 c.location = location 4365 return c 4366 } 4367 4368 // DomainName sets the optional parameter "domainName": Required. The domain 4369 // name. Unicode domain names must be expressed in Punycode format. 4370 func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) DomainName(domainName string) *ProjectsLocationsRegistrationsRetrieveTransferParametersCall { 4371 c.urlParams_.Set("domainName", domainName) 4372 return c 4373 } 4374 4375 // Fields allows partial responses to be retrieved. See 4376 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4377 // details. 4378 func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsRetrieveTransferParametersCall { 4379 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4380 return c 4381 } 4382 4383 // IfNoneMatch sets an optional parameter which makes the operation fail if the 4384 // object's ETag matches the given value. This is useful for getting updates 4385 // only after the object has changed since the last request. 4386 func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsRetrieveTransferParametersCall { 4387 c.ifNoneMatch_ = entityTag 4388 return c 4389 } 4390 4391 // Context sets the context to be used in this call's Do method. 4392 func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsRetrieveTransferParametersCall { 4393 c.ctx_ = ctx 4394 return c 4395 } 4396 4397 // Header returns a http.Header that can be modified by the caller to add 4398 // headers to the request. 4399 func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) Header() http.Header { 4400 if c.header_ == nil { 4401 c.header_ = make(http.Header) 4402 } 4403 return c.header_ 4404 } 4405 4406 func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) doRequest(alt string) (*http.Response, error) { 4407 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 4408 if c.ifNoneMatch_ != "" { 4409 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4410 } 4411 var body io.Reader = nil 4412 c.urlParams_.Set("alt", alt) 4413 c.urlParams_.Set("prettyPrint", "false") 4414 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}/registrations:retrieveTransferParameters") 4415 urls += "?" + c.urlParams_.Encode() 4416 req, err := http.NewRequest("GET", urls, body) 4417 if err != nil { 4418 return nil, err 4419 } 4420 req.Header = reqHeaders 4421 googleapi.Expand(req.URL, map[string]string{ 4422 "location": c.location, 4423 }) 4424 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4425 } 4426 4427 // Do executes the "domains.projects.locations.registrations.retrieveTransferParameters" call. 4428 // Any non-2xx status code is an error. Response headers are in either 4429 // *RetrieveTransferParametersResponse.ServerResponse.Header or (if a response 4430 // was returned at all) in error.(*googleapi.Error).Header. Use 4431 // googleapi.IsNotModified to check whether the returned error was because 4432 // http.StatusNotModified was returned. 4433 func (c *ProjectsLocationsRegistrationsRetrieveTransferParametersCall) Do(opts ...googleapi.CallOption) (*RetrieveTransferParametersResponse, error) { 4434 gensupport.SetOptions(c.urlParams_, opts...) 4435 res, err := c.doRequest("json") 4436 if res != nil && res.StatusCode == http.StatusNotModified { 4437 if res.Body != nil { 4438 res.Body.Close() 4439 } 4440 return nil, gensupport.WrapError(&googleapi.Error{ 4441 Code: res.StatusCode, 4442 Header: res.Header, 4443 }) 4444 } 4445 if err != nil { 4446 return nil, err 4447 } 4448 defer googleapi.CloseBody(res) 4449 if err := googleapi.CheckResponse(res); err != nil { 4450 return nil, gensupport.WrapError(err) 4451 } 4452 ret := &RetrieveTransferParametersResponse{ 4453 ServerResponse: googleapi.ServerResponse{ 4454 Header: res.Header, 4455 HTTPStatusCode: res.StatusCode, 4456 }, 4457 } 4458 target := &ret 4459 if err := gensupport.DecodeResponse(target, res); err != nil { 4460 return nil, err 4461 } 4462 return ret, nil 4463 } 4464 4465 type ProjectsLocationsRegistrationsSearchDomainsCall struct { 4466 s *Service 4467 location string 4468 urlParams_ gensupport.URLParams 4469 ifNoneMatch_ string 4470 ctx_ context.Context 4471 header_ http.Header 4472 } 4473 4474 // SearchDomains: Searches for available domain names similar to the provided 4475 // query. Availability results from this method are approximate; call 4476 // `RetrieveRegisterParameters` on a domain before registering to confirm 4477 // availability. 4478 // 4479 // - location: The location. Must be in the format `projects/*/locations/*`. 4480 func (r *ProjectsLocationsRegistrationsService) SearchDomains(location string) *ProjectsLocationsRegistrationsSearchDomainsCall { 4481 c := &ProjectsLocationsRegistrationsSearchDomainsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4482 c.location = location 4483 return c 4484 } 4485 4486 // Query sets the optional parameter "query": Required. String used to search 4487 // for available domain names. 4488 func (c *ProjectsLocationsRegistrationsSearchDomainsCall) Query(query string) *ProjectsLocationsRegistrationsSearchDomainsCall { 4489 c.urlParams_.Set("query", query) 4490 return c 4491 } 4492 4493 // Fields allows partial responses to be retrieved. See 4494 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4495 // details. 4496 func (c *ProjectsLocationsRegistrationsSearchDomainsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsSearchDomainsCall { 4497 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4498 return c 4499 } 4500 4501 // IfNoneMatch sets an optional parameter which makes the operation fail if the 4502 // object's ETag matches the given value. This is useful for getting updates 4503 // only after the object has changed since the last request. 4504 func (c *ProjectsLocationsRegistrationsSearchDomainsCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistrationsSearchDomainsCall { 4505 c.ifNoneMatch_ = entityTag 4506 return c 4507 } 4508 4509 // Context sets the context to be used in this call's Do method. 4510 func (c *ProjectsLocationsRegistrationsSearchDomainsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsSearchDomainsCall { 4511 c.ctx_ = ctx 4512 return c 4513 } 4514 4515 // Header returns a http.Header that can be modified by the caller to add 4516 // headers to the request. 4517 func (c *ProjectsLocationsRegistrationsSearchDomainsCall) Header() http.Header { 4518 if c.header_ == nil { 4519 c.header_ = make(http.Header) 4520 } 4521 return c.header_ 4522 } 4523 4524 func (c *ProjectsLocationsRegistrationsSearchDomainsCall) doRequest(alt string) (*http.Response, error) { 4525 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 4526 if c.ifNoneMatch_ != "" { 4527 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4528 } 4529 var body io.Reader = nil 4530 c.urlParams_.Set("alt", alt) 4531 c.urlParams_.Set("prettyPrint", "false") 4532 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}/registrations:searchDomains") 4533 urls += "?" + c.urlParams_.Encode() 4534 req, err := http.NewRequest("GET", urls, body) 4535 if err != nil { 4536 return nil, err 4537 } 4538 req.Header = reqHeaders 4539 googleapi.Expand(req.URL, map[string]string{ 4540 "location": c.location, 4541 }) 4542 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4543 } 4544 4545 // Do executes the "domains.projects.locations.registrations.searchDomains" call. 4546 // Any non-2xx status code is an error. Response headers are in either 4547 // *SearchDomainsResponse.ServerResponse.Header or (if a response was returned 4548 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4549 // check whether the returned error was because http.StatusNotModified was 4550 // returned. 4551 func (c *ProjectsLocationsRegistrationsSearchDomainsCall) Do(opts ...googleapi.CallOption) (*SearchDomainsResponse, error) { 4552 gensupport.SetOptions(c.urlParams_, opts...) 4553 res, err := c.doRequest("json") 4554 if res != nil && res.StatusCode == http.StatusNotModified { 4555 if res.Body != nil { 4556 res.Body.Close() 4557 } 4558 return nil, gensupport.WrapError(&googleapi.Error{ 4559 Code: res.StatusCode, 4560 Header: res.Header, 4561 }) 4562 } 4563 if err != nil { 4564 return nil, err 4565 } 4566 defer googleapi.CloseBody(res) 4567 if err := googleapi.CheckResponse(res); err != nil { 4568 return nil, gensupport.WrapError(err) 4569 } 4570 ret := &SearchDomainsResponse{ 4571 ServerResponse: googleapi.ServerResponse{ 4572 Header: res.Header, 4573 HTTPStatusCode: res.StatusCode, 4574 }, 4575 } 4576 target := &ret 4577 if err := gensupport.DecodeResponse(target, res); err != nil { 4578 return nil, err 4579 } 4580 return ret, nil 4581 } 4582 4583 type ProjectsLocationsRegistrationsSetIamPolicyCall struct { 4584 s *Service 4585 resource string 4586 setiampolicyrequest *SetIamPolicyRequest 4587 urlParams_ gensupport.URLParams 4588 ctx_ context.Context 4589 header_ http.Header 4590 } 4591 4592 // SetIamPolicy: Sets the access control policy on the specified resource. 4593 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, 4594 // and `PERMISSION_DENIED` errors. 4595 // 4596 // - resource: REQUIRED: The resource for which the policy is being specified. 4597 // See Resource names (https://cloud.google.com/apis/design/resource_names) 4598 // for the appropriate value for this field. 4599 func (r *ProjectsLocationsRegistrationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRegistrationsSetIamPolicyCall { 4600 c := &ProjectsLocationsRegistrationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4601 c.resource = resource 4602 c.setiampolicyrequest = setiampolicyrequest 4603 return c 4604 } 4605 4606 // Fields allows partial responses to be retrieved. See 4607 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4608 // details. 4609 func (c *ProjectsLocationsRegistrationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsSetIamPolicyCall { 4610 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4611 return c 4612 } 4613 4614 // Context sets the context to be used in this call's Do method. 4615 func (c *ProjectsLocationsRegistrationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsSetIamPolicyCall { 4616 c.ctx_ = ctx 4617 return c 4618 } 4619 4620 // Header returns a http.Header that can be modified by the caller to add 4621 // headers to the request. 4622 func (c *ProjectsLocationsRegistrationsSetIamPolicyCall) Header() http.Header { 4623 if c.header_ == nil { 4624 c.header_ = make(http.Header) 4625 } 4626 return c.header_ 4627 } 4628 4629 func (c *ProjectsLocationsRegistrationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 4630 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4631 var body io.Reader = nil 4632 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 4633 if err != nil { 4634 return nil, err 4635 } 4636 c.urlParams_.Set("alt", alt) 4637 c.urlParams_.Set("prettyPrint", "false") 4638 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") 4639 urls += "?" + c.urlParams_.Encode() 4640 req, err := http.NewRequest("POST", urls, body) 4641 if err != nil { 4642 return nil, err 4643 } 4644 req.Header = reqHeaders 4645 googleapi.Expand(req.URL, map[string]string{ 4646 "resource": c.resource, 4647 }) 4648 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4649 } 4650 4651 // Do executes the "domains.projects.locations.registrations.setIamPolicy" call. 4652 // Any non-2xx status code is an error. Response headers are in either 4653 // *Policy.ServerResponse.Header or (if a response was returned at all) in 4654 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4655 // whether the returned error was because http.StatusNotModified was returned. 4656 func (c *ProjectsLocationsRegistrationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 4657 gensupport.SetOptions(c.urlParams_, opts...) 4658 res, err := c.doRequest("json") 4659 if res != nil && res.StatusCode == http.StatusNotModified { 4660 if res.Body != nil { 4661 res.Body.Close() 4662 } 4663 return nil, gensupport.WrapError(&googleapi.Error{ 4664 Code: res.StatusCode, 4665 Header: res.Header, 4666 }) 4667 } 4668 if err != nil { 4669 return nil, err 4670 } 4671 defer googleapi.CloseBody(res) 4672 if err := googleapi.CheckResponse(res); err != nil { 4673 return nil, gensupport.WrapError(err) 4674 } 4675 ret := &Policy{ 4676 ServerResponse: googleapi.ServerResponse{ 4677 Header: res.Header, 4678 HTTPStatusCode: res.StatusCode, 4679 }, 4680 } 4681 target := &ret 4682 if err := gensupport.DecodeResponse(target, res); err != nil { 4683 return nil, err 4684 } 4685 return ret, nil 4686 } 4687 4688 type ProjectsLocationsRegistrationsTestIamPermissionsCall struct { 4689 s *Service 4690 resource string 4691 testiampermissionsrequest *TestIamPermissionsRequest 4692 urlParams_ gensupport.URLParams 4693 ctx_ context.Context 4694 header_ http.Header 4695 } 4696 4697 // TestIamPermissions: Returns permissions that a caller has on the specified 4698 // resource. If the resource does not exist, this will return an empty set of 4699 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be 4700 // used for building permission-aware UIs and command-line tools, not for 4701 // authorization checking. This operation may "fail open" without warning. 4702 // 4703 // - resource: REQUIRED: The resource for which the policy detail is being 4704 // requested. See Resource names 4705 // (https://cloud.google.com/apis/design/resource_names) for the appropriate 4706 // value for this field. 4707 func (r *ProjectsLocationsRegistrationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRegistrationsTestIamPermissionsCall { 4708 c := &ProjectsLocationsRegistrationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4709 c.resource = resource 4710 c.testiampermissionsrequest = testiampermissionsrequest 4711 return c 4712 } 4713 4714 // Fields allows partial responses to be retrieved. See 4715 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4716 // details. 4717 func (c *ProjectsLocationsRegistrationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsTestIamPermissionsCall { 4718 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4719 return c 4720 } 4721 4722 // Context sets the context to be used in this call's Do method. 4723 func (c *ProjectsLocationsRegistrationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsTestIamPermissionsCall { 4724 c.ctx_ = ctx 4725 return c 4726 } 4727 4728 // Header returns a http.Header that can be modified by the caller to add 4729 // headers to the request. 4730 func (c *ProjectsLocationsRegistrationsTestIamPermissionsCall) Header() http.Header { 4731 if c.header_ == nil { 4732 c.header_ = make(http.Header) 4733 } 4734 return c.header_ 4735 } 4736 4737 func (c *ProjectsLocationsRegistrationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 4738 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4739 var body io.Reader = nil 4740 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 4741 if err != nil { 4742 return nil, err 4743 } 4744 c.urlParams_.Set("alt", alt) 4745 c.urlParams_.Set("prettyPrint", "false") 4746 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") 4747 urls += "?" + c.urlParams_.Encode() 4748 req, err := http.NewRequest("POST", urls, body) 4749 if err != nil { 4750 return nil, err 4751 } 4752 req.Header = reqHeaders 4753 googleapi.Expand(req.URL, map[string]string{ 4754 "resource": c.resource, 4755 }) 4756 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4757 } 4758 4759 // Do executes the "domains.projects.locations.registrations.testIamPermissions" call. 4760 // Any non-2xx status code is an error. Response headers are in either 4761 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was 4762 // returned at all) in error.(*googleapi.Error).Header. Use 4763 // googleapi.IsNotModified to check whether the returned error was because 4764 // http.StatusNotModified was returned. 4765 func (c *ProjectsLocationsRegistrationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 4766 gensupport.SetOptions(c.urlParams_, opts...) 4767 res, err := c.doRequest("json") 4768 if res != nil && res.StatusCode == http.StatusNotModified { 4769 if res.Body != nil { 4770 res.Body.Close() 4771 } 4772 return nil, gensupport.WrapError(&googleapi.Error{ 4773 Code: res.StatusCode, 4774 Header: res.Header, 4775 }) 4776 } 4777 if err != nil { 4778 return nil, err 4779 } 4780 defer googleapi.CloseBody(res) 4781 if err := googleapi.CheckResponse(res); err != nil { 4782 return nil, gensupport.WrapError(err) 4783 } 4784 ret := &TestIamPermissionsResponse{ 4785 ServerResponse: googleapi.ServerResponse{ 4786 Header: res.Header, 4787 HTTPStatusCode: res.StatusCode, 4788 }, 4789 } 4790 target := &ret 4791 if err := gensupport.DecodeResponse(target, res); err != nil { 4792 return nil, err 4793 } 4794 return ret, nil 4795 } 4796 4797 type ProjectsLocationsRegistrationsTransferCall struct { 4798 s *Service 4799 parent string 4800 transferdomainrequest *TransferDomainRequest 4801 urlParams_ gensupport.URLParams 4802 ctx_ context.Context 4803 header_ http.Header 4804 } 4805 4806 // Transfer: Deprecated: For more information, see Cloud Domains feature 4807 // deprecation 4808 // (https://cloud.google.com/domains/docs/deprecations/feature-deprecations) 4809 // Transfers a domain name from another registrar to Cloud Domains. For domains 4810 // already managed by Google Domains (https://domains.google/), use 4811 // `ImportDomain` instead. Before calling this method, go to the domain's 4812 // current registrar to unlock the domain for transfer and retrieve the 4813 // domain's transfer authorization code. Then call `RetrieveTransferParameters` 4814 // to confirm that the domain is unlocked and to get values needed to build a 4815 // call to this method. A successful call creates a `Registration` resource in 4816 // state `TRANSFER_PENDING`. It can take several days to complete the transfer 4817 // process. The registrant can often speed up this process by approving the 4818 // transfer through the current registrar, either by clicking a link in an 4819 // email from the registrar or by visiting the registrar's website. A few 4820 // minutes after transfer approval, the resource transitions to state `ACTIVE`, 4821 // indicating that the transfer was successful. If the transfer is rejected or 4822 // the request expires without being approved, the resource can end up in state 4823 // `TRANSFER_FAILED`. If transfer fails, you can safely delete the resource and 4824 // retry the transfer. 4825 // 4826 // - parent: The parent resource of the `Registration`. Must be in the format 4827 // `projects/*/locations/*`. 4828 func (r *ProjectsLocationsRegistrationsService) Transfer(parent string, transferdomainrequest *TransferDomainRequest) *ProjectsLocationsRegistrationsTransferCall { 4829 c := &ProjectsLocationsRegistrationsTransferCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4830 c.parent = parent 4831 c.transferdomainrequest = transferdomainrequest 4832 return c 4833 } 4834 4835 // Fields allows partial responses to be retrieved. See 4836 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4837 // details. 4838 func (c *ProjectsLocationsRegistrationsTransferCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistrationsTransferCall { 4839 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4840 return c 4841 } 4842 4843 // Context sets the context to be used in this call's Do method. 4844 func (c *ProjectsLocationsRegistrationsTransferCall) Context(ctx context.Context) *ProjectsLocationsRegistrationsTransferCall { 4845 c.ctx_ = ctx 4846 return c 4847 } 4848 4849 // Header returns a http.Header that can be modified by the caller to add 4850 // headers to the request. 4851 func (c *ProjectsLocationsRegistrationsTransferCall) Header() http.Header { 4852 if c.header_ == nil { 4853 c.header_ = make(http.Header) 4854 } 4855 return c.header_ 4856 } 4857 4858 func (c *ProjectsLocationsRegistrationsTransferCall) doRequest(alt string) (*http.Response, error) { 4859 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4860 var body io.Reader = nil 4861 body, err := googleapi.WithoutDataWrapper.JSONReader(c.transferdomainrequest) 4862 if err != nil { 4863 return nil, err 4864 } 4865 c.urlParams_.Set("alt", alt) 4866 c.urlParams_.Set("prettyPrint", "false") 4867 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/registrations:transfer") 4868 urls += "?" + c.urlParams_.Encode() 4869 req, err := http.NewRequest("POST", urls, body) 4870 if err != nil { 4871 return nil, err 4872 } 4873 req.Header = reqHeaders 4874 googleapi.Expand(req.URL, map[string]string{ 4875 "parent": c.parent, 4876 }) 4877 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4878 } 4879 4880 // Do executes the "domains.projects.locations.registrations.transfer" call. 4881 // Any non-2xx status code is an error. Response headers are in either 4882 // *Operation.ServerResponse.Header or (if a response was returned at all) in 4883 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4884 // whether the returned error was because http.StatusNotModified was returned. 4885 func (c *ProjectsLocationsRegistrationsTransferCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4886 gensupport.SetOptions(c.urlParams_, opts...) 4887 res, err := c.doRequest("json") 4888 if res != nil && res.StatusCode == http.StatusNotModified { 4889 if res.Body != nil { 4890 res.Body.Close() 4891 } 4892 return nil, gensupport.WrapError(&googleapi.Error{ 4893 Code: res.StatusCode, 4894 Header: res.Header, 4895 }) 4896 } 4897 if err != nil { 4898 return nil, err 4899 } 4900 defer googleapi.CloseBody(res) 4901 if err := googleapi.CheckResponse(res); err != nil { 4902 return nil, gensupport.WrapError(err) 4903 } 4904 ret := &Operation{ 4905 ServerResponse: googleapi.ServerResponse{ 4906 Header: res.Header, 4907 HTTPStatusCode: res.StatusCode, 4908 }, 4909 } 4910 target := &ret 4911 if err := gensupport.DecodeResponse(target, res); err != nil { 4912 return nil, err 4913 } 4914 return ret, nil 4915 } 4916