~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/google.golang.org/api/dns/v1beta1/dns-gen.go

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Package dns provides access to the Google Cloud DNS API.
 
2
//
 
3
// See https://developers.google.com/cloud-dns
 
4
//
 
5
// Usage example:
 
6
//
 
7
//   import "google.golang.org/api/dns/v1beta1"
 
8
//   ...
 
9
//   dnsService, err := dns.New(oauthHttpClient)
 
10
package dns
 
11
 
 
12
import (
 
13
        "bytes"
 
14
        "encoding/json"
 
15
        "errors"
 
16
        "fmt"
 
17
        "google.golang.org/api/googleapi"
 
18
        "io"
 
19
        "net/http"
 
20
        "net/url"
 
21
        "strconv"
 
22
        "strings"
 
23
)
 
24
 
 
25
// Always reference these packages, just in case the auto-generated code
 
26
// below doesn't.
 
27
var _ = bytes.NewBuffer
 
28
var _ = strconv.Itoa
 
29
var _ = fmt.Sprintf
 
30
var _ = json.NewDecoder
 
31
var _ = io.Copy
 
32
var _ = url.Parse
 
33
var _ = googleapi.Version
 
34
var _ = errors.New
 
35
var _ = strings.Replace
 
36
 
 
37
const apiId = "dns:v1beta1"
 
38
const apiName = "dns"
 
39
const apiVersion = "v1beta1"
 
40
const basePath = "https://www.googleapis.com/dns/v1beta1/projects/"
 
41
 
 
42
// OAuth2 scopes used by this API.
 
43
const (
 
44
        // View and manage your data across Google Cloud Platform services
 
45
        CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
 
46
 
 
47
        // View your DNS records hosted by Google Cloud DNS
 
48
        NdevClouddnsReadonlyScope = "https://www.googleapis.com/auth/ndev.clouddns.readonly"
 
49
 
 
50
        // View and manage your DNS records hosted by Google Cloud DNS
 
51
        NdevClouddnsReadwriteScope = "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
 
52
)
 
53
 
 
54
func New(client *http.Client) (*Service, error) {
 
55
        if client == nil {
 
56
                return nil, errors.New("client is nil")
 
57
        }
 
58
        s := &Service{client: client, BasePath: basePath}
 
59
        s.Changes = NewChangesService(s)
 
60
        s.ManagedZones = NewManagedZonesService(s)
 
61
        s.Projects = NewProjectsService(s)
 
62
        s.ResourceRecordSets = NewResourceRecordSetsService(s)
 
63
        return s, nil
 
64
}
 
65
 
 
66
type Service struct {
 
67
        client   *http.Client
 
68
        BasePath string // API endpoint base URL
 
69
 
 
70
        Changes *ChangesService
 
71
 
 
72
        ManagedZones *ManagedZonesService
 
73
 
 
74
        Projects *ProjectsService
 
75
 
 
76
        ResourceRecordSets *ResourceRecordSetsService
 
77
}
 
78
 
 
79
func NewChangesService(s *Service) *ChangesService {
 
80
        rs := &ChangesService{s: s}
 
81
        return rs
 
82
}
 
83
 
 
84
type ChangesService struct {
 
85
        s *Service
 
86
}
 
87
 
 
88
func NewManagedZonesService(s *Service) *ManagedZonesService {
 
89
        rs := &ManagedZonesService{s: s}
 
90
        return rs
 
91
}
 
92
 
 
93
type ManagedZonesService struct {
 
94
        s *Service
 
95
}
 
96
 
 
97
func NewProjectsService(s *Service) *ProjectsService {
 
98
        rs := &ProjectsService{s: s}
 
99
        return rs
 
100
}
 
101
 
 
102
type ProjectsService struct {
 
103
        s *Service
 
104
}
 
105
 
 
106
func NewResourceRecordSetsService(s *Service) *ResourceRecordSetsService {
 
107
        rs := &ResourceRecordSetsService{s: s}
 
108
        return rs
 
109
}
 
110
 
 
111
type ResourceRecordSetsService struct {
 
112
        s *Service
 
113
}
 
114
 
 
115
type Change struct {
 
116
        // Additions: Which ResourceRecordSets to add?
 
117
        Additions []*ResourceRecordSet `json:"additions,omitempty"`
 
118
 
 
119
        // Deletions: Which ResourceRecordSets to remove? Must match existing
 
120
        // data exactly.
 
121
        Deletions []*ResourceRecordSet `json:"deletions,omitempty"`
 
122
 
 
123
        // Id: Unique identifier for the resource; defined by the server (output
 
124
        // only).
 
125
        Id string `json:"id,omitempty"`
 
126
 
 
127
        // Kind: Identifies what kind of resource this is. Value: the fixed
 
128
        // string "dns#change".
 
129
        Kind string `json:"kind,omitempty"`
 
130
 
 
131
        // StartTime: The time that this operation was started by the server.
 
132
        // This is in RFC3339 text format.
 
133
        StartTime string `json:"startTime,omitempty"`
 
134
 
 
135
        // Status: Status of the operation. Can be one of the following:
 
136
        // "PENDING" or "DONE" (output only).
 
137
        Status string `json:"status,omitempty"`
 
138
}
 
139
 
 
140
type ChangesListResponse struct {
 
141
        // Changes: The requested changes.
 
142
        Changes []*Change `json:"changes,omitempty"`
 
143
 
 
144
        // Kind: Type of resource.
 
145
        Kind string `json:"kind,omitempty"`
 
146
 
 
147
        // NextPageToken: The presence of this field indicates that there exist
 
148
        // more results following your last page of results in pagination order.
 
149
        // To fetch them, make another list request using this value as your
 
150
        // pagination token.
 
151
        //
 
152
        // In this way you can retrieve the complete contents
 
153
        // of even very large collections one page at a time. However, if the
 
154
        // contents of the collection change between the first and last
 
155
        // paginated list request, the set of all elements returned will be an
 
156
        // inconsistent view of the collection. There is no way to retrieve a
 
157
        // "snapshot" of collections larger than the maximum page size.
 
158
        NextPageToken string `json:"nextPageToken,omitempty"`
 
159
}
 
