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