~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/google.golang.org/api/books/v1/books-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 books provides access to the Books API.
 
2
//
 
3
// See https://developers.google.com/books/docs/v1/getting_started
 
4
//
 
5
// Usage example:
 
6
//
 
7
//   import "google.golang.org/api/books/v1"
 
8
//   ...
 
9
//   booksService, err := books.New(oauthHttpClient)
 
10
package books
 
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 = "books:v1"
 
38
const apiName = "books"
 
39
const apiVersion = "v1"
 
40
const basePath = "https://www.googleapis.com/books/v1/"
 
41
 
 
42
// OAuth2 scopes used by this API.
 
43
const (
 
44
        // Manage your books
 
45
        BooksScope = "https://www.googleapis.com/auth/books"
 
46
)
 
47
 
 
48
func New(client *http.Client) (*Service, error) {
 
49
        if client == nil {
 
50
                return nil, errors.New("client is nil")
 
51
        }
 
52
        s := &Service{client: client, BasePath: basePath}
 
53
        s.Bookshelves = NewBookshelvesService(s)
 
54
        s.Cloudloading = NewCloudloadingService(s)
 
55
        s.Layers = NewLayersService(s)
 
56
        s.Myconfig = NewMyconfigService(s)
 
57
        s.Mylibrary = NewMylibraryService(s)
 
58
        s.Promooffer = NewPromoofferService(s)
 
59
        s.Volumes = NewVolumesService(s)
 
60
        return s, nil
 
61
}
 
62
 
 
63
type Service struct {
 
64
        client   *http.Client
 
65
        BasePath string // API endpoint base URL
 
66
 
 
67
        Bookshelves *BookshelvesService
 
68
 
 
69
        Cloudloading *CloudloadingService
 
70
 
 
71
        Layers *LayersService
 
72
 
 
73
        Myconfig *MyconfigService
 
74
 
 
75
        Mylibrary *MylibraryService
 
76
 
 
77
        Promooffer *PromoofferService
 
78
 
 
79
        Volumes *VolumesService
 
80
}
 
81
 
 
82
func NewBookshelvesService(s *Service) *BookshelvesService {
 
83
        rs := &BookshelvesService{s: s}
 
84
        rs.Volumes = NewBookshelvesVolumesService(s)
 
85
        return rs
 
86
}
 
87
 
 
88
type BookshelvesService struct {
 
89
        s *Service
 
90
 
 
91
        Volumes *BookshelvesVolumesService
 
92
}
 
93
 
 
94
func NewBookshelvesVolumesService(s *Service) *BookshelvesVolumesService {
 
95
        rs := &BookshelvesVolumesService{s: s}
 
96
        return rs
 
97
}
 
98
 
 
99
type BookshelvesVolumesService struct {
 
100
        s *Service
 
101
}
 
102
 
 
103
func NewCloudloadingService(s *Service) *CloudloadingService {
 
104
        rs := &CloudloadingService{s: s}
 
105
        return rs
 
106
}
 
107
 
 
108
type CloudloadingService struct {
 
109
        s *Service
 
110
}
 
111
 
 
112
func NewLayersService(s *Service) *LayersService {
 
113
        rs := &LayersService{s: s}
 
114
        rs.AnnotationData = NewLayersAnnotationDataService(s)
 
115
        rs.VolumeAnnotations = NewLayersVolumeAnnotationsService(s)
 
116
        return rs
 
117
}
 
118
 
 
119
type LayersService struct {
 
120
        s *Service
 
121
 
 
122
        AnnotationData *LayersAnnotationDataService
 
123
 
 
124
        VolumeAnnotations *LayersVolumeAnnotationsService
 
125
}
 
126
 
 
127
func NewLayersAnnotationDataService(s *Service) *LayersAnnotationDataService {
 
128
        rs := &LayersAnnotationDataService{s: s}
 
129
        return rs
 
130
}
 
131
 
 
132
type LayersAnnotationDataService struct {
 
133
        s *Service
 
134
}
 
135
 
 
136
func NewLayersVolumeAnnotationsService(s *Service) *LayersVolumeAnnotationsService {
 
137
        rs := &LayersVolumeAnnotationsService{s: s}
 
138
        return rs
 
139
}
 
140
 
 
141
type LayersVolumeAnnotationsService struct {
 
142
        s *Service
 
143
}
 
144
 
 
145
func NewMyconfigService(s *Service) *MyconfigService {
 
146
        rs := &MyconfigService{s: s}
 
147
        return rs
 
148
}
 
149
 
 
150
type MyconfigService struct {
 
151
        s *Service
 
152
}
 
153
 
 
154
func NewMylibraryService(s *Service) *MylibraryService {
 
155
        rs := &MylibraryService{s: s}
 
156
        rs.Annotations = NewMylibraryAnnotationsService(s)
 
157
        rs.Bookshelves = NewMylibraryBookshelvesService(s)
 
158
        rs.Readingpositions = NewMylibraryReadingpositionsService(s)
 
159
        return rs
 
160
}
 
161
 
 
162
type MylibraryService struct {
 
163
        s *Service
 
164
 
 
165
        Annotations *MylibraryAnnotationsService
 
166
 
 
167
        Bookshelves *MylibraryBookshelvesService
 
168
 
 
169
        Readingpositions *MylibraryReadingpositionsService
 
170
}
 
171
 
 
172
func NewMylibraryAnnotationsService(s *Service) *MylibraryAnnotationsService {
 
173
        rs := &MylibraryAnnotationsService{s: s}
 
174
        return rs
 
175
}
 
176
 
 
177
type MylibraryAnnotationsService struct {
 
178
        s *Service
 
179
}
 
180
 
 
181
func NewMylibraryBookshelvesService(s *Service) *MylibraryBookshelvesService {
 
182
        rs := &MylibraryBookshelvesService{s: s}
 
183
        rs.Volumes = NewMylibraryBookshelvesVolumesService(s)
 
184
        return rs
 
185
}
 
186
 
 
187
type MylibraryBookshelvesService struct {
 
188
        s *Service
 
189
 
 
190
        Volumes *MylibraryBookshelvesVolumesService
 
191
}
 
192
 
 
193
func NewMylibraryBookshelvesVolumesService(s *Service) *MylibraryBookshelvesVolumesService {
 
194
        rs := &MylibraryBookshelvesVolumesService{s: s}
 
195
        return rs
 
196
}
 
197
 
 
198
type MylibraryBookshelvesVolumesService struct {
 
199
        s *Service
 
200
}
 
201
 
 
202
func NewMylibraryReadingpositionsService(s *Service) *MylibraryReadingpositionsService {
 
203
        rs := &MylibraryReadingpositionsService{s: s}
 
204
        return rs
 
205
}
 
206
 
 
207
type MylibraryReadingpositionsService struct {
 
208
        s *Service
 
209
}
 
210
 
 
211
func NewPromoofferService(s *Service) *PromoofferService {
 
212
        rs := &PromoofferService{s: s}
 
213
        return rs
 
214
}
 
215
 
 
216
type PromoofferService struct {
 
217
        s *Service
 
218
}
 
219
 
 
220
func NewVolumesService(s *Service) *VolumesService {
 
221
        rs := &VolumesService{s: s}
 
222
        rs.Associated = NewVolumesAssociatedService(s)
 
223
        rs.Mybooks = NewVolumesMybooksService(s)
 
224
        rs.Recommended = NewVolumesRecommendedService(s)
 
225
        rs.Useruploaded = NewVolumesUseruploadedService(s)
 
226
        return rs
 
227
}
 
228
 
 
229
type VolumesService struct {
 
230
        s *Service
 
231
 
 
232
        Associated *VolumesAssociatedService
 
233
 
 
234
        Mybooks *VolumesMybooksService
 
235
 
 
236
        Recommended *VolumesRecommendedService
 
237
 
 
238
        Useruploaded *VolumesUseruploadedService
 
239
}
 
240
 
 
241
func NewVolumesAssociatedService(s *Service) *VolumesAssociatedService {
 
242
        rs := &VolumesAssociatedService{s: s}
 
243
        return rs
 
244
}
 
245
 
 
246
type VolumesAssociatedService struct {
 
247
        s *Service
 
248
}
 
249
 
 
250
func NewVolumesMybooksService(s *Service) *VolumesMybooksService {
 
251
        rs := &VolumesMybooksService{s: s}
 
252
        return rs
 
253
}
 
254
 
 
255
type VolumesMybooksService struct {
 
256
        s *Service
 
257
}
 
258
 
 
259
func NewVolumesRecommendedService(s *Service) *VolumesRecommendedService {
 
260
        rs := &VolumesRecommendedService{s: s}
 
261
        return rs
 
262
}
 
263
 
 
264
type VolumesRecommendedService struct {
 
265
        s *Service
 
266
}
 
267
 
 
268
func NewVolumesUseruploadedService(s *Service) *VolumesUseruploadedService {
 
269
        rs := &VolumesUseruploadedService{s: s}
 
270
        return rs
 
271
}
 
272
 
 
273
type VolumesUseruploadedService struct {
 
274
        s *Service
 
275
}
 
276
 
 
277
type Annotation struct {
 
278
        // AfterSelectedText: Anchor text after excerpt. For requests, if the
 
279
        // user bookmarked a screen that has no flowing text on it, then this
 
280
        // field should be empty.
 
281
        AfterSelectedText string `json:"afterSelectedText,omitempty"`
 
282
 
 
283
        // BeforeSelectedText: Anchor text before excerpt. For requests, if the
 
284
        // user bookmarked a screen that has no flowing text on it, then this
 
285
        // field should be empty.
 
286
        BeforeSelectedText string `json:"beforeSelectedText,omitempty"`
 
287
 
 
288
        // ClientVersionRanges: Selection ranges sent from the client.
 
289
        ClientVersionRanges *AnnotationClientVersionRanges `json:"clientVersionRanges,omitempty"`
 
290
 
 
291
        // Created: Timestamp for the created time of this annotation.
 
292
        Created string `json:"created,omitempty"`
 
293
 
 
294
        // CurrentVersionRanges: Selection ranges for the most recent content
 
295
        // version.
 
296
        CurrentVersionRanges *AnnotationCurrentVersionRanges `json:"currentVersionRanges,omitempty"`
 
297
 
 
298
        // Data: User-created data for this annotation.
 
299
        Data string `json:"data,omitempty"`
 
300
 
 
301
        // Deleted: Indicates that this annotation is deleted.
 
302
        Deleted bool `json:"deleted,omitempty"`
 
303
 
 
304
        // HighlightStyle: The highlight style for this annotation.
 
305
        HighlightStyle string `json:"highlightStyle,omitempty"`
 
306
 
 
307
        // Id: Id of this annotation, in the form of a GUID.
 
308
        Id string `json:"id,omitempty"`
 
309
 
 
310
        // Kind: Resource type.
 
311
        Kind string `json:"kind,omitempty"`
 
312
 
 
313
        // LayerId: The layer this annotation is for.
 
314
        LayerId string `json:"layerId,omitempty"`
 
315
 
 
316
        LayerSummary *AnnotationLayerSummary `json:"layerSummary,omitempty"`
 
317
 
 
318
        // PageIds: Pages that this annotation spans.
 
319
        PageIds []string `json:"pageIds,omitempty"`
 
320
 
 
321
        // SelectedText: Excerpt from the volume.
 
322
        SelectedText string `json:"selectedText,omitempty"`
 
323
 
 
324
        // SelfLink: URL to this resource.
 
325
        SelfLink string `json:"selfLink,omitempty"`
 
326
 
 
327
        // Updated: Timestamp for the last time this annotation was modified.
 
328
        Updated string `json:"updated,omitempty"`
 
329
 
 
330
        // VolumeId: The volume that this annotation belongs to.
 
331
        VolumeId string `json:"volumeId,omitempty"`
 
332
}
 
333
 
 
334
type AnnotationClientVersionRanges struct {
 
335
        // CfiRange: Range in CFI format for this annotation sent by client.
 
336
        CfiRange *BooksAnnotationsRange `json:"cfiRange,omitempty"`
 
337
 
 
338
        // ContentVersion: Content version the client sent in.
 
339
        ContentVersion string `json:"contentVersion,omitempty"`
 
340
 
 
341
        // GbImageRange: Range in GB image format for this annotation sent by
 
342
        // client.
 
343
        GbImageRange *BooksAnnotationsRange `json:"gbImageRange,omitempty"`
 
344
 
 
345
        // GbTextRange: Range in GB text format for this annotation sent by
 
346
        // client.
 
347
        GbTextRange *BooksAnnotationsRange `json:"gbTextRange,omitempty"`
 
348
 
 
349
        // ImageCfiRange: Range in image CFI format for this annotation sent by
 
350
        // client.
 
351
        ImageCfiRange *BooksAnnotationsRange `json:"imageCfiRange,omitempty"`
 
352
}
 
353
 
 
354
type AnnotationCurrentVersionRanges struct {
 
355
        // CfiRange: Range in CFI format for this annotation for version above.
 
356
        CfiRange *BooksAnnotationsRange `json:"cfiRange,omitempty"`
 
357
 
 
358
        // ContentVersion: Content version applicable to ranges below.
 
359
        ContentVersion string `json:"contentVersion,omitempty"`
 
360
 
 
361
        // GbImageRange: Range in GB image format for this annotation for
 
362
        // version above.
 
363
        GbImageRange *BooksAnnotationsRange `json:"gbImageRange,omitempty"`
 
364
 
 
365
        // GbTextRange: Range in GB text format for this annotation for version
 
366
        // above.
 
367
        GbTextRange *BooksAnnotationsRange `json:"gbTextRange,omitempty"`
 
368
 
 
369
        // ImageCfiRange: Range in image CFI format for this annotation for
 
370
        // version above.
 
371
        ImageCfiRange *BooksAnnotationsRange `json:"imageCfiRange,omitempty"`
 
372
}
 
373
 
 
374
type AnnotationLayerSummary struct {
 
375
        // AllowedCharacterCount: Maximum allowed characters on this layer,
 
376
        // especially for the "copy" layer.
 
377
        AllowedCharacterCount int64 `json:"allowedCharacterCount,omitempty"`
 
378
 
 
379
        // LimitType: Type of limitation on this layer. "limited" or "unlimited"
 
380
        // for the "copy" layer.
 
381
        LimitType string `json:"limitType,omitempty"`
 
382
 
 
383
        // RemainingCharacterCount: Remaining allowed characters on this layer,
 
384
        // especially for the "copy" layer.
 
385
        RemainingCharacterCount int64 `json:"remainingCharacterCount,omitempty"`
 
386
}
 
387
 
 
388
type Annotationdata struct {
 
389
        // AnnotationType: The type of annotation this data is for.
 
390
        AnnotationType string `json:"annotationType,omitempty"`
 
391
 
 
392
        Data interface{} `json:"data,omitempty"`
 
393
 
 
394
        // Encoded_data: Base64 encoded data for this annotation data.
 
395
        Encoded_data string `json:"encoded_data,omitempty"`
 
396
 
 
397
        // Id: Unique id for this annotation data.
 
398
        Id string `json:"id,omitempty"`
 
399
 
 
400
        // Kind: Resource Type
 
401
        Kind string `json:"kind,omitempty"`
 
402
 
 
403
        // LayerId: The Layer id for this data. *
 
404
        LayerId string `json:"layerId,omitempty"`
 
405
 
 
406
        // SelfLink: URL for this resource. *
 
407
        SelfLink string `json:"selfLink,omitempty"`
 
408
 
 
409
        // Updated: Timestamp for the last time this data was updated. (RFC 3339
 
410
        // UTC date-time format).
 
411
        Updated string `json:"updated,omitempty"`
 
412
 
 
413
        // VolumeId: The volume id for this data. *
 
414
        VolumeId string `json:"volumeId,omitempty"`
 
415
}
 
416
 
 
417
type Annotations struct {
 
418
        // Items: A list of annotations.
 
419
        Items []*Annotation `json:"items,omitempty"`
 
420
 
 
421
        // Kind: Resource type.
 
422
        Kind string `json:"kind,omitempty"`
 
423
 
 
424
        // NextPageToken: Token to pass in for pagination for the next page.
 
425
        // This will not be present if this request does not have more results.
 
426
        NextPageToken string `json:"nextPageToken,omitempty"`
 
427
 
 
428
        // TotalItems: Total number of annotations found. This may be greater
 
429
        // than the number of notes returned in this response if results have
 
430
        // been paginated.
 
431
        TotalItems int64 `json:"totalItems,omitempty"`
 
432
}
 
433
 
 
434
type AnnotationsSummary struct {
 
435
        Kind string `json:"kind,omitempty"`
 
436
 
 
437
        Layers []*AnnotationsSummaryLayers `json:"layers,omitempty"`
 
438
}
 
439
 
 
440
type AnnotationsSummaryLayers struct {
 
441
        AllowedCharacterCount int64 `json:"allowedCharacterCount,omitempty"`
 
442
 
 
443
        LayerId string `json:"layerId,omitempty"`
 
444
 
 
445
        LimitType string `json:"limitType,omitempty"`
 
446
 
 
447
        RemainingCharacterCount int64 `json:"remainingCharacterCount,omitempty"`
 
448
 
 
449
        Updated string `json:"updated,omitempty"`
 
450
}
 
451
 
 
452
type Annotationsdata struct {
 
453
        // Items: A list of Annotation Data.
 
454
        Items []*Annotationdata `json:"items,omitempty"`
 
455
 
 
456
        // Kind: Resource type
 
457
        Kind string `json:"kind,omitempty"`
 
458
 
 
459
        // NextPageToken: Token to pass in for pagination for the next page.
 
460
        // This will not be present if this request does not have more results.
 
461
        NextPageToken string `json:"nextPageToken,omitempty"`
 
462
 
 
463
        // TotalItems: The total number of volume annotations found.
 
464
        TotalItems int64 `json:"totalItems,omitempty"`
 
465
}
 
466
 
 
467
type BooksAnnotationsRange struct {
 
468
        // EndOffset: The offset from the ending position.
 
469
        EndOffset string `json:"endOffset,omitempty"`
 
470
 
 
471
        // EndPosition: The ending position for the range.
 
472
        EndPosition string `json:"endPosition,omitempty"`
 
473
 
 
474
        // StartOffset: The offset from the starting position.
 
475
        StartOffset string `json:"startOffset,omitempty"`
 
476
 
 
477
        // StartPosition: The starting position for the range.
 
478
        StartPosition string `json:"startPosition,omitempty"`
 
479
}
 
480
 
 
481
type BooksCloudloadingResource struct {
 
482
        Author string `json:"author,omitempty"`
 
483
 
 
484
        ProcessingState string `json:"processingState,omitempty"`
 
485
 
 
486
        Title string `json:"title,omitempty"`
 
487
 
 
488
        VolumeId string `json:"volumeId,omitempty"`
 
489
}
 
490
 
 
491
type BooksVolumesRecommendedRateResponse struct {
 
492
        Consistency_token string `json:"consistency_token,omitempty"`
 
493
}
 
494
 
 
495
type Bookshelf struct {
 
496
        // Access: Whether this bookshelf is PUBLIC or PRIVATE.
 
497
        Access string `json:"access,omitempty"`
 
498
 
 
499
        // Created: Created time for this bookshelf (formatted UTC timestamp
 
500
        // with millisecond resolution).
 
501
        Created string `json:"created,omitempty"`
 
502
 
 
503
        // Description: Description of this bookshelf.
 
504
        Description string `json:"description,omitempty"`
 
505
 
 
506
        // Id: Id of this bookshelf, only unique by user.
 
507
        Id int64 `json:"id,omitempty"`
 
508
 
 
509
        // Kind: Resource type for bookshelf metadata.
 
510
        Kind string `json:"kind,omitempty"`
 
511
 
 
512
        // SelfLink: URL to this resource.
 
513
        SelfLink string `json:"selfLink,omitempty"`
 
514
 
 
515
        // Title: Title of this bookshelf.
 
516
        Title string `json:"title,omitempty"`
 
517
 
 
518
        // Updated: Last modified time of this bookshelf (formatted UTC
 
519
        // timestamp with millisecond resolution).
 
520
        Updated string `json:"updated,omitempty"`
 
521
 
 
522
        // VolumeCount: Number of volumes in this bookshelf.
 
523
        VolumeCount int64 `json:"volumeCount,omitempty"`
 
524
 
 
525
        // VolumesLastUpdated: Last time a volume was added or removed from this
 
526
        // bookshelf (formatted UTC timestamp with millisecond resolution).
 
527
        VolumesLastUpdated string `json:"volumesLastUpdated,omitempty"`
 
528
}
 
529
 
 
530
type Bookshelves struct {
 
531
        // Items: A list of bookshelves.
 
532
        Items []*Bookshelf `json:"items,omitempty"`
 
533
 
 
534
        // Kind: Resource type.
 
535
        Kind string `json:"kind,omitempty"`
 
536
}
 
537
 
 
538
type ConcurrentAccessRestriction struct {
 
539
        // DeviceAllowed: Whether access is granted for this (user, device,
 
540
        // volume).
 
541
        DeviceAllowed bool `json:"deviceAllowed,omitempty"`
 
542
 
 
543
        // Kind: Resource type.
 
544
        Kind string `json:"kind,omitempty"`
 
545
 
 
546
        // MaxConcurrentDevices: The maximum number of concurrent access
 
547
        // licenses for this volume.
 
548
        MaxConcurrentDevices int64 `json:"maxConcurrentDevices,omitempty"`
 
549
 
 
550
        // Message: Error/warning message.
 
551
        Message string `json:"message,omitempty"`
 
552
 
 
553
        // Nonce: Client nonce for verification. Download access and
 
554
        // client-validation only.
 
555
        Nonce string `json:"nonce,omitempty"`
 
556
 
 
557
        // ReasonCode: Error/warning reason code.
 
558
        ReasonCode string `json:"reasonCode,omitempty"`
 
559
 
 
560
        // Restricted: Whether this volume has any concurrent access
 
561
        // restrictions.
 
562
        Restricted bool `json:"restricted,omitempty"`
 
563
 
 
564
        // Signature: Response signature.
 
565
        Signature string `json:"signature,omitempty"`
 
566
 
 
567
        // Source: Client app identifier for verification. Download access and
 
568
        // client-validation only.
 
569
        Source string `json:"source,omitempty"`
 
570
 
 
571
        // TimeWindowSeconds: Time in seconds for license auto-expiration.
 
572
        TimeWindowSeconds int64 `json:"timeWindowSeconds,omitempty"`
 
573
 
 
574
        // VolumeId: Identifies the volume for which this entry applies.
 
575
        VolumeId string `json:"volumeId,omitempty"`
 
576
}
 
577
 
 
578
type Dictlayerdata struct {
 
579
        Common *DictlayerdataCommon `json:"common,omitempty"`
 
580
 
 
581
        Dict *DictlayerdataDict `json:"dict,omitempty"`
 
582
 
 
583
        Kind string `json:"kind,omitempty"`
 
584
}
 
585
 
 
586
type DictlayerdataCommon struct {
 
587
        // Title: The display title and localized canonical name to use when
 
588
        // searching for this entity on Google search.
 
589
        Title string `json:"title,omitempty"`
 
590
}
 
591
 
 
592
type DictlayerdataDict struct {
 
593
        // Source: The source, url and attribution for this dictionary data.
 
594
        Source *DictlayerdataDictSource `json:"source,omitempty"`
 
595
 
 
596
        Words []*DictlayerdataDictWords `json:"words,omitempty"`
 
597
}
 
598
 
 
599
type DictlayerdataDictSource struct {
 
600
        Attribution string `json:"attribution,omitempty"`
 
601
 
 
602
        Url string `json:"url,omitempty"`
 
603
}
 
604
 
 
605
type DictlayerdataDictWords struct {
 
606
        Derivatives []*DictlayerdataDictWordsDerivatives `json:"derivatives,omitempty"`
 
607
 
 
608
        Examples []*DictlayerdataDictWordsExamples `json:"examples,omitempty"`
 
609
 
 
610
        Senses []*DictlayerdataDictWordsSenses `json:"senses,omitempty"`
 
611
 
 
612
        // Source: The words with different meanings but not related words, e.g.
 
613
        // "go" (game) and "go" (verb).
 
614
        Source *DictlayerdataDictWordsSource `json:"source,omitempty"`
 
615
}
 
616
 
 
617
type DictlayerdataDictWordsDerivatives struct {
 
618
        Source *DictlayerdataDictWordsDerivativesSource `json:"source,omitempty"`
 
619
 
 
620
        Text string `json:"text,omitempty"`
 
621
}
 
622
 
 
623
type DictlayerdataDictWordsDerivativesSource struct {
 
624
        Attribution string `json:"attribution,omitempty"`
 
625
 
 
626
        Url string `json:"url,omitempty"`
 
627
}
 
628
 
 
629
type DictlayerdataDictWordsExamples struct {
 
630
        Source *DictlayerdataDictWordsExamplesSource `json:"source,omitempty"`
 
631
 
 
632
        Text string `json:"text,omitempty"`
 
633
}
 
634
 
 
635
type DictlayerdataDictWordsExamplesSource struct {
 
636
        Attribution string `json:"attribution,omitempty"`
 
637
 
 
638
        Url string `json:"url,omitempty"`
 
639
}
 
640
 
 
641
type DictlayerdataDictWordsSenses struct {
 
642
        Conjugations []*DictlayerdataDictWordsSensesConjugations `json:"conjugations,omitempty"`
 
643
 
 
644
        Definitions []*DictlayerdataDictWordsSensesDefinitions `json:"definitions,omitempty"`
 
645
 
 
646
        PartOfSpeech string `json:"partOfSpeech,omitempty"`
 
647
 
 
648
        Pronunciation string `json:"pronunciation,omitempty"`
 
649
 
 
650
        PronunciationUrl string `json:"pronunciationUrl,omitempty"`
 
651
 
 
652
        Source *DictlayerdataDictWordsSensesSource `json:"source,omitempty"`
 
653
 
 
654
        Syllabification string `json:"syllabification,omitempty"`
 
655
 
 
656
        Synonyms []*DictlayerdataDictWordsSensesSynonyms `json:"synonyms,omitempty"`
 
657
}
 
658
 
 
659
type DictlayerdataDictWordsSensesConjugations struct {
 
660
        Type string `json:"type,omitempty"`
 
661
 
 
662
        Value string `json:"value,omitempty"`
 
663
}
 
664
 
 
665
type DictlayerdataDictWordsSensesDefinitions struct {
 
666
        Definition string `json:"definition,omitempty"`
 
667
 
 
668
        Examples []*DictlayerdataDictWordsSensesDefinitionsExamples `json:"examples,omitempty"`
 
669
}
 
670
 
 
671
type DictlayerdataDictWordsSensesDefinitionsExamples struct {
 
672
        Source *DictlayerdataDictWordsSensesDefinitionsExamplesSource `json:"source,omitempty"`
 
673
 
 
674
        Text string `json:"text,omitempty"`
 
675
}
 
676
 
 
677
type DictlayerdataDictWordsSensesDefinitionsExamplesSource struct {
 
678
        Attribution string `json:"attribution,omitempty"`
 
679
 
 
680
        Url string `json:"url,omitempty"`
 
681
}
 
682
 
 
683
type DictlayerdataDictWordsSensesSource struct {
 
684
        Attribution string `json:"attribution,omitempty"`
 
685
 
 
686
        Url string `json:"url,omitempty"`
 
687
}
 
688
 
 
689
type DictlayerdataDictWordsSensesSynonyms struct {
 
690
        Source *DictlayerdataDictWordsSensesSynonymsSource `json:"source,omitempty"`
 
691
 
 
692
        Text string `json:"text,omitempty"`
 
693
}
 
694
 
 
695
type DictlayerdataDictWordsSensesSynonymsSource struct {
 
696
        Attribution string `json:"attribution,omitempty"`
 
697
 
 
698
        Url string `json:"url,omitempty"`
 
699
}
 
700
 
 
701
type DictlayerdataDictWordsSource struct {
 
702
        Attribution string `json:"attribution,omitempty"`
 
703
 
 
704
        Url string `json:"url,omitempty"`
 
705
}
 
706
 
 
707
type DownloadAccessRestriction struct {
 
708
        // DeviceAllowed: If restricted, whether access is granted for this
 
709
        // (user, device, volume).
 
710
        DeviceAllowed bool `json:"deviceAllowed,omitempty"`
 
711
 
 
712
        // DownloadsAcquired: If restricted, the number of content download
 
713
        // licenses already acquired (including the requesting client, if
 
714
        // licensed).
 
715
        DownloadsAcquired int64 `json:"downloadsAcquired,omitempty"`
 
716
 
 
717
        // JustAcquired: If deviceAllowed, whether access was just acquired with
 
718
        // this request.
 
719
        JustAcquired bool `json:"justAcquired,omitempty"`
 
720
 
 
721
        // Kind: Resource type.
 
722
        Kind string `json:"kind,omitempty"`
 
723
 
 
724
        // MaxDownloadDevices: If restricted, the maximum number of content
 
725
        // download licenses for this volume.
 
726
        MaxDownloadDevices int64 `json:"maxDownloadDevices,omitempty"`
 
727
 
 
728
        // Message: Error/warning message.
 
729
        Message string `json:"message,omitempty"`
 
730
 
 
731
        // Nonce: Client nonce for verification. Download access and
 
732
        // client-validation only.
 
733
        Nonce string `json:"nonce,omitempty"`
 
734
 
 
735
        // ReasonCode: Error/warning reason code. Additional codes may be added
 
736
        // in the future. 0 OK 100 ACCESS_DENIED_PUBLISHER_LIMIT 101
 
737
        // ACCESS_DENIED_LIMIT 200 WARNING_USED_LAST_ACCESS
 
738
        ReasonCode string `json:"reasonCode,omitempty"`
 
739
 
 
740
        // Restricted: Whether this volume has any download access restrictions.
 
741
        Restricted bool `json:"restricted,omitempty"`
 
742
 
 
743
        // Signature: Response signature.
 
744
        Signature string `json:"signature,omitempty"`
 
745
 
 
746
        // Source: Client app identifier for verification. Download access and
 
747
        // client-validation only.
 
748
        Source string `json:"source,omitempty"`
 
749
 
 
750
        // VolumeId: Identifies the volume for which this entry applies.
 
751
        VolumeId string `json:"volumeId,omitempty"`
 
752
}
 
753
 
 
754
type DownloadAccesses struct {
 
755
        // DownloadAccessList: A list of download access responses.
 
756
        DownloadAccessList []*DownloadAccessRestriction `json:"downloadAccessList,omitempty"`
 
757
 
 
758
        // Kind: Resource type.
 
759
        Kind string `json:"kind,omitempty"`
 
760
}
 
761
 
 
762
type Geolayerdata struct {
 
763
        Common *GeolayerdataCommon `json:"common,omitempty"`
 
764
 
 
765
        Geo *GeolayerdataGeo `json:"geo,omitempty"`
 
766
 
 
767
        Kind string `json:"kind,omitempty"`
 
768
}
 
769
 
 
770
type GeolayerdataCommon struct {
 
771
        // Lang: The language of the information url and description.
 
772
        Lang string `json:"lang,omitempty"`
 
773
 
 
774
        // PreviewImageUrl: The URL for the preview image information.
 
775
        PreviewImageUrl string `json:"previewImageUrl,omitempty"`
 
776
 
 
777
        // Snippet: The description for this location.
 
778
        Snippet string `json:"snippet,omitempty"`
 
779
 
 
780
        // SnippetUrl: The URL for information for this location. Ex: wikipedia
 
781
        // link.
 
782
        SnippetUrl string `json:"snippetUrl,omitempty"`
 
783
 
 
784
        // Title: The display title and localized canonical name to use when
 
785
        // searching for this entity on Google search.
 
786
        Title string `json:"title,omitempty"`
 
787
}
 
788
 
 
789
type GeolayerdataGeo struct {
 
790
        // Boundary: The boundary of the location as a set of loops containing
 
791
        // pairs of latitude, longitude coordinates.
 
792
        Boundary [][]*GeolayerdataGeoBoundaryItem `json:"boundary,omitempty"`
 
793
 
 
794
        // CachePolicy: The cache policy active for this data. EX: UNRESTRICTED,
 
795
        // RESTRICTED, NEVER
 
796
        CachePolicy string `json:"cachePolicy,omitempty"`
 
797
 
 
798
        // CountryCode: The country code of the location.
 
799
        CountryCode string `json:"countryCode,omitempty"`
 
800
 
 
801
        // Latitude: The latitude of the location.
 
802
        Latitude float64 `json:"latitude,omitempty"`
 
803
 
 
804
        // Longitude: The longitude of the location.
 
805
        Longitude float64 `json:"longitude,omitempty"`
 
806
 
 
807
        // MapType: The type of map that should be used for this location. EX:
 
808
        // HYBRID, ROADMAP, SATELLITE, TERRAIN
 
809
        MapType string `json:"mapType,omitempty"`
 
810
 
 
811
        // Viewport: The viewport for showing this location. This is a latitude,
 
812
        // longitude rectangle.
 
813
        Viewport *GeolayerdataGeoViewport `json:"viewport,omitempty"`
 
814
 
 
815
        // Zoom: The Zoom level to use for the map. Zoom levels between 0 (the
 
816
        // lowest zoom level, in which the entire world can be seen on one map)
 
817
        // to 21+ (down to individual buildings). See:
 
818
        // https://developers.google.com/maps/documentation/staticmaps/#Zoomlevel
 
819
        // s
 
820
        Zoom int64 `json:"zoom,omitempty"`
 
821
}
 
822
 
 
823
type GeolayerdataGeoBoundaryItem struct {
 
824
        Latitude int64 `json:"latitude,omitempty"`
 
825
 
 
826
        Longitude int64 `json:"longitude,omitempty"`
 
827
}
 
828
 
 
829
type GeolayerdataGeoViewport struct {
 
830
        Hi *GeolayerdataGeoViewportHi `json:"hi,omitempty"`
 
831
 
 
832
        Lo *GeolayerdataGeoViewportLo `json:"lo,omitempty"`
 
833
}
 
834
 
 
835
type GeolayerdataGeoViewportHi struct {
 
836
        Latitude float64 `json:"latitude,omitempty"`
 
837
 
 
838
        Longitude float64 `json:"longitude,omitempty"`
 
839
}
 
840
 
 
841
type GeolayerdataGeoViewportLo struct {
 
842
        Latitude float64 `json:"latitude,omitempty"`
 
843
 
 
844
        Longitude float64 `json:"longitude,omitempty"`
 
845
}
 
846
 
 
847
type Layersummaries struct {
 
848
        // Items: A list of layer summary items.
 
849
        Items []*Layersummary `json:"items,omitempty"`
 
850
 
 
851
        // Kind: Resource type.
 
852
        Kind string `json:"kind,omitempty"`
 
853
 
 
854
        // TotalItems: The total number of layer summaries found.
 
855
        TotalItems int64 `json:"totalItems,omitempty"`
 
856
}
 
857
 
 
858
type Layersummary struct {
 
859
        // AnnotationCount: The number of annotations for this layer.
 
860
        AnnotationCount int64 `json:"annotationCount,omitempty"`
 
861
 
 
862
        // AnnotationTypes: The list of annotation types contained for this
 
863
        // layer.
 
864
        AnnotationTypes []string `json:"annotationTypes,omitempty"`
 
865
 
 
866
        // AnnotationsDataLink: Link to get data for this annotation.
 
867
        AnnotationsDataLink string `json:"annotationsDataLink,omitempty"`
 
868
 
 
869
        // AnnotationsLink: The link to get the annotations for this layer.
 
870
        AnnotationsLink string `json:"annotationsLink,omitempty"`
 
871
 
 
872
        // ContentVersion: The content version this resource is for.
 
873
        ContentVersion string `json:"contentVersion,omitempty"`
 
874
 
 
875
        // DataCount: The number of data items for this layer.
 
876
        DataCount int64 `json:"dataCount,omitempty"`
 
877
 
 
878
        // Id: Unique id of this layer summary.
 
879
        Id string `json:"id,omitempty"`
 
880
 
 
881
        // Kind: Resource Type
 
882
        Kind string `json:"kind,omitempty"`
 
883
 
 
884
        // LayerId: The layer id for this summary.
 
885
        LayerId string `json:"layerId,omitempty"`
 
886
 
 
887
        // SelfLink: URL to this resource.
 
888
        SelfLink string `json:"selfLink,omitempty"`
 
889
 
 
890
        // Updated: Timestamp for the last time an item in this layer was
 
891
        // updated. (RFC 3339 UTC date-time format).
 
892
        Updated string `json:"updated,omitempty"`
 
893
 
 
894
        // VolumeAnnotationsVersion: The current version of this layer's volume
 
895
        // annotations. Note that this version applies only to the data in the
 
896
        // books.layers.volumeAnnotations.* responses. The actual annotation
 
897
        // data is versioned separately.
 
898
        VolumeAnnotationsVersion string `json:"volumeAnnotationsVersion,omitempty"`
 
899
 
 
900
        // VolumeId: The volume id this resource is for.
 
901
        VolumeId string `json:"volumeId,omitempty"`
 
902
}
 
903
 
 
904
type Offers struct {
 
905
        // Items: A list of offers.
 
906
        Items []*OffersItems `json:"items,omitempty"`
 
907
 
 
908
        // Kind: Resource type.
 
909
        Kind string `json:"kind,omitempty"`
 
910
}
 
911
 
 
912
type OffersItems struct {
 
913
        ArtUrl string `json:"artUrl,omitempty"`
 
914
 
 
915
        Id string `json:"id,omitempty"`
 
916
 
 
917
        Items []*OffersItemsItems `json:"items,omitempty"`
 
918
}
 
919
 
 
920
type OffersItemsItems struct {
 
921
        Author string `json:"author,omitempty"`
 
922
 
 
923
        CanonicalVolumeLink string `json:"canonicalVolumeLink,omitempty"`
 
924
 
 
925
        CoverUrl string `json:"coverUrl,omitempty"`
 
926
 
 
927
        Description string `json:"description,omitempty"`
 
928
 
 
929
        Title string `json:"title,omitempty"`
 
930
 
 
931
        VolumeId string `json:"volumeId,omitempty"`
 
932
}
 