160
 
 
161
type ManagedZone struct {
 
162
        // CreationTime: The time that this resource was created on the server.
 
163
        // This is in RFC3339 text format. Output only.
 
164
        CreationTime string `json:"creationTime,omitempty"`
 
165
 
 
166
        // Description: A string to associate with this resource for the user's
 
167
        // convenience. Has no effect on the managed zone's function.
 
168
        Description string `json:"description,omitempty"`
 
169
 
 
170
        // DnsName: The DNS name of this managed zone, for instance
 
171
        // "example.com.".
 
172
        DnsName string `json:"dnsName,omitempty"`
 
173
 
 
174
        // Id: Unique identifier for the resource; defined by the server (output
 
175
        // only)
 
176
        Id uint64 `json:"id,omitempty,string"`
 
177
 
 
178
        // Kind: Identifies what kind of resource this is. Value: the fixed
 
179
        // string "dns#managedZone".
 
180
        Kind string `json:"kind,omitempty"`
 
181
 
 
182
        // Name: User assigned name for this resource. Must be unique within the
 
183
        // project.
 
184
        Name string `json:"name,omitempty"`
 
185
 
 
186
        // NameServers: Delegate your managed_zone to these virtual name
 
187
        // servers; defined by the server (output only)
 
188
        NameServers []string `json:"nameServers,omitempty"`
 
189
}
 
190
 
 
191
type ManagedZonesListResponse struct {
 
192
        // Kind: Type of resource.
 
193
        Kind string `json:"kind,omitempty"`
 
194
 
 
195
        // ManagedZones: The managed zone resources.
 
196
        ManagedZones []*ManagedZone `json:"managedZones,omitempty"`
 
197
 
 
198
        // NextPageToken: The presence of this field indicates that there exist
 
199
        // more results following your last page of results in pagination order.
 
200
        // To fetch them, make another list request using this value as your
 
201
        // page token.
 
202
        //
 
203
        // In this way you can retrieve the complete contents of
 
204
        // even very large collections one page at a time. However, if the
 
205
        // contents of the collection change between the first and last
 
206
        // paginated list request, the set of all elements returned will be an
 
207
        // inconsistent view of the collection. There is no way to retrieve a
 
208
        // consistent snapshot of a collection larger than the maximum page
 
209
        // size.
 
210
        NextPageToken string `json:"nextPageToken,omitempty"`
 
211
}
 
212
 
 
213
type Project struct {
 
214
        // Id: User assigned unique identifier for the resource (output only).
 
215
        Id string `json:"id,omitempty"`
 
216
 
 
217
        // Kind: Identifies what kind of resource this is. Value: the fixed
 
218
        // string "dns#project".
 
219
        Kind string `json:"kind,omitempty"`
 
220
 
 
221
        // Number: Unique numeric identifier for the resource; defined by the
 
222
        // server (output only).
 
223
        Number uint64 `json:"number,omitempty,string"`
 
224
 
 
225
        // Quota: Quotas assigned to this project (output only).
 
226
        Quota *Quota `json:"quota,omitempty"`
 
227
}
 
228
 
 
229
type Quota struct {
 
230
        // Kind: Identifies what kind of resource this is. Value: the fixed
 
231
        // string "dns#quota".
 
232
        Kind string `json:"kind,omitempty"`
 
233
 
 
234
        // ManagedZones: Maximum allowed number of managed zones in the project.
 
235
        ManagedZones int64 `json:"managedZones,omitempty"`
 
236
 
 
237
        // ResourceRecordsPerRrset: Maximum allowed number of ResourceRecords
 
238
        // per ResourceRecordSet.
 
239
        ResourceRecordsPerRrset int64 `json:"resourceRecordsPerRrset,omitempty"`
 
240
 
 
241
        // RrsetAdditionsPerChange: Maximum allowed number of ResourceRecordSets
 
242
        // to add per ChangesCreateRequest.
 
243
        RrsetAdditionsPerChange int64 `json:"rrsetAdditionsPerChange,omitempty"`
 
244
 
 
245
        // RrsetDeletionsPerChange: Maximum allowed number of ResourceRecordSets
 
246
        // to delete per ChangesCreateRequest.
 
247
        RrsetDeletionsPerChange int64 `json:"rrsetDeletionsPerChange,omitempty"`
 
248
 
 
249
        // RrsetsPerManagedZone: Maximum allowed number of ResourceRecordSets
 
250
        // per zone in the project.
 
251
        RrsetsPerManagedZone int64 `json:"rrsetsPerManagedZone,omitempty"`
 
252
 
 
253
        // TotalRrdataSizePerChange: Maximum allowed size for total rrdata in
 
254
        // one ChangesCreateRequest in bytes.
 
255
        TotalRrdataSizePerChange int64 `json:"totalRrdataSizePerChange,omitempty"`
 
256
}
 
257
 
 
258
type ResourceRecordSet struct {
 
259
        // Kind: Identifies what kind of resource this is. Value: the fixed
 
260
        // string "dns#resourceRecordSet".
 
261
        Kind string `json:"kind,omitempty"`
 
262
 
 
263
        // Name: For example, www.example.com.
 
264
        Name string `json:"name,omitempty"`
 
265
 
 
266
        // Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section
 
267
        // 3.6.1)
 
268
        Rrdatas []string `json:"rrdatas,omitempty"`
 
269
 
 
270
        // Ttl: Number of seconds that this ResourceRecordSet can be cached by
 
271
        // resolvers.
 
272
        Ttl int64 `json:"ttl,omitempty"`
 
273
 
 
274
        // Type: One of A, AAAA, SOA, MX, NS, TXT
 
275
        Type string `json:"type,omitempty"`
 
276
}
 
277
 
 
278
type ResourceRecordSetsListResponse struct {
 
279
        // Kind: Type of resource.
 
280
        Kind string `json:"kind,omitempty"`
 
281
 
 
282
        // NextPageToken: The presence of this field indicates that there exist
 
283
        // more results following your last page of results in pagination order.
 
284
        // To fetch them, make another list request using this value as your
 
285
        // pagination token.
 
286
        //
 
287
        // In this way you can retrieve the complete contents
 
288
        // of even very large collections one page at a time. However, if the
 
289
        // contents of the collection change between the first and last
 
290
        // paginated list request, the set of all elements returned will be an
 
291
        // inconsistent view of the collection. There is no way to retrieve a
 
292
        // consistent snapshot of a collection larger than the maximum page
 
293
        // size.
 
294
        NextPageToken string `json:"nextPageToken,omitempty"`
 
295
 
 
296
        // Rrsets: The resource record set resources.
 
297
        Rrsets []*ResourceRecordSet `json:"rrsets,omitempty"`
 
298
}
 
