1// Copyright 2021 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 domainsrdap provides access to the Domains RDAP API. 8// 9// For product documentation, see: https://developers.google.com/domains/rdap/ 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/domainsrdap/v1" 16// ... 17// ctx := context.Background() 18// domainsrdapService, err := domainsrdap.NewService(ctx) 19// 20// In this example, Google Application Default Credentials are used for authentication. 21// 22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23// 24// Other authentication options 25// 26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 27// 28// domainsrdapService, err := domainsrdap.NewService(ctx, option.WithAPIKey("AIza...")) 29// 30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 31// 32// config := &oauth2.Config{...} 33// // ... 34// token, err := config.Exchange(ctx, ...) 35// domainsrdapService, err := domainsrdap.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36// 37// See https://godoc.org/google.golang.org/api/option/ for details on options. 38package domainsrdap // import "google.golang.org/api/domainsrdap/v1" 39 40import ( 41 "bytes" 42 "context" 43 "encoding/json" 44 "errors" 45 "fmt" 46 "io" 47 "net/http" 48 "net/url" 49 "strconv" 50 "strings" 51 52 googleapi "google.golang.org/api/googleapi" 53 gensupport "google.golang.org/api/internal/gensupport" 54 option "google.golang.org/api/option" 55 internaloption "google.golang.org/api/option/internaloption" 56 htransport "google.golang.org/api/transport/http" 57) 58 59// Always reference these packages, just in case the auto-generated code 60// below doesn't. 61var _ = bytes.NewBuffer 62var _ = strconv.Itoa 63var _ = fmt.Sprintf 64var _ = json.NewDecoder 65var _ = io.Copy 66var _ = url.Parse 67var _ = gensupport.MarshalJSON 68var _ = googleapi.Version 69var _ = errors.New 70var _ = strings.Replace 71var _ = context.Canceled 72var _ = internaloption.WithDefaultEndpoint 73 74const apiId = "domainsrdap:v1" 75const apiName = "domainsrdap" 76const apiVersion = "v1" 77const basePath = "https://domainsrdap.googleapis.com/" 78const mtlsBasePath = "https://domainsrdap.mtls.googleapis.com/" 79 80// NewService creates a new Service. 81func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 82 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 83 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 84 client, endpoint, err := htransport.NewClient(ctx, opts...) 85 if err != nil { 86 return nil, err 87 } 88 s, err := New(client) 89 if err != nil { 90 return nil, err 91 } 92 if endpoint != "" { 93 s.BasePath = endpoint 94 } 95 return s, nil 96} 97 98// New creates a new Service. It uses the provided http.Client for requests. 99// 100// Deprecated: please use NewService instead. 101// To provide a custom HTTP client, use option.WithHTTPClient. 102// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 103func New(client *http.Client) (*Service, error) { 104 if client == nil { 105 return nil, errors.New("client is nil") 106 } 107 s := &Service{client: client, BasePath: basePath} 108 s.Autnum = NewAutnumService(s) 109 s.Domain = NewDomainService(s) 110 s.Entity = NewEntityService(s) 111 s.Ip = NewIpService(s) 112 s.Nameserver = NewNameserverService(s) 113 s.V1 = NewV1Service(s) 114 return s, nil 115} 116 117type Service struct { 118 client *http.Client 119 BasePath string // API endpoint base URL 120 UserAgent string // optional additional User-Agent fragment 121 122 Autnum *AutnumService 123 124 Domain *DomainService 125 126 Entity *EntityService 127 128 Ip *IpService 129 130 Nameserver *NameserverService 131 132 V1 *V1Service 133} 134 135func (s *Service) userAgent() string { 136 if s.UserAgent == "" { 137 return googleapi.UserAgent 138 } 139 return googleapi.UserAgent + " " + s.UserAgent 140} 141 142func NewAutnumService(s *Service) *AutnumService { 143 rs := &AutnumService{s: s} 144 return rs 145} 146 147type AutnumService struct { 148 s *Service 149} 150 151func NewDomainService(s *Service) *DomainService { 152 rs := &DomainService{s: s} 153 return rs 154} 155 156type DomainService struct { 157 s *Service 158} 159 160func NewEntityService(s *Service) *EntityService { 161 rs := &EntityService{s: s} 162 return rs 163} 164 165type EntityService struct { 166 s *Service 167} 168 169func NewIpService(s *Service) *IpService { 170 rs := &IpService{s: s} 171 return rs 172} 173 174type IpService struct { 175 s *Service 176} 177 178func NewNameserverService(s *Service) *NameserverService { 179 rs := &NameserverService{s: s} 180 return rs 181} 182 183type NameserverService struct { 184 s *Service 185} 186 187func NewV1Service(s *Service) *V1Service { 188 rs := &V1Service{s: s} 189 return rs 190} 191 192type V1Service struct { 193 s *Service 194} 195 196// HttpBody: Message that represents an arbitrary HTTP body. It should 197// only be used for payload formats that can't be represented as JSON, 198// such as raw binary or an HTML page. This message can be used both in 199// streaming and non-streaming API methods in the request as well as the 200// response. It can be used as a top-level request field, which is 201// convenient if one wants to extract parameters from either the URL or 202// HTTP template into the request fields and also want access to the raw 203// HTTP body. Example: message GetResourceRequest { // A unique request 204// id. string request_id = 1; // The raw HTTP body is bound to this 205// field. google.api.HttpBody http_body = 2; } service ResourceService { 206// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); 207// rpc UpdateResource(google.api.HttpBody) returns 208// (google.protobuf.Empty); } Example with streaming methods: service 209// CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns 210// (stream google.api.HttpBody); rpc UpdateCalendar(stream 211// google.api.HttpBody) returns (stream google.api.HttpBody); } Use of 212// this type only changes how the request and response bodies are 213// handled, all other features will continue to work unchanged. 214type HttpBody struct { 215 // ContentType: The HTTP Content-Type header value specifying the 216 // content type of the body. 217 ContentType string `json:"contentType,omitempty"` 218 219 // Data: The HTTP request/response body as raw binary. 220 Data string `json:"data,omitempty"` 221 222 // Extensions: Application specific response metadata. Must be set in 223 // the first response for streaming APIs. 224 Extensions []googleapi.RawMessage `json:"extensions,omitempty"` 225 226 // ServerResponse contains the HTTP response code and headers from the 227 // server. 228 googleapi.ServerResponse `json:"-"` 229 230 // ForceSendFields is a list of field names (e.g. "ContentType") to 231 // unconditionally include in API requests. By default, fields with 232 // empty or default values are omitted from API requests. However, any 233 // non-pointer, non-interface field appearing in ForceSendFields will be 234 // sent to the server regardless of whether the field is empty or not. 235 // This may be used to include empty fields in Patch requests. 236 ForceSendFields []string `json:"-"` 237 238 // NullFields is a list of field names (e.g. "ContentType") to include 239 // in API requests with the JSON null value. By default, fields with 240 // empty values are omitted from API requests. However, any field with 241 // an empty value appearing in NullFields will be sent to the server as 242 // null. It is an error if a field in this list has a non-empty value. 243 // This may be used to include null fields in Patch requests. 244 NullFields []string `json:"-"` 245} 246 247func (s *HttpBody) MarshalJSON() ([]byte, error) { 248 type NoMethod HttpBody 249 raw := NoMethod(*s) 250 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 251} 252 253// Link: Links object defined in section 4.2 of RFC 7483 254// (https://tools.ietf.org/html/rfc7483#section-4.2). 255type Link struct { 256 // Href: Target URL of a link. Example: "http://example.com/previous". 257 Href string `json:"href,omitempty"` 258 259 // Hreflang: Language code of a link. Example: "en". 260 Hreflang string `json:"hreflang,omitempty"` 261 262 // Media: Media type of the link destination. Example: "screen". 263 Media string `json:"media,omitempty"` 264 265 // Rel: Relation type of a link. Example: "previous". 266 Rel string `json:"rel,omitempty"` 267 268 // Title: Title of this link. Example: "title". 269 Title string `json:"title,omitempty"` 270 271 // Type: Content type of the link. Example: "application/json". 272 Type string `json:"type,omitempty"` 273 274 // Value: URL giving context for the link. Example: 275 // "http://example.com/current". 276 Value string `json:"value,omitempty"` 277 278 // ForceSendFields is a list of field names (e.g. "Href") to 279 // unconditionally include in API requests. By default, fields with 280 // empty or default values are omitted from API requests. However, any 281 // non-pointer, non-interface field appearing in ForceSendFields will be 282 // sent to the server regardless of whether the field is empty or not. 283 // This may be used to include empty fields in Patch requests. 284 ForceSendFields []string `json:"-"` 285 286 // NullFields is a list of field names (e.g. "Href") to include in API 287 // requests with the JSON null value. By default, fields with empty 288 // values are omitted from API requests. However, any field with an 289 // empty value appearing in NullFields will be sent to the server as 290 // null. It is an error if a field in this list has a non-empty value. 291 // This may be used to include null fields in Patch requests. 292 NullFields []string `json:"-"` 293} 294 295func (s *Link) MarshalJSON() ([]byte, error) { 296 type NoMethod Link 297 raw := NoMethod(*s) 298 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 299} 300 301// Notice: Notices object defined in section 4.3 of RFC 7483 302// (https://tools.ietf.org/html/rfc7483#section-4.3). 303type Notice struct { 304 // Description: Description of the notice. 305 Description []string `json:"description,omitempty"` 306 307 // Links: Link to a document containing more information. 308 Links []*Link `json:"links,omitempty"` 309 310 // Title: Title of a notice. Example: "Terms of Service". 311 Title string `json:"title,omitempty"` 312 313 // Type: Type values defined in section 10.2.1 of RFC 7483 314 // (https://tools.ietf.org/html/rfc7483#section-10.2.1) specific to a 315 // whole response: "result set truncated due to authorization", "result 316 // set truncated due to excessive load", "result set truncated due to 317 // unexplainable reasons". 318 Type string `json:"type,omitempty"` 319 320 // ForceSendFields is a list of field names (e.g. "Description") to 321 // unconditionally include in API requests. By default, fields with 322 // empty or default values are omitted from API requests. However, any 323 // non-pointer, non-interface field appearing in ForceSendFields will be 324 // sent to the server regardless of whether the field is empty or not. 325 // This may be used to include empty fields in Patch requests. 326 ForceSendFields []string `json:"-"` 327 328 // NullFields is a list of field names (e.g. "Description") to include 329 // in API requests with the JSON null value. By default, fields with 330 // empty values are omitted from API requests. However, any field with 331 // an empty value appearing in NullFields will be sent to the server as 332 // null. It is an error if a field in this list has a non-empty value. 333 // This may be used to include null fields in Patch requests. 334 NullFields []string `json:"-"` 335} 336 337func (s *Notice) MarshalJSON() ([]byte, error) { 338 type NoMethod Notice 339 raw := NoMethod(*s) 340 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 341} 342 343// RdapResponse: Response to a general RDAP query. 344type RdapResponse struct { 345 // Description: Error description. 346 Description []string `json:"description,omitempty"` 347 348 // ErrorCode: Error HTTP code. Example: "501". 349 ErrorCode int64 `json:"errorCode,omitempty"` 350 351 // JsonResponse: HTTP response with content type set to 352 // "application/json+rdap". 353 JsonResponse *HttpBody `json:"jsonResponse,omitempty"` 354 355 // Lang: Error language code. Error response info fields are defined in 356 // section 6 of RFC 7483 357 // (https://tools.ietf.org/html/rfc7483#section-6). 358 Lang string `json:"lang,omitempty"` 359 360 // Notices: Notices applying to this response. 361 Notices []*Notice `json:"notices,omitempty"` 362 363 // RdapConformance: RDAP conformance level. 364 RdapConformance []string `json:"rdapConformance,omitempty"` 365 366 // Title: Error title. 367 Title string `json:"title,omitempty"` 368 369 // ServerResponse contains the HTTP response code and headers from the 370 // server. 371 googleapi.ServerResponse `json:"-"` 372 373 // ForceSendFields is a list of field names (e.g. "Description") to 374 // unconditionally include in API requests. By default, fields with 375 // empty or default values are omitted from API requests. However, any 376 // non-pointer, non-interface field appearing in ForceSendFields will be 377 // sent to the server regardless of whether the field is empty or not. 378 // This may be used to include empty fields in Patch requests. 379 ForceSendFields []string `json:"-"` 380 381 // NullFields is a list of field names (e.g. "Description") to include 382 // in API requests with the JSON null value. By default, fields with 383 // empty values are omitted from API requests. However, any field with 384 // an empty value appearing in NullFields will be sent to the server as 385 // null. It is an error if a field in this list has a non-empty value. 386 // This may be used to include null fields in Patch requests. 387 NullFields []string `json:"-"` 388} 389 390func (s *RdapResponse) MarshalJSON() ([]byte, error) { 391 type NoMethod RdapResponse 392 raw := NoMethod(*s) 393 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 394} 395 396// method id "domainsrdap.autnum.get": 397 398type AutnumGetCall struct { 399 s *Service 400 autnumId string 401 urlParams_ gensupport.URLParams 402 ifNoneMatch_ string 403 ctx_ context.Context 404 header_ http.Header 405} 406 407// Get: The RDAP API recognizes this command from the RDAP specification 408// but does not support it. The response is a formatted 501 error. 409// 410// - autnumId: . 411func (r *AutnumService) Get(autnumId string) *AutnumGetCall { 412 c := &AutnumGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 413 c.autnumId = autnumId 414 return c 415} 416 417// Fields allows partial responses to be retrieved. See 418// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 419// for more information. 420func (c *AutnumGetCall) Fields(s ...googleapi.Field) *AutnumGetCall { 421 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 422 return c 423} 424 425// IfNoneMatch sets the optional parameter which makes the operation 426// fail if the object's ETag matches the given value. This is useful for 427// getting updates only after the object has changed since the last 428// request. Use googleapi.IsNotModified to check whether the response 429// error from Do is the result of In-None-Match. 430func (c *AutnumGetCall) IfNoneMatch(entityTag string) *AutnumGetCall { 431 c.ifNoneMatch_ = entityTag 432 return c 433} 434 435// Context sets the context to be used in this call's Do method. Any 436// pending HTTP request will be aborted if the provided context is 437// canceled. 438func (c *AutnumGetCall) Context(ctx context.Context) *AutnumGetCall { 439 c.ctx_ = ctx 440 return c 441} 442 443// Header returns an http.Header that can be modified by the caller to 444// add HTTP headers to the request. 445func (c *AutnumGetCall) Header() http.Header { 446 if c.header_ == nil { 447 c.header_ = make(http.Header) 448 } 449 return c.header_ 450} 451 452func (c *AutnumGetCall) doRequest(alt string) (*http.Response, error) { 453 reqHeaders := make(http.Header) 454 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 455 for k, v := range c.header_ { 456 reqHeaders[k] = v 457 } 458 reqHeaders.Set("User-Agent", c.s.userAgent()) 459 if c.ifNoneMatch_ != "" { 460 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 461 } 462 var body io.Reader = nil 463 c.urlParams_.Set("alt", alt) 464 c.urlParams_.Set("prettyPrint", "false") 465 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/autnum/{autnumId}") 466 urls += "?" + c.urlParams_.Encode() 467 req, err := http.NewRequest("GET", urls, body) 468 if err != nil { 469 return nil, err 470 } 471 req.Header = reqHeaders 472 googleapi.Expand(req.URL, map[string]string{ 473 "autnumId": c.autnumId, 474 }) 475 return gensupport.SendRequest(c.ctx_, c.s.client, req) 476} 477 478// Do executes the "domainsrdap.autnum.get" call. 479// Exactly one of *RdapResponse or error will be non-nil. Any non-2xx 480// status code is an error. Response headers are in either 481// *RdapResponse.ServerResponse.Header or (if a response was returned at 482// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 483// to check whether the returned error was because 484// http.StatusNotModified was returned. 485func (c *AutnumGetCall) Do(opts ...googleapi.CallOption) (*RdapResponse, error) { 486 gensupport.SetOptions(c.urlParams_, opts...) 487 res, err := c.doRequest("json") 488 if res != nil && res.StatusCode == http.StatusNotModified { 489 if res.Body != nil { 490 res.Body.Close() 491 } 492 return nil, &googleapi.Error{ 493 Code: res.StatusCode, 494 Header: res.Header, 495 } 496 } 497 if err != nil { 498 return nil, err 499 } 500 defer googleapi.CloseBody(res) 501 if err := googleapi.CheckResponse(res); err != nil { 502 return nil, err 503 } 504 ret := &RdapResponse{ 505 ServerResponse: googleapi.ServerResponse{ 506 Header: res.Header, 507 HTTPStatusCode: res.StatusCode, 508 }, 509 } 510 target := &ret 511 if err := gensupport.DecodeResponse(target, res); err != nil { 512 return nil, err 513 } 514 return ret, nil 515 // { 516 // "description": "The RDAP API recognizes this command from the RDAP specification but does not support it. The response is a formatted 501 error.", 517 // "flatPath": "v1/autnum/{autnumId}", 518 // "httpMethod": "GET", 519 // "id": "domainsrdap.autnum.get", 520 // "parameterOrder": [ 521 // "autnumId" 522 // ], 523 // "parameters": { 524 // "autnumId": { 525 // "location": "path", 526 // "required": true, 527 // "type": "string" 528 // } 529 // }, 530 // "path": "v1/autnum/{autnumId}", 531 // "response": { 532 // "$ref": "RdapResponse" 533 // } 534 // } 535 536} 537 538// method id "domainsrdap.domain.get": 539 540type DomainGetCall struct { 541 s *Service 542 domainName string 543 urlParams_ gensupport.URLParams 544 ifNoneMatch_ string 545 ctx_ context.Context 546 header_ http.Header 547} 548 549// Get: Look up RDAP information for a domain by name. 550// 551// - domainName: Full domain name to look up. Example: "example.com". 552func (r *DomainService) Get(domainName string) *DomainGetCall { 553 c := &DomainGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 554 c.domainName = domainName 555 return c 556} 557 558// Fields allows partial responses to be retrieved. See 559// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 560// for more information. 561func (c *DomainGetCall) Fields(s ...googleapi.Field) *DomainGetCall { 562 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 563 return c 564} 565 566// IfNoneMatch sets the optional parameter which makes the operation 567// fail if the object's ETag matches the given value. This is useful for 568// getting updates only after the object has changed since the last 569// request. Use googleapi.IsNotModified to check whether the response 570// error from Do is the result of In-None-Match. 571func (c *DomainGetCall) IfNoneMatch(entityTag string) *DomainGetCall { 572 c.ifNoneMatch_ = entityTag 573 return c 574} 575 576// Context sets the context to be used in this call's Do method. Any 577// pending HTTP request will be aborted if the provided context is 578// canceled. 579func (c *DomainGetCall) Context(ctx context.Context) *DomainGetCall { 580 c.ctx_ = ctx 581 return c 582} 583 584// Header returns an http.Header that can be modified by the caller to 585// add HTTP headers to the request. 586func (c *DomainGetCall) Header() http.Header { 587 if c.header_ == nil { 588 c.header_ = make(http.Header) 589 } 590 return c.header_ 591} 592 593func (c *DomainGetCall) doRequest(alt string) (*http.Response, error) { 594 reqHeaders := make(http.Header) 595 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 596 for k, v := range c.header_ { 597 reqHeaders[k] = v 598 } 599 reqHeaders.Set("User-Agent", c.s.userAgent()) 600 if c.ifNoneMatch_ != "" { 601 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 602 } 603 var body io.Reader = nil 604 c.urlParams_.Set("alt", alt) 605 c.urlParams_.Set("prettyPrint", "false") 606 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/domain/{+domainName}") 607 urls += "?" + c.urlParams_.Encode() 608 req, err := http.NewRequest("GET", urls, body) 609 if err != nil { 610 return nil, err 611 } 612 req.Header = reqHeaders 613 googleapi.Expand(req.URL, map[string]string{ 614 "domainName": c.domainName, 615 }) 616 return gensupport.SendRequest(c.ctx_, c.s.client, req) 617} 618 619// Do executes the "domainsrdap.domain.get" call. 620// Exactly one of *HttpBody or error will be non-nil. Any non-2xx status 621// code is an error. Response headers are in either 622// *HttpBody.ServerResponse.Header or (if a response was returned at 623// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 624// to check whether the returned error was because 625// http.StatusNotModified was returned. 626func (c *DomainGetCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) { 627 gensupport.SetOptions(c.urlParams_, opts...) 628 res, err := c.doRequest("json") 629 if res != nil && res.StatusCode == http.StatusNotModified { 630 if res.Body != nil { 631 res.Body.Close() 632 } 633 return nil, &googleapi.Error{ 634 Code: res.StatusCode, 635 Header: res.Header, 636 } 637 } 638 if err != nil { 639 return nil, err 640 } 641 defer googleapi.CloseBody(res) 642 if err := googleapi.CheckResponse(res); err != nil { 643 return nil, err 644 } 645 ret := &HttpBody{ 646 ServerResponse: googleapi.ServerResponse{ 647 Header: res.Header, 648 HTTPStatusCode: res.StatusCode, 649 }, 650 } 651 target := &ret 652 if err := gensupport.DecodeResponse(target, res); err != nil { 653 return nil, err 654 } 655 return ret, nil 656 // { 657 // "description": "Look up RDAP information for a domain by name.", 658 // "flatPath": "v1/domain/{domainId}", 659 // "httpMethod": "GET", 660 // "id": "domainsrdap.domain.get", 661 // "parameterOrder": [ 662 // "domainName" 663 // ], 664 // "parameters": { 665 // "domainName": { 666 // "description": "Full domain name to look up. Example: \"example.com\"", 667 // "location": "path", 668 // "pattern": "^[^/]+$", 669 // "required": true, 670 // "type": "string" 671 // } 672 // }, 673 // "path": "v1/domain/{+domainName}", 674 // "response": { 675 // "$ref": "HttpBody" 676 // } 677 // } 678 679} 680 681// method id "domainsrdap.entity.get": 682 683type EntityGetCall struct { 684 s *Service 685 entityId string 686 urlParams_ gensupport.URLParams 687 ifNoneMatch_ string 688 ctx_ context.Context 689 header_ http.Header 690} 691 692// Get: The RDAP API recognizes this command from the RDAP specification 693// but does not support it. The response is a formatted 501 error. 694// 695// - entityId: . 696func (r *EntityService) Get(entityId string) *EntityGetCall { 697 c := &EntityGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 698 c.entityId = entityId 699 return c 700} 701 702// Fields allows partial responses to be retrieved. See 703// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 704// for more information. 705func (c *EntityGetCall) Fields(s ...googleapi.Field) *EntityGetCall { 706 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 707 return c 708} 709 710// IfNoneMatch sets the optional parameter which makes the operation 711// fail if the object's ETag matches the given value. This is useful for 712// getting updates only after the object has changed since the last 713// request. Use googleapi.IsNotModified to check whether the response 714// error from Do is the result of In-None-Match. 715func (c *EntityGetCall) IfNoneMatch(entityTag string) *EntityGetCall { 716 c.ifNoneMatch_ = entityTag 717 return c 718} 719 720// Context sets the context to be used in this call's Do method. Any 721// pending HTTP request will be aborted if the provided context is 722// canceled. 723func (c *EntityGetCall) Context(ctx context.Context) *EntityGetCall { 724 c.ctx_ = ctx 725 return c 726} 727 728// Header returns an http.Header that can be modified by the caller to 729// add HTTP headers to the request. 730func (c *EntityGetCall) Header() http.Header { 731 if c.header_ == nil { 732 c.header_ = make(http.Header) 733 } 734 return c.header_ 735} 736 737func (c *EntityGetCall) doRequest(alt string) (*http.Response, error) { 738 reqHeaders := make(http.Header) 739 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 740 for k, v := range c.header_ { 741 reqHeaders[k] = v 742 } 743 reqHeaders.Set("User-Agent", c.s.userAgent()) 744 if c.ifNoneMatch_ != "" { 745 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 746 } 747 var body io.Reader = nil 748 c.urlParams_.Set("alt", alt) 749 c.urlParams_.Set("prettyPrint", "false") 750 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/entity/{entityId}") 751 urls += "?" + c.urlParams_.Encode() 752 req, err := http.NewRequest("GET", urls, body) 753 if err != nil { 754 return nil, err 755 } 756 req.Header = reqHeaders 757 googleapi.Expand(req.URL, map[string]string{ 758 "entityId": c.entityId, 759 }) 760 return gensupport.SendRequest(c.ctx_, c.s.client, req) 761} 762 763// Do executes the "domainsrdap.entity.get" call. 764// Exactly one of *RdapResponse or error will be non-nil. Any non-2xx 765// status code is an error. Response headers are in either 766// *RdapResponse.ServerResponse.Header or (if a response was returned at 767// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 768// to check whether the returned error was because 769// http.StatusNotModified was returned. 770func (c *EntityGetCall) Do(opts ...googleapi.CallOption) (*RdapResponse, error) { 771 gensupport.SetOptions(c.urlParams_, opts...) 772 res, err := c.doRequest("json") 773 if res != nil && res.StatusCode == http.StatusNotModified { 774 if res.Body != nil { 775 res.Body.Close() 776 } 777 return nil, &googleapi.Error{ 778 Code: res.StatusCode, 779 Header: res.Header, 780 } 781 } 782 if err != nil { 783 return nil, err 784 } 785 defer googleapi.CloseBody(res) 786 if err := googleapi.CheckResponse(res); err != nil { 787 return nil, err 788 } 789 ret := &RdapResponse{ 790 ServerResponse: googleapi.ServerResponse{ 791 Header: res.Header, 792 HTTPStatusCode: res.StatusCode, 793 }, 794 } 795 target := &ret 796 if err := gensupport.DecodeResponse(target, res); err != nil { 797 return nil, err 798 } 799 return ret, nil 800 // { 801 // "description": "The RDAP API recognizes this command from the RDAP specification but does not support it. The response is a formatted 501 error.", 802 // "flatPath": "v1/entity/{entityId}", 803 // "httpMethod": "GET", 804 // "id": "domainsrdap.entity.get", 805 // "parameterOrder": [ 806 // "entityId" 807 // ], 808 // "parameters": { 809 // "entityId": { 810 // "location": "path", 811 // "required": true, 812 // "type": "string" 813 // } 814 // }, 815 // "path": "v1/entity/{entityId}", 816 // "response": { 817 // "$ref": "RdapResponse" 818 // } 819 // } 820 821} 822 823// method id "domainsrdap.ip.get": 824 825type IpGetCall struct { 826 s *Service 827 ipId string 828 ipId1 string 829 urlParams_ gensupport.URLParams 830 ifNoneMatch_ string 831 ctx_ context.Context 832 header_ http.Header 833} 834 835// Get: The RDAP API recognizes this command from the RDAP specification 836// but does not support it. The response is a formatted 501 error. 837// 838// - ipId: . 839// - ipId1: . 840func (r *IpService) Get(ipId string, ipId1 string) *IpGetCall { 841 c := &IpGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 842 c.ipId = ipId 843 c.ipId1 = ipId1 844 return c 845} 846 847// Fields allows partial responses to be retrieved. See 848// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 849// for more information. 850func (c *IpGetCall) Fields(s ...googleapi.Field) *IpGetCall { 851 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 852 return c 853} 854 855// IfNoneMatch sets the optional parameter which makes the operation 856// fail if the object's ETag matches the given value. This is useful for 857// getting updates only after the object has changed since the last 858// request. Use googleapi.IsNotModified to check whether the response 859// error from Do is the result of In-None-Match. 860func (c *IpGetCall) IfNoneMatch(entityTag string) *IpGetCall { 861 c.ifNoneMatch_ = entityTag 862 return c 863} 864 865// Context sets the context to be used in this call's Do method. Any 866// pending HTTP request will be aborted if the provided context is 867// canceled. 868func (c *IpGetCall) Context(ctx context.Context) *IpGetCall { 869 c.ctx_ = ctx 870 return c 871} 872 873// Header returns an http.Header that can be modified by the caller to 874// add HTTP headers to the request. 875func (c *IpGetCall) Header() http.Header { 876 if c.header_ == nil { 877 c.header_ = make(http.Header) 878 } 879 return c.header_ 880} 881 882func (c *IpGetCall) doRequest(alt string) (*http.Response, error) { 883 reqHeaders := make(http.Header) 884 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 885 for k, v := range c.header_ { 886 reqHeaders[k] = v 887 } 888 reqHeaders.Set("User-Agent", c.s.userAgent()) 889 if c.ifNoneMatch_ != "" { 890 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 891 } 892 var body io.Reader = nil 893 c.urlParams_.Set("alt", alt) 894 c.urlParams_.Set("prettyPrint", "false") 895 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/ip/{ipId}/{ipId1}") 896 urls += "?" + c.urlParams_.Encode() 897 req, err := http.NewRequest("GET", urls, body) 898 if err != nil { 899 return nil, err 900 } 901 req.Header = reqHeaders 902 googleapi.Expand(req.URL, map[string]string{ 903 "ipId": c.ipId, 904 "ipId1": c.ipId1, 905 }) 906 return gensupport.SendRequest(c.ctx_, c.s.client, req) 907} 908 909// Do executes the "domainsrdap.ip.get" call. 910// Exactly one of *RdapResponse or error will be non-nil. Any non-2xx 911// status code is an error. Response headers are in either 912// *RdapResponse.ServerResponse.Header or (if a response was returned at 913// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 914// to check whether the returned error was because 915// http.StatusNotModified was returned. 916func (c *IpGetCall) Do(opts ...googleapi.CallOption) (*RdapResponse, error) { 917 gensupport.SetOptions(c.urlParams_, opts...) 918 res, err := c.doRequest("json") 919 if res != nil && res.StatusCode == http.StatusNotModified { 920 if res.Body != nil { 921 res.Body.Close() 922 } 923 return nil, &googleapi.Error{ 924 Code: res.StatusCode, 925 Header: res.Header, 926 } 927 } 928 if err != nil { 929 return nil, err 930 } 931 defer googleapi.CloseBody(res) 932 if err := googleapi.CheckResponse(res); err != nil { 933 return nil, err 934 } 935 ret := &RdapResponse{ 936 ServerResponse: googleapi.ServerResponse{ 937 Header: res.Header, 938 HTTPStatusCode: res.StatusCode, 939 }, 940 } 941 target := &ret 942 if err := gensupport.DecodeResponse(target, res); err != nil { 943 return nil, err 944 } 945 return ret, nil 946 // { 947 // "description": "The RDAP API recognizes this command from the RDAP specification but does not support it. The response is a formatted 501 error.", 948 // "flatPath": "v1/ip/{ipId}/{ipId1}", 949 // "httpMethod": "GET", 950 // "id": "domainsrdap.ip.get", 951 // "parameterOrder": [ 952 // "ipId", 953 // "ipId1" 954 // ], 955 // "parameters": { 956 // "ipId": { 957 // "location": "path", 958 // "required": true, 959 // "type": "string" 960 // }, 961 // "ipId1": { 962 // "location": "path", 963 // "required": true, 964 // "type": "string" 965 // } 966 // }, 967 // "path": "v1/ip/{ipId}/{ipId1}", 968 // "response": { 969 // "$ref": "RdapResponse" 970 // } 971 // } 972 973} 974 975// method id "domainsrdap.nameserver.get": 976 977type NameserverGetCall struct { 978 s *Service 979 nameserverId string 980 urlParams_ gensupport.URLParams 981 ifNoneMatch_ string 982 ctx_ context.Context 983 header_ http.Header 984} 985 986// Get: The RDAP API recognizes this command from the RDAP specification 987// but does not support it. The response is a formatted 501 error. 988// 989// - nameserverId: . 990func (r *NameserverService) Get(nameserverId string) *NameserverGetCall { 991 c := &NameserverGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 992 c.nameserverId = nameserverId 993 return c 994} 995 996// Fields allows partial responses to be retrieved. See 997// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 998// for more information. 999func (c *NameserverGetCall) Fields(s ...googleapi.Field) *NameserverGetCall { 1000 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1001 return c 1002} 1003 1004// IfNoneMatch sets the optional parameter which makes the operation 1005// fail if the object's ETag matches the given value. This is useful for 1006// getting updates only after the object has changed since the last 1007// request. Use googleapi.IsNotModified to check whether the response 1008// error from Do is the result of In-None-Match. 1009func (c *NameserverGetCall) IfNoneMatch(entityTag string) *NameserverGetCall { 1010 c.ifNoneMatch_ = entityTag 1011 return c 1012} 1013 1014// Context sets the context to be used in this call's Do method. Any 1015// pending HTTP request will be aborted if the provided context is 1016// canceled. 1017func (c *NameserverGetCall) Context(ctx context.Context) *NameserverGetCall { 1018 c.ctx_ = ctx 1019 return c 1020} 1021 1022// Header returns an http.Header that can be modified by the caller to 1023// add HTTP headers to the request. 1024func (c *NameserverGetCall) Header() http.Header { 1025 if c.header_ == nil { 1026 c.header_ = make(http.Header) 1027 } 1028 return c.header_ 1029} 1030 1031func (c *NameserverGetCall) doRequest(alt string) (*http.Response, error) { 1032 reqHeaders := make(http.Header) 1033 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 1034 for k, v := range c.header_ { 1035 reqHeaders[k] = v 1036 } 1037 reqHeaders.Set("User-Agent", c.s.userAgent()) 1038 if c.ifNoneMatch_ != "" { 1039 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1040 } 1041 var body io.Reader = nil 1042 c.urlParams_.Set("alt", alt) 1043 c.urlParams_.Set("prettyPrint", "false") 1044 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/nameserver/{nameserverId}") 1045 urls += "?" + c.urlParams_.Encode() 1046 req, err := http.NewRequest("GET", urls, body) 1047 if err != nil { 1048 return nil, err 1049 } 1050 req.Header = reqHeaders 1051 googleapi.Expand(req.URL, map[string]string{ 1052 "nameserverId": c.nameserverId, 1053 }) 1054 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1055} 1056 1057// Do executes the "domainsrdap.nameserver.get" call. 1058// Exactly one of *RdapResponse or error will be non-nil. Any non-2xx 1059// status code is an error. Response headers are in either 1060// *RdapResponse.ServerResponse.Header or (if a response was returned at 1061// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 1062// to check whether the returned error was because 1063// http.StatusNotModified was returned. 1064func (c *NameserverGetCall) Do(opts ...googleapi.CallOption) (*RdapResponse, error) { 1065 gensupport.SetOptions(c.urlParams_, opts...) 1066 res, err := c.doRequest("json") 1067 if res != nil && res.StatusCode == http.StatusNotModified { 1068 if res.Body != nil { 1069 res.Body.Close() 1070 } 1071 return nil, &googleapi.Error{ 1072 Code: res.StatusCode, 1073 Header: res.Header, 1074 } 1075 } 1076 if err != nil { 1077 return nil, err 1078 } 1079 defer googleapi.CloseBody(res) 1080 if err := googleapi.CheckResponse(res); err != nil { 1081 return nil, err 1082 } 1083 ret := &RdapResponse{ 1084 ServerResponse: googleapi.ServerResponse{ 1085 Header: res.Header, 1086 HTTPStatusCode: res.StatusCode, 1087 }, 1088 } 1089 target := &ret 1090 if err := gensupport.DecodeResponse(target, res); err != nil { 1091 return nil, err 1092 } 1093 return ret, nil 1094 // { 1095 // "description": "The RDAP API recognizes this command from the RDAP specification but does not support it. The response is a formatted 501 error.", 1096 // "flatPath": "v1/nameserver/{nameserverId}", 1097 // "httpMethod": "GET", 1098 // "id": "domainsrdap.nameserver.get", 1099 // "parameterOrder": [ 1100 // "nameserverId" 1101 // ], 1102 // "parameters": { 1103 // "nameserverId": { 1104 // "location": "path", 1105 // "required": true, 1106 // "type": "string" 1107 // } 1108 // }, 1109 // "path": "v1/nameserver/{nameserverId}", 1110 // "response": { 1111 // "$ref": "RdapResponse" 1112 // } 1113 // } 1114 1115} 1116 1117// method id "domainsrdap.getDomains": 1118 1119type V1GetDomainsCall struct { 1120 s *Service 1121 urlParams_ gensupport.URLParams 1122 ifNoneMatch_ string 1123 ctx_ context.Context 1124 header_ http.Header 1125} 1126 1127// GetDomains: The RDAP API recognizes this command from the RDAP 1128// specification but does not support it. The response is a formatted 1129// 501 error. 1130func (r *V1Service) GetDomains() *V1GetDomainsCall { 1131 c := &V1GetDomainsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1132 return c 1133} 1134 1135// Fields allows partial responses to be retrieved. See 1136// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1137// for more information. 1138func (c *V1GetDomainsCall) Fields(s ...googleapi.Field) *V1GetDomainsCall { 1139 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1140 return c 1141} 1142 1143// IfNoneMatch sets the optional parameter which makes the operation 1144// fail if the object's ETag matches the given value. This is useful for 1145// getting updates only after the object has changed since the last 1146// request. Use googleapi.IsNotModified to check whether the response 1147// error from Do is the result of In-None-Match. 1148func (c *V1GetDomainsCall) IfNoneMatch(entityTag string) *V1GetDomainsCall { 1149 c.ifNoneMatch_ = entityTag 1150 return c 1151} 1152 1153// Context sets the context to be used in this call's Do method. Any 1154// pending HTTP request will be aborted if the provided context is 1155// canceled. 1156func (c *V1GetDomainsCall) Context(ctx context.Context) *V1GetDomainsCall { 1157 c.ctx_ = ctx 1158 return c 1159} 1160 1161// Header returns an http.Header that can be modified by the caller to 1162// add HTTP headers to the request. 1163func (c *V1GetDomainsCall) Header() http.Header { 1164 if c.header_ == nil { 1165 c.header_ = make(http.Header) 1166 } 1167 return c.header_ 1168} 1169 1170func (c *V1GetDomainsCall) doRequest(alt string) (*http.Response, error) { 1171 reqHeaders := make(http.Header) 1172 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 1173 for k, v := range c.header_ { 1174 reqHeaders[k] = v 1175 } 1176 reqHeaders.Set("User-Agent", c.s.userAgent()) 1177 if c.ifNoneMatch_ != "" { 1178 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1179 } 1180 var body io.Reader = nil 1181 c.urlParams_.Set("alt", alt) 1182 c.urlParams_.Set("prettyPrint", "false") 1183 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/domains") 1184 urls += "?" + c.urlParams_.Encode() 1185 req, err := http.NewRequest("GET", urls, body) 1186 if err != nil { 1187 return nil, err 1188 } 1189 req.Header = reqHeaders 1190 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1191} 1192 1193// Do executes the "domainsrdap.getDomains" call. 1194// Exactly one of *RdapResponse or error will be non-nil. Any non-2xx 1195// status code is an error. Response headers are in either 1196// *RdapResponse.ServerResponse.Header or (if a response was returned at 1197// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 1198// to check whether the returned error was because 1199// http.StatusNotModified was returned. 1200func (c *V1GetDomainsCall) Do(opts ...googleapi.CallOption) (*RdapResponse, error) { 1201 gensupport.SetOptions(c.urlParams_, opts...) 1202 res, err := c.doRequest("json") 1203 if res != nil && res.StatusCode == http.StatusNotModified { 1204 if res.Body != nil { 1205 res.Body.Close() 1206 } 1207 return nil, &googleapi.Error{ 1208 Code: res.StatusCode, 1209 Header: res.Header, 1210 } 1211 } 1212 if err != nil { 1213 return nil, err 1214 } 1215 defer googleapi.CloseBody(res) 1216 if err := googleapi.CheckResponse(res); err != nil { 1217 return nil, err 1218 } 1219 ret := &RdapResponse{ 1220 ServerResponse: googleapi.ServerResponse{ 1221 Header: res.Header, 1222 HTTPStatusCode: res.StatusCode, 1223 }, 1224 } 1225 target := &ret 1226 if err := gensupport.DecodeResponse(target, res); err != nil { 1227 return nil, err 1228 } 1229 return ret, nil 1230 // { 1231 // "description": "The RDAP API recognizes this command from the RDAP specification but does not support it. The response is a formatted 501 error.", 1232 // "flatPath": "v1/domains", 1233 // "httpMethod": "GET", 1234 // "id": "domainsrdap.getDomains", 1235 // "parameterOrder": [], 1236 // "parameters": {}, 1237 // "path": "v1/domains", 1238 // "response": { 1239 // "$ref": "RdapResponse" 1240 // } 1241 // } 1242 1243} 1244 1245// method id "domainsrdap.getEntities": 1246 1247type V1GetEntitiesCall struct { 1248 s *Service 1249 urlParams_ gensupport.URLParams 1250 ifNoneMatch_ string 1251 ctx_ context.Context 1252 header_ http.Header 1253} 1254 1255// GetEntities: The RDAP API recognizes this command from the RDAP 1256// specification but does not support it. The response is a formatted 1257// 501 error. 1258func (r *V1Service) GetEntities() *V1GetEntitiesCall { 1259 c := &V1GetEntitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1260 return c 1261} 1262 1263// Fields allows partial responses to be retrieved. See 1264// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1265// for more information. 1266func (c *V1GetEntitiesCall) Fields(s ...googleapi.Field) *V1GetEntitiesCall { 1267 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1268 return c 1269} 1270 1271// IfNoneMatch sets the optional parameter which makes the operation 1272// fail if the object's ETag matches the given value. This is useful for 1273// getting updates only after the object has changed since the last 1274// request. Use googleapi.IsNotModified to check whether the response 1275// error from Do is the result of In-None-Match. 1276func (c *V1GetEntitiesCall) IfNoneMatch(entityTag string) *V1GetEntitiesCall { 1277 c.ifNoneMatch_ = entityTag 1278 return c 1279} 1280 1281// Context sets the context to be used in this call's Do method. Any 1282// pending HTTP request will be aborted if the provided context is 1283// canceled. 1284func (c *V1GetEntitiesCall) Context(ctx context.Context) *V1GetEntitiesCall { 1285 c.ctx_ = ctx 1286 return c 1287} 1288 1289// Header returns an http.Header that can be modified by the caller to 1290// add HTTP headers to the request. 1291func (c *V1GetEntitiesCall) Header() http.Header { 1292 if c.header_ == nil { 1293 c.header_ = make(http.Header) 1294 } 1295 return c.header_ 1296} 1297 1298func (c *V1GetEntitiesCall) doRequest(alt string) (*http.Response, error) { 1299 reqHeaders := make(http.Header) 1300 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 1301 for k, v := range c.header_ { 1302 reqHeaders[k] = v 1303 } 1304 reqHeaders.Set("User-Agent", c.s.userAgent()) 1305 if c.ifNoneMatch_ != "" { 1306 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1307 } 1308 var body io.Reader = nil 1309 c.urlParams_.Set("alt", alt) 1310 c.urlParams_.Set("prettyPrint", "false") 1311 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/entities") 1312 urls += "?" + c.urlParams_.Encode() 1313 req, err := http.NewRequest("GET", urls, body) 1314 if err != nil { 1315 return nil, err 1316 } 1317 req.Header = reqHeaders 1318 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1319} 1320 1321// Do executes the "domainsrdap.getEntities" call. 1322// Exactly one of *RdapResponse or error will be non-nil. Any non-2xx 1323// status code is an error. Response headers are in either 1324// *RdapResponse.ServerResponse.Header or (if a response was returned at 1325// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 1326// to check whether the returned error was because 1327// http.StatusNotModified was returned. 1328func (c *V1GetEntitiesCall) Do(opts ...googleapi.CallOption) (*RdapResponse, error) { 1329 gensupport.SetOptions(c.urlParams_, opts...) 1330 res, err := c.doRequest("json") 1331 if res != nil && res.StatusCode == http.StatusNotModified { 1332 if res.Body != nil { 1333 res.Body.Close() 1334 } 1335 return nil, &googleapi.Error{ 1336 Code: res.StatusCode, 1337 Header: res.Header, 1338 } 1339 } 1340 if err != nil { 1341 return nil, err 1342 } 1343 defer googleapi.CloseBody(res) 1344 if err := googleapi.CheckResponse(res); err != nil { 1345 return nil, err 1346 } 1347 ret := &RdapResponse{ 1348 ServerResponse: googleapi.ServerResponse{ 1349 Header: res.Header, 1350 HTTPStatusCode: res.StatusCode, 1351 }, 1352 } 1353 target := &ret 1354 if err := gensupport.DecodeResponse(target, res); err != nil { 1355 return nil, err 1356 } 1357 return ret, nil 1358 // { 1359 // "description": "The RDAP API recognizes this command from the RDAP specification but does not support it. The response is a formatted 501 error.", 1360 // "flatPath": "v1/entities", 1361 // "httpMethod": "GET", 1362 // "id": "domainsrdap.getEntities", 1363 // "parameterOrder": [], 1364 // "parameters": {}, 1365 // "path": "v1/entities", 1366 // "response": { 1367 // "$ref": "RdapResponse" 1368 // } 1369 // } 1370 1371} 1372 1373// method id "domainsrdap.getHelp": 1374 1375type V1GetHelpCall struct { 1376 s *Service 1377 urlParams_ gensupport.URLParams 1378 ifNoneMatch_ string 1379 ctx_ context.Context 1380 header_ http.Header 1381} 1382 1383// GetHelp: Get help information for the RDAP API, including links to 1384// documentation. 1385func (r *V1Service) GetHelp() *V1GetHelpCall { 1386 c := &V1GetHelpCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1387 return c 1388} 1389 1390// Fields allows partial responses to be retrieved. See 1391// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1392// for more information. 1393func (c *V1GetHelpCall) Fields(s ...googleapi.Field) *V1GetHelpCall { 1394 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1395 return c 1396} 1397 1398// IfNoneMatch sets the optional parameter which makes the operation 1399// fail if the object's ETag matches the given value. This is useful for 1400// getting updates only after the object has changed since the last 1401// request. Use googleapi.IsNotModified to check whether the response 1402// error from Do is the result of In-None-Match. 1403func (c *V1GetHelpCall) IfNoneMatch(entityTag string) *V1GetHelpCall { 1404 c.ifNoneMatch_ = entityTag 1405 return c 1406} 1407 1408// Context sets the context to be used in this call's Do method. Any 1409// pending HTTP request will be aborted if the provided context is 1410// canceled. 1411func (c *V1GetHelpCall) Context(ctx context.Context) *V1GetHelpCall { 1412 c.ctx_ = ctx 1413 return c 1414} 1415 1416// Header returns an http.Header that can be modified by the caller to 1417// add HTTP headers to the request. 1418func (c *V1GetHelpCall) Header() http.Header { 1419 if c.header_ == nil { 1420 c.header_ = make(http.Header) 1421 } 1422 return c.header_ 1423} 1424 1425func (c *V1GetHelpCall) doRequest(alt string) (*http.Response, error) { 1426 reqHeaders := make(http.Header) 1427 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 1428 for k, v := range c.header_ { 1429 reqHeaders[k] = v 1430 } 1431 reqHeaders.Set("User-Agent", c.s.userAgent()) 1432 if c.ifNoneMatch_ != "" { 1433 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1434 } 1435 var body io.Reader = nil 1436 c.urlParams_.Set("alt", alt) 1437 c.urlParams_.Set("prettyPrint", "false") 1438 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/help") 1439 urls += "?" + c.urlParams_.Encode() 1440 req, err := http.NewRequest("GET", urls, body) 1441 if err != nil { 1442 return nil, err 1443 } 1444 req.Header = reqHeaders 1445 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1446} 1447 1448// Do executes the "domainsrdap.getHelp" call. 1449// Exactly one of *HttpBody or error will be non-nil. Any non-2xx status 1450// code is an error. Response headers are in either 1451// *HttpBody.ServerResponse.Header or (if a response was returned at 1452// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 1453// to check whether the returned error was because 1454// http.StatusNotModified was returned. 1455func (c *V1GetHelpCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) { 1456 gensupport.SetOptions(c.urlParams_, opts...) 1457 res, err := c.doRequest("json") 1458 if res != nil && res.StatusCode == http.StatusNotModified { 1459 if res.Body != nil { 1460 res.Body.Close() 1461 } 1462 return nil, &googleapi.Error{ 1463 Code: res.StatusCode, 1464 Header: res.Header, 1465 } 1466 } 1467 if err != nil { 1468 return nil, err 1469 } 1470 defer googleapi.CloseBody(res) 1471 if err := googleapi.CheckResponse(res); err != nil { 1472 return nil, err 1473 } 1474 ret := &HttpBody{ 1475 ServerResponse: googleapi.ServerResponse{ 1476 Header: res.Header, 1477 HTTPStatusCode: res.StatusCode, 1478 }, 1479 } 1480 target := &ret 1481 if err := gensupport.DecodeResponse(target, res); err != nil { 1482 return nil, err 1483 } 1484 return ret, nil 1485 // { 1486 // "description": "Get help information for the RDAP API, including links to documentation.", 1487 // "flatPath": "v1/help", 1488 // "httpMethod": "GET", 1489 // "id": "domainsrdap.getHelp", 1490 // "parameterOrder": [], 1491 // "parameters": {}, 1492 // "path": "v1/help", 1493 // "response": { 1494 // "$ref": "HttpBody" 1495 // } 1496 // } 1497 1498} 1499 1500// method id "domainsrdap.getIp": 1501 1502type V1GetIpCall struct { 1503 s *Service 1504 urlParams_ gensupport.URLParams 1505 ifNoneMatch_ string 1506 ctx_ context.Context 1507 header_ http.Header 1508} 1509 1510// GetIp: The RDAP API recognizes this command from the RDAP 1511// specification but does not support it. The response is a formatted 1512// 501 error. 1513func (r *V1Service) GetIp() *V1GetIpCall { 1514 c := &V1GetIpCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1515 return c 1516} 1517 1518// Fields allows partial responses to be retrieved. See 1519// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1520// for more information. 1521func (c *V1GetIpCall) Fields(s ...googleapi.Field) *V1GetIpCall { 1522 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1523 return c 1524} 1525 1526// IfNoneMatch sets the optional parameter which makes the operation 1527// fail if the object's ETag matches the given value. This is useful for 1528// getting updates only after the object has changed since the last 1529// request. Use googleapi.IsNotModified to check whether the response 1530// error from Do is the result of In-None-Match. 1531func (c *V1GetIpCall) IfNoneMatch(entityTag string) *V1GetIpCall { 1532 c.ifNoneMatch_ = entityTag 1533 return c 1534} 1535 1536// Context sets the context to be used in this call's Do method. Any 1537// pending HTTP request will be aborted if the provided context is 1538// canceled. 1539func (c *V1GetIpCall) Context(ctx context.Context) *V1GetIpCall { 1540 c.ctx_ = ctx 1541 return c 1542} 1543 1544// Header returns an http.Header that can be modified by the caller to 1545// add HTTP headers to the request. 1546func (c *V1GetIpCall) Header() http.Header { 1547 if c.header_ == nil { 1548 c.header_ = make(http.Header) 1549 } 1550 return c.header_ 1551} 1552 1553func (c *V1GetIpCall) doRequest(alt string) (*http.Response, error) { 1554 reqHeaders := make(http.Header) 1555 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 1556 for k, v := range c.header_ { 1557 reqHeaders[k] = v 1558 } 1559 reqHeaders.Set("User-Agent", c.s.userAgent()) 1560 if c.ifNoneMatch_ != "" { 1561 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1562 } 1563 var body io.Reader = nil 1564 c.urlParams_.Set("alt", alt) 1565 c.urlParams_.Set("prettyPrint", "false") 1566 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/ip") 1567 urls += "?" + c.urlParams_.Encode() 1568 req, err := http.NewRequest("GET", urls, body) 1569 if err != nil { 1570 return nil, err 1571 } 1572 req.Header = reqHeaders 1573 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1574} 1575 1576// Do executes the "domainsrdap.getIp" call. 1577// Exactly one of *HttpBody or error will be non-nil. Any non-2xx status 1578// code is an error. Response headers are in either 1579// *HttpBody.ServerResponse.Header or (if a response was returned at 1580// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 1581// to check whether the returned error was because 1582// http.StatusNotModified was returned. 1583func (c *V1GetIpCall) Do(opts ...googleapi.CallOption) (*HttpBody, error) { 1584 gensupport.SetOptions(c.urlParams_, opts...) 1585 res, err := c.doRequest("json") 1586 if res != nil && res.StatusCode == http.StatusNotModified { 1587 if res.Body != nil { 1588 res.Body.Close() 1589 } 1590 return nil, &googleapi.Error{ 1591 Code: res.StatusCode, 1592 Header: res.Header, 1593 } 1594 } 1595 if err != nil { 1596 return nil, err 1597 } 1598 defer googleapi.CloseBody(res) 1599 if err := googleapi.CheckResponse(res); err != nil { 1600 return nil, err 1601 } 1602 ret := &HttpBody{ 1603 ServerResponse: googleapi.ServerResponse{ 1604 Header: res.Header, 1605 HTTPStatusCode: res.StatusCode, 1606 }, 1607 } 1608 target := &ret 1609 if err := gensupport.DecodeResponse(target, res); err != nil { 1610 return nil, err 1611 } 1612 return ret, nil 1613 // { 1614 // "description": "The RDAP API recognizes this command from the RDAP specification but does not support it. The response is a formatted 501 error.", 1615 // "flatPath": "v1/ip", 1616 // "httpMethod": "GET", 1617 // "id": "domainsrdap.getIp", 1618 // "parameterOrder": [], 1619 // "parameters": {}, 1620 // "path": "v1/ip", 1621 // "response": { 1622 // "$ref": "HttpBody" 1623 // } 1624 // } 1625 1626} 1627 1628// method id "domainsrdap.getNameservers": 1629 1630type V1GetNameserversCall struct { 1631 s *Service 1632 urlParams_ gensupport.URLParams 1633 ifNoneMatch_ string 1634 ctx_ context.Context 1635 header_ http.Header 1636} 1637 1638// GetNameservers: The RDAP API recognizes this command from the RDAP 1639// specification but does not support it. The response is a formatted 1640// 501 error. 1641func (r *V1Service) GetNameservers() *V1GetNameserversCall { 1642 c := &V1GetNameserversCall{s: r.s, urlParams_: make(gensupport.URLParams)} 1643 return c 1644} 1645 1646// Fields allows partial responses to be retrieved. See 1647// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 1648// for more information. 1649func (c *V1GetNameserversCall) Fields(s ...googleapi.Field) *V1GetNameserversCall { 1650 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 1651 return c 1652} 1653 1654// IfNoneMatch sets the optional parameter which makes the operation 1655// fail if the object's ETag matches the given value. This is useful for 1656// getting updates only after the object has changed since the last 1657// request. Use googleapi.IsNotModified to check whether the response 1658// error from Do is the result of In-None-Match. 1659func (c *V1GetNameserversCall) IfNoneMatch(entityTag string) *V1GetNameserversCall { 1660 c.ifNoneMatch_ = entityTag 1661 return c 1662} 1663 1664// Context sets the context to be used in this call's Do method. Any 1665// pending HTTP request will be aborted if the provided context is 1666// canceled. 1667func (c *V1GetNameserversCall) Context(ctx context.Context) *V1GetNameserversCall { 1668 c.ctx_ = ctx 1669 return c 1670} 1671 1672// Header returns an http.Header that can be modified by the caller to 1673// add HTTP headers to the request. 1674func (c *V1GetNameserversCall) Header() http.Header { 1675 if c.header_ == nil { 1676 c.header_ = make(http.Header) 1677 } 1678 return c.header_ 1679} 1680 1681func (c *V1GetNameserversCall) doRequest(alt string) (*http.Response, error) { 1682 reqHeaders := make(http.Header) 1683 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201") 1684 for k, v := range c.header_ { 1685 reqHeaders[k] = v 1686 } 1687 reqHeaders.Set("User-Agent", c.s.userAgent()) 1688 if c.ifNoneMatch_ != "" { 1689 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 1690 } 1691 var body io.Reader = nil 1692 c.urlParams_.Set("alt", alt) 1693 c.urlParams_.Set("prettyPrint", "false") 1694 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/nameservers") 1695 urls += "?" + c.urlParams_.Encode() 1696 req, err := http.NewRequest("GET", urls, body) 1697 if err != nil { 1698 return nil, err 1699 } 1700 req.Header = reqHeaders 1701 return gensupport.SendRequest(c.ctx_, c.s.client, req) 1702} 1703 1704// Do executes the "domainsrdap.getNameservers" call. 1705// Exactly one of *RdapResponse or error will be non-nil. Any non-2xx 1706// status code is an error. Response headers are in either 1707// *RdapResponse.ServerResponse.Header or (if a response was returned at 1708// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 1709// to check whether the returned error was because 1710// http.StatusNotModified was returned. 1711func (c *V1GetNameserversCall) Do(opts ...googleapi.CallOption) (*RdapResponse, error) { 1712 gensupport.SetOptions(c.urlParams_, opts...) 1713 res, err := c.doRequest("json") 1714 if res != nil && res.StatusCode == http.StatusNotModified { 1715 if res.Body != nil { 1716 res.Body.Close() 1717 } 1718 return nil, &googleapi.Error{ 1719 Code: res.StatusCode, 1720 Header: res.Header, 1721 } 1722 } 1723 if err != nil { 1724 return nil, err 1725 } 1726 defer googleapi.CloseBody(res) 1727 if err := googleapi.CheckResponse(res); err != nil { 1728 return nil, err 1729 } 1730 ret := &RdapResponse{ 1731 ServerResponse: googleapi.ServerResponse{ 1732 Header: res.Header, 1733 HTTPStatusCode: res.StatusCode, 1734 }, 1735 } 1736 target := &ret 1737 if err := gensupport.DecodeResponse(target, res); err != nil { 1738 return nil, err 1739 } 1740 return ret, nil 1741 // { 1742 // "description": "The RDAP API recognizes this command from the RDAP specification but does not support it. The response is a formatted 501 error.", 1743 // "flatPath": "v1/nameservers", 1744 // "httpMethod": "GET", 1745 // "id": "domainsrdap.getNameservers", 1746 // "parameterOrder": [], 1747 // "parameters": {}, 1748 // "path": "v1/nameservers", 1749 // "response": { 1750 // "$ref": "RdapResponse" 1751 // } 1752 // } 1753 1754} 1755