933
 
 
934
type ReadingPosition struct {
 
935
        // EpubCfiPosition: Position in an EPUB as a CFI.
 
936
        EpubCfiPosition string `json:"epubCfiPosition,omitempty"`
 
937
 
 
938
        // GbImagePosition: Position in a volume for image-based content.
 
939
        GbImagePosition string `json:"gbImagePosition,omitempty"`
 
940
 
 
941
        // GbTextPosition: Position in a volume for text-based content.
 
942
        GbTextPosition string `json:"gbTextPosition,omitempty"`
 
943
 
 
944
        // Kind: Resource type for a reading position.
 
945
        Kind string `json:"kind,omitempty"`
 
946
 
 
947
        // PdfPosition: Position in a PDF file.
 
948
        PdfPosition string `json:"pdfPosition,omitempty"`
 
949
 
 
950
        // Updated: Timestamp when this reading position was last updated
 
951
        // (formatted UTC timestamp with millisecond resolution).
 
952
        Updated string `json:"updated,omitempty"`
 
953
 
 
954
        // VolumeId: Volume id associated with this reading position.
 
955
        VolumeId string `json:"volumeId,omitempty"`
 
956
}
 
957
 
 
958
type RequestAccess struct {
 
959
        // ConcurrentAccess: A concurrent access response.
 
960
        ConcurrentAccess *ConcurrentAccessRestriction `json:"concurrentAccess,omitempty"`
 
961
 
 
962
        // DownloadAccess: A download access response.
 
963
        DownloadAccess *DownloadAccessRestriction `json:"downloadAccess,omitempty"`
 
964
 
 
965
        // Kind: Resource type.
 
966
        Kind string `json:"kind,omitempty"`
 
967
}
 
968
 
 
969
type Review struct {
 
970
        // Author: Author of this review.
 
971
        Author *ReviewAuthor `json:"author,omitempty"`
 
972
 
 
973
        // Content: Review text.
 
974
        Content string `json:"content,omitempty"`
 
975
 
 
976
        // Date: Date of this review.
 
977
        Date string `json:"date,omitempty"`
 
978
 
 
979
        // FullTextUrl: URL for the full review text, for reviews gathered from
 
980
        // the web.
 
981
        FullTextUrl string `json:"fullTextUrl,omitempty"`
 
982
 
 
983
        // Kind: Resource type for a review.
 
984
        Kind string `json:"kind,omitempty"`
 
985
 
 
986
        // Rating: Star rating for this review. Possible values are ONE, TWO,
 
987
        // THREE, FOUR, FIVE or NOT_RATED.
 
988
        Rating string `json:"rating,omitempty"`
 
989
 
 
990
        // Source: Information regarding the source of this review, when the
 
991
        // review is not from a Google Books user.
 
992
        Source *ReviewSource `json:"source,omitempty"`
 
993
 
 
994
        // Title: Title for this review.
 
995
        Title string `json:"title,omitempty"`
 
996
 
 
997
        // Type: Source type for this review. Possible values are EDITORIAL,
 
998
        // WEB_USER or GOOGLE_USER.
 
999
        Type string `json:"type,omitempty"`
 
1000
 
 
1001
        // VolumeId: Volume that this review is for.
 
1002
        VolumeId string `json:"volumeId,omitempty"`
 
1003
}
 
1004
 
 
1005
type ReviewAuthor struct {
 
1006
        // DisplayName: Name of this person.
 
1007
        DisplayName string `json:"displayName,omitempty"`
 
1008
}
 
1009
 
 
1010
type ReviewSource struct {
 
1011
        // Description: Name of the source.
 
1012
        Description string `json:"description,omitempty"`
 
1013
 
 
1014
        // ExtraDescription: Extra text about the source of the review.
 
1015
        ExtraDescription string `json:"extraDescription,omitempty"`
 
1016
 
 
1017
        // Url: URL of the source of the review.
 
1018
        Url string `json:"url,omitempty"`
 
1019
}
 
1020
 
 
1021
type Volume struct {
 
1022
        // AccessInfo: Any information about a volume related to reading or
 
1023
        // obtaining that volume text. This information can depend on country
 
1024
        // (books may be public domain in one country but not in another, e.g.).
 
1025
        AccessInfo *VolumeAccessInfo `json:"accessInfo,omitempty"`
 
1026
 
 
1027
        // Etag: Opaque identifier for a specific version of a volume resource.
 
1028
        // (In LITE projection)
 
1029
        Etag string `json:"etag,omitempty"`
 
1030
 
 
1031
        // Id: Unique identifier for a volume. (In LITE projection.)
 
1032
        Id string `json:"id,omitempty"`
 
1033
 
 
1034
        // Kind: Resource type for a volume. (In LITE projection.)
 
1035
        Kind string `json:"kind,omitempty"`
 
1036
 
 
1037
        // LayerInfo: What layers exist in this volume and high level
 
1038
        // information about them.
 
1039
        LayerInfo *VolumeLayerInfo `json:"layerInfo,omitempty"`
 
1040
 
 
1041
        // RecommendedInfo: Recommendation related information for this volume.
 
1042
        RecommendedInfo *VolumeRecommendedInfo `json:"recommendedInfo,omitempty"`
 
1043
 
 
1044
        // SaleInfo: Any information about a volume related to the eBookstore
 
1045
        // and/or purchaseability. This information can depend on the country
 
1046
        // where the request originates from (i.e. books may not be for sale in
 
1047
        // certain countries).
 
1048
        SaleInfo *VolumeSaleInfo `json:"saleInfo,omitempty"`
 
1049
 
 
1050
        // SearchInfo: Search result information related to this volume.
 
1051
        SearchInfo *VolumeSearchInfo `json:"searchInfo,omitempty"`
 
1052
 
 
1053
        // SelfLink: URL to this resource. (In LITE projection.)
 
1054
        SelfLink string `json:"selfLink,omitempty"`
 
1055
 
 
1056
        // UserInfo: User specific information related to this volume. (e.g.
 
1057
        // page this user last read or whether they purchased this book)
 
1058
        UserInfo *VolumeUserInfo `json:"userInfo,omitempty"`
 
1059
 
 
1060
        // VolumeInfo: General volume information.
 
1061
        VolumeInfo *VolumeVolumeInfo `json:"volumeInfo,omitempty"`
 
1062
}
 
1063
 
 
1064
type VolumeAccessInfo struct {
 
1065
        // AccessViewStatus: Combines the access and viewability of this volume
 
1066
        // into a single status field for this user. Values can be
 
1067
        // FULL_PURCHASED, FULL_PUBLIC_DOMAIN, SAMPLE or NONE. (In LITE
 
1068
        // projection.)
 
1069
        AccessViewStatus string `json:"accessViewStatus,omitempty"`
 
1070
 
 
1071
        // Country: The two-letter ISO_3166-1 country code for which this access
 
1072
        // information is valid. (In LITE projection.)
 
1073
        Country string `json:"country,omitempty"`
 
1074
 
 
1075
        // DownloadAccess: Information about a volume's download license access
 
1076
        // restrictions.
 
1077
        DownloadAccess *DownloadAccessRestriction `json:"downloadAccess,omitempty"`
 
1078
 
 
1079
        // DriveImportedContentLink: URL to the Google Drive viewer if this
 
1080
        // volume is uploaded by the user by selecting the file from Google
 
1081
        // Drive.
 
1082
        DriveImportedContentLink string `json:"driveImportedContentLink,omitempty"`
 
1083
 
 
1084
        // Embeddable: Whether this volume can be embedded in a viewport using
 
1085
        // the Embedded Viewer API.
 
1086
        Embeddable bool `json:"embeddable,omitempty"`
 
1087
 
 
1088
        // Epub: Information about epub content. (In LITE projection.)
 
1089
        Epub *VolumeAccessInfoEpub `json:"epub,omitempty"`
 
1090
 
 
1091
        // ExplicitOfflineLicenseManagement: Whether this volume requires that
 
1092
        // the client explicitly request offline download license rather than
 
1093
        // have it done automatically when loading the content, if the client
 
1094
        // supports it.
 
1095
        ExplicitOfflineLicenseManagement bool `json:"explicitOfflineLicenseManagement,omitempty"`
 
1096
 
 
1097
        // Pdf: Information about pdf content. (In LITE projection.)
 
1098
        Pdf *VolumeAccessInfoPdf `json:"pdf,omitempty"`
 
1099
 
 
1100
        // PublicDomain: Whether or not this book is public domain in the
 
1101
        // country listed above.
 
1102
        PublicDomain bool `json:"publicDomain,omitempty"`
 
1103
 
 
1104
        // QuoteSharingAllowed: Whether quote sharing is allowed for this
 
1105
        // volume.
 
1106
        QuoteSharingAllowed bool `json:"quoteSharingAllowed,omitempty"`
 
1107
 
 
1108
        // TextToSpeechPermission: Whether text-to-speech is permitted for this
 
1109
        // volume. Values can be ALLOWED, ALLOWED_FOR_ACCESSIBILITY, or
 
1110
        // NOT_ALLOWED.
 
1111
        TextToSpeechPermission string `json:"textToSpeechPermission,omitempty"`
 
1112
 
 
1113
        // ViewOrderUrl: For ordered but not yet processed orders, we give a URL
 
1114
        // that can be used to go to the appropriate Google Wallet page.
 
1115
        ViewOrderUrl string `json:"viewOrderUrl,omitempty"`
 
1116
 
 
1117
        // Viewability: The read access of a volume. Possible values are
 
1118
        // PARTIAL, ALL_PAGES, NO_PAGES or UNKNOWN. This value depends on the
 
1119
        // country listed above. A value of PARTIAL means that the publisher has
 
1120
        // allowed some portion of the volume to be viewed publicly, without
 
1121
        // purchase. This can apply to eBooks as well as non-eBooks. Public
 
1122
        // domain books will always have a value of ALL_PAGES.
 
1123
        Viewability string `json:"viewability,omitempty"`
 
1124
 
 
1125
        // WebReaderLink: URL to read this volume on the Google Books site. Link
 
1126
        // will not allow users to read non-viewable volumes.
 
1127
        WebReaderLink string `json:"webReaderLink,omitempty"`
 
1128
}
 
1129
 
 
1130
type VolumeAccessInfoEpub struct {
 
1131
        // AcsTokenLink: URL to retrieve ACS token for epub download. (In LITE
 
1132
        // projection.)
 
1133
        AcsTokenLink string `json:"acsTokenLink,omitempty"`
 
1134
 
 
1135
        // DownloadLink: URL to download epub. (In LITE projection.)
 
1136
        DownloadLink string `json:"downloadLink,omitempty"`
 
1137
 
 
1138
        // IsAvailable: Is a flowing text epub available either as public domain
 
1139
        // or for purchase. (In LITE projection.)
 
1140
        IsAvailable bool `json:"isAvailable,omitempty"`
 
1141
}
 
1142
 
 
1143
type VolumeAccessInfoPdf struct {
 
1144
        // AcsTokenLink: URL to retrieve ACS token for pdf download. (In LITE
 
1145
        // projection.)
 
1146
        AcsTokenLink string `json:"acsTokenLink,omitempty"`
 
1147
 
 
1148
        // DownloadLink: URL to download pdf. (In LITE projection.)
 
1149
        DownloadLink string `json:"downloadLink,omitempty"`
 
1150
 
 
1151
        // IsAvailable: Is a scanned image pdf available either as public domain
 
1152
        // or for purchase. (In LITE projection.)
 
1153
        IsAvailable bool `json:"isAvailable,omitempty"`
 
1154
}
 
1155
 
 
1156
type VolumeLayerInfo struct {
 
1157
        // Layers: A layer should appear here if and only if the layer exists
 
1158
        // for this book.
 
1159
        Layers []*VolumeLayerInfoLayers `json:"layers,omitempty"`
 
1160
}
 
1161
 
 
1162
type VolumeLayerInfoLayers struct {
 
1163
        // LayerId: The layer id of this layer (e.g. "geo").
 
1164
        LayerId string `json:"layerId,omitempty"`
 
1165
 
 
1166
        // VolumeAnnotationsVersion: The current version of this layer's volume
 
1167
        // annotations. Note that this version applies only to the data in the
 
1168
        // books.layers.volumeAnnotations.* responses. The actual annotation
 
1169
        // data is versioned separately.
 
1170
        VolumeAnnotationsVersion string `json:"volumeAnnotationsVersion,omitempty"`
 
1171
}
 
1172
 
 
1173
type VolumeRecommendedInfo struct {
 
1174
        // Explanation: A text explaining why this volume is recommended.
 
1175
        Explanation string `json:"explanation,omitempty"`
 
1176
}
 
1177
 
 
1178
type VolumeSaleInfo struct {
 
1179
        // BuyLink: URL to purchase this volume on the Google Books site. (In
 
1180
        // LITE projection)
 
1181
        BuyLink string `json:"buyLink,omitempty"`
 
1182
 
 
1183
        // Country: The two-letter ISO_3166-1 country code for which this sale
 
1184
        // information is valid. (In LITE projection.)
 
1185
        Country string `json:"country,omitempty"`
 
1186
 
 
1187
        // IsEbook: Whether or not this volume is an eBook (can be added to the
 
1188
        // My eBooks shelf).
 
1189
        IsEbook bool `json:"isEbook,omitempty"`
 
1190
 
 
1191
        // ListPrice: Suggested retail price. (In LITE projection.)
 
1192
        ListPrice *VolumeSaleInfoListPrice `json:"listPrice,omitempty"`
 
1193
 
 
1194
        // Offers: Offers available for this volume (sales and rentals).
 
1195
        Offers []*VolumeSaleInfoOffers `json:"offers,omitempty"`
 
1196
 
 
1197
        // OnSaleDate: The date on which this book is available for sale.
 
1198
        OnSaleDate string `json:"onSaleDate,omitempty"`
 
1199
 
 
1200
        // RetailPrice: The actual selling price of the book. This is the same
 
1201
        // as the suggested retail or list price unless there are offers or
 
1202
        // discounts on this volume. (In LITE projection.)
 
1203
        RetailPrice *VolumeSaleInfoRetailPrice `json:"retailPrice,omitempty"`
 
1204
 
 
1205
        // Saleability: Whether or not this book is available for sale or
 
1206
        // offered for free in the Google eBookstore for the country listed
 
1207
        // above. Possible values are FOR_SALE, FOR_RENTAL_ONLY,
 
1208
        // FOR_SALE_AND_RENTAL, FREE, NOT_FOR_SALE, or FOR_PREORDER.
 
1209
        Saleability string `json:"saleability,omitempty"`
 
1210
}
 
1211
 
 
1212
type VolumeSaleInfoListPrice struct {
 
1213
        // Amount: Amount in the currency listed below. (In LITE projection.)
 
1214
        Amount float64 `json:"amount,omitempty"`
 
1215
 
 
1216
        // CurrencyCode: An ISO 4217, three-letter currency code. (In LITE
 
1217
        // projection.)
 
1218
        CurrencyCode string `json:"currencyCode,omitempty"`
 
1219
}
 
1220
 
 
1221
type VolumeSaleInfoOffers struct {
 
1222
        // FinskyOfferType: The finsky offer type (e.g., PURCHASE=0 RENTAL=3)
 
1223
        FinskyOfferType int64 `json:"finskyOfferType,omitempty"`
 
1224
 
 
1225
        // ListPrice: Offer list (=undiscounted) price in Micros.
 
1226
        ListPrice *VolumeSaleInfoOffersListPrice `json:"listPrice,omitempty"`
 
1227
 
 
1228
        // RentalDuration: The rental duration (for rental offers only).
 
1229
        RentalDuration *VolumeSaleInfoOffersRentalDuration `json:"rentalDuration,omitempty"`
 
1230
 
 
1231
        // RetailPrice: Offer retail (=discounted) price in Micros
 
1232
        RetailPrice *VolumeSaleInfoOffersRetailPrice `json:"retailPrice,omitempty"`
 
1233
}
 
1234
 
 
1235
type VolumeSaleInfoOffersListPrice struct {
 
1236
        AmountInMicros float64 `json:"amountInMicros,omitempty"`
 
1237
 
 
1238
        CurrencyCode string `json:"currencyCode,omitempty"`
 
1239
}
 
1240
 
 
1241
type VolumeSaleInfoOffersRentalDuration struct {
 
1242
        Count float64 `json:"count,omitempty"`
 
1243
 
 
1244
        Unit string `json:"unit,omitempty"`
 
1245
}
 
1246
 
 
1247
type VolumeSaleInfoOffersRetailPrice struct {
 
1248
        AmountInMicros float64 `json:"amountInMicros,omitempty"`
 
1249
 
 
1250
        CurrencyCode string `json:"currencyCode,omitempty"`
 
1251
}
 
1252
 
 
1253
type VolumeSaleInfoRetailPrice struct {
 
1254
        // Amount: Amount in the currency listed below. (In LITE projection.)
 
1255
        Amount float64 `json:"amount,omitempty"`
 
1256
 
 
1257
        // CurrencyCode: An ISO 4217, three-letter currency code. (In LITE
 
1258
        // projection.)
 
1259
        CurrencyCode string `json:"currencyCode,omitempty"`
 
1260
}
 
1261
 
 
1262
type VolumeSearchInfo struct {
 
1263
        // TextSnippet: A text snippet containing the search query.
 
1264
        TextSnippet string `json:"textSnippet,omitempty"`
 
1265
}
 
1266
 
 
1267
type VolumeUserInfo struct {
 
1268
        // Copy: Copy/Paste accounting information.
 
1269
        Copy *VolumeUserInfoCopy `json:"copy,omitempty"`
 
1270
 
 
1271
        // IsInMyBooks: Whether or not this volume is currently in "my books."
 
1272
        IsInMyBooks bool `json:"isInMyBooks,omitempty"`
 
1273
 
 
1274
        // IsPreordered: Whether or not this volume was pre-ordered by the
 
1275
        // authenticated user making the request. (In LITE projection.)
 
1276
        IsPreordered bool `json:"isPreordered,omitempty"`
 
1277
 
 
1278
        // IsPurchased: Whether or not this volume was purchased by the
 
1279
        // authenticated user making the request. (In LITE projection.)
 
1280
        IsPurchased bool `json:"isPurchased,omitempty"`
 
1281
 
 
1282
        // IsUploaded: Whether or not this volume was user uploaded.
 
1283
        IsUploaded bool `json:"isUploaded,omitempty"`
 
1284
 
 
1285
        // ReadingPosition: The user's current reading position in the volume,
 
1286
        // if one is available. (In LITE projection.)
 
1287
        ReadingPosition *ReadingPosition `json:"readingPosition,omitempty"`
 
1288
 
 
1289
        // RentalPeriod: Period during this book is/was a valid rental.
 
1290
        RentalPeriod *VolumeUserInfoRentalPeriod `json:"rentalPeriod,omitempty"`
 
1291
 
 
1292
        // RentalState: Whether this book is an active or an expired rental.
 
1293
        RentalState string `json:"rentalState,omitempty"`
 
1294
 
 
1295
        // Review: This user's review of this volume, if one exists.
 
1296
        Review *Review `json:"review,omitempty"`
 
1297
 
 
1298
        // Updated: Timestamp when this volume was last modified by a user
 
1299
        // action, such as a reading position update, volume purchase or writing
 
1300
        // a review. (RFC 3339 UTC date-time format).
 
1301
        Updated string `json:"updated,omitempty"`
 
1302
 
 
1303
        UserUploadedVolumeInfo *VolumeUserInfoUserUploadedVolumeInfo `json:"userUploadedVolumeInfo,omitempty"`
 
1304
}
 
1305
 
 
1306
type VolumeUserInfoCopy struct {
 
1307
        AllowedCharacterCount int64 `json:"allowedCharacterCount,omitempty"`
 
1308
 
 
1309
        LimitType string `json:"limitType,omitempty"`
 
1310
 
 
1311
        RemainingCharacterCount int64 `json:"remainingCharacterCount,omitempty"`
 
1312
 
 
1313
        Updated string `json:"updated,omitempty"`
 
1314
}
 
1315
 
 
1316
type VolumeUserInfoRentalPeriod struct {
 
1317
        EndUtcSec int64 `json:"endUtcSec,omitempty,string"`
 
1318
 
 
1319
        StartUtcSec int64 `json:"startUtcSec,omitempty,string"`
 
1320
}
 
1321
 
 
1322
type VolumeUserInfoUserUploadedVolumeInfo struct {
 
1323
        ProcessingState string `json:"processingState,omitempty"`
 
1324
}
 
1325
 
 
1326
type VolumeVolumeInfo struct {
 
1327
        // Authors: The names of the authors and/or editors for this volume. (In
 
1328
        // LITE projection)
 
1329
        Authors []string `json:"authors,omitempty"`
 
1330
 
 
1331
        // AverageRating: The mean review rating for this volume. (min = 1.0,
 
1332
        // max = 5.0)
 
1333
        AverageRating float64 `json:"averageRating,omitempty"`
 
1334
 
 
1335
        // CanonicalVolumeLink: Canonical URL for a volume. (In LITE
 
1336
        // projection.)
 
1337
        CanonicalVolumeLink string `json:"canonicalVolumeLink,omitempty"`
 
1338
 
 
1339
        // Categories: A list of subject categories, such as "Fiction",
 
1340
        // "Suspense", etc.
 
1341
        Categories []string `json:"categories,omitempty"`
 
1342
 
 
1343
        // ContentVersion: An identifier for the version of the volume content
 
1344
        // (text & images). (In LITE projection)
 
1345
        ContentVersion string `json:"contentVersion,omitempty"`
 
1346
 
 
1347
        // Description: A synopsis of the volume. The text of the description is
 
1348
        // formatted in HTML and includes simple formatting elements, such as b,
 
1349
        // i, and br tags. (In LITE projection.)
 
1350
        Description string `json:"description,omitempty"`
 
1351
 
 
1352
        // Dimensions: Physical dimensions of this volume.
 
1353
        Dimensions *VolumeVolumeInfoDimensions `json:"dimensions,omitempty"`
 
1354
 
 
1355
        // ImageLinks: A list of image links for all the sizes that are
 
1356
        // available. (In LITE projection.)
 
1357
        ImageLinks *VolumeVolumeInfoImageLinks `json:"imageLinks,omitempty"`
 
1358
 
 
1359
        // IndustryIdentifiers: Industry standard identifiers for this volume.
 
1360
        IndustryIdentifiers []*VolumeVolumeInfoIndustryIdentifiers `json:"industryIdentifiers,omitempty"`
 
1361
 
 
1362
        // InfoLink: URL to view information about this volume on the Google
 
1363
        // Books site. (In LITE projection)
 
1364
        InfoLink string `json:"infoLink,omitempty"`
 
1365
 
 
1366
        // Language: Best language for this volume (based on content). It is the
 
1367
        // two-letter ISO 639-1 code such as 'fr', 'en', etc.
 
1368
        Language string `json:"language,omitempty"`
 
1369
 
 
1370
        // MainCategory: The main category to which this volume belongs. It will
 
1371
        // be the category from the categories list returned below that has the
 
1372
        // highest weight.
 
1373
        MainCategory string `json:"mainCategory,omitempty"`
 
1374
 
 
1375
        // PageCount: Total number of pages as per publisher metadata.
 
1376
        PageCount int64 `json:"pageCount,omitempty"`
 
1377
 
 
1378
        // PreviewLink: URL to preview this volume on the Google Books site.
 
1379
        PreviewLink string `json:"previewLink,omitempty"`
 
1380
 
 
1381
        // PrintType: Type of publication of this volume. Possible values are
 
1382
        // BOOK or MAGAZINE.
 
1383
        PrintType string `json:"printType,omitempty"`
 
1384
 
 
1385
        // PrintedPageCount: Total number of printed pages in generated pdf
 
1386
        // representation.
 
1387
        PrintedPageCount int64 `json:"printedPageCount,omitempty"`
 
1388
 
 
1389
        // PublishedDate: Date of publication. (In LITE projection.)
 
1390
        PublishedDate string `json:"publishedDate,omitempty"`
 
1391
 
 
1392
        // Publisher: Publisher of this volume. (In LITE projection.)
 
1393
        Publisher string `json:"publisher,omitempty"`
 
1394
 
 
1395
        // RatingsCount: The number of review ratings for this volume.
 
1396
        RatingsCount int64 `json:"ratingsCount,omitempty"`
 
1397
 
 
1398
        // ReadingModes: The reading modes available for this volume.
 
1399
        ReadingModes interface{} `json:"readingModes,omitempty"`
 
1400
 
 
1401
        // Subtitle: Volume subtitle. (In LITE projection.)
 
1402
        Subtitle string `json:"subtitle,omitempty"`
 
1403
 
 
1404
        // Title: Volume title. (In LITE projection.)
 
1405
        Title string `json:"title,omitempty"`
 
1406
}
 
1407
 
 
1408
type VolumeVolumeInfoDimensions struct {
 
1409
        // Height: Height or length of this volume (in cm).
 
1410
        Height string `json:"height,omitempty"`
 
1411
 
 
1412
        // Thickness: Thickness of this volume (in cm).
 
1413
        Thickness string `json:"thickness,omitempty"`
 
1414
 
 
1415
        // Width: Width of this volume (in cm).
 
1416
        Width string `json:"width,omitempty"`
 
1417
}
 
1418
 
 
1419
type VolumeVolumeInfoImageLinks struct {
 
1420
        // ExtraLarge: Image link for extra large size (width of ~1280 pixels).
 
1421
        // (In LITE projection)
 
1422
        ExtraLarge string `json:"extraLarge,omitempty"`
 
1423
 
 
1424
        // Large: Image link for large size (width of ~800 pixels). (In LITE
 
1425
        // projection)
 
1426
        Large string `json:"large,omitempty"`
 
1427
 
 
1428
        // Medium: Image link for medium size (width of ~575 pixels). (In LITE
 
1429
        // projection)
 
1430
        Medium string `json:"medium,omitempty"`
 
1431
 
 
1432
        // Small: Image link for small size (width of ~300 pixels). (In LITE
 
1433
        // projection)
 
1434
        Small string `json:"small,omitempty"`
 
1435
 
 
1436
        // SmallThumbnail: Image link for small thumbnail size (width of ~80
 
1437
        // pixels). (In LITE projection)
 
1438
        SmallThumbnail string `json:"smallThumbnail,omitempty"`
 
1439
 
 
1440
        // Thumbnail: Image link for thumbnail size (width of ~128 pixels). (In
 
1441
        // LITE projection)
 
1442
        Thumbnail string `json:"thumbnail,omitempty"`
 
1443
}
 
1444
 
 
1445
type VolumeVolumeInfoIndustryIdentifiers struct {
 
1446
        // Identifier: Industry specific volume identifier.
 
1447
        Identifier string `json:"identifier,omitempty"`
 
1448
 
 
1449
        // Type: Identifier type. Possible values are ISBN_10, ISBN_13, ISSN and
 
1450
        // OTHER.
 
1451
        Type string `json:"type,omitempty"`
 
1452
}
 
1453
 
 
1454
type Volumeannotation struct {
 
1455
        // AnnotationDataId: The annotation data id for this volume annotation.
 
1456
        AnnotationDataId string `json:"annotationDataId,omitempty"`
 
1457
 
 
1458
        // AnnotationDataLink: Link to get data for this annotation.
 
1459
        AnnotationDataLink string `json:"annotationDataLink,omitempty"`
 
1460
 
 
1461
        // AnnotationType: The type of annotation this is.
 
1462
        AnnotationType string `json:"annotationType,omitempty"`
 
1463
 
 
1464
        // ContentRanges: The content ranges to identify the selected text.
 
1465
        ContentRanges *VolumeannotationContentRanges `json:"contentRanges,omitempty"`
 
1466
 
 
1467
        // Data: Data for this annotation.
 
1468
        Data string `json:"data,omitempty"`
 
1469
 
 
1470
        // Deleted: Indicates that this annotation is deleted.
 
1471
        Deleted bool `json:"deleted,omitempty"`
 
1472
 
 
1473
        // Id: Unique id of this volume annotation.
 
1474
        Id string `json:"id,omitempty"`
 
1475
 
 
1476
        // Kind: Resource Type
 
1477
        Kind string `json:"kind,omitempty"`
 
1478
 
 
1479
        // LayerId: The Layer this annotation is for.
 
1480
        LayerId string `json:"layerId,omitempty"`
 
1481
 
 
1482
        // PageIds: Pages the annotation spans.
 
1483
        PageIds []string `json:"pageIds,omitempty"`
 
1484
 
 
1485
        // SelectedText: Excerpt from the volume.
 
1486
        SelectedText string `json:"selectedText,omitempty"`
 
1487
 
 
1488
        // SelfLink: URL to this resource.
 
1489
        SelfLink string `json:"selfLink,omitempty"`
 
1490
 
 
1491
        // Updated: Timestamp for the last time this anntoation was updated.
 
1492
        // (RFC 3339 UTC date-time format).
 
1493
        Updated string `json:"updated,omitempty"`
 
1494
 
 
1495
        // VolumeId: The Volume this annotation is for.
 
1496
        VolumeId string `json:"volumeId,omitempty"`
 
1497
}
 
1498
 
 
1499
type VolumeannotationContentRanges struct {
 
1500
        // CfiRange: Range in CFI format for this annotation for version above.
 
1501
        CfiRange *BooksAnnotationsRange `json:"cfiRange,omitempty"`
 
1502
 
 
1503
        // ContentVersion: Content version applicable to ranges below.
 
1504
        ContentVersion string `json:"contentVersion,omitempty"`
 
1505
 
 
1506
        // GbImageRange: Range in GB image format for this annotation for
 
1507
        // version above.
 
1508
        GbImageRange *BooksAnnotationsRange `json:"gbImageRange,omitempty"`
 
1509
 
 
1510
        // GbTextRange: Range in GB text format for this annotation for version
 
1511
        // above.
 
1512
        GbTextRange *BooksAnnotationsRange `json:"gbTextRange,omitempty"`
 
1513
}
 
1514
 
 
1515
type Volumeannotations struct {
 
1516
        // Items: A list of volume annotations.
 
1517
        Items []*Volumeannotation `json:"items,omitempty"`
 
1518
 
 
1519
        // Kind: Resource type
 
1520
        Kind string `json:"kind,omitempty"`
 
1521
 
 
1522
        // NextPageToken: Token to pass in for pagination for the next page.
 
1523
        // This will not be present if this request does not have more results.
 
1524
        NextPageToken string `json:"nextPageToken,omitempty"`
 
1525
 
 
1526
        // TotalItems: The total number of volume annotations found.
 
1527
        TotalItems int64 `json:"totalItems,omitempty"`
 
1528
 
 
1529
        // Version: The version string for all of the volume annotations in this
 
1530
        // layer (not just the ones in this response). Note: the version string
 
1531
        // doesn't apply to the annotation data, just the information in this
 
1532
        // response (e.g. the location of annotations in the book).
 
1533
        Version string `json:"version,omitempty"`
 
1534
}
 
1535
 
 
1536
type Volumes struct {
 
1537
        // Items: A list of volumes.
 
1538
        Items []*Volume `json:"items,omitempty"`
 
1539
 
 
1540
        // Kind: Resource type.
 
1541
        Kind string `json:"kind,omitempty"`
 
1542
 
 
1543
        // TotalItems: Total number of volumes found. This might be greater than
 
1544
        // the number of volumes returned in this response if results have been
 
1545
        // paginated.
 
1546
        TotalItems int64 `json:"totalItems,omitempty"`
 
1547
}
 
1548
 
 
1549
// method id "books.bookshelves.get":
 
1550
 
 
1551
type BookshelvesGetCall struct {
 
1552
        s      *Service
 
1553
        userId string
 
1554
        shelf  string
 
1555
        opt_   map[string]interface{}
 
1556
}
 
1557
 
 
1558
// Get: Retrieves metadata for a specific bookshelf for the specified
 
1559
// user.
 
1560
func (r *BookshelvesService) Get(userId string, shelf string) *BookshelvesGetCall {
 
1561
        c := &BookshelvesGetCall{s: r.s, opt_: make(map[string]interface{})}
 
1562
        c.userId = userId
 
1563
        c.shelf = shelf
 
1564
        return c
 
1565
}
 
1566
 
 
1567
// Source sets the optional parameter "source": String to identify the
 
1568
// originator of this request.
 
1569
func (c *BookshelvesGetCall) Source(source string) *BookshelvesGetCall {
 
1570
        c.opt_["source"] = source
 
1571
        return c
 
1572
}
 
1573
 
 
1574
// Fields allows partial responses to be retrieved.
 
1575
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1576
// for more information.
 
1577
func (c *BookshelvesGetCall) Fields(s ...googleapi.Field) *BookshelvesGetCall {
 
1578
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1579
        return c
 
1580
}
 
1581
 
 
1582
func (c *BookshelvesGetCall) Do() (*Bookshelf, error) {
 
1583
        var body io.Reader = nil
 
1584
        params := make(url.Values)
 
1585
        params.Set("alt", "json")
 
1586
        if v, ok := c.opt_["source"]; ok {
 
1587
                params.Set("source", fmt.Sprintf("%v", v))
 
1588
        }
 
1589
        if v, ok := c.opt_["fields"]; ok {
 
1590
                params.Set("fields", fmt.Sprintf("%v", v))
 
1591
        }
 
1592
        urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}/bookshelves/{shelf}")
 
1593
        urls += "?" + params.Encode()
 
1594
        req, _ := http.NewRequest("GET", urls, body)
 
1595
        googleapi.Expand(req.URL, map[string]string{
 
1596
                "userId": c.userId,
 
1597
                "shelf":  c.shelf,
 
1598
        })
 
1599
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1600
        res, err := c.s.client.Do(req)
 
1601
        if err != nil {
 
1602
                return nil, err
 
1603
        }
 
1604
        defer googleapi.CloseBody(res)
 
1605
        if err := googleapi.CheckResponse(res); err != nil {
 
1606
                return nil, err
 
1607
        }
 
1608
        var ret *Bookshelf
 
1609
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1610
                return nil, err
 
1611
        }
 
1612
        return ret, nil
 
1613
        // {
 
1614
        //   "description": "Retrieves metadata for a specific bookshelf for the specified user.",
 
1615
        //   "httpMethod": "GET",
 
1616
        //   "id": "books.bookshelves.get",
 
1617
        //   "parameterOrder": [
 
1618
        //     "userId",
 
1619
        //     "shelf"
 
1620
        //   ],
 
1621
        //   "parameters": {
 
1622
        //     "shelf": {
 
1623
        //       "description": "ID of bookshelf to retrieve.",
 
1624
        //       "location": "path",
 
1625
        //       "required": true,
 
1626
        //       "type": "string"
 
1627
        //     },
 
1628
        //     "source": {
 
1629
        //       "description": "String to identify the originator of this request.",
 
1630
        //       "location": "query",
 
1631
        //       "type": "string"
 
1632
        //     },
 
1633
        //     "userId": {
 
1634
        //       "description": "ID of user for whom to retrieve bookshelves.",
 
1635
        //       "location": "path",
 
1636
        //       "required": true,
 
1637
        //       "type": "string"
 
1638
        //     }
 
1639
        //   },
 
1640
        //   "path": "users/{userId}/bookshelves/{shelf}",
 
1641
        //   "response": {
 
1642
        //     "$ref": "Bookshelf"
 
1643
        //   },
 
1644
        //   "scopes": [
 
1645
        //     "https://www.googleapis.com/auth/books"
 
1646
        //   ]
 
1647
        // }
 
1648
 
 
1649
}
 
1650
 
 
1651
// method id "books.bookshelves.list":
 
1652
 
 
1653
type BookshelvesListCall struct {
 
1654
        s      *Service
 
1655
        userId string
 
1656
        opt_   map[string]interface{}
 
1657
}
 
1658
 
 
1659
// List: Retrieves a list of public bookshelves for the specified user.
 
1660
func (r *BookshelvesService) List(userId string) *BookshelvesListCall {
 
1661
        c := &BookshelvesListCall{s: r.s, opt_: make(map[string]interface{})}
 
1662
        c.userId = userId
 
1663
        return c
 
1664
}
 
1665
 
 
1666
// Source sets the optional parameter "source": String to identify the
 
1667
// originator of this request.
 
1668
func (c *BookshelvesListCall) Source(source string) *BookshelvesListCall {
 
1669
        c.opt_["source"] = source
 
1670
        return c
 
1671
}
 
1672
 
 
1673
// Fields allows partial responses to be retrieved.
 
1674
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1675
// for more information.
 
1676
func (c *BookshelvesListCall) Fields(s ...googleapi.Field) *BookshelvesListCall {
 
1677
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1678
        return c
 
1679
}
 
1680
 
 
1681
func (c *BookshelvesListCall) Do() (*Bookshelves, error) {
 
1682
        var body io.Reader = nil
 
1683
        params := make(url.Values)
 
1684
        params.Set("alt", "json")
 
1685
        if v, ok := c.opt_["source"]; ok {
 
1686
                params.Set("source", fmt.Sprintf("%v", v))
 
1687
        }
 
1688
        if v, ok := c.opt_["fields"]; ok {
 
1689
                params.Set("fields", fmt.Sprintf("%v", v))
 
1690
        }
 
1691
        urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}/bookshelves")
 
1692
        urls += "?" + params.Encode()
 
1693
        req, _ := http.NewRequest("GET", urls, body)
 
1694
        googleapi.Expand(req.URL, map[string]string{
 
1695
                "userId": c.userId,
 
1696
        })
 
1697
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1698
        res, err := c.s.client.Do(req)
 
1699
        if err != nil {
 
1700
                return nil, err
 
1701
        }
 
1702
        defer googleapi.CloseBody(res)
 
1703
        if err := googleapi.CheckResponse(res); err != nil {
 
1704
                return nil, err
 
1705
        }
 
1706
        var ret *Bookshelves
 
1707
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1708
                return nil, err
 
1709
        }
 
1710
        return ret, nil
 
1711
        // {
 
1712
        //   "description": "Retrieves a list of public bookshelves for the specified user.",
 
1713
        //   "httpMethod": "GET",
 
1714
        //   "id": "books.bookshelves.list",
 
1715
        //   "parameterOrder": [
 
1716
        //     "userId"
 
1717
        //   ],
 
1718
        //   "parameters": {
 
1719
        //     "source": {
 
1720
        //       "description": "String to identify the originator of this request.",
 
1721
        //       "location": "query",
 
1722
        //       "type": "string"
 
1723
        //     },
 
1724
        //     "userId": {
 
1725
        //       "description": "ID of user for whom to retrieve bookshelves.",
 