299
 
 
300
// method id "dns.changes.create":
 
301
 
 
302
type ChangesCreateCall struct {
 
303
        s           *Service
 
304
        project     string
 
305
        managedZone string
 
306
        change      *Change
 
307
        opt_        map[string]interface{}
 
308
}
 
309
 
 
310
// Create: Atomically update the ResourceRecordSet collection.
 
311
func (r *ChangesService) Create(project string, managedZone string, change *Change) *ChangesCreateCall {
 
312
        c := &ChangesCreateCall{s: r.s, opt_: make(map[string]interface{})}
 
313
        c.project = project
 
314
        c.managedZone = managedZone
 
315
        c.change = change
 
316
        return c
 
317
}
 
318
 
 
319
// Fields allows partial responses to be retrieved.
 
320
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
321
// for more information.
 
322
func (c *ChangesCreateCall) Fields(s ...googleapi.Field) *ChangesCreateCall {
 
323
        c.opt_["fields"] = googleapi.CombineFields(s)
 
324
        return c
 
325
}
 
326
 
 
327
func (c *ChangesCreateCall) Do() (*Change, error) {
 
328
        var body io.Reader = nil
 
329
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.change)
 
330
        if err != nil {
 
331
                return nil, err
 
332
        }
 
333
        ctype := "application/json"
 
334
        params := make(url.Values)
 
335
        params.Set("alt", "json")
 
336
        if v, ok := c.opt_["fields"]; ok {
 
337
                params.Set("fields", fmt.Sprintf("%v", v))
 
338
        }
 
339
        urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/changes")
 
340
        urls += "?" + params.Encode()
 
341
        req, _ := http.NewRequest("POST", urls, body)
 
342
        googleapi.Expand(req.URL, map[string]string{
 
343
                "project":     c.project,
 
344
                "managedZone": c.managedZone,
 
345
        })
 
346
        req.Header.Set("Content-Type", ctype)
 
347
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
348
        res, err := c.s.client.Do(req)
 
349
        if err != nil {
 
350
                return nil, err
 
351
        }
 
352
        defer googleapi.CloseBody(res)
 
353
        if err := googleapi.CheckResponse(res); err != nil {
 
354
                return nil, err
 
355
        }
 
356
        var ret *Change
 
357
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
358
                return nil, err
 
359
        }
 
360
        return ret, nil
 
361
        // {
 
362
        //   "description": "Atomically update the ResourceRecordSet collection.",
 
363
        //   "httpMethod": "POST",
 
364
        //   "id": "dns.changes.create",
 
365
        //   "parameterOrder": [
 
366
        //     "project",
 
367
        //     "managedZone"
 
368
        //   ],
 
369
        //   "parameters": {
 
370
        //     "managedZone": {
 
371
        //       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.",
 
372
        //       "location": "path",
 
373
        //       "required": true,
 
374
        //       "type": "string"
 
375
        //     },
 
376
        //     "project": {
 
377
        //       "description": "Identifies the project addressed by this request.",
 
378
        //       "location": "path",
 
379
        //       "required": true,
 
380
        //       "type": "string"
 
381
        //     }
 
382
        //   },
 
383
        //   "path": "{project}/managedZones/{managedZone}/changes",
 
384
        //   "request": {
 
385
        //     "$ref": "Change"
 
386
        //   },
 
387
        //   "response": {
 
388
        //     "$ref": "Change"
 
389
        //   },
 
390
        //   "scopes": [
 
391
        //     "https://www.googleapis.com/auth/cloud-platform",
 
392
        //     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
 
393
        //   ]
 
394
        // }
 
395
 
 
396
}
 
397
 
 
398
// method id "dns.changes.get":
 
399
 
 
400
type ChangesGetCall struct {
 
401
        s           *Service
 
402
        project     string
 
403
        managedZone string
 
404
        changeId    string
 
405
        opt_        map[string]interface{}
 
406
}
 
407
 
 
408
// Get: Fetch the representation of an existing Change.
 
409
func (r *ChangesService) Get(project string, managedZone string, changeId string) *ChangesGetCall {
 
410
        c := &ChangesGetCall{s: r.s, opt_: make(map[string]interface{})}
 
411
        c.project = project
 
412
        c.managedZone = managedZone
 
413
        c.changeId = changeId
 
414
        return c
 
415
}
 
416
 
 
417
// Fields allows partial responses to be retrieved.
 
418
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
419
// for more information.
 
420
func (c *ChangesGetCall) Fields(s ...googleapi.Field) *ChangesGetCall {
 
421
        c.opt_["fields"] = googleapi.CombineFields(s)
 
422
        return c
 
423
}
 
424
 
 
425
func (c *ChangesGetCall) Do() (*Change, error) {
 
426
        var body io.Reader = nil
 
427
        params := make(url.Values)
 
428
        params.Set("alt", "json")
 
429
        if v, ok := c.opt_["fields"]; ok {
 
430
                params.Set("fields", fmt.Sprintf("%v", v))
 
431
        }
 
432
        urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/changes/{changeId}")
 
433
        urls += "?" + params.Encode()
 
434
        req, _ := http.NewRequest("GET", urls, body)
 
435
        googleapi.Expand(req.URL, map[string]string{
 
436
                "project":     c.project,
 
437
                "managedZone": c.managedZone,
 
438
                "changeId":    c.changeId,
 
439
        })
 
440
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
441
        res, err := c.s.client.Do(req)
 
442
        if err != nil {
 
443
                return nil, err
 
444
        }
 
445
        defer googleapi.CloseBody(res)
 
446
        if err := googleapi.CheckResponse(res); err != nil {
 
447
                return nil, err
 
448
        }
 
449
        var ret *Change
 
450
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
451
                return nil, err
 
452
        }
 
453
        return ret, nil
 
454
        // {
 
455
        //   "description": "Fetch the representation of an existing Change.",
 
456
        //   "httpMethod": "GET",
 
457
        //   "id": "dns.changes.get",
 
458
        //   "parameterOrder": [
 
459
        //     "project",
 
460
        //     "managedZone",
 
461
        //     "changeId"
 
462
        //   ],
 
463
        //   "parameters": {
 
464
        //     "changeId": {
 
465
        //       "description": "The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse.",
 
466
        //       "location": "path",
 
467
        //       "required": true,
 
468
        //       "type": "string"
 
469
        //     },
 
470
        //     "managedZone": {
 
471
        //       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.",
 
472
        //       "location": "path",
 
473
        //       "required": true,
 
474
        //       "type": "string"
 
475
        //     },
 
476
        //     "project": {
 
477
        //       "description": "Identifies the project addressed by this request.",
 
478
        //       "location": "path",
 
479
        //       "required": true,
 
480
        //       "type": "string"
 
481
        //     }
 
482
        //   },
 
483
        //   "path": "{project}/managedZones/{managedZone}/changes/{changeId}",
 
484
        //   "response": {
 
485
        //     "$ref": "Change"
 
486
        //   },
 
487
        //   "scopes": [
 
488
        //     "https://www.googleapis.com/auth/cloud-platform",
 
489
        //     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
 
490
        //     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
 
491
        //   ]
 
492
        // }
 
493
 
 
494
}
 
495
 
 
496
// method id "dns.changes.list":
 
497
 
 
498
type ChangesListCall struct {
 
499
        s           *Service
 
500
        project     string
 
501
        managedZone string
 
502
        opt_        map[string]interface{}
 
503
}
 
504
 
 
505
// List: Enumerate Changes to a ResourceRecordSet collection.
 
506
func (r *ChangesService) List(project string, managedZone string) *ChangesListCall {
 
507
        c := &ChangesListCall{s: r.s, opt_: make(map[string]interface{})}
 
508
        c.project = project
 
509
        c.managedZone = managedZone
 
510
        return c
 
511
}
 
512
 
 
513
// MaxResults sets the optional parameter "maxResults": Maximum number
 
514
// of results to be returned. If unspecified, the server will decide how
 
515
// many results to return.
 
516
func (c *ChangesListCall) MaxResults(maxResults int64) *ChangesListCall {
 
517
        c.opt_["maxResults"] = maxResults
 
518
        return c
 
519
}
 
520
 
 
521
// PageToken sets the optional parameter "pageToken": A tag returned by
 
522
// a previous list request that was truncated. Use this parameter to
 
523
// continue a previous list request.
 
524
func (c *ChangesListCall) PageToken(pageToken string) *ChangesListCall {
 
525
        c.opt_["pageToken"] = pageToken
 
526
        return c
 
527
}
 
528
 
 
529
// SortBy sets the optional parameter "sortBy": Sorting criterion. The
 
530
// only supported value is change sequence.
 
531
func (c *ChangesListCall) SortBy(sortBy string) *ChangesListCall {
 
532
        c.opt_["sortBy"] = sortBy
 
533
        return c
 
534
}
 
535
 
 
536
// SortOrder sets the optional parameter "sortOrder": Sorting order
 
537
// direction: 'ascending' or 'descending'.
 
538
func (c *ChangesListCall) SortOrder(sortOrder string) *ChangesListCall {
 
539
        c.opt_["sortOrder"] = sortOrder
 
540
        return c
 
541
}
 
542
 
 
543
// Fields allows partial responses to be retrieved.
 
544
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
545
// for more information.
 
546
func (c *ChangesListCall) Fields(s ...googleapi.Field) *ChangesListCall {
 
547
        c.opt_["fields"] = googleapi.CombineFields(s)
 
548
        return c
 
549
}
 
550
 
 
551
func (c *ChangesListCall) Do() (*ChangesListResponse, error) {
 
552
        var body io.Reader = nil
 
553
        params := make(url.Values)
 
554
        params.Set("alt", "json")
 
555
        if v, ok := c.opt_["maxResults"]; ok {
 
556
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
557
        }
 
558
        if v, ok := c.opt_["pageToken"]; ok {
 
559
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
560
        }
 
561
        if v, ok := c.opt_["sortBy"]; ok {
 
562
                params.Set("sortBy", fmt.Sprintf("%v", v))
 
563
        }
 
564
        if v, ok := c.opt_["sortOrder"]; ok {
 
565
                params.Set("sortOrder", fmt.Sprintf("%v", v))
 
566
        }
 
567
        if v, ok := c.opt_["fields"]; ok {
 
568
                params.Set("fields", fmt.Sprintf("%v", v))
 
569
        }
 
570
        urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/changes")
 
571
        urls += "?" + params.Encode()
 
572
        req, _ := http.NewRequest("GET", urls, body)
 
573
        googleapi.Expand(req.URL, map[string]string{
 
574
                "project":     c.project,
 
575
                "managedZone": c.managedZone,
 
576
        })
 
577
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
578
        res, err := c.s.client.Do(req)
 
579
        if err != nil {
 
580
                return nil, err
 
581
        }
 
582
        defer googleapi.CloseBody(res)
 
583
        if err := googleapi.CheckResponse(res); err != nil {
 
584
                return nil, err
 
585
        }
 
586
        var ret *ChangesListResponse
 
587
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
588
                return nil, err
 
589
        }
 
590
        return ret, nil
 
591
        // {
 
592
        //   "description": "Enumerate Changes to a ResourceRecordSet collection.",
 
593
        //   "httpMethod": "GET",
 
594
        //   "id": "dns.changes.list",
 
595
        //   "parameterOrder": [
 
596
        //     "project",
 
597
        //     "managedZone"
 
598
        //   ],
 
599
        //   "parameters": {
 
600
        //     "managedZone": {
 
601
        //       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.",
 
602
        //       "location": "path",
 
603
        //       "required": true,
 
604
        //       "type": "string"
 
605
        //     },
 
606
        //     "maxResults": {
 
607
        //       "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.",
 
608
        //       "format": "int32",
 
609
        //       "location": "query",
 
610
        //       "type": "integer"
 
611
        //     },
 
612
        //     "pageToken": {
 
613
        //       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
 
614
        //       "location": "query",
 
615
        //       "type": "string"
 
616
        //     },
 