1726
        //       "location": "path",
 
1727
        //       "required": true,
 
1728
        //       "type": "string"
 
1729
        //     }
 
1730
        //   },
 
1731
        //   "path": "users/{userId}/bookshelves",
 
1732
        //   "response": {
 
1733
        //     "$ref": "Bookshelves"
 
1734
        //   },
 
1735
        //   "scopes": [
 
1736
        //     "https://www.googleapis.com/auth/books"
 
1737
        //   ]
 
1738
        // }
 
1739
 
 
1740
}
 
1741
 
 
1742
// method id "books.bookshelves.volumes.list":
 
1743
 
 
1744
type BookshelvesVolumesListCall struct {
 
1745
        s      *Service
 
1746
        userId string
 
1747
        shelf  string
 
1748
        opt_   map[string]interface{}
 
1749
}
 
1750
 
 
1751
// List: Retrieves volumes in a specific bookshelf for the specified
 
1752
// user.
 
1753
func (r *BookshelvesVolumesService) List(userId string, shelf string) *BookshelvesVolumesListCall {
 
1754
        c := &BookshelvesVolumesListCall{s: r.s, opt_: make(map[string]interface{})}
 
1755
        c.userId = userId
 
1756
        c.shelf = shelf
 
1757
        return c
 
1758
}
 
1759
 
 
1760
// MaxResults sets the optional parameter "maxResults": Maximum number
 
1761
// of results to return
 
1762
func (c *BookshelvesVolumesListCall) MaxResults(maxResults int64) *BookshelvesVolumesListCall {
 
1763
        c.opt_["maxResults"] = maxResults
 
1764
        return c
 
1765
}
 
1766
 
 
1767
// ShowPreorders sets the optional parameter "showPreorders": Set to
 
1768
// true to show pre-ordered books. Defaults to false.
 
1769
func (c *BookshelvesVolumesListCall) ShowPreorders(showPreorders bool) *BookshelvesVolumesListCall {
 
1770
        c.opt_["showPreorders"] = showPreorders
 
1771
        return c
 
1772
}
 
1773
 
 
1774
// Source sets the optional parameter "source": String to identify the
 
1775
// originator of this request.
 
1776
func (c *BookshelvesVolumesListCall) Source(source string) *BookshelvesVolumesListCall {
 
1777
        c.opt_["source"] = source
 
1778
        return c
 
1779
}
 
1780
 
 
1781
// StartIndex sets the optional parameter "startIndex": Index of the
 
1782
// first element to return (starts at 0)
 
1783
func (c *BookshelvesVolumesListCall) StartIndex(startIndex int64) *BookshelvesVolumesListCall {
 
1784
        c.opt_["startIndex"] = startIndex
 
1785
        return c
 
1786
}
 
1787
 
 
1788
// Fields allows partial responses to be retrieved.
 
1789
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1790
// for more information.
 
1791
func (c *BookshelvesVolumesListCall) Fields(s ...googleapi.Field) *BookshelvesVolumesListCall {
 
1792
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1793
        return c
 
1794
}
 
1795
 
 
1796
func (c *BookshelvesVolumesListCall) Do() (*Volumes, error) {
 
1797
        var body io.Reader = nil
 
1798
        params := make(url.Values)
 
1799
        params.Set("alt", "json")
 
1800
        if v, ok := c.opt_["maxResults"]; ok {
 
1801
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
1802
        }
 
1803
        if v, ok := c.opt_["showPreorders"]; ok {
 
1804
                params.Set("showPreorders", fmt.Sprintf("%v", v))
 
1805
        }
 
1806
        if v, ok := c.opt_["source"]; ok {
 
1807
                params.Set("source", fmt.Sprintf("%v", v))
 
1808
        }
 
1809
        if v, ok := c.opt_["startIndex"]; ok {
 
1810
                params.Set("startIndex", fmt.Sprintf("%v", v))
 
1811
        }
 
1812
        if v, ok := c.opt_["fields"]; ok {
 
1813
                params.Set("fields", fmt.Sprintf("%v", v))
 
1814
        }
 
1815
        urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}/bookshelves/{shelf}/volumes")
 
1816
        urls += "?" + params.Encode()
 
1817
        req, _ := http.NewRequest("GET", urls, body)
 
1818
        googleapi.Expand(req.URL, map[string]string{
 
1819
                "userId": c.userId,
 
1820
                "shelf":  c.shelf,
 
1821
        })
 
1822
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1823
        res, err := c.s.client.Do(req)
 
1824
        if err != nil {
 
1825
                return nil, err
 
1826
        }
 
1827
        defer googleapi.CloseBody(res)
 
1828
        if err := googleapi.CheckResponse(res); err != nil {
 
1829
                return nil, err
 
1830
        }
 
1831
        var ret *Volumes
 
1832
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1833
                return nil, err
 
1834
        }
 
1835
        return ret, nil
 
1836
        // {
 
1837
        //   "description": "Retrieves volumes in a specific bookshelf for the specified user.",
 
1838
        //   "httpMethod": "GET",
 
1839
        //   "id": "books.bookshelves.volumes.list",
 
1840
        //   "parameterOrder": [
 
1841
        //     "userId",
 
1842
        //     "shelf"
 
1843
        //   ],
 
1844
        //   "parameters": {
 
1845
        //     "maxResults": {
 
1846
        //       "description": "Maximum number of results to return",
 
1847
        //       "format": "uint32",
 
1848
        //       "location": "query",
 
1849
        //       "minimum": "0",
 
1850
        //       "type": "integer"
 
1851
        //     },
 
1852
        //     "shelf": {
 
1853
        //       "description": "ID of bookshelf to retrieve volumes.",
 
1854
        //       "location": "path",
 
1855
        //       "required": true,
 
1856
        //       "type": "string"
 
1857
        //     },
 
1858
        //     "showPreorders": {
 
1859
        //       "description": "Set to true to show pre-ordered books. Defaults to false.",
 
1860
        //       "location": "query",
 
1861
        //       "type": "boolean"
 
1862
        //     },
 
1863
        //     "source": {
 
1864
        //       "description": "String to identify the originator of this request.",
 
1865
        //       "location": "query",
 
1866
        //       "type": "string"
 
1867
        //     },
 
1868
        //     "startIndex": {
 
1869
        //       "description": "Index of the first element to return (starts at 0)",
 
1870
        //       "format": "uint32",
 
1871
        //       "location": "query",
 
1872
        //       "minimum": "0",
 
1873
        //       "type": "integer"
 
1874
        //     },
 
1875
        //     "userId": {
 
1876
        //       "description": "ID of user for whom to retrieve bookshelf volumes.",
 
1877
        //       "location": "path",
 
1878
        //       "required": true,
 
1879
        //       "type": "string"
 
1880
        //     }
 
1881
        //   },
 
1882
        //   "path": "users/{userId}/bookshelves/{shelf}/volumes",
 
1883
        //   "response": {
 
1884
        //     "$ref": "Volumes"
 
1885
        //   },
 
1886
        //   "scopes": [
 
1887
        //     "https://www.googleapis.com/auth/books"
 
1888
        //   ]
 
1889
        // }
 
1890
 
 
1891
}
 
1892
 
 
1893
// method id "books.cloudloading.addBook":
 
1894
 
 
1895
type CloudloadingAddBookCall struct {
 
1896
        s    *Service
 
1897
        opt_ map[string]interface{}
 
1898
}
 
1899
 
 
1900
// AddBook:
 
1901
func (r *CloudloadingService) AddBook() *CloudloadingAddBookCall {
 
1902
        c := &CloudloadingAddBookCall{s: r.s, opt_: make(map[string]interface{})}
 
1903
        return c
 
1904
}
 
1905
 
 
1906
// Drive_document_id sets the optional parameter "drive_document_id": A
 
1907
// drive document id. The upload_client_token must not be set.
 
1908
func (c *CloudloadingAddBookCall) Drive_document_id(drive_document_id string) *CloudloadingAddBookCall {
 
1909
        c.opt_["drive_document_id"] = drive_document_id
 
1910
        return c
 
1911
}
 
1912
 
 
1913
// Mime_type sets the optional parameter "mime_type": The document MIME
 
1914
// type. It can be set only if the drive_document_id is set.
 
1915
func (c *CloudloadingAddBookCall) Mime_type(mime_type string) *CloudloadingAddBookCall {
 
1916
        c.opt_["mime_type"] = mime_type
 
1917
        return c
 
1918
}
 
1919
 
 
1920
// Name sets the optional parameter "name": The document name. It can be
 
1921
// set only if the drive_document_id is set.
 
1922
func (c *CloudloadingAddBookCall) Name(name string) *CloudloadingAddBookCall {
 
1923
        c.opt_["name"] = name
 
1924
        return c
 
1925
}
 
1926
 
 
1927
// Upload_client_token sets the optional parameter
 
1928
// "upload_client_token":
 
1929
func (c *CloudloadingAddBookCall) Upload_client_token(upload_client_token string) *CloudloadingAddBookCall {
 
1930
        c.opt_["upload_client_token"] = upload_client_token
 
1931
        return c
 
1932
}
 
1933
 
 
1934
// Fields allows partial responses to be retrieved.
 
1935
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1936
// for more information.
 
1937
func (c *CloudloadingAddBookCall) Fields(s ...googleapi.Field) *CloudloadingAddBookCall {
 
1938
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1939
        return c
 
1940
}
 
1941
 
 
1942
func (c *CloudloadingAddBookCall) Do() (*BooksCloudloadingResource, error) {
 
1943
        var body io.Reader = nil
 
1944
        params := make(url.Values)
 
1945
        params.Set("alt", "json")
 
1946
        if v, ok := c.opt_["drive_document_id"]; ok {
 
1947
                params.Set("drive_document_id", fmt.Sprintf("%v", v))
 
1948
        }
 
1949
        if v, ok := c.opt_["mime_type"]; ok {
 
1950
                params.Set("mime_type", fmt.Sprintf("%v", v))
 
1951
        }
 
1952
        if v, ok := c.opt_["name"]; ok {
 
1953
                params.Set("name", fmt.Sprintf("%v", v))
 
1954
        }
 
1955
        if v, ok := c.opt_["upload_client_token"]; ok {
 
1956
                params.Set("upload_client_token", fmt.Sprintf("%v", v))
 
1957
        }
 
1958
        if v, ok := c.opt_["fields"]; ok {
 
1959
                params.Set("fields", fmt.Sprintf("%v", v))
 
1960
        }
 
1961
        urls := googleapi.ResolveRelative(c.s.BasePath, "cloudloading/addBook")
 
1962
        urls += "?" + params.Encode()
 
1963
        req, _ := http.NewRequest("POST", urls, body)
 
1964
        googleapi.SetOpaque(req.URL)
 
1965
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1966
        res, err := c.s.client.Do(req)
 
1967
        if err != nil {
 
1968
                return nil, err
 
1969
        }
 
1970
        defer googleapi.CloseBody(res)
 
1971
        if err := googleapi.CheckResponse(res); err != nil {
 
1972
                return nil, err
 
1973
        }
 
1974
        var ret *BooksCloudloadingResource
 
1975
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1976
                return nil, err
 
1977
        }
 
1978
        return ret, nil
 
1979
        // {
 
1980
        //   "description": "",
 
1981
        //   "httpMethod": "POST",
 
1982
        //   "id": "books.cloudloading.addBook",
 
1983
        //   "parameters": {
 
1984
        //     "drive_document_id": {
 
1985
        //       "description": "A drive document id. The upload_client_token must not be set.",
 
1986
        //       "location": "query",
 
1987
        //       "type": "string"
 
1988
        //     },
 
1989
        //     "mime_type": {
 
1990
        //       "description": "The document MIME type. It can be set only if the drive_document_id is set.",
 
1991
        //       "location": "query",
 
1992
        //       "type": "string"
 
1993
        //     },
 
1994
        //     "name": {
 
1995
        //       "description": "The document name. It can be set only if the drive_document_id is set.",
 
1996
        //       "location": "query",
 
1997
        //       "type": "string"
 
1998
        //     },
 
1999
        //     "upload_client_token": {
 
2000
        //       "location": "query",
 
2001
        //       "type": "string"
 
2002
        //     }
 
2003
        //   },
 
2004
        //   "path": "cloudloading/addBook",
 
2005
        //   "response": {
 
2006
        //     "$ref": "BooksCloudloadingResource"
 
2007
        //   },
 
2008
        //   "scopes": [
 
2009
        //     "https://www.googleapis.com/auth/books"
 
2010
        //   ]
 
2011
        // }
 
2012
 
 
2013
}
 
2014
 
 
2015
// method id "books.cloudloading.deleteBook":
 
2016
 
 
2017
type CloudloadingDeleteBookCall struct {
 
2018
        s        *Service
 
2019
        volumeId string
 
2020
        opt_     map[string]interface{}
 
2021
}
 
2022
 
 
2023
// DeleteBook: Remove the book and its contents
 
2024
func (r *CloudloadingService) DeleteBook(volumeId string) *CloudloadingDeleteBookCall {
 
2025
        c := &CloudloadingDeleteBookCall{s: r.s, opt_: make(map[string]interface{})}
 
2026
        c.volumeId = volumeId
 
2027
        return c
 
2028
}
 
2029
 
 
2030
// Fields allows partial responses to be retrieved.
 
2031
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2032
// for more information.
 
2033
func (c *CloudloadingDeleteBookCall) Fields(s ...googleapi.Field) *CloudloadingDeleteBookCall {
 
2034
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2035
        return c
 
2036
}
 
2037
 
 
2038
func (c *CloudloadingDeleteBookCall) Do() error {
 
2039
        var body io.Reader = nil
 
2040
        params := make(url.Values)
 
2041
        params.Set("alt", "json")
 
2042
        params.Set("volumeId", fmt.Sprintf("%v", c.volumeId))
 
2043
        if v, ok := c.opt_["fields"]; ok {
 
2044
                params.Set("fields", fmt.Sprintf("%v", v))
 
2045
        }
 
2046
        urls := googleapi.ResolveRelative(c.s.BasePath, "cloudloading/deleteBook")
 
2047
        urls += "?" + params.Encode()
 
2048
        req, _ := http.NewRequest("POST", urls, body)
 
2049
        googleapi.SetOpaque(req.URL)
 
2050
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2051
        res, err := c.s.client.Do(req)
 
2052
        if err != nil {
 
2053
                return err
 
2054
        }
 
2055
        defer googleapi.CloseBody(res)
 
2056
        if err := googleapi.CheckResponse(res); err != nil {
 
2057
                return err
 
2058
        }
 
2059
        return nil
 
2060
        // {
 
2061
        //   "description": "Remove the book and its contents",
 
2062
        //   "httpMethod": "POST",
 
2063
        //   "id": "books.cloudloading.deleteBook",
 
2064
        //   "parameterOrder": [
 
2065
        //     "volumeId"
 
2066
        //   ],
 
2067
        //   "parameters": {
 
2068
        //     "volumeId": {
 
2069
        //       "description": "The id of the book to be removed.",
 
2070
        //       "location": "query",
 
2071
        //       "required": true,
 
2072
        //       "type": "string"
 
2073
        //     }
 
2074
        //   },
 
2075
        //   "path": "cloudloading/deleteBook",
 
2076
        //   "scopes": [
 
2077
        //     "https://www.googleapis.com/auth/books"
 
2078
        //   ]
 
2079
        // }
 
2080
 
 
2081
}
 
2082
 
 
2083
// method id "books.cloudloading.updateBook":
 
2084
 
 
2085
type CloudloadingUpdateBookCall struct {
 
2086
        s                         *Service
 
2087
        bookscloudloadingresource *BooksCloudloadingResource
 
2088
        opt_                      map[string]interface{}
 
2089
}
 
2090
 
 
2091
// UpdateBook:
 
2092
func (r *CloudloadingService) UpdateBook(bookscloudloadingresource *BooksCloudloadingResource) *CloudloadingUpdateBookCall {
 
2093
        c := &CloudloadingUpdateBookCall{s: r.s, opt_: make(map[string]interface{})}
 
2094
        c.bookscloudloadingresource = bookscloudloadingresource
 
2095
        return c
 
2096
}
 
2097
 
 
2098
// Fields allows partial responses to be retrieved.
 
2099
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2100
// for more information.
 
2101
func (c *CloudloadingUpdateBookCall) Fields(s ...googleapi.Field) *CloudloadingUpdateBookCall {
 
2102
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2103
        return c
 
2104
}
 
2105
 
 
2106
func (c *CloudloadingUpdateBookCall) Do() (*BooksCloudloadingResource, error) {
 
2107
        var body io.Reader = nil
 
2108
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.bookscloudloadingresource)
 
2109
        if err != nil {
 
2110
                return nil, err
 
2111
        }
 
2112
        ctype := "application/json"
 
2113
        params := make(url.Values)
 
2114
        params.Set("alt", "json")
 
2115
        if v, ok := c.opt_["fields"]; ok {
 
2116
                params.Set("fields", fmt.Sprintf("%v", v))
 
2117
        }
 
2118
        urls := googleapi.ResolveRelative(c.s.BasePath, "cloudloading/updateBook")
 
2119
        urls += "?" + params.Encode()
 
2120
        req, _ := http.NewRequest("POST", urls, body)
 
2121
        googleapi.SetOpaque(req.URL)
 
2122
        req.Header.Set("Content-Type", ctype)
 
2123
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2124
        res, err := c.s.client.Do(req)
 
2125
        if err != nil {
 
2126
                return nil, err
 
2127
        }
 
2128
        defer googleapi.CloseBody(res)
 
2129
        if err := googleapi.CheckResponse(res); err != nil {
 
2130
                return nil, err
 
2131
        }
 
2132
        var ret *BooksCloudloadingResource
 
2133
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2134
                return nil, err
 
2135
        }
 
2136
        return ret, nil
 
2137
        // {
 
2138
        //   "description": "",
 
2139
        //   "httpMethod": "POST",
 
2140
        //   "id": "books.cloudloading.updateBook",
 
2141
        //   "path": "cloudloading/updateBook",
 
2142
        //   "request": {
 
2143
        //     "$ref": "BooksCloudloadingResource"
 
2144
        //   },
 
2145
        //   "response": {
 
2146
        //     "$ref": "BooksCloudloadingResource"
 
2147
        //   },
 
2148
        //   "scopes": [
 
2149
        //     "https://www.googleapis.com/auth/books"
 
2150
        //   ]
 
2151
        // }
 
2152
 
 
2153
}
 
2154
 
 
2155
// method id "books.layers.get":
 
2156
 
 
2157
type LayersGetCall struct {
 
2158
        s         *Service
 
2159
        volumeId  string
 
2160
        summaryId string
 
2161
        opt_      map[string]interface{}
 
2162
}
 
2163
 
 
2164
// Get: Gets the layer summary for a volume.
 
2165
func (r *LayersService) Get(volumeId string, summaryId string) *LayersGetCall {
 
2166
        c := &LayersGetCall{s: r.s, opt_: make(map[string]interface{})}
 
2167
        c.volumeId = volumeId
 
2168
        c.summaryId = summaryId
 
2169
        return c
 
2170
}
 
2171
 
 
2172
// ContentVersion sets the optional parameter "contentVersion": The
 
2173
// content version for the requested volume.
 
2174
func (c *LayersGetCall) ContentVersion(contentVersion string) *LayersGetCall {
 
2175
        c.opt_["contentVersion"] = contentVersion
 
2176
        return c
 
2177
}
 
2178
 
 
2179
// Source sets the optional parameter "source": String to identify the
 
2180
// originator of this request.
 
2181
func (c *LayersGetCall) Source(source string) *LayersGetCall {
 
2182
        c.opt_["source"] = source
 
2183
        return c
 
2184
}
 
2185
 
 
2186
// Fields allows partial responses to be retrieved.
 
2187
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2188
// for more information.
 
2189
func (c *LayersGetCall) Fields(s ...googleapi.Field) *LayersGetCall {
 
2190
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2191
        return c
 
2192
}
 
2193
 
 
2194
func (c *LayersGetCall) Do() (*Layersummary, error) {
 
2195
        var body io.Reader = nil
 
2196
        params := make(url.Values)
 
2197
        params.Set("alt", "json")
 
2198
        if v, ok := c.opt_["contentVersion"]; ok {
 
2199
                params.Set("contentVersion", fmt.Sprintf("%v", v))
 
2200
        }
 
2201
        if v, ok := c.opt_["source"]; ok {
 
2202
                params.Set("source", fmt.Sprintf("%v", v))
 
2203
        }
 
2204
        if v, ok := c.opt_["fields"]; ok {
 
2205
                params.Set("fields", fmt.Sprintf("%v", v))
 
2206
        }
 
2207
        urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layersummary/{summaryId}")
 
2208
        urls += "?" + params.Encode()
 
2209
        req, _ := http.NewRequest("GET", urls, body)
 
2210
        googleapi.Expand(req.URL, map[string]string{
 
2211
                "volumeId":  c.volumeId,
 
2212
                "summaryId": c.summaryId,
 
2213
        })
 
2214
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2215
        res, err := c.s.client.Do(req)
 
2216
        if err != nil {
 
2217
                return nil, err
 
2218
        }
 
2219
        defer googleapi.CloseBody(res)
 
2220
        if err := googleapi.CheckResponse(res); err != nil {
 
2221
                return nil, err
 
2222
        }
 
2223
        var ret *Layersummary
 
2224
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2225
                return nil, err
 
2226
        }
 
2227
        return ret, nil
 
2228
        // {
 
2229
        //   "description": "Gets the layer summary for a volume.",
 
2230
        //   "httpMethod": "GET",
 
2231
        //   "id": "books.layers.get",
 
2232
        //   "parameterOrder": [
 
2233
        //     "volumeId",
 
2234
        //     "summaryId"
 
2235
        //   ],
 
2236
        //   "parameters": {
 
2237
        //     "contentVersion": {
 
2238
        //       "description": "The content version for the requested volume.",
 
2239
        //       "location": "query",
 
2240
        //       "type": "string"
 
2241
        //     },
 
2242
        //     "source": {
 
2243
        //       "description": "String to identify the originator of this request.",
 
2244
        //       "location": "query",
 
2245
        //       "type": "string"
 
2246
        //     },
 
2247
        //     "summaryId": {
 
2248
        //       "description": "The ID for the layer to get the summary for.",
 
2249
        //       "location": "path",
 
2250
        //       "required": true,
 
2251
        //       "type": "string"
 
2252
        //     },
 
2253
        //     "volumeId": {
 
2254
        //       "description": "The volume to retrieve layers for.",
 
2255
        //       "location": "path",
 
2256
        //       "required": true,
 
2257
        //       "type": "string"
 
2258
        //     }
 
2259
        //   },
 
2260
        //   "path": "volumes/{volumeId}/layersummary/{summaryId}",
 
2261
        //   "response": {
 
2262
        //     "$ref": "Layersummary"
 
2263
        //   },
 
2264
        //   "scopes": [
 
2265
        //     "https://www.googleapis.com/auth/books"
 
2266
        //   ]
 
2267
        // }
 
2268
 
 
2269
}
 
2270
 
 
2271
// method id "books.layers.list":
 
2272
 
 
2273
type LayersListCall struct {
 
2274
        s        *Service
 
2275
        volumeId string
 
2276
        opt_     map[string]interface{}
 
2277
}
 
2278
 
 
2279
// List: List the layer summaries for a volume.
 
2280
func (r *LayersService) List(volumeId string) *LayersListCall {
 
2281
        c := &LayersListCall{s: r.s, opt_: make(map[string]interface{})}
 
2282
        c.volumeId = volumeId
 
2283
        return c
 
2284
}
 
2285
 
 
2286
// ContentVersion sets the optional parameter "contentVersion": The
 
2287
// content version for the requested volume.
 
2288
func (c *LayersListCall) ContentVersion(contentVersion string) *LayersListCall {
 
2289
        c.opt_["contentVersion"] = contentVersion
 
2290
        return c
 
2291
}
 
2292
 
 
2293
// MaxResults sets the optional parameter "maxResults": Maximum number
 
2294
// of results to return
 
2295
func (c *LayersListCall) MaxResults(maxResults int64) *LayersListCall {
 
2296
        c.opt_["maxResults"] = maxResults
 
2297
        return c
 
2298
}
 
2299
 
 
2300
// PageToken sets the optional parameter "pageToken": The value of the
 
2301
// nextToken from the previous page.
 
2302
func (c *LayersListCall) PageToken(pageToken string) *LayersListCall {
 
2303
        c.opt_["pageToken"] = pageToken
 
2304
        return c
 
2305
}
 
2306
 
 
2307
// Source sets the optional parameter "source": String to identify the
 
2308
// originator of this request.
 
2309
func (c *LayersListCall) Source(source string) *LayersListCall {
 
2310
        c.opt_["source"] = source
 
2311
        return c
 
2312
}
 
2313
 
 
2314
// Fields allows partial responses to be retrieved.
 
2315
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2316
// for more information.
 
2317
func (c *LayersListCall) Fields(s ...googleapi.Field) *LayersListCall {
 
2318
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2319
        return c
 
2320
}
 
2321
 
 
2322
func (c *LayersListCall) Do() (*Layersummaries, error) {
 
2323
        var body io.Reader = nil
 
2324
        params := make(url.Values)
 
2325
        params.Set("alt", "json")
 
2326
        if v, ok := c.opt_["contentVersion"]; ok {
 
2327
                params.Set("contentVersion", fmt.Sprintf("%v", v))
 
2328
        }
 
2329
        if v, ok := c.opt_["maxResults"]; ok {
 
2330
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
2331
        }
 
2332
        if v, ok := c.opt_["pageToken"]; ok {
 
2333
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
2334
        }
 
2335
        if v, ok := c.opt_["source"]; ok {
 
2336
                params.Set("source", fmt.Sprintf("%v", v))
 
2337
        }
 
2338
        if v, ok := c.opt_["fields"]; ok {
 
2339
                params.Set("fields", fmt.Sprintf("%v", v))
 
2340
        }
 
2341
        urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layersummary")
 
2342
        urls += "?" + params.Encode()
 
2343
        req, _ := http.NewRequest("GET", urls, body)
 
2344
        googleapi.Expand(req.URL, map[string]string{
 
2345
                "volumeId": c.volumeId,
 
2346
        })
 
2347
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2348
        res, err := c.s.client.Do(req)
 
2349
        if err != nil {
 
2350
                return nil, err
 
2351
        }
 
2352
        defer googleapi.CloseBody(res)
 
2353
        if err := googleapi.CheckResponse(res); err != nil {
 
2354
                return nil, err
 
2355
        }
 
2356
        var ret *Layersummaries
 
2357
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2358
                return nil, err
 
2359
        }
 
2360
        return ret, nil
 
2361
        // {
 
2362
        //   "description": "List the layer summaries for a volume.",
 
2363
        //   "httpMethod": "GET",
 
2364
        //   "id": "books.layers.list",
 
2365
        //   "parameterOrder": [
 
2366
        //     "volumeId"
 
2367
        //   ],
 
2368
        //   "parameters": {
 
2369
        //     "contentVersion": {
 
2370
        //       "description": "The content version for the requested volume.",
 
2371
        //       "location": "query",
 
2372
        //       "type": "string"
 
2373
        //     },
 
2374
        //     "maxResults": {
 
2375
        //       "description": "Maximum number of results to return",
 
2376
        //       "format": "uint32",
 
2377
        //       "location": "query",
 
2378
        //       "maximum": "200",
 
2379
        //       "minimum": "0",
 
2380
        //       "type": "integer"
 
2381
        //     },
 
2382
        //     "pageToken": {
 
2383
        //       "description": "The value of the nextToken from the previous page.",
 
2384
        //       "location": "query",
 
2385
        //       "type": "string"
 
2386
        //     },
 
2387
        //     "source": {
 
2388
        //       "description": "String to identify the originator of this request.",
 
2389
        //       "location": "query",
 
2390
        //       "type": "string"
 
2391
        //     },
 
2392
        //     "volumeId": {
 
2393
        //       "description": "The volume to retrieve layers for.",
 
2394
        //       "location": "path",
 
2395
        //       "required": true,
 
2396
        //       "type": "string"
 
2397
        //     }
 
2398
        //   },
 
2399
        //   "path": "volumes/{volumeId}/layersummary",
 
2400
        //   "response": {
 
2401
        //     "$ref": "Layersummaries"
 
2402
        //   },
 
2403
        //   "scopes": [
 
2404
        //     "https://www.googleapis.com/auth/books"
 
2405
        //   ]
 
2406
        // }
 
2407
 
 
2408
}
 
2409
 
 
2410
// method id "books.layers.annotationData.get":
 
2411
 
 
2412
type LayersAnnotationDataGetCall struct {
 
2413
        s                *Service
 
2414
        volumeId         string
 
2415
        layerId          string
 
2416
        annotationDataId string
 
2417
        contentVersion   string
 
2418
        opt_             map[string]interface{}
 
2419
}
 
2420
 
 
2421
// Get: Gets the annotation data.
 
2422
func (r *LayersAnnotationDataService) Get(volumeId string, layerId string, annotationDataId string, contentVersion string) *LayersAnnotationDataGetCall {
 
2423
        c := &LayersAnnotationDataGetCall{s: r.s, opt_: make(map[string]interface{})}
 
2424
        c.volumeId = volumeId
 
2425
        c.layerId = layerId
 
2426
        c.annotationDataId = annotationDataId
 
2427
        c.contentVersion = contentVersion
 
2428
        return c
 
2429
}
 
2430
 
 
2431
// AllowWebDefinitions sets the optional parameter
 
2432
// "allowWebDefinitions": For the dictionary layer. Whether or not to
 
2433
// allow web definitions.
 
2434
func (c *LayersAnnotationDataGetCall) AllowWebDefinitions(allowWebDefinitions bool) *LayersAnnotationDataGetCall {
 
2435
        c.opt_["allowWebDefinitions"] = allowWebDefinitions
 
2436
        return c
 
2437
}
 
2438
 
 
2439
// H sets the optional parameter "h": The requested pixel height for any
 
2440
// images. If height is provided width must also be provided.
 
2441
func (c *LayersAnnotationDataGetCall) H(h int64) *LayersAnnotationDataGetCall {
 
2442
        c.opt_["h"] = h
 
2443
        return c
 
2444
}
 
2445
 
 
2446
// Locale sets the optional parameter "locale": The locale information
 
2447
// for the data. ISO-639-1 language and ISO-3166-1 country code. Ex:
 
2448
// 'en_US'.
 
2449
func (c *LayersAnnotationDataGetCall) Locale(locale string) *LayersAnnotationDataGetCall {
 
2450
        c.opt_["locale"] = locale
 
2451
        return c
 
2452
}
 
2453
 
 
2454
// Scale sets the optional parameter "scale": The requested scale for
 
2455
// the image.
 
2456
func (c *LayersAnnotationDataGetCall) Scale(scale int64) *LayersAnnotationDataGetCall {
 
2457
        c.opt_["scale"] = scale
 
2458
        return c
 
2459
}
 
2460
 
 
2461
// Source sets the optional parameter "source": String to identify the
 
2462
// originator of this request.
 
2463
func (c *LayersAnnotationDataGetCall) Source(source string) *LayersAnnotationDataGetCall {
 
2464
        c.opt_["source"] = source
 
2465
        return c
 
2466
}
 
2467
 
 
2468
// W sets the optional parameter "w": The requested pixel width for any
 
2469
// images. If width is provided height must also be provided.
 
2470
func (c *LayersAnnotationDataGetCall) W(w int64) *LayersAnnotationDataGetCall {
 
2471
        c.opt_["w"] = w
 
2472
        return c
 
2473
}
 
2474
 
 
2475
// Fields allows partial responses to be retrieved.
 
2476
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2477
// for more information.
 
2478
func (c *LayersAnnotationDataGetCall) Fields(s ...googleapi.Field) *LayersAnnotationDataGetCall {
 
2479
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2480
        return c
 
2481
}
 
2482
 
 
2483
func (c *LayersAnnotationDataGetCall) Do() (*Annotationdata, error) {
 
2484
        var body io.Reader = nil
 
2485
        params := make(url.Values)
 
2486
        params.Set("alt", "json")
 
2487
        params.Set("contentVersion", fmt.Sprintf("%v", c.contentVersion))
 
2488
        if v, ok := c.opt_["allowWebDefinitions"]; ok {
 
2489
                params.Set("allowWebDefinitions", fmt.Sprintf("%v", v))
 
2490
        }
 
2491
        if v, ok := c.opt_["h"]; ok {
 
2492
                params.Set("h", fmt.Sprintf("%v", v))
 
2493
        }
 
2494
        if v, ok := c.opt_["locale"]; ok {
 
2495
                params.Set("locale", fmt.Sprintf("%v", v))
 
2496
        }
 
2497
        if v, ok := c.opt_["scale"]; ok {
 
2498
                params.Set("scale", fmt.Sprintf("%v", v))
 
2499
        }
 
2500
        if v, ok := c.opt_["source"]; ok {
 
2501
                params.Set("source", fmt.Sprintf("%v", v))
 
2502
        }
 
2503
        if v, ok := c.opt_["w"]; ok {
 
2504
                params.Set("w", fmt.Sprintf("%v", v))
 
2505
        }
 
2506
        if v, ok := c.opt_["fields"]; ok {
 
2507
                params.Set("fields", fmt.Sprintf("%v", v))
 
2508
        }
 
2509
        urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layers/{layerId}/data/{annotationDataId}")
 
2510
        urls += "?" + params.Encode()
 
2511
        req, _ := http.NewRequest("GET", urls, body)
 
2512
        googleapi.Expand(req.URL, map[string]string{
 
2513
                "volumeId":         c.volumeId,
 
2514
                "layerId":          c.layerId,
 
2515
                "annotationDataId": c.annotationDataId,
 
2516
        })
 
2517
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2518
        res, err := c.s.client.Do(req)
 
2519
        if err != nil {
 
2520
                return nil, err
 
2521
        }
 
2522
        defer googleapi.CloseBody(res)
 
2523
        if err := googleapi.CheckResponse(res); err != nil {
 
2524
                return nil, err
 
2525
        }
 
2526
        var ret *Annotationdata
 
2527
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2528
                return nil, err
 
2529
        }
 
2530
        return ret, nil
 
2531
        // {
 
2532
        //   "description": "Gets the annotation data.",
 
2533
        //   "httpMethod": "GET",
 
2534
        //   "id": "books.layers.annotationData.get",
 
2535
        //   "parameterOrder": [
 
2536
        //     "volumeId",
 
2537
        //     "layerId",
 
2538
        //     "annotationDataId",
 
2539
        //     "contentVersion"
 
2540
        //   ],
 
2541
        //   "parameters": {
 
2542
        //     "allowWebDefinitions": {
 
2543
        //       "description": "For the dictionary layer. Whether or not to allow web definitions.",
 
2544
        //       "location": "query",
 
2545
        //       "type": "boolean"
 
2546
        //     },
 
2547
        //     "annotationDataId": {
 
2548
        //       "description": "The ID of the annotation data to retrieve.",
 
2549
        //       "location": "path",
 
2550
        //       "required": true,
 
2551
        //       "type": "string"
 
2552
        //     },
 
2553
        //     "contentVersion": {
 
2554
        //       "description": "The content version for the volume you are trying to retrieve.",
 
2555
        //       "location": "query",
 
2556
        //       "required": true,
 
2557
        //       "type": "string"
 
2558
        //     },
 
2559
        //     "h": {
 
2560
        //       "description": "The requested pixel height for any images. If height is provided width must also be provided.",
 
2561
        //       "format": "int32",
 
2562
        //       "location": "query",
 
2563
        //       "type": "integer"
 
2564
        //     },
 
2565
        //     "layerId": {
 
2566
        //       "description": "The ID for the layer to get the annotations.",
 
2567
        //       "location": "path",
 
2568
        //       "required": true,
 
2569
        //       "type": "string"
 
2570
        //     },
 
2571
        //     "locale": {
 
2572
        //       "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.",
 
2573
        //       "location": "query",
 
2574
        //       "type": "string"
 
2575
        //     },
 
2576
        //     "scale": {
 
2577
        //       "description": "The requested scale for the image.",
 
2578
        //       "format": "int32",
 
2579
        //       "location": "query",
 
2580
        //       "minimum": "0",
 
2581
        //       "type": "integer"
 
2582
        //     },
 
2583
        //     "source": {
 
2584
        //       "description": "String to identify the originator of this request.",
 
2585
        //       "location": "query",
 
2586
        //       "type": "string"
 
2587
        //     },
 
2588
        //     "volumeId": {
 
2589
        //       "description": "The volume to retrieve annotations for.",
 
2590
        //       "location": "path",
 
2591
        //       "required": true,
 
2592
        //       "type": "string"
 
2593
        //     },
 
2594
        //     "w": {
 
2595
        //       "description": "The requested pixel width for any images. If width is provided height must also be provided.",
 
2596
        //       "format": "int32",
 
2597
        //       "location": "query",
 
2598
        //       "type": "integer"
 
2599
        //     }
 
2600
        //   },
 
2601
        //   "path": "volumes/{volumeId}/layers/{layerId}/data/{annotationDataId}",
 
2602
        //   "response": {
 
2603
        //     "$ref": "Annotationdata"
 
2604
        //   },
 
2605
        //   "scopes": [
 
2606
        //     "https://www.googleapis.com/auth/books"
 
2607
        //   ]
 
2608
        // }
 
2609
 
 
2610
}
 
2611
 
 
2612
// method id "books.layers.annotationData.list":
 
2613
 
 
2614
type LayersAnnotationDataListCall struct {
 
2615
        s              *Service
 
2616
        volumeId       string
 
2617
        layerId        string
 
2618
        contentVersion string
 
2619
        opt_           map[string]interface{}
 
2620
}
 
2621
 
 
2622
// List: Gets the annotation data for a volume and layer.
 
2623
func (r *LayersAnnotationDataService) List(volumeId string, layerId string, contentVersion string) *LayersAnnotationDataListCall {
 
2624
        c := &LayersAnnotationDataListCall{s: r.s, opt_: make(map[string]interface{})}
 
2625
        c.volumeId = volumeId
 
2626
        c.layerId = layerId
 
2627
        c.contentVersion = contentVersion
 
2628
        return c
 
2629
}
 
2630
 
 
2631
// AnnotationDataId sets the optional parameter "annotationDataId": The
 