617
        //     "project": {
 
618
        //       "description": "Identifies the project addressed by this request.",
 
619
        //       "location": "path",
 
620
        //       "required": true,
 
621
        //       "type": "string"
 
622
        //     },
 
623
        //     "sortBy": {
 
624
        //       "default": "changeSequence",
 
625
        //       "description": "Sorting criterion. The only supported value is change sequence.",
 
626
        //       "enum": [
 
627
        //         "changeSequence"
 
628
        //       ],
 
629
        //       "enumDescriptions": [
 
630
        //         ""
 
631
        //       ],
 
632
        //       "location": "query",
 
633
        //       "type": "string"
 
634
        //     },
 
635
        //     "sortOrder": {
 
636
        //       "description": "Sorting order direction: 'ascending' or 'descending'.",
 
637
        //       "location": "query",
 
638
        //       "type": "string"
 
639
        //     }
 
640
        //   },
 
641
        //   "path": "{project}/managedZones/{managedZone}/changes",
 
642
        //   "response": {
 
643
        //     "$ref": "ChangesListResponse"
 
644
        //   },
 
645
        //   "scopes": [
 
646
        //     "https://www.googleapis.com/auth/cloud-platform",
 
647
        //     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
 
648
        //     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
 
649
        //   ]
 
650
        // }
 
651
 
 
652
}
 
653
 
 
654
// method id "dns.managedZones.create":
 
655
 
 
656
type ManagedZonesCreateCall struct {
 
657
        s           *Service
 
658
        project     string
 
659
        managedzone *ManagedZone
 
660
        opt_        map[string]interface{}
 
661
}
 
662
 
 
663
// Create: Create a new ManagedZone.
 
664
func (r *ManagedZonesService) Create(project string, managedzone *ManagedZone) *ManagedZonesCreateCall {
 
665
        c := &ManagedZonesCreateCall{s: r.s, opt_: make(map[string]interface{})}
 
666
        c.project = project
 
667
        c.managedzone = managedzone
 
668
        return c
 
669
}
 
670
 
 
671
// Fields allows partial responses to be retrieved.
 
672
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
673
// for more information.
 
674
func (c *ManagedZonesCreateCall) Fields(s ...googleapi.Field) *ManagedZonesCreateCall {
 
675
        c.opt_["fields"] = googleapi.CombineFields(s)
 
676
        return c
 
677
}
 
678
 
 
679
func (c *ManagedZonesCreateCall) Do() (*ManagedZone, error) {
 
680
        var body io.Reader = nil
 
681
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
 
682
        if err != nil {
 
683
                return nil, err
 
684
        }
 
685
        ctype := "application/json"
 
686
        params := make(url.Values)
 
687
        params.Set("alt", "json")
 
688
        if v, ok := c.opt_["fields"]; ok {
 
689
                params.Set("fields", fmt.Sprintf("%v", v))
 
690
        }
 
691
        urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones")
 
692
        urls += "?" + params.Encode()
 
693
        req, _ := http.NewRequest("POST", urls, body)
 
694
        googleapi.Expand(req.URL, map[string]string{
 
695
                "project": c.project,
 
696
        })
 
697
        req.Header.Set("Content-Type", ctype)
 
698
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
699
        res, err := c.s.client.Do(req)
 
700
        if err != nil {
 
701
                return nil, err
 
702
        }
 
703
        defer googleapi.CloseBody(res)
 
704
        if err := googleapi.CheckResponse(res); err != nil {
 
705
                return nil, err
 
706
        }
 
707
        var ret *ManagedZone
 
708
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
709
                return nil, err
 
710
        }
 
711
        return ret, nil
 
712
        // {
 
713
        //   "description": "Create a new ManagedZone.",
 
714
        //   "httpMethod": "POST",
 
715
        //   "id": "dns.managedZones.create",
 
716
        //   "parameterOrder": [
 
717
        //     "project"
 
718
        //   ],
 
719
        //   "parameters": {
 
720
        //     "project": {
 
721
        //       "description": "Identifies the project addressed by this request.",
 
722
        //       "location": "path",
 
723
        //       "required": true,
 
724
        //       "type": "string"
 
725
        //     }
 
726
        //   },
 
727
        //   "path": "{project}/managedZones",
 
728
        //   "request": {
 
729
        //     "$ref": "ManagedZone"
 
730
        //   },
 
731
        //   "response": {
 
732
        //     "$ref": "ManagedZone"
 
733
        //   },
 
734
        //   "scopes": [
 
735
        //     "https://www.googleapis.com/auth/cloud-platform",
 
736
        //     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
 
737
        //   ]
 
738
        // }
 
739
 
 
740
}
 
741
 
 
742
// method id "dns.managedZones.delete":
 
743
 
 
744
type ManagedZonesDeleteCall struct {
 
745
        s           *Service
 
746
        project     string
 
747
        managedZone string
 
748
        opt_        map[string]interface{}
 
749
}
 
750
 
 
751
// Delete: Delete a previously created ManagedZone.
 
752
func (r *ManagedZonesService) Delete(project string, managedZone string) *ManagedZonesDeleteCall {
 
753
        c := &ManagedZonesDeleteCall{s: r.s, opt_: make(map[string]interface{})}
 
754
        c.project = project
 
755
        c.managedZone = managedZone
 
756
        return c
 
757
}
 
758
 
 
759
// Fields allows partial responses to be retrieved.
 
760
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
761
// for more information.
 
762
func (c *ManagedZonesDeleteCall) Fields(s ...googleapi.Field) *ManagedZonesDeleteCall {
 
763
        c.opt_["fields"] = googleapi.CombineFields(s)
 
764
        return c
 
765
}
 
766
 
 
767
func (c *ManagedZonesDeleteCall) Do() error {
 
768
        var body io.Reader = nil
 
769
        params := make(url.Values)
 
770
        params.Set("alt", "json")
 
771
        if v, ok := c.opt_["fields"]; ok {
 
772
                params.Set("fields", fmt.Sprintf("%v", v))
 
773
        }
 
774
        urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}")
 
775
        urls += "?" + params.Encode()
 
776
        req, _ := http.NewRequest("DELETE", urls, body)
 
777
        googleapi.Expand(req.URL, map[string]string{
 
778
                "project":     c.project,
 
779
                "managedZone": c.managedZone,
 
780
        })
 
781
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
782
        res, err := c.s.client.Do(req)
 
783
        if err != nil {
 
784
                return err
 
785
        }
 
786
        defer googleapi.CloseBody(res)
 
787
        if err := googleapi.CheckResponse(res); err != nil {
 
788
                return err
 
789
        }
 
790
        return nil
 
791
        // {
 
792
        //   "description": "Delete a previously created ManagedZone.",
 
793
        //   "httpMethod": "DELETE",
 
794
        //   "id": "dns.managedZones.delete",
 
795
        //   "parameterOrder": [
 
796
        //     "project",
 
797
        //     "managedZone"
 
798
        //   ],
 
799
        //   "parameters": {
 
800
        //     "managedZone": {
 
801
        //       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.",
 
802
        //       "location": "path",
 
803
        //       "required": true,
 
804
        //       "type": "string"
 
805
        //     },
 
806
        //     "project": {
 
807
        //       "description": "Identifies the project addressed by this request.",
 
808
        //       "location": "path",
 
809
        //       "required": true,
 
810
        //       "type": "string"
 
811
        //     }
 
812
        //   },
 
813
        //   "path": "{project}/managedZones/{managedZone}",
 
814
        //   "scopes": [
 
815
        //     "https://www.googleapis.com/auth/cloud-platform",
 
816
        //     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
 
817
        //   ]
 
818
        // }
 
819
 
 
820
}
 
821
 
 
822
// method id "dns.managedZones.get":
 
823
 
 
824
type ManagedZonesGetCall struct {
 
825
        s           *Service
 
826
        project     string
 
827
        managedZone string
 
828
        opt_        map[string]interface{}
 
829
}
 
830
 
 
831
// Get: Fetch the representation of an existing ManagedZone.
 
832
func (r *ManagedZonesService) Get(project string, managedZone string) *ManagedZonesGetCall {
 
833
        c := &ManagedZonesGetCall{s: r.s, opt_: make(map[string]interface{})}
 
834
        c.project = project
 
835
        c.managedZone = managedZone
 
836
        return c
 
837
}
 
838
 
 
839
// Fields allows partial responses to be retrieved.
 
840
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
841
// for more information.
 
842
func (c *ManagedZonesGetCall) Fields(s ...googleapi.Field) *ManagedZonesGetCall {
 
843
        c.opt_["fields"] = googleapi.CombineFields(s)
 
844
        return c
 
845
}
 
846
 
 
847
func (c *ManagedZonesGetCall) Do() (*ManagedZone, error) {
 
848
        var body io.Reader = nil
 
849
        params := make(url.Values)
 
850
        params.Set("alt", "json")
 
851
        if v, ok := c.opt_["fields"]; ok {
 
852
                params.Set("fields", fmt.Sprintf("%v", v))
 
853
        }
 
854
        urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}")
 
855
        urls += "?" + params.Encode()
 
856
        req, _ := http.NewRequest("GET", urls, body)
 
857
        googleapi.Expand(req.URL, map[string]string{
 
858
                "project":     c.project,
 
859
                "managedZone": c.managedZone,
 
860
        })
 
861
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
862
        res, err := c.s.client.Do(req)
 
863
        if err != nil {
 
864
                return nil, err
 
865
        }
 
866
        defer googleapi.CloseBody(res)
 
867
        if err := googleapi.CheckResponse(res); err != nil {
 
868
                return nil, err
 
869
        }
 
870
        var ret *ManagedZone
 
871
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
872
                return nil, err
 
873
        }
 
874
        return ret, nil
 
875
        // {
 
876
        //   "description": "Fetch the representation of an existing ManagedZone.",
 
877
        //   "httpMethod": "GET",
 
878
        //   "id": "dns.managedZones.get",
 
879
        //   "parameterOrder": [
 
880
        //     "project",
 
881
        //     "managedZone"
 
882
        //   ],
 
883
        //   "parameters": {
 
884
        //     "managedZone": {
 
885
        //       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.",
 
886
        //       "location": "path",
 
887
        //       "required": true,
 
888
        //       "type": "string"
 
889
        //     },
 
890
        //     "project": {
 
891
        //       "description": "Identifies the project addressed by this request.",
 
892
        //       "location": "path",
 
893
        //       "required": true,
 
894
        //       "type": "string"
 
895
        //     }
 
896
        //   },
 
897
        //   "path": "{project}/managedZones/{managedZone}",
 
898
        //   "response": {
 
899
        //     "$ref": "ManagedZone"
 
900
        //   },
 
901
        //   "scopes": [
 
902
        //     "https://www.googleapis.com/auth/cloud-platform",
 
903
        //     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
 
904
        //     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
 
905
        //   ]
 
906
        // }
 
907
 
 
908
}
 
909
 
 
910
// method id "dns.managedZones.list":
 
911
 
 
912
type ManagedZonesListCall struct {
 
913
        s       *Service
 
914
        project string
 
915
        opt_    map[string]interface{}
 
916
}
 
917
 
 
918
// List: Enumerate ManagedZones that have been created but not yet
 
919
// deleted.
 
920
func (r *ManagedZonesService) List(project string) *ManagedZonesListCall {
 
921
        c := &ManagedZonesListCall{s: r.s, opt_: make(map[string]interface{})}
 
922
        c.project = project
 
923
        return c
 
924
}
 
925
 
 
926
// MaxResults sets the optional parameter "maxResults": Maximum number
 
927
// of results to be returned. If unspecified, the server will decide how
 
928
// many results to return.
 
929
func (c *ManagedZonesListCall) MaxResults(maxResults int64) *ManagedZonesListCall {
 
930
        c.opt_["maxResults"] = maxResults
 
931
        return c
 
932
}
 
933
 
 
934
// PageToken sets the optional parameter "pageToken": A tag returned by
 
935
// a previous list request that was truncated. Use this parameter to
 
936
// continue a previous list request.
 
937
func (c *ManagedZonesListCall) PageToken(pageToken string) *ManagedZonesListCall {
 
938
        c.opt_["pageToken"] = pageToken
 
939
        return c
 
940
}
 
941
 
 
942
// Fields allows partial responses to be retrieved.
 
943
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
944
// for more information.
 