2632
// list of Annotation Data Ids to retrieve. Pagination is ignored if
 
2633
// this is set.
 
2634
func (c *LayersAnnotationDataListCall) AnnotationDataId(annotationDataId string) *LayersAnnotationDataListCall {
 
2635
        c.opt_["annotationDataId"] = annotationDataId
 
2636
        return c
 
2637
}
 
2638
 
 
2639
// H sets the optional parameter "h": The requested pixel height for any
 
2640
// images. If height is provided width must also be provided.
 
2641
func (c *LayersAnnotationDataListCall) H(h int64) *LayersAnnotationDataListCall {
 
2642
        c.opt_["h"] = h
 
2643
        return c
 
2644
}
 
2645
 
 
2646
// Locale sets the optional parameter "locale": The locale information
 
2647
// for the data. ISO-639-1 language and ISO-3166-1 country code. Ex:
 
2648
// 'en_US'.
 
2649
func (c *LayersAnnotationDataListCall) Locale(locale string) *LayersAnnotationDataListCall {
 
2650
        c.opt_["locale"] = locale
 
2651
        return c
 
2652
}
 
2653
 
 
2654
// MaxResults sets the optional parameter "maxResults": Maximum number
 
2655
// of results to return
 
2656
func (c *LayersAnnotationDataListCall) MaxResults(maxResults int64) *LayersAnnotationDataListCall {
 
2657
        c.opt_["maxResults"] = maxResults
 
2658
        return c
 
2659
}
 
2660
 
 
2661
// PageToken sets the optional parameter "pageToken": The value of the
 
2662
// nextToken from the previous page.
 
2663
func (c *LayersAnnotationDataListCall) PageToken(pageToken string) *LayersAnnotationDataListCall {
 
2664
        c.opt_["pageToken"] = pageToken
 
2665
        return c
 
2666
}
 
2667
 
 
2668
// Scale sets the optional parameter "scale": The requested scale for
 
2669
// the image.
 
2670
func (c *LayersAnnotationDataListCall) Scale(scale int64) *LayersAnnotationDataListCall {
 
2671
        c.opt_["scale"] = scale
 
2672
        return c
 
2673
}
 
2674
 
 
2675
// Source sets the optional parameter "source": String to identify the
 
2676
// originator of this request.
 
2677
func (c *LayersAnnotationDataListCall) Source(source string) *LayersAnnotationDataListCall {
 
2678
        c.opt_["source"] = source
 
2679
        return c
 
2680
}
 
2681
 
 
2682
// UpdatedMax sets the optional parameter "updatedMax": RFC 3339
 
2683
// timestamp to restrict to items updated prior to this timestamp
 
2684
// (exclusive).
 
2685
func (c *LayersAnnotationDataListCall) UpdatedMax(updatedMax string) *LayersAnnotationDataListCall {
 
2686
        c.opt_["updatedMax"] = updatedMax
 
2687
        return c
 
2688
}
 
2689
 
 
2690
// UpdatedMin sets the optional parameter "updatedMin": RFC 3339
 
2691
// timestamp to restrict to items updated since this timestamp
 
2692
// (inclusive).
 
2693
func (c *LayersAnnotationDataListCall) UpdatedMin(updatedMin string) *LayersAnnotationDataListCall {
 
2694
        c.opt_["updatedMin"] = updatedMin
 
2695
        return c
 
2696
}
 
2697
 
 
2698
// W sets the optional parameter "w": The requested pixel width for any
 
2699
// images. If width is provided height must also be provided.
 
2700
func (c *LayersAnnotationDataListCall) W(w int64) *LayersAnnotationDataListCall {
 
2701
        c.opt_["w"] = w
 
2702
        return c
 
2703
}
 
2704
 
 
2705
// Fields allows partial responses to be retrieved.
 
2706
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2707
// for more information.
 
2708
func (c *LayersAnnotationDataListCall) Fields(s ...googleapi.Field) *LayersAnnotationDataListCall {
 
2709
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2710
        return c
 
2711
}
 
2712
 
 
2713
func (c *LayersAnnotationDataListCall) Do() (*Annotationsdata, error) {
 
2714
        var body io.Reader = nil
 
2715
        params := make(url.Values)
 
2716
        params.Set("alt", "json")
 
2717
        params.Set("contentVersion", fmt.Sprintf("%v", c.contentVersion))
 
2718
        if v, ok := c.opt_["annotationDataId"]; ok {
 
2719
                params.Set("annotationDataId", fmt.Sprintf("%v", v))
 
2720
        }
 
2721
        if v, ok := c.opt_["h"]; ok {
 
2722
                params.Set("h", fmt.Sprintf("%v", v))
 
2723
        }
 
2724
        if v, ok := c.opt_["locale"]; ok {
 
2725
                params.Set("locale", fmt.Sprintf("%v", v))
 
2726
        }
 
2727
        if v, ok := c.opt_["maxResults"]; ok {
 
2728
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
2729
        }
 
2730
        if v, ok := c.opt_["pageToken"]; ok {
 
2731
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
2732
        }
 
2733
        if v, ok := c.opt_["scale"]; ok {
 
2734
                params.Set("scale", fmt.Sprintf("%v", v))
 
2735
        }
 
2736
        if v, ok := c.opt_["source"]; ok {
 
2737
                params.Set("source", fmt.Sprintf("%v", v))
 
2738
        }
 
2739
        if v, ok := c.opt_["updatedMax"]; ok {
 
2740
                params.Set("updatedMax", fmt.Sprintf("%v", v))
 
2741
        }
 
2742
        if v, ok := c.opt_["updatedMin"]; ok {
 
2743
                params.Set("updatedMin", fmt.Sprintf("%v", v))
 
2744
        }
 
2745
        if v, ok := c.opt_["w"]; ok {
 
2746
                params.Set("w", fmt.Sprintf("%v", v))
 
2747
        }
 
2748
        if v, ok := c.opt_["fields"]; ok {
 
2749
                params.Set("fields", fmt.Sprintf("%v", v))
 
2750
        }
 
2751
        urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layers/{layerId}/data")
 
2752
        urls += "?" + params.Encode()
 
2753
        req, _ := http.NewRequest("GET", urls, body)
 
2754
        googleapi.Expand(req.URL, map[string]string{
 
2755
                "volumeId": c.volumeId,
 
2756
                "layerId":  c.layerId,
 
2757
        })
 
2758
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2759
        res, err := c.s.client.Do(req)
 
2760
        if err != nil {
 
2761
                return nil, err
 
2762
        }
 
2763
        defer googleapi.CloseBody(res)
 
2764
        if err := googleapi.CheckResponse(res); err != nil {
 
2765
                return nil, err
 
2766
        }
 
2767
        var ret *Annotationsdata
 
2768
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2769
                return nil, err
 
2770
        }
 
2771
        return ret, nil
 
2772
        // {
 
2773
        //   "description": "Gets the annotation data for a volume and layer.",
 
2774
        //   "httpMethod": "GET",
 
2775
        //   "id": "books.layers.annotationData.list",
 
2776
        //   "parameterOrder": [
 
2777
        //     "volumeId",
 
2778
        //     "layerId",
 
2779
        //     "contentVersion"
 
2780
        //   ],
 
2781
        //   "parameters": {
 
2782
        //     "annotationDataId": {
 
2783
        //       "description": "The list of Annotation Data Ids to retrieve. Pagination is ignored if this is set.",
 
2784
        //       "location": "query",
 
2785
        //       "repeated": true,
 
2786
        //       "type": "string"
 
2787
        //     },
 
2788
        //     "contentVersion": {
 
2789
        //       "description": "The content version for the requested volume.",
 
2790
        //       "location": "query",
 
2791
        //       "required": true,
 
2792
        //       "type": "string"
 
2793
        //     },
 
2794
        //     "h": {
 
2795
        //       "description": "The requested pixel height for any images. If height is provided width must also be provided.",
 
2796
        //       "format": "int32",
 
2797
        //       "location": "query",
 
2798
        //       "type": "integer"
 
2799
        //     },
 
2800
        //     "layerId": {
 
2801
        //       "description": "The ID for the layer to get the annotation data.",
 
2802
        //       "location": "path",
 
2803
        //       "required": true,
 
2804
        //       "type": "string"
 
2805
        //     },
 
2806
        //     "locale": {
 
2807
        //       "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.",
 
2808
        //       "location": "query",
 
2809
        //       "type": "string"
 
2810
        //     },
 
2811
        //     "maxResults": {
 
2812
        //       "description": "Maximum number of results to return",
 
2813
        //       "format": "uint32",
 
2814
        //       "location": "query",
 
2815
        //       "maximum": "200",
 
2816
        //       "minimum": "0",
 
2817
        //       "type": "integer"
 
2818
        //     },
 
2819
        //     "pageToken": {
 
2820
        //       "description": "The value of the nextToken from the previous page.",
 
2821
        //       "location": "query",
 
2822
        //       "type": "string"
 
2823
        //     },
 
2824
        //     "scale": {
 
2825
        //       "description": "The requested scale for the image.",
 
2826
        //       "format": "int32",
 
2827
        //       "location": "query",
 
2828
        //       "minimum": "0",
 
2829
        //       "type": "integer"
 
2830
        //     },
 
2831
        //     "source": {
 
2832
        //       "description": "String to identify the originator of this request.",
 
2833
        //       "location": "query",
 
2834
        //       "type": "string"
 
2835
        //     },
 
2836
        //     "updatedMax": {
 
2837
        //       "description": "RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).",
 
2838
        //       "location": "query",
 
2839
        //       "type": "string"
 
2840
        //     },
 
2841
        //     "updatedMin": {
 
2842
        //       "description": "RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).",
 
2843
        //       "location": "query",
 
2844
        //       "type": "string"
 
2845
        //     },
 
2846
        //     "volumeId": {
 
2847
        //       "description": "The volume to retrieve annotation data for.",
 
2848
        //       "location": "path",
 
2849
        //       "required": true,
 
2850
        //       "type": "string"
 
2851
        //     },
 
2852
        //     "w": {
 
2853
        //       "description": "The requested pixel width for any images. If width is provided height must also be provided.",
 
2854
        //       "format": "int32",
 
2855
        //       "location": "query",
 
2856
        //       "type": "integer"
 
2857
        //     }
 
2858
        //   },
 
2859
        //   "path": "volumes/{volumeId}/layers/{layerId}/data",
 
2860
        //   "response": {
 
2861
        //     "$ref": "Annotationsdata"
 
2862
        //   },
 
2863
        //   "scopes": [
 
2864
        //     "https://www.googleapis.com/auth/books"
 
2865
        //   ]
 
2866
        // }
 
2867
 
 
2868
}
 
2869
 
 
2870
// method id "books.layers.volumeAnnotations.get":
 
2871
 
 
2872
type LayersVolumeAnnotationsGetCall struct {
 
2873
        s            *Service
 
2874
        volumeId     string
 
2875
        layerId      string
 
2876
        annotationId string
 
2877
        opt_         map[string]interface{}
 
2878
}
 
2879
 
 
2880
// Get: Gets the volume annotation.
 
2881
func (r *LayersVolumeAnnotationsService) Get(volumeId string, layerId string, annotationId string) *LayersVolumeAnnotationsGetCall {
 
2882
        c := &LayersVolumeAnnotationsGetCall{s: r.s, opt_: make(map[string]interface{})}
 
2883
        c.volumeId = volumeId
 
2884
        c.layerId = layerId
 
2885
        c.annotationId = annotationId
 
2886
        return c
 
2887
}
 
2888
 
 
2889
// Locale sets the optional parameter "locale": The locale information
 
2890
// for the data. ISO-639-1 language and ISO-3166-1 country code. Ex:
 
2891
// 'en_US'.
 
2892
func (c *LayersVolumeAnnotationsGetCall) Locale(locale string) *LayersVolumeAnnotationsGetCall {
 
2893
        c.opt_["locale"] = locale
 
2894
        return c
 
2895
}
 
2896
 
 
2897
// Source sets the optional parameter "source": String to identify the
 
2898
// originator of this request.
 
2899
func (c *LayersVolumeAnnotationsGetCall) Source(source string) *LayersVolumeAnnotationsGetCall {
 
2900
        c.opt_["source"] = source
 
2901
        return c
 
2902
}
 
2903
 
 
2904
// Fields allows partial responses to be retrieved.
 
2905
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
2906
// for more information.
 
2907
func (c *LayersVolumeAnnotationsGetCall) Fields(s ...googleapi.Field) *LayersVolumeAnnotationsGetCall {
 
2908
        c.opt_["fields"] = googleapi.CombineFields(s)
 
2909
        return c
 
2910
}
 
2911
 
 
2912
func (c *LayersVolumeAnnotationsGetCall) Do() (*Volumeannotation, error) {
 
2913
        var body io.Reader = nil
 
2914
        params := make(url.Values)
 
2915
        params.Set("alt", "json")
 
2916
        if v, ok := c.opt_["locale"]; ok {
 
2917
                params.Set("locale", fmt.Sprintf("%v", v))
 
2918
        }
 
2919
        if v, ok := c.opt_["source"]; ok {
 
2920
                params.Set("source", fmt.Sprintf("%v", v))
 
2921
        }
 
2922
        if v, ok := c.opt_["fields"]; ok {
 
2923
                params.Set("fields", fmt.Sprintf("%v", v))
 
2924
        }
 
2925
        urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layers/{layerId}/annotations/{annotationId}")
 
2926
        urls += "?" + params.Encode()
 
2927
        req, _ := http.NewRequest("GET", urls, body)
 
2928
        googleapi.Expand(req.URL, map[string]string{
 
2929
                "volumeId":     c.volumeId,
 
2930
                "layerId":      c.layerId,
 
2931
                "annotationId": c.annotationId,
 
2932
        })
 
2933
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2934
        res, err := c.s.client.Do(req)
 
2935
        if err != nil {
 
2936
                return nil, err
 
2937
        }
 
2938
        defer googleapi.CloseBody(res)
 
2939
        if err := googleapi.CheckResponse(res); err != nil {
 
2940
                return nil, err
 
2941
        }
 
2942
        var ret *Volumeannotation
 
2943
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2944
                return nil, err
 
2945
        }
 
2946
        return ret, nil
 
2947
        // {
 
2948
        //   "description": "Gets the volume annotation.",
 
2949
        //   "httpMethod": "GET",
 
2950
        //   "id": "books.layers.volumeAnnotations.get",
 
2951
        //   "parameterOrder": [
 
2952
        //     "volumeId",
 
2953
        //     "layerId",
 
2954
        //     "annotationId"
 
2955
        //   ],
 
2956
        //   "parameters": {
 
2957
        //     "annotationId": {
 
2958
        //       "description": "The ID of the volume annotation to retrieve.",
 
2959
        //       "location": "path",
 
2960
        //       "required": true,
 
2961
        //       "type": "string"
 
2962
        //     },
 
2963
        //     "layerId": {
 
2964
        //       "description": "The ID for the layer to get the annotations.",
 
2965
        //       "location": "path",
 
2966
        //       "required": true,
 
2967
        //       "type": "string"
 
2968
        //     },
 
2969
        //     "locale": {
 
2970
        //       "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.",
 
2971
        //       "location": "query",
 
2972
        //       "type": "string"
 
2973
        //     },
 
2974
        //     "source": {
 
2975
        //       "description": "String to identify the originator of this request.",
 
2976
        //       "location": "query",
 
2977
        //       "type": "string"
 
2978
        //     },
 
2979
        //     "volumeId": {
 
2980
        //       "description": "The volume to retrieve annotations for.",
 
2981
        //       "location": "path",
 
2982
        //       "required": true,
 
2983
        //       "type": "string"
 
2984
        //     }
 
2985
        //   },
 
2986
        //   "path": "volumes/{volumeId}/layers/{layerId}/annotations/{annotationId}",
 
2987
        //   "response": {
 
2988
        //     "$ref": "Volumeannotation"
 
2989
        //   },
 
2990
        //   "scopes": [
 
2991
        //     "https://www.googleapis.com/auth/books"
 
2992
        //   ]
 
2993
        // }
 
2994
 
 
2995
}
 
2996
 
 
2997
// method id "books.layers.volumeAnnotations.list":
 
2998
 
 
2999
type LayersVolumeAnnotationsListCall struct {
 
3000
        s              *Service
 
3001
        volumeId       string
 
3002
        layerId        string
 
3003
        contentVersion string
 
3004
        opt_           map[string]interface{}
 
3005
}
 
3006
 
 
3007
// List: Gets the volume annotations for a volume and layer.
 
3008
func (r *LayersVolumeAnnotationsService) List(volumeId string, layerId string, contentVersion string) *LayersVolumeAnnotationsListCall {
 
3009
        c := &LayersVolumeAnnotationsListCall{s: r.s, opt_: make(map[string]interface{})}
 
3010
        c.volumeId = volumeId
 
3011
        c.layerId = layerId
 
3012
        c.contentVersion = contentVersion
 
3013
        return c
 
3014
}
 
3015
 
 
3016
// EndOffset sets the optional parameter "endOffset": The end offset to
 
3017
// end retrieving data from.
 
3018
func (c *LayersVolumeAnnotationsListCall) EndOffset(endOffset string) *LayersVolumeAnnotationsListCall {
 
3019
        c.opt_["endOffset"] = endOffset
 
3020
        return c
 
3021
}
 
3022
 
 
3023
// EndPosition sets the optional parameter "endPosition": The end
 
3024
// position to end retrieving data from.
 
3025
func (c *LayersVolumeAnnotationsListCall) EndPosition(endPosition string) *LayersVolumeAnnotationsListCall {
 
3026
        c.opt_["endPosition"] = endPosition
 
3027
        return c
 
3028
}
 
3029
 
 
3030
// Locale sets the optional parameter "locale": The locale information
 
3031
// for the data. ISO-639-1 language and ISO-3166-1 country code. Ex:
 
3032
// 'en_US'.
 
3033
func (c *LayersVolumeAnnotationsListCall) Locale(locale string) *LayersVolumeAnnotationsListCall {
 
3034
        c.opt_["locale"] = locale
 
3035
        return c
 
3036
}
 
3037
 
 
3038
// MaxResults sets the optional parameter "maxResults": Maximum number
 
3039
// of results to return
 
3040
func (c *LayersVolumeAnnotationsListCall) MaxResults(maxResults int64) *LayersVolumeAnnotationsListCall {
 
3041
        c.opt_["maxResults"] = maxResults
 
3042
        return c
 
3043
}
 
3044
 
 
3045
// PageToken sets the optional parameter "pageToken": The value of the
 
3046
// nextToken from the previous page.
 
3047
func (c *LayersVolumeAnnotationsListCall) PageToken(pageToken string) *LayersVolumeAnnotationsListCall {
 
3048
        c.opt_["pageToken"] = pageToken
 
3049
        return c
 
3050
}
 
3051
 
 
3052
// ShowDeleted sets the optional parameter "showDeleted": Set to true to
 
3053
// return deleted annotations. updatedMin must be in the request to use
 
3054
// this. Defaults to false.
 
3055
func (c *LayersVolumeAnnotationsListCall) ShowDeleted(showDeleted bool) *LayersVolumeAnnotationsListCall {
 
3056
        c.opt_["showDeleted"] = showDeleted
 
3057
        return c
 
3058
}
 
3059
 
 
3060
// Source sets the optional parameter "source": String to identify the
 
3061
// originator of this request.
 
3062
func (c *LayersVolumeAnnotationsListCall) Source(source string) *LayersVolumeAnnotationsListCall {
 
3063
        c.opt_["source"] = source
 
3064
        return c
 
3065
}
 
3066
 
 
3067
// StartOffset sets the optional parameter "startOffset": The start
 
3068
// offset to start retrieving data from.
 
3069
func (c *LayersVolumeAnnotationsListCall) StartOffset(startOffset string) *LayersVolumeAnnotationsListCall {
 
3070
        c.opt_["startOffset"] = startOffset
 
3071
        return c
 
3072
}
 
3073
 
 
3074
// StartPosition sets the optional parameter "startPosition": The start
 
3075
// position to start retrieving data from.
 
3076
func (c *LayersVolumeAnnotationsListCall) StartPosition(startPosition string) *LayersVolumeAnnotationsListCall {
 
3077
        c.opt_["startPosition"] = startPosition
 
3078
        return c
 
3079
}
 
3080
 
 
3081
// UpdatedMax sets the optional parameter "updatedMax": RFC 3339
 
3082
// timestamp to restrict to items updated prior to this timestamp
 
3083
// (exclusive).
 
3084
func (c *LayersVolumeAnnotationsListCall) UpdatedMax(updatedMax string) *LayersVolumeAnnotationsListCall {
 
3085
        c.opt_["updatedMax"] = updatedMax
 
3086
        return c
 
3087
}
 
3088
 
 
3089
// UpdatedMin sets the optional parameter "updatedMin": RFC 3339
 
3090
// timestamp to restrict to items updated since this timestamp
 
3091
// (inclusive).
 
3092
func (c *LayersVolumeAnnotationsListCall) UpdatedMin(updatedMin string) *LayersVolumeAnnotationsListCall {
 
3093
        c.opt_["updatedMin"] = updatedMin
 
3094
        return c
 
3095
}
 
3096
 
 
3097
// VolumeAnnotationsVersion sets the optional parameter
 
3098
// "volumeAnnotationsVersion": The version of the volume annotations
 
3099
// that you are requesting.
 
3100
func (c *LayersVolumeAnnotationsListCall) VolumeAnnotationsVersion(volumeAnnotationsVersion string) *LayersVolumeAnnotationsListCall {
 
3101
        c.opt_["volumeAnnotationsVersion"] = volumeAnnotationsVersion
 
3102
        return c
 
3103
}
 
3104
 
 
3105
// Fields allows partial responses to be retrieved.
 
3106
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3107
// for more information.
 
3108
func (c *LayersVolumeAnnotationsListCall) Fields(s ...googleapi.Field) *LayersVolumeAnnotationsListCall {
 
3109
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3110
        return c
 
3111
}
 
3112
 
 
3113
func (c *LayersVolumeAnnotationsListCall) Do() (*Volumeannotations, error) {
 
3114
        var body io.Reader = nil
 
3115
        params := make(url.Values)
 
3116
        params.Set("alt", "json")
 
3117
        params.Set("contentVersion", fmt.Sprintf("%v", c.contentVersion))
 
3118
        if v, ok := c.opt_["endOffset"]; ok {
 
3119
                params.Set("endOffset", fmt.Sprintf("%v", v))
 
3120
        }
 
3121
        if v, ok := c.opt_["endPosition"]; ok {
 
3122
                params.Set("endPosition", fmt.Sprintf("%v", v))
 
3123
        }
 
3124
        if v, ok := c.opt_["locale"]; ok {
 
3125
                params.Set("locale", fmt.Sprintf("%v", v))
 
3126
        }
 
3127
        if v, ok := c.opt_["maxResults"]; ok {
 
3128
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
3129
        }
 
3130
        if v, ok := c.opt_["pageToken"]; ok {
 
3131
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
3132
        }
 
3133
        if v, ok := c.opt_["showDeleted"]; ok {
 
3134
                params.Set("showDeleted", fmt.Sprintf("%v", v))
 
3135
        }
 
3136
        if v, ok := c.opt_["source"]; ok {
 
3137
                params.Set("source", fmt.Sprintf("%v", v))
 
3138
        }
 
3139
        if v, ok := c.opt_["startOffset"]; ok {
 
3140
                params.Set("startOffset", fmt.Sprintf("%v", v))
 
3141
        }
 
3142
        if v, ok := c.opt_["startPosition"]; ok {
 
3143
                params.Set("startPosition", fmt.Sprintf("%v", v))
 
3144
        }
 
3145
        if v, ok := c.opt_["updatedMax"]; ok {
 
3146
                params.Set("updatedMax", fmt.Sprintf("%v", v))
 
3147
        }
 
3148
        if v, ok := c.opt_["updatedMin"]; ok {
 
3149
                params.Set("updatedMin", fmt.Sprintf("%v", v))
 
3150
        }
 
3151
        if v, ok := c.opt_["volumeAnnotationsVersion"]; ok {
 
3152
                params.Set("volumeAnnotationsVersion", fmt.Sprintf("%v", v))
 
3153
        }
 
3154
        if v, ok := c.opt_["fields"]; ok {
 
3155
                params.Set("fields", fmt.Sprintf("%v", v))
 
3156
        }
 
3157
        urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layers/{layerId}")
 
3158
        urls += "?" + params.Encode()
 
3159
        req, _ := http.NewRequest("GET", urls, body)
 
3160
        googleapi.Expand(req.URL, map[string]string{
 
3161
                "volumeId": c.volumeId,
 
3162
                "layerId":  c.layerId,
 
3163
        })
 
3164
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3165
        res, err := c.s.client.Do(req)
 
3166
        if err != nil {
 
3167
                return nil, err
 
3168
        }
 
3169
        defer googleapi.CloseBody(res)
 
3170
        if err := googleapi.CheckResponse(res); err != nil {
 
3171
                return nil, err
 
3172
        }
 
3173
        var ret *Volumeannotations
 
3174
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
3175
                return nil, err
 
3176
        }
 
3177
        return ret, nil
 
3178
        // {
 
3179
        //   "description": "Gets the volume annotations for a volume and layer.",
 
3180
        //   "httpMethod": "GET",
 
3181
        //   "id": "books.layers.volumeAnnotations.list",
 
3182
        //   "parameterOrder": [
 
3183
        //     "volumeId",
 
3184
        //     "layerId",
 
3185
        //     "contentVersion"
 
3186
        //   ],
 
3187
        //   "parameters": {
 
3188
        //     "contentVersion": {
 
3189
        //       "description": "The content version for the requested volume.",
 
3190
        //       "location": "query",
 
3191
        //       "required": true,
 
3192
        //       "type": "string"
 
3193
        //     },
 
3194
        //     "endOffset": {
 
3195
        //       "description": "The end offset to end retrieving data from.",
 
3196
        //       "location": "query",
 
3197
        //       "type": "string"
 
3198
        //     },
 
3199
        //     "endPosition": {
 
3200
        //       "description": "The end position to end retrieving data from.",
 
3201
        //       "location": "query",
 
3202
        //       "type": "string"
 
3203
        //     },
 
3204
        //     "layerId": {
 
3205
        //       "description": "The ID for the layer to get the annotations.",
 
3206
        //       "location": "path",
 
3207
        //       "required": true,
 
3208
        //       "type": "string"
 
3209
        //     },
 
3210
        //     "locale": {
 
3211
        //       "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.",
 
3212
        //       "location": "query",
 
3213
        //       "type": "string"
 
3214
        //     },
 
3215
        //     "maxResults": {
 
3216
        //       "description": "Maximum number of results to return",
 
3217
        //       "format": "uint32",
 
3218
        //       "location": "query",
 
3219
        //       "maximum": "200",
 
3220
        //       "minimum": "0",
 
3221
        //       "type": "integer"
 
3222
        //     },
 
3223
        //     "pageToken": {
 
3224
        //       "description": "The value of the nextToken from the previous page.",
 
3225
        //       "location": "query",
 
3226
        //       "type": "string"
 
3227
        //     },
 
3228
        //     "showDeleted": {
 
3229
        //       "description": "Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false.",
 
3230
        //       "location": "query",
 
3231
        //       "type": "boolean"
 
3232
        //     },
 
3233
        //     "source": {
 
3234
        //       "description": "String to identify the originator of this request.",
 
3235
        //       "location": "query",
 
3236
        //       "type": "string"
 
3237
        //     },
 
3238
        //     "startOffset": {
 
3239
        //       "description": "The start offset to start retrieving data from.",
 
3240
        //       "location": "query",
 
3241
        //       "type": "string"
 
3242
        //     },
 
3243
        //     "startPosition": {
 
3244
        //       "description": "The start position to start retrieving data from.",
 
3245
        //       "location": "query",
 
3246
        //       "type": "string"
 
3247
        //     },
 
3248
        //     "updatedMax": {
 
3249
        //       "description": "RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).",
 
3250
        //       "location": "query",
 
3251
        //       "type": "string"
 
3252
        //     },
 
3253
        //     "updatedMin": {
 
3254
        //       "description": "RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).",
 
3255
        //       "location": "query",
 
3256
        //       "type": "string"
 
3257
        //     },
 
3258
        //     "volumeAnnotationsVersion": {
 
3259
        //       "description": "The version of the volume annotations that you are requesting.",
 
3260
        //       "location": "query",
 
3261
        //       "type": "string"
 
3262
        //     },
 
3263
        //     "volumeId": {
 
3264
        //       "description": "The volume to retrieve annotations for.",
 
3265
        //       "location": "path",
 
3266
        //       "required": true,
 
3267
        //       "type": "string"
 
3268
        //     }
 
3269
        //   },
 
3270
        //   "path": "volumes/{volumeId}/layers/{layerId}",
 
3271
        //   "response": {
 
3272
        //     "$ref": "Volumeannotations"
 
3273
        //   },
 
3274
        //   "scopes": [
 
3275
        //     "https://www.googleapis.com/auth/books"
 
3276
        //   ]
 
3277
        // }
 
3278
 
 
3279
}
 
3280
 
 
3281
// method id "books.myconfig.releaseDownloadAccess":
 
3282
 
 
3283
type MyconfigReleaseDownloadAccessCall struct {
 
3284
        s         *Service
 
3285
        volumeIds []string
 
3286
        cpksver   string
 
3287
        opt_      map[string]interface{}
 
3288
}
 
3289
 
 
3290
// ReleaseDownloadAccess: Release downloaded content access restriction.
 
3291
func (r *MyconfigService) ReleaseDownloadAccess(volumeIds []string, cpksver string) *MyconfigReleaseDownloadAccessCall {
 
3292
        c := &MyconfigReleaseDownloadAccessCall{s: r.s, opt_: make(map[string]interface{})}
 
3293
        c.volumeIds = volumeIds
 
3294
        c.cpksver = cpksver
 
3295
        return c
 
3296
}
 
3297
 
 
3298
// Locale sets the optional parameter "locale": ISO-639-1, ISO-3166-1
 
3299
// codes for message localization, i.e. en_US.
 
3300
func (c *MyconfigReleaseDownloadAccessCall) Locale(locale string) *MyconfigReleaseDownloadAccessCall {
 
3301
        c.opt_["locale"] = locale
 
3302
        return c
 
3303
}
 
3304
 
 
3305
// Source sets the optional parameter "source": String to identify the
 
3306
// originator of this request.
 
3307
func (c *MyconfigReleaseDownloadAccessCall) Source(source string) *MyconfigReleaseDownloadAccessCall {
 
3308
        c.opt_["source"] = source
 
3309
        return c
 
3310
}
 
3311
 
 
3312
// Fields allows partial responses to be retrieved.
 
3313
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3314
// for more information.
 
3315
func (c *MyconfigReleaseDownloadAccessCall) Fields(s ...googleapi.Field) *MyconfigReleaseDownloadAccessCall {
 
3316
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3317
        return c
 
3318
}
 
3319
 
 
3320
func (c *MyconfigReleaseDownloadAccessCall) Do() (*DownloadAccesses, error) {
 
3321
        var body io.Reader = nil
 
3322
        params := make(url.Values)
 
3323
        params.Set("alt", "json")
 
3324
        params.Set("cpksver", fmt.Sprintf("%v", c.cpksver))
 
3325
        for _, v := range c.volumeIds {
 
3326
                params.Add("volumeIds", fmt.Sprintf("%v", v))
 
3327
        }
 
3328
        if v, ok := c.opt_["locale"]; ok {
 
3329
                params.Set("locale", fmt.Sprintf("%v", v))
 
3330
        }
 
3331
        if v, ok := c.opt_["source"]; ok {
 
3332
                params.Set("source", fmt.Sprintf("%v", v))
 
3333
        }
 
3334
        if v, ok := c.opt_["fields"]; ok {
 
3335
                params.Set("fields", fmt.Sprintf("%v", v))
 
3336
        }
 
3337
        urls := googleapi.ResolveRelative(c.s.BasePath, "myconfig/releaseDownloadAccess")
 
3338
        urls += "?" + params.Encode()
 
3339
        req, _ := http.NewRequest("POST", urls, body)
 
3340
        googleapi.SetOpaque(req.URL)
 
3341
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3342
        res, err := c.s.client.Do(req)
 
3343
        if err != nil {
 
3344
                return nil, err
 
3345
        }
 
3346
        defer googleapi.CloseBody(res)
 
3347
        if err := googleapi.CheckResponse(res); err != nil {
 
3348
                return nil, err
 
3349
        }
 
3350
        var ret *DownloadAccesses
 
3351
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
3352
                return nil, err
 
3353
        }
 
3354
        return ret, nil
 
3355
        // {
 
3356
        //   "description": "Release downloaded content access restriction.",
 
3357
        //   "httpMethod": "POST",
 
3358
        //   "id": "books.myconfig.releaseDownloadAccess",
 
3359
        //   "parameterOrder": [
 
3360
        //     "volumeIds",
 
3361
        //     "cpksver"
 
3362
        //   ],
 
3363
        //   "parameters": {
 
3364
        //     "cpksver": {
 
3365
        //       "description": "The device/version ID from which to release the restriction.",
 
3366
        //       "location": "query",
 
3367
        //       "required": true,
 
3368
        //       "type": "string"
 
3369
        //     },
 
3370
        //     "locale": {
 
3371
        //       "description": "ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.",
 
3372
        //       "location": "query",
 
3373
        //       "type": "string"
 
3374
        //     },
 
3375
        //     "source": {
 
3376
        //       "description": "String to identify the originator of this request.",
 
3377
        //       "location": "query",
 
3378
        //       "type": "string"
 
3379
        //     },
 
3380
        //     "volumeIds": {
 
3381
        //       "description": "The volume(s) to release restrictions for.",
 
3382
        //       "location": "query",
 
3383
        //       "repeated": true,
 
3384
        //       "required": true,
 
3385
        //       "type": "string"
 
3386
        //     }
 
3387
        //   },
 
3388
        //   "path": "myconfig/releaseDownloadAccess",
 
3389
        //   "response": {
 
3390
        //     "$ref": "DownloadAccesses"
 
3391
        //   },
 
3392
        //   "scopes": [
 
3393
        //     "https://www.googleapis.com/auth/books"
 
3394
        //   ]
 
3395
        // }
 
3396
 
 
3397
}
 
3398
 
 
3399
// method id "books.myconfig.requestAccess":
 
3400
 
 
3401
type MyconfigRequestAccessCall struct {
 
3402
        s        *Service
 
3403
        source   string
 
3404
        volumeId string
 
3405
        nonce    string
 
3406
        cpksver  string
 
3407
        opt_     map[string]interface{}
 
3408
}
 
3409
 
 
3410
// RequestAccess: Request concurrent and download access restrictions.
 
3411
func (r *MyconfigService) RequestAccess(source string, volumeId string, nonce string, cpksver string) *MyconfigRequestAccessCall {
 
3412
        c := &MyconfigRequestAccessCall{s: r.s, opt_: make(map[string]interface{})}
 
3413
        c.source = source
 
3414
        c.volumeId = volumeId
 
3415
        c.nonce = nonce
 
3416
        c.cpksver = cpksver
 
3417
        return c
 
3418
}
 
3419
 
 
3420
// LicenseTypes sets the optional parameter "licenseTypes": The type of
 
3421
// access license to request. If not specified, the default is BOTH.
 
3422
func (c *MyconfigRequestAccessCall) LicenseTypes(licenseTypes string) *MyconfigRequestAccessCall {
 
3423
        c.opt_["licenseTypes"] = licenseTypes
 
3424
        return c
 
3425
}
 
3426
 
 
3427
// Locale sets the optional parameter "locale": ISO-639-1, ISO-3166-1
 
3428
// codes for message localization, i.e. en_US.
 
3429
func (c *MyconfigRequestAccessCall) Locale(locale string) *MyconfigRequestAccessCall {
 
3430
        c.opt_["locale"] = locale
 
3431
        return c
 
3432
}
 
3433
 
 
3434
// Fields allows partial responses to be retrieved.
 
3435
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3436
// for more information.
 
3437
func (c *MyconfigRequestAccessCall) Fields(s ...googleapi.Field) *MyconfigRequestAccessCall {
 
3438
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3439
        return c
 
3440
}
 
3441
 
 
3442
func (c *MyconfigRequestAccessCall) Do() (*RequestAccess, error) {
 
3443
        var body io.Reader = nil
 
3444
        params := make(url.Values)
 
3445
        params.Set("alt", "json")
 
3446
        params.Set("cpksver", fmt.Sprintf("%v", c.cpksver))
 
3447
        params.Set("nonce", fmt.Sprintf("%v", c.nonce))
 
3448
        params.Set("source", fmt.Sprintf("%v", c.source))
 
3449
        params.Set("volumeId", fmt.Sprintf("%v", c.volumeId))
 
3450
        if v, ok := c.opt_["licenseTypes"]; ok {
 
3451
                params.Set("licenseTypes", fmt.Sprintf("%v", v))
 
3452
        }
 
3453
        if v, ok := c.opt_["locale"]; ok {
 
3454
                params.Set("locale", fmt.Sprintf("%v", v))
 
3455
        }
 
3456
        if v, ok := c.opt_["fields"]; ok {
 
3457
                params.Set("fields", fmt.Sprintf("%v", v))
 
3458
        }
 
3459
        urls := googleapi.ResolveRelative(c.s.BasePath, "myconfig/requestAccess")
 
3460
        urls += "?" + params.Encode()
 
3461
        req, _ := http.NewRequest("POST", urls, body)
 
3462
        googleapi.SetOpaque(req.URL)
 
3463
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3464
        res, err := c.s.client.Do(req)
 
3465
        if err != nil {
 
3466
                return nil, err
 
3467
        }
 
3468
        defer googleapi.CloseBody(res)
 
3469
        if err := googleapi.CheckResponse(res); err != nil {
 
3470
                return nil, err
 
3471
        }
 
3472
        var ret *RequestAccess
 
3473
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
3474
                return nil, err
 
3475
        }
 
3476
        return ret, nil
 
3477
        // {
 
3478
        //   "description": "Request concurrent and download access restrictions.",
 
3479
        //   "httpMethod": "POST",
 
3480
        //   "id": "books.myconfig.requestAccess",
 
3481
        //   "parameterOrder": [
 
3482
        //     "source",
 