945
func (c *ManagedZonesListCall) Fields(s ...googleapi.Field) *ManagedZonesListCall {
 
946
        c.opt_["fields"] = googleapi.CombineFields(s)
 
947
        return c
 
948
}
 
949
 
 
950
func (c *ManagedZonesListCall) Do() (*ManagedZonesListResponse, error) {
 
951
        var body io.Reader = nil
 
952
        params := make(url.Values)
 
953
        params.Set("alt", "json")
 
954
        if v, ok := c.opt_["maxResults"]; ok {
 
955
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
956
        }
 
957
        if v, ok := c.opt_["pageToken"]; ok {
 
958
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
959
        }
 
960
        if v, ok := c.opt_["fields"]; ok {
 
961
                params.Set("fields", fmt.Sprintf("%v", v))
 
962
        }
 
963
        urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones")
 
964
        urls += "?" + params.Encode()
 
965
        req, _ := http.NewRequest("GET", urls, body)
 
966
        googleapi.Expand(req.URL, map[string]string{
 
967
                "project": c.project,
 
968
        })
 
969
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
970
        res, err := c.s.client.Do(req)
 
971
        if err != nil {
 
972
                return nil, err
 
973
        }
 
974
        defer googleapi.CloseBody(res)
 
975
        if err := googleapi.CheckResponse(res); err != nil {
 
976
                return nil, err
 
977
        }
 
978
        var ret *ManagedZonesListResponse
 
979
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
980
                return nil, err
 
981
        }
 
982
        return ret, nil
 
983
        // {
 
984
        //   "description": "Enumerate ManagedZones that have been created but not yet deleted.",
 
985
        //   "httpMethod": "GET",
 
986
        //   "id": "dns.managedZones.list",
 
987
        //   "parameterOrder": [
 
988
        //     "project"
 
989
        //   ],
 
990
        //   "parameters": {
 
991
        //     "maxResults": {
 
992
        //       "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.",
 
993
        //       "format": "int32",
 
994
        //       "location": "query",
 
995
        //       "type": "integer"
 
996
        //     },
 
997
        //     "pageToken": {
 
998
        //       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
 
999
        //       "location": "query",
 
1000
        //       "type": "string"
 
1001
        //     },
 
1002
        //     "project": {
 
1003
        //       "description": "Identifies the project addressed by this request.",
 
1004
        //       "location": "path",
 
1005
        //       "required": true,
 
1006
        //       "type": "string"
 
1007
        //     }
 
1008
        //   },
 
1009
        //   "path": "{project}/managedZones",
 
1010
        //   "response": {
 
1011
        //     "$ref": "ManagedZonesListResponse"
 
1012
        //   },
 
1013
        //   "scopes": [
 
1014
        //     "https://www.googleapis.com/auth/cloud-platform",
 
1015
        //     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
 
1016
        //     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
 
1017
        //   ]
 
1018
        // }
 
1019
 
 
1020
}
 
1021
 
 
1022
// method id "dns.projects.get":
 
1023
 
 
1024
type ProjectsGetCall struct {
 
1025
        s       *Service
 
1026
        project string
 
1027
        opt_    map[string]interface{}
 
1028
}
 
1029
 
 
1030
// Get: Fetch the representation of an existing Project.
 
1031
func (r *ProjectsService) Get(project string) *ProjectsGetCall {
 
1032
        c := &ProjectsGetCall{s: r.s, opt_: make(map[string]interface{})}
 
1033
        c.project = project
 
1034
        return c
 
1035
}
 
1036
 
 
1037
// Fields allows partial responses to be retrieved.
 
1038
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1039
// for more information.
 
1040
func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
 
1041
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1042
        return c
 
1043
}
 
1044
 
 
1045
func (c *ProjectsGetCall) Do() (*Project, error) {
 
1046
        var body io.Reader = nil
 
1047
        params := make(url.Values)
 
1048
        params.Set("alt", "json")
 
1049
        if v, ok := c.opt_["fields"]; ok {
 
1050
                params.Set("fields", fmt.Sprintf("%v", v))
 
1051
        }
 
1052
        urls := googleapi.ResolveRelative(c.s.BasePath, "{project}")
 
1053
        urls += "?" + params.Encode()
 
1054
        req, _ := http.NewRequest("GET", urls, body)
 
1055
        googleapi.Expand(req.URL, map[string]string{
 
1056
                "project": c.project,
 
1057
        })
 
1058
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1059
        res, err := c.s.client.Do(req)
 
1060
        if err != nil {
 
1061
                return nil, err
 
1062
        }
 
1063
        defer googleapi.CloseBody(res)
 
1064
        if err := googleapi.CheckResponse(res); err != nil {
 
1065
                return nil, err
 
1066
        }
 
1067
        var ret *Project
 
1068
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1069
                return nil, err
 
1070
        }
 
1071
        return ret, nil
 
1072
        // {
 
1073
        //   "description": "Fetch the representation of an existing Project.",
 
1074
        //   "httpMethod": "GET",
 
1075
        //   "id": "dns.projects.get",
 
1076
        //   "parameterOrder": [
 
1077
        //     "project"
 
1078
        //   ],
 
1079
        //   "parameters": {
 
1080
        //     "project": {
 
1081
        //       "description": "Identifies the project addressed by this request.",
 
1082
        //       "location": "path",
 
1083
        //       "required": true,
 
1084
        //       "type": "string"
 
1085
        //     }
 
1086
        //   },
 
1087
        //   "path": "{project}",
 
1088
        //   "response": {
 
1089
        //     "$ref": "Project"
 
1090
        //   },
 
1091
        //   "scopes": [
 
1092
        //     "https://www.googleapis.com/auth/cloud-platform",
 
1093
        //     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
 
1094
        //     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
 
1095
        //   ]
 
1096
        // }
 
1097
 
 
1098
}
 
1099
 
 
1100
// method id "dns.resourceRecordSets.list":
 
1101
 
 
1102
type ResourceRecordSetsListCall struct {
 
1103
        s           *Service
 
1104
        project     string
 
1105
        managedZone string
 
1106
        opt_        map[string]interface{}
 
1107
}
 
1108
 
 
1109
// List: Enumerate ResourceRecordSets that have been created but not yet
 
1110
// deleted.
 
1111
func (r *ResourceRecordSetsService) List(project string, managedZone string) *ResourceRecordSetsListCall {
 
1112
        c := &ResourceRecordSetsListCall{s: r.s, opt_: make(map[string]interface{})}
 
1113
        c.project = project
 
1114
        c.managedZone = managedZone
 
1115
        return c
 
1116
}
 
1117
 
 
1118
// MaxResults sets the optional parameter "maxResults": Maximum number
 
1119
// of results to be returned. If unspecified, the server will decide how
 
1120
// many results to return.
 
1121
func (c *ResourceRecordSetsListCall) MaxResults(maxResults int64) *ResourceRecordSetsListCall {
 
1122
        c.opt_["maxResults"] = maxResults
 
1123
        return c
 
1124
}
 
1125
 
 
1126
// Name sets the optional parameter "name": Restricts the list to return
 
1127
// only records with this fully qualified domain name.
 
1128
func (c *ResourceRecordSetsListCall) Name(name string) *ResourceRecordSetsListCall {
 
1129
        c.opt_["name"] = name
 
1130
        return c
 
1131
}
 
1132
 
 
1133
// PageToken sets the optional parameter "pageToken": A tag returned by
 
1134
// a previous list request that was truncated. Use this parameter to
 
1135
// continue a previous list request.
 
1136
func (c *ResourceRecordSetsListCall) PageToken(pageToken string) *ResourceRecordSetsListCall {
 
1137
        c.opt_["pageToken"] = pageToken
 
1138
        return c
 
1139
}
 
1140
 
 
1141
// Type sets the optional parameter "type": Restricts the list to return
 
1142
// only records of this type. If present, the "name" parameter must also
 
1143
// be present.
 
1144
func (c *ResourceRecordSetsListCall) Type(type_ string) *ResourceRecordSetsListCall {
 
1145
        c.opt_["type"] = type_
 
1146
        return c
 
1147
}
 
1148
 
 
1149
// Fields allows partial responses to be retrieved.
 
1150
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1151
// for more information.
 
1152
func (c *ResourceRecordSetsListCall) Fields(s ...googleapi.Field) *ResourceRecordSetsListCall {
 
1153
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1154
        return c
 
1155
}
 
1156
 
 
1157
func (c *ResourceRecordSetsListCall) Do() (*ResourceRecordSetsListResponse, error) {
 
1158
        var body io.Reader = nil
 
1159
        params := make(url.Values)
 
1160
        params.Set("alt", "json")
 
1161
        if v, ok := c.opt_["maxResults"]; ok {
 
1162
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
1163
        }
 
1164
        if v, ok := c.opt_["name"]; ok {
 
1165
                params.Set("name", fmt.Sprintf("%v", v))
 
1166
        }
 
1167
        if v, ok := c.opt_["pageToken"]; ok {
 
1168
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
1169
        }
 
1170
        if v, ok := c.opt_["type"]; ok {
 
1171
                params.Set("type", fmt.Sprintf("%v", v))
 
1172
        }
 
1173
        if v, ok := c.opt_["fields"]; ok {
 
1174
                params.Set("fields", fmt.Sprintf("%v", v))
 
1175
        }
 
1176
        urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/rrsets")
 
1177
        urls += "?" + params.Encode()
 
1178
        req, _ := http.NewRequest("GET", urls, body)
 
1179
        googleapi.Expand(req.URL, map[string]string{
 
1180
                "project":     c.project,
 
1181
                "managedZone": c.managedZone,
 
1182
        })
 
1183
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1184
        res, err := c.s.client.Do(req)
 
1185
        if err != nil {
 
1186
                return nil, err
 
1187
        }
 
1188
        defer googleapi.CloseBody(res)
 
1189
        if err := googleapi.CheckResponse(res); err != nil {
 
1190
                return nil, err
 
1191
        }
 
1192
        var ret *ResourceRecordSetsListResponse
 
1193
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1194
                return nil, err
 
1195
        }
 
1196
        return ret, nil
 
1197
        // {
 
1198
        //   "description": "Enumerate ResourceRecordSets that have been created but not yet deleted.",
 
1199
        //   "httpMethod": "GET",
 
1200
        //   "id": "dns.resourceRecordSets.list",
 
1201
        //   "parameterOrder": [
 
1202
        //     "project",
 
1203
        //     "managedZone"
 
1204
        //   ],
 
1205
        //   "parameters": {
 
1206
        //     "managedZone": {
 
1207
        //       "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.",
 
1208
        //       "location": "path",
 
1209
        //       "required": true,
 
1210
        //       "type": "string"
 
1211
        //     },
 
1212
        //     "maxResults": {
 
1213
        //       "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.",
 
1214
        //       "format": "int32",
 
1215
        //       "location": "query",
 
1216
        //       "type": "integer"
 
1217
        //     },
 
1218
        //     "name": {
 
1219
        //       "description": "Restricts the list to return only records with this fully qualified domain name.",
 
1220
        //       "location": "query",
 
1221
        //       "type": "string"
 
1222
        //     },
 
1223
        //     "pageToken": {
 
1224
        //       "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.",
 
1225
        //       "location": "query",
 
1226
        //       "type": "string"
 
1227
        //     },
 
1228
        //     "project": {
 
1229
        //       "description": "Identifies the project addressed by this request.",
 
1230
        //       "location": "path",
 
1231
        //       "required": true,
 
1232
        //       "type": "string"
 
1233
        //     },
 
1234
        //     "type": {
 
1235
        //       "description": "Restricts the list to return only records of this type. If present, the \"name\" parameter must also be present.",
 
1236
        //       "location": "query",
 
1237
        //       "type": "string"
 
1238
        //     }
 
1239
        //   },
 
1240
        //   "path": "{project}/managedZones/{managedZone}/rrsets",
 
1241
        //   "response": {
 
1242
        //     "$ref": "ResourceRecordSetsListResponse"
 
1243
        //   },
 
1244
        //   "scopes": [
 
1245
        //     "https://www.googleapis.com/auth/cloud-platform",
 
1246
        //     "https://www.googleapis.com/auth/ndev.clouddns.readonly",
 
1247
        //     "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
 
1248
        //   ]
 
1249
        // }
 
1250
 
 
1251
}