3483
        //     "volumeId",
 
3484
        //     "nonce",
 
3485
        //     "cpksver"
 
3486
        //   ],
 
3487
        //   "parameters": {
 
3488
        //     "cpksver": {
 
3489
        //       "description": "The device/version ID from which to request the restrictions.",
 
3490
        //       "location": "query",
 
3491
        //       "required": true,
 
3492
        //       "type": "string"
 
3493
        //     },
 
3494
        //     "licenseTypes": {
 
3495
        //       "description": "The type of access license to request. If not specified, the default is BOTH.",
 
3496
        //       "enum": [
 
3497
        //         "BOTH",
 
3498
        //         "CONCURRENT",
 
3499
        //         "DOWNLOAD"
 
3500
        //       ],
 
3501
        //       "enumDescriptions": [
 
3502
        //         "Both concurrent and download licenses.",
 
3503
        //         "Concurrent access license.",
 
3504
        //         "Offline download access license."
 
3505
        //       ],
 
3506
        //       "location": "query",
 
3507
        //       "type": "string"
 
3508
        //     },
 
3509
        //     "locale": {
 
3510
        //       "description": "ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.",
 
3511
        //       "location": "query",
 
3512
        //       "type": "string"
 
3513
        //     },
 
3514
        //     "nonce": {
 
3515
        //       "description": "The client nonce value.",
 
3516
        //       "location": "query",
 
3517
        //       "required": true,
 
3518
        //       "type": "string"
 
3519
        //     },
 
3520
        //     "source": {
 
3521
        //       "description": "String to identify the originator of this request.",
 
3522
        //       "location": "query",
 
3523
        //       "required": true,
 
3524
        //       "type": "string"
 
3525
        //     },
 
3526
        //     "volumeId": {
 
3527
        //       "description": "The volume to request concurrent/download restrictions for.",
 
3528
        //       "location": "query",
 
3529
        //       "required": true,
 
3530
        //       "type": "string"
 
3531
        //     }
 
3532
        //   },
 
3533
        //   "path": "myconfig/requestAccess",
 
3534
        //   "response": {
 
3535
        //     "$ref": "RequestAccess"
 
3536
        //   },
 
3537
        //   "scopes": [
 
3538
        //     "https://www.googleapis.com/auth/books"
 
3539
        //   ]
 
3540
        // }
 
3541
 
 
3542
}
 
3543
 
 
3544
// method id "books.myconfig.syncVolumeLicenses":
 
3545
 
 
3546
type MyconfigSyncVolumeLicensesCall struct {
 
3547
        s       *Service
 
3548
        source  string
 
3549
        nonce   string
 
3550
        cpksver string
 
3551
        opt_    map[string]interface{}
 
3552
}
 
3553
 
 
3554
// SyncVolumeLicenses: Request downloaded content access for specified
 
3555
// volumes on the My eBooks shelf.
 
3556
func (r *MyconfigService) SyncVolumeLicenses(source string, nonce string, cpksver string) *MyconfigSyncVolumeLicensesCall {
 
3557
        c := &MyconfigSyncVolumeLicensesCall{s: r.s, opt_: make(map[string]interface{})}
 
3558
        c.source = source
 
3559
        c.nonce = nonce
 
3560
        c.cpksver = cpksver
 
3561
        return c
 
3562
}
 
3563
 
 
3564
// Features sets the optional parameter "features": List of features
 
3565
// supported by the client, i.e., 'RENTALS'
 
3566
func (c *MyconfigSyncVolumeLicensesCall) Features(features string) *MyconfigSyncVolumeLicensesCall {
 
3567
        c.opt_["features"] = features
 
3568
        return c
 
3569
}
 
3570
 
 
3571
// Locale sets the optional parameter "locale": ISO-639-1, ISO-3166-1
 
3572
// codes for message localization, i.e. en_US.
 
3573
func (c *MyconfigSyncVolumeLicensesCall) Locale(locale string) *MyconfigSyncVolumeLicensesCall {
 
3574
        c.opt_["locale"] = locale
 
3575
        return c
 
3576
}
 
3577
 
 
3578
// ShowPreorders sets the optional parameter "showPreorders": Set to
 
3579
// true to show pre-ordered books. Defaults to false.
 
3580
func (c *MyconfigSyncVolumeLicensesCall) ShowPreorders(showPreorders bool) *MyconfigSyncVolumeLicensesCall {
 
3581
        c.opt_["showPreorders"] = showPreorders
 
3582
        return c
 
3583
}
 
3584
 
 
3585
// VolumeIds sets the optional parameter "volumeIds": The volume(s) to
 
3586
// request download restrictions for.
 
3587
func (c *MyconfigSyncVolumeLicensesCall) VolumeIds(volumeIds string) *MyconfigSyncVolumeLicensesCall {
 
3588
        c.opt_["volumeIds"] = volumeIds
 
3589
        return c
 
3590
}
 
3591
 
 
3592
// Fields allows partial responses to be retrieved.
 
3593
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3594
// for more information.
 
3595
func (c *MyconfigSyncVolumeLicensesCall) Fields(s ...googleapi.Field) *MyconfigSyncVolumeLicensesCall {
 
3596
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3597
        return c
 
3598
}
 
3599
 
 
3600
func (c *MyconfigSyncVolumeLicensesCall) Do() (*Volumes, error) {
 
3601
        var body io.Reader = nil
 
3602
        params := make(url.Values)
 
3603
        params.Set("alt", "json")
 
3604
        params.Set("cpksver", fmt.Sprintf("%v", c.cpksver))
 
3605
        params.Set("nonce", fmt.Sprintf("%v", c.nonce))
 
3606
        params.Set("source", fmt.Sprintf("%v", c.source))
 
3607
        if v, ok := c.opt_["features"]; ok {
 
3608
                params.Set("features", fmt.Sprintf("%v", v))
 
3609
        }
 
3610
        if v, ok := c.opt_["locale"]; ok {
 
3611
                params.Set("locale", fmt.Sprintf("%v", v))
 
3612
        }
 
3613
        if v, ok := c.opt_["showPreorders"]; ok {
 
3614
                params.Set("showPreorders", fmt.Sprintf("%v", v))
 
3615
        }
 
3616
        if v, ok := c.opt_["volumeIds"]; ok {
 
3617
                params.Set("volumeIds", fmt.Sprintf("%v", v))
 
3618
        }
 
3619
        if v, ok := c.opt_["fields"]; ok {
 
3620
                params.Set("fields", fmt.Sprintf("%v", v))
 
3621
        }
 
3622
        urls := googleapi.ResolveRelative(c.s.BasePath, "myconfig/syncVolumeLicenses")
 
3623
        urls += "?" + params.Encode()
 
3624
        req, _ := http.NewRequest("POST", urls, body)
 
3625
        googleapi.SetOpaque(req.URL)
 
3626
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3627
        res, err := c.s.client.Do(req)
 
3628
        if err != nil {
 
3629
                return nil, err
 
3630
        }
 
3631
        defer googleapi.CloseBody(res)
 
3632
        if err := googleapi.CheckResponse(res); err != nil {
 
3633
                return nil, err
 
3634
        }
 
3635
        var ret *Volumes
 
3636
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
3637
                return nil, err
 
3638
        }
 
3639
        return ret, nil
 
3640
        // {
 
3641
        //   "description": "Request downloaded content access for specified volumes on the My eBooks shelf.",
 
3642
        //   "httpMethod": "POST",
 
3643
        //   "id": "books.myconfig.syncVolumeLicenses",
 
3644
        //   "parameterOrder": [
 
3645
        //     "source",
 
3646
        //     "nonce",
 
3647
        //     "cpksver"
 
3648
        //   ],
 
3649
        //   "parameters": {
 
3650
        //     "cpksver": {
 
3651
        //       "description": "The device/version ID from which to release the restriction.",
 
3652
        //       "location": "query",
 
3653
        //       "required": true,
 
3654
        //       "type": "string"
 
3655
        //     },
 
3656
        //     "features": {
 
3657
        //       "description": "List of features supported by the client, i.e., 'RENTALS'",
 
3658
        //       "enum": [
 
3659
        //         "RENTALS"
 
3660
        //       ],
 
3661
        //       "enumDescriptions": [
 
3662
        //         "Client supports rentals."
 
3663
        //       ],
 
3664
        //       "location": "query",
 
3665
        //       "repeated": true,
 
3666
        //       "type": "string"
 
3667
        //     },
 
3668
        //     "locale": {
 
3669
        //       "description": "ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.",
 
3670
        //       "location": "query",
 
3671
        //       "type": "string"
 
3672
        //     },
 
3673
        //     "nonce": {
 
3674
        //       "description": "The client nonce value.",
 
3675
        //       "location": "query",
 
3676
        //       "required": true,
 
3677
        //       "type": "string"
 
3678
        //     },
 
3679
        //     "showPreorders": {
 
3680
        //       "description": "Set to true to show pre-ordered books. Defaults to false.",
 
3681
        //       "location": "query",
 
3682
        //       "type": "boolean"
 
3683
        //     },
 
3684
        //     "source": {
 
3685
        //       "description": "String to identify the originator of this request.",
 
3686
        //       "location": "query",
 
3687
        //       "required": true,
 
3688
        //       "type": "string"
 
3689
        //     },
 
3690
        //     "volumeIds": {
 
3691
        //       "description": "The volume(s) to request download restrictions for.",
 
3692
        //       "location": "query",
 
3693
        //       "repeated": true,
 
3694
        //       "type": "string"
 
3695
        //     }
 
3696
        //   },
 
3697
        //   "path": "myconfig/syncVolumeLicenses",
 
3698
        //   "response": {
 
3699
        //     "$ref": "Volumes"
 
3700
        //   },
 
3701
        //   "scopes": [
 
3702
        //     "https://www.googleapis.com/auth/books"
 
3703
        //   ]
 
3704
        // }
 
3705
 
 
3706
}
 
3707
 
 
3708
// method id "books.mylibrary.annotations.delete":
 
3709
 
 
3710
type MylibraryAnnotationsDeleteCall struct {
 
3711
        s            *Service
 
3712
        annotationId string
 
3713
        opt_         map[string]interface{}
 
3714
}
 
3715
 
 
3716
// Delete: Deletes an annotation.
 
3717
func (r *MylibraryAnnotationsService) Delete(annotationId string) *MylibraryAnnotationsDeleteCall {
 
3718
        c := &MylibraryAnnotationsDeleteCall{s: r.s, opt_: make(map[string]interface{})}
 
3719
        c.annotationId = annotationId
 
3720
        return c
 
3721
}
 
3722
 
 
3723
// Source sets the optional parameter "source": String to identify the
 
3724
// originator of this request.
 
3725
func (c *MylibraryAnnotationsDeleteCall) Source(source string) *MylibraryAnnotationsDeleteCall {
 
3726
        c.opt_["source"] = source
 
3727
        return c
 
3728
}
 
3729
 
 
3730
// Fields allows partial responses to be retrieved.
 
3731
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3732
// for more information.
 
3733
func (c *MylibraryAnnotationsDeleteCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsDeleteCall {
 
3734
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3735
        return c
 
3736
}
 
3737
 
 
3738
func (c *MylibraryAnnotationsDeleteCall) Do() error {
 
3739
        var body io.Reader = nil
 
3740
        params := make(url.Values)
 
3741
        params.Set("alt", "json")
 
3742
        if v, ok := c.opt_["source"]; ok {
 
3743
                params.Set("source", fmt.Sprintf("%v", v))
 
3744
        }
 
3745
        if v, ok := c.opt_["fields"]; ok {
 
3746
                params.Set("fields", fmt.Sprintf("%v", v))
 
3747
        }
 
3748
        urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations/{annotationId}")
 
3749
        urls += "?" + params.Encode()
 
3750
        req, _ := http.NewRequest("DELETE", urls, body)
 
3751
        googleapi.Expand(req.URL, map[string]string{
 
3752
                "annotationId": c.annotationId,
 
3753
        })
 
3754
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3755
        res, err := c.s.client.Do(req)
 
3756
        if err != nil {
 
3757
                return err
 
3758
        }
 
3759
        defer googleapi.CloseBody(res)
 
3760
        if err := googleapi.CheckResponse(res); err != nil {
 
3761
                return err
 
3762
        }
 
3763
        return nil
 
3764
        // {
 
3765
        //   "description": "Deletes an annotation.",
 
3766
        //   "httpMethod": "DELETE",
 
3767
        //   "id": "books.mylibrary.annotations.delete",
 
3768
        //   "parameterOrder": [
 
3769
        //     "annotationId"
 
3770
        //   ],
 
3771
        //   "parameters": {
 
3772
        //     "annotationId": {
 
3773
        //       "description": "The ID for the annotation to delete.",
 
3774
        //       "location": "path",
 
3775
        //       "required": true,
 
3776
        //       "type": "string"
 
3777
        //     },
 
3778
        //     "source": {
 
3779
        //       "description": "String to identify the originator of this request.",
 
3780
        //       "location": "query",
 
3781
        //       "type": "string"
 
3782
        //     }
 
3783
        //   },
 
3784
        //   "path": "mylibrary/annotations/{annotationId}",
 
3785
        //   "scopes": [
 
3786
        //     "https://www.googleapis.com/auth/books"
 
3787
        //   ]
 
3788
        // }
 
3789
 
 
3790
}
 
3791
 
 
3792
// method id "books.mylibrary.annotations.get":
 
3793
 
 
3794
type MylibraryAnnotationsGetCall struct {
 
3795
        s            *Service
 
3796
        annotationId string
 
3797
        opt_         map[string]interface{}
 
3798
}
 
3799
 
 
3800
// Get: Gets an annotation by its ID.
 
3801
func (r *MylibraryAnnotationsService) Get(annotationId string) *MylibraryAnnotationsGetCall {
 
3802
        c := &MylibraryAnnotationsGetCall{s: r.s, opt_: make(map[string]interface{})}
 
3803
        c.annotationId = annotationId
 
3804
        return c
 
3805
}
 
3806
 
 
3807
// Source sets the optional parameter "source": String to identify the
 
3808
// originator of this request.
 
3809
func (c *MylibraryAnnotationsGetCall) Source(source string) *MylibraryAnnotationsGetCall {
 
3810
        c.opt_["source"] = source
 
3811
        return c
 
3812
}
 
3813
 
 
3814
// Fields allows partial responses to be retrieved.
 
3815
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3816
// for more information.
 
3817
func (c *MylibraryAnnotationsGetCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsGetCall {
 
3818
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3819
        return c
 
3820
}
 
3821
 
 
3822
func (c *MylibraryAnnotationsGetCall) Do() (*Annotation, error) {
 
3823
        var body io.Reader = nil
 
3824
        params := make(url.Values)
 
3825
        params.Set("alt", "json")
 
3826
        if v, ok := c.opt_["source"]; ok {
 
3827
                params.Set("source", fmt.Sprintf("%v", v))
 
3828
        }
 
3829
        if v, ok := c.opt_["fields"]; ok {
 
3830
                params.Set("fields", fmt.Sprintf("%v", v))
 
3831
        }
 
3832
        urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations/{annotationId}")
 
3833
        urls += "?" + params.Encode()
 
3834
        req, _ := http.NewRequest("GET", urls, body)
 
3835
        googleapi.Expand(req.URL, map[string]string{
 
3836
                "annotationId": c.annotationId,
 
3837
        })
 
3838
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3839
        res, err := c.s.client.Do(req)
 
3840
        if err != nil {
 
3841
                return nil, err
 
3842
        }
 
3843
        defer googleapi.CloseBody(res)
 
3844
        if err := googleapi.CheckResponse(res); err != nil {
 
3845
                return nil, err
 
3846
        }
 
3847
        var ret *Annotation
 
3848
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
3849
                return nil, err
 
3850
        }
 
3851
        return ret, nil
 
3852
        // {
 
3853
        //   "description": "Gets an annotation by its ID.",
 
3854
        //   "httpMethod": "GET",
 
3855
        //   "id": "books.mylibrary.annotations.get",
 
3856
        //   "parameterOrder": [
 
3857
        //     "annotationId"
 
3858
        //   ],
 
3859
        //   "parameters": {
 
3860
        //     "annotationId": {
 
3861
        //       "description": "The ID for the annotation to retrieve.",
 
3862
        //       "location": "path",
 
3863
        //       "required": true,
 
3864
        //       "type": "string"
 
3865
        //     },
 
3866
        //     "source": {
 
3867
        //       "description": "String to identify the originator of this request.",
 
3868
        //       "location": "query",
 
3869
        //       "type": "string"
 
3870
        //     }
 
3871
        //   },
 
3872
        //   "path": "mylibrary/annotations/{annotationId}",
 
3873
        //   "response": {
 
3874
        //     "$ref": "Annotation"
 
3875
        //   },
 
3876
        //   "scopes": [
 
3877
        //     "https://www.googleapis.com/auth/books"
 
3878
        //   ]
 
3879
        // }
 
3880
 
 
3881
}
 
3882
 
 
3883
// method id "books.mylibrary.annotations.insert":
 
3884
 
 
3885
type MylibraryAnnotationsInsertCall struct {
 
3886
        s          *Service
 
3887
        annotation *Annotation
 
3888
        opt_       map[string]interface{}
 
3889
}
 
3890
 
 
3891
// Insert: Inserts a new annotation.
 
3892
func (r *MylibraryAnnotationsService) Insert(annotation *Annotation) *MylibraryAnnotationsInsertCall {
 
3893
        c := &MylibraryAnnotationsInsertCall{s: r.s, opt_: make(map[string]interface{})}
 
3894
        c.annotation = annotation
 
3895
        return c
 
3896
}
 
3897
 
 
3898
// ShowOnlySummaryInResponse sets the optional parameter
 
3899
// "showOnlySummaryInResponse": Requests that only the summary of the
 
3900
// specified layer be provided in the response.
 
3901
func (c *MylibraryAnnotationsInsertCall) ShowOnlySummaryInResponse(showOnlySummaryInResponse bool) *MylibraryAnnotationsInsertCall {
 
3902
        c.opt_["showOnlySummaryInResponse"] = showOnlySummaryInResponse
 
3903
        return c
 
3904
}
 
3905
 
 
3906
// Source sets the optional parameter "source": String to identify the
 
3907
// originator of this request.
 
3908
func (c *MylibraryAnnotationsInsertCall) Source(source string) *MylibraryAnnotationsInsertCall {
 
3909
        c.opt_["source"] = source
 
3910
        return c
 
3911
}
 
3912
 
 
3913
// Fields allows partial responses to be retrieved.
 
3914
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
3915
// for more information.
 
3916
func (c *MylibraryAnnotationsInsertCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsInsertCall {
 
3917
        c.opt_["fields"] = googleapi.CombineFields(s)
 
3918
        return c
 
3919
}
 
3920
 
 
3921
func (c *MylibraryAnnotationsInsertCall) Do() (*Annotation, error) {
 
3922
        var body io.Reader = nil
 
3923
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
 
3924
        if err != nil {
 
3925
                return nil, err
 
3926
        }
 
3927
        ctype := "application/json"
 
3928
        params := make(url.Values)
 
3929
        params.Set("alt", "json")
 
3930
        if v, ok := c.opt_["showOnlySummaryInResponse"]; ok {
 
3931
                params.Set("showOnlySummaryInResponse", fmt.Sprintf("%v", v))
 
3932
        }
 
3933
        if v, ok := c.opt_["source"]; ok {
 
3934
                params.Set("source", fmt.Sprintf("%v", v))
 
3935
        }
 
3936
        if v, ok := c.opt_["fields"]; ok {
 
3937
                params.Set("fields", fmt.Sprintf("%v", v))
 
3938
        }
 
3939
        urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations")
 
3940
        urls += "?" + params.Encode()
 
3941
        req, _ := http.NewRequest("POST", urls, body)
 
3942
        googleapi.SetOpaque(req.URL)
 
3943
        req.Header.Set("Content-Type", ctype)
 
3944
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
3945
        res, err := c.s.client.Do(req)
 
3946
        if err != nil {
 
3947
                return nil, err
 
3948
        }
 
3949
        defer googleapi.CloseBody(res)
 
3950
        if err := googleapi.CheckResponse(res); err != nil {
 
3951
                return nil, err
 
3952
        }
 
3953
        var ret *Annotation
 
3954
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
3955
                return nil, err
 
3956
        }
 
3957
        return ret, nil
 
3958
        // {
 
3959
        //   "description": "Inserts a new annotation.",
 
3960
        //   "httpMethod": "POST",
 
3961
        //   "id": "books.mylibrary.annotations.insert",
 
3962
        //   "parameters": {
 
3963
        //     "showOnlySummaryInResponse": {
 
3964
        //       "description": "Requests that only the summary of the specified layer be provided in the response.",
 
3965
        //       "location": "query",
 
3966
        //       "type": "boolean"
 
3967
        //     },
 
3968
        //     "source": {
 
3969
        //       "description": "String to identify the originator of this request.",
 
3970
        //       "location": "query",
 
3971
        //       "type": "string"
 
3972
        //     }
 
3973
        //   },
 
3974
        //   "path": "mylibrary/annotations",
 
3975
        //   "request": {
 
3976
        //     "$ref": "Annotation"
 
3977
        //   },
 
3978
        //   "response": {
 
3979
        //     "$ref": "Annotation"
 
3980
        //   },
 
3981
        //   "scopes": [
 
3982
        //     "https://www.googleapis.com/auth/books"
 
3983
        //   ]
 
3984
        // }
 
3985
 
 
3986
}
 
3987
 
 
3988
// method id "books.mylibrary.annotations.list":
 
3989
 
 
3990
type MylibraryAnnotationsListCall struct {
 
3991
        s    *Service
 
3992
        opt_ map[string]interface{}
 
3993
}
 
3994
 
 
3995
// List: Retrieves a list of annotations, possibly filtered.
 
3996
func (r *MylibraryAnnotationsService) List() *MylibraryAnnotationsListCall {
 
3997
        c := &MylibraryAnnotationsListCall{s: r.s, opt_: make(map[string]interface{})}
 
3998
        return c
 
3999
}
 
4000
 
 
4001
// ContentVersion sets the optional parameter "contentVersion": The
 
4002
// content version for the requested volume.
 
4003
func (c *MylibraryAnnotationsListCall) ContentVersion(contentVersion string) *MylibraryAnnotationsListCall {
 
4004
        c.opt_["contentVersion"] = contentVersion
 
4005
        return c
 
4006
}
 
4007
 
 
4008
// LayerId sets the optional parameter "layerId": The layer ID to limit
 
4009
// annotation by.
 
4010
func (c *MylibraryAnnotationsListCall) LayerId(layerId string) *MylibraryAnnotationsListCall {
 
4011
        c.opt_["layerId"] = layerId
 
4012
        return c
 
4013
}
 
4014
 
 
4015
// LayerIds sets the optional parameter "layerIds": The layer ID(s) to
 
4016
// limit annotation by.
 
4017
func (c *MylibraryAnnotationsListCall) LayerIds(layerIds string) *MylibraryAnnotationsListCall {
 
4018
        c.opt_["layerIds"] = layerIds
 
4019
        return c
 
4020
}
 
4021
 
 
4022
// MaxResults sets the optional parameter "maxResults": Maximum number
 
4023
// of results to return
 
4024
func (c *MylibraryAnnotationsListCall) MaxResults(maxResults int64) *MylibraryAnnotationsListCall {
 
4025
        c.opt_["maxResults"] = maxResults
 
4026
        return c
 
4027
}
 
4028
 
 
4029
// PageIds sets the optional parameter "pageIds": The page ID(s) for the
 
4030
// volume that is being queried.
 
4031
func (c *MylibraryAnnotationsListCall) PageIds(pageIds string) *MylibraryAnnotationsListCall {
 
4032
        c.opt_["pageIds"] = pageIds
 
4033
        return c
 
4034
}
 
4035
 
 
4036
// PageToken sets the optional parameter "pageToken": The value of the
 
4037
// nextToken from the previous page.
 
4038
func (c *MylibraryAnnotationsListCall) PageToken(pageToken string) *MylibraryAnnotationsListCall {
 
4039
        c.opt_["pageToken"] = pageToken
 
4040
        return c
 
4041
}
 
4042
 
 
4043
// ShowDeleted sets the optional parameter "showDeleted": Set to true to
 
4044
// return deleted annotations. updatedMin must be in the request to use
 
4045
// this. Defaults to false.
 
4046
func (c *MylibraryAnnotationsListCall) ShowDeleted(showDeleted bool) *MylibraryAnnotationsListCall {
 
4047
        c.opt_["showDeleted"] = showDeleted
 
4048
        return c
 
4049
}
 
4050
 
 
4051
// Source sets the optional parameter "source": String to identify the
 
4052
// originator of this request.
 
4053
func (c *MylibraryAnnotationsListCall) Source(source string) *MylibraryAnnotationsListCall {
 
4054
        c.opt_["source"] = source
 
4055
        return c
 
4056
}
 
4057
 
 
4058
// UpdatedMax sets the optional parameter "updatedMax": RFC 3339
 
4059
// timestamp to restrict to items updated prior to this timestamp
 
4060
// (exclusive).
 
4061
func (c *MylibraryAnnotationsListCall) UpdatedMax(updatedMax string) *MylibraryAnnotationsListCall {
 
4062
        c.opt_["updatedMax"] = updatedMax
 
4063
        return c
 
4064
}
 
4065
 
 
4066
// UpdatedMin sets the optional parameter "updatedMin": RFC 3339
 
4067
// timestamp to restrict to items updated since this timestamp
 
4068
// (inclusive).
 
4069
func (c *MylibraryAnnotationsListCall) UpdatedMin(updatedMin string) *MylibraryAnnotationsListCall {
 
4070
        c.opt_["updatedMin"] = updatedMin
 
4071
        return c
 
4072
}
 
4073
 
 
4074
// VolumeId sets the optional parameter "volumeId": The volume to
 
4075
// restrict annotations to.
 
4076
func (c *MylibraryAnnotationsListCall) VolumeId(volumeId string) *MylibraryAnnotationsListCall {
 
4077
        c.opt_["volumeId"] = volumeId
 
4078
        return c
 
4079
}
 
4080
 
 
4081
// Fields allows partial responses to be retrieved.
 
4082
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
4083
// for more information.
 
4084
func (c *MylibraryAnnotationsListCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsListCall {
 
4085
        c.opt_["fields"] = googleapi.CombineFields(s)
 
4086
        return c
 
4087
}
 
4088
 
 
4089
func (c *MylibraryAnnotationsListCall) Do() (*Annotations, error) {
 
4090
        var body io.Reader = nil
 
4091
        params := make(url.Values)
 
4092
        params.Set("alt", "json")
 
4093
        if v, ok := c.opt_["contentVersion"]; ok {
 
4094
                params.Set("contentVersion", fmt.Sprintf("%v", v))
 
4095
        }
 
4096
        if v, ok := c.opt_["layerId"]; ok {
 
4097
                params.Set("layerId", fmt.Sprintf("%v", v))
 
4098
        }
 
4099
        if v, ok := c.opt_["layerIds"]; ok {
 
4100
                params.Set("layerIds", fmt.Sprintf("%v", v))
 
4101
        }
 
4102
        if v, ok := c.opt_["maxResults"]; ok {
 
4103
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
4104
        }
 
4105
        if v, ok := c.opt_["pageIds"]; ok {
 
4106
                params.Set("pageIds", fmt.Sprintf("%v", v))
 
4107
        }
 
4108
        if v, ok := c.opt_["pageToken"]; ok {
 
4109
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
4110
        }
 
4111
        if v, ok := c.opt_["showDeleted"]; ok {
 
4112
                params.Set("showDeleted", fmt.Sprintf("%v", v))
 
4113
        }
 
4114
        if v, ok := c.opt_["source"]; ok {
 
4115
                params.Set("source", fmt.Sprintf("%v", v))
 
4116
        }
 
4117
        if v, ok := c.opt_["updatedMax"]; ok {
 
4118
                params.Set("updatedMax", fmt.Sprintf("%v", v))
 
4119
        }
 
4120
        if v, ok := c.opt_["updatedMin"]; ok {
 
4121
                params.Set("updatedMin", fmt.Sprintf("%v", v))
 
4122
        }
 
4123
        if v, ok := c.opt_["volumeId"]; ok {
 
4124
                params.Set("volumeId", fmt.Sprintf("%v", v))
 
4125
        }
 
4126
        if v, ok := c.opt_["fields"]; ok {
 
4127
                params.Set("fields", fmt.Sprintf("%v", v))
 
4128
        }
 
4129
        urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations")
 
4130
        urls += "?" + params.Encode()
 
4131
        req, _ := http.NewRequest("GET", urls, body)
 
4132
        googleapi.SetOpaque(req.URL)
 
4133
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
4134
        res, err := c.s.client.Do(req)
 
4135
        if err != nil {
 
4136
                return nil, err
 
4137
        }
 
4138
        defer googleapi.CloseBody(res)
 
4139
        if err := googleapi.CheckResponse(res); err != nil {
 
4140
                return nil, err
 
4141
        }
 
4142
        var ret *Annotations
 
4143
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
4144
                return nil, err
 
4145
        }
 
4146
        return ret, nil
 
4147
        // {
 
4148
        //   "description": "Retrieves a list of annotations, possibly filtered.",
 
4149
        //   "httpMethod": "GET",
 
4150
        //   "id": "books.mylibrary.annotations.list",
 
4151
        //   "parameters": {
 
4152
        //     "contentVersion": {
 
4153
        //       "description": "The content version for the requested volume.",
 
4154
        //       "location": "query",
 
4155
        //       "type": "string"
 
4156
        //     },
 
4157
        //     "layerId": {
 
4158
        //       "description": "The layer ID to limit annotation by.",
 
4159
        //       "location": "query",
 
4160
        //       "type": "string"
 
4161
        //     },
 
4162
        //     "layerIds": {
 
4163
        //       "description": "The layer ID(s) to limit annotation by.",
 
4164
        //       "location": "query",
 
4165
        //       "repeated": true,
 
4166
        //       "type": "string"
 
4167
        //     },
 
4168
        //     "maxResults": {
 
4169
        //       "description": "Maximum number of results to return",
 
4170
        //       "format": "uint32",
 
4171
        //       "location": "query",
 
4172
        //       "maximum": "40",
 
4173
        //       "minimum": "0",
 
4174
        //       "type": "integer"
 
4175
        //     },
 
4176
        //     "pageIds": {
 
4177
        //       "description": "The page ID(s) for the volume that is being queried.",
 
4178
        //       "location": "query",
 
4179
        //       "repeated": true,
 
4180
        //       "type": "string"
 
4181
        //     },
 
4182
        //     "pageToken": {
 
4183
        //       "description": "The value of the nextToken from the previous page.",
 
4184
        //       "location": "query",
 
4185
        //       "type": "string"
 
4186
        //     },
 
4187
        //     "showDeleted": {
 
4188
        //       "description": "Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false.",
 
4189
        //       "location": "query",
 
4190
        //       "type": "boolean"
 
4191
        //     },
 
4192
        //     "source": {
 
4193
        //       "description": "String to identify the originator of this request.",
 
4194
        //       "location": "query",
 
4195
        //       "type": "string"
 
4196
        //     },
 
4197
        //     "updatedMax": {
 
4198
        //       "description": "RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).",
 
4199
        //       "location": "query",
 
4200
        //       "type": "string"
 
4201
        //     },
 
4202
        //     "updatedMin": {
 
4203
        //       "description": "RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).",
 
4204
        //       "location": "query",
 
4205
        //       "type": "string"
 
4206
        //     },
 
4207
        //     "volumeId": {
 
4208
        //       "description": "The volume to restrict annotations to.",
 
4209
        //       "location": "query",
 
4210
        //       "type": "string"
 
4211
        //     }
 
4212
        //   },
 
4213
        //   "path": "mylibrary/annotations",
 
4214
        //   "response": {
 
4215
        //     "$ref": "Annotations"
 
4216
        //   },
 
4217
        //   "scopes": [
 
4218
        //     "https://www.googleapis.com/auth/books"
 
4219
        //   ]
 
4220
        // }
 
4221
 
 
4222
}
 
4223
 
 
4224
// method id "books.mylibrary.annotations.summary":
 
4225
 
 
4226
type MylibraryAnnotationsSummaryCall struct {
 
4227
        s        *Service
 
4228
        layerIds []string
 
4229
        volumeId string
 
4230
        opt_     map[string]interface{}
 
4231
}
 
4232
 
 
4233
// Summary: Gets the summary of specified layers.
 
4234
func (r *MylibraryAnnotationsService) Summary(layerIds []string, volumeId string) *MylibraryAnnotationsSummaryCall {
 
4235
        c := &MylibraryAnnotationsSummaryCall{s: r.s, opt_: make(map[string]interface{})}
 
4236
        c.layerIds = layerIds
 
4237
        c.volumeId = volumeId
 
4238
        return c
 
4239
}
 
4240
 
 
4241
// Fields allows partial responses to be retrieved.
 
4242
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
4243
// for more information.
 
4244
func (c *MylibraryAnnotationsSummaryCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsSummaryCall {
 
4245
        c.opt_["fields"] = googleapi.CombineFields(s)
 
4246
        return c
 
4247
}
 
4248
 
 
4249
func (c *MylibraryAnnotationsSummaryCall) Do() (*AnnotationsSummary, error) {
 
4250
        var body io.Reader = nil
 
4251
        params := make(url.Values)
 
4252
        params.Set("alt", "json")
 
4253
        params.Set("volumeId", fmt.Sprintf("%v", c.volumeId))
 
4254
        for _, v := range c.layerIds {
 
4255
                params.Add("layerIds", fmt.Sprintf("%v", v))
 
4256
        }
 
4257
        if v, ok := c.opt_["fields"]; ok {
 
4258
                params.Set("fields", fmt.Sprintf("%v", v))
 
4259
        }
 
4260
        urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations/summary")
 
4261
        urls += "?" + params.Encode()
 
4262
        req, _ := http.NewRequest("POST", urls, body)
 
4263
        googleapi.SetOpaque(req.URL)
 
4264
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
4265
        res, err := c.s.client.Do(req)
 
4266
        if err != nil {
 
4267
                return nil, err
 
4268
        }
 
4269
        defer googleapi.CloseBody(res)
 
4270
        if err := googleapi.CheckResponse(res); err != nil {
 
4271
                return nil, err
 
4272
        }
 
4273
        var ret *AnnotationsSummary
 
4274
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
4275
                return nil, err
 
4276
        }
 
4277
        return ret, nil
 
4278
        // {
 
4279
        //   "description": "Gets the summary of specified layers.",
 
4280
        //   "httpMethod": "POST",
 
4281
        //   "id": "books.mylibrary.annotations.summary",
 
4282
        //   "parameterOrder": [
 
4283
        //     "layerIds",
 
4284
        //     "volumeId"
 
4285
        //   ],
 
4286
        //   "parameters": {
 
4287
        //     "layerIds": {
 
4288
        //       "description": "Array of layer IDs to get the summary for.",
 
4289
        //       "location": "query",
 
4290
        //       "repeated": true,
 
4291
        //       "required": true,
 
4292
        //       "type": "string"
 
4293
        //     },
 
4294
        //     "volumeId": {
 
4295
        //       "description": "Volume id to get the summary for.",
 
4296
        //       "location": "query",
 
4297
        //       "required": true,
 
4298
        //       "type": "string"
 
4299
        //     }
 
4300
        //   },
 
4301
        //   "path": "mylibrary/annotations/summary",
 
4302
        //   "response": {
 
4303
        //     "$ref": "AnnotationsSummary"
 
4304
        //   },
 
4305
        //   "scopes": [
 
4306
        //     "https://www.googleapis.com/auth/books"
 
4307
        //   ]
 
4308
        // }
 
4309
 
 
4310
}
 
4311
 
 
4312
// method id "books.mylibrary.annotations.update":
 
4313
 
 
4314
type MylibraryAnnotationsUpdateCall struct {
 
4315
        s            *Service
 
4316
        annotationId string
 
4317
        annotation   *Annotation
 
4318
        opt_         map[string]interface{}
 
4319
}
 
4320
 
 
4321
// Update: Updates an existing annotation.
 
4322
func (r *MylibraryAnnotationsService) Update(annotationId string, annotation *Annotation) *MylibraryAnnotationsUpdateCall {
 
4323
        c := &MylibraryAnnotationsUpdateCall{s: r.s, opt_: make(map[string]interface{})}
 
4324
        c.annotationId = annotationId
 
4325
        c.annotation = annotation
 
4326
        return c
 
4327
}
 
4328
 
 
4329
// Source sets the optional parameter "source": String to identify the
 
4330
// originator of this request.
 
4331
func (c *MylibraryAnnotationsUpdateCall) Source(source string) *MylibraryAnnotationsUpdateCall {
 
4332
        c.opt_["source"] = source
 
4333
        return c
 
4334
}
 
4335
 
 
4336
// Fields allows partial responses to be retrieved.
 
4337
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
4338
// for more information.
 
4339
func (c *MylibraryAnnotationsUpdateCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsUpdateCall {
 
4340
        c.opt_["fields"] = googleapi.CombineFields(s)
 
4341
        return c
 
4342
}
 
4343
 
 
4344
func (c *MylibraryAnnotationsUpdateCall) Do() (*Annotation, error) {
 
4345
        var body io.Reader = nil
 
4346
        body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
 
4347
        if err != nil {
 
4348
                return nil, err
 
4349
        }
 
4350
        ctype := "application/json"
 
4351
        params := make(url.Values)
 
4352
        params.Set("alt", "json")
 
4353
        if v, ok := c.opt_["source"]; ok {
 
4354
                params.Set("source", fmt.Sprintf("%v", v))
 
4355
        }
 
4356
        if v, ok := c.opt_["fields"]; ok {
 
4357
                params.Set("fields", fmt.Sprintf("%v", v))
 
4358
        }
 
4359
        urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations/{annotationId}")
 
4360
        urls += "?" + params.Encode()
 
4361
        req, _ := http.NewRequest("PUT", urls, body)
 
4362
        googleapi.Expand(req.URL, map[string]string{
 
4363
                "annotationId": c.annotationId,
 
4364
        })
 
4365
        req.Header.Set("Content-Type", ctype)
 
4366
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
4367
        res, err := c.s.client.Do(req)
 
4368
        if err != nil {
 
4369
                return nil, err
 
4370
        }
 
4371
        defer googleapi.CloseBody(res)
 
4372
        if err := googleapi.CheckResponse(res); err != nil {
 
4373
                return nil, err
 
4374
        }
 
4375
        var ret *Annotation
 
4376
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
4377
                return nil, err
 
4378
        }
 
4379
        return ret, nil
 
4380
        // {
 
4381
        //   "description": "Updates an existing annotation.",
 
4382
        //   "httpMethod": "PUT",
 
4383
        //   "id": "books.mylibrary.annotations.update",
 
4384
        //   "parameterOrder": [
 
4385
        //     "annotationId"
 
4386
        //   ],
 
4387
        //   "parameters": {
 
4388
        //     "annotationId": {
 
4389
        //       "description": "The ID for the annotation to update.",
 
4390
        //       "location": "path",
 
4391
        //       "required": true,
 
4392
        //       "type": "string"
 
4393
        //     },
 
4394
        //     "source": {
 
4395
        //       "description": "String to identify the originator of this request.",
 
4396
        //       "location": "query",
 
4397
        //       "type": "string"
 
4398
        //     }
 
4399
        //   },
 
4400
        //   "path": "mylibrary/annotations/{annotationId}",
 
4401
        //   "request": {
 
4402
        //     "$ref": "Annotation"
 
4403
        //   },
 
4404
        //   "response": {
 
4405
        //     "$ref": "Annotation"
 
4406
        //   },
 
4407
        //   "scopes": [
 
4408
        //     "https://www.googleapis.com/auth/books"
 
4409
        //   ]
 
4410
        // }
 
4411
 
 
4412
}
 
4413
 
 
4414
// method id "books.mylibrary.bookshelves.addVolume":
 
4415
 
 
4416
type MylibraryBookshelvesAddVolumeCall struct {
 
4417
        s        *Service
 
4418
        shelf    string
 
4419
        volumeId string
 
4420
        opt_     map[string]interface{}
 
4421
}
 
4422
 
 
4423
// AddVolume: Adds a volume to a bookshelf.
 
4424
func (r *MylibraryBookshelvesService) AddVolume(shelf string, volumeId string) *MylibraryBookshelvesAddVolumeCall {
 
4425
        c := &MylibraryBookshelvesAddVolumeCall{s: r.s, opt_: make(map[string]interface{})}
 
4426
        c.shelf = shelf
 
4427
        c.volumeId = volumeId
 
4428
        return c
 
4429
}
 
4430
 
 
4431
// Source sets the optional parameter "source": String to identify the
 
4432
// originator of this request.
 
4433
func (c *MylibraryBookshelvesAddVolumeCall) Source(source string) *MylibraryBookshelvesAddVolumeCall {
 
4434
        c.opt_["source"] = source
 
4435
        return c
 
4436
}
 
4437
 
 
4438
// Fields allows partial responses to be retrieved.
 
4439
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
4440
// for more information.
 
4441
func (c *MylibraryBookshelvesAddVolumeCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesAddVolumeCall {
 
4442
        c.opt_["fields"] = googleapi.CombineFields(s)
 
4443
        return c
 
4444
}
 
4445
 
 
4446
func (c *MylibraryBookshelvesAddVolumeCall) Do() error {
 
4447
        var body io.Reader = nil
 
4448
        params := make(url.Values)
 
4449
        params.Set("alt", "json")
 
4450
        params.Set("volumeId", fmt.Sprintf("%v", c.volumeId))
 
4451
        if v, ok := c.opt_["source"]; ok {
 
4452
                params.Set("source", fmt.Sprintf("%v", v))
 
4453
        }
 
4454
        if v, ok := c.opt_["fields"]; ok {
 
4455
                params.Set("fields", fmt.Sprintf("%v", v))
 
4456
        }
 
4457
        urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/addVolume")
 
4458
        urls += "?" + params.Encode()
 
4459
        req, _ := http.NewRequest("POST", urls, body)
 
4460
        googleapi.Expand(req.URL, map[string]string{
 
4461
                "shelf": c.shelf,
 
4462
        })
 
4463
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
4464
        res, err := c.s.client.Do(req)
 
4465
        if err != nil {
 
4466
                return err
 
4467
        }
 
4468
        defer googleapi.CloseBody(res)
 
4469
        if err := googleapi.CheckResponse(res); err != nil {
 
4470
                return err
 
4471
        }
 
4472
        return nil
 
4473
        // {
 
4474
        //   "description": "Adds a volume to a bookshelf.",
 
4475
        //   "httpMethod": "POST",
 
4476
        //   "id": "books.mylibrary.bookshelves.addVolume",
 
4477
        //   "parameterOrder": [
 
4478
        //     "shelf",
 
4479
        //     "volumeId"
 
4480
        //   ],
 
4481
        //   "parameters": {
 
4482
        //     "shelf": {
 
4483
        //       "description": "ID of bookshelf to which to add a volume.",
 
4484
        //       "location": "path",
 
4485
        //       "required": true,
 
4486
        //       "type": "string"
 
4487
        //     },
 
4488
        //     "source": {
 
4489
        //       "description": "String to identify the originator of this request.",
 
4490
        //       "location": "query",
 
4491
        //       "type": "string"
 
4492
        //     },
 
4493
        //     "volumeId": {
 
4494
        //       "description": "ID of volume to add.",
 
4495
        //       "location": "query",
 
4496
        //       "required": true,
 
4497
        //       "type": "string"
 
4498
        //     }
 
4499
        //   },
 
4500
        //   "path": "mylibrary/bookshelves/{shelf}/addVolume",
 
4501
        //   "scopes": [
 
4502
        //     "https://www.googleapis.com/auth/books"
 
4503
        //   ]
 
4504
        // }
 
4505
 
 
4506
}
 
4507
 
 
4508
// method id "books.mylibrary.bookshelves.clearVolumes":
 
4509
 
 
4510
type MylibraryBookshelvesClearVolumesCall struct {
 
4511
        s     *Service
 
4512
        shelf string
 
4513
        opt_  map[string]interface{}
 
4514
}
 
4515
 
 
4516
// ClearVolumes: Clears all volumes from a bookshelf.
 
4517
func (r *MylibraryBookshelvesService) ClearVolumes(shelf string) *MylibraryBookshelvesClearVolumesCall {
 
4518
        c := &MylibraryBookshelvesClearVolumesCall{s: r.s, opt_: make(map[string]interface{})}
 
4519
        c.shelf = shelf
 
4520
        return c
 
4521
}
 
4522
 
 
4523
// Source sets the optional parameter "source": String to identify the
 
4524
// originator of this request.
 
4525
func (c *MylibraryBookshelvesClearVolumesCall) Source(source string) *MylibraryBookshelvesClearVolumesCall {
 
4526
        c.opt_["source"] = source
 
4527
        return c
 
4528
}
 
4529
 
 
4530
// Fields allows partial responses to be retrieved.
 
4531
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
4532
// for more information.
 
4533
func (c *MylibraryBookshelvesClearVolumesCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesClearVolumesCall {
 
4534
        c.opt_["fields"] = googleapi.CombineFields(s)
 
4535
        return c
 
4536
}
 
4537
 
 
4538
func (c *MylibraryBookshelvesClearVolumesCall) Do() error {
 
4539
        var body io.Reader = nil
 
4540
        params := make(url.Values)
 
4541
        params.Set("alt", "json")
 
4542
        if v, ok := c.opt_["source"]; ok {
 
4543
                params.Set("source", fmt.Sprintf("%v", v))
 
4544
        }
 
4545
        if v, ok := c.opt_["fields"]; ok {
 
4546
                params.Set("fields", fmt.Sprintf("%v", v))
 
4547
        }
 
4548
        urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/clearVolumes")
 
4549
        urls += "?" + params.Encode()
 
4550
        req, _ := http.NewRequest("POST", urls, body)
 
4551
        googleapi.Expand(req.URL, map[string]string{
 
4552
                "shelf": c.shelf,
 
4553
        })
 
4554
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
4555
        res, err := c.s.client.Do(req)
 
4556
        if err != nil {
 
4557
                return err
 
4558
        }
 
4559
        defer googleapi.CloseBody(res)
 
4560
        if err := googleapi.CheckResponse(res); err != nil {
 
4561
                return err
 
4562
        }
 
4563
        return nil
 
4564
        // {
 
4565
        //   "description": "Clears all volumes from a bookshelf.",
 
4566
        //   "httpMethod": "POST",
 
4567
        //   "id": "books.mylibrary.bookshelves.clearVolumes",
 
4568
        //   "parameterOrder": [
 
4569
        //     "shelf"
 
4570
        //   ],
 
4571
        //   "parameters": {
 
4572
        //     "shelf": {
 
4573
        //       "description": "ID of bookshelf from which to remove a volume.",
 
4574
        //       "location": "path",
 
4575
        //       "required": true,
 
4576
        //       "type": "string"
 
4577
        //     },
 
4578
        //     "source": {
 
4579
        //       "description": "String to identify the originator of this request.",
 
4580
        //       "location": "query",
 
4581
        //       "type": "string"
 
4582
        //     }
 
4583
        //   },
 
4584
        //   "path": "mylibrary/bookshelves/{shelf}/clearVolumes",
 
4585
        //   "scopes": [
 
4586
        //     "https://www.googleapis.com/auth/books"
 
4587
        //   ]
 
4588
        // }
 
4589
 
 
4590
}
 
4591
 
 
4592
// method id "books.mylibrary.bookshelves.get":
 
4593
 
 
4594
type MylibraryBookshelvesGetCall struct {
 
4595
        s     *Service
 
4596
        shelf string
 
4597
        opt_  map[string]interface{}
 
4598
}
 
4599
 
 
4600
// Get: Retrieves metadata for a specific bookshelf belonging to the
 
4601
// authenticated user.
 
4602
func (r *MylibraryBookshelvesService) Get(shelf string) *MylibraryBookshelvesGetCall {
 
4603
        c := &MylibraryBookshelvesGetCall{s: r.s, opt_: make(map[string]interface{})}
 
4604
        c.shelf = shelf
 
4605
        return c
 
4606
}
 
4607
 
 
4608
// Source sets the optional parameter "source": String to identify the
 
4609
// originator of this request.
 
4610
func (c *MylibraryBookshelvesGetCall) Source(source string) *MylibraryBookshelvesGetCall {
 
4611
        c.opt_["source"] = source
 
4612
        return c
 
4613
}
 
4614
 
 
4615
// Fields allows partial responses to be retrieved.
 
4616
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
4617
// for more information.
 
4618
func (c *MylibraryBookshelvesGetCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesGetCall {
 
4619
        c.opt_["fields"] = googleapi.CombineFields(s)
 
4620
        return c
 
4621
}
 
4622
 
 
4623
func (c *MylibraryBookshelvesGetCall) Do() (*Bookshelf, error) {
 
4624
        var body io.Reader = nil
 
4625
        params := make(url.Values)
 
4626
        params.Set("alt", "json")
 
4627
        if v, ok := c.opt_["source"]; ok {
 
4628
                params.Set("source", fmt.Sprintf("%v", v))
 
4629
        }
 
4630
        if v, ok := c.opt_["fields"]; ok {
 
4631
                params.Set("fields", fmt.Sprintf("%v", v))
 
4632
        }
 
4633
        urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}")
 
4634
        urls += "?" + params.Encode()
 
4635
        req, _ := http.NewRequest("GET", urls, body)
 
4636
        googleapi.Expand(req.URL, map[string]string{
 
4637
                "shelf": c.shelf,
 
4638
        })
 
4639
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
4640
        res, err := c.s.client.Do(req)
 
4641
        if err != nil {
 
4642
                return nil, err
 
4643
        }
 
4644
        defer googleapi.CloseBody(res)
 
4645
        if err := googleapi.CheckResponse(res); err != nil {
 
4646
                return nil, err
 
4647
        }
 
4648
        var ret *Bookshelf
 
4649
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
4650
                return nil, err
 
4651
        }
 
4652
        return ret, nil
 
4653
        // {
 
4654
        //   "description": "Retrieves metadata for a specific bookshelf belonging to the authenticated user.",
 
4655
        //   "httpMethod": "GET",
 
4656
        //   "id": "books.mylibrary.bookshelves.get",
 
4657
        //   "parameterOrder": [
 
4658
        //     "shelf"
 
4659
        //   ],
 
4660
        //   "parameters": {
 
4661
        //     "shelf": {
 
4662
        //       "description": "ID of bookshelf to retrieve.",
 
4663
        //       "location": "path",
 
4664
        //       "required": true,
 
4665
        //       "type": "string"
 
4666
        //     },
 
4667
        //     "source": {
 
4668
        //       "description": "String to identify the originator of this request.",
 
4669
        //       "location": "query",
 
4670
        //       "type": "string"
 
4671
        //     }
 
4672
        //   },
 
4673
        //   "path": "mylibrary/bookshelves/{shelf}",
 
4674
        //   "response": {
 
4675
        //     "$ref": "Bookshelf"
 
4676
        //   },
 
4677
        //   "scopes": [
 
4678
        //     "https://www.googleapis.com/auth/books"
 
4679
        //   ]
 
4680
        // }
 
4681
 
 
4682
}
 
4683
 
 
4684
// method id "books.mylibrary.bookshelves.list":
 
4685
 
 
4686
type MylibraryBookshelvesListCall struct {
 
4687
        s    *Service
 
4688
        opt_ map[string]interface{}
 
4689
}
 
4690
 
 
4691
// List: Retrieves a list of bookshelves belonging to the authenticated
 
4692
// user.
 
4693
func (r *MylibraryBookshelvesService) List() *MylibraryBookshelvesListCall {
 
4694
        c := &MylibraryBookshelvesListCall{s: r.s, opt_: make(map[string]interface{})}
 
4695
        return c
 
4696
}
 
4697
 
 
4698
// Source sets the optional parameter "source": String to identify the
 
4699
// originator of this request.
 
4700
func (c *MylibraryBookshelvesListCall) Source(source string) *MylibraryBookshelvesListCall {
 
4701
        c.opt_["source"] = source
 
4702
        return c
 
4703
}
 
4704
 
 
4705
// Fields allows partial responses to be retrieved.
 
4706
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
4707
// for more information.
 
4708
func (c *MylibraryBookshelvesListCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesListCall {
 
4709
        c.opt_["fields"] = googleapi.CombineFields(s)
 
4710
        return c
 
4711
}
 
4712
 
 
4713
func (c *MylibraryBookshelvesListCall) Do() (*Bookshelves, error) {
 
4714
        var body io.Reader = nil
 
4715
        params := make(url.Values)
 
4716
        params.Set("alt", "json")
 
4717
        if v, ok := c.opt_["source"]; ok {
 
4718
                params.Set("source", fmt.Sprintf("%v", v))
 
4719
        }
 
4720
        if v, ok := c.opt_["fields"]; ok {
 
4721
                params.Set("fields", fmt.Sprintf("%v", v))
 
4722
        }
 
4723
        urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves")
 
4724
        urls += "?" + params.Encode()
 
4725
        req, _ := http.NewRequest("GET", urls, body)
 
4726
        googleapi.SetOpaque(req.URL)
 
4727
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
4728
        res, err := c.s.client.Do(req)
 
4729
        if err != nil {
 
4730
                return nil, err
 
4731
        }
 
4732
        defer googleapi.CloseBody(res)
 
4733
        if err := googleapi.CheckResponse(res); err != nil {
 
4734
                return nil, err
 
4735
        }
 
4736
        var ret *Bookshelves
 
4737
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
4738
                return nil, err
 
4739
        }
 
4740
        return ret, nil
 
4741
        // {
 
4742
        //   "description": "Retrieves a list of bookshelves belonging to the authenticated user.",
 
4743
        //   "httpMethod": "GET",
 
4744
        //   "id": "books.mylibrary.bookshelves.list",
 
4745
        //   "parameters": {
 
4746
        //     "source": {
 
4747
        //       "description": "String to identify the originator of this request.",
 
4748
        //       "location": "query",
 
4749
        //       "type": "string"
 
4750
        //     }
 
4751
        //   },
 
4752
        //   "path": "mylibrary/bookshelves",
 
4753
        //   "response": {
 
4754
        //     "$ref": "Bookshelves"
 
4755
        //   },
 
4756
        //   "scopes": [
 
4757
        //     "https://www.googleapis.com/auth/books"
 
4758
        //   ]
 
4759
        // }
 
4760
 
 
4761
}
 
4762
 
 
4763
// method id "books.mylibrary.bookshelves.moveVolume":
 
4764
 
 
4765
type MylibraryBookshelvesMoveVolumeCall struct {
 
4766
        s              *Service
 
4767
        shelf          string
 
4768
        volumeId       string
 
4769
        volumePosition int64
 
4770
        opt_           map[string]interface{}
 
4771
}
 
4772
 
 
4773
// MoveVolume: Moves a volume within a bookshelf.
 
4774
func (r *MylibraryBookshelvesService) MoveVolume(shelf string, volumeId string, volumePosition int64) *MylibraryBookshelvesMoveVolumeCall {
 
4775
        c := &MylibraryBookshelvesMoveVolumeCall{s: r.s, opt_: make(map[string]interface{})}
 
4776
        c.shelf = shelf
 
4777
        c.volumeId = volumeId
 
4778
        c.volumePosition = volumePosition
 
4779
        return c
 
4780
}
 
4781
 
 
4782
// Source sets the optional parameter "source": String to identify the
 
4783
// originator of this request.
 
4784
func (c *MylibraryBookshelvesMoveVolumeCall) Source(source string) *MylibraryBookshelvesMoveVolumeCall {
 
4785
        c.opt_["source"] = source
 
4786
        return c
 
4787
}
 
4788
 
 
4789
// Fields allows partial responses to be retrieved.
 
4790
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
4791
// for more information.
 
4792
func (c *MylibraryBookshelvesMoveVolumeCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesMoveVolumeCall {
 
4793
        c.opt_["fields"] = googleapi.CombineFields(s)
 
4794
        return c
 
4795
}
 
4796
 
 
4797
func (c *MylibraryBookshelvesMoveVolumeCall) Do() error {
 
4798
        var body io.Reader = nil
 
4799
        params := make(url.Values)
 
4800
        params.Set("alt", "json")
 
4801
        params.Set("volumeId", fmt.Sprintf("%v", c.volumeId))
 
4802
        params.Set("volumePosition", fmt.Sprintf("%v", c.volumePosition))
 
4803
        if v, ok := c.opt_["source"]; ok {
 
4804
                params.Set("source", fmt.Sprintf("%v", v))
 
4805
        }
 
4806
        if v, ok := c.opt_["fields"]; ok {
 
4807
                params.Set("fields", fmt.Sprintf("%v", v))
 
4808
        }
 
4809
        urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/moveVolume")
 
4810
        urls += "?" + params.Encode()
 
4811
        req, _ := http.NewRequest("POST", urls, body)
 
4812
        googleapi.Expand(req.URL, map[string]string{
 
4813
                "shelf": c.shelf,
 
4814
        })
 
4815
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
4816
        res, err := c.s.client.Do(req)
 
4817
        if err != nil {
 
4818
                return err
 
4819
        }
 
4820
        defer googleapi.CloseBody(res)
 
4821
        if err := googleapi.CheckResponse(res); err != nil {
 
4822
                return err
 
4823
        }
 
4824
        return nil
 
4825
        // {
 
4826
        //   "description": "Moves a volume within a bookshelf.",
 
4827
        //   "httpMethod": "POST",
 
4828
        //   "id": "books.mylibrary.bookshelves.moveVolume",
 
4829
        //   "parameterOrder": [
 
4830
        //     "shelf",
 
4831
        //     "volumeId",
 
4832
        //     "volumePosition"
 
4833
        //   ],
 
4834
        //   "parameters": {
 
4835
        //     "shelf": {
 
4836
        //       "description": "ID of bookshelf with the volume.",
 
4837
        //       "location": "path",
 
4838
        //       "required": true,
 
4839
        //       "type": "string"
 
4840
        //     },
 
4841
        //     "source": {
 
4842
        //       "description": "String to identify the originator of this request.",
 
4843
        //       "location": "query",
 
4844
        //       "type": "string"
 
4845
        //     },
 
4846
        //     "volumeId": {
 
4847
        //       "description": "ID of volume to move.",
 
4848
        //       "location": "query",
 
4849
        //       "required": true,
 
4850
        //       "type": "string"
 
4851
        //     },
 
4852
        //     "volumePosition": {
 
4853
        //       "description": "Position on shelf to move the item (0 puts the item before the current first item, 1 puts it between the first and the second and so on.)",
 
4854
        //       "format": "int32",
 
4855
        //       "location": "query",
 
4856
        //       "required": true,
 
4857
        //       "type": "integer"
 
4858
        //     }
 
4859
        //   },
 
4860
        //   "path": "mylibrary/bookshelves/{shelf}/moveVolume",
 
4861
        //   "scopes": [
 
4862
        //     "https://www.googleapis.com/auth/books"
 
4863
        //   ]
 
4864
        // }
 
4865
 
 
4866
}
 
4867
 
 
4868
// method id "books.mylibrary.bookshelves.removeVolume":
 
4869
 
 
4870
type MylibraryBookshelvesRemoveVolumeCall struct {
 
4871
        s        *Service
 
4872
        shelf    string
 
4873
        volumeId string
 
4874
        opt_     map[string]interface{}
 
4875
}
 
4876
 
 
4877
// RemoveVolume: Removes a volume from a bookshelf.
 
4878
func (r *MylibraryBookshelvesService) RemoveVolume(shelf string, volumeId string) *MylibraryBookshelvesRemoveVolumeCall {
 
4879
        c := &MylibraryBookshelvesRemoveVolumeCall{s: r.s, opt_: make(map[string]interface{})}
 
4880
        c.shelf = shelf
 
4881
        c.volumeId = volumeId
 
4882
        return c
 
4883
}
 
4884
 
 
4885
// Source sets the optional parameter "source": String to identify the
 
4886
// originator of this request.
 
4887
func (c *MylibraryBookshelvesRemoveVolumeCall) Source(source string) *MylibraryBookshelvesRemoveVolumeCall {
 
4888
        c.opt_["source"] = source
 
4889
        return c
 
4890
}
 
4891
 
 
4892
// Fields allows partial responses to be retrieved.
 
4893
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
4894
// for more information.
 
4895
func (c *MylibraryBookshelvesRemoveVolumeCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesRemoveVolumeCall {
 
4896
        c.opt_["fields"] = googleapi.CombineFields(s)
 
4897
        return c
 
4898
}
 
4899
 
 
4900
func (c *MylibraryBookshelvesRemoveVolumeCall) Do() error {
 
4901
        var body io.Reader = nil
 
4902
        params := make(url.Values)
 
4903
        params.Set("alt", "json")
 
4904
        params.Set("volumeId", fmt.Sprintf("%v", c.volumeId))
 
4905
        if v, ok := c.opt_["source"]; ok {
 
4906
                params.Set("source", fmt.Sprintf("%v", v))
 
4907
        }
 
4908
        if v, ok := c.opt_["fields"]; ok {
 
4909
                params.Set("fields", fmt.Sprintf("%v", v))
 
4910
        }
 
4911
        urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/removeVolume")
 
4912
        urls += "?" + params.Encode()
 
4913
        req, _ := http.NewRequest("POST", urls, body)
 
4914
        googleapi.Expand(req.URL, map[string]string{
 
4915
                "shelf": c.shelf,
 
4916
        })
 
4917
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
4918
        res, err := c.s.client.Do(req)
 
4919
        if err != nil {
 
4920
                return err
 
4921
        }
 
4922
        defer googleapi.CloseBody(res)
 
4923
        if err := googleapi.CheckResponse(res); err != nil {
 
4924
                return err
 
4925
        }
 
4926
        return nil
 
4927
        // {
 
4928
        //   "description": "Removes a volume from a bookshelf.",
 
4929
        //   "httpMethod": "POST",
 
4930
        //   "id": "books.mylibrary.bookshelves.removeVolume",
 
4931
        //   "parameterOrder": [
 
4932
        //     "shelf",
 
4933
        //     "volumeId"
 
4934
        //   ],
 
4935
        //   "parameters": {
 
4936
        //     "shelf": {
 
4937
        //       "description": "ID of bookshelf from which to remove a volume.",
 
4938
        //       "location": "path",
 
4939
        //       "required": true,
 
4940
        //       "type": "string"
 
4941
        //     },
 
4942
        //     "source": {
 
4943
        //       "description": "String to identify the originator of this request.",
 
4944
        //       "location": "query",
 
4945
        //       "type": "string"
 
4946
        //     },
 
4947
        //     "volumeId": {
 
4948
        //       "description": "ID of volume to remove.",
 
4949
        //       "location": "query",
 
4950
        //       "required": true,
 
4951
        //       "type": "string"
 
4952
        //     }
 
4953
        //   },
 
4954
        //   "path": "mylibrary/bookshelves/{shelf}/removeVolume",
 
4955
        //   "scopes": [
 
4956
        //     "https://www.googleapis.com/auth/books"
 
4957
        //   ]
 
4958
        // }
 
4959
 
 
4960
}
 
4961
 
 
4962
// method id "books.mylibrary.bookshelves.volumes.list":
 
4963
 
 
4964
type MylibraryBookshelvesVolumesListCall struct {
 
4965
        s     *Service
 
4966
        shelf string
 
4967
        opt_  map[string]interface{}
 
4968
}
 
4969
 
 
4970
// List: Gets volume information for volumes on a bookshelf.
 
4971
func (r *MylibraryBookshelvesVolumesService) List(shelf string) *MylibraryBookshelvesVolumesListCall {
 
4972
        c := &MylibraryBookshelvesVolumesListCall{s: r.s, opt_: make(map[string]interface{})}
 
4973
        c.shelf = shelf
 
4974
        return c
 
4975
}
 
4976
 
 
4977
// Country sets the optional parameter "country": ISO-3166-1 code to
 
4978
// override the IP-based location.
 
4979
func (c *MylibraryBookshelvesVolumesListCall) Country(country string) *MylibraryBookshelvesVolumesListCall {
 
4980
        c.opt_["country"] = country
 
4981
        return c
 
4982
}
 
4983
 
 
4984
// MaxResults sets the optional parameter "maxResults": Maximum number
 
4985
// of results to return
 
4986
func (c *MylibraryBookshelvesVolumesListCall) MaxResults(maxResults int64) *MylibraryBookshelvesVolumesListCall {
 
4987
        c.opt_["maxResults"] = maxResults
 
4988
        return c
 
4989
}
 
4990
 
 
4991
// Projection sets the optional parameter "projection": Restrict
 
4992
// information returned to a set of selected fields.
 
4993
func (c *MylibraryBookshelvesVolumesListCall) Projection(projection string) *MylibraryBookshelvesVolumesListCall {
 
4994
        c.opt_["projection"] = projection
 
4995
        return c
 
4996
}
 
4997
 
 
4998
// Q sets the optional parameter "q": Full-text search query string in
 
4999
// this bookshelf.
 
5000
func (c *MylibraryBookshelvesVolumesListCall) Q(q string) *MylibraryBookshelvesVolumesListCall {
 
5001
        c.opt_["q"] = q
 
5002
        return c
 
5003
}
 
5004
 
 
5005
// ShowPreorders sets the optional parameter "showPreorders": Set to
 
5006
// true to show pre-ordered books. Defaults to false.
 
5007
func (c *MylibraryBookshelvesVolumesListCall) ShowPreorders(showPreorders bool) *MylibraryBookshelvesVolumesListCall {
 
5008
        c.opt_["showPreorders"] = showPreorders
 
5009
        return c
 
5010
}
 
5011
 
 
5012
// Source sets the optional parameter "source": String to identify the
 
5013
// originator of this request.
 
5014
func (c *MylibraryBookshelvesVolumesListCall) Source(source string) *MylibraryBookshelvesVolumesListCall {
 
5015
        c.opt_["source"] = source
 
5016
        return c
 
5017
}
 
5018
 
 
5019
// StartIndex sets the optional parameter "startIndex": Index of the
 
5020
// first element to return (starts at 0)
 
5021
func (c *MylibraryBookshelvesVolumesListCall) StartIndex(startIndex int64) *MylibraryBookshelvesVolumesListCall {
 
5022
        c.opt_["startIndex"] = startIndex
 
5023
        return c
 
5024
}
 
5025
 
 
5026
// Fields allows partial responses to be retrieved.
 
5027
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
5028
// for more information.
 
5029
func (c *MylibraryBookshelvesVolumesListCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesVolumesListCall {
 
5030
        c.opt_["fields"] = googleapi.CombineFields(s)
 
5031
        return c
 
5032
}
 
5033
 
 
5034
func (c *MylibraryBookshelvesVolumesListCall) Do() (*Volumes, error) {
 
5035
        var body io.Reader = nil
 
5036
        params := make(url.Values)
 
5037
        params.Set("alt", "json")
 
5038
        if v, ok := c.opt_["country"]; ok {
 
5039
                params.Set("country", fmt.Sprintf("%v", v))
 
5040
        }
 
5041
        if v, ok := c.opt_["maxResults"]; ok {
 
5042
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
5043
        }
 
5044
        if v, ok := c.opt_["projection"]; ok {
 
5045
                params.Set("projection", fmt.Sprintf("%v", v))
 
5046
        }
 
5047
        if v, ok := c.opt_["q"]; ok {
 
5048
                params.Set("q", fmt.Sprintf("%v", v))
 
5049
        }
 
5050
        if v, ok := c.opt_["showPreorders"]; ok {
 
5051
                params.Set("showPreorders", fmt.Sprintf("%v", v))
 
5052
        }
 
5053
        if v, ok := c.opt_["source"]; ok {
 
5054
                params.Set("source", fmt.Sprintf("%v", v))
 
5055
        }
 
5056
        if v, ok := c.opt_["startIndex"]; ok {
 
5057
                params.Set("startIndex", fmt.Sprintf("%v", v))
 
5058
        }
 
5059
        if v, ok := c.opt_["fields"]; ok {
 
5060
                params.Set("fields", fmt.Sprintf("%v", v))
 
5061
        }
 
5062
        urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/volumes")
 
5063
        urls += "?" + params.Encode()
 
5064
        req, _ := http.NewRequest("GET", urls, body)
 
5065
        googleapi.Expand(req.URL, map[string]string{
 
5066
                "shelf": c.shelf,
 
5067
        })
 
5068
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
5069
        res, err := c.s.client.Do(req)
 
5070
        if err != nil {
 
5071
                return nil, err
 
5072
        }
 
5073
        defer googleapi.CloseBody(res)
 
5074
        if err := googleapi.CheckResponse(res); err != nil {
 
5075
                return nil, err
 
5076
        }
 
5077
        var ret *Volumes
 
5078
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
5079
                return nil, err
 
5080
        }
 
5081
        return ret, nil
 
5082
        // {
 
5083
        //   "description": "Gets volume information for volumes on a bookshelf.",
 
5084
        //   "httpMethod": "GET",
 
5085
        //   "id": "books.mylibrary.bookshelves.volumes.list",
 
5086
        //   "parameterOrder": [
 
5087
        //     "shelf"
 
5088
        //   ],
 
5089
        //   "parameters": {
 
5090
        //     "country": {
 
5091
        //       "description": "ISO-3166-1 code to override the IP-based location.",
 
5092
        //       "location": "query",
 
5093
        //       "type": "string"
 
5094
        //     },
 
5095
        //     "maxResults": {
 
5096
        //       "description": "Maximum number of results to return",
 
5097
        //       "format": "uint32",
 
5098
        //       "location": "query",
 
5099
        //       "minimum": "0",
 
5100
        //       "type": "integer"
 
5101
        //     },
 
5102
        //     "projection": {
 
5103
        //       "description": "Restrict information returned to a set of selected fields.",
 
5104
        //       "enum": [
 
5105
        //         "full",
 
5106
        //         "lite"
 
5107
        //       ],
 
5108
        //       "enumDescriptions": [
 
5109
        //         "Includes all volume data.",
 
5110
        //         "Includes a subset of fields in volumeInfo and accessInfo."
 
5111
        //       ],
 
5112
        //       "location": "query",
 
5113
        //       "type": "string"
 
5114
        //     },
 
5115
        //     "q": {
 
5116
        //       "description": "Full-text search query string in this bookshelf.",
 
5117
        //       "location": "query",
 
5118
        //       "type": "string"
 
5119
        //     },
 
5120
        //     "shelf": {
 
5121
        //       "description": "The bookshelf ID or name retrieve volumes for.",
 
5122
        //       "location": "path",
 
5123
        //       "required": true,
 
5124
        //       "type": "string"
 
5125
        //     },
 
5126
        //     "showPreorders": {
 
5127
        //       "description": "Set to true to show pre-ordered books. Defaults to false.",
 
5128
        //       "location": "query",
 
5129
        //       "type": "boolean"
 
5130
        //     },
 
5131
        //     "source": {
 
5132
        //       "description": "String to identify the originator of this request.",
 
5133
        //       "location": "query",
 
5134
        //       "type": "string"
 
5135
        //     },
 
5136
        //     "startIndex": {
 
5137
        //       "description": "Index of the first element to return (starts at 0)",
 
5138
        //       "format": "uint32",
 
5139
        //       "location": "query",
 
5140
        //       "minimum": "0",
 
5141
        //       "type": "integer"
 
5142
        //     }
 
5143
        //   },
 
5144
        //   "path": "mylibrary/bookshelves/{shelf}/volumes",
 
5145
        //   "response": {
 
5146
        //     "$ref": "Volumes"
 
5147
        //   },
 
5148
        //   "scopes": [
 
5149
        //     "https://www.googleapis.com/auth/books"
 
5150
        //   ]
 
5151
        // }
 
5152
 
 
5153
}
 
5154
 
 
5155
// method id "books.mylibrary.readingpositions.get":
 
5156
 
 
5157
type MylibraryReadingpositionsGetCall struct {
 
5158
        s        *Service
 
5159
        volumeId string
 
5160
        opt_     map[string]interface{}
 
5161
}
 
5162
 
 
5163
// Get: Retrieves my reading position information for a volume.
 
5164
func (r *MylibraryReadingpositionsService) Get(volumeId string) *MylibraryReadingpositionsGetCall {
 
5165
        c := &MylibraryReadingpositionsGetCall{s: r.s, opt_: make(map[string]interface{})}
 
5166
        c.volumeId = volumeId
 
5167
        return c
 
5168
}
 
5169
 
 
5170
// ContentVersion sets the optional parameter "contentVersion": Volume
 
5171
// content version for which this reading position is requested.
 
5172
func (c *MylibraryReadingpositionsGetCall) ContentVersion(contentVersion string) *MylibraryReadingpositionsGetCall {
 
5173
        c.opt_["contentVersion"] = contentVersion
 
5174
        return c
 
5175
}
 
5176
 
 
5177
// Source sets the optional parameter "source": String to identify the
 
5178
// originator of this request.
 
5179
func (c *MylibraryReadingpositionsGetCall) Source(source string) *MylibraryReadingpositionsGetCall {
 
5180
        c.opt_["source"] = source
 
5181
        return c
 
5182
}
 
5183
 
 
5184
// Fields allows partial responses to be retrieved.
 
5185
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
5186
// for more information.
 
5187
func (c *MylibraryReadingpositionsGetCall) Fields(s ...googleapi.Field) *MylibraryReadingpositionsGetCall {
 
5188
        c.opt_["fields"] = googleapi.CombineFields(s)
 
5189
        return c
 
5190
}
 
5191
 
 
5192
func (c *MylibraryReadingpositionsGetCall) Do() (*ReadingPosition, error) {
 
5193
        var body io.Reader = nil
 
5194
        params := make(url.Values)
 
5195
        params.Set("alt", "json")
 
5196
        if v, ok := c.opt_["contentVersion"]; ok {
 
5197
                params.Set("contentVersion", fmt.Sprintf("%v", v))
 
5198
        }
 
5199
        if v, ok := c.opt_["source"]; ok {
 
5200
                params.Set("source", fmt.Sprintf("%v", v))
 
5201
        }
 
5202
        if v, ok := c.opt_["fields"]; ok {
 
5203
                params.Set("fields", fmt.Sprintf("%v", v))
 
5204
        }
 
5205
        urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/readingpositions/{volumeId}")
 
5206
        urls += "?" + params.Encode()
 
5207
        req, _ := http.NewRequest("GET", urls, body)
 
5208
        googleapi.Expand(req.URL, map[string]string{
 
5209
                "volumeId": c.volumeId,
 
5210
        })
 
5211
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
5212
        res, err := c.s.client.Do(req)
 
5213
        if err != nil {
 
5214
                return nil, err
 
5215
        }
 
5216
        defer googleapi.CloseBody(res)
 
5217
        if err := googleapi.CheckResponse(res); err != nil {
 
5218
                return nil, err
 
5219
        }
 
5220
        var ret *ReadingPosition
 
5221
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
5222
                return nil, err
 
5223
        }
 
5224
        return ret, nil
 
5225
        // {
 
5226
        //   "description": "Retrieves my reading position information for a volume.",
 
5227
        //   "httpMethod": "GET",
 
5228
        //   "id": "books.mylibrary.readingpositions.get",
 
5229
        //   "parameterOrder": [
 
5230
        //     "volumeId"
 
5231
        //   ],
 
5232
        //   "parameters": {
 
5233
        //     "contentVersion": {
 
5234
        //       "description": "Volume content version for which this reading position is requested.",
 
5235
        //       "location": "query",
 
5236
        //       "type": "string"
 
5237
        //     },
 
5238
        //     "source": {
 
5239
        //       "description": "String to identify the originator of this request.",
 
5240
        //       "location": "query",
 
5241
        //       "type": "string"
 
5242
        //     },
 
5243
        //     "volumeId": {
 
5244
        //       "description": "ID of volume for which to retrieve a reading position.",
 
5245
        //       "location": "path",
 
5246
        //       "required": true,
 
5247
        //       "type": "string"
 
5248
        //     }
 
5249
        //   },
 
5250
        //   "path": "mylibrary/readingpositions/{volumeId}",
 
5251
        //   "response": {
 
5252
        //     "$ref": "ReadingPosition"
 
5253
        //   },
 
5254
        //   "scopes": [
 
5255
        //     "https://www.googleapis.com/auth/books"
 
5256
        //   ]
 
5257
        // }
 
5258
 
 
5259
}
 
5260
 
 
5261
// method id "books.mylibrary.readingpositions.setPosition":
 
5262
 
 
5263
type MylibraryReadingpositionsSetPositionCall struct {
 
5264
        s         *Service
 
5265
        volumeId  string
 
5266
        timestamp string
 
5267
        position  string
 
5268
        opt_      map[string]interface{}
 
5269
}
 
5270
 
 
5271
// SetPosition: Sets my reading position information for a volume.
 
5272
func (r *MylibraryReadingpositionsService) SetPosition(volumeId string, timestamp string, position string) *MylibraryReadingpositionsSetPositionCall {
 
5273
        c := &MylibraryReadingpositionsSetPositionCall{s: r.s, opt_: make(map[string]interface{})}
 
5274
        c.volumeId = volumeId
 
5275
        c.timestamp = timestamp
 
5276
        c.position = position
 
5277
        return c
 
5278
}
 
5279
 
 
5280
// Action sets the optional parameter "action": Action that caused this
 
5281
// reading position to be set.
 
5282
func (c *MylibraryReadingpositionsSetPositionCall) Action(action string) *MylibraryReadingpositionsSetPositionCall {
 
5283
        c.opt_["action"] = action
 
5284
        return c
 
5285
}
 
5286
 
 
5287
// ContentVersion sets the optional parameter "contentVersion": Volume
 
5288
// content version for which this reading position applies.
 
5289
func (c *MylibraryReadingpositionsSetPositionCall) ContentVersion(contentVersion string) *MylibraryReadingpositionsSetPositionCall {
 
5290
        c.opt_["contentVersion"] = contentVersion
 
5291
        return c
 
5292
}
 
5293
 
 
5294
// DeviceCookie sets the optional parameter "deviceCookie": Random
 
5295
// persistent device cookie optional on set position.
 
5296
func (c *MylibraryReadingpositionsSetPositionCall) DeviceCookie(deviceCookie string) *MylibraryReadingpositionsSetPositionCall {
 
5297
        c.opt_["deviceCookie"] = deviceCookie
 
5298
        return c
 
5299
}
 
5300
 
 
5301
// Source sets the optional parameter "source": String to identify the
 
5302
// originator of this request.
 
5303
func (c *MylibraryReadingpositionsSetPositionCall) Source(source string) *MylibraryReadingpositionsSetPositionCall {
 
5304
        c.opt_["source"] = source
 
5305
        return c
 
5306
}
 
5307
 
 
5308
// Fields allows partial responses to be retrieved.
 
5309
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
5310
// for more information.
 
5311
func (c *MylibraryReadingpositionsSetPositionCall) Fields(s ...googleapi.Field) *MylibraryReadingpositionsSetPositionCall {
 
5312
        c.opt_["fields"] = googleapi.CombineFields(s)
 
5313
        return c
 
5314
}
 
5315
 
 
5316
func (c *MylibraryReadingpositionsSetPositionCall) Do() error {
 
5317
        var body io.Reader = nil
 
5318
        params := make(url.Values)
 
5319
        params.Set("alt", "json")
 
5320
        params.Set("position", fmt.Sprintf("%v", c.position))
 
5321
        params.Set("timestamp", fmt.Sprintf("%v", c.timestamp))
 
5322
        if v, ok := c.opt_["action"]; ok {
 
5323
                params.Set("action", fmt.Sprintf("%v", v))
 
5324
        }
 
5325
        if v, ok := c.opt_["contentVersion"]; ok {
 
5326
                params.Set("contentVersion", fmt.Sprintf("%v", v))
 
5327
        }
 
5328
        if v, ok := c.opt_["deviceCookie"]; ok {
 
5329
                params.Set("deviceCookie", fmt.Sprintf("%v", v))
 
5330
        }
 
5331
        if v, ok := c.opt_["source"]; ok {
 
5332
                params.Set("source", fmt.Sprintf("%v", v))
 
5333
        }
 
5334
        if v, ok := c.opt_["fields"]; ok {
 
5335
                params.Set("fields", fmt.Sprintf("%v", v))
 
5336
        }
 
5337
        urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/readingpositions/{volumeId}/setPosition")
 
5338
        urls += "?" + params.Encode()
 
5339
        req, _ := http.NewRequest("POST", urls, body)
 
5340
        googleapi.Expand(req.URL, map[string]string{
 
5341
                "volumeId": c.volumeId,
 
5342
        })
 
5343
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
5344
        res, err := c.s.client.Do(req)
 
5345
        if err != nil {
 
5346
                return err
 
5347
        }
 
5348
        defer googleapi.CloseBody(res)
 
5349
        if err := googleapi.CheckResponse(res); err != nil {
 
5350
                return err
 
5351
        }
 
5352
        return nil
 
5353
        // {
 
5354
        //   "description": "Sets my reading position information for a volume.",
 
5355
        //   "httpMethod": "POST",
 
5356
        //   "id": "books.mylibrary.readingpositions.setPosition",
 
5357
        //   "parameterOrder": [
 
5358
        //     "volumeId",
 
5359
        //     "timestamp",
 
5360
        //     "position"
 
5361
        //   ],
 
5362
        //   "parameters": {
 
5363
        //     "action": {
 
5364
        //       "description": "Action that caused this reading position to be set.",
 
5365
        //       "enum": [
 
5366
        //         "bookmark",
 
5367
        //         "chapter",
 
5368
        //         "next-page",
 
5369
        //         "prev-page",
 
5370
        //         "scroll",
 
5371
        //         "search"
 
5372
        //       ],
 
5373
        //       "enumDescriptions": [
 
5374
        //         "User chose bookmark within volume.",
 
5375
        //         "User selected chapter from list.",
 
5376
        //         "Next page event.",
 
5377
        //         "Previous page event.",
 
5378
        //         "User navigated to page.",
 
5379
        //         "User chose search results within volume."
 
5380
        //       ],
 
5381
        //       "location": "query",
 
5382
        //       "type": "string"
 
5383
        //     },
 
5384
        //     "contentVersion": {
 
5385
        //       "description": "Volume content version for which this reading position applies.",
 
5386
        //       "location": "query",
 
5387
        //       "type": "string"
 
5388
        //     },
 
5389
        //     "deviceCookie": {
 
5390
        //       "description": "Random persistent device cookie optional on set position.",
 
5391
        //       "location": "query",
 
5392
        //       "type": "string"
 
5393
        //     },
 
5394
        //     "position": {
 
5395
        //       "description": "Position string for the new volume reading position.",
 
5396
        //       "location": "query",
 
5397
        //       "required": true,
 
5398
        //       "type": "string"
 
5399
        //     },
 
5400
        //     "source": {
 
5401
        //       "description": "String to identify the originator of this request.",
 
5402
        //       "location": "query",
 
5403
        //       "type": "string"
 
5404
        //     },
 
5405
        //     "timestamp": {
 
5406
        //       "description": "RFC 3339 UTC format timestamp associated with this reading position.",
 
5407
        //       "location": "query",
 
5408
        //       "required": true,
 
5409
        //       "type": "string"
 
5410
        //     },
 
5411
        //     "volumeId": {
 
5412
        //       "description": "ID of volume for which to update the reading position.",
 
5413
        //       "location": "path",
 
5414
        //       "required": true,
 
5415
        //       "type": "string"
 
5416
        //     }
 
5417
        //   },
 
5418
        //   "path": "mylibrary/readingpositions/{volumeId}/setPosition",
 
5419
        //   "scopes": [
 
5420
        //     "https://www.googleapis.com/auth/books"
 
5421
        //   ]
 
5422
        // }
 
5423
 
 
5424
}
 
5425
 
 
5426
// method id "books.promooffer.accept":
 
5427
 
 
5428
type PromoofferAcceptCall struct {
 
5429
        s    *Service
 
5430
        opt_ map[string]interface{}
 
5431
}
 
5432
 
 
5433
// Accept:
 
5434
func (r *PromoofferService) Accept() *PromoofferAcceptCall {
 
5435
        c := &PromoofferAcceptCall{s: r.s, opt_: make(map[string]interface{})}
 
5436
        return c
 
5437
}
 
5438
 
 
5439
// AndroidId sets the optional parameter "androidId": device android_id
 
5440
func (c *PromoofferAcceptCall) AndroidId(androidId string) *PromoofferAcceptCall {
 
5441
        c.opt_["androidId"] = androidId
 
5442
        return c
 
5443
}
 
5444
 
 
5445
// Device sets the optional parameter "device": device device
 
5446
func (c *PromoofferAcceptCall) Device(device string) *PromoofferAcceptCall {
 
5447
        c.opt_["device"] = device
 
5448
        return c
 
5449
}
 
5450
 
 
5451
// Manufacturer sets the optional parameter "manufacturer": device
 
5452
// manufacturer
 
5453
func (c *PromoofferAcceptCall) Manufacturer(manufacturer string) *PromoofferAcceptCall {
 
5454
        c.opt_["manufacturer"] = manufacturer
 
5455
        return c
 
5456
}
 
5457
 
 
5458
// Model sets the optional parameter "model": device model
 
5459
func (c *PromoofferAcceptCall) Model(model string) *PromoofferAcceptCall {
 
5460
        c.opt_["model"] = model
 
5461
        return c
 
5462
}
 
5463
 
 
5464
// OfferId sets the optional parameter "offerId":
 
5465
func (c *PromoofferAcceptCall) OfferId(offerId string) *PromoofferAcceptCall {
 
5466
        c.opt_["offerId"] = offerId
 
5467
        return c
 
5468
}
 
5469
 
 
5470
// Product sets the optional parameter "product": device product
 
5471
func (c *PromoofferAcceptCall) Product(product string) *PromoofferAcceptCall {
 
5472
        c.opt_["product"] = product
 
5473
        return c
 
5474
}
 
5475
 
 
5476
// Serial sets the optional parameter "serial": device serial
 
5477
func (c *PromoofferAcceptCall) Serial(serial string) *PromoofferAcceptCall {
 
5478
        c.opt_["serial"] = serial
 
5479
        return c
 
5480
}
 
5481
 
 
5482
// VolumeId sets the optional parameter "volumeId": Volume id to
 
5483
// exercise the offer
 
5484
func (c *PromoofferAcceptCall) VolumeId(volumeId string) *PromoofferAcceptCall {
 
5485
        c.opt_["volumeId"] = volumeId
 
5486
        return c
 
5487
}
 
5488
 
 
5489
// Fields allows partial responses to be retrieved.
 
5490
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
5491
// for more information.
 
5492
func (c *PromoofferAcceptCall) Fields(s ...googleapi.Field) *PromoofferAcceptCall {
 
5493
        c.opt_["fields"] = googleapi.CombineFields(s)
 
5494
        return c
 
5495
}
 
5496
 
 
5497
func (c *PromoofferAcceptCall) Do() error {
 
5498
        var body io.Reader = nil
 
5499
        params := make(url.Values)
 
5500
        params.Set("alt", "json")
 
5501
        if v, ok := c.opt_["androidId"]; ok {
 
5502
                params.Set("androidId", fmt.Sprintf("%v", v))
 
5503
        }
 
5504
        if v, ok := c.opt_["device"]; ok {
 
5505
                params.Set("device", fmt.Sprintf("%v", v))
 
5506
        }
 
5507
        if v, ok := c.opt_["manufacturer"]; ok {
 
5508
                params.Set("manufacturer", fmt.Sprintf("%v", v))
 
5509
        }
 
5510
        if v, ok := c.opt_["model"]; ok {
 
5511
                params.Set("model", fmt.Sprintf("%v", v))
 
5512
        }
 
5513
        if v, ok := c.opt_["offerId"]; ok {
 
5514
                params.Set("offerId", fmt.Sprintf("%v", v))
 
5515
        }
 
5516
        if v, ok := c.opt_["product"]; ok {
 
5517
                params.Set("product", fmt.Sprintf("%v", v))
 
5518
        }
 
5519
        if v, ok := c.opt_["serial"]; ok {
 
5520
                params.Set("serial", fmt.Sprintf("%v", v))
 
5521
        }
 
5522
        if v, ok := c.opt_["volumeId"]; ok {
 
5523
                params.Set("volumeId", fmt.Sprintf("%v", v))
 
5524
        }
 
5525
        if v, ok := c.opt_["fields"]; ok {
 
5526
                params.Set("fields", fmt.Sprintf("%v", v))
 
5527
        }
 
5528
        urls := googleapi.ResolveRelative(c.s.BasePath, "promooffer/accept")
 
5529
        urls += "?" + params.Encode()
 
5530
        req, _ := http.NewRequest("POST", urls, body)
 
5531
        googleapi.SetOpaque(req.URL)
 
5532
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
5533
        res, err := c.s.client.Do(req)
 
5534
        if err != nil {
 
5535
                return err
 
5536
        }
 
5537
        defer googleapi.CloseBody(res)
 
5538
        if err := googleapi.CheckResponse(res); err != nil {
 
5539
                return err
 
5540
        }
 
5541
        return nil
 
5542
        // {
 
5543
        //   "description": "",
 
5544
        //   "httpMethod": "POST",
 
5545
        //   "id": "books.promooffer.accept",
 
5546
        //   "parameters": {
 
5547
        //     "androidId": {
 
5548
        //       "description": "device android_id",
 
5549
        //       "location": "query",
 
5550
        //       "type": "string"
 
5551
        //     },
 
5552
        //     "device": {
 
5553
        //       "description": "device device",
 
5554
        //       "location": "query",
 
5555
        //       "type": "string"
 
5556
        //     },
 
5557
        //     "manufacturer": {
 
5558
        //       "description": "device manufacturer",
 
5559
        //       "location": "query",
 
5560
        //       "type": "string"
 
5561
        //     },
 
5562
        //     "model": {
 
5563
        //       "description": "device model",
 
5564
        //       "location": "query",
 
5565
        //       "type": "string"
 
5566
        //     },
 
5567
        //     "offerId": {
 
5568
        //       "location": "query",
 
5569
        //       "type": "string"
 
5570
        //     },
 
5571
        //     "product": {
 
5572
        //       "description": "device product",
 
5573
        //       "location": "query",
 
5574
        //       "type": "string"
 
5575
        //     },
 
5576
        //     "serial": {
 
5577
        //       "description": "device serial",
 
5578
        //       "location": "query",
 
5579
        //       "type": "string"
 
5580
        //     },
 
5581
        //     "volumeId": {
 
5582
        //       "description": "Volume id to exercise the offer",
 
5583
        //       "location": "query",
 
5584
        //       "type": "string"
 
5585
        //     }
 
5586
        //   },
 
5587
        //   "path": "promooffer/accept",
 
5588
        //   "scopes": [
 
5589
        //     "https://www.googleapis.com/auth/books"
 
5590
        //   ]
 
5591
        // }
 
5592
 
 
5593
}
 
5594
 
 
5595
// method id "books.promooffer.dismiss":
 
5596
 
 
5597
type PromoofferDismissCall struct {
 
5598
        s    *Service
 
5599
        opt_ map[string]interface{}
 
5600
}
 
5601
 
 
5602
// Dismiss:
 
5603
func (r *PromoofferService) Dismiss() *PromoofferDismissCall {
 
5604
        c := &PromoofferDismissCall{s: r.s, opt_: make(map[string]interface{})}
 
5605
        return c
 
5606
}
 
5607
 
 
5608
// AndroidId sets the optional parameter "androidId": device android_id
 
5609
func (c *PromoofferDismissCall) AndroidId(androidId string) *PromoofferDismissCall {
 
5610
        c.opt_["androidId"] = androidId
 
5611
        return c
 
5612
}
 
5613
 
 
5614
// Device sets the optional parameter "device": device device
 
5615
func (c *PromoofferDismissCall) Device(device string) *PromoofferDismissCall {
 
5616
        c.opt_["device"] = device
 
5617
        return c
 
5618
}
 
5619
 
 
5620
// Manufacturer sets the optional parameter "manufacturer": device
 
5621
// manufacturer
 
5622
func (c *PromoofferDismissCall) Manufacturer(manufacturer string) *PromoofferDismissCall {
 
5623
        c.opt_["manufacturer"] = manufacturer
 
5624
        return c
 
5625
}
 
5626
 
 
5627
// Model sets the optional parameter "model": device model
 
5628
func (c *PromoofferDismissCall) Model(model string) *PromoofferDismissCall {
 
5629
        c.opt_["model"] = model
 
5630
        return c
 
5631
}
 
5632
 
 
5633
// OfferId sets the optional parameter "offerId": Offer to dimiss
 
5634
func (c *PromoofferDismissCall) OfferId(offerId string) *PromoofferDismissCall {
 
5635
        c.opt_["offerId"] = offerId
 
5636
        return c
 
5637
}
 
5638
 
 
5639
// Product sets the optional parameter "product": device product
 
5640
func (c *PromoofferDismissCall) Product(product string) *PromoofferDismissCall {
 
5641
        c.opt_["product"] = product
 
5642
        return c
 
5643
}
 
5644
 
 
5645
// Serial sets the optional parameter "serial": device serial
 
5646
func (c *PromoofferDismissCall) Serial(serial string) *PromoofferDismissCall {
 
5647
        c.opt_["serial"] = serial
 
5648
        return c
 
5649
}
 
5650
 
 
5651
// Fields allows partial responses to be retrieved.
 
5652
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
5653
// for more information.
 
5654
func (c *PromoofferDismissCall) Fields(s ...googleapi.Field) *PromoofferDismissCall {
 
5655
        c.opt_["fields"] = googleapi.CombineFields(s)
 
5656
        return c
 
5657
}
 
5658
 
 
5659
func (c *PromoofferDismissCall) Do() error {
 
5660
        var body io.Reader = nil
 
5661
        params := make(url.Values)
 
5662
        params.Set("alt", "json")
 
5663
        if v, ok := c.opt_["androidId"]; ok {
 
5664
                params.Set("androidId", fmt.Sprintf("%v", v))
 
5665
        }
 
5666
        if v, ok := c.opt_["device"]; ok {
 
5667
                params.Set("device", fmt.Sprintf("%v", v))
 
5668
        }
 
5669
        if v, ok := c.opt_["manufacturer"]; ok {
 
5670
                params.Set("manufacturer", fmt.Sprintf("%v", v))
 
5671
        }
 
5672
        if v, ok := c.opt_["model"]; ok {
 
5673
                params.Set("model", fmt.Sprintf("%v", v))
 
5674
        }
 
5675
        if v, ok := c.opt_["offerId"]; ok {
 
5676
                params.Set("offerId", fmt.Sprintf("%v", v))
 
5677
        }
 
5678
        if v, ok := c.opt_["product"]; ok {
 
5679
                params.Set("product", fmt.Sprintf("%v", v))
 
5680
        }
 
5681
        if v, ok := c.opt_["serial"]; ok {
 
5682
                params.Set("serial", fmt.Sprintf("%v", v))
 
5683
        }
 
5684
        if v, ok := c.opt_["fields"]; ok {
 
5685
                params.Set("fields", fmt.Sprintf("%v", v))
 
5686
        }
 
5687
        urls := googleapi.ResolveRelative(c.s.BasePath, "promooffer/dismiss")
 
5688
        urls += "?" + params.Encode()
 
5689
        req, _ := http.NewRequest("POST", urls, body)
 
5690
        googleapi.SetOpaque(req.URL)
 
5691
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
5692
        res, err := c.s.client.Do(req)
 
5693
        if err != nil {
 
5694
                return err
 
5695
        }
 
5696
        defer googleapi.CloseBody(res)
 
5697
        if err := googleapi.CheckResponse(res); err != nil {
 
5698
                return err
 
5699
        }
 
5700
        return nil
 
5701
        // {
 
5702
        //   "description": "",
 
5703
        //   "httpMethod": "POST",
 
5704
        //   "id": "books.promooffer.dismiss",
 
5705
        //   "parameters": {
 
5706
        //     "androidId": {
 
5707
        //       "description": "device android_id",
 
5708
        //       "location": "query",
 
5709
        //       "type": "string"
 
5710
        //     },
 
5711
        //     "device": {
 
5712
        //       "description": "device device",
 
5713
        //       "location": "query",
 
5714
        //       "type": "string"
 
5715
        //     },
 
5716
        //     "manufacturer": {
 
5717
        //       "description": "device manufacturer",
 
5718
        //       "location": "query",
 
5719
        //       "type": "string"
 
5720
        //     },
 
5721
        //     "model": {
 
5722
        //       "description": "device model",
 
5723
        //       "location": "query",
 
5724
        //       "type": "string"
 
5725
        //     },
 
5726
        //     "offerId": {
 
5727
        //       "description": "Offer to dimiss",
 
5728
        //       "location": "query",
 
5729
        //       "type": "string"
 
5730
        //     },
 
5731
        //     "product": {
 
5732
        //       "description": "device product",
 
5733
        //       "location": "query",
 
5734
        //       "type": "string"
 
5735
        //     },
 
5736
        //     "serial": {
 
5737
        //       "description": "device serial",
 
5738
        //       "location": "query",
 
5739
        //       "type": "string"
 
5740
        //     }
 
5741
        //   },
 
5742
        //   "path": "promooffer/dismiss",
 
5743
        //   "scopes": [
 
5744
        //     "https://www.googleapis.com/auth/books"
 
5745
        //   ]
 
5746
        // }
 
5747
 
 
5748
}
 
5749
 
 
5750
// method id "books.promooffer.get":
 
5751
 
 
5752
type PromoofferGetCall struct {
 
5753
        s    *Service
 
5754
        opt_ map[string]interface{}
 
5755
}
 
5756
 
 
5757
// Get: Returns a list of promo offers available to the user
 
5758
func (r *PromoofferService) Get() *PromoofferGetCall {
 
5759
        c := &PromoofferGetCall{s: r.s, opt_: make(map[string]interface{})}
 
5760
        return c
 
5761
}
 
5762
 
 
5763
// AndroidId sets the optional parameter "androidId": device android_id
 
5764
func (c *PromoofferGetCall) AndroidId(androidId string) *PromoofferGetCall {
 
5765
        c.opt_["androidId"] = androidId
 
5766
        return c
 
5767
}
 
5768
 
 
5769
// Device sets the optional parameter "device": device device
 
5770
func (c *PromoofferGetCall) Device(device string) *PromoofferGetCall {
 
5771
        c.opt_["device"] = device
 
5772
        return c
 
5773
}
 
5774
 
 
5775
// Manufacturer sets the optional parameter "manufacturer": device
 
5776
// manufacturer
 
5777
func (c *PromoofferGetCall) Manufacturer(manufacturer string) *PromoofferGetCall {
 
5778
        c.opt_["manufacturer"] = manufacturer
 
5779
        return c
 
5780
}
 
5781
 
 
5782
// Model sets the optional parameter "model": device model
 
5783
func (c *PromoofferGetCall) Model(model string) *PromoofferGetCall {
 
5784
        c.opt_["model"] = model
 
5785
        return c
 
5786
}
 
5787
 
 
5788
// Product sets the optional parameter "product": device product
 
5789
func (c *PromoofferGetCall) Product(product string) *PromoofferGetCall {
 
5790
        c.opt_["product"] = product
 
5791
        return c
 
5792
}
 
5793
 
 
5794
// Serial sets the optional parameter "serial": device serial
 
5795
func (c *PromoofferGetCall) Serial(serial string) *PromoofferGetCall {
 
5796
        c.opt_["serial"] = serial
 
5797
        return c
 
5798
}
 
5799
 
 
5800
// Fields allows partial responses to be retrieved.
 
5801
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
5802
// for more information.
 
5803
func (c *PromoofferGetCall) Fields(s ...googleapi.Field) *PromoofferGetCall {
 
5804
        c.opt_["fields"] = googleapi.CombineFields(s)
 
5805
        return c
 
5806
}
 
5807
 
 
5808
func (c *PromoofferGetCall) Do() (*Offers, error) {
 
5809
        var body io.Reader = nil
 
5810
        params := make(url.Values)
 
5811
        params.Set("alt", "json")
 
5812
        if v, ok := c.opt_["androidId"]; ok {
 
5813
                params.Set("androidId", fmt.Sprintf("%v", v))
 
5814
        }
 
5815
        if v, ok := c.opt_["device"]; ok {
 
5816
                params.Set("device", fmt.Sprintf("%v", v))
 
5817
        }
 
5818
        if v, ok := c.opt_["manufacturer"]; ok {
 
5819
                params.Set("manufacturer", fmt.Sprintf("%v", v))
 
5820
        }
 
5821
        if v, ok := c.opt_["model"]; ok {
 
5822
                params.Set("model", fmt.Sprintf("%v", v))
 
5823
        }
 
5824
        if v, ok := c.opt_["product"]; ok {
 
5825
                params.Set("product", fmt.Sprintf("%v", v))
 
5826
        }
 
5827
        if v, ok := c.opt_["serial"]; ok {
 
5828
                params.Set("serial", fmt.Sprintf("%v", v))
 
5829
        }
 
5830
        if v, ok := c.opt_["fields"]; ok {
 
5831
                params.Set("fields", fmt.Sprintf("%v", v))
 
5832
        }
 
5833
        urls := googleapi.ResolveRelative(c.s.BasePath, "promooffer/get")
 
5834
        urls += "?" + params.Encode()
 
5835
        req, _ := http.NewRequest("GET", urls, body)
 
5836
        googleapi.SetOpaque(req.URL)
 
5837
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
5838
        res, err := c.s.client.Do(req)
 
5839
        if err != nil {
 
5840
                return nil, err
 
5841
        }
 
5842
        defer googleapi.CloseBody(res)
 
5843
        if err := googleapi.CheckResponse(res); err != nil {
 
5844
                return nil, err
 
5845
        }
 
5846
        var ret *Offers
 
5847
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
5848
                return nil, err
 
5849
        }
 
5850
        return ret, nil
 
5851
        // {
 
5852
        //   "description": "Returns a list of promo offers available to the user",
 
5853
        //   "httpMethod": "GET",
 
5854
        //   "id": "books.promooffer.get",
 
5855
        //   "parameters": {
 
5856
        //     "androidId": {
 
5857
        //       "description": "device android_id",
 
5858
        //       "location": "query",
 
5859
        //       "type": "string"
 
5860
        //     },
 
5861
        //     "device": {
 
5862
        //       "description": "device device",
 
5863
        //       "location": "query",
 
5864
        //       "type": "string"
 
5865
        //     },
 
5866
        //     "manufacturer": {
 
5867
        //       "description": "device manufacturer",
 
5868
        //       "location": "query",
 
5869
        //       "type": "string"
 
5870
        //     },
 
5871
        //     "model": {
 
5872
        //       "description": "device model",
 
5873
        //       "location": "query",
 
5874
        //       "type": "string"
 
5875
        //     },
 
5876
        //     "product": {
 
5877
        //       "description": "device product",
 
5878
        //       "location": "query",
 
5879
        //       "type": "string"
 
5880
        //     },
 
5881
        //     "serial": {
 
5882
        //       "description": "device serial",
 
5883
        //       "location": "query",
 
5884
        //       "type": "string"
 
5885
        //     }
 
5886
        //   },
 
5887
        //   "path": "promooffer/get",
 
5888
        //   "response": {
 
5889
        //     "$ref": "Offers"
 
5890
        //   },
 
5891
        //   "scopes": [
 
5892
        //     "https://www.googleapis.com/auth/books"
 
5893
        //   ]
 
5894
        // }
 
5895
 
 
5896
}
 
5897
 
 
5898
// method id "books.volumes.get":
 
5899
 
 
5900
type VolumesGetCall struct {
 
5901
        s        *Service
 
5902
        volumeId string
 
5903
        opt_     map[string]interface{}
 
5904
}
 
5905
 
 
5906
// Get: Gets volume information for a single volume.
 
5907
func (r *VolumesService) Get(volumeId string) *VolumesGetCall {
 
5908
        c := &VolumesGetCall{s: r.s, opt_: make(map[string]interface{})}
 
5909
        c.volumeId = volumeId
 
5910
        return c
 
5911
}
 
5912
 
 
5913
// Country sets the optional parameter "country": ISO-3166-1 code to
 
5914
// override the IP-based location.
 
5915
func (c *VolumesGetCall) Country(country string) *VolumesGetCall {
 
5916
        c.opt_["country"] = country
 
5917
        return c
 
5918
}
 
5919
 
 
5920
// Partner sets the optional parameter "partner": Brand results for
 
5921
// partner ID.
 
5922
func (c *VolumesGetCall) Partner(partner string) *VolumesGetCall {
 
5923
        c.opt_["partner"] = partner
 
5924
        return c
 
5925
}
 
5926
 
 
5927
// Projection sets the optional parameter "projection": Restrict
 
5928
// information returned to a set of selected fields.
 
5929
func (c *VolumesGetCall) Projection(projection string) *VolumesGetCall {
 
5930
        c.opt_["projection"] = projection
 
5931
        return c
 
5932
}
 
5933
 
 
5934
// Source sets the optional parameter "source": String to identify the
 
5935
// originator of this request.
 
5936
func (c *VolumesGetCall) Source(source string) *VolumesGetCall {
 
5937
        c.opt_["source"] = source
 
5938
        return c
 
5939
}
 
5940
 
 
5941
// Fields allows partial responses to be retrieved.
 
5942
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
5943
// for more information.
 
5944
func (c *VolumesGetCall) Fields(s ...googleapi.Field) *VolumesGetCall {
 
5945
        c.opt_["fields"] = googleapi.CombineFields(s)
 
5946
        return c
 
5947
}
 
5948
 
 
5949
func (c *VolumesGetCall) Do() (*Volume, error) {
 
5950
        var body io.Reader = nil
 
5951
        params := make(url.Values)
 
5952
        params.Set("alt", "json")
 
5953
        if v, ok := c.opt_["country"]; ok {
 
5954
                params.Set("country", fmt.Sprintf("%v", v))
 
5955
        }
 
5956
        if v, ok := c.opt_["partner"]; ok {
 
5957
                params.Set("partner", fmt.Sprintf("%v", v))
 
5958
        }
 
5959
        if v, ok := c.opt_["projection"]; ok {
 
5960
                params.Set("projection", fmt.Sprintf("%v", v))
 
5961
        }
 
5962
        if v, ok := c.opt_["source"]; ok {
 
5963
                params.Set("source", fmt.Sprintf("%v", v))
 
5964
        }
 
5965
        if v, ok := c.opt_["fields"]; ok {
 
5966
                params.Set("fields", fmt.Sprintf("%v", v))
 
5967
        }
 
5968
        urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}")
 
5969
        urls += "?" + params.Encode()
 
5970
        req, _ := http.NewRequest("GET", urls, body)
 
5971
        googleapi.Expand(req.URL, map[string]string{
 
5972
                "volumeId": c.volumeId,
 
5973
        })
 
5974
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
5975
        res, err := c.s.client.Do(req)
 
5976
        if err != nil {
 
5977
                return nil, err
 
5978
        }
 
5979
        defer googleapi.CloseBody(res)
 
5980
        if err := googleapi.CheckResponse(res); err != nil {
 
5981
                return nil, err
 
5982
        }
 
5983
        var ret *Volume
 
5984
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
5985
                return nil, err
 
5986
        }
 
5987
        return ret, nil
 
5988
        // {
 
5989
        //   "description": "Gets volume information for a single volume.",
 
5990
        //   "httpMethod": "GET",
 
5991
        //   "id": "books.volumes.get",
 
5992
        //   "parameterOrder": [
 
5993
        //     "volumeId"
 
5994
        //   ],
 
5995
        //   "parameters": {
 
5996
        //     "country": {
 
5997
        //       "description": "ISO-3166-1 code to override the IP-based location.",
 
5998
        //       "location": "query",
 
5999
        //       "type": "string"
 
6000
        //     },
 
6001
        //     "partner": {
 
6002
        //       "description": "Brand results for partner ID.",
 
6003
        //       "location": "query",
 
6004
        //       "type": "string"
 
6005
        //     },
 
6006
        //     "projection": {
 
6007
        //       "description": "Restrict information returned to a set of selected fields.",
 
6008
        //       "enum": [
 
6009
        //         "full",
 
6010
        //         "lite"
 
6011
        //       ],
 
6012
        //       "enumDescriptions": [
 
6013
        //         "Includes all volume data.",
 
6014
        //         "Includes a subset of fields in volumeInfo and accessInfo."
 
6015
        //       ],
 
6016
        //       "location": "query",
 
6017
        //       "type": "string"
 
6018
        //     },
 
6019
        //     "source": {
 
6020
        //       "description": "String to identify the originator of this request.",
 
6021
        //       "location": "query",
 
6022
        //       "type": "string"
 
6023
        //     },
 
6024
        //     "volumeId": {
 
6025
        //       "description": "ID of volume to retrieve.",
 
6026
        //       "location": "path",
 
6027
        //       "required": true,
 
6028
        //       "type": "string"
 
6029
        //     }
 
6030
        //   },
 
6031
        //   "path": "volumes/{volumeId}",
 
6032
        //   "response": {
 
6033
        //     "$ref": "Volume"
 
6034
        //   },
 
6035
        //   "scopes": [
 
6036
        //     "https://www.googleapis.com/auth/books"
 
6037
        //   ]
 
6038
        // }
 
6039
 
 
6040
}
 
6041
 
 
6042
// method id "books.volumes.list":
 
6043
 
 
6044
type VolumesListCall struct {
 
6045
        s    *Service
 
6046
        q    string
 
6047
        opt_ map[string]interface{}
 
6048
}
 
6049
 
 
6050
// List: Performs a book search.
 
6051
func (r *VolumesService) List(q string) *VolumesListCall {
 
6052
        c := &VolumesListCall{s: r.s, opt_: make(map[string]interface{})}
 
6053
        c.q = q
 
6054
        return c
 
6055
}
 
6056
 
 
6057
// Download sets the optional parameter "download": Restrict to volumes
 
6058
// by download availability.
 
6059
func (c *VolumesListCall) Download(download string) *VolumesListCall {
 
6060
        c.opt_["download"] = download
 
6061
        return c
 
6062
}
 
6063
 
 
6064
// Filter sets the optional parameter "filter": Filter search results.
 
6065
func (c *VolumesListCall) Filter(filter string) *VolumesListCall {
 
6066
        c.opt_["filter"] = filter
 
6067
        return c
 
6068
}
 
6069
 
 
6070
// LangRestrict sets the optional parameter "langRestrict": Restrict
 
6071
// results to books with this language code.
 
6072
func (c *VolumesListCall) LangRestrict(langRestrict string) *VolumesListCall {
 
6073
        c.opt_["langRestrict"] = langRestrict
 
6074
        return c
 
6075
}
 
6076
 
 
6077
// LibraryRestrict sets the optional parameter "libraryRestrict":
 
6078
// Restrict search to this user's library.
 
6079
func (c *VolumesListCall) LibraryRestrict(libraryRestrict string) *VolumesListCall {
 
6080
        c.opt_["libraryRestrict"] = libraryRestrict
 
6081
        return c
 
6082
}
 
6083
 
 
6084
// MaxResults sets the optional parameter "maxResults": Maximum number
 
6085
// of results to return.
 
6086
func (c *VolumesListCall) MaxResults(maxResults int64) *VolumesListCall {
 
6087
        c.opt_["maxResults"] = maxResults
 
6088
        return c
 
6089
}
 
6090
 
 
6091
// OrderBy sets the optional parameter "orderBy": Sort search results.
 
6092
func (c *VolumesListCall) OrderBy(orderBy string) *VolumesListCall {
 
6093
        c.opt_["orderBy"] = orderBy
 
6094
        return c
 
6095
}
 
6096
 
 
6097
// Partner sets the optional parameter "partner": Restrict and brand
 
6098
// results for partner ID.
 
6099
func (c *VolumesListCall) Partner(partner string) *VolumesListCall {
 
6100
        c.opt_["partner"] = partner
 
6101
        return c
 
6102
}
 
6103
 
 
6104
// PrintType sets the optional parameter "printType": Restrict to books
 
6105
// or magazines.
 
6106
func (c *VolumesListCall) PrintType(printType string) *VolumesListCall {
 
6107
        c.opt_["printType"] = printType
 
6108
        return c
 
6109
}
 
6110
 
 
6111
// Projection sets the optional parameter "projection": Restrict
 
6112
// information returned to a set of selected fields.
 
6113
func (c *VolumesListCall) Projection(projection string) *VolumesListCall {
 
6114
        c.opt_["projection"] = projection
 
6115
        return c
 
6116
}
 
6117
 
 
6118
// ShowPreorders sets the optional parameter "showPreorders": Set to
 
6119
// true to show books available for preorder. Defaults to false.
 
6120
func (c *VolumesListCall) ShowPreorders(showPreorders bool) *VolumesListCall {
 
6121
        c.opt_["showPreorders"] = showPreorders
 
6122
        return c
 
6123
}
 
6124
 
 
6125
// Source sets the optional parameter "source": String to identify the
 
6126
// originator of this request.
 
6127
func (c *VolumesListCall) Source(source string) *VolumesListCall {
 
6128
        c.opt_["source"] = source
 
6129
        return c
 
6130
}
 
6131
 
 
6132
// StartIndex sets the optional parameter "startIndex": Index of the
 
6133
// first result to return (starts at 0)
 
6134
func (c *VolumesListCall) StartIndex(startIndex int64) *VolumesListCall {
 
6135
        c.opt_["startIndex"] = startIndex
 
6136
        return c
 
6137
}
 
6138
 
 
6139
// Fields allows partial responses to be retrieved.
 
6140
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
6141
// for more information.
 
6142
func (c *VolumesListCall) Fields(s ...googleapi.Field) *VolumesListCall {
 
6143
        c.opt_["fields"] = googleapi.CombineFields(s)
 
6144
        return c
 
6145
}
 
6146
 
 
6147
func (c *VolumesListCall) Do() (*Volumes, error) {
 
6148
        var body io.Reader = nil
 
6149
        params := make(url.Values)
 
6150
        params.Set("alt", "json")
 
6151
        params.Set("q", fmt.Sprintf("%v", c.q))
 
6152
        if v, ok := c.opt_["download"]; ok {
 
6153
                params.Set("download", fmt.Sprintf("%v", v))
 
6154
        }
 
6155
        if v, ok := c.opt_["filter"]; ok {
 
6156
                params.Set("filter", fmt.Sprintf("%v", v))
 
6157
        }
 
6158
        if v, ok := c.opt_["langRestrict"]; ok {
 
6159
                params.Set("langRestrict", fmt.Sprintf("%v", v))
 
6160
        }
 
6161
        if v, ok := c.opt_["libraryRestrict"]; ok {
 
6162
                params.Set("libraryRestrict", fmt.Sprintf("%v", v))
 
6163
        }
 
6164
        if v, ok := c.opt_["maxResults"]; ok {
 
6165
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
6166
        }
 
6167
        if v, ok := c.opt_["orderBy"]; ok {
 
6168
                params.Set("orderBy", fmt.Sprintf("%v", v))
 
6169
        }
 
6170
        if v, ok := c.opt_["partner"]; ok {
 
6171
                params.Set("partner", fmt.Sprintf("%v", v))
 
6172
        }
 
6173
        if v, ok := c.opt_["printType"]; ok {
 
6174
                params.Set("printType", fmt.Sprintf("%v", v))
 
6175
        }
 
6176
        if v, ok := c.opt_["projection"]; ok {
 
6177
                params.Set("projection", fmt.Sprintf("%v", v))
 
6178
        }
 
6179
        if v, ok := c.opt_["showPreorders"]; ok {
 
6180
                params.Set("showPreorders", fmt.Sprintf("%v", v))
 
6181
        }
 
6182
        if v, ok := c.opt_["source"]; ok {
 
6183
                params.Set("source", fmt.Sprintf("%v", v))
 
6184
        }
 
6185
        if v, ok := c.opt_["startIndex"]; ok {
 
6186
                params.Set("startIndex", fmt.Sprintf("%v", v))
 
6187
        }
 
6188
        if v, ok := c.opt_["fields"]; ok {
 
6189
                params.Set("fields", fmt.Sprintf("%v", v))
 
6190
        }
 
6191
        urls := googleapi.ResolveRelative(c.s.BasePath, "volumes")
 
6192
        urls += "?" + params.Encode()
 
6193
        req, _ := http.NewRequest("GET", urls, body)
 
6194
        googleapi.SetOpaque(req.URL)
 
6195
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
6196
        res, err := c.s.client.Do(req)
 
6197
        if err != nil {
 
6198
                return nil, err
 
6199
        }
 
6200
        defer googleapi.CloseBody(res)
 
6201
        if err := googleapi.CheckResponse(res); err != nil {
 
6202
                return nil, err
 
6203
        }
 
6204
        var ret *Volumes
 
6205
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
6206
                return nil, err
 
6207
        }
 
6208
        return ret, nil
 
6209
        // {
 
6210
        //   "description": "Performs a book search.",
 
6211
        //   "httpMethod": "GET",
 
6212
        //   "id": "books.volumes.list",
 
6213
        //   "parameterOrder": [
 
6214
        //     "q"
 
6215
        //   ],
 
6216
        //   "parameters": {
 
6217
        //     "download": {
 
6218
        //       "description": "Restrict to volumes by download availability.",
 
6219
        //       "enum": [
 
6220
        //         "epub"
 
6221
        //       ],
 
6222
        //       "enumDescriptions": [
 
6223
        //         "All volumes with epub."
 
6224
        //       ],
 
6225
        //       "location": "query",
 
6226
        //       "type": "string"
 
6227
        //     },
 
6228
        //     "filter": {
 
6229
        //       "description": "Filter search results.",
 
6230
        //       "enum": [
 
6231
        //         "ebooks",
 
6232
        //         "free-ebooks",
 
6233
        //         "full",
 
6234
        //         "paid-ebooks",
 
6235
        //         "partial"
 
6236
        //       ],
 
6237
        //       "enumDescriptions": [
 
6238
        //         "All Google eBooks.",
 
6239
        //         "Google eBook with full volume text viewability.",
 
6240
        //         "Public can view entire volume text.",
 
6241
        //         "Google eBook with a price.",
 
6242
        //         "Public able to see parts of text."
 
6243
        //       ],
 
6244
        //       "location": "query",
 
6245
        //       "type": "string"
 
6246
        //     },
 
6247
        //     "langRestrict": {
 
6248
        //       "description": "Restrict results to books with this language code.",
 
6249
        //       "location": "query",
 
6250
        //       "type": "string"
 
6251
        //     },
 
6252
        //     "libraryRestrict": {
 
6253
        //       "description": "Restrict search to this user's library.",
 
6254
        //       "enum": [
 
6255
        //         "my-library",
 
6256
        //         "no-restrict"
 
6257
        //       ],
 
6258
        //       "enumDescriptions": [
 
6259
        //         "Restrict to the user's library, any shelf.",
 
6260
        //         "Do not restrict based on user's library."
 
6261
        //       ],
 
6262
        //       "location": "query",
 
6263
        //       "type": "string"
 
6264
        //     },
 
6265
        //     "maxResults": {
 
6266
        //       "description": "Maximum number of results to return.",
 
6267
        //       "format": "uint32",
 
6268
        //       "location": "query",
 
6269
        //       "maximum": "40",
 
6270
        //       "minimum": "0",
 
6271
        //       "type": "integer"
 
6272
        //     },
 
6273
        //     "orderBy": {
 
6274
        //       "description": "Sort search results.",
 
6275
        //       "enum": [
 
6276
        //         "newest",
 
6277
        //         "relevance"
 
6278
        //       ],
 
6279
        //       "enumDescriptions": [
 
6280
        //         "Most recently published.",
 
6281
        //         "Relevance to search terms."
 
6282
        //       ],
 
6283
        //       "location": "query",
 
6284
        //       "type": "string"
 
6285
        //     },
 
6286
        //     "partner": {
 
6287
        //       "description": "Restrict and brand results for partner ID.",
 
6288
        //       "location": "query",
 
6289
        //       "type": "string"
 
6290
        //     },
 
6291
        //     "printType": {
 
6292
        //       "description": "Restrict to books or magazines.",
 
6293
        //       "enum": [
 
6294
        //         "all",
 
6295
        //         "books",
 
6296
        //         "magazines"
 
6297
        //       ],
 
6298
        //       "enumDescriptions": [
 
6299
        //         "All volume content types.",
 
6300
        //         "Just books.",
 
6301
        //         "Just magazines."
 
6302
        //       ],
 
6303
        //       "location": "query",
 
6304
        //       "type": "string"
 
6305
        //     },
 
6306
        //     "projection": {
 
6307
        //       "description": "Restrict information returned to a set of selected fields.",
 
6308
        //       "enum": [
 
6309
        //         "full",
 
6310
        //         "lite"
 
6311
        //       ],
 
6312
        //       "enumDescriptions": [
 
6313
        //         "Includes all volume data.",
 
6314
        //         "Includes a subset of fields in volumeInfo and accessInfo."
 
6315
        //       ],
 
6316
        //       "location": "query",
 
6317
        //       "type": "string"
 
6318
        //     },
 
6319
        //     "q": {
 
6320
        //       "description": "Full-text search query string.",
 
6321
        //       "location": "query",
 
6322
        //       "required": true,
 
6323
        //       "type": "string"
 
6324
        //     },
 
6325
        //     "showPreorders": {
 
6326
        //       "description": "Set to true to show books available for preorder. Defaults to false.",
 
6327
        //       "location": "query",
 
6328
        //       "type": "boolean"
 
6329
        //     },
 
6330
        //     "source": {
 
6331
        //       "description": "String to identify the originator of this request.",
 
6332
        //       "location": "query",
 
6333
        //       "type": "string"
 
6334
        //     },
 
6335
        //     "startIndex": {
 
6336
        //       "description": "Index of the first result to return (starts at 0)",
 
6337
        //       "format": "uint32",
 
6338
        //       "location": "query",
 
6339
        //       "minimum": "0",
 
6340
        //       "type": "integer"
 
6341
        //     }
 
6342
        //   },
 
6343
        //   "path": "volumes",
 
6344
        //   "response": {
 
6345
        //     "$ref": "Volumes"
 
6346
        //   },
 
6347
        //   "scopes": [
 
6348
        //     "https://www.googleapis.com/auth/books"
 
6349
        //   ]
 
6350
        // }
 
6351
 
 
6352
}
 
6353
 
 
6354
// method id "books.volumes.associated.list":
 
6355
 
 
6356
type VolumesAssociatedListCall struct {
 
6357
        s        *Service
 
6358
        volumeId string
 
6359
        opt_     map[string]interface{}
 
6360
}
 
6361
 
 
6362
// List: Return a list of associated books.
 
6363
func (r *VolumesAssociatedService) List(volumeId string) *VolumesAssociatedListCall {
 
6364
        c := &VolumesAssociatedListCall{s: r.s, opt_: make(map[string]interface{})}
 
6365
        c.volumeId = volumeId
 
6366
        return c
 
6367
}
 
6368
 
 
6369
// Association sets the optional parameter "association": Association
 
6370
// type.
 
6371
func (c *VolumesAssociatedListCall) Association(association string) *VolumesAssociatedListCall {
 
6372
        c.opt_["association"] = association
 
6373
        return c
 
6374
}
 
6375
 
 
6376
// Locale sets the optional parameter "locale": ISO-639-1 language and
 
6377
// ISO-3166-1 country code. Ex: 'en_US'. Used for generating
 
6378
// recommendations.
 
6379
func (c *VolumesAssociatedListCall) Locale(locale string) *VolumesAssociatedListCall {
 
6380
        c.opt_["locale"] = locale
 
6381
        return c
 
6382
}
 
6383
 
 
6384
// Source sets the optional parameter "source": String to identify the
 
6385
// originator of this request.
 
6386
func (c *VolumesAssociatedListCall) Source(source string) *VolumesAssociatedListCall {
 
6387
        c.opt_["source"] = source
 
6388
        return c
 
6389
}
 
6390
 
 
6391
// Fields allows partial responses to be retrieved.
 
6392
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
6393
// for more information.
 
6394
func (c *VolumesAssociatedListCall) Fields(s ...googleapi.Field) *VolumesAssociatedListCall {
 
6395
        c.opt_["fields"] = googleapi.CombineFields(s)
 
6396
        return c
 
6397
}
 
6398
 
 
6399
func (c *VolumesAssociatedListCall) Do() (*Volumes, error) {
 
6400
        var body io.Reader = nil
 
6401
        params := make(url.Values)
 
6402
        params.Set("alt", "json")
 
6403
        if v, ok := c.opt_["association"]; ok {
 
6404
                params.Set("association", fmt.Sprintf("%v", v))
 
6405
        }
 
6406
        if v, ok := c.opt_["locale"]; ok {
 
6407
                params.Set("locale", fmt.Sprintf("%v", v))
 
6408
        }
 
6409
        if v, ok := c.opt_["source"]; ok {
 
6410
                params.Set("source", fmt.Sprintf("%v", v))
 
6411
        }
 
6412
        if v, ok := c.opt_["fields"]; ok {
 
6413
                params.Set("fields", fmt.Sprintf("%v", v))
 
6414
        }
 
6415
        urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/associated")
 
6416
        urls += "?" + params.Encode()
 
6417
        req, _ := http.NewRequest("GET", urls, body)
 
6418
        googleapi.Expand(req.URL, map[string]string{
 
6419
                "volumeId": c.volumeId,
 
6420
        })
 
6421
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
6422
        res, err := c.s.client.Do(req)
 
6423
        if err != nil {
 
6424
                return nil, err
 
6425
        }
 
6426
        defer googleapi.CloseBody(res)
 
6427
        if err := googleapi.CheckResponse(res); err != nil {
 
6428
                return nil, err
 
6429
        }
 
6430
        var ret *Volumes
 
6431
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
6432
                return nil, err
 
6433
        }
 
6434
        return ret, nil
 
6435
        // {
 
6436
        //   "description": "Return a list of associated books.",
 
6437
        //   "httpMethod": "GET",
 
6438
        //   "id": "books.volumes.associated.list",
 
6439
        //   "parameterOrder": [
 
6440
        //     "volumeId"
 
6441
        //   ],
 
6442
        //   "parameters": {
 
6443
        //     "association": {
 
6444
        //       "description": "Association type.",
 
6445
        //       "enum": [
 
6446
        //         "end-of-sample",
 
6447
        //         "end-of-volume"
 
6448
        //       ],
 
6449
        //       "enumDescriptions": [
 
6450
        //         "Recommendations for display end-of-sample.",
 
6451
        //         "Recommendations for display end-of-volume."
 
6452
        //       ],
 
6453
        //       "location": "query",
 
6454
        //       "type": "string"
 
6455
        //     },
 
6456
        //     "locale": {
 
6457
        //       "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
 
6458
        //       "location": "query",
 
6459
        //       "type": "string"
 
6460
        //     },
 
6461
        //     "source": {
 
6462
        //       "description": "String to identify the originator of this request.",
 
6463
        //       "location": "query",
 
6464
        //       "type": "string"
 
6465
        //     },
 
6466
        //     "volumeId": {
 
6467
        //       "description": "ID of the source volume.",
 
6468
        //       "location": "path",
 
6469
        //       "required": true,
 
6470
        //       "type": "string"
 
6471
        //     }
 
6472
        //   },
 
6473
        //   "path": "volumes/{volumeId}/associated",
 
6474
        //   "response": {
 
6475
        //     "$ref": "Volumes"
 
6476
        //   },
 
6477
        //   "scopes": [
 
6478
        //     "https://www.googleapis.com/auth/books"
 
6479
        //   ]
 
6480
        // }
 
6481
 
 
6482
}
 
6483
 
 
6484
// method id "books.volumes.mybooks.list":
 
6485
 
 
6486
type VolumesMybooksListCall struct {
 
6487
        s    *Service
 
6488
        opt_ map[string]interface{}
 
6489
}
 
6490
 
 
6491
// List: Return a list of books in My Library.
 
6492
func (r *VolumesMybooksService) List() *VolumesMybooksListCall {
 
6493
        c := &VolumesMybooksListCall{s: r.s, opt_: make(map[string]interface{})}
 
6494
        return c
 
6495
}
 
6496
 
 
6497
// AcquireMethod sets the optional parameter "acquireMethod": How the
 
6498
// book was aquired
 
6499
func (c *VolumesMybooksListCall) AcquireMethod(acquireMethod string) *VolumesMybooksListCall {
 
6500
        c.opt_["acquireMethod"] = acquireMethod
 
6501
        return c
 
6502
}
 
6503
 
 
6504
// Locale sets the optional parameter "locale": ISO-639-1 language and
 
6505
// ISO-3166-1 country code. Ex:'en_US'. Used for generating
 
6506
// recommendations.
 
6507
func (c *VolumesMybooksListCall) Locale(locale string) *VolumesMybooksListCall {
 
6508
        c.opt_["locale"] = locale
 
6509
        return c
 
6510
}
 
6511
 
 
6512
// MaxResults sets the optional parameter "maxResults": Maximum number
 
6513
// of results to return.
 
6514
func (c *VolumesMybooksListCall) MaxResults(maxResults int64) *VolumesMybooksListCall {
 
6515
        c.opt_["maxResults"] = maxResults
 
6516
        return c
 
6517
}
 
6518
 
 
6519
// ProcessingState sets the optional parameter "processingState": The
 
6520
// processing state of the user uploaded volumes to be returned.
 
6521
// Applicable only if the UPLOADED is specified in the acquireMethod.
 
6522
func (c *VolumesMybooksListCall) ProcessingState(processingState string) *VolumesMybooksListCall {
 
6523
        c.opt_["processingState"] = processingState
 
6524
        return c
 
6525
}
 
6526
 
 
6527
// Source sets the optional parameter "source": String to identify the
 
6528
// originator of this request.
 
6529
func (c *VolumesMybooksListCall) Source(source string) *VolumesMybooksListCall {
 
6530
        c.opt_["source"] = source
 
6531
        return c
 
6532
}
 
6533
 
 
6534
// StartIndex sets the optional parameter "startIndex": Index of the
 
6535
// first result to return (starts at 0)
 
6536
func (c *VolumesMybooksListCall) StartIndex(startIndex int64) *VolumesMybooksListCall {
 
6537
        c.opt_["startIndex"] = startIndex
 
6538
        return c
 
6539
}
 
6540
 
 
6541
// Fields allows partial responses to be retrieved.
 
6542
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
6543
// for more information.
 
6544
func (c *VolumesMybooksListCall) Fields(s ...googleapi.Field) *VolumesMybooksListCall {
 
6545
        c.opt_["fields"] = googleapi.CombineFields(s)
 
6546
        return c
 
6547
}
 
6548
 
 
6549
func (c *VolumesMybooksListCall) Do() (*Volumes, error) {
 
6550
        var body io.Reader = nil
 
6551
        params := make(url.Values)
 
6552
        params.Set("alt", "json")
 
6553
        if v, ok := c.opt_["acquireMethod"]; ok {
 
6554
                params.Set("acquireMethod", fmt.Sprintf("%v", v))
 
6555
        }
 
6556
        if v, ok := c.opt_["locale"]; ok {
 
6557
                params.Set("locale", fmt.Sprintf("%v", v))
 
6558
        }
 
6559
        if v, ok := c.opt_["maxResults"]; ok {
 
6560
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
6561
        }
 
6562
        if v, ok := c.opt_["processingState"]; ok {
 
6563
                params.Set("processingState", fmt.Sprintf("%v", v))
 
6564
        }
 
6565
        if v, ok := c.opt_["source"]; ok {
 
6566
                params.Set("source", fmt.Sprintf("%v", v))
 
6567
        }
 
6568
        if v, ok := c.opt_["startIndex"]; ok {
 
6569
                params.Set("startIndex", fmt.Sprintf("%v", v))
 
6570
        }
 
6571
        if v, ok := c.opt_["fields"]; ok {
 
6572
                params.Set("fields", fmt.Sprintf("%v", v))
 
6573
        }
 
6574
        urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/mybooks")
 
6575
        urls += "?" + params.Encode()
 
6576
        req, _ := http.NewRequest("GET", urls, body)
 
6577
        googleapi.SetOpaque(req.URL)
 
6578
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
6579
        res, err := c.s.client.Do(req)
 
6580
        if err != nil {
 
6581
                return nil, err
 
6582
        }
 
6583
        defer googleapi.CloseBody(res)
 
6584
        if err := googleapi.CheckResponse(res); err != nil {
 
6585
                return nil, err
 
6586
        }
 
6587
        var ret *Volumes
 
6588
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
6589
                return nil, err
 
6590
        }
 
6591
        return ret, nil
 
6592
        // {
 
6593
        //   "description": "Return a list of books in My Library.",
 
6594
        //   "httpMethod": "GET",
 
6595
        //   "id": "books.volumes.mybooks.list",
 
6596
        //   "parameters": {
 
6597
        //     "acquireMethod": {
 
6598
        //       "description": "How the book was aquired",
 
6599
        //       "enum": [
 
6600
        //         "PREORDERED",
 
6601
        //         "PREVIOUSLY_RENTED",
 
6602
        //         "PUBLIC_DOMAIN",
 
6603
        //         "PURCHASED",
 
6604
        //         "RENTED",
 
6605
        //         "SAMPLE",
 
6606
        //         "UPLOADED"
 
6607
        //       ],
 
6608
        //       "enumDescriptions": [
 
6609
        //         "Preordered books (not yet available)",
 
6610
        //         "User-rented books past their expiration time",
 
6611
        //         "Public domain books",
 
6612
        //         "Purchased books",
 
6613
        //         "User-rented books",
 
6614
        //         "Sample books",
 
6615
        //         "User uploaded books"
 
6616
        //       ],
 
6617
        //       "location": "query",
 
6618
        //       "repeated": true,
 
6619
        //       "type": "string"
 
6620
        //     },
 
6621
        //     "locale": {
 
6622
        //       "description": "ISO-639-1 language and ISO-3166-1 country code. Ex:'en_US'. Used for generating recommendations.",
 
6623
        //       "location": "query",
 
6624
        //       "type": "string"
 
6625
        //     },
 
6626
        //     "maxResults": {
 
6627
        //       "description": "Maximum number of results to return.",
 
6628
        //       "format": "uint32",
 
6629
        //       "location": "query",
 
6630
        //       "maximum": "100",
 
6631
        //       "minimum": "0",
 
6632
        //       "type": "integer"
 
6633
        //     },
 
6634
        //     "processingState": {
 
6635
        //       "description": "The processing state of the user uploaded volumes to be returned. Applicable only if the UPLOADED is specified in the acquireMethod.",
 
6636
        //       "enum": [
 
6637
        //         "COMPLETED_FAILED",
 
6638
        //         "COMPLETED_SUCCESS",
 
6639
        //         "RUNNING"
 
6640
        //       ],
 
6641
        //       "enumDescriptions": [
 
6642
        //         "The volume processing hase failed.",
 
6643
        //         "The volume processing was completed.",
 
6644
        //         "The volume processing is not completed."
 
6645
        //       ],
 
6646
        //       "location": "query",
 
6647
        //       "repeated": true,
 
6648
        //       "type": "string"
 
6649
        //     },
 
6650
        //     "source": {
 
6651
        //       "description": "String to identify the originator of this request.",
 
6652
        //       "location": "query",
 
6653
        //       "type": "string"
 
6654
        //     },
 
6655
        //     "startIndex": {
 
6656
        //       "description": "Index of the first result to return (starts at 0)",
 
6657
        //       "format": "uint32",
 
6658
        //       "location": "query",
 
6659
        //       "minimum": "0",
 
6660
        //       "type": "integer"
 
6661
        //     }
 
6662
        //   },
 
6663
        //   "path": "volumes/mybooks",
 
6664
        //   "response": {
 
6665
        //     "$ref": "Volumes"
 
6666
        //   },
 
6667
        //   "scopes": [
 
6668
        //     "https://www.googleapis.com/auth/books"
 
6669
        //   ]
 
6670
        // }
 
6671
 
 
6672
}
 
6673
 
 
6674
// method id "books.volumes.recommended.list":
 
6675
 
 
6676
type VolumesRecommendedListCall struct {
 
6677
        s    *Service
 
6678
        opt_ map[string]interface{}
 
6679
}
 
6680
 
 
6681
// List: Return a list of recommended books for the current user.
 
6682
func (r *VolumesRecommendedService) List() *VolumesRecommendedListCall {
 
6683
        c := &VolumesRecommendedListCall{s: r.s, opt_: make(map[string]interface{})}
 
6684
        return c
 
6685
}
 
6686
 
 
6687
// Locale sets the optional parameter "locale": ISO-639-1 language and
 
6688
// ISO-3166-1 country code. Ex: 'en_US'. Used for generating
 
6689
// recommendations.
 
6690
func (c *VolumesRecommendedListCall) Locale(locale string) *VolumesRecommendedListCall {
 
6691
        c.opt_["locale"] = locale
 
6692
        return c
 
6693
}
 
6694
 
 
6695
// Source sets the optional parameter "source": String to identify the
 
6696
// originator of this request.
 
6697
func (c *VolumesRecommendedListCall) Source(source string) *VolumesRecommendedListCall {
 
6698
        c.opt_["source"] = source
 
6699
        return c
 
6700
}
 
6701
 
 
6702
// Fields allows partial responses to be retrieved.
 
6703
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
6704
// for more information.
 
6705
func (c *VolumesRecommendedListCall) Fields(s ...googleapi.Field) *VolumesRecommendedListCall {
 
6706
        c.opt_["fields"] = googleapi.CombineFields(s)
 
6707
        return c
 
6708
}
 
6709
 
 
6710
func (c *VolumesRecommendedListCall) Do() (*Volumes, error) {
 
6711
        var body io.Reader = nil
 
6712
        params := make(url.Values)
 
6713
        params.Set("alt", "json")
 
6714
        if v, ok := c.opt_["locale"]; ok {
 
6715
                params.Set("locale", fmt.Sprintf("%v", v))
 
6716
        }
 
6717
        if v, ok := c.opt_["source"]; ok {
 
6718
                params.Set("source", fmt.Sprintf("%v", v))
 
6719
        }
 
6720
        if v, ok := c.opt_["fields"]; ok {
 
6721
                params.Set("fields", fmt.Sprintf("%v", v))
 
6722
        }
 
6723
        urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/recommended")
 
6724
        urls += "?" + params.Encode()
 
6725
        req, _ := http.NewRequest("GET", urls, body)
 
6726
        googleapi.SetOpaque(req.URL)
 
6727
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
6728
        res, err := c.s.client.Do(req)
 
6729
        if err != nil {
 
6730
                return nil, err
 
6731
        }
 
6732
        defer googleapi.CloseBody(res)
 
6733
        if err := googleapi.CheckResponse(res); err != nil {
 
6734
                return nil, err
 
6735
        }
 
6736
        var ret *Volumes
 
6737
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
6738
                return nil, err
 
6739
        }
 
6740
        return ret, nil
 
6741
        // {
 
6742
        //   "description": "Return a list of recommended books for the current user.",
 
6743
        //   "httpMethod": "GET",
 
6744
        //   "id": "books.volumes.recommended.list",
 
6745
        //   "parameters": {
 
6746
        //     "locale": {
 
6747
        //       "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
 
6748
        //       "location": "query",
 
6749
        //       "type": "string"
 
6750
        //     },
 
6751
        //     "source": {
 
6752
        //       "description": "String to identify the originator of this request.",
 
6753
        //       "location": "query",
 
6754
        //       "type": "string"
 
6755
        //     }
 
6756
        //   },
 
6757
        //   "path": "volumes/recommended",
 
6758
        //   "response": {
 
6759
        //     "$ref": "Volumes"
 
6760
        //   },
 
6761
        //   "scopes": [
 
6762
        //     "https://www.googleapis.com/auth/books"
 
6763
        //   ]
 
6764
        // }
 
6765
 
 
6766
}
 
6767
 
 
6768
// method id "books.volumes.recommended.rate":
 
6769
 
 
6770
type VolumesRecommendedRateCall struct {
 
6771
        s        *Service
 
6772
        rating   string
 
6773
        volumeId string
 
6774
        opt_     map[string]interface{}
 
6775
}
 
6776
 
 
6777
// Rate: Rate a recommended book for the current user.
 
6778
func (r *VolumesRecommendedService) Rate(rating string, volumeId string) *VolumesRecommendedRateCall {
 
6779
        c := &VolumesRecommendedRateCall{s: r.s, opt_: make(map[string]interface{})}
 
6780
        c.rating = rating
 
6781
        c.volumeId = volumeId
 
6782
        return c
 
6783
}
 
6784
 
 
6785
// Locale sets the optional parameter "locale": ISO-639-1 language and
 
6786
// ISO-3166-1 country code. Ex: 'en_US'. Used for generating
 
6787
// recommendations.
 
6788
func (c *VolumesRecommendedRateCall) Locale(locale string) *VolumesRecommendedRateCall {
 
6789
        c.opt_["locale"] = locale
 
6790
        return c
 
6791
}
 
6792
 
 
6793
// Source sets the optional parameter "source": String to identify the
 
6794
// originator of this request.
 
6795
func (c *VolumesRecommendedRateCall) Source(source string) *VolumesRecommendedRateCall {
 
6796
        c.opt_["source"] = source
 
6797
        return c
 
6798
}
 
6799
 
 
6800
// Fields allows partial responses to be retrieved.
 
6801
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
6802
// for more information.
 
6803
func (c *VolumesRecommendedRateCall) Fields(s ...googleapi.Field) *VolumesRecommendedRateCall {
 
6804
        c.opt_["fields"] = googleapi.CombineFields(s)
 
6805
        return c
 
6806
}
 
6807
 
 
6808
func (c *VolumesRecommendedRateCall) Do() (*BooksVolumesRecommendedRateResponse, error) {
 
6809
        var body io.Reader = nil
 
6810
        params := make(url.Values)
 
6811
        params.Set("alt", "json")
 
6812
        params.Set("rating", fmt.Sprintf("%v", c.rating))
 
6813
        params.Set("volumeId", fmt.Sprintf("%v", c.volumeId))
 
6814
        if v, ok := c.opt_["locale"]; ok {
 
6815
                params.Set("locale", fmt.Sprintf("%v", v))
 
6816
        }
 
6817
        if v, ok := c.opt_["source"]; ok {
 
6818
                params.Set("source", fmt.Sprintf("%v", v))
 
6819
        }
 
6820
        if v, ok := c.opt_["fields"]; ok {
 
6821
                params.Set("fields", fmt.Sprintf("%v", v))
 
6822
        }
 
6823
        urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/recommended/rate")
 
6824
        urls += "?" + params.Encode()
 
6825
        req, _ := http.NewRequest("POST", urls, body)
 
6826
        googleapi.SetOpaque(req.URL)
 
6827
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
6828
        res, err := c.s.client.Do(req)
 
6829
        if err != nil {
 
6830
                return nil, err
 
6831
        }
 
6832
        defer googleapi.CloseBody(res)
 
6833
        if err := googleapi.CheckResponse(res); err != nil {
 
6834
                return nil, err
 
6835
        }
 
6836
        var ret *BooksVolumesRecommendedRateResponse
 
6837
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
6838
                return nil, err
 
6839
        }
 
6840
        return ret, nil
 
6841
        // {
 
6842
        //   "description": "Rate a recommended book for the current user.",
 
6843
        //   "httpMethod": "POST",
 
6844
        //   "id": "books.volumes.recommended.rate",
 
6845
        //   "parameterOrder": [
 
6846
        //     "rating",
 
6847
        //     "volumeId"
 
6848
        //   ],
 
6849
        //   "parameters": {
 
6850
        //     "locale": {
 
6851
        //       "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
 
6852
        //       "location": "query",
 
6853
        //       "type": "string"
 
6854
        //     },
 
6855
        //     "rating": {
 
6856
        //       "description": "Rating to be given to the volume.",
 
6857
        //       "enum": [
 
6858
        //         "HAVE_IT",
 
6859
        //         "NOT_INTERESTED"
 
6860
        //       ],
 
6861
        //       "enumDescriptions": [
 
6862
        //         "Rating indicating a dismissal due to ownership.",
 
6863
        //         "Rating indicating a negative dismissal of a volume."
 
6864
        //       ],
 
6865
        //       "location": "query",
 
6866
        //       "required": true,
 
6867
        //       "type": "string"
 
6868
        //     },
 
6869
        //     "source": {
 
6870
        //       "description": "String to identify the originator of this request.",
 
6871
        //       "location": "query",
 
6872
        //       "type": "string"
 
6873
        //     },
 
6874
        //     "volumeId": {
 
6875
        //       "description": "ID of the source volume.",
 
6876
        //       "location": "query",
 
6877
        //       "required": true,
 
6878
        //       "type": "string"
 
6879
        //     }
 
6880
        //   },
 
6881
        //   "path": "volumes/recommended/rate",
 
6882
        //   "response": {
 
6883
        //     "$ref": "BooksVolumesRecommendedRateResponse"
 
6884
        //   },
 
6885
        //   "scopes": [
 
6886
        //     "https://www.googleapis.com/auth/books"
 
6887
        //   ]
 
6888
        // }
 
6889
 
 
6890
}
 
6891
 
 
6892
// method id "books.volumes.useruploaded.list":
 
6893
 
 
6894
type VolumesUseruploadedListCall struct {
 
6895
        s    *Service
 
6896
        opt_ map[string]interface{}
 
6897
}
 
6898
 
 
6899
// List: Return a list of books uploaded by the current user.
 
6900
func (r *VolumesUseruploadedService) List() *VolumesUseruploadedListCall {
 
6901
        c := &VolumesUseruploadedListCall{s: r.s, opt_: make(map[string]interface{})}
 
6902
        return c
 
6903
}
 
6904
 
 
6905
// Locale sets the optional parameter "locale": ISO-639-1 language and
 
6906
// ISO-3166-1 country code. Ex: 'en_US'. Used for generating
 
6907
// recommendations.
 
6908
func (c *VolumesUseruploadedListCall) Locale(locale string) *VolumesUseruploadedListCall {
 
6909
        c.opt_["locale"] = locale
 
6910
        return c
 
6911
}
 
6912
 
 
6913
// MaxResults sets the optional parameter "maxResults": Maximum number
 
6914
// of results to return.
 
6915
func (c *VolumesUseruploadedListCall) MaxResults(maxResults int64) *VolumesUseruploadedListCall {
 
6916
        c.opt_["maxResults"] = maxResults
 
6917
        return c
 
6918
}
 
6919
 
 
6920
// ProcessingState sets the optional parameter "processingState": The
 
6921
// processing state of the user uploaded volumes to be returned.
 
6922
func (c *VolumesUseruploadedListCall) ProcessingState(processingState string) *VolumesUseruploadedListCall {
 
6923
        c.opt_["processingState"] = processingState
 
6924
        return c
 
6925
}
 
6926
 
 
6927
// Source sets the optional parameter "source": String to identify the
 
6928
// originator of this request.
 
6929
func (c *VolumesUseruploadedListCall) Source(source string) *VolumesUseruploadedListCall {
 
6930
        c.opt_["source"] = source
 
6931
        return c
 
6932
}
 
6933
 
 
6934
// StartIndex sets the optional parameter "startIndex": Index of the
 
6935
// first result to return (starts at 0)
 
6936
func (c *VolumesUseruploadedListCall) StartIndex(startIndex int64) *VolumesUseruploadedListCall {
 
6937
        c.opt_["startIndex"] = startIndex
 
6938
        return c
 
6939
}
 
6940
 
 
6941
// VolumeId sets the optional parameter "volumeId": The ids of the
 
6942
// volumes to be returned. If not specified all that match the
 
6943
// processingState are returned.
 
6944
func (c *VolumesUseruploadedListCall) VolumeId(volumeId string) *VolumesUseruploadedListCall {
 
6945
        c.opt_["volumeId"] = volumeId
 
6946
        return c
 
6947
}
 
6948
 
 
6949
// Fields allows partial responses to be retrieved.
 
6950
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
6951
// for more information.
 
6952
func (c *VolumesUseruploadedListCall) Fields(s ...googleapi.Field) *VolumesUseruploadedListCall {
 
6953
        c.opt_["fields"] = googleapi.CombineFields(s)
 
6954
        return c
 
6955
}
 
6956
 
 
6957
func (c *VolumesUseruploadedListCall) Do() (*Volumes, error) {
 
6958
        var body io.Reader = nil
 
6959
        params := make(url.Values)
 
6960
        params.Set("alt", "json")
 
6961
        if v, ok := c.opt_["locale"]; ok {
 
6962
                params.Set("locale", fmt.Sprintf("%v", v))
 
6963
        }
 
6964
        if v, ok := c.opt_["maxResults"]; ok {
 
6965
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
6966
        }
 
6967
        if v, ok := c.opt_["processingState"]; ok {
 
6968
                params.Set("processingState", fmt.Sprintf("%v", v))
 
6969
        }
 
6970
        if v, ok := c.opt_["source"]; ok {
 
6971
                params.Set("source", fmt.Sprintf("%v", v))
 
6972
        }
 
6973
        if v, ok := c.opt_["startIndex"]; ok {
 
6974
                params.Set("startIndex", fmt.Sprintf("%v", v))
 
6975
        }
 
6976
        if v, ok := c.opt_["volumeId"]; ok {
 
6977
                params.Set("volumeId", fmt.Sprintf("%v", v))
 
6978
        }
 
6979
        if v, ok := c.opt_["fields"]; ok {
 
6980
                params.Set("fields", fmt.Sprintf("%v", v))
 
6981
        }
 
6982
        urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/useruploaded")
 
6983
        urls += "?" + params.Encode()
 
6984
        req, _ := http.NewRequest("GET", urls, body)
 
6985
        googleapi.SetOpaque(req.URL)
 
6986
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
6987
        res, err := c.s.client.Do(req)
 
6988
        if err != nil {
 
6989
                return nil, err
 
6990
        }
 
6991
        defer googleapi.CloseBody(res)
 
6992
        if err := googleapi.CheckResponse(res); err != nil {
 
6993
                return nil, err
 
6994
        }
 
6995
        var ret *Volumes
 
6996
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
6997
                return nil, err
 
6998
        }
 
6999
        return ret, nil
 
7000
        // {
 
7001
        //   "description": "Return a list of books uploaded by the current user.",
 
7002
        //   "httpMethod": "GET",
 
7003
        //   "id": "books.volumes.useruploaded.list",
 
7004
        //   "parameters": {
 
7005
        //     "locale": {
 
7006
        //       "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
 
7007
        //       "location": "query",
 
7008
        //       "type": "string"
 
7009
        //     },
 
7010
        //     "maxResults": {
 
7011
        //       "description": "Maximum number of results to return.",
 
7012
        //       "format": "uint32",
 
7013
        //       "location": "query",
 
7014
        //       "maximum": "40",
 
7015
        //       "minimum": "0",
 
7016
        //       "type": "integer"
 
7017
        //     },
 
7018
        //     "processingState": {
 
7019
        //       "description": "The processing state of the user uploaded volumes to be returned.",
 
7020
        //       "enum": [
 
7021
        //         "COMPLETED_FAILED",
 
7022
        //         "COMPLETED_SUCCESS",
 
7023
        //         "RUNNING"
 
7024
        //       ],
 
7025
        //       "enumDescriptions": [
 
7026
        //         "The volume processing hase failed.",
 
7027
        //         "The volume processing was completed.",
 
7028
        //         "The volume processing is not completed."
 
7029
        //       ],
 
7030
        //       "location": "query",
 
7031
        //       "repeated": true,
 
7032
        //       "type": "string"
 
7033
        //     },
 
7034
        //     "source": {
 
7035
        //       "description": "String to identify the originator of this request.",
 
7036
        //       "location": "query",
 
7037
        //       "type": "string"
 
7038
        //     },
 
7039
        //     "startIndex": {
 
7040
        //       "description": "Index of the first result to return (starts at 0)",
 
7041
        //       "format": "uint32",
 
7042
        //       "location": "query",
 
7043
        //       "minimum": "0",
 
7044
        //       "type": "integer"
 
7045
        //     },
 
7046
        //     "volumeId": {
 
7047
        //       "description": "The ids of the volumes to be returned. If not specified all that match the processingState are returned.",
 
7048
        //       "location": "query",
 
7049
        //       "repeated": true,
 
7050
        //       "type": "string"
 
7051
        //     }
 
7052
        //   },
 
7053
        //   "path": "volumes/useruploaded",
 
7054
        //   "response": {
 
7055
        //     "$ref": "Volumes"
 
7056
        //   },
 
7057
        //   "scopes": [
 
7058
        //     "https://www.googleapis.com/auth/books"
 
7059
        //   ]
 
7060
        // }
 
7061
 
 
7062
}