1// Copyright 2020 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package books provides access to the Books API. 8// 9// For product documentation, see: https://code.google.com/apis/books/docs/v1/getting_started.html 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/books/v1" 16// ... 17// ctx := context.Background() 18// booksService, err := books.NewService(ctx) 19// 20// In this example, Google Application Default Credentials are used for authentication. 21// 22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23// 24// Other authentication options 25// 26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 27// 28// booksService, err := books.NewService(ctx, option.WithAPIKey("AIza...")) 29// 30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 31// 32// config := &oauth2.Config{...} 33// // ... 34// token, err := config.Exchange(ctx, ...) 35// booksService, err := books.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36// 37// See https://godoc.org/google.golang.org/api/option/ for details on options. 38package books // import "google.golang.org/api/books/v1" 39 40import ( 41 "bytes" 42 "context" 43 "encoding/json" 44 "errors" 45 "fmt" 46 "io" 47 "net/http" 48 "net/url" 49 "strconv" 50 "strings" 51 52 googleapi "google.golang.org/api/googleapi" 53 gensupport "google.golang.org/api/internal/gensupport" 54 option "google.golang.org/api/option" 55 internaloption "google.golang.org/api/option/internaloption" 56 htransport "google.golang.org/api/transport/http" 57) 58 59// Always reference these packages, just in case the auto-generated code 60// below doesn't. 61var _ = bytes.NewBuffer 62var _ = strconv.Itoa 63var _ = fmt.Sprintf 64var _ = json.NewDecoder 65var _ = io.Copy 66var _ = url.Parse 67var _ = gensupport.MarshalJSON 68var _ = googleapi.Version 69var _ = errors.New 70var _ = strings.Replace 71var _ = context.Canceled 72var _ = internaloption.WithDefaultEndpoint 73 74const apiId = "books:v1" 75const apiName = "books" 76const apiVersion = "v1" 77const basePath = "https://books.googleapis.com/" 78const mtlsBasePath = "https://books.mtls.googleapis.com/" 79 80// OAuth2 scopes used by this API. 81const ( 82 // Manage your books 83 BooksScope = "https://www.googleapis.com/auth/books" 84) 85 86// NewService creates a new Service. 87func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 88 scopesOption := option.WithScopes( 89 "https://www.googleapis.com/auth/books", 90 ) 91 // NOTE: prepend, so we don't override user-specified scopes. 92 opts = append([]option.ClientOption{scopesOption}, opts...) 93 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 94 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 95 client, endpoint, err := htransport.NewClient(ctx, opts...) 96 if err != nil { 97 return nil, err 98 } 99 s, err := New(client) 100 if err != nil { 101 return nil, err 102 } 103 if endpoint != "" { 104 s.BasePath = endpoint 105 } 106 return s, nil 107} 108 109// New creates a new Service. It uses the provided http.Client for requests. 110// 111// Deprecated: please use NewService instead. 112// To provide a custom HTTP client, use option.WithHTTPClient. 113// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 114func New(client *http.Client) (*Service, error) { 115 if client == nil { 116 return nil, errors.New("client is nil") 117 } 118 s := &Service{client: client, BasePath: basePath} 119 s.Bookshelves = NewBookshelvesService(s) 120 s.Cloudloading = NewCloudloadingService(s) 121 s.Dictionary = NewDictionaryService(s) 122 s.Familysharing = NewFamilysharingService(s) 123 s.Layers = NewLayersService(s) 124 s.Myconfig = NewMyconfigService(s) 125 s.Mylibrary = NewMylibraryService(s) 126 s.Notification = NewNotificationService(s) 127 s.Onboarding = NewOnboardingService(s) 128 s.Personalizedstream = NewPersonalizedstreamService(s) 129 s.Promooffer = NewPromoofferService(s) 130 s.Series = NewSeriesService(s) 131 s.Volumes = NewVolumesService(s) 132 return s, nil 133} 134 135type Service struct { 136 client *http.Client 137 BasePath string // API endpoint base URL 138 UserAgent string // optional additional User-Agent fragment 139 140 Bookshelves *BookshelvesService 141 142 Cloudloading *CloudloadingService 143 144 Dictionary *DictionaryService 145 146 Familysharing *FamilysharingService 147 148 Layers *LayersService 149 150 Myconfig *MyconfigService 151 152 Mylibrary *MylibraryService 153 154 Notification *NotificationService 155 156 Onboarding *OnboardingService 157 158 Personalizedstream *PersonalizedstreamService 159 160 Promooffer *PromoofferService 161 162 Series *SeriesService 163 164 Volumes *VolumesService 165} 166 167func (s *Service) userAgent() string { 168 if s.UserAgent == "" { 169 return googleapi.UserAgent 170 } 171 return googleapi.UserAgent + " " + s.UserAgent 172} 173 174func NewBookshelvesService(s *Service) *BookshelvesService { 175 rs := &BookshelvesService{s: s} 176 rs.Volumes = NewBookshelvesVolumesService(s) 177 return rs 178} 179 180type BookshelvesService struct { 181 s *Service 182 183 Volumes *BookshelvesVolumesService 184} 185 186func NewBookshelvesVolumesService(s *Service) *BookshelvesVolumesService { 187 rs := &BookshelvesVolumesService{s: s} 188 return rs 189} 190 191type BookshelvesVolumesService struct { 192 s *Service 193} 194 195func NewCloudloadingService(s *Service) *CloudloadingService { 196 rs := &CloudloadingService{s: s} 197 return rs 198} 199 200type CloudloadingService struct { 201 s *Service 202} 203 204func NewDictionaryService(s *Service) *DictionaryService { 205 rs := &DictionaryService{s: s} 206 return rs 207} 208 209type DictionaryService struct { 210 s *Service 211} 212 213func NewFamilysharingService(s *Service) *FamilysharingService { 214 rs := &FamilysharingService{s: s} 215 return rs 216} 217 218type FamilysharingService struct { 219 s *Service 220} 221 222func NewLayersService(s *Service) *LayersService { 223 rs := &LayersService{s: s} 224 rs.AnnotationData = NewLayersAnnotationDataService(s) 225 rs.VolumeAnnotations = NewLayersVolumeAnnotationsService(s) 226 return rs 227} 228 229type LayersService struct { 230 s *Service 231 232 AnnotationData *LayersAnnotationDataService 233 234 VolumeAnnotations *LayersVolumeAnnotationsService 235} 236 237func NewLayersAnnotationDataService(s *Service) *LayersAnnotationDataService { 238 rs := &LayersAnnotationDataService{s: s} 239 return rs 240} 241 242type LayersAnnotationDataService struct { 243 s *Service 244} 245 246func NewLayersVolumeAnnotationsService(s *Service) *LayersVolumeAnnotationsService { 247 rs := &LayersVolumeAnnotationsService{s: s} 248 return rs 249} 250 251type LayersVolumeAnnotationsService struct { 252 s *Service 253} 254 255func NewMyconfigService(s *Service) *MyconfigService { 256 rs := &MyconfigService{s: s} 257 return rs 258} 259 260type MyconfigService struct { 261 s *Service 262} 263 264func NewMylibraryService(s *Service) *MylibraryService { 265 rs := &MylibraryService{s: s} 266 rs.Annotations = NewMylibraryAnnotationsService(s) 267 rs.Bookshelves = NewMylibraryBookshelvesService(s) 268 rs.Readingpositions = NewMylibraryReadingpositionsService(s) 269 return rs 270} 271 272type MylibraryService struct { 273 s *Service 274 275 Annotations *MylibraryAnnotationsService 276 277 Bookshelves *MylibraryBookshelvesService 278 279 Readingpositions *MylibraryReadingpositionsService 280} 281 282func NewMylibraryAnnotationsService(s *Service) *MylibraryAnnotationsService { 283 rs := &MylibraryAnnotationsService{s: s} 284 return rs 285} 286 287type MylibraryAnnotationsService struct { 288 s *Service 289} 290 291func NewMylibraryBookshelvesService(s *Service) *MylibraryBookshelvesService { 292 rs := &MylibraryBookshelvesService{s: s} 293 rs.Volumes = NewMylibraryBookshelvesVolumesService(s) 294 return rs 295} 296 297type MylibraryBookshelvesService struct { 298 s *Service 299 300 Volumes *MylibraryBookshelvesVolumesService 301} 302 303func NewMylibraryBookshelvesVolumesService(s *Service) *MylibraryBookshelvesVolumesService { 304 rs := &MylibraryBookshelvesVolumesService{s: s} 305 return rs 306} 307 308type MylibraryBookshelvesVolumesService struct { 309 s *Service 310} 311 312func NewMylibraryReadingpositionsService(s *Service) *MylibraryReadingpositionsService { 313 rs := &MylibraryReadingpositionsService{s: s} 314 return rs 315} 316 317type MylibraryReadingpositionsService struct { 318 s *Service 319} 320 321func NewNotificationService(s *Service) *NotificationService { 322 rs := &NotificationService{s: s} 323 return rs 324} 325 326type NotificationService struct { 327 s *Service 328} 329 330func NewOnboardingService(s *Service) *OnboardingService { 331 rs := &OnboardingService{s: s} 332 return rs 333} 334 335type OnboardingService struct { 336 s *Service 337} 338 339func NewPersonalizedstreamService(s *Service) *PersonalizedstreamService { 340 rs := &PersonalizedstreamService{s: s} 341 return rs 342} 343 344type PersonalizedstreamService struct { 345 s *Service 346} 347 348func NewPromoofferService(s *Service) *PromoofferService { 349 rs := &PromoofferService{s: s} 350 return rs 351} 352 353type PromoofferService struct { 354 s *Service 355} 356 357func NewSeriesService(s *Service) *SeriesService { 358 rs := &SeriesService{s: s} 359 rs.Membership = NewSeriesMembershipService(s) 360 return rs 361} 362 363type SeriesService struct { 364 s *Service 365 366 Membership *SeriesMembershipService 367} 368 369func NewSeriesMembershipService(s *Service) *SeriesMembershipService { 370 rs := &SeriesMembershipService{s: s} 371 return rs 372} 373 374type SeriesMembershipService struct { 375 s *Service 376} 377 378func NewVolumesService(s *Service) *VolumesService { 379 rs := &VolumesService{s: s} 380 rs.Associated = NewVolumesAssociatedService(s) 381 rs.Mybooks = NewVolumesMybooksService(s) 382 rs.Recommended = NewVolumesRecommendedService(s) 383 rs.Useruploaded = NewVolumesUseruploadedService(s) 384 return rs 385} 386 387type VolumesService struct { 388 s *Service 389 390 Associated *VolumesAssociatedService 391 392 Mybooks *VolumesMybooksService 393 394 Recommended *VolumesRecommendedService 395 396 Useruploaded *VolumesUseruploadedService 397} 398 399func NewVolumesAssociatedService(s *Service) *VolumesAssociatedService { 400 rs := &VolumesAssociatedService{s: s} 401 return rs 402} 403 404type VolumesAssociatedService struct { 405 s *Service 406} 407 408func NewVolumesMybooksService(s *Service) *VolumesMybooksService { 409 rs := &VolumesMybooksService{s: s} 410 return rs 411} 412 413type VolumesMybooksService struct { 414 s *Service 415} 416 417func NewVolumesRecommendedService(s *Service) *VolumesRecommendedService { 418 rs := &VolumesRecommendedService{s: s} 419 return rs 420} 421 422type VolumesRecommendedService struct { 423 s *Service 424} 425 426func NewVolumesUseruploadedService(s *Service) *VolumesUseruploadedService { 427 rs := &VolumesUseruploadedService{s: s} 428 return rs 429} 430 431type VolumesUseruploadedService struct { 432 s *Service 433} 434 435type Annotation struct { 436 // AfterSelectedText: Anchor text after excerpt. For requests, if the 437 // user bookmarked a screen that has no flowing text on it, then this 438 // field should be empty. 439 AfterSelectedText string `json:"afterSelectedText,omitempty"` 440 441 // BeforeSelectedText: Anchor text before excerpt. For requests, if the 442 // user bookmarked a screen that has no flowing text on it, then this 443 // field should be empty. 444 BeforeSelectedText string `json:"beforeSelectedText,omitempty"` 445 446 // ClientVersionRanges: Selection ranges sent from the client. 447 ClientVersionRanges *AnnotationClientVersionRanges `json:"clientVersionRanges,omitempty"` 448 449 // Created: Timestamp for the created time of this annotation. 450 Created string `json:"created,omitempty"` 451 452 // CurrentVersionRanges: Selection ranges for the most recent content 453 // version. 454 CurrentVersionRanges *AnnotationCurrentVersionRanges `json:"currentVersionRanges,omitempty"` 455 456 // Data: User-created data for this annotation. 457 Data string `json:"data,omitempty"` 458 459 // Deleted: Indicates that this annotation is deleted. 460 Deleted bool `json:"deleted,omitempty"` 461 462 // HighlightStyle: The highlight style for this annotation. 463 HighlightStyle string `json:"highlightStyle,omitempty"` 464 465 // Id: Id of this annotation, in the form of a GUID. 466 Id string `json:"id,omitempty"` 467 468 // Kind: Resource type. 469 Kind string `json:"kind,omitempty"` 470 471 // LayerId: The layer this annotation is for. 472 LayerId string `json:"layerId,omitempty"` 473 474 LayerSummary *AnnotationLayerSummary `json:"layerSummary,omitempty"` 475 476 // PageIds: Pages that this annotation spans. 477 PageIds []string `json:"pageIds,omitempty"` 478 479 // SelectedText: Excerpt from the volume. 480 SelectedText string `json:"selectedText,omitempty"` 481 482 // SelfLink: URL to this resource. 483 SelfLink string `json:"selfLink,omitempty"` 484 485 // Updated: Timestamp for the last time this annotation was modified. 486 Updated string `json:"updated,omitempty"` 487 488 // VolumeId: The volume that this annotation belongs to. 489 VolumeId string `json:"volumeId,omitempty"` 490 491 // ServerResponse contains the HTTP response code and headers from the 492 // server. 493 googleapi.ServerResponse `json:"-"` 494 495 // ForceSendFields is a list of field names (e.g. "AfterSelectedText") 496 // to unconditionally include in API requests. By default, fields with 497 // empty values are omitted from API requests. However, any non-pointer, 498 // non-interface field appearing in ForceSendFields will be sent to the 499 // server regardless of whether the field is empty or not. This may be 500 // used to include empty fields in Patch requests. 501 ForceSendFields []string `json:"-"` 502 503 // NullFields is a list of field names (e.g. "AfterSelectedText") to 504 // include in API requests with the JSON null value. By default, fields 505 // with empty values are omitted from API requests. However, any field 506 // with an empty value appearing in NullFields will be sent to the 507 // server as null. It is an error if a field in this list has a 508 // non-empty value. This may be used to include null fields in Patch 509 // requests. 510 NullFields []string `json:"-"` 511} 512 513func (s *Annotation) MarshalJSON() ([]byte, error) { 514 type NoMethod Annotation 515 raw := NoMethod(*s) 516 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 517} 518 519// AnnotationClientVersionRanges: Selection ranges sent from the client. 520type AnnotationClientVersionRanges struct { 521 // CfiRange: Range in CFI format for this annotation sent by client. 522 CfiRange *BooksAnnotationsRange `json:"cfiRange,omitempty"` 523 524 // ContentVersion: Content version the client sent in. 525 ContentVersion string `json:"contentVersion,omitempty"` 526 527 // GbImageRange: Range in GB image format for this annotation sent by 528 // client. 529 GbImageRange *BooksAnnotationsRange `json:"gbImageRange,omitempty"` 530 531 // GbTextRange: Range in GB text format for this annotation sent by 532 // client. 533 GbTextRange *BooksAnnotationsRange `json:"gbTextRange,omitempty"` 534 535 // ImageCfiRange: Range in image CFI format for this annotation sent by 536 // client. 537 ImageCfiRange *BooksAnnotationsRange `json:"imageCfiRange,omitempty"` 538 539 // ForceSendFields is a list of field names (e.g. "CfiRange") to 540 // unconditionally include in API requests. By default, fields with 541 // empty values are omitted from API requests. However, any non-pointer, 542 // non-interface field appearing in ForceSendFields will be sent to the 543 // server regardless of whether the field is empty or not. This may be 544 // used to include empty fields in Patch requests. 545 ForceSendFields []string `json:"-"` 546 547 // NullFields is a list of field names (e.g. "CfiRange") to include in 548 // API requests with the JSON null value. By default, fields with empty 549 // values are omitted from API requests. However, any field with an 550 // empty value appearing in NullFields will be sent to the server as 551 // null. It is an error if a field in this list has a non-empty value. 552 // This may be used to include null fields in Patch requests. 553 NullFields []string `json:"-"` 554} 555 556func (s *AnnotationClientVersionRanges) MarshalJSON() ([]byte, error) { 557 type NoMethod AnnotationClientVersionRanges 558 raw := NoMethod(*s) 559 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 560} 561 562// AnnotationCurrentVersionRanges: Selection ranges for the most recent 563// content version. 564type AnnotationCurrentVersionRanges struct { 565 // CfiRange: Range in CFI format for this annotation for version above. 566 CfiRange *BooksAnnotationsRange `json:"cfiRange,omitempty"` 567 568 // ContentVersion: Content version applicable to ranges below. 569 ContentVersion string `json:"contentVersion,omitempty"` 570 571 // GbImageRange: Range in GB image format for this annotation for 572 // version above. 573 GbImageRange *BooksAnnotationsRange `json:"gbImageRange,omitempty"` 574 575 // GbTextRange: Range in GB text format for this annotation for version 576 // above. 577 GbTextRange *BooksAnnotationsRange `json:"gbTextRange,omitempty"` 578 579 // ImageCfiRange: Range in image CFI format for this annotation for 580 // version above. 581 ImageCfiRange *BooksAnnotationsRange `json:"imageCfiRange,omitempty"` 582 583 // ForceSendFields is a list of field names (e.g. "CfiRange") to 584 // unconditionally include in API requests. By default, fields with 585 // empty values are omitted from API requests. However, any non-pointer, 586 // non-interface field appearing in ForceSendFields will be sent to the 587 // server regardless of whether the field is empty or not. This may be 588 // used to include empty fields in Patch requests. 589 ForceSendFields []string `json:"-"` 590 591 // NullFields is a list of field names (e.g. "CfiRange") to include in 592 // API requests with the JSON null value. By default, fields with empty 593 // values are omitted from API requests. However, any field with an 594 // empty value appearing in NullFields will be sent to the server as 595 // null. It is an error if a field in this list has a non-empty value. 596 // This may be used to include null fields in Patch requests. 597 NullFields []string `json:"-"` 598} 599 600func (s *AnnotationCurrentVersionRanges) MarshalJSON() ([]byte, error) { 601 type NoMethod AnnotationCurrentVersionRanges 602 raw := NoMethod(*s) 603 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 604} 605 606type AnnotationLayerSummary struct { 607 // AllowedCharacterCount: Maximum allowed characters on this layer, 608 // especially for the "copy" layer. 609 AllowedCharacterCount int64 `json:"allowedCharacterCount,omitempty"` 610 611 // LimitType: Type of limitation on this layer. "limited" or "unlimited" 612 // for the "copy" layer. 613 LimitType string `json:"limitType,omitempty"` 614 615 // RemainingCharacterCount: Remaining allowed characters on this layer, 616 // especially for the "copy" layer. 617 RemainingCharacterCount int64 `json:"remainingCharacterCount,omitempty"` 618 619 // ForceSendFields is a list of field names (e.g. 620 // "AllowedCharacterCount") to unconditionally include in API requests. 621 // By default, fields with empty values are omitted from API requests. 622 // However, any non-pointer, non-interface field appearing in 623 // ForceSendFields will be sent to the server regardless of whether the 624 // field is empty or not. This may be used to include empty fields in 625 // Patch requests. 626 ForceSendFields []string `json:"-"` 627 628 // NullFields is a list of field names (e.g. "AllowedCharacterCount") to 629 // include in API requests with the JSON null value. By default, fields 630 // with empty values are omitted from API requests. However, any field 631 // with an empty value appearing in NullFields will be sent to the 632 // server as null. It is an error if a field in this list has a 633 // non-empty value. This may be used to include null fields in Patch 634 // requests. 635 NullFields []string `json:"-"` 636} 637 638func (s *AnnotationLayerSummary) MarshalJSON() ([]byte, error) { 639 type NoMethod AnnotationLayerSummary 640 raw := NoMethod(*s) 641 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 642} 643 644type Annotations struct { 645 // Items: A list of annotations. 646 Items []*Annotation `json:"items,omitempty"` 647 648 // Kind: Resource type. 649 Kind string `json:"kind,omitempty"` 650 651 // NextPageToken: Token to pass in for pagination for the next page. 652 // This will not be present if this request does not have more results. 653 NextPageToken string `json:"nextPageToken,omitempty"` 654 655 // TotalItems: Total number of annotations found. This may be greater 656 // than the number of notes returned in this response if results have 657 // been paginated. 658 TotalItems int64 `json:"totalItems,omitempty"` 659 660 // ServerResponse contains the HTTP response code and headers from the 661 // server. 662 googleapi.ServerResponse `json:"-"` 663 664 // ForceSendFields is a list of field names (e.g. "Items") to 665 // unconditionally include in API requests. By default, fields with 666 // empty values are omitted from API requests. However, any non-pointer, 667 // non-interface field appearing in ForceSendFields will be sent to the 668 // server regardless of whether the field is empty or not. This may be 669 // used to include empty fields in Patch requests. 670 ForceSendFields []string `json:"-"` 671 672 // NullFields is a list of field names (e.g. "Items") to include in API 673 // requests with the JSON null value. By default, fields with empty 674 // values are omitted from API requests. However, any field with an 675 // empty value appearing in NullFields will be sent to the server as 676 // null. It is an error if a field in this list has a non-empty value. 677 // This may be used to include null fields in Patch requests. 678 NullFields []string `json:"-"` 679} 680 681func (s *Annotations) MarshalJSON() ([]byte, error) { 682 type NoMethod Annotations 683 raw := NoMethod(*s) 684 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 685} 686 687type AnnotationsSummary struct { 688 Kind string `json:"kind,omitempty"` 689 690 Layers []*AnnotationsSummaryLayers `json:"layers,omitempty"` 691 692 // ServerResponse contains the HTTP response code and headers from the 693 // server. 694 googleapi.ServerResponse `json:"-"` 695 696 // ForceSendFields is a list of field names (e.g. "Kind") to 697 // unconditionally include in API requests. By default, fields with 698 // empty values are omitted from API requests. However, any non-pointer, 699 // non-interface field appearing in ForceSendFields will be sent to the 700 // server regardless of whether the field is empty or not. This may be 701 // used to include empty fields in Patch requests. 702 ForceSendFields []string `json:"-"` 703 704 // NullFields is a list of field names (e.g. "Kind") to include in API 705 // requests with the JSON null value. By default, fields with empty 706 // values are omitted from API requests. However, any field with an 707 // empty value appearing in NullFields will be sent to the server as 708 // null. It is an error if a field in this list has a non-empty value. 709 // This may be used to include null fields in Patch requests. 710 NullFields []string `json:"-"` 711} 712 713func (s *AnnotationsSummary) MarshalJSON() ([]byte, error) { 714 type NoMethod AnnotationsSummary 715 raw := NoMethod(*s) 716 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 717} 718 719type AnnotationsSummaryLayers struct { 720 AllowedCharacterCount int64 `json:"allowedCharacterCount,omitempty"` 721 722 LayerId string `json:"layerId,omitempty"` 723 724 LimitType string `json:"limitType,omitempty"` 725 726 RemainingCharacterCount int64 `json:"remainingCharacterCount,omitempty"` 727 728 Updated string `json:"updated,omitempty"` 729 730 // ForceSendFields is a list of field names (e.g. 731 // "AllowedCharacterCount") to unconditionally include in API requests. 732 // By default, fields with empty values are omitted from API requests. 733 // However, any non-pointer, non-interface field appearing in 734 // ForceSendFields will be sent to the server regardless of whether the 735 // field is empty or not. This may be used to include empty fields in 736 // Patch requests. 737 ForceSendFields []string `json:"-"` 738 739 // NullFields is a list of field names (e.g. "AllowedCharacterCount") to 740 // include in API requests with the JSON null value. By default, fields 741 // with empty values are omitted from API requests. However, any field 742 // with an empty value appearing in NullFields will be sent to the 743 // server as null. It is an error if a field in this list has a 744 // non-empty value. This may be used to include null fields in Patch 745 // requests. 746 NullFields []string `json:"-"` 747} 748 749func (s *AnnotationsSummaryLayers) MarshalJSON() ([]byte, error) { 750 type NoMethod AnnotationsSummaryLayers 751 raw := NoMethod(*s) 752 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 753} 754 755type Annotationsdata struct { 756 // Items: A list of Annotation Data. 757 Items []*GeoAnnotationdata `json:"items,omitempty"` 758 759 // Kind: Resource type 760 Kind string `json:"kind,omitempty"` 761 762 // NextPageToken: Token to pass in for pagination for the next page. 763 // This will not be present if this request does not have more results. 764 NextPageToken string `json:"nextPageToken,omitempty"` 765 766 // TotalItems: The total number of volume annotations found. 767 TotalItems int64 `json:"totalItems,omitempty"` 768 769 // ServerResponse contains the HTTP response code and headers from the 770 // server. 771 googleapi.ServerResponse `json:"-"` 772 773 // ForceSendFields is a list of field names (e.g. "Items") to 774 // unconditionally include in API requests. By default, fields with 775 // empty values are omitted from API requests. However, any non-pointer, 776 // non-interface field appearing in ForceSendFields will be sent to the 777 // server regardless of whether the field is empty or not. This may be 778 // used to include empty fields in Patch requests. 779 ForceSendFields []string `json:"-"` 780 781 // NullFields is a list of field names (e.g. "Items") to include in API 782 // requests with the JSON null value. By default, fields with empty 783 // values are omitted from API requests. However, any field with an 784 // empty value appearing in NullFields will be sent to the server as 785 // null. It is an error if a field in this list has a non-empty value. 786 // This may be used to include null fields in Patch requests. 787 NullFields []string `json:"-"` 788} 789 790func (s *Annotationsdata) MarshalJSON() ([]byte, error) { 791 type NoMethod Annotationsdata 792 raw := NoMethod(*s) 793 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 794} 795 796type BooksAnnotationsRange struct { 797 // EndOffset: The offset from the ending position. 798 EndOffset string `json:"endOffset,omitempty"` 799 800 // EndPosition: The ending position for the range. 801 EndPosition string `json:"endPosition,omitempty"` 802 803 // StartOffset: The offset from the starting position. 804 StartOffset string `json:"startOffset,omitempty"` 805 806 // StartPosition: The starting position for the range. 807 StartPosition string `json:"startPosition,omitempty"` 808 809 // ForceSendFields is a list of field names (e.g. "EndOffset") to 810 // unconditionally include in API requests. By default, fields with 811 // empty values are omitted from API requests. However, any non-pointer, 812 // non-interface field appearing in ForceSendFields will be sent to the 813 // server regardless of whether the field is empty or not. This may be 814 // used to include empty fields in Patch requests. 815 ForceSendFields []string `json:"-"` 816 817 // NullFields is a list of field names (e.g. "EndOffset") to include in 818 // API requests with the JSON null value. By default, fields with empty 819 // values are omitted from API requests. However, any field with an 820 // empty value appearing in NullFields will be sent to the server as 821 // null. It is an error if a field in this list has a non-empty value. 822 // This may be used to include null fields in Patch requests. 823 NullFields []string `json:"-"` 824} 825 826func (s *BooksAnnotationsRange) MarshalJSON() ([]byte, error) { 827 type NoMethod BooksAnnotationsRange 828 raw := NoMethod(*s) 829 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 830} 831 832type BooksCloudloadingResource struct { 833 Author string `json:"author,omitempty"` 834 835 ProcessingState string `json:"processingState,omitempty"` 836 837 Title string `json:"title,omitempty"` 838 839 VolumeId string `json:"volumeId,omitempty"` 840 841 // ServerResponse contains the HTTP response code and headers from the 842 // server. 843 googleapi.ServerResponse `json:"-"` 844 845 // ForceSendFields is a list of field names (e.g. "Author") to 846 // unconditionally include in API requests. By default, fields with 847 // empty values are omitted from API requests. However, any non-pointer, 848 // non-interface field appearing in ForceSendFields will be sent to the 849 // server regardless of whether the field is empty or not. This may be 850 // used to include empty fields in Patch requests. 851 ForceSendFields []string `json:"-"` 852 853 // NullFields is a list of field names (e.g. "Author") to include in API 854 // requests with the JSON null value. By default, fields with empty 855 // values are omitted from API requests. However, any field with an 856 // empty value appearing in NullFields will be sent to the server as 857 // null. It is an error if a field in this list has a non-empty value. 858 // This may be used to include null fields in Patch requests. 859 NullFields []string `json:"-"` 860} 861 862func (s *BooksCloudloadingResource) MarshalJSON() ([]byte, error) { 863 type NoMethod BooksCloudloadingResource 864 raw := NoMethod(*s) 865 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 866} 867 868type BooksVolumesRecommendedRateResponse struct { 869 ConsistencyToken string `json:"consistency_token,omitempty"` 870 871 // ServerResponse contains the HTTP response code and headers from the 872 // server. 873 googleapi.ServerResponse `json:"-"` 874 875 // ForceSendFields is a list of field names (e.g. "ConsistencyToken") to 876 // unconditionally include in API requests. By default, fields with 877 // empty values are omitted from API requests. However, any non-pointer, 878 // non-interface field appearing in ForceSendFields will be sent to the 879 // server regardless of whether the field is empty or not. This may be 880 // used to include empty fields in Patch requests. 881 ForceSendFields []string `json:"-"` 882 883 // NullFields is a list of field names (e.g. "ConsistencyToken") to 884 // include in API requests with the JSON null value. By default, fields 885 // with empty values are omitted from API requests. However, any field 886 // with an empty value appearing in NullFields will be sent to the 887 // server as null. It is an error if a field in this list has a 888 // non-empty value. This may be used to include null fields in Patch 889 // requests. 890 NullFields []string `json:"-"` 891} 892 893func (s *BooksVolumesRecommendedRateResponse) MarshalJSON() ([]byte, error) { 894 type NoMethod BooksVolumesRecommendedRateResponse 895 raw := NoMethod(*s) 896 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 897} 898 899type Bookshelf struct { 900 // Access: Whether this bookshelf is PUBLIC or PRIVATE. 901 Access string `json:"access,omitempty"` 902 903 // Created: Created time for this bookshelf (formatted UTC timestamp 904 // with millisecond resolution). 905 Created string `json:"created,omitempty"` 906 907 // Description: Description of this bookshelf. 908 Description string `json:"description,omitempty"` 909 910 // Id: Id of this bookshelf, only unique by user. 911 Id int64 `json:"id,omitempty"` 912 913 // Kind: Resource type for bookshelf metadata. 914 Kind string `json:"kind,omitempty"` 915 916 // SelfLink: URL to this resource. 917 SelfLink string `json:"selfLink,omitempty"` 918 919 // Title: Title of this bookshelf. 920 Title string `json:"title,omitempty"` 921 922 // Updated: Last modified time of this bookshelf (formatted UTC 923 // timestamp with millisecond resolution). 924 Updated string `json:"updated,omitempty"` 925 926 // VolumeCount: Number of volumes in this bookshelf. 927 VolumeCount int64 `json:"volumeCount,omitempty"` 928 929 // VolumesLastUpdated: Last time a volume was added or removed from this 930 // bookshelf (formatted UTC timestamp with millisecond resolution). 931 VolumesLastUpdated string `json:"volumesLastUpdated,omitempty"` 932 933 // ServerResponse contains the HTTP response code and headers from the 934 // server. 935 googleapi.ServerResponse `json:"-"` 936 937 // ForceSendFields is a list of field names (e.g. "Access") to 938 // unconditionally include in API requests. By default, fields with 939 // empty values are omitted from API requests. However, any non-pointer, 940 // non-interface field appearing in ForceSendFields will be sent to the 941 // server regardless of whether the field is empty or not. This may be 942 // used to include empty fields in Patch requests. 943 ForceSendFields []string `json:"-"` 944 945 // NullFields is a list of field names (e.g. "Access") to include in API 946 // requests with the JSON null value. By default, fields with empty 947 // values are omitted from API requests. However, any field with an 948 // empty value appearing in NullFields will be sent to the server as 949 // null. It is an error if a field in this list has a non-empty value. 950 // This may be used to include null fields in Patch requests. 951 NullFields []string `json:"-"` 952} 953 954func (s *Bookshelf) MarshalJSON() ([]byte, error) { 955 type NoMethod Bookshelf 956 raw := NoMethod(*s) 957 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 958} 959 960type Bookshelves struct { 961 // Items: A list of bookshelves. 962 Items []*Bookshelf `json:"items,omitempty"` 963 964 // Kind: Resource type. 965 Kind string `json:"kind,omitempty"` 966 967 // ServerResponse contains the HTTP response code and headers from the 968 // server. 969 googleapi.ServerResponse `json:"-"` 970 971 // ForceSendFields is a list of field names (e.g. "Items") to 972 // unconditionally include in API requests. By default, fields with 973 // empty values are omitted from API requests. However, any non-pointer, 974 // non-interface field appearing in ForceSendFields will be sent to the 975 // server regardless of whether the field is empty or not. This may be 976 // used to include empty fields in Patch requests. 977 ForceSendFields []string `json:"-"` 978 979 // NullFields is a list of field names (e.g. "Items") to include in API 980 // requests with the JSON null value. By default, fields with empty 981 // values are omitted from API requests. However, any field with an 982 // empty value appearing in NullFields will be sent to the server as 983 // null. It is an error if a field in this list has a non-empty value. 984 // This may be used to include null fields in Patch requests. 985 NullFields []string `json:"-"` 986} 987 988func (s *Bookshelves) MarshalJSON() ([]byte, error) { 989 type NoMethod Bookshelves 990 raw := NoMethod(*s) 991 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 992} 993 994type Category struct { 995 // Items: A list of onboarding categories. 996 Items []*CategoryItems `json:"items,omitempty"` 997 998 // Kind: Resource type. 999 Kind string `json:"kind,omitempty"` 1000 1001 // ServerResponse contains the HTTP response code and headers from the 1002 // server. 1003 googleapi.ServerResponse `json:"-"` 1004 1005 // ForceSendFields is a list of field names (e.g. "Items") to 1006 // unconditionally include in API requests. By default, fields with 1007 // empty values are omitted from API requests. However, any non-pointer, 1008 // non-interface field appearing in ForceSendFields will be sent to the 1009 // server regardless of whether the field is empty or not. This may be 1010 // used to include empty fields in Patch requests. 1011 ForceSendFields []string `json:"-"` 1012 1013 // NullFields is a list of field names (e.g. "Items") to include in API 1014 // requests with the JSON null value. By default, fields with empty 1015 // values are omitted from API requests. However, any field with an 1016 // empty value appearing in NullFields will be sent to the server as 1017 // null. It is an error if a field in this list has a non-empty value. 1018 // This may be used to include null fields in Patch requests. 1019 NullFields []string `json:"-"` 1020} 1021 1022func (s *Category) MarshalJSON() ([]byte, error) { 1023 type NoMethod Category 1024 raw := NoMethod(*s) 1025 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1026} 1027 1028type CategoryItems struct { 1029 BadgeUrl string `json:"badgeUrl,omitempty"` 1030 1031 CategoryId string `json:"categoryId,omitempty"` 1032 1033 Name string `json:"name,omitempty"` 1034 1035 // ForceSendFields is a list of field names (e.g. "BadgeUrl") to 1036 // unconditionally include in API requests. By default, fields with 1037 // empty values are omitted from API requests. However, any non-pointer, 1038 // non-interface field appearing in ForceSendFields will be sent to the 1039 // server regardless of whether the field is empty or not. This may be 1040 // used to include empty fields in Patch requests. 1041 ForceSendFields []string `json:"-"` 1042 1043 // NullFields is a list of field names (e.g. "BadgeUrl") to include in 1044 // API requests with the JSON null value. By default, fields with empty 1045 // values are omitted from API requests. However, any field with an 1046 // empty value appearing in NullFields will be sent to the server as 1047 // null. It is an error if a field in this list has a non-empty value. 1048 // This may be used to include null fields in Patch requests. 1049 NullFields []string `json:"-"` 1050} 1051 1052func (s *CategoryItems) MarshalJSON() ([]byte, error) { 1053 type NoMethod CategoryItems 1054 raw := NoMethod(*s) 1055 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1056} 1057 1058type ConcurrentAccessRestriction struct { 1059 // DeviceAllowed: Whether access is granted for this (user, device, 1060 // volume). 1061 DeviceAllowed bool `json:"deviceAllowed,omitempty"` 1062 1063 // Kind: Resource type. 1064 Kind string `json:"kind,omitempty"` 1065 1066 // MaxConcurrentDevices: The maximum number of concurrent access 1067 // licenses for this volume. 1068 MaxConcurrentDevices int64 `json:"maxConcurrentDevices,omitempty"` 1069 1070 // Message: Error/warning message. 1071 Message string `json:"message,omitempty"` 1072 1073 // Nonce: Client nonce for verification. Download access and 1074 // client-validation only. 1075 Nonce string `json:"nonce,omitempty"` 1076 1077 // ReasonCode: Error/warning reason code. 1078 ReasonCode string `json:"reasonCode,omitempty"` 1079 1080 // Restricted: Whether this volume has any concurrent access 1081 // restrictions. 1082 Restricted bool `json:"restricted,omitempty"` 1083 1084 // Signature: Response signature. 1085 Signature string `json:"signature,omitempty"` 1086 1087 // Source: Client app identifier for verification. Download access and 1088 // client-validation only. 1089 Source string `json:"source,omitempty"` 1090 1091 // TimeWindowSeconds: Time in seconds for license auto-expiration. 1092 TimeWindowSeconds int64 `json:"timeWindowSeconds,omitempty"` 1093 1094 // VolumeId: Identifies the volume for which this entry applies. 1095 VolumeId string `json:"volumeId,omitempty"` 1096 1097 // ForceSendFields is a list of field names (e.g. "DeviceAllowed") to 1098 // unconditionally include in API requests. By default, fields with 1099 // empty values are omitted from API requests. However, any non-pointer, 1100 // non-interface field appearing in ForceSendFields will be sent to the 1101 // server regardless of whether the field is empty or not. This may be 1102 // used to include empty fields in Patch requests. 1103 ForceSendFields []string `json:"-"` 1104 1105 // NullFields is a list of field names (e.g. "DeviceAllowed") to include 1106 // in API requests with the JSON null value. By default, fields with 1107 // empty values are omitted from API requests. However, any field with 1108 // an empty value appearing in NullFields will be sent to the server as 1109 // null. It is an error if a field in this list has a non-empty value. 1110 // This may be used to include null fields in Patch requests. 1111 NullFields []string `json:"-"` 1112} 1113 1114func (s *ConcurrentAccessRestriction) MarshalJSON() ([]byte, error) { 1115 type NoMethod ConcurrentAccessRestriction 1116 raw := NoMethod(*s) 1117 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1118} 1119 1120type DictionaryAnnotationdata struct { 1121 // AnnotationType: The type of annotation this data is for. 1122 AnnotationType string `json:"annotationType,omitempty"` 1123 1124 // Data: JSON encoded data for this dictionary annotation data. Emitted 1125 // with name 'data' in JSON output. Either this or geo_data will be 1126 // populated. 1127 Data *Dictlayerdata `json:"data,omitempty"` 1128 1129 // EncodedData: Base64 encoded data for this annotation data. 1130 EncodedData string `json:"encodedData,omitempty"` 1131 1132 // Id: Unique id for this annotation data. 1133 Id string `json:"id,omitempty"` 1134 1135 // Kind: Resource Type 1136 Kind string `json:"kind,omitempty"` 1137 1138 // LayerId: The Layer id for this data. * 1139 LayerId string `json:"layerId,omitempty"` 1140 1141 // SelfLink: URL for this resource. * 1142 SelfLink string `json:"selfLink,omitempty"` 1143 1144 // Updated: Timestamp for the last time this data was updated. (RFC 3339 1145 // UTC date-time format). 1146 Updated string `json:"updated,omitempty"` 1147 1148 // VolumeId: The volume id for this data. * 1149 VolumeId string `json:"volumeId,omitempty"` 1150 1151 // ServerResponse contains the HTTP response code and headers from the 1152 // server. 1153 googleapi.ServerResponse `json:"-"` 1154 1155 // ForceSendFields is a list of field names (e.g. "AnnotationType") to 1156 // unconditionally include in API requests. By default, fields with 1157 // empty values are omitted from API requests. However, any non-pointer, 1158 // non-interface field appearing in ForceSendFields will be sent to the 1159 // server regardless of whether the field is empty or not. This may be 1160 // used to include empty fields in Patch requests. 1161 ForceSendFields []string `json:"-"` 1162 1163 // NullFields is a list of field names (e.g. "AnnotationType") to 1164 // include in API requests with the JSON null value. By default, fields 1165 // with empty values are omitted from API requests. However, any field 1166 // with an empty value appearing in NullFields will be sent to the 1167 // server as null. It is an error if a field in this list has a 1168 // non-empty value. This may be used to include null fields in Patch 1169 // requests. 1170 NullFields []string `json:"-"` 1171} 1172 1173func (s *DictionaryAnnotationdata) MarshalJSON() ([]byte, error) { 1174 type NoMethod DictionaryAnnotationdata 1175 raw := NoMethod(*s) 1176 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1177} 1178 1179type Dictlayerdata struct { 1180 Common *DictlayerdataCommon `json:"common,omitempty"` 1181 1182 Dict *DictlayerdataDict `json:"dict,omitempty"` 1183 1184 Kind string `json:"kind,omitempty"` 1185 1186 // ForceSendFields is a list of field names (e.g. "Common") to 1187 // unconditionally include in API requests. By default, fields with 1188 // empty values are omitted from API requests. However, any non-pointer, 1189 // non-interface field appearing in ForceSendFields will be sent to the 1190 // server regardless of whether the field is empty or not. This may be 1191 // used to include empty fields in Patch requests. 1192 ForceSendFields []string `json:"-"` 1193 1194 // NullFields is a list of field names (e.g. "Common") to include in API 1195 // requests with the JSON null value. By default, fields with empty 1196 // values are omitted from API requests. However, any field with an 1197 // empty value appearing in NullFields will be sent to the server as 1198 // null. It is an error if a field in this list has a non-empty value. 1199 // This may be used to include null fields in Patch requests. 1200 NullFields []string `json:"-"` 1201} 1202 1203func (s *Dictlayerdata) MarshalJSON() ([]byte, error) { 1204 type NoMethod Dictlayerdata 1205 raw := NoMethod(*s) 1206 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1207} 1208 1209type DictlayerdataCommon struct { 1210 // Title: The display title and localized canonical name to use when 1211 // searching for this entity on Google search. 1212 Title string `json:"title,omitempty"` 1213 1214 // ForceSendFields is a list of field names (e.g. "Title") to 1215 // unconditionally include in API requests. By default, fields with 1216 // empty values are omitted from API requests. However, any non-pointer, 1217 // non-interface field appearing in ForceSendFields will be sent to the 1218 // server regardless of whether the field is empty or not. This may be 1219 // used to include empty fields in Patch requests. 1220 ForceSendFields []string `json:"-"` 1221 1222 // NullFields is a list of field names (e.g. "Title") to include in API 1223 // requests with the JSON null value. By default, fields with empty 1224 // values are omitted from API requests. However, any field with an 1225 // empty value appearing in NullFields will be sent to the server as 1226 // null. It is an error if a field in this list has a non-empty value. 1227 // This may be used to include null fields in Patch requests. 1228 NullFields []string `json:"-"` 1229} 1230 1231func (s *DictlayerdataCommon) MarshalJSON() ([]byte, error) { 1232 type NoMethod DictlayerdataCommon 1233 raw := NoMethod(*s) 1234 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1235} 1236 1237type DictlayerdataDict struct { 1238 // Source: The source, url and attribution for this dictionary data. 1239 Source *DictlayerdataDictSource `json:"source,omitempty"` 1240 1241 Words []*DictlayerdataDictWords `json:"words,omitempty"` 1242 1243 // ForceSendFields is a list of field names (e.g. "Source") to 1244 // unconditionally include in API requests. By default, fields with 1245 // empty values are omitted from API requests. However, any non-pointer, 1246 // non-interface field appearing in ForceSendFields will be sent to the 1247 // server regardless of whether the field is empty or not. This may be 1248 // used to include empty fields in Patch requests. 1249 ForceSendFields []string `json:"-"` 1250 1251 // NullFields is a list of field names (e.g. "Source") to include in API 1252 // requests with the JSON null value. By default, fields with empty 1253 // values are omitted from API requests. However, any field with an 1254 // empty value appearing in NullFields will be sent to the server as 1255 // null. It is an error if a field in this list has a non-empty value. 1256 // This may be used to include null fields in Patch requests. 1257 NullFields []string `json:"-"` 1258} 1259 1260func (s *DictlayerdataDict) MarshalJSON() ([]byte, error) { 1261 type NoMethod DictlayerdataDict 1262 raw := NoMethod(*s) 1263 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1264} 1265 1266// DictlayerdataDictSource: The source, url and attribution for this 1267// dictionary data. 1268type DictlayerdataDictSource struct { 1269 Attribution string `json:"attribution,omitempty"` 1270 1271 Url string `json:"url,omitempty"` 1272 1273 // ForceSendFields is a list of field names (e.g. "Attribution") to 1274 // unconditionally include in API requests. By default, fields with 1275 // empty values are omitted from API requests. However, any non-pointer, 1276 // non-interface field appearing in ForceSendFields will be sent to the 1277 // server regardless of whether the field is empty or not. This may be 1278 // used to include empty fields in Patch requests. 1279 ForceSendFields []string `json:"-"` 1280 1281 // NullFields is a list of field names (e.g. "Attribution") to include 1282 // in API requests with the JSON null value. By default, fields with 1283 // empty values are omitted from API requests. However, any field with 1284 // an empty value appearing in NullFields will be sent to the server as 1285 // null. It is an error if a field in this list has a non-empty value. 1286 // This may be used to include null fields in Patch requests. 1287 NullFields []string `json:"-"` 1288} 1289 1290func (s *DictlayerdataDictSource) MarshalJSON() ([]byte, error) { 1291 type NoMethod DictlayerdataDictSource 1292 raw := NoMethod(*s) 1293 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1294} 1295 1296type DictlayerdataDictWords struct { 1297 Derivatives []*DictlayerdataDictWordsDerivatives `json:"derivatives,omitempty"` 1298 1299 Examples []*DictlayerdataDictWordsExamples `json:"examples,omitempty"` 1300 1301 Senses []*DictlayerdataDictWordsSenses `json:"senses,omitempty"` 1302 1303 // Source: The words with different meanings but not related words, e.g. 1304 // "go" (game) and "go" (verb). 1305 Source *DictlayerdataDictWordsSource `json:"source,omitempty"` 1306 1307 // ForceSendFields is a list of field names (e.g. "Derivatives") to 1308 // unconditionally include in API requests. By default, fields with 1309 // empty values are omitted from API requests. However, any non-pointer, 1310 // non-interface field appearing in ForceSendFields will be sent to the 1311 // server regardless of whether the field is empty or not. This may be 1312 // used to include empty fields in Patch requests. 1313 ForceSendFields []string `json:"-"` 1314 1315 // NullFields is a list of field names (e.g. "Derivatives") to include 1316 // in API requests with the JSON null value. By default, fields with 1317 // empty values are omitted from API requests. However, any field with 1318 // an empty value appearing in NullFields will be sent to the server as 1319 // null. It is an error if a field in this list has a non-empty value. 1320 // This may be used to include null fields in Patch requests. 1321 NullFields []string `json:"-"` 1322} 1323 1324func (s *DictlayerdataDictWords) MarshalJSON() ([]byte, error) { 1325 type NoMethod DictlayerdataDictWords 1326 raw := NoMethod(*s) 1327 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1328} 1329 1330type DictlayerdataDictWordsDerivatives struct { 1331 Source *DictlayerdataDictWordsDerivativesSource `json:"source,omitempty"` 1332 1333 Text string `json:"text,omitempty"` 1334 1335 // ForceSendFields is a list of field names (e.g. "Source") to 1336 // unconditionally include in API requests. By default, fields with 1337 // empty values are omitted from API requests. However, any non-pointer, 1338 // non-interface field appearing in ForceSendFields will be sent to the 1339 // server regardless of whether the field is empty or not. This may be 1340 // used to include empty fields in Patch requests. 1341 ForceSendFields []string `json:"-"` 1342 1343 // NullFields is a list of field names (e.g. "Source") to include in API 1344 // requests with the JSON null value. By default, fields with empty 1345 // values are omitted from API requests. However, any field with an 1346 // empty value appearing in NullFields will be sent to the server as 1347 // null. It is an error if a field in this list has a non-empty value. 1348 // This may be used to include null fields in Patch requests. 1349 NullFields []string `json:"-"` 1350} 1351 1352func (s *DictlayerdataDictWordsDerivatives) MarshalJSON() ([]byte, error) { 1353 type NoMethod DictlayerdataDictWordsDerivatives 1354 raw := NoMethod(*s) 1355 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1356} 1357 1358type DictlayerdataDictWordsDerivativesSource struct { 1359 Attribution string `json:"attribution,omitempty"` 1360 1361 Url string `json:"url,omitempty"` 1362 1363 // ForceSendFields is a list of field names (e.g. "Attribution") to 1364 // unconditionally include in API requests. By default, fields with 1365 // empty values are omitted from API requests. However, any non-pointer, 1366 // non-interface field appearing in ForceSendFields will be sent to the 1367 // server regardless of whether the field is empty or not. This may be 1368 // used to include empty fields in Patch requests. 1369 ForceSendFields []string `json:"-"` 1370 1371 // NullFields is a list of field names (e.g. "Attribution") to include 1372 // in API requests with the JSON null value. By default, fields with 1373 // empty values are omitted from API requests. However, any field with 1374 // an empty value appearing in NullFields will be sent to the server as 1375 // null. It is an error if a field in this list has a non-empty value. 1376 // This may be used to include null fields in Patch requests. 1377 NullFields []string `json:"-"` 1378} 1379 1380func (s *DictlayerdataDictWordsDerivativesSource) MarshalJSON() ([]byte, error) { 1381 type NoMethod DictlayerdataDictWordsDerivativesSource 1382 raw := NoMethod(*s) 1383 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1384} 1385 1386type DictlayerdataDictWordsExamples struct { 1387 Source *DictlayerdataDictWordsExamplesSource `json:"source,omitempty"` 1388 1389 Text string `json:"text,omitempty"` 1390 1391 // ForceSendFields is a list of field names (e.g. "Source") to 1392 // unconditionally include in API requests. By default, fields with 1393 // empty values are omitted from API requests. However, any non-pointer, 1394 // non-interface field appearing in ForceSendFields will be sent to the 1395 // server regardless of whether the field is empty or not. This may be 1396 // used to include empty fields in Patch requests. 1397 ForceSendFields []string `json:"-"` 1398 1399 // NullFields is a list of field names (e.g. "Source") to include in API 1400 // requests with the JSON null value. By default, fields with empty 1401 // values are omitted from API requests. However, any field with an 1402 // empty value appearing in NullFields will be sent to the server as 1403 // null. It is an error if a field in this list has a non-empty value. 1404 // This may be used to include null fields in Patch requests. 1405 NullFields []string `json:"-"` 1406} 1407 1408func (s *DictlayerdataDictWordsExamples) MarshalJSON() ([]byte, error) { 1409 type NoMethod DictlayerdataDictWordsExamples 1410 raw := NoMethod(*s) 1411 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1412} 1413 1414type DictlayerdataDictWordsExamplesSource struct { 1415 Attribution string `json:"attribution,omitempty"` 1416 1417 Url string `json:"url,omitempty"` 1418 1419 // ForceSendFields is a list of field names (e.g. "Attribution") to 1420 // unconditionally include in API requests. By default, fields with 1421 // empty values are omitted from API requests. However, any non-pointer, 1422 // non-interface field appearing in ForceSendFields will be sent to the 1423 // server regardless of whether the field is empty or not. This may be 1424 // used to include empty fields in Patch requests. 1425 ForceSendFields []string `json:"-"` 1426 1427 // NullFields is a list of field names (e.g. "Attribution") to include 1428 // in API requests with the JSON null value. By default, fields with 1429 // empty values are omitted from API requests. However, any field with 1430 // an empty value appearing in NullFields will be sent to the server as 1431 // null. It is an error if a field in this list has a non-empty value. 1432 // This may be used to include null fields in Patch requests. 1433 NullFields []string `json:"-"` 1434} 1435 1436func (s *DictlayerdataDictWordsExamplesSource) MarshalJSON() ([]byte, error) { 1437 type NoMethod DictlayerdataDictWordsExamplesSource 1438 raw := NoMethod(*s) 1439 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1440} 1441 1442type DictlayerdataDictWordsSenses struct { 1443 Conjugations []*DictlayerdataDictWordsSensesConjugations `json:"conjugations,omitempty"` 1444 1445 Definitions []*DictlayerdataDictWordsSensesDefinitions `json:"definitions,omitempty"` 1446 1447 PartOfSpeech string `json:"partOfSpeech,omitempty"` 1448 1449 Pronunciation string `json:"pronunciation,omitempty"` 1450 1451 PronunciationUrl string `json:"pronunciationUrl,omitempty"` 1452 1453 Source *DictlayerdataDictWordsSensesSource `json:"source,omitempty"` 1454 1455 Syllabification string `json:"syllabification,omitempty"` 1456 1457 Synonyms []*DictlayerdataDictWordsSensesSynonyms `json:"synonyms,omitempty"` 1458 1459 // ForceSendFields is a list of field names (e.g. "Conjugations") to 1460 // unconditionally include in API requests. By default, fields with 1461 // empty values are omitted from API requests. However, any non-pointer, 1462 // non-interface field appearing in ForceSendFields will be sent to the 1463 // server regardless of whether the field is empty or not. This may be 1464 // used to include empty fields in Patch requests. 1465 ForceSendFields []string `json:"-"` 1466 1467 // NullFields is a list of field names (e.g. "Conjugations") to include 1468 // in API requests with the JSON null value. By default, fields with 1469 // empty values are omitted from API requests. However, any field with 1470 // an empty value appearing in NullFields will be sent to the server as 1471 // null. It is an error if a field in this list has a non-empty value. 1472 // This may be used to include null fields in Patch requests. 1473 NullFields []string `json:"-"` 1474} 1475 1476func (s *DictlayerdataDictWordsSenses) MarshalJSON() ([]byte, error) { 1477 type NoMethod DictlayerdataDictWordsSenses 1478 raw := NoMethod(*s) 1479 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1480} 1481 1482type DictlayerdataDictWordsSensesConjugations struct { 1483 Type string `json:"type,omitempty"` 1484 1485 Value string `json:"value,omitempty"` 1486 1487 // ForceSendFields is a list of field names (e.g. "Type") to 1488 // unconditionally include in API requests. By default, fields with 1489 // empty values are omitted from API requests. However, any non-pointer, 1490 // non-interface field appearing in ForceSendFields will be sent to the 1491 // server regardless of whether the field is empty or not. This may be 1492 // used to include empty fields in Patch requests. 1493 ForceSendFields []string `json:"-"` 1494 1495 // NullFields is a list of field names (e.g. "Type") to include in API 1496 // requests with the JSON null value. By default, fields with empty 1497 // values are omitted from API requests. However, any field with an 1498 // empty value appearing in NullFields will be sent to the server as 1499 // null. It is an error if a field in this list has a non-empty value. 1500 // This may be used to include null fields in Patch requests. 1501 NullFields []string `json:"-"` 1502} 1503 1504func (s *DictlayerdataDictWordsSensesConjugations) MarshalJSON() ([]byte, error) { 1505 type NoMethod DictlayerdataDictWordsSensesConjugations 1506 raw := NoMethod(*s) 1507 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1508} 1509 1510type DictlayerdataDictWordsSensesDefinitions struct { 1511 Definition string `json:"definition,omitempty"` 1512 1513 Examples []*DictlayerdataDictWordsSensesDefinitionsExamples `json:"examples,omitempty"` 1514 1515 // ForceSendFields is a list of field names (e.g. "Definition") to 1516 // unconditionally include in API requests. By default, fields with 1517 // empty values are omitted from API requests. However, any non-pointer, 1518 // non-interface field appearing in ForceSendFields will be sent to the 1519 // server regardless of whether the field is empty or not. This may be 1520 // used to include empty fields in Patch requests. 1521 ForceSendFields []string `json:"-"` 1522 1523 // NullFields is a list of field names (e.g. "Definition") to include in 1524 // API requests with the JSON null value. By default, fields with empty 1525 // values are omitted from API requests. However, any field with an 1526 // empty value appearing in NullFields will be sent to the server as 1527 // null. It is an error if a field in this list has a non-empty value. 1528 // This may be used to include null fields in Patch requests. 1529 NullFields []string `json:"-"` 1530} 1531 1532func (s *DictlayerdataDictWordsSensesDefinitions) MarshalJSON() ([]byte, error) { 1533 type NoMethod DictlayerdataDictWordsSensesDefinitions 1534 raw := NoMethod(*s) 1535 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1536} 1537 1538type DictlayerdataDictWordsSensesDefinitionsExamples struct { 1539 Source *DictlayerdataDictWordsSensesDefinitionsExamplesSource `json:"source,omitempty"` 1540 1541 Text string `json:"text,omitempty"` 1542 1543 // ForceSendFields is a list of field names (e.g. "Source") to 1544 // unconditionally include in API requests. By default, fields with 1545 // empty values are omitted from API requests. However, any non-pointer, 1546 // non-interface field appearing in ForceSendFields will be sent to the 1547 // server regardless of whether the field is empty or not. This may be 1548 // used to include empty fields in Patch requests. 1549 ForceSendFields []string `json:"-"` 1550 1551 // NullFields is a list of field names (e.g. "Source") to include in API 1552 // requests with the JSON null value. By default, fields with empty 1553 // values are omitted from API requests. However, any field with an 1554 // empty value appearing in NullFields will be sent to the server as 1555 // null. It is an error if a field in this list has a non-empty value. 1556 // This may be used to include null fields in Patch requests. 1557 NullFields []string `json:"-"` 1558} 1559 1560func (s *DictlayerdataDictWordsSensesDefinitionsExamples) MarshalJSON() ([]byte, error) { 1561 type NoMethod DictlayerdataDictWordsSensesDefinitionsExamples 1562 raw := NoMethod(*s) 1563 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1564} 1565 1566type DictlayerdataDictWordsSensesDefinitionsExamplesSource struct { 1567 Attribution string `json:"attribution,omitempty"` 1568 1569 Url string `json:"url,omitempty"` 1570 1571 // ForceSendFields is a list of field names (e.g. "Attribution") to 1572 // unconditionally include in API requests. By default, fields with 1573 // empty values are omitted from API requests. However, any non-pointer, 1574 // non-interface field appearing in ForceSendFields will be sent to the 1575 // server regardless of whether the field is empty or not. This may be 1576 // used to include empty fields in Patch requests. 1577 ForceSendFields []string `json:"-"` 1578 1579 // NullFields is a list of field names (e.g. "Attribution") to include 1580 // in API requests with the JSON null value. By default, fields with 1581 // empty values are omitted from API requests. However, any field with 1582 // an empty value appearing in NullFields will be sent to the server as 1583 // null. It is an error if a field in this list has a non-empty value. 1584 // This may be used to include null fields in Patch requests. 1585 NullFields []string `json:"-"` 1586} 1587 1588func (s *DictlayerdataDictWordsSensesDefinitionsExamplesSource) MarshalJSON() ([]byte, error) { 1589 type NoMethod DictlayerdataDictWordsSensesDefinitionsExamplesSource 1590 raw := NoMethod(*s) 1591 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1592} 1593 1594type DictlayerdataDictWordsSensesSource struct { 1595 Attribution string `json:"attribution,omitempty"` 1596 1597 Url string `json:"url,omitempty"` 1598 1599 // ForceSendFields is a list of field names (e.g. "Attribution") to 1600 // unconditionally include in API requests. By default, fields with 1601 // empty values are omitted from API requests. However, any non-pointer, 1602 // non-interface field appearing in ForceSendFields will be sent to the 1603 // server regardless of whether the field is empty or not. This may be 1604 // used to include empty fields in Patch requests. 1605 ForceSendFields []string `json:"-"` 1606 1607 // NullFields is a list of field names (e.g. "Attribution") to include 1608 // in API requests with the JSON null value. By default, fields with 1609 // empty values are omitted from API requests. However, any field with 1610 // an empty value appearing in NullFields will be sent to the server as 1611 // null. It is an error if a field in this list has a non-empty value. 1612 // This may be used to include null fields in Patch requests. 1613 NullFields []string `json:"-"` 1614} 1615 1616func (s *DictlayerdataDictWordsSensesSource) MarshalJSON() ([]byte, error) { 1617 type NoMethod DictlayerdataDictWordsSensesSource 1618 raw := NoMethod(*s) 1619 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1620} 1621 1622type DictlayerdataDictWordsSensesSynonyms struct { 1623 Source *DictlayerdataDictWordsSensesSynonymsSource `json:"source,omitempty"` 1624 1625 Text string `json:"text,omitempty"` 1626 1627 // ForceSendFields is a list of field names (e.g. "Source") to 1628 // unconditionally include in API requests. By default, fields with 1629 // empty values are omitted from API requests. However, any non-pointer, 1630 // non-interface field appearing in ForceSendFields will be sent to the 1631 // server regardless of whether the field is empty or not. This may be 1632 // used to include empty fields in Patch requests. 1633 ForceSendFields []string `json:"-"` 1634 1635 // NullFields is a list of field names (e.g. "Source") to include in API 1636 // requests with the JSON null value. By default, fields with empty 1637 // values are omitted from API requests. However, any field with an 1638 // empty value appearing in NullFields will be sent to the server as 1639 // null. It is an error if a field in this list has a non-empty value. 1640 // This may be used to include null fields in Patch requests. 1641 NullFields []string `json:"-"` 1642} 1643 1644func (s *DictlayerdataDictWordsSensesSynonyms) MarshalJSON() ([]byte, error) { 1645 type NoMethod DictlayerdataDictWordsSensesSynonyms 1646 raw := NoMethod(*s) 1647 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1648} 1649 1650type DictlayerdataDictWordsSensesSynonymsSource struct { 1651 Attribution string `json:"attribution,omitempty"` 1652 1653 Url string `json:"url,omitempty"` 1654 1655 // ForceSendFields is a list of field names (e.g. "Attribution") to 1656 // unconditionally include in API requests. By default, fields with 1657 // empty values are omitted from API requests. However, any non-pointer, 1658 // non-interface field appearing in ForceSendFields will be sent to the 1659 // server regardless of whether the field is empty or not. This may be 1660 // used to include empty fields in Patch requests. 1661 ForceSendFields []string `json:"-"` 1662 1663 // NullFields is a list of field names (e.g. "Attribution") to include 1664 // in API requests with the JSON null value. By default, fields with 1665 // empty values are omitted from API requests. However, any field with 1666 // an empty value appearing in NullFields will be sent to the server as 1667 // null. It is an error if a field in this list has a non-empty value. 1668 // This may be used to include null fields in Patch requests. 1669 NullFields []string `json:"-"` 1670} 1671 1672func (s *DictlayerdataDictWordsSensesSynonymsSource) MarshalJSON() ([]byte, error) { 1673 type NoMethod DictlayerdataDictWordsSensesSynonymsSource 1674 raw := NoMethod(*s) 1675 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1676} 1677 1678// DictlayerdataDictWordsSource: The words with different meanings but 1679// not related words, e.g. "go" (game) and "go" (verb). 1680type DictlayerdataDictWordsSource struct { 1681 Attribution string `json:"attribution,omitempty"` 1682 1683 Url string `json:"url,omitempty"` 1684 1685 // ForceSendFields is a list of field names (e.g. "Attribution") to 1686 // unconditionally include in API requests. By default, fields with 1687 // empty values are omitted from API requests. However, any non-pointer, 1688 // non-interface field appearing in ForceSendFields will be sent to the 1689 // server regardless of whether the field is empty or not. This may be 1690 // used to include empty fields in Patch requests. 1691 ForceSendFields []string `json:"-"` 1692 1693 // NullFields is a list of field names (e.g. "Attribution") to include 1694 // in API requests with the JSON null value. By default, fields with 1695 // empty values are omitted from API requests. However, any field with 1696 // an empty value appearing in NullFields will be sent to the server as 1697 // null. It is an error if a field in this list has a non-empty value. 1698 // This may be used to include null fields in Patch requests. 1699 NullFields []string `json:"-"` 1700} 1701 1702func (s *DictlayerdataDictWordsSource) MarshalJSON() ([]byte, error) { 1703 type NoMethod DictlayerdataDictWordsSource 1704 raw := NoMethod(*s) 1705 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1706} 1707 1708type Discoveryclusters struct { 1709 Clusters []*DiscoveryclustersClusters `json:"clusters,omitempty"` 1710 1711 // Kind: Resorce type. 1712 Kind string `json:"kind,omitempty"` 1713 1714 TotalClusters int64 `json:"totalClusters,omitempty"` 1715 1716 // ServerResponse contains the HTTP response code and headers from the 1717 // server. 1718 googleapi.ServerResponse `json:"-"` 1719 1720 // ForceSendFields is a list of field names (e.g. "Clusters") to 1721 // unconditionally include in API requests. By default, fields with 1722 // empty values are omitted from API requests. However, any non-pointer, 1723 // non-interface field appearing in ForceSendFields will be sent to the 1724 // server regardless of whether the field is empty or not. This may be 1725 // used to include empty fields in Patch requests. 1726 ForceSendFields []string `json:"-"` 1727 1728 // NullFields is a list of field names (e.g. "Clusters") to include in 1729 // API requests with the JSON null value. By default, fields with empty 1730 // values are omitted from API requests. However, any field with an 1731 // empty value appearing in NullFields will be sent to the server as 1732 // null. It is an error if a field in this list has a non-empty value. 1733 // This may be used to include null fields in Patch requests. 1734 NullFields []string `json:"-"` 1735} 1736 1737func (s *Discoveryclusters) MarshalJSON() ([]byte, error) { 1738 type NoMethod Discoveryclusters 1739 raw := NoMethod(*s) 1740 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1741} 1742 1743type DiscoveryclustersClusters struct { 1744 BannerWithContentContainer *DiscoveryclustersClustersBannerWithContentContainer `json:"banner_with_content_container,omitempty"` 1745 1746 SubTitle string `json:"subTitle,omitempty"` 1747 1748 Title string `json:"title,omitempty"` 1749 1750 TotalVolumes int64 `json:"totalVolumes,omitempty"` 1751 1752 Uid string `json:"uid,omitempty"` 1753 1754 Volumes []*Volume `json:"volumes,omitempty"` 1755 1756 // ForceSendFields is a list of field names (e.g. 1757 // "BannerWithContentContainer") to unconditionally include in API 1758 // requests. By default, fields with empty values are omitted from API 1759 // requests. However, any non-pointer, non-interface field appearing in 1760 // ForceSendFields will be sent to the server regardless of whether the 1761 // field is empty or not. This may be used to include empty fields in 1762 // Patch requests. 1763 ForceSendFields []string `json:"-"` 1764 1765 // NullFields is a list of field names (e.g. 1766 // "BannerWithContentContainer") to include in API requests with the 1767 // JSON null value. By default, fields with empty values are omitted 1768 // from API requests. However, any field with an empty value appearing 1769 // in NullFields will be sent to the server as null. It is an error if a 1770 // field in this list has a non-empty value. This may be used to include 1771 // null fields in Patch requests. 1772 NullFields []string `json:"-"` 1773} 1774 1775func (s *DiscoveryclustersClusters) MarshalJSON() ([]byte, error) { 1776 type NoMethod DiscoveryclustersClusters 1777 raw := NoMethod(*s) 1778 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1779} 1780 1781type DiscoveryclustersClustersBannerWithContentContainer struct { 1782 FillColorArgb string `json:"fillColorArgb,omitempty"` 1783 1784 ImageUrl string `json:"imageUrl,omitempty"` 1785 1786 MaskColorArgb string `json:"maskColorArgb,omitempty"` 1787 1788 MoreButtonText string `json:"moreButtonText,omitempty"` 1789 1790 MoreButtonUrl string `json:"moreButtonUrl,omitempty"` 1791 1792 TextColorArgb string `json:"textColorArgb,omitempty"` 1793 1794 // ForceSendFields is a list of field names (e.g. "FillColorArgb") to 1795 // unconditionally include in API requests. By default, fields with 1796 // empty values are omitted from API requests. However, any non-pointer, 1797 // non-interface field appearing in ForceSendFields will be sent to the 1798 // server regardless of whether the field is empty or not. This may be 1799 // used to include empty fields in Patch requests. 1800 ForceSendFields []string `json:"-"` 1801 1802 // NullFields is a list of field names (e.g. "FillColorArgb") to include 1803 // in API requests with the JSON null value. By default, fields with 1804 // empty values are omitted from API requests. However, any field with 1805 // an empty value appearing in NullFields will be sent to the server as 1806 // null. It is an error if a field in this list has a non-empty value. 1807 // This may be used to include null fields in Patch requests. 1808 NullFields []string `json:"-"` 1809} 1810 1811func (s *DiscoveryclustersClustersBannerWithContentContainer) MarshalJSON() ([]byte, error) { 1812 type NoMethod DiscoveryclustersClustersBannerWithContentContainer 1813 raw := NoMethod(*s) 1814 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1815} 1816 1817type DownloadAccessRestriction struct { 1818 // DeviceAllowed: If restricted, whether access is granted for this 1819 // (user, device, volume). 1820 DeviceAllowed bool `json:"deviceAllowed,omitempty"` 1821 1822 // DownloadsAcquired: If restricted, the number of content download 1823 // licenses already acquired (including the requesting client, if 1824 // licensed). 1825 DownloadsAcquired int64 `json:"downloadsAcquired,omitempty"` 1826 1827 // JustAcquired: If deviceAllowed, whether access was just acquired with 1828 // this request. 1829 JustAcquired bool `json:"justAcquired,omitempty"` 1830 1831 // Kind: Resource type. 1832 Kind string `json:"kind,omitempty"` 1833 1834 // MaxDownloadDevices: If restricted, the maximum number of content 1835 // download licenses for this volume. 1836 MaxDownloadDevices int64 `json:"maxDownloadDevices,omitempty"` 1837 1838 // Message: Error/warning message. 1839 Message string `json:"message,omitempty"` 1840 1841 // Nonce: Client nonce for verification. Download access and 1842 // client-validation only. 1843 Nonce string `json:"nonce,omitempty"` 1844 1845 // ReasonCode: Error/warning reason code. Additional codes may be added 1846 // in the future. 0 OK 100 ACCESS_DENIED_PUBLISHER_LIMIT 101 1847 // ACCESS_DENIED_LIMIT 200 WARNING_USED_LAST_ACCESS 1848 ReasonCode string `json:"reasonCode,omitempty"` 1849 1850 // Restricted: Whether this volume has any download access restrictions. 1851 Restricted bool `json:"restricted,omitempty"` 1852 1853 // Signature: Response signature. 1854 Signature string `json:"signature,omitempty"` 1855 1856 // Source: Client app identifier for verification. Download access and 1857 // client-validation only. 1858 Source string `json:"source,omitempty"` 1859 1860 // VolumeId: Identifies the volume for which this entry applies. 1861 VolumeId string `json:"volumeId,omitempty"` 1862 1863 // ForceSendFields is a list of field names (e.g. "DeviceAllowed") to 1864 // unconditionally include in API requests. By default, fields with 1865 // empty values are omitted from API requests. However, any non-pointer, 1866 // non-interface field appearing in ForceSendFields will be sent to the 1867 // server regardless of whether the field is empty or not. This may be 1868 // used to include empty fields in Patch requests. 1869 ForceSendFields []string `json:"-"` 1870 1871 // NullFields is a list of field names (e.g. "DeviceAllowed") to include 1872 // in API requests with the JSON null value. By default, fields with 1873 // empty values are omitted from API requests. However, any field with 1874 // an empty value appearing in NullFields will be sent to the server as 1875 // null. It is an error if a field in this list has a non-empty value. 1876 // This may be used to include null fields in Patch requests. 1877 NullFields []string `json:"-"` 1878} 1879 1880func (s *DownloadAccessRestriction) MarshalJSON() ([]byte, error) { 1881 type NoMethod DownloadAccessRestriction 1882 raw := NoMethod(*s) 1883 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1884} 1885 1886type DownloadAccesses struct { 1887 // DownloadAccessList: A list of download access responses. 1888 DownloadAccessList []*DownloadAccessRestriction `json:"downloadAccessList,omitempty"` 1889 1890 // Kind: Resource type. 1891 Kind string `json:"kind,omitempty"` 1892 1893 // ServerResponse contains the HTTP response code and headers from the 1894 // server. 1895 googleapi.ServerResponse `json:"-"` 1896 1897 // ForceSendFields is a list of field names (e.g. "DownloadAccessList") 1898 // to unconditionally include in API requests. By default, fields with 1899 // empty values are omitted from API requests. However, any non-pointer, 1900 // non-interface field appearing in ForceSendFields will be sent to the 1901 // server regardless of whether the field is empty or not. This may be 1902 // used to include empty fields in Patch requests. 1903 ForceSendFields []string `json:"-"` 1904 1905 // NullFields is a list of field names (e.g. "DownloadAccessList") to 1906 // include in API requests with the JSON null value. By default, fields 1907 // with empty values are omitted from API requests. However, any field 1908 // with an empty value appearing in NullFields will be sent to the 1909 // server as null. It is an error if a field in this list has a 1910 // non-empty value. This may be used to include null fields in Patch 1911 // requests. 1912 NullFields []string `json:"-"` 1913} 1914 1915func (s *DownloadAccesses) MarshalJSON() ([]byte, error) { 1916 type NoMethod DownloadAccesses 1917 raw := NoMethod(*s) 1918 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1919} 1920 1921// Empty: A generic empty message that you can re-use to avoid defining 1922// duplicated empty messages in your APIs. A typical example is to use 1923// it as the request or the response type of an API method. For 1924// instance: service Foo { rpc Bar(google.protobuf.Empty) returns 1925// (google.protobuf.Empty); } The JSON representation for `Empty` is 1926// empty JSON object `{}`. 1927type Empty struct { 1928 // ServerResponse contains the HTTP response code and headers from the 1929 // server. 1930 googleapi.ServerResponse `json:"-"` 1931} 1932 1933type FamilyInfo struct { 1934 // Kind: Resource type. 1935 Kind string `json:"kind,omitempty"` 1936 1937 // Membership: Family membership info of the user that made the request. 1938 Membership *FamilyInfoMembership `json:"membership,omitempty"` 1939 1940 // ServerResponse contains the HTTP response code and headers from the 1941 // server. 1942 googleapi.ServerResponse `json:"-"` 1943 1944 // ForceSendFields is a list of field names (e.g. "Kind") to 1945 // unconditionally include in API requests. By default, fields with 1946 // empty values are omitted from API requests. However, any non-pointer, 1947 // non-interface field appearing in ForceSendFields will be sent to the 1948 // server regardless of whether the field is empty or not. This may be 1949 // used to include empty fields in Patch requests. 1950 ForceSendFields []string `json:"-"` 1951 1952 // NullFields is a list of field names (e.g. "Kind") to include in API 1953 // requests with the JSON null value. By default, fields with empty 1954 // values are omitted from API requests. However, any field with an 1955 // empty value appearing in NullFields will be sent to the server as 1956 // null. It is an error if a field in this list has a non-empty value. 1957 // This may be used to include null fields in Patch requests. 1958 NullFields []string `json:"-"` 1959} 1960 1961func (s *FamilyInfo) MarshalJSON() ([]byte, error) { 1962 type NoMethod FamilyInfo 1963 raw := NoMethod(*s) 1964 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1965} 1966 1967// FamilyInfoMembership: Family membership info of the user that made 1968// the request. 1969type FamilyInfoMembership struct { 1970 // AcquirePermission: Restrictions on user buying and acquiring content. 1971 AcquirePermission string `json:"acquirePermission,omitempty"` 1972 1973 // AgeGroup: The age group of the user. 1974 AgeGroup string `json:"ageGroup,omitempty"` 1975 1976 // AllowedMaturityRating: The maximum allowed maturity rating for the 1977 // user. 1978 AllowedMaturityRating string `json:"allowedMaturityRating,omitempty"` 1979 1980 IsInFamily bool `json:"isInFamily,omitempty"` 1981 1982 // Role: The role of the user in the family. 1983 Role string `json:"role,omitempty"` 1984 1985 // ForceSendFields is a list of field names (e.g. "AcquirePermission") 1986 // to unconditionally include in API requests. By default, fields with 1987 // empty values are omitted from API requests. However, any non-pointer, 1988 // non-interface field appearing in ForceSendFields will be sent to the 1989 // server regardless of whether the field is empty or not. This may be 1990 // used to include empty fields in Patch requests. 1991 ForceSendFields []string `json:"-"` 1992 1993 // NullFields is a list of field names (e.g. "AcquirePermission") to 1994 // include in API requests with the JSON null value. By default, fields 1995 // with empty values are omitted from API requests. However, any field 1996 // with an empty value appearing in NullFields will be sent to the 1997 // server as null. It is an error if a field in this list has a 1998 // non-empty value. This may be used to include null fields in Patch 1999 // requests. 2000 NullFields []string `json:"-"` 2001} 2002 2003func (s *FamilyInfoMembership) MarshalJSON() ([]byte, error) { 2004 type NoMethod FamilyInfoMembership 2005 raw := NoMethod(*s) 2006 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2007} 2008 2009type GeoAnnotationdata struct { 2010 // AnnotationType: The type of annotation this data is for. 2011 AnnotationType string `json:"annotationType,omitempty"` 2012 2013 // Data: JSON encoded data for this geo annotation data. Emitted with 2014 // name 'data' in JSON output. Either this or dict_data will be 2015 // populated. 2016 Data *Geolayerdata `json:"data,omitempty"` 2017 2018 // EncodedData: Base64 encoded data for this annotation data. 2019 EncodedData string `json:"encodedData,omitempty"` 2020 2021 // Id: Unique id for this annotation data. 2022 Id string `json:"id,omitempty"` 2023 2024 // Kind: Resource Type 2025 Kind string `json:"kind,omitempty"` 2026 2027 // LayerId: The Layer id for this data. * 2028 LayerId string `json:"layerId,omitempty"` 2029 2030 // SelfLink: URL for this resource. * 2031 SelfLink string `json:"selfLink,omitempty"` 2032 2033 // Updated: Timestamp for the last time this data was updated. (RFC 3339 2034 // UTC date-time format). 2035 Updated string `json:"updated,omitempty"` 2036 2037 // VolumeId: The volume id for this data. * 2038 VolumeId string `json:"volumeId,omitempty"` 2039 2040 // ForceSendFields is a list of field names (e.g. "AnnotationType") to 2041 // unconditionally include in API requests. By default, fields with 2042 // empty values are omitted from API requests. However, any non-pointer, 2043 // non-interface field appearing in ForceSendFields will be sent to the 2044 // server regardless of whether the field is empty or not. This may be 2045 // used to include empty fields in Patch requests. 2046 ForceSendFields []string `json:"-"` 2047 2048 // NullFields is a list of field names (e.g. "AnnotationType") to 2049 // include in API requests with the JSON null value. By default, fields 2050 // with empty values are omitted from API requests. However, any field 2051 // with an empty value appearing in NullFields will be sent to the 2052 // server as null. It is an error if a field in this list has a 2053 // non-empty value. This may be used to include null fields in Patch 2054 // requests. 2055 NullFields []string `json:"-"` 2056} 2057 2058func (s *GeoAnnotationdata) MarshalJSON() ([]byte, error) { 2059 type NoMethod GeoAnnotationdata 2060 raw := NoMethod(*s) 2061 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2062} 2063 2064type Geolayerdata struct { 2065 Common *GeolayerdataCommon `json:"common,omitempty"` 2066 2067 Geo *GeolayerdataGeo `json:"geo,omitempty"` 2068 2069 Kind string `json:"kind,omitempty"` 2070 2071 // ForceSendFields is a list of field names (e.g. "Common") to 2072 // unconditionally include in API requests. By default, fields with 2073 // empty values are omitted from API requests. However, any non-pointer, 2074 // non-interface field appearing in ForceSendFields will be sent to the 2075 // server regardless of whether the field is empty or not. This may be 2076 // used to include empty fields in Patch requests. 2077 ForceSendFields []string `json:"-"` 2078 2079 // NullFields is a list of field names (e.g. "Common") to include in API 2080 // requests with the JSON null value. By default, fields with empty 2081 // values are omitted from API requests. However, any field with an 2082 // empty value appearing in NullFields will be sent to the server as 2083 // null. It is an error if a field in this list has a non-empty value. 2084 // This may be used to include null fields in Patch requests. 2085 NullFields []string `json:"-"` 2086} 2087 2088func (s *Geolayerdata) MarshalJSON() ([]byte, error) { 2089 type NoMethod Geolayerdata 2090 raw := NoMethod(*s) 2091 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2092} 2093 2094type GeolayerdataCommon struct { 2095 // Lang: The language of the information url and description. 2096 Lang string `json:"lang,omitempty"` 2097 2098 // PreviewImageUrl: The URL for the preview image information. 2099 PreviewImageUrl string `json:"previewImageUrl,omitempty"` 2100 2101 // Snippet: The description for this location. 2102 Snippet string `json:"snippet,omitempty"` 2103 2104 // SnippetUrl: The URL for information for this location. Ex: wikipedia 2105 // link. 2106 SnippetUrl string `json:"snippetUrl,omitempty"` 2107 2108 // Title: The display title and localized canonical name to use when 2109 // searching for this entity on Google search. 2110 Title string `json:"title,omitempty"` 2111 2112 // ForceSendFields is a list of field names (e.g. "Lang") to 2113 // unconditionally include in API requests. By default, fields with 2114 // empty values are omitted from API requests. However, any non-pointer, 2115 // non-interface field appearing in ForceSendFields will be sent to the 2116 // server regardless of whether the field is empty or not. This may be 2117 // used to include empty fields in Patch requests. 2118 ForceSendFields []string `json:"-"` 2119 2120 // NullFields is a list of field names (e.g. "Lang") to include in API 2121 // requests with the JSON null value. By default, fields with empty 2122 // values are omitted from API requests. However, any field with an 2123 // empty value appearing in NullFields will be sent to the server as 2124 // null. It is an error if a field in this list has a non-empty value. 2125 // This may be used to include null fields in Patch requests. 2126 NullFields []string `json:"-"` 2127} 2128 2129func (s *GeolayerdataCommon) MarshalJSON() ([]byte, error) { 2130 type NoMethod GeolayerdataCommon 2131 raw := NoMethod(*s) 2132 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2133} 2134 2135type GeolayerdataGeo struct { 2136 // Boundary: The boundary of the location as a set of loops containing 2137 // pairs of latitude, longitude coordinates. 2138 Boundary []string `json:"boundary,omitempty"` 2139 2140 // CachePolicy: The cache policy active for this data. EX: UNRESTRICTED, 2141 // RESTRICTED, NEVER 2142 CachePolicy string `json:"cachePolicy,omitempty"` 2143 2144 // CountryCode: The country code of the location. 2145 CountryCode string `json:"countryCode,omitempty"` 2146 2147 // Latitude: The latitude of the location. 2148 Latitude float64 `json:"latitude,omitempty"` 2149 2150 // Longitude: The longitude of the location. 2151 Longitude float64 `json:"longitude,omitempty"` 2152 2153 // MapType: The type of map that should be used for this location. EX: 2154 // HYBRID, ROADMAP, SATELLITE, TERRAIN 2155 MapType string `json:"mapType,omitempty"` 2156 2157 // Viewport: The viewport for showing this location. This is a latitude, 2158 // longitude rectangle. 2159 Viewport *GeolayerdataGeoViewport `json:"viewport,omitempty"` 2160 2161 // Zoom: The Zoom level to use for the map. Zoom levels between 0 (the 2162 // lowest zoom level, in which the entire world can be seen on one map) 2163 // to 21+ (down to individual buildings). See: https: 2164 // //developers.google.com/maps/documentation/staticmaps/#Zoomlevels 2165 Zoom int64 `json:"zoom,omitempty"` 2166 2167 // ForceSendFields is a list of field names (e.g. "Boundary") to 2168 // unconditionally include in API requests. By default, fields with 2169 // empty values are omitted from API requests. However, any non-pointer, 2170 // non-interface field appearing in ForceSendFields will be sent to the 2171 // server regardless of whether the field is empty or not. This may be 2172 // used to include empty fields in Patch requests. 2173 ForceSendFields []string `json:"-"` 2174 2175 // NullFields is a list of field names (e.g. "Boundary") to include in 2176 // API requests with the JSON null value. By default, fields with empty 2177 // values are omitted from API requests. However, any field with an 2178 // empty value appearing in NullFields will be sent to the server as 2179 // null. It is an error if a field in this list has a non-empty value. 2180 // This may be used to include null fields in Patch requests. 2181 NullFields []string `json:"-"` 2182} 2183 2184func (s *GeolayerdataGeo) MarshalJSON() ([]byte, error) { 2185 type NoMethod GeolayerdataGeo 2186 raw := NoMethod(*s) 2187 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2188} 2189 2190func (s *GeolayerdataGeo) UnmarshalJSON(data []byte) error { 2191 type NoMethod GeolayerdataGeo 2192 var s1 struct { 2193 Latitude gensupport.JSONFloat64 `json:"latitude"` 2194 Longitude gensupport.JSONFloat64 `json:"longitude"` 2195 *NoMethod 2196 } 2197 s1.NoMethod = (*NoMethod)(s) 2198 if err := json.Unmarshal(data, &s1); err != nil { 2199 return err 2200 } 2201 s.Latitude = float64(s1.Latitude) 2202 s.Longitude = float64(s1.Longitude) 2203 return nil 2204} 2205 2206// GeolayerdataGeoViewport: The viewport for showing this location. This 2207// is a latitude, longitude rectangle. 2208type GeolayerdataGeoViewport struct { 2209 Hi *GeolayerdataGeoViewportHi `json:"hi,omitempty"` 2210 2211 Lo *GeolayerdataGeoViewportLo `json:"lo,omitempty"` 2212 2213 // ForceSendFields is a list of field names (e.g. "Hi") to 2214 // unconditionally include in API requests. By default, fields with 2215 // empty values are omitted from API requests. However, any non-pointer, 2216 // non-interface field appearing in ForceSendFields will be sent to the 2217 // server regardless of whether the field is empty or not. This may be 2218 // used to include empty fields in Patch requests. 2219 ForceSendFields []string `json:"-"` 2220 2221 // NullFields is a list of field names (e.g. "Hi") to include in API 2222 // requests with the JSON null value. By default, fields with empty 2223 // values are omitted from API requests. However, any field with an 2224 // empty value appearing in NullFields will be sent to the server as 2225 // null. It is an error if a field in this list has a non-empty value. 2226 // This may be used to include null fields in Patch requests. 2227 NullFields []string `json:"-"` 2228} 2229 2230func (s *GeolayerdataGeoViewport) MarshalJSON() ([]byte, error) { 2231 type NoMethod GeolayerdataGeoViewport 2232 raw := NoMethod(*s) 2233 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2234} 2235 2236type GeolayerdataGeoViewportHi struct { 2237 Latitude float64 `json:"latitude,omitempty"` 2238 2239 Longitude float64 `json:"longitude,omitempty"` 2240 2241 // ForceSendFields is a list of field names (e.g. "Latitude") to 2242 // unconditionally include in API requests. By default, fields with 2243 // empty values are omitted from API requests. However, any non-pointer, 2244 // non-interface field appearing in ForceSendFields will be sent to the 2245 // server regardless of whether the field is empty or not. This may be 2246 // used to include empty fields in Patch requests. 2247 ForceSendFields []string `json:"-"` 2248 2249 // NullFields is a list of field names (e.g. "Latitude") to include in 2250 // API requests with the JSON null value. By default, fields with empty 2251 // values are omitted from API requests. However, any field with an 2252 // empty value appearing in NullFields will be sent to the server as 2253 // null. It is an error if a field in this list has a non-empty value. 2254 // This may be used to include null fields in Patch requests. 2255 NullFields []string `json:"-"` 2256} 2257 2258func (s *GeolayerdataGeoViewportHi) MarshalJSON() ([]byte, error) { 2259 type NoMethod GeolayerdataGeoViewportHi 2260 raw := NoMethod(*s) 2261 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2262} 2263 2264func (s *GeolayerdataGeoViewportHi) UnmarshalJSON(data []byte) error { 2265 type NoMethod GeolayerdataGeoViewportHi 2266 var s1 struct { 2267 Latitude gensupport.JSONFloat64 `json:"latitude"` 2268 Longitude gensupport.JSONFloat64 `json:"longitude"` 2269 *NoMethod 2270 } 2271 s1.NoMethod = (*NoMethod)(s) 2272 if err := json.Unmarshal(data, &s1); err != nil { 2273 return err 2274 } 2275 s.Latitude = float64(s1.Latitude) 2276 s.Longitude = float64(s1.Longitude) 2277 return nil 2278} 2279 2280type GeolayerdataGeoViewportLo struct { 2281 Latitude float64 `json:"latitude,omitempty"` 2282 2283 Longitude float64 `json:"longitude,omitempty"` 2284 2285 // ForceSendFields is a list of field names (e.g. "Latitude") to 2286 // unconditionally include in API requests. By default, fields with 2287 // empty values are omitted from API requests. However, any non-pointer, 2288 // non-interface field appearing in ForceSendFields will be sent to the 2289 // server regardless of whether the field is empty or not. This may be 2290 // used to include empty fields in Patch requests. 2291 ForceSendFields []string `json:"-"` 2292 2293 // NullFields is a list of field names (e.g. "Latitude") to include in 2294 // API requests with the JSON null value. By default, fields with empty 2295 // values are omitted from API requests. However, any field with an 2296 // empty value appearing in NullFields will be sent to the server as 2297 // null. It is an error if a field in this list has a non-empty value. 2298 // This may be used to include null fields in Patch requests. 2299 NullFields []string `json:"-"` 2300} 2301 2302func (s *GeolayerdataGeoViewportLo) MarshalJSON() ([]byte, error) { 2303 type NoMethod GeolayerdataGeoViewportLo 2304 raw := NoMethod(*s) 2305 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2306} 2307 2308func (s *GeolayerdataGeoViewportLo) UnmarshalJSON(data []byte) error { 2309 type NoMethod GeolayerdataGeoViewportLo 2310 var s1 struct { 2311 Latitude gensupport.JSONFloat64 `json:"latitude"` 2312 Longitude gensupport.JSONFloat64 `json:"longitude"` 2313 *NoMethod 2314 } 2315 s1.NoMethod = (*NoMethod)(s) 2316 if err := json.Unmarshal(data, &s1); err != nil { 2317 return err 2318 } 2319 s.Latitude = float64(s1.Latitude) 2320 s.Longitude = float64(s1.Longitude) 2321 return nil 2322} 2323 2324type Layersummaries struct { 2325 // Items: A list of layer summary items. 2326 Items []*Layersummary `json:"items,omitempty"` 2327 2328 // Kind: Resource type. 2329 Kind string `json:"kind,omitempty"` 2330 2331 // TotalItems: The total number of layer summaries found. 2332 TotalItems int64 `json:"totalItems,omitempty"` 2333 2334 // ServerResponse contains the HTTP response code and headers from the 2335 // server. 2336 googleapi.ServerResponse `json:"-"` 2337 2338 // ForceSendFields is a list of field names (e.g. "Items") to 2339 // unconditionally include in API requests. By default, fields with 2340 // empty values are omitted from API requests. However, any non-pointer, 2341 // non-interface field appearing in ForceSendFields will be sent to the 2342 // server regardless of whether the field is empty or not. This may be 2343 // used to include empty fields in Patch requests. 2344 ForceSendFields []string `json:"-"` 2345 2346 // NullFields is a list of field names (e.g. "Items") to include in API 2347 // requests with the JSON null value. By default, fields with empty 2348 // values are omitted from API requests. However, any field with an 2349 // empty value appearing in NullFields will be sent to the server as 2350 // null. It is an error if a field in this list has a non-empty value. 2351 // This may be used to include null fields in Patch requests. 2352 NullFields []string `json:"-"` 2353} 2354 2355func (s *Layersummaries) MarshalJSON() ([]byte, error) { 2356 type NoMethod Layersummaries 2357 raw := NoMethod(*s) 2358 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2359} 2360 2361type Layersummary struct { 2362 // AnnotationCount: The number of annotations for this layer. 2363 AnnotationCount int64 `json:"annotationCount,omitempty"` 2364 2365 // AnnotationTypes: The list of annotation types contained for this 2366 // layer. 2367 AnnotationTypes []string `json:"annotationTypes,omitempty"` 2368 2369 // AnnotationsDataLink: Link to get data for this annotation. 2370 AnnotationsDataLink string `json:"annotationsDataLink,omitempty"` 2371 2372 // AnnotationsLink: The link to get the annotations for this layer. 2373 AnnotationsLink string `json:"annotationsLink,omitempty"` 2374 2375 // ContentVersion: The content version this resource is for. 2376 ContentVersion string `json:"contentVersion,omitempty"` 2377 2378 // DataCount: The number of data items for this layer. 2379 DataCount int64 `json:"dataCount,omitempty"` 2380 2381 // Id: Unique id of this layer summary. 2382 Id string `json:"id,omitempty"` 2383 2384 // Kind: Resource Type 2385 Kind string `json:"kind,omitempty"` 2386 2387 // LayerId: The layer id for this summary. 2388 LayerId string `json:"layerId,omitempty"` 2389 2390 // SelfLink: URL to this resource. 2391 SelfLink string `json:"selfLink,omitempty"` 2392 2393 // Updated: Timestamp for the last time an item in this layer was 2394 // updated. (RFC 3339 UTC date-time format). 2395 Updated string `json:"updated,omitempty"` 2396 2397 // VolumeAnnotationsVersion: The current version of this layer's volume 2398 // annotations. Note that this version applies only to the data in the 2399 // books.layers.volumeAnnotations.* responses. The actual annotation 2400 // data is versioned separately. 2401 VolumeAnnotationsVersion string `json:"volumeAnnotationsVersion,omitempty"` 2402 2403 // VolumeId: The volume id this resource is for. 2404 VolumeId string `json:"volumeId,omitempty"` 2405 2406 // ServerResponse contains the HTTP response code and headers from the 2407 // server. 2408 googleapi.ServerResponse `json:"-"` 2409 2410 // ForceSendFields is a list of field names (e.g. "AnnotationCount") to 2411 // unconditionally include in API requests. By default, fields with 2412 // empty values are omitted from API requests. However, any non-pointer, 2413 // non-interface field appearing in ForceSendFields will be sent to the 2414 // server regardless of whether the field is empty or not. This may be 2415 // used to include empty fields in Patch requests. 2416 ForceSendFields []string `json:"-"` 2417 2418 // NullFields is a list of field names (e.g. "AnnotationCount") to 2419 // include in API requests with the JSON null value. By default, fields 2420 // with empty values are omitted from API requests. However, any field 2421 // with an empty value appearing in NullFields will be sent to the 2422 // server as null. It is an error if a field in this list has a 2423 // non-empty value. This may be used to include null fields in Patch 2424 // requests. 2425 NullFields []string `json:"-"` 2426} 2427 2428func (s *Layersummary) MarshalJSON() ([]byte, error) { 2429 type NoMethod Layersummary 2430 raw := NoMethod(*s) 2431 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2432} 2433 2434type Metadata struct { 2435 // Items: A list of offline dictionary metadata. 2436 Items []*MetadataItems `json:"items,omitempty"` 2437 2438 // Kind: Resource type. 2439 Kind string `json:"kind,omitempty"` 2440 2441 // ServerResponse contains the HTTP response code and headers from the 2442 // server. 2443 googleapi.ServerResponse `json:"-"` 2444 2445 // ForceSendFields is a list of field names (e.g. "Items") to 2446 // unconditionally include in API requests. By default, fields with 2447 // empty values are omitted from API requests. However, any non-pointer, 2448 // non-interface field appearing in ForceSendFields will be sent to the 2449 // server regardless of whether the field is empty or not. This may be 2450 // used to include empty fields in Patch requests. 2451 ForceSendFields []string `json:"-"` 2452 2453 // NullFields is a list of field names (e.g. "Items") to include in API 2454 // requests with the JSON null value. By default, fields with empty 2455 // values are omitted from API requests. However, any field with an 2456 // empty value appearing in NullFields will be sent to the server as 2457 // null. It is an error if a field in this list has a non-empty value. 2458 // This may be used to include null fields in Patch requests. 2459 NullFields []string `json:"-"` 2460} 2461 2462func (s *Metadata) MarshalJSON() ([]byte, error) { 2463 type NoMethod Metadata 2464 raw := NoMethod(*s) 2465 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2466} 2467 2468type MetadataItems struct { 2469 DownloadUrl string `json:"download_url,omitempty"` 2470 2471 EncryptedKey string `json:"encrypted_key,omitempty"` 2472 2473 Language string `json:"language,omitempty"` 2474 2475 Size int64 `json:"size,omitempty,string"` 2476 2477 Version int64 `json:"version,omitempty,string"` 2478 2479 // ForceSendFields is a list of field names (e.g. "DownloadUrl") to 2480 // unconditionally include in API requests. By default, fields with 2481 // empty values are omitted from API requests. However, any non-pointer, 2482 // non-interface field appearing in ForceSendFields will be sent to the 2483 // server regardless of whether the field is empty or not. This may be 2484 // used to include empty fields in Patch requests. 2485 ForceSendFields []string `json:"-"` 2486 2487 // NullFields is a list of field names (e.g. "DownloadUrl") to include 2488 // in API requests with the JSON null value. By default, fields with 2489 // empty values are omitted from API requests. However, any field with 2490 // an empty value appearing in NullFields will be sent to the server as 2491 // null. It is an error if a field in this list has a non-empty value. 2492 // This may be used to include null fields in Patch requests. 2493 NullFields []string `json:"-"` 2494} 2495 2496func (s *MetadataItems) MarshalJSON() ([]byte, error) { 2497 type NoMethod MetadataItems 2498 raw := NoMethod(*s) 2499 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2500} 2501 2502type Notification struct { 2503 Body string `json:"body,omitempty"` 2504 2505 // CrmExperimentIds: The list of crm experiment ids. 2506 CrmExperimentIds googleapi.Int64s `json:"crmExperimentIds,omitempty"` 2507 2508 DocId string `json:"doc_id,omitempty"` 2509 2510 DocType string `json:"doc_type,omitempty"` 2511 2512 DontShowNotification bool `json:"dont_show_notification,omitempty"` 2513 2514 IconUrl string `json:"iconUrl,omitempty"` 2515 2516 IsDocumentMature bool `json:"is_document_mature,omitempty"` 2517 2518 // Kind: Resource type. 2519 Kind string `json:"kind,omitempty"` 2520 2521 NotificationGroup string `json:"notificationGroup,omitempty"` 2522 2523 NotificationType string `json:"notification_type,omitempty"` 2524 2525 PcampaignId string `json:"pcampaign_id,omitempty"` 2526 2527 Reason string `json:"reason,omitempty"` 2528 2529 ShowNotificationSettingsAction bool `json:"show_notification_settings_action,omitempty"` 2530 2531 TargetUrl string `json:"targetUrl,omitempty"` 2532 2533 TimeToExpireMs int64 `json:"timeToExpireMs,omitempty,string"` 2534 2535 Title string `json:"title,omitempty"` 2536 2537 // ServerResponse contains the HTTP response code and headers from the 2538 // server. 2539 googleapi.ServerResponse `json:"-"` 2540 2541 // ForceSendFields is a list of field names (e.g. "Body") to 2542 // unconditionally include in API requests. By default, fields with 2543 // empty values are omitted from API requests. However, any non-pointer, 2544 // non-interface field appearing in ForceSendFields will be sent to the 2545 // server regardless of whether the field is empty or not. This may be 2546 // used to include empty fields in Patch requests. 2547 ForceSendFields []string `json:"-"` 2548 2549 // NullFields is a list of field names (e.g. "Body") to include in API 2550 // requests with the JSON null value. By default, fields with empty 2551 // values are omitted from API requests. However, any field with an 2552 // empty value appearing in NullFields will be sent to the server as 2553 // null. It is an error if a field in this list has a non-empty value. 2554 // This may be used to include null fields in Patch requests. 2555 NullFields []string `json:"-"` 2556} 2557 2558func (s *Notification) MarshalJSON() ([]byte, error) { 2559 type NoMethod Notification 2560 raw := NoMethod(*s) 2561 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2562} 2563 2564type Offers struct { 2565 // Items: A list of offers. 2566 Items []*OffersItems `json:"items,omitempty"` 2567 2568 // Kind: Resource type. 2569 Kind string `json:"kind,omitempty"` 2570 2571 // ServerResponse contains the HTTP response code and headers from the 2572 // server. 2573 googleapi.ServerResponse `json:"-"` 2574 2575 // ForceSendFields is a list of field names (e.g. "Items") to 2576 // unconditionally include in API requests. By default, fields with 2577 // empty values are omitted from API requests. However, any non-pointer, 2578 // non-interface field appearing in ForceSendFields will be sent to the 2579 // server regardless of whether the field is empty or not. This may be 2580 // used to include empty fields in Patch requests. 2581 ForceSendFields []string `json:"-"` 2582 2583 // NullFields is a list of field names (e.g. "Items") to include in API 2584 // requests with the JSON null value. By default, fields with empty 2585 // values are omitted from API requests. However, any field with an 2586 // empty value appearing in NullFields will be sent to the server as 2587 // null. It is an error if a field in this list has a non-empty value. 2588 // This may be used to include null fields in Patch requests. 2589 NullFields []string `json:"-"` 2590} 2591 2592func (s *Offers) MarshalJSON() ([]byte, error) { 2593 type NoMethod Offers 2594 raw := NoMethod(*s) 2595 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2596} 2597 2598type OffersItems struct { 2599 ArtUrl string `json:"artUrl,omitempty"` 2600 2601 GservicesKey string `json:"gservicesKey,omitempty"` 2602 2603 Id string `json:"id,omitempty"` 2604 2605 Items []*OffersItemsItems `json:"items,omitempty"` 2606 2607 // ForceSendFields is a list of field names (e.g. "ArtUrl") to 2608 // unconditionally include in API requests. By default, fields with 2609 // empty values are omitted from API requests. However, any non-pointer, 2610 // non-interface field appearing in ForceSendFields will be sent to the 2611 // server regardless of whether the field is empty or not. This may be 2612 // used to include empty fields in Patch requests. 2613 ForceSendFields []string `json:"-"` 2614 2615 // NullFields is a list of field names (e.g. "ArtUrl") to include in API 2616 // requests with the JSON null value. By default, fields with empty 2617 // values are omitted from API requests. However, any field with an 2618 // empty value appearing in NullFields will be sent to the server as 2619 // null. It is an error if a field in this list has a non-empty value. 2620 // This may be used to include null fields in Patch requests. 2621 NullFields []string `json:"-"` 2622} 2623 2624func (s *OffersItems) MarshalJSON() ([]byte, error) { 2625 type NoMethod OffersItems 2626 raw := NoMethod(*s) 2627 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2628} 2629 2630type OffersItemsItems struct { 2631 Author string `json:"author,omitempty"` 2632 2633 CanonicalVolumeLink string `json:"canonicalVolumeLink,omitempty"` 2634 2635 CoverUrl string `json:"coverUrl,omitempty"` 2636 2637 Description string `json:"description,omitempty"` 2638 2639 Title string `json:"title,omitempty"` 2640 2641 VolumeId string `json:"volumeId,omitempty"` 2642 2643 // ForceSendFields is a list of field names (e.g. "Author") to 2644 // unconditionally include in API requests. By default, fields with 2645 // empty values are omitted from API requests. However, any non-pointer, 2646 // non-interface field appearing in ForceSendFields will be sent to the 2647 // server regardless of whether the field is empty or not. This may be 2648 // used to include empty fields in Patch requests. 2649 ForceSendFields []string `json:"-"` 2650 2651 // NullFields is a list of field names (e.g. "Author") to include in API 2652 // requests with the JSON null value. By default, fields with empty 2653 // values are omitted from API requests. However, any field with an 2654 // empty value appearing in NullFields will be sent to the server as 2655 // null. It is an error if a field in this list has a non-empty value. 2656 // This may be used to include null fields in Patch requests. 2657 NullFields []string `json:"-"` 2658} 2659 2660func (s *OffersItemsItems) MarshalJSON() ([]byte, error) { 2661 type NoMethod OffersItemsItems 2662 raw := NoMethod(*s) 2663 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2664} 2665 2666type ReadingPosition struct { 2667 // EpubCfiPosition: Position in an EPUB as a CFI. 2668 EpubCfiPosition string `json:"epubCfiPosition,omitempty"` 2669 2670 // GbImagePosition: Position in a volume for image-based content. 2671 GbImagePosition string `json:"gbImagePosition,omitempty"` 2672 2673 // GbTextPosition: Position in a volume for text-based content. 2674 GbTextPosition string `json:"gbTextPosition,omitempty"` 2675 2676 // Kind: Resource type for a reading position. 2677 Kind string `json:"kind,omitempty"` 2678 2679 // PdfPosition: Position in a PDF file. 2680 PdfPosition string `json:"pdfPosition,omitempty"` 2681 2682 // Updated: Timestamp when this reading position was last updated 2683 // (formatted UTC timestamp with millisecond resolution). 2684 Updated string `json:"updated,omitempty"` 2685 2686 // VolumeId: Volume id associated with this reading position. 2687 VolumeId string `json:"volumeId,omitempty"` 2688 2689 // ServerResponse contains the HTTP response code and headers from the 2690 // server. 2691 googleapi.ServerResponse `json:"-"` 2692 2693 // ForceSendFields is a list of field names (e.g. "EpubCfiPosition") to 2694 // unconditionally include in API requests. By default, fields with 2695 // empty values are omitted from API requests. However, any non-pointer, 2696 // non-interface field appearing in ForceSendFields will be sent to the 2697 // server regardless of whether the field is empty or not. This may be 2698 // used to include empty fields in Patch requests. 2699 ForceSendFields []string `json:"-"` 2700 2701 // NullFields is a list of field names (e.g. "EpubCfiPosition") to 2702 // include in API requests with the JSON null value. By default, fields 2703 // with empty values are omitted from API requests. However, any field 2704 // with an empty value appearing in NullFields will be sent to the 2705 // server as null. It is an error if a field in this list has a 2706 // non-empty value. This may be used to include null fields in Patch 2707 // requests. 2708 NullFields []string `json:"-"` 2709} 2710 2711func (s *ReadingPosition) MarshalJSON() ([]byte, error) { 2712 type NoMethod ReadingPosition 2713 raw := NoMethod(*s) 2714 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2715} 2716 2717type RequestAccessData struct { 2718 // ConcurrentAccess: A concurrent access response. 2719 ConcurrentAccess *ConcurrentAccessRestriction `json:"concurrentAccess,omitempty"` 2720 2721 // DownloadAccess: A download access response. 2722 DownloadAccess *DownloadAccessRestriction `json:"downloadAccess,omitempty"` 2723 2724 // Kind: Resource type. 2725 Kind string `json:"kind,omitempty"` 2726 2727 // ServerResponse contains the HTTP response code and headers from the 2728 // server. 2729 googleapi.ServerResponse `json:"-"` 2730 2731 // ForceSendFields is a list of field names (e.g. "ConcurrentAccess") to 2732 // unconditionally include in API requests. By default, fields with 2733 // empty values are omitted from API requests. However, any non-pointer, 2734 // non-interface field appearing in ForceSendFields will be sent to the 2735 // server regardless of whether the field is empty or not. This may be 2736 // used to include empty fields in Patch requests. 2737 ForceSendFields []string `json:"-"` 2738 2739 // NullFields is a list of field names (e.g. "ConcurrentAccess") to 2740 // include in API requests with the JSON null value. By default, fields 2741 // with empty values are omitted from API requests. However, any field 2742 // with an empty value appearing in NullFields will be sent to the 2743 // server as null. It is an error if a field in this list has a 2744 // non-empty value. This may be used to include null fields in Patch 2745 // requests. 2746 NullFields []string `json:"-"` 2747} 2748 2749func (s *RequestAccessData) MarshalJSON() ([]byte, error) { 2750 type NoMethod RequestAccessData 2751 raw := NoMethod(*s) 2752 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2753} 2754 2755type Review struct { 2756 // Author: Author of this review. 2757 Author *ReviewAuthor `json:"author,omitempty"` 2758 2759 // Content: Review text. 2760 Content string `json:"content,omitempty"` 2761 2762 // Date: Date of this review. 2763 Date string `json:"date,omitempty"` 2764 2765 // FullTextUrl: URL for the full review text, for reviews gathered from 2766 // the web. 2767 FullTextUrl string `json:"fullTextUrl,omitempty"` 2768 2769 // Kind: Resource type for a review. 2770 Kind string `json:"kind,omitempty"` 2771 2772 // Rating: Star rating for this review. Possible values are ONE, TWO, 2773 // THREE, FOUR, FIVE or NOT_RATED. 2774 Rating string `json:"rating,omitempty"` 2775 2776 // Source: Information regarding the source of this review, when the 2777 // review is not from a Google Books user. 2778 Source *ReviewSource `json:"source,omitempty"` 2779 2780 // Title: Title for this review. 2781 Title string `json:"title,omitempty"` 2782 2783 // Type: Source type for this review. Possible values are EDITORIAL, 2784 // WEB_USER or GOOGLE_USER. 2785 Type string `json:"type,omitempty"` 2786 2787 // VolumeId: Volume that this review is for. 2788 VolumeId string `json:"volumeId,omitempty"` 2789 2790 // ForceSendFields is a list of field names (e.g. "Author") to 2791 // unconditionally include in API requests. By default, fields with 2792 // empty values are omitted from API requests. However, any non-pointer, 2793 // non-interface field appearing in ForceSendFields will be sent to the 2794 // server regardless of whether the field is empty or not. This may be 2795 // used to include empty fields in Patch requests. 2796 ForceSendFields []string `json:"-"` 2797 2798 // NullFields is a list of field names (e.g. "Author") to include in API 2799 // requests with the JSON null value. By default, fields with empty 2800 // values are omitted from API requests. However, any field with an 2801 // empty value appearing in NullFields will be sent to the server as 2802 // null. It is an error if a field in this list has a non-empty value. 2803 // This may be used to include null fields in Patch requests. 2804 NullFields []string `json:"-"` 2805} 2806 2807func (s *Review) MarshalJSON() ([]byte, error) { 2808 type NoMethod Review 2809 raw := NoMethod(*s) 2810 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2811} 2812 2813// ReviewAuthor: Author of this review. 2814type ReviewAuthor struct { 2815 // DisplayName: Name of this person. 2816 DisplayName string `json:"displayName,omitempty"` 2817 2818 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2819 // unconditionally include in API requests. By default, fields with 2820 // empty values are omitted from API requests. However, any non-pointer, 2821 // non-interface field appearing in ForceSendFields will be sent to the 2822 // server regardless of whether the field is empty or not. This may be 2823 // used to include empty fields in Patch requests. 2824 ForceSendFields []string `json:"-"` 2825 2826 // NullFields is a list of field names (e.g. "DisplayName") to include 2827 // in API requests with the JSON null value. By default, fields with 2828 // empty values are omitted from API requests. However, any field with 2829 // an empty value appearing in NullFields will be sent to the server as 2830 // null. It is an error if a field in this list has a non-empty value. 2831 // This may be used to include null fields in Patch requests. 2832 NullFields []string `json:"-"` 2833} 2834 2835func (s *ReviewAuthor) MarshalJSON() ([]byte, error) { 2836 type NoMethod ReviewAuthor 2837 raw := NoMethod(*s) 2838 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2839} 2840 2841// ReviewSource: Information regarding the source of this review, when 2842// the review is not from a Google Books user. 2843type ReviewSource struct { 2844 // Description: Name of the source. 2845 Description string `json:"description,omitempty"` 2846 2847 // ExtraDescription: Extra text about the source of the review. 2848 ExtraDescription string `json:"extraDescription,omitempty"` 2849 2850 // Url: URL of the source of the review. 2851 Url string `json:"url,omitempty"` 2852 2853 // ForceSendFields is a list of field names (e.g. "Description") to 2854 // unconditionally include in API requests. By default, fields with 2855 // empty values are omitted from API requests. However, any non-pointer, 2856 // non-interface field appearing in ForceSendFields will be sent to the 2857 // server regardless of whether the field is empty or not. This may be 2858 // used to include empty fields in Patch requests. 2859 ForceSendFields []string `json:"-"` 2860 2861 // NullFields is a list of field names (e.g. "Description") to include 2862 // in API requests with the JSON null value. By default, fields with 2863 // empty values are omitted from API requests. However, any field with 2864 // an empty value appearing in NullFields will be sent to the server as 2865 // null. It is an error if a field in this list has a non-empty value. 2866 // This may be used to include null fields in Patch requests. 2867 NullFields []string `json:"-"` 2868} 2869 2870func (s *ReviewSource) MarshalJSON() ([]byte, error) { 2871 type NoMethod ReviewSource 2872 raw := NoMethod(*s) 2873 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2874} 2875 2876type Series struct { 2877 // Kind: Resource type. 2878 Kind string `json:"kind,omitempty"` 2879 2880 Series []*SeriesSeries `json:"series,omitempty"` 2881 2882 // ServerResponse contains the HTTP response code and headers from the 2883 // server. 2884 googleapi.ServerResponse `json:"-"` 2885 2886 // ForceSendFields is a list of field names (e.g. "Kind") to 2887 // unconditionally include in API requests. By default, fields with 2888 // empty values are omitted from API requests. However, any non-pointer, 2889 // non-interface field appearing in ForceSendFields will be sent to the 2890 // server regardless of whether the field is empty or not. This may be 2891 // used to include empty fields in Patch requests. 2892 ForceSendFields []string `json:"-"` 2893 2894 // NullFields is a list of field names (e.g. "Kind") to include in API 2895 // requests with the JSON null value. By default, fields with empty 2896 // values are omitted from API requests. However, any field with an 2897 // empty value appearing in NullFields will be sent to the server as 2898 // null. It is an error if a field in this list has a non-empty value. 2899 // This may be used to include null fields in Patch requests. 2900 NullFields []string `json:"-"` 2901} 2902 2903func (s *Series) MarshalJSON() ([]byte, error) { 2904 type NoMethod Series 2905 raw := NoMethod(*s) 2906 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2907} 2908 2909type SeriesSeries struct { 2910 BannerImageUrl string `json:"bannerImageUrl,omitempty"` 2911 2912 EligibleForSubscription bool `json:"eligibleForSubscription,omitempty"` 2913 2914 ImageUrl string `json:"imageUrl,omitempty"` 2915 2916 IsComplete bool `json:"isComplete,omitempty"` 2917 2918 SeriesFormatType string `json:"seriesFormatType,omitempty"` 2919 2920 SeriesId string `json:"seriesId,omitempty"` 2921 2922 SeriesSubscriptionReleaseInfo *SeriesSeriesSeriesSubscriptionReleaseInfo `json:"seriesSubscriptionReleaseInfo,omitempty"` 2923 2924 SeriesType string `json:"seriesType,omitempty"` 2925 2926 SubscriptionId string `json:"subscriptionId,omitempty"` 2927 2928 Title string `json:"title,omitempty"` 2929 2930 // ForceSendFields is a list of field names (e.g. "BannerImageUrl") to 2931 // unconditionally include in API requests. By default, fields with 2932 // empty values are omitted from API requests. However, any non-pointer, 2933 // non-interface field appearing in ForceSendFields will be sent to the 2934 // server regardless of whether the field is empty or not. This may be 2935 // used to include empty fields in Patch requests. 2936 ForceSendFields []string `json:"-"` 2937 2938 // NullFields is a list of field names (e.g. "BannerImageUrl") to 2939 // include in API requests with the JSON null value. By default, fields 2940 // with empty values are omitted from API requests. However, any field 2941 // with an empty value appearing in NullFields will be sent to the 2942 // server as null. It is an error if a field in this list has a 2943 // non-empty value. This may be used to include null fields in Patch 2944 // requests. 2945 NullFields []string `json:"-"` 2946} 2947 2948func (s *SeriesSeries) MarshalJSON() ([]byte, error) { 2949 type NoMethod SeriesSeries 2950 raw := NoMethod(*s) 2951 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2952} 2953 2954type SeriesSeriesSeriesSubscriptionReleaseInfo struct { 2955 CancelTime string `json:"cancelTime,omitempty"` 2956 2957 CurrentReleaseInfo *SeriesSeriesSeriesSubscriptionReleaseInfoCurrentReleaseInfo `json:"currentReleaseInfo,omitempty"` 2958 2959 NextReleaseInfo *SeriesSeriesSeriesSubscriptionReleaseInfoNextReleaseInfo `json:"nextReleaseInfo,omitempty"` 2960 2961 SeriesSubscriptionType string `json:"seriesSubscriptionType,omitempty"` 2962 2963 // ForceSendFields is a list of field names (e.g. "CancelTime") to 2964 // unconditionally include in API requests. By default, fields with 2965 // empty values are omitted from API requests. However, any non-pointer, 2966 // non-interface field appearing in ForceSendFields will be sent to the 2967 // server regardless of whether the field is empty or not. This may be 2968 // used to include empty fields in Patch requests. 2969 ForceSendFields []string `json:"-"` 2970 2971 // NullFields is a list of field names (e.g. "CancelTime") to include in 2972 // API requests with the JSON null value. By default, fields with empty 2973 // values are omitted from API requests. However, any field with an 2974 // empty value appearing in NullFields will be sent to the server as 2975 // null. It is an error if a field in this list has a non-empty value. 2976 // This may be used to include null fields in Patch requests. 2977 NullFields []string `json:"-"` 2978} 2979 2980func (s *SeriesSeriesSeriesSubscriptionReleaseInfo) MarshalJSON() ([]byte, error) { 2981 type NoMethod SeriesSeriesSeriesSubscriptionReleaseInfo 2982 raw := NoMethod(*s) 2983 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2984} 2985 2986type SeriesSeriesSeriesSubscriptionReleaseInfoCurrentReleaseInfo struct { 2987 AmountInMicros float64 `json:"amountInMicros,omitempty"` 2988 2989 CurrencyCode string `json:"currencyCode,omitempty"` 2990 2991 ReleaseNumber string `json:"releaseNumber,omitempty"` 2992 2993 ReleaseTime string `json:"releaseTime,omitempty"` 2994 2995 // ForceSendFields is a list of field names (e.g. "AmountInMicros") to 2996 // unconditionally include in API requests. By default, fields with 2997 // empty values are omitted from API requests. However, any non-pointer, 2998 // non-interface field appearing in ForceSendFields will be sent to the 2999 // server regardless of whether the field is empty or not. This may be 3000 // used to include empty fields in Patch requests. 3001 ForceSendFields []string `json:"-"` 3002 3003 // NullFields is a list of field names (e.g. "AmountInMicros") to 3004 // include in API requests with the JSON null value. By default, fields 3005 // with empty values are omitted from API requests. However, any field 3006 // with an empty value appearing in NullFields will be sent to the 3007 // server as null. It is an error if a field in this list has a 3008 // non-empty value. This may be used to include null fields in Patch 3009 // requests. 3010 NullFields []string `json:"-"` 3011} 3012 3013func (s *SeriesSeriesSeriesSubscriptionReleaseInfoCurrentReleaseInfo) MarshalJSON() ([]byte, error) { 3014 type NoMethod SeriesSeriesSeriesSubscriptionReleaseInfoCurrentReleaseInfo 3015 raw := NoMethod(*s) 3016 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3017} 3018 3019func (s *SeriesSeriesSeriesSubscriptionReleaseInfoCurrentReleaseInfo) UnmarshalJSON(data []byte) error { 3020 type NoMethod SeriesSeriesSeriesSubscriptionReleaseInfoCurrentReleaseInfo 3021 var s1 struct { 3022 AmountInMicros gensupport.JSONFloat64 `json:"amountInMicros"` 3023 *NoMethod 3024 } 3025 s1.NoMethod = (*NoMethod)(s) 3026 if err := json.Unmarshal(data, &s1); err != nil { 3027 return err 3028 } 3029 s.AmountInMicros = float64(s1.AmountInMicros) 3030 return nil 3031} 3032 3033type SeriesSeriesSeriesSubscriptionReleaseInfoNextReleaseInfo struct { 3034 AmountInMicros float64 `json:"amountInMicros,omitempty"` 3035 3036 CurrencyCode string `json:"currencyCode,omitempty"` 3037 3038 ReleaseNumber string `json:"releaseNumber,omitempty"` 3039 3040 ReleaseTime string `json:"releaseTime,omitempty"` 3041 3042 // ForceSendFields is a list of field names (e.g. "AmountInMicros") to 3043 // unconditionally include in API requests. By default, fields with 3044 // empty values are omitted from API requests. However, any non-pointer, 3045 // non-interface field appearing in ForceSendFields will be sent to the 3046 // server regardless of whether the field is empty or not. This may be 3047 // used to include empty fields in Patch requests. 3048 ForceSendFields []string `json:"-"` 3049 3050 // NullFields is a list of field names (e.g. "AmountInMicros") to 3051 // include in API requests with the JSON null value. By default, fields 3052 // with empty values are omitted from API requests. However, any field 3053 // with an empty value appearing in NullFields will be sent to the 3054 // server as null. It is an error if a field in this list has a 3055 // non-empty value. This may be used to include null fields in Patch 3056 // requests. 3057 NullFields []string `json:"-"` 3058} 3059 3060func (s *SeriesSeriesSeriesSubscriptionReleaseInfoNextReleaseInfo) MarshalJSON() ([]byte, error) { 3061 type NoMethod SeriesSeriesSeriesSubscriptionReleaseInfoNextReleaseInfo 3062 raw := NoMethod(*s) 3063 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3064} 3065 3066func (s *SeriesSeriesSeriesSubscriptionReleaseInfoNextReleaseInfo) UnmarshalJSON(data []byte) error { 3067 type NoMethod SeriesSeriesSeriesSubscriptionReleaseInfoNextReleaseInfo 3068 var s1 struct { 3069 AmountInMicros gensupport.JSONFloat64 `json:"amountInMicros"` 3070 *NoMethod 3071 } 3072 s1.NoMethod = (*NoMethod)(s) 3073 if err := json.Unmarshal(data, &s1); err != nil { 3074 return err 3075 } 3076 s.AmountInMicros = float64(s1.AmountInMicros) 3077 return nil 3078} 3079 3080type Seriesmembership struct { 3081 // Kind: Resorce type. 3082 Kind string `json:"kind,omitempty"` 3083 3084 Member []*Volume `json:"member,omitempty"` 3085 3086 NextPageToken string `json:"nextPageToken,omitempty"` 3087 3088 // ServerResponse contains the HTTP response code and headers from the 3089 // server. 3090 googleapi.ServerResponse `json:"-"` 3091 3092 // ForceSendFields is a list of field names (e.g. "Kind") to 3093 // unconditionally include in API requests. By default, fields with 3094 // empty values are omitted from API requests. However, any non-pointer, 3095 // non-interface field appearing in ForceSendFields will be sent to the 3096 // server regardless of whether the field is empty or not. This may be 3097 // used to include empty fields in Patch requests. 3098 ForceSendFields []string `json:"-"` 3099 3100 // NullFields is a list of field names (e.g. "Kind") to include in API 3101 // requests with the JSON null value. By default, fields with empty 3102 // values are omitted from API requests. However, any field with an 3103 // empty value appearing in NullFields will be sent to the server as 3104 // null. It is an error if a field in this list has a non-empty value. 3105 // This may be used to include null fields in Patch requests. 3106 NullFields []string `json:"-"` 3107} 3108 3109func (s *Seriesmembership) MarshalJSON() ([]byte, error) { 3110 type NoMethod Seriesmembership 3111 raw := NoMethod(*s) 3112 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3113} 3114 3115type Usersettings struct { 3116 // Kind: Resource type. 3117 Kind string `json:"kind,omitempty"` 3118 3119 // NotesExport: User settings in sub-objects, each for different 3120 // purposes. 3121 NotesExport *UsersettingsNotesExport `json:"notesExport,omitempty"` 3122 3123 Notification *UsersettingsNotification `json:"notification,omitempty"` 3124 3125 // ServerResponse contains the HTTP response code and headers from the 3126 // server. 3127 googleapi.ServerResponse `json:"-"` 3128 3129 // ForceSendFields is a list of field names (e.g. "Kind") to 3130 // unconditionally include in API requests. By default, fields with 3131 // empty values are omitted from API requests. However, any non-pointer, 3132 // non-interface field appearing in ForceSendFields will be sent to the 3133 // server regardless of whether the field is empty or not. This may be 3134 // used to include empty fields in Patch requests. 3135 ForceSendFields []string `json:"-"` 3136 3137 // NullFields is a list of field names (e.g. "Kind") to include in API 3138 // requests with the JSON null value. By default, fields with empty 3139 // values are omitted from API requests. However, any field with an 3140 // empty value appearing in NullFields will be sent to the server as 3141 // null. It is an error if a field in this list has a non-empty value. 3142 // This may be used to include null fields in Patch requests. 3143 NullFields []string `json:"-"` 3144} 3145 3146func (s *Usersettings) MarshalJSON() ([]byte, error) { 3147 type NoMethod Usersettings 3148 raw := NoMethod(*s) 3149 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3150} 3151 3152// UsersettingsNotesExport: User settings in sub-objects, each for 3153// different purposes. 3154type UsersettingsNotesExport struct { 3155 FolderName string `json:"folderName,omitempty"` 3156 3157 IsEnabled bool `json:"isEnabled,omitempty"` 3158 3159 // ForceSendFields is a list of field names (e.g. "FolderName") to 3160 // unconditionally include in API requests. By default, fields with 3161 // empty values are omitted from API requests. However, any non-pointer, 3162 // non-interface field appearing in ForceSendFields will be sent to the 3163 // server regardless of whether the field is empty or not. This may be 3164 // used to include empty fields in Patch requests. 3165 ForceSendFields []string `json:"-"` 3166 3167 // NullFields is a list of field names (e.g. "FolderName") to include in 3168 // API requests with the JSON null value. By default, fields with empty 3169 // values are omitted from API requests. However, any field with an 3170 // empty value appearing in NullFields will be sent to the server as 3171 // null. It is an error if a field in this list has a non-empty value. 3172 // This may be used to include null fields in Patch requests. 3173 NullFields []string `json:"-"` 3174} 3175 3176func (s *UsersettingsNotesExport) MarshalJSON() ([]byte, error) { 3177 type NoMethod UsersettingsNotesExport 3178 raw := NoMethod(*s) 3179 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3180} 3181 3182type UsersettingsNotification struct { 3183 MatchMyInterests *UsersettingsNotificationMatchMyInterests `json:"matchMyInterests,omitempty"` 3184 3185 MoreFromAuthors *UsersettingsNotificationMoreFromAuthors `json:"moreFromAuthors,omitempty"` 3186 3187 MoreFromSeries *UsersettingsNotificationMoreFromSeries `json:"moreFromSeries,omitempty"` 3188 3189 PriceDrop *UsersettingsNotificationPriceDrop `json:"priceDrop,omitempty"` 3190 3191 RewardExpirations *UsersettingsNotificationRewardExpirations `json:"rewardExpirations,omitempty"` 3192 3193 // ForceSendFields is a list of field names (e.g. "MatchMyInterests") to 3194 // unconditionally include in API requests. By default, fields with 3195 // empty values are omitted from API requests. However, any non-pointer, 3196 // non-interface field appearing in ForceSendFields will be sent to the 3197 // server regardless of whether the field is empty or not. This may be 3198 // used to include empty fields in Patch requests. 3199 ForceSendFields []string `json:"-"` 3200 3201 // NullFields is a list of field names (e.g. "MatchMyInterests") to 3202 // include in API requests with the JSON null value. By default, fields 3203 // with empty values are omitted from API requests. However, any field 3204 // with an empty value appearing in NullFields will be sent to the 3205 // server as null. It is an error if a field in this list has a 3206 // non-empty value. This may be used to include null fields in Patch 3207 // requests. 3208 NullFields []string `json:"-"` 3209} 3210 3211func (s *UsersettingsNotification) MarshalJSON() ([]byte, error) { 3212 type NoMethod UsersettingsNotification 3213 raw := NoMethod(*s) 3214 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3215} 3216 3217type UsersettingsNotificationMatchMyInterests struct { 3218 OptedState string `json:"opted_state,omitempty"` 3219 3220 // ForceSendFields is a list of field names (e.g. "OptedState") to 3221 // unconditionally include in API requests. By default, fields with 3222 // empty values are omitted from API requests. However, any non-pointer, 3223 // non-interface field appearing in ForceSendFields will be sent to the 3224 // server regardless of whether the field is empty or not. This may be 3225 // used to include empty fields in Patch requests. 3226 ForceSendFields []string `json:"-"` 3227 3228 // NullFields is a list of field names (e.g. "OptedState") to include in 3229 // API requests with the JSON null value. By default, fields with empty 3230 // values are omitted from API requests. However, any field with an 3231 // empty value appearing in NullFields will be sent to the server as 3232 // null. It is an error if a field in this list has a non-empty value. 3233 // This may be used to include null fields in Patch requests. 3234 NullFields []string `json:"-"` 3235} 3236 3237func (s *UsersettingsNotificationMatchMyInterests) MarshalJSON() ([]byte, error) { 3238 type NoMethod UsersettingsNotificationMatchMyInterests 3239 raw := NoMethod(*s) 3240 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3241} 3242 3243type UsersettingsNotificationMoreFromAuthors struct { 3244 OptedState string `json:"opted_state,omitempty"` 3245 3246 // ForceSendFields is a list of field names (e.g. "OptedState") to 3247 // unconditionally include in API requests. By default, fields with 3248 // empty values are omitted from API requests. However, any non-pointer, 3249 // non-interface field appearing in ForceSendFields will be sent to the 3250 // server regardless of whether the field is empty or not. This may be 3251 // used to include empty fields in Patch requests. 3252 ForceSendFields []string `json:"-"` 3253 3254 // NullFields is a list of field names (e.g. "OptedState") to include in 3255 // API requests with the JSON null value. By default, fields with empty 3256 // values are omitted from API requests. However, any field with an 3257 // empty value appearing in NullFields will be sent to the server as 3258 // null. It is an error if a field in this list has a non-empty value. 3259 // This may be used to include null fields in Patch requests. 3260 NullFields []string `json:"-"` 3261} 3262 3263func (s *UsersettingsNotificationMoreFromAuthors) MarshalJSON() ([]byte, error) { 3264 type NoMethod UsersettingsNotificationMoreFromAuthors 3265 raw := NoMethod(*s) 3266 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3267} 3268 3269type UsersettingsNotificationMoreFromSeries struct { 3270 OptedState string `json:"opted_state,omitempty"` 3271 3272 // ForceSendFields is a list of field names (e.g. "OptedState") to 3273 // unconditionally include in API requests. By default, fields with 3274 // empty values are omitted from API requests. However, any non-pointer, 3275 // non-interface field appearing in ForceSendFields will be sent to the 3276 // server regardless of whether the field is empty or not. This may be 3277 // used to include empty fields in Patch requests. 3278 ForceSendFields []string `json:"-"` 3279 3280 // NullFields is a list of field names (e.g. "OptedState") to include in 3281 // API requests with the JSON null value. By default, fields with empty 3282 // values are omitted from API requests. However, any field with an 3283 // empty value appearing in NullFields will be sent to the server as 3284 // null. It is an error if a field in this list has a non-empty value. 3285 // This may be used to include null fields in Patch requests. 3286 NullFields []string `json:"-"` 3287} 3288 3289func (s *UsersettingsNotificationMoreFromSeries) MarshalJSON() ([]byte, error) { 3290 type NoMethod UsersettingsNotificationMoreFromSeries 3291 raw := NoMethod(*s) 3292 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3293} 3294 3295type UsersettingsNotificationPriceDrop struct { 3296 OptedState string `json:"opted_state,omitempty"` 3297 3298 // ForceSendFields is a list of field names (e.g. "OptedState") to 3299 // unconditionally include in API requests. By default, fields with 3300 // empty values are omitted from API requests. However, any non-pointer, 3301 // non-interface field appearing in ForceSendFields will be sent to the 3302 // server regardless of whether the field is empty or not. This may be 3303 // used to include empty fields in Patch requests. 3304 ForceSendFields []string `json:"-"` 3305 3306 // NullFields is a list of field names (e.g. "OptedState") to include in 3307 // API requests with the JSON null value. By default, fields with empty 3308 // values are omitted from API requests. However, any field with an 3309 // empty value appearing in NullFields will be sent to the server as 3310 // null. It is an error if a field in this list has a non-empty value. 3311 // This may be used to include null fields in Patch requests. 3312 NullFields []string `json:"-"` 3313} 3314 3315func (s *UsersettingsNotificationPriceDrop) MarshalJSON() ([]byte, error) { 3316 type NoMethod UsersettingsNotificationPriceDrop 3317 raw := NoMethod(*s) 3318 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3319} 3320 3321type UsersettingsNotificationRewardExpirations struct { 3322 OptedState string `json:"opted_state,omitempty"` 3323 3324 // ForceSendFields is a list of field names (e.g. "OptedState") to 3325 // unconditionally include in API requests. By default, fields with 3326 // empty values are omitted from API requests. However, any non-pointer, 3327 // non-interface field appearing in ForceSendFields will be sent to the 3328 // server regardless of whether the field is empty or not. This may be 3329 // used to include empty fields in Patch requests. 3330 ForceSendFields []string `json:"-"` 3331 3332 // NullFields is a list of field names (e.g. "OptedState") to include in 3333 // API requests with the JSON null value. By default, fields with empty 3334 // values are omitted from API requests. However, any field with an 3335 // empty value appearing in NullFields will be sent to the server as 3336 // null. It is an error if a field in this list has a non-empty value. 3337 // This may be used to include null fields in Patch requests. 3338 NullFields []string `json:"-"` 3339} 3340 3341func (s *UsersettingsNotificationRewardExpirations) MarshalJSON() ([]byte, error) { 3342 type NoMethod UsersettingsNotificationRewardExpirations 3343 raw := NoMethod(*s) 3344 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3345} 3346 3347type Volume struct { 3348 // AccessInfo: Any information about a volume related to reading or 3349 // obtaining that volume text. This information can depend on country 3350 // (books may be public domain in one country but not in another, e.g.). 3351 AccessInfo *VolumeAccessInfo `json:"accessInfo,omitempty"` 3352 3353 // Etag: Opaque identifier for a specific version of a volume resource. 3354 // (In LITE projection) 3355 Etag string `json:"etag,omitempty"` 3356 3357 // Id: Unique identifier for a volume. (In LITE projection.) 3358 Id string `json:"id,omitempty"` 3359 3360 // Kind: Resource type for a volume. (In LITE projection.) 3361 Kind string `json:"kind,omitempty"` 3362 3363 // LayerInfo: What layers exist in this volume and high level 3364 // information about them. 3365 LayerInfo *VolumeLayerInfo `json:"layerInfo,omitempty"` 3366 3367 // RecommendedInfo: Recommendation related information for this volume. 3368 RecommendedInfo *VolumeRecommendedInfo `json:"recommendedInfo,omitempty"` 3369 3370 // SaleInfo: Any information about a volume related to the eBookstore 3371 // and/or purchaseability. This information can depend on the country 3372 // where the request originates from (i.e. books may not be for sale in 3373 // certain countries). 3374 SaleInfo *VolumeSaleInfo `json:"saleInfo,omitempty"` 3375 3376 // SearchInfo: Search result information related to this volume. 3377 SearchInfo *VolumeSearchInfo `json:"searchInfo,omitempty"` 3378 3379 // SelfLink: URL to this resource. (In LITE projection.) 3380 SelfLink string `json:"selfLink,omitempty"` 3381 3382 // UserInfo: User specific information related to this volume. (e.g. 3383 // page this user last read or whether they purchased this book) 3384 UserInfo *VolumeUserInfo `json:"userInfo,omitempty"` 3385 3386 // VolumeInfo: General volume information. 3387 VolumeInfo *VolumeVolumeInfo `json:"volumeInfo,omitempty"` 3388 3389 // ServerResponse contains the HTTP response code and headers from the 3390 // server. 3391 googleapi.ServerResponse `json:"-"` 3392 3393 // ForceSendFields is a list of field names (e.g. "AccessInfo") to 3394 // unconditionally include in API requests. By default, fields with 3395 // empty values are omitted from API requests. However, any non-pointer, 3396 // non-interface field appearing in ForceSendFields will be sent to the 3397 // server regardless of whether the field is empty or not. This may be 3398 // used to include empty fields in Patch requests. 3399 ForceSendFields []string `json:"-"` 3400 3401 // NullFields is a list of field names (e.g. "AccessInfo") to include in 3402 // API requests with the JSON null value. By default, fields with empty 3403 // values are omitted from API requests. However, any field with an 3404 // empty value appearing in NullFields will be sent to the server as 3405 // null. It is an error if a field in this list has a non-empty value. 3406 // This may be used to include null fields in Patch requests. 3407 NullFields []string `json:"-"` 3408} 3409 3410func (s *Volume) MarshalJSON() ([]byte, error) { 3411 type NoMethod Volume 3412 raw := NoMethod(*s) 3413 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3414} 3415 3416// VolumeAccessInfo: Any information about a volume related to reading 3417// or obtaining that volume text. This information can depend on country 3418// (books may be public domain in one country but not in another, e.g.). 3419type VolumeAccessInfo struct { 3420 // AccessViewStatus: Combines the access and viewability of this volume 3421 // into a single status field for this user. Values can be 3422 // FULL_PURCHASED, FULL_PUBLIC_DOMAIN, SAMPLE or NONE. (In LITE 3423 // projection.) 3424 AccessViewStatus string `json:"accessViewStatus,omitempty"` 3425 3426 // Country: The two-letter ISO_3166-1 country code for which this access 3427 // information is valid. (In LITE projection.) 3428 Country string `json:"country,omitempty"` 3429 3430 // DownloadAccess: Information about a volume's download license access 3431 // restrictions. 3432 DownloadAccess *DownloadAccessRestriction `json:"downloadAccess,omitempty"` 3433 3434 // DriveImportedContentLink: URL to the Google Drive viewer if this 3435 // volume is uploaded by the user by selecting the file from Google 3436 // Drive. 3437 DriveImportedContentLink string `json:"driveImportedContentLink,omitempty"` 3438 3439 // Embeddable: Whether this volume can be embedded in a viewport using 3440 // the Embedded Viewer API. 3441 Embeddable bool `json:"embeddable,omitempty"` 3442 3443 // Epub: Information about epub content. (In LITE projection.) 3444 Epub *VolumeAccessInfoEpub `json:"epub,omitempty"` 3445 3446 // ExplicitOfflineLicenseManagement: Whether this volume requires that 3447 // the client explicitly request offline download license rather than 3448 // have it done automatically when loading the content, if the client 3449 // supports it. 3450 ExplicitOfflineLicenseManagement bool `json:"explicitOfflineLicenseManagement,omitempty"` 3451 3452 // Pdf: Information about pdf content. (In LITE projection.) 3453 Pdf *VolumeAccessInfoPdf `json:"pdf,omitempty"` 3454 3455 // PublicDomain: Whether or not this book is public domain in the 3456 // country listed above. 3457 PublicDomain bool `json:"publicDomain,omitempty"` 3458 3459 // QuoteSharingAllowed: Whether quote sharing is allowed for this 3460 // volume. 3461 QuoteSharingAllowed bool `json:"quoteSharingAllowed,omitempty"` 3462 3463 // TextToSpeechPermission: Whether text-to-speech is permitted for this 3464 // volume. Values can be ALLOWED, ALLOWED_FOR_ACCESSIBILITY, or 3465 // NOT_ALLOWED. 3466 TextToSpeechPermission string `json:"textToSpeechPermission,omitempty"` 3467 3468 // ViewOrderUrl: For ordered but not yet processed orders, we give a URL 3469 // that can be used to go to the appropriate Google Wallet page. 3470 ViewOrderUrl string `json:"viewOrderUrl,omitempty"` 3471 3472 // Viewability: The read access of a volume. Possible values are 3473 // PARTIAL, ALL_PAGES, NO_PAGES or UNKNOWN. This value depends on the 3474 // country listed above. A value of PARTIAL means that the publisher has 3475 // allowed some portion of the volume to be viewed publicly, without 3476 // purchase. This can apply to eBooks as well as non-eBooks. Public 3477 // domain books will always have a value of ALL_PAGES. 3478 Viewability string `json:"viewability,omitempty"` 3479 3480 // WebReaderLink: URL to read this volume on the Google Books site. Link 3481 // will not allow users to read non-viewable volumes. 3482 WebReaderLink string `json:"webReaderLink,omitempty"` 3483 3484 // ForceSendFields is a list of field names (e.g. "AccessViewStatus") to 3485 // unconditionally include in API requests. By default, fields with 3486 // empty values are omitted from API requests. However, any non-pointer, 3487 // non-interface field appearing in ForceSendFields will be sent to the 3488 // server regardless of whether the field is empty or not. This may be 3489 // used to include empty fields in Patch requests. 3490 ForceSendFields []string `json:"-"` 3491 3492 // NullFields is a list of field names (e.g. "AccessViewStatus") to 3493 // include in API requests with the JSON null value. By default, fields 3494 // with empty values are omitted from API requests. However, any field 3495 // with an empty value appearing in NullFields will be sent to the 3496 // server as null. It is an error if a field in this list has a 3497 // non-empty value. This may be used to include null fields in Patch 3498 // requests. 3499 NullFields []string `json:"-"` 3500} 3501 3502func (s *VolumeAccessInfo) MarshalJSON() ([]byte, error) { 3503 type NoMethod VolumeAccessInfo 3504 raw := NoMethod(*s) 3505 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3506} 3507 3508// VolumeAccessInfoEpub: Information about epub content. (In LITE 3509// projection.) 3510type VolumeAccessInfoEpub struct { 3511 // AcsTokenLink: URL to retrieve ACS token for epub download. (In LITE 3512 // projection.) 3513 AcsTokenLink string `json:"acsTokenLink,omitempty"` 3514 3515 // DownloadLink: URL to download epub. (In LITE projection.) 3516 DownloadLink string `json:"downloadLink,omitempty"` 3517 3518 // IsAvailable: Is a flowing text epub available either as public domain 3519 // or for purchase. (In LITE projection.) 3520 IsAvailable bool `json:"isAvailable,omitempty"` 3521 3522 // ForceSendFields is a list of field names (e.g. "AcsTokenLink") to 3523 // unconditionally include in API requests. By default, fields with 3524 // empty values are omitted from API requests. However, any non-pointer, 3525 // non-interface field appearing in ForceSendFields will be sent to the 3526 // server regardless of whether the field is empty or not. This may be 3527 // used to include empty fields in Patch requests. 3528 ForceSendFields []string `json:"-"` 3529 3530 // NullFields is a list of field names (e.g. "AcsTokenLink") to include 3531 // in API requests with the JSON null value. By default, fields with 3532 // empty values are omitted from API requests. However, any field with 3533 // an empty value appearing in NullFields will be sent to the server as 3534 // null. It is an error if a field in this list has a non-empty value. 3535 // This may be used to include null fields in Patch requests. 3536 NullFields []string `json:"-"` 3537} 3538 3539func (s *VolumeAccessInfoEpub) MarshalJSON() ([]byte, error) { 3540 type NoMethod VolumeAccessInfoEpub 3541 raw := NoMethod(*s) 3542 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3543} 3544 3545// VolumeAccessInfoPdf: Information about pdf content. (In LITE 3546// projection.) 3547type VolumeAccessInfoPdf struct { 3548 // AcsTokenLink: URL to retrieve ACS token for pdf download. (In LITE 3549 // projection.) 3550 AcsTokenLink string `json:"acsTokenLink,omitempty"` 3551 3552 // DownloadLink: URL to download pdf. (In LITE projection.) 3553 DownloadLink string `json:"downloadLink,omitempty"` 3554 3555 // IsAvailable: Is a scanned image pdf available either as public domain 3556 // or for purchase. (In LITE projection.) 3557 IsAvailable bool `json:"isAvailable,omitempty"` 3558 3559 // ForceSendFields is a list of field names (e.g. "AcsTokenLink") to 3560 // unconditionally include in API requests. By default, fields with 3561 // empty values are omitted from API requests. However, any non-pointer, 3562 // non-interface field appearing in ForceSendFields will be sent to the 3563 // server regardless of whether the field is empty or not. This may be 3564 // used to include empty fields in Patch requests. 3565 ForceSendFields []string `json:"-"` 3566 3567 // NullFields is a list of field names (e.g. "AcsTokenLink") to include 3568 // in API requests with the JSON null value. By default, fields with 3569 // empty values are omitted from API requests. However, any field with 3570 // an empty value appearing in NullFields will be sent to the server as 3571 // null. It is an error if a field in this list has a non-empty value. 3572 // This may be used to include null fields in Patch requests. 3573 NullFields []string `json:"-"` 3574} 3575 3576func (s *VolumeAccessInfoPdf) MarshalJSON() ([]byte, error) { 3577 type NoMethod VolumeAccessInfoPdf 3578 raw := NoMethod(*s) 3579 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3580} 3581 3582// VolumeLayerInfo: What layers exist in this volume and high level 3583// information about them. 3584type VolumeLayerInfo struct { 3585 // Layers: A layer should appear here if and only if the layer exists 3586 // for this book. 3587 Layers []*VolumeLayerInfoLayers `json:"layers,omitempty"` 3588 3589 // ForceSendFields is a list of field names (e.g. "Layers") to 3590 // unconditionally include in API requests. By default, fields with 3591 // empty values are omitted from API requests. However, any non-pointer, 3592 // non-interface field appearing in ForceSendFields will be sent to the 3593 // server regardless of whether the field is empty or not. This may be 3594 // used to include empty fields in Patch requests. 3595 ForceSendFields []string `json:"-"` 3596 3597 // NullFields is a list of field names (e.g. "Layers") to include in API 3598 // requests with the JSON null value. By default, fields with empty 3599 // values are omitted from API requests. However, any field with an 3600 // empty value appearing in NullFields will be sent to the server as 3601 // null. It is an error if a field in this list has a non-empty value. 3602 // This may be used to include null fields in Patch requests. 3603 NullFields []string `json:"-"` 3604} 3605 3606func (s *VolumeLayerInfo) MarshalJSON() ([]byte, error) { 3607 type NoMethod VolumeLayerInfo 3608 raw := NoMethod(*s) 3609 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3610} 3611 3612type VolumeLayerInfoLayers struct { 3613 // LayerId: The layer id of this layer (e.g. "geo"). 3614 LayerId string `json:"layerId,omitempty"` 3615 3616 // VolumeAnnotationsVersion: The current version of this layer's volume 3617 // annotations. Note that this version applies only to the data in the 3618 // books.layers.volumeAnnotations.* responses. The actual annotation 3619 // data is versioned separately. 3620 VolumeAnnotationsVersion string `json:"volumeAnnotationsVersion,omitempty"` 3621 3622 // ForceSendFields is a list of field names (e.g. "LayerId") to 3623 // unconditionally include in API requests. By default, fields with 3624 // empty values are omitted from API requests. However, any non-pointer, 3625 // non-interface field appearing in ForceSendFields will be sent to the 3626 // server regardless of whether the field is empty or not. This may be 3627 // used to include empty fields in Patch requests. 3628 ForceSendFields []string `json:"-"` 3629 3630 // NullFields is a list of field names (e.g. "LayerId") to include in 3631 // API requests with the JSON null value. By default, fields with empty 3632 // values are omitted from API requests. However, any field with an 3633 // empty value appearing in NullFields will be sent to the server as 3634 // null. It is an error if a field in this list has a non-empty value. 3635 // This may be used to include null fields in Patch requests. 3636 NullFields []string `json:"-"` 3637} 3638 3639func (s *VolumeLayerInfoLayers) MarshalJSON() ([]byte, error) { 3640 type NoMethod VolumeLayerInfoLayers 3641 raw := NoMethod(*s) 3642 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3643} 3644 3645// VolumeRecommendedInfo: Recommendation related information for this 3646// volume. 3647type VolumeRecommendedInfo struct { 3648 // Explanation: A text explaining why this volume is recommended. 3649 Explanation string `json:"explanation,omitempty"` 3650 3651 // ForceSendFields is a list of field names (e.g. "Explanation") to 3652 // unconditionally include in API requests. By default, fields with 3653 // empty values are omitted from API requests. However, any non-pointer, 3654 // non-interface field appearing in ForceSendFields will be sent to the 3655 // server regardless of whether the field is empty or not. This may be 3656 // used to include empty fields in Patch requests. 3657 ForceSendFields []string `json:"-"` 3658 3659 // NullFields is a list of field names (e.g. "Explanation") to include 3660 // in API requests with the JSON null value. By default, fields with 3661 // empty values are omitted from API requests. However, any field with 3662 // an empty value appearing in NullFields will be sent to the server as 3663 // null. It is an error if a field in this list has a non-empty value. 3664 // This may be used to include null fields in Patch requests. 3665 NullFields []string `json:"-"` 3666} 3667 3668func (s *VolumeRecommendedInfo) MarshalJSON() ([]byte, error) { 3669 type NoMethod VolumeRecommendedInfo 3670 raw := NoMethod(*s) 3671 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3672} 3673 3674// VolumeSaleInfo: Any information about a volume related to the 3675// eBookstore and/or purchaseability. This information can depend on the 3676// country where the request originates from (i.e. books may not be for 3677// sale in certain countries). 3678type VolumeSaleInfo struct { 3679 // BuyLink: URL to purchase this volume on the Google Books site. (In 3680 // LITE projection) 3681 BuyLink string `json:"buyLink,omitempty"` 3682 3683 // Country: The two-letter ISO_3166-1 country code for which this sale 3684 // information is valid. (In LITE projection.) 3685 Country string `json:"country,omitempty"` 3686 3687 // IsEbook: Whether or not this volume is an eBook (can be added to the 3688 // My eBooks shelf). 3689 IsEbook bool `json:"isEbook,omitempty"` 3690 3691 // ListPrice: Suggested retail price. (In LITE projection.) 3692 ListPrice *VolumeSaleInfoListPrice `json:"listPrice,omitempty"` 3693 3694 // Offers: Offers available for this volume (sales and rentals). 3695 Offers []*VolumeSaleInfoOffers `json:"offers,omitempty"` 3696 3697 // OnSaleDate: The date on which this book is available for sale. 3698 OnSaleDate string `json:"onSaleDate,omitempty"` 3699 3700 // RetailPrice: The actual selling price of the book. This is the same 3701 // as the suggested retail or list price unless there are offers or 3702 // discounts on this volume. (In LITE projection.) 3703 RetailPrice *VolumeSaleInfoRetailPrice `json:"retailPrice,omitempty"` 3704 3705 // Saleability: Whether or not this book is available for sale or 3706 // offered for free in the Google eBookstore for the country listed 3707 // above. Possible values are FOR_SALE, FOR_RENTAL_ONLY, 3708 // FOR_SALE_AND_RENTAL, FREE, NOT_FOR_SALE, or FOR_PREORDER. 3709 Saleability string `json:"saleability,omitempty"` 3710 3711 // ForceSendFields is a list of field names (e.g. "BuyLink") to 3712 // unconditionally include in API requests. By default, fields with 3713 // empty values are omitted from API requests. However, any non-pointer, 3714 // non-interface field appearing in ForceSendFields will be sent to the 3715 // server regardless of whether the field is empty or not. This may be 3716 // used to include empty fields in Patch requests. 3717 ForceSendFields []string `json:"-"` 3718 3719 // NullFields is a list of field names (e.g. "BuyLink") to include in 3720 // API requests with the JSON null value. By default, fields with empty 3721 // values are omitted from API requests. However, any field with an 3722 // empty value appearing in NullFields will be sent to the server as 3723 // null. It is an error if a field in this list has a non-empty value. 3724 // This may be used to include null fields in Patch requests. 3725 NullFields []string `json:"-"` 3726} 3727 3728func (s *VolumeSaleInfo) MarshalJSON() ([]byte, error) { 3729 type NoMethod VolumeSaleInfo 3730 raw := NoMethod(*s) 3731 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3732} 3733 3734// VolumeSaleInfoListPrice: Suggested retail price. (In LITE 3735// projection.) 3736type VolumeSaleInfoListPrice struct { 3737 // Amount: Amount in the currency listed below. (In LITE projection.) 3738 Amount float64 `json:"amount,omitempty"` 3739 3740 // CurrencyCode: An ISO 4217, three-letter currency code. (In LITE 3741 // projection.) 3742 CurrencyCode string `json:"currencyCode,omitempty"` 3743 3744 // ForceSendFields is a list of field names (e.g. "Amount") to 3745 // unconditionally include in API requests. By default, fields with 3746 // empty values are omitted from API requests. However, any non-pointer, 3747 // non-interface field appearing in ForceSendFields will be sent to the 3748 // server regardless of whether the field is empty or not. This may be 3749 // used to include empty fields in Patch requests. 3750 ForceSendFields []string `json:"-"` 3751 3752 // NullFields is a list of field names (e.g. "Amount") to include in API 3753 // requests with the JSON null value. By default, fields with empty 3754 // values are omitted from API requests. However, any field with an 3755 // empty value appearing in NullFields will be sent to the server as 3756 // null. It is an error if a field in this list has a non-empty value. 3757 // This may be used to include null fields in Patch requests. 3758 NullFields []string `json:"-"` 3759} 3760 3761func (s *VolumeSaleInfoListPrice) MarshalJSON() ([]byte, error) { 3762 type NoMethod VolumeSaleInfoListPrice 3763 raw := NoMethod(*s) 3764 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3765} 3766 3767func (s *VolumeSaleInfoListPrice) UnmarshalJSON(data []byte) error { 3768 type NoMethod VolumeSaleInfoListPrice 3769 var s1 struct { 3770 Amount gensupport.JSONFloat64 `json:"amount"` 3771 *NoMethod 3772 } 3773 s1.NoMethod = (*NoMethod)(s) 3774 if err := json.Unmarshal(data, &s1); err != nil { 3775 return err 3776 } 3777 s.Amount = float64(s1.Amount) 3778 return nil 3779} 3780 3781type VolumeSaleInfoOffers struct { 3782 // FinskyOfferType: The finsky offer type (e.g., PURCHASE=0 RENTAL=3) 3783 FinskyOfferType int64 `json:"finskyOfferType,omitempty"` 3784 3785 // Giftable: Indicates whether the offer is giftable. 3786 Giftable bool `json:"giftable,omitempty"` 3787 3788 // ListPrice: Offer list (=undiscounted) price in Micros. 3789 ListPrice *VolumeSaleInfoOffersListPrice `json:"listPrice,omitempty"` 3790 3791 // RentalDuration: The rental duration (for rental offers only). 3792 RentalDuration *VolumeSaleInfoOffersRentalDuration `json:"rentalDuration,omitempty"` 3793 3794 // RetailPrice: Offer retail (=discounted) price in Micros 3795 RetailPrice *VolumeSaleInfoOffersRetailPrice `json:"retailPrice,omitempty"` 3796 3797 // ForceSendFields is a list of field names (e.g. "FinskyOfferType") to 3798 // unconditionally include in API requests. By default, fields with 3799 // empty values are omitted from API requests. However, any non-pointer, 3800 // non-interface field appearing in ForceSendFields will be sent to the 3801 // server regardless of whether the field is empty or not. This may be 3802 // used to include empty fields in Patch requests. 3803 ForceSendFields []string `json:"-"` 3804 3805 // NullFields is a list of field names (e.g. "FinskyOfferType") to 3806 // include in API requests with the JSON null value. By default, fields 3807 // with empty values are omitted from API requests. However, any field 3808 // with an empty value appearing in NullFields will be sent to the 3809 // server as null. It is an error if a field in this list has a 3810 // non-empty value. This may be used to include null fields in Patch 3811 // requests. 3812 NullFields []string `json:"-"` 3813} 3814 3815func (s *VolumeSaleInfoOffers) MarshalJSON() ([]byte, error) { 3816 type NoMethod VolumeSaleInfoOffers 3817 raw := NoMethod(*s) 3818 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3819} 3820 3821// VolumeSaleInfoOffersListPrice: Offer list (=undiscounted) price in 3822// Micros. 3823type VolumeSaleInfoOffersListPrice struct { 3824 AmountInMicros float64 `json:"amountInMicros,omitempty"` 3825 3826 CurrencyCode string `json:"currencyCode,omitempty"` 3827 3828 // ForceSendFields is a list of field names (e.g. "AmountInMicros") to 3829 // unconditionally include in API requests. By default, fields with 3830 // empty values are omitted from API requests. However, any non-pointer, 3831 // non-interface field appearing in ForceSendFields will be sent to the 3832 // server regardless of whether the field is empty or not. This may be 3833 // used to include empty fields in Patch requests. 3834 ForceSendFields []string `json:"-"` 3835 3836 // NullFields is a list of field names (e.g. "AmountInMicros") to 3837 // include in API requests with the JSON null value. By default, fields 3838 // with empty values are omitted from API requests. However, any field 3839 // with an empty value appearing in NullFields will be sent to the 3840 // server as null. It is an error if a field in this list has a 3841 // non-empty value. This may be used to include null fields in Patch 3842 // requests. 3843 NullFields []string `json:"-"` 3844} 3845 3846func (s *VolumeSaleInfoOffersListPrice) MarshalJSON() ([]byte, error) { 3847 type NoMethod VolumeSaleInfoOffersListPrice 3848 raw := NoMethod(*s) 3849 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3850} 3851 3852func (s *VolumeSaleInfoOffersListPrice) UnmarshalJSON(data []byte) error { 3853 type NoMethod VolumeSaleInfoOffersListPrice 3854 var s1 struct { 3855 AmountInMicros gensupport.JSONFloat64 `json:"amountInMicros"` 3856 *NoMethod 3857 } 3858 s1.NoMethod = (*NoMethod)(s) 3859 if err := json.Unmarshal(data, &s1); err != nil { 3860 return err 3861 } 3862 s.AmountInMicros = float64(s1.AmountInMicros) 3863 return nil 3864} 3865 3866// VolumeSaleInfoOffersRentalDuration: The rental duration (for rental 3867// offers only). 3868type VolumeSaleInfoOffersRentalDuration struct { 3869 Count float64 `json:"count,omitempty"` 3870 3871 Unit string `json:"unit,omitempty"` 3872 3873 // ForceSendFields is a list of field names (e.g. "Count") to 3874 // unconditionally include in API requests. By default, fields with 3875 // empty values are omitted from API requests. However, any non-pointer, 3876 // non-interface field appearing in ForceSendFields will be sent to the 3877 // server regardless of whether the field is empty or not. This may be 3878 // used to include empty fields in Patch requests. 3879 ForceSendFields []string `json:"-"` 3880 3881 // NullFields is a list of field names (e.g. "Count") to include in API 3882 // requests with the JSON null value. By default, fields with empty 3883 // values are omitted from API requests. However, any field with an 3884 // empty value appearing in NullFields will be sent to the server as 3885 // null. It is an error if a field in this list has a non-empty value. 3886 // This may be used to include null fields in Patch requests. 3887 NullFields []string `json:"-"` 3888} 3889 3890func (s *VolumeSaleInfoOffersRentalDuration) MarshalJSON() ([]byte, error) { 3891 type NoMethod VolumeSaleInfoOffersRentalDuration 3892 raw := NoMethod(*s) 3893 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3894} 3895 3896func (s *VolumeSaleInfoOffersRentalDuration) UnmarshalJSON(data []byte) error { 3897 type NoMethod VolumeSaleInfoOffersRentalDuration 3898 var s1 struct { 3899 Count gensupport.JSONFloat64 `json:"count"` 3900 *NoMethod 3901 } 3902 s1.NoMethod = (*NoMethod)(s) 3903 if err := json.Unmarshal(data, &s1); err != nil { 3904 return err 3905 } 3906 s.Count = float64(s1.Count) 3907 return nil 3908} 3909 3910// VolumeSaleInfoOffersRetailPrice: Offer retail (=discounted) price in 3911// Micros 3912type VolumeSaleInfoOffersRetailPrice struct { 3913 AmountInMicros float64 `json:"amountInMicros,omitempty"` 3914 3915 CurrencyCode string `json:"currencyCode,omitempty"` 3916 3917 // ForceSendFields is a list of field names (e.g. "AmountInMicros") to 3918 // unconditionally include in API requests. By default, fields with 3919 // empty values are omitted from API requests. However, any non-pointer, 3920 // non-interface field appearing in ForceSendFields will be sent to the 3921 // server regardless of whether the field is empty or not. This may be 3922 // used to include empty fields in Patch requests. 3923 ForceSendFields []string `json:"-"` 3924 3925 // NullFields is a list of field names (e.g. "AmountInMicros") to 3926 // include in API requests with the JSON null value. By default, fields 3927 // with empty values are omitted from API requests. However, any field 3928 // with an empty value appearing in NullFields will be sent to the 3929 // server as null. It is an error if a field in this list has a 3930 // non-empty value. This may be used to include null fields in Patch 3931 // requests. 3932 NullFields []string `json:"-"` 3933} 3934 3935func (s *VolumeSaleInfoOffersRetailPrice) MarshalJSON() ([]byte, error) { 3936 type NoMethod VolumeSaleInfoOffersRetailPrice 3937 raw := NoMethod(*s) 3938 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3939} 3940 3941func (s *VolumeSaleInfoOffersRetailPrice) UnmarshalJSON(data []byte) error { 3942 type NoMethod VolumeSaleInfoOffersRetailPrice 3943 var s1 struct { 3944 AmountInMicros gensupport.JSONFloat64 `json:"amountInMicros"` 3945 *NoMethod 3946 } 3947 s1.NoMethod = (*NoMethod)(s) 3948 if err := json.Unmarshal(data, &s1); err != nil { 3949 return err 3950 } 3951 s.AmountInMicros = float64(s1.AmountInMicros) 3952 return nil 3953} 3954 3955// VolumeSaleInfoRetailPrice: The actual selling price of the book. This 3956// is the same as the suggested retail or list price unless there are 3957// offers or discounts on this volume. (In LITE projection.) 3958type VolumeSaleInfoRetailPrice struct { 3959 // Amount: Amount in the currency listed below. (In LITE projection.) 3960 Amount float64 `json:"amount,omitempty"` 3961 3962 // CurrencyCode: An ISO 4217, three-letter currency code. (In LITE 3963 // projection.) 3964 CurrencyCode string `json:"currencyCode,omitempty"` 3965 3966 // ForceSendFields is a list of field names (e.g. "Amount") to 3967 // unconditionally include in API requests. By default, fields with 3968 // empty values are omitted from API requests. However, any non-pointer, 3969 // non-interface field appearing in ForceSendFields will be sent to the 3970 // server regardless of whether the field is empty or not. This may be 3971 // used to include empty fields in Patch requests. 3972 ForceSendFields []string `json:"-"` 3973 3974 // NullFields is a list of field names (e.g. "Amount") to include in API 3975 // requests with the JSON null value. By default, fields with empty 3976 // values are omitted from API requests. However, any field with an 3977 // empty value appearing in NullFields will be sent to the server as 3978 // null. It is an error if a field in this list has a non-empty value. 3979 // This may be used to include null fields in Patch requests. 3980 NullFields []string `json:"-"` 3981} 3982 3983func (s *VolumeSaleInfoRetailPrice) MarshalJSON() ([]byte, error) { 3984 type NoMethod VolumeSaleInfoRetailPrice 3985 raw := NoMethod(*s) 3986 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3987} 3988 3989func (s *VolumeSaleInfoRetailPrice) UnmarshalJSON(data []byte) error { 3990 type NoMethod VolumeSaleInfoRetailPrice 3991 var s1 struct { 3992 Amount gensupport.JSONFloat64 `json:"amount"` 3993 *NoMethod 3994 } 3995 s1.NoMethod = (*NoMethod)(s) 3996 if err := json.Unmarshal(data, &s1); err != nil { 3997 return err 3998 } 3999 s.Amount = float64(s1.Amount) 4000 return nil 4001} 4002 4003// VolumeSearchInfo: Search result information related to this volume. 4004type VolumeSearchInfo struct { 4005 // TextSnippet: A text snippet containing the search query. 4006 TextSnippet string `json:"textSnippet,omitempty"` 4007 4008 // ForceSendFields is a list of field names (e.g. "TextSnippet") to 4009 // unconditionally include in API requests. By default, fields with 4010 // empty values are omitted from API requests. However, any non-pointer, 4011 // non-interface field appearing in ForceSendFields will be sent to the 4012 // server regardless of whether the field is empty or not. This may be 4013 // used to include empty fields in Patch requests. 4014 ForceSendFields []string `json:"-"` 4015 4016 // NullFields is a list of field names (e.g. "TextSnippet") to include 4017 // in API requests with the JSON null value. By default, fields with 4018 // empty values are omitted from API requests. However, any field with 4019 // an empty value appearing in NullFields will be sent to the server as 4020 // null. It is an error if a field in this list has a non-empty value. 4021 // This may be used to include null fields in Patch requests. 4022 NullFields []string `json:"-"` 4023} 4024 4025func (s *VolumeSearchInfo) MarshalJSON() ([]byte, error) { 4026 type NoMethod VolumeSearchInfo 4027 raw := NoMethod(*s) 4028 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4029} 4030 4031// VolumeUserInfo: User specific information related to this volume. 4032// (e.g. page this user last read or whether they purchased this book) 4033type VolumeUserInfo struct { 4034 // AcquiredTime: Timestamp when this volume was acquired by the user. 4035 // (RFC 3339 UTC date-time format) Acquiring includes purchase, user 4036 // upload, receiving family sharing, etc. 4037 AcquiredTime string `json:"acquiredTime,omitempty"` 4038 4039 // AcquisitionType: How this volume was acquired. 4040 AcquisitionType int64 `json:"acquisitionType,omitempty"` 4041 4042 // Copy: Copy/Paste accounting information. 4043 Copy *VolumeUserInfoCopy `json:"copy,omitempty"` 4044 4045 // EntitlementType: Whether this volume is purchased, sample, pd 4046 // download etc. 4047 EntitlementType int64 `json:"entitlementType,omitempty"` 4048 4049 // FamilySharing: Information on the ability to share with the family. 4050 FamilySharing *VolumeUserInfoFamilySharing `json:"familySharing,omitempty"` 4051 4052 // IsFamilySharedFromUser: Whether or not the user shared this volume 4053 // with the family. 4054 IsFamilySharedFromUser bool `json:"isFamilySharedFromUser,omitempty"` 4055 4056 // IsFamilySharedToUser: Whether or not the user received this volume 4057 // through family sharing. 4058 IsFamilySharedToUser bool `json:"isFamilySharedToUser,omitempty"` 4059 4060 // IsFamilySharingAllowed: Deprecated: Replaced by familySharing. 4061 IsFamilySharingAllowed bool `json:"isFamilySharingAllowed,omitempty"` 4062 4063 // IsFamilySharingDisabledByFop: Deprecated: Replaced by familySharing. 4064 IsFamilySharingDisabledByFop bool `json:"isFamilySharingDisabledByFop,omitempty"` 4065 4066 // IsInMyBooks: Whether or not this volume is currently in "my books." 4067 IsInMyBooks bool `json:"isInMyBooks,omitempty"` 4068 4069 // IsPreordered: Whether or not this volume was pre-ordered by the 4070 // authenticated user making the request. (In LITE projection.) 4071 IsPreordered bool `json:"isPreordered,omitempty"` 4072 4073 // IsPurchased: Whether or not this volume was purchased by the 4074 // authenticated user making the request. (In LITE projection.) 4075 IsPurchased bool `json:"isPurchased,omitempty"` 4076 4077 // IsUploaded: Whether or not this volume was user uploaded. 4078 IsUploaded bool `json:"isUploaded,omitempty"` 4079 4080 // ReadingPosition: The user's current reading position in the volume, 4081 // if one is available. (In LITE projection.) 4082 ReadingPosition *ReadingPosition `json:"readingPosition,omitempty"` 4083 4084 // RentalPeriod: Period during this book is/was a valid rental. 4085 RentalPeriod *VolumeUserInfoRentalPeriod `json:"rentalPeriod,omitempty"` 4086 4087 // RentalState: Whether this book is an active or an expired rental. 4088 RentalState string `json:"rentalState,omitempty"` 4089 4090 // Review: This user's review of this volume, if one exists. 4091 Review *Review `json:"review,omitempty"` 4092 4093 // Updated: Timestamp when this volume was last modified by a user 4094 // action, such as a reading position update, volume purchase or writing 4095 // a review. (RFC 3339 UTC date-time format). 4096 Updated string `json:"updated,omitempty"` 4097 4098 UserUploadedVolumeInfo *VolumeUserInfoUserUploadedVolumeInfo `json:"userUploadedVolumeInfo,omitempty"` 4099 4100 // ForceSendFields is a list of field names (e.g. "AcquiredTime") to 4101 // unconditionally include in API requests. By default, fields with 4102 // empty values are omitted from API requests. However, any non-pointer, 4103 // non-interface field appearing in ForceSendFields will be sent to the 4104 // server regardless of whether the field is empty or not. This may be 4105 // used to include empty fields in Patch requests. 4106 ForceSendFields []string `json:"-"` 4107 4108 // NullFields is a list of field names (e.g. "AcquiredTime") to include 4109 // in API requests with the JSON null value. By default, fields with 4110 // empty values are omitted from API requests. However, any field with 4111 // an empty value appearing in NullFields will be sent to the server as 4112 // null. It is an error if a field in this list has a non-empty value. 4113 // This may be used to include null fields in Patch requests. 4114 NullFields []string `json:"-"` 4115} 4116 4117func (s *VolumeUserInfo) MarshalJSON() ([]byte, error) { 4118 type NoMethod VolumeUserInfo 4119 raw := NoMethod(*s) 4120 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4121} 4122 4123// VolumeUserInfoCopy: Copy/Paste accounting information. 4124type VolumeUserInfoCopy struct { 4125 AllowedCharacterCount int64 `json:"allowedCharacterCount,omitempty"` 4126 4127 LimitType string `json:"limitType,omitempty"` 4128 4129 RemainingCharacterCount int64 `json:"remainingCharacterCount,omitempty"` 4130 4131 Updated string `json:"updated,omitempty"` 4132 4133 // ForceSendFields is a list of field names (e.g. 4134 // "AllowedCharacterCount") to unconditionally include in API requests. 4135 // By default, fields with empty values are omitted from API requests. 4136 // However, any non-pointer, non-interface field appearing in 4137 // ForceSendFields will be sent to the server regardless of whether the 4138 // field is empty or not. This may be used to include empty fields in 4139 // Patch requests. 4140 ForceSendFields []string `json:"-"` 4141 4142 // NullFields is a list of field names (e.g. "AllowedCharacterCount") to 4143 // include in API requests with the JSON null value. By default, fields 4144 // with empty values are omitted from API requests. However, any field 4145 // with an empty value appearing in NullFields will be sent to the 4146 // server as null. It is an error if a field in this list has a 4147 // non-empty value. This may be used to include null fields in Patch 4148 // requests. 4149 NullFields []string `json:"-"` 4150} 4151 4152func (s *VolumeUserInfoCopy) MarshalJSON() ([]byte, error) { 4153 type NoMethod VolumeUserInfoCopy 4154 raw := NoMethod(*s) 4155 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4156} 4157 4158// VolumeUserInfoFamilySharing: Information on the ability to share with 4159// the family. 4160type VolumeUserInfoFamilySharing struct { 4161 // FamilyRole: The role of the user in the family. 4162 FamilyRole string `json:"familyRole,omitempty"` 4163 4164 // IsSharingAllowed: Whether or not this volume can be shared with the 4165 // family by the user. This includes sharing eligibility of both the 4166 // volume and the user. If the value is true, the user can initiate a 4167 // family sharing action. 4168 IsSharingAllowed bool `json:"isSharingAllowed,omitempty"` 4169 4170 // IsSharingDisabledByFop: Whether or not sharing this volume is 4171 // temporarily disabled due to issues with the Family Wallet. 4172 IsSharingDisabledByFop bool `json:"isSharingDisabledByFop,omitempty"` 4173 4174 // ForceSendFields is a list of field names (e.g. "FamilyRole") to 4175 // unconditionally include in API requests. By default, fields with 4176 // empty values are omitted from API requests. However, any non-pointer, 4177 // non-interface field appearing in ForceSendFields will be sent to the 4178 // server regardless of whether the field is empty or not. This may be 4179 // used to include empty fields in Patch requests. 4180 ForceSendFields []string `json:"-"` 4181 4182 // NullFields is a list of field names (e.g. "FamilyRole") to include in 4183 // API requests with the JSON null value. By default, fields with empty 4184 // values are omitted from API requests. However, any field with an 4185 // empty value appearing in NullFields will be sent to the server as 4186 // null. It is an error if a field in this list has a non-empty value. 4187 // This may be used to include null fields in Patch requests. 4188 NullFields []string `json:"-"` 4189} 4190 4191func (s *VolumeUserInfoFamilySharing) MarshalJSON() ([]byte, error) { 4192 type NoMethod VolumeUserInfoFamilySharing 4193 raw := NoMethod(*s) 4194 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4195} 4196 4197// VolumeUserInfoRentalPeriod: Period during this book is/was a valid 4198// rental. 4199type VolumeUserInfoRentalPeriod struct { 4200 EndUtcSec int64 `json:"endUtcSec,omitempty,string"` 4201 4202 StartUtcSec int64 `json:"startUtcSec,omitempty,string"` 4203 4204 // ForceSendFields is a list of field names (e.g. "EndUtcSec") to 4205 // unconditionally include in API requests. By default, fields with 4206 // empty values are omitted from API requests. However, any non-pointer, 4207 // non-interface field appearing in ForceSendFields will be sent to the 4208 // server regardless of whether the field is empty or not. This may be 4209 // used to include empty fields in Patch requests. 4210 ForceSendFields []string `json:"-"` 4211 4212 // NullFields is a list of field names (e.g. "EndUtcSec") to include in 4213 // API requests with the JSON null value. By default, fields with empty 4214 // values are omitted from API requests. However, any field with an 4215 // empty value appearing in NullFields will be sent to the server as 4216 // null. It is an error if a field in this list has a non-empty value. 4217 // This may be used to include null fields in Patch requests. 4218 NullFields []string `json:"-"` 4219} 4220 4221func (s *VolumeUserInfoRentalPeriod) MarshalJSON() ([]byte, error) { 4222 type NoMethod VolumeUserInfoRentalPeriod 4223 raw := NoMethod(*s) 4224 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4225} 4226 4227type VolumeUserInfoUserUploadedVolumeInfo struct { 4228 ProcessingState string `json:"processingState,omitempty"` 4229 4230 // ForceSendFields is a list of field names (e.g. "ProcessingState") to 4231 // unconditionally include in API requests. By default, fields with 4232 // empty values are omitted from API requests. However, any non-pointer, 4233 // non-interface field appearing in ForceSendFields will be sent to the 4234 // server regardless of whether the field is empty or not. This may be 4235 // used to include empty fields in Patch requests. 4236 ForceSendFields []string `json:"-"` 4237 4238 // NullFields is a list of field names (e.g. "ProcessingState") to 4239 // include in API requests with the JSON null value. By default, fields 4240 // with empty values are omitted from API requests. However, any field 4241 // with an empty value appearing in NullFields will be sent to the 4242 // server as null. It is an error if a field in this list has a 4243 // non-empty value. This may be used to include null fields in Patch 4244 // requests. 4245 NullFields []string `json:"-"` 4246} 4247 4248func (s *VolumeUserInfoUserUploadedVolumeInfo) MarshalJSON() ([]byte, error) { 4249 type NoMethod VolumeUserInfoUserUploadedVolumeInfo 4250 raw := NoMethod(*s) 4251 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4252} 4253 4254// VolumeVolumeInfo: General volume information. 4255type VolumeVolumeInfo struct { 4256 // AllowAnonLogging: Whether anonymous logging should be allowed. 4257 AllowAnonLogging bool `json:"allowAnonLogging,omitempty"` 4258 4259 // Authors: The names of the authors and/or editors for this volume. (In 4260 // LITE projection) 4261 Authors []string `json:"authors,omitempty"` 4262 4263 // AverageRating: The mean review rating for this volume. (min = 1.0, 4264 // max = 5.0) 4265 AverageRating float64 `json:"averageRating,omitempty"` 4266 4267 // CanonicalVolumeLink: Canonical URL for a volume. (In LITE 4268 // projection.) 4269 CanonicalVolumeLink string `json:"canonicalVolumeLink,omitempty"` 4270 4271 // Categories: A list of subject categories, such as "Fiction", 4272 // "Suspense", etc. 4273 Categories []string `json:"categories,omitempty"` 4274 4275 // ComicsContent: Whether the volume has comics content. 4276 ComicsContent bool `json:"comicsContent,omitempty"` 4277 4278 // ContentVersion: An identifier for the version of the volume content 4279 // (text & images). (In LITE projection) 4280 ContentVersion string `json:"contentVersion,omitempty"` 4281 4282 // Description: A synopsis of the volume. The text of the description is 4283 // formatted in HTML and includes simple formatting elements, such as b, 4284 // i, and br tags. (In LITE projection.) 4285 Description string `json:"description,omitempty"` 4286 4287 // Dimensions: Physical dimensions of this volume. 4288 Dimensions *VolumeVolumeInfoDimensions `json:"dimensions,omitempty"` 4289 4290 // ImageLinks: A list of image links for all the sizes that are 4291 // available. (In LITE projection.) 4292 ImageLinks *VolumeVolumeInfoImageLinks `json:"imageLinks,omitempty"` 4293 4294 // IndustryIdentifiers: Industry standard identifiers for this volume. 4295 IndustryIdentifiers []*VolumeVolumeInfoIndustryIdentifiers `json:"industryIdentifiers,omitempty"` 4296 4297 // InfoLink: URL to view information about this volume on the Google 4298 // Books site. (In LITE projection) 4299 InfoLink string `json:"infoLink,omitempty"` 4300 4301 // Language: Best language for this volume (based on content). It is the 4302 // two-letter ISO 639-1 code such as 'fr', 'en', etc. 4303 Language string `json:"language,omitempty"` 4304 4305 // MainCategory: The main category to which this volume belongs. It will 4306 // be the category from the categories list returned below that has the 4307 // highest weight. 4308 MainCategory string `json:"mainCategory,omitempty"` 4309 4310 MaturityRating string `json:"maturityRating,omitempty"` 4311 4312 // PageCount: Total number of pages as per publisher metadata. 4313 PageCount int64 `json:"pageCount,omitempty"` 4314 4315 // PanelizationSummary: A top-level summary of the panelization info in 4316 // this volume. 4317 PanelizationSummary *VolumeVolumeInfoPanelizationSummary `json:"panelizationSummary,omitempty"` 4318 4319 // PreviewLink: URL to preview this volume on the Google Books site. 4320 PreviewLink string `json:"previewLink,omitempty"` 4321 4322 // PrintType: Type of publication of this volume. Possible values are 4323 // BOOK or MAGAZINE. 4324 PrintType string `json:"printType,omitempty"` 4325 4326 // PrintedPageCount: Total number of printed pages in generated pdf 4327 // representation. 4328 PrintedPageCount int64 `json:"printedPageCount,omitempty"` 4329 4330 // PublishedDate: Date of publication. (In LITE projection.) 4331 PublishedDate string `json:"publishedDate,omitempty"` 4332 4333 // Publisher: Publisher of this volume. (In LITE projection.) 4334 Publisher string `json:"publisher,omitempty"` 4335 4336 // RatingsCount: The number of review ratings for this volume. 4337 RatingsCount int64 `json:"ratingsCount,omitempty"` 4338 4339 // ReadingModes: The reading modes available for this volume. 4340 ReadingModes *VolumeVolumeInfoReadingModes `json:"readingModes,omitempty"` 4341 4342 // SamplePageCount: Total number of sample pages as per publisher 4343 // metadata. 4344 SamplePageCount int64 `json:"samplePageCount,omitempty"` 4345 4346 SeriesInfo *Volumeseriesinfo `json:"seriesInfo,omitempty"` 4347 4348 // Subtitle: Volume subtitle. (In LITE projection.) 4349 Subtitle string `json:"subtitle,omitempty"` 4350 4351 // Title: Volume title. (In LITE projection.) 4352 Title string `json:"title,omitempty"` 4353 4354 // ForceSendFields is a list of field names (e.g. "AllowAnonLogging") to 4355 // unconditionally include in API requests. By default, fields with 4356 // empty values are omitted from API requests. However, any non-pointer, 4357 // non-interface field appearing in ForceSendFields will be sent to the 4358 // server regardless of whether the field is empty or not. This may be 4359 // used to include empty fields in Patch requests. 4360 ForceSendFields []string `json:"-"` 4361 4362 // NullFields is a list of field names (e.g. "AllowAnonLogging") to 4363 // include in API requests with the JSON null value. By default, fields 4364 // with empty values are omitted from API requests. However, any field 4365 // with an empty value appearing in NullFields will be sent to the 4366 // server as null. It is an error if a field in this list has a 4367 // non-empty value. This may be used to include null fields in Patch 4368 // requests. 4369 NullFields []string `json:"-"` 4370} 4371 4372func (s *VolumeVolumeInfo) MarshalJSON() ([]byte, error) { 4373 type NoMethod VolumeVolumeInfo 4374 raw := NoMethod(*s) 4375 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4376} 4377 4378func (s *VolumeVolumeInfo) UnmarshalJSON(data []byte) error { 4379 type NoMethod VolumeVolumeInfo 4380 var s1 struct { 4381 AverageRating gensupport.JSONFloat64 `json:"averageRating"` 4382 *NoMethod 4383 } 4384 s1.NoMethod = (*NoMethod)(s) 4385 if err := json.Unmarshal(data, &s1); err != nil { 4386 return err 4387 } 4388 s.AverageRating = float64(s1.AverageRating) 4389 return nil 4390} 4391 4392// VolumeVolumeInfoDimensions: Physical dimensions of this volume. 4393type VolumeVolumeInfoDimensions struct { 4394 // Height: Height or length of this volume (in cm). 4395 Height string `json:"height,omitempty"` 4396 4397 // Thickness: Thickness of this volume (in cm). 4398 Thickness string `json:"thickness,omitempty"` 4399 4400 // Width: Width of this volume (in cm). 4401 Width string `json:"width,omitempty"` 4402 4403 // ForceSendFields is a list of field names (e.g. "Height") to 4404 // unconditionally include in API requests. By default, fields with 4405 // empty values are omitted from API requests. However, any non-pointer, 4406 // non-interface field appearing in ForceSendFields will be sent to the 4407 // server regardless of whether the field is empty or not. This may be 4408 // used to include empty fields in Patch requests. 4409 ForceSendFields []string `json:"-"` 4410 4411 // NullFields is a list of field names (e.g. "Height") to include in API 4412 // requests with the JSON null value. By default, fields with empty 4413 // values are omitted from API requests. However, any field with an 4414 // empty value appearing in NullFields will be sent to the server as 4415 // null. It is an error if a field in this list has a non-empty value. 4416 // This may be used to include null fields in Patch requests. 4417 NullFields []string `json:"-"` 4418} 4419 4420func (s *VolumeVolumeInfoDimensions) MarshalJSON() ([]byte, error) { 4421 type NoMethod VolumeVolumeInfoDimensions 4422 raw := NoMethod(*s) 4423 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4424} 4425 4426// VolumeVolumeInfoImageLinks: A list of image links for all the sizes 4427// that are available. (In LITE projection.) 4428type VolumeVolumeInfoImageLinks struct { 4429 // ExtraLarge: Image link for extra large size (width of ~1280 pixels). 4430 // (In LITE projection) 4431 ExtraLarge string `json:"extraLarge,omitempty"` 4432 4433 // Large: Image link for large size (width of ~800 pixels). (In LITE 4434 // projection) 4435 Large string `json:"large,omitempty"` 4436 4437 // Medium: Image link for medium size (width of ~575 pixels). (In LITE 4438 // projection) 4439 Medium string `json:"medium,omitempty"` 4440 4441 // Small: Image link for small size (width of ~300 pixels). (In LITE 4442 // projection) 4443 Small string `json:"small,omitempty"` 4444 4445 // SmallThumbnail: Image link for small thumbnail size (width of ~80 4446 // pixels). (In LITE projection) 4447 SmallThumbnail string `json:"smallThumbnail,omitempty"` 4448 4449 // Thumbnail: Image link for thumbnail size (width of ~128 pixels). (In 4450 // LITE projection) 4451 Thumbnail string `json:"thumbnail,omitempty"` 4452 4453 // ForceSendFields is a list of field names (e.g. "ExtraLarge") to 4454 // unconditionally include in API requests. By default, fields with 4455 // empty values are omitted from API requests. However, any non-pointer, 4456 // non-interface field appearing in ForceSendFields will be sent to the 4457 // server regardless of whether the field is empty or not. This may be 4458 // used to include empty fields in Patch requests. 4459 ForceSendFields []string `json:"-"` 4460 4461 // NullFields is a list of field names (e.g. "ExtraLarge") to include in 4462 // API requests with the JSON null value. By default, fields with empty 4463 // values are omitted from API requests. However, any field with an 4464 // empty value appearing in NullFields will be sent to the server as 4465 // null. It is an error if a field in this list has a non-empty value. 4466 // This may be used to include null fields in Patch requests. 4467 NullFields []string `json:"-"` 4468} 4469 4470func (s *VolumeVolumeInfoImageLinks) MarshalJSON() ([]byte, error) { 4471 type NoMethod VolumeVolumeInfoImageLinks 4472 raw := NoMethod(*s) 4473 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4474} 4475 4476type VolumeVolumeInfoIndustryIdentifiers struct { 4477 // Identifier: Industry specific volume identifier. 4478 Identifier string `json:"identifier,omitempty"` 4479 4480 // Type: Identifier type. Possible values are ISBN_10, ISBN_13, ISSN and 4481 // OTHER. 4482 Type string `json:"type,omitempty"` 4483 4484 // ForceSendFields is a list of field names (e.g. "Identifier") to 4485 // unconditionally include in API requests. By default, fields with 4486 // empty values are omitted from API requests. However, any non-pointer, 4487 // non-interface field appearing in ForceSendFields will be sent to the 4488 // server regardless of whether the field is empty or not. This may be 4489 // used to include empty fields in Patch requests. 4490 ForceSendFields []string `json:"-"` 4491 4492 // NullFields is a list of field names (e.g. "Identifier") to include in 4493 // API requests with the JSON null value. By default, fields with empty 4494 // values are omitted from API requests. However, any field with an 4495 // empty value appearing in NullFields will be sent to the server as 4496 // null. It is an error if a field in this list has a non-empty value. 4497 // This may be used to include null fields in Patch requests. 4498 NullFields []string `json:"-"` 4499} 4500 4501func (s *VolumeVolumeInfoIndustryIdentifiers) MarshalJSON() ([]byte, error) { 4502 type NoMethod VolumeVolumeInfoIndustryIdentifiers 4503 raw := NoMethod(*s) 4504 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4505} 4506 4507// VolumeVolumeInfoPanelizationSummary: A top-level summary of the 4508// panelization info in this volume. 4509type VolumeVolumeInfoPanelizationSummary struct { 4510 ContainsEpubBubbles bool `json:"containsEpubBubbles,omitempty"` 4511 4512 ContainsImageBubbles bool `json:"containsImageBubbles,omitempty"` 4513 4514 EpubBubbleVersion string `json:"epubBubbleVersion,omitempty"` 4515 4516 ImageBubbleVersion string `json:"imageBubbleVersion,omitempty"` 4517 4518 // ForceSendFields is a list of field names (e.g. "ContainsEpubBubbles") 4519 // to unconditionally include in API requests. By default, fields with 4520 // empty values are omitted from API requests. However, any non-pointer, 4521 // non-interface field appearing in ForceSendFields will be sent to the 4522 // server regardless of whether the field is empty or not. This may be 4523 // used to include empty fields in Patch requests. 4524 ForceSendFields []string `json:"-"` 4525 4526 // NullFields is a list of field names (e.g. "ContainsEpubBubbles") to 4527 // include in API requests with the JSON null value. By default, fields 4528 // with empty values are omitted from API requests. However, any field 4529 // with an empty value appearing in NullFields will be sent to the 4530 // server as null. It is an error if a field in this list has a 4531 // non-empty value. This may be used to include null fields in Patch 4532 // requests. 4533 NullFields []string `json:"-"` 4534} 4535 4536func (s *VolumeVolumeInfoPanelizationSummary) MarshalJSON() ([]byte, error) { 4537 type NoMethod VolumeVolumeInfoPanelizationSummary 4538 raw := NoMethod(*s) 4539 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4540} 4541 4542// VolumeVolumeInfoReadingModes: The reading modes available for this 4543// volume. 4544type VolumeVolumeInfoReadingModes struct { 4545 Image bool `json:"image,omitempty"` 4546 4547 Text bool `json:"text,omitempty"` 4548 4549 // ForceSendFields is a list of field names (e.g. "Image") to 4550 // unconditionally include in API requests. By default, fields with 4551 // empty values are omitted from API requests. However, any non-pointer, 4552 // non-interface field appearing in ForceSendFields will be sent to the 4553 // server regardless of whether the field is empty or not. This may be 4554 // used to include empty fields in Patch requests. 4555 ForceSendFields []string `json:"-"` 4556 4557 // NullFields is a list of field names (e.g. "Image") to include in API 4558 // requests with the JSON null value. By default, fields with empty 4559 // values are omitted from API requests. However, any field with an 4560 // empty value appearing in NullFields will be sent to the server as 4561 // null. It is an error if a field in this list has a non-empty value. 4562 // This may be used to include null fields in Patch requests. 4563 NullFields []string `json:"-"` 4564} 4565 4566func (s *VolumeVolumeInfoReadingModes) MarshalJSON() ([]byte, error) { 4567 type NoMethod VolumeVolumeInfoReadingModes 4568 raw := NoMethod(*s) 4569 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4570} 4571 4572type Volume2 struct { 4573 // Items: A list of volumes. 4574 Items []*Volume `json:"items,omitempty"` 4575 4576 // Kind: Resource type. 4577 Kind string `json:"kind,omitempty"` 4578 4579 NextPageToken string `json:"nextPageToken,omitempty"` 4580 4581 // ServerResponse contains the HTTP response code and headers from the 4582 // server. 4583 googleapi.ServerResponse `json:"-"` 4584 4585 // ForceSendFields is a list of field names (e.g. "Items") to 4586 // unconditionally include in API requests. By default, fields with 4587 // empty values are omitted from API requests. However, any non-pointer, 4588 // non-interface field appearing in ForceSendFields will be sent to the 4589 // server regardless of whether the field is empty or not. This may be 4590 // used to include empty fields in Patch requests. 4591 ForceSendFields []string `json:"-"` 4592 4593 // NullFields is a list of field names (e.g. "Items") to include in API 4594 // requests with the JSON null value. By default, fields with empty 4595 // values are omitted from API requests. However, any field with an 4596 // empty value appearing in NullFields will be sent to the server as 4597 // null. It is an error if a field in this list has a non-empty value. 4598 // This may be used to include null fields in Patch requests. 4599 NullFields []string `json:"-"` 4600} 4601 4602func (s *Volume2) MarshalJSON() ([]byte, error) { 4603 type NoMethod Volume2 4604 raw := NoMethod(*s) 4605 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4606} 4607 4608type Volumeannotation struct { 4609 // AnnotationDataId: The annotation data id for this volume annotation. 4610 AnnotationDataId string `json:"annotationDataId,omitempty"` 4611 4612 // AnnotationDataLink: Link to get data for this annotation. 4613 AnnotationDataLink string `json:"annotationDataLink,omitempty"` 4614 4615 // AnnotationType: The type of annotation this is. 4616 AnnotationType string `json:"annotationType,omitempty"` 4617 4618 // ContentRanges: The content ranges to identify the selected text. 4619 ContentRanges *VolumeannotationContentRanges `json:"contentRanges,omitempty"` 4620 4621 // Data: Data for this annotation. 4622 Data string `json:"data,omitempty"` 4623 4624 // Deleted: Indicates that this annotation is deleted. 4625 Deleted bool `json:"deleted,omitempty"` 4626 4627 // Id: Unique id of this volume annotation. 4628 Id string `json:"id,omitempty"` 4629 4630 // Kind: Resource Type 4631 Kind string `json:"kind,omitempty"` 4632 4633 // LayerId: The Layer this annotation is for. 4634 LayerId string `json:"layerId,omitempty"` 4635 4636 // PageIds: Pages the annotation spans. 4637 PageIds []string `json:"pageIds,omitempty"` 4638 4639 // SelectedText: Excerpt from the volume. 4640 SelectedText string `json:"selectedText,omitempty"` 4641 4642 // SelfLink: URL to this resource. 4643 SelfLink string `json:"selfLink,omitempty"` 4644 4645 // Updated: Timestamp for the last time this anntoation was updated. 4646 // (RFC 3339 UTC date-time format). 4647 Updated string `json:"updated,omitempty"` 4648 4649 // VolumeId: The Volume this annotation is for. 4650 VolumeId string `json:"volumeId,omitempty"` 4651 4652 // ServerResponse contains the HTTP response code and headers from the 4653 // server. 4654 googleapi.ServerResponse `json:"-"` 4655 4656 // ForceSendFields is a list of field names (e.g. "AnnotationDataId") to 4657 // unconditionally include in API requests. By default, fields with 4658 // empty values are omitted from API requests. However, any non-pointer, 4659 // non-interface field appearing in ForceSendFields will be sent to the 4660 // server regardless of whether the field is empty or not. This may be 4661 // used to include empty fields in Patch requests. 4662 ForceSendFields []string `json:"-"` 4663 4664 // NullFields is a list of field names (e.g. "AnnotationDataId") to 4665 // include in API requests with the JSON null value. By default, fields 4666 // with empty values are omitted from API requests. However, any field 4667 // with an empty value appearing in NullFields will be sent to the 4668 // server as null. It is an error if a field in this list has a 4669 // non-empty value. This may be used to include null fields in Patch 4670 // requests. 4671 NullFields []string `json:"-"` 4672} 4673 4674func (s *Volumeannotation) MarshalJSON() ([]byte, error) { 4675 type NoMethod Volumeannotation 4676 raw := NoMethod(*s) 4677 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4678} 4679 4680// VolumeannotationContentRanges: The content ranges to identify the 4681// selected text. 4682type VolumeannotationContentRanges struct { 4683 // CfiRange: Range in CFI format for this annotation for version above. 4684 CfiRange *BooksAnnotationsRange `json:"cfiRange,omitempty"` 4685 4686 // ContentVersion: Content version applicable to ranges below. 4687 ContentVersion string `json:"contentVersion,omitempty"` 4688 4689 // GbImageRange: Range in GB image format for this annotation for 4690 // version above. 4691 GbImageRange *BooksAnnotationsRange `json:"gbImageRange,omitempty"` 4692 4693 // GbTextRange: Range in GB text format for this annotation for version 4694 // above. 4695 GbTextRange *BooksAnnotationsRange `json:"gbTextRange,omitempty"` 4696 4697 // ForceSendFields is a list of field names (e.g. "CfiRange") to 4698 // unconditionally include in API requests. By default, fields with 4699 // empty values are omitted from API requests. However, any non-pointer, 4700 // non-interface field appearing in ForceSendFields will be sent to the 4701 // server regardless of whether the field is empty or not. This may be 4702 // used to include empty fields in Patch requests. 4703 ForceSendFields []string `json:"-"` 4704 4705 // NullFields is a list of field names (e.g. "CfiRange") to include in 4706 // API requests with the JSON null value. By default, fields with empty 4707 // values are omitted from API requests. However, any field with an 4708 // empty value appearing in NullFields will be sent to the server as 4709 // null. It is an error if a field in this list has a non-empty value. 4710 // This may be used to include null fields in Patch requests. 4711 NullFields []string `json:"-"` 4712} 4713 4714func (s *VolumeannotationContentRanges) MarshalJSON() ([]byte, error) { 4715 type NoMethod VolumeannotationContentRanges 4716 raw := NoMethod(*s) 4717 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4718} 4719 4720type Volumeannotations struct { 4721 // Items: A list of volume annotations. 4722 Items []*Volumeannotation `json:"items,omitempty"` 4723 4724 // Kind: Resource type 4725 Kind string `json:"kind,omitempty"` 4726 4727 // NextPageToken: Token to pass in for pagination for the next page. 4728 // This will not be present if this request does not have more results. 4729 NextPageToken string `json:"nextPageToken,omitempty"` 4730 4731 // TotalItems: The total number of volume annotations found. 4732 TotalItems int64 `json:"totalItems,omitempty"` 4733 4734 // Version: The version string for all of the volume annotations in this 4735 // layer (not just the ones in this response). Note: the version string 4736 // doesn't apply to the annotation data, just the information in this 4737 // response (e.g. the location of annotations in the book). 4738 Version string `json:"version,omitempty"` 4739 4740 // ServerResponse contains the HTTP response code and headers from the 4741 // server. 4742 googleapi.ServerResponse `json:"-"` 4743 4744 // ForceSendFields is a list of field names (e.g. "Items") to 4745 // unconditionally include in API requests. By default, fields with 4746 // empty values are omitted from API requests. However, any non-pointer, 4747 // non-interface field appearing in ForceSendFields will be sent to the 4748 // server regardless of whether the field is empty or not. This may be 4749 // used to include empty fields in Patch requests. 4750 ForceSendFields []string `json:"-"` 4751 4752 // NullFields is a list of field names (e.g. "Items") to include in API 4753 // requests with the JSON null value. By default, fields with empty 4754 // values are omitted from API requests. However, any field with an 4755 // empty value appearing in NullFields will be sent to the server as 4756 // null. It is an error if a field in this list has a non-empty value. 4757 // This may be used to include null fields in Patch requests. 4758 NullFields []string `json:"-"` 4759} 4760 4761func (s *Volumeannotations) MarshalJSON() ([]byte, error) { 4762 type NoMethod Volumeannotations 4763 raw := NoMethod(*s) 4764 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4765} 4766 4767type Volumes struct { 4768 // Items: A list of volumes. 4769 Items []*Volume `json:"items,omitempty"` 4770 4771 // Kind: Resource type. 4772 Kind string `json:"kind,omitempty"` 4773 4774 // TotalItems: Total number of volumes found. This might be greater than 4775 // the number of volumes returned in this response if results have been 4776 // paginated. 4777 TotalItems int64 `json:"totalItems,omitempty"` 4778 4779 // ServerResponse contains the HTTP response code and headers from the 4780 // server. 4781 googleapi.ServerResponse `json:"-"` 4782 4783 // ForceSendFields is a list of field names (e.g. "Items") to 4784 // unconditionally include in API requests. By default, fields with 4785 // empty values are omitted from API requests. However, any non-pointer, 4786 // non-interface field appearing in ForceSendFields will be sent to the 4787 // server regardless of whether the field is empty or not. This may be 4788 // used to include empty fields in Patch requests. 4789 ForceSendFields []string `json:"-"` 4790 4791 // NullFields is a list of field names (e.g. "Items") to include in API 4792 // requests with the JSON null value. By default, fields with empty 4793 // values are omitted from API requests. However, any field with an 4794 // empty value appearing in NullFields will be sent to the server as 4795 // null. It is an error if a field in this list has a non-empty value. 4796 // This may be used to include null fields in Patch requests. 4797 NullFields []string `json:"-"` 4798} 4799 4800func (s *Volumes) MarshalJSON() ([]byte, error) { 4801 type NoMethod Volumes 4802 raw := NoMethod(*s) 4803 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4804} 4805 4806type Volumeseriesinfo struct { 4807 // BookDisplayNumber: The display number string. This should be used 4808 // only for display purposes and the actual sequence should be inferred 4809 // from the below orderNumber. 4810 BookDisplayNumber string `json:"bookDisplayNumber,omitempty"` 4811 4812 // Kind: Resource type. 4813 Kind string `json:"kind,omitempty"` 4814 4815 // ShortSeriesBookTitle: Short book title in the context of the series. 4816 ShortSeriesBookTitle string `json:"shortSeriesBookTitle,omitempty"` 4817 4818 VolumeSeries []*VolumeseriesinfoVolumeSeries `json:"volumeSeries,omitempty"` 4819 4820 // ForceSendFields is a list of field names (e.g. "BookDisplayNumber") 4821 // to unconditionally include in API requests. By default, fields with 4822 // empty values are omitted from API requests. However, any non-pointer, 4823 // non-interface field appearing in ForceSendFields will be sent to the 4824 // server regardless of whether the field is empty or not. This may be 4825 // used to include empty fields in Patch requests. 4826 ForceSendFields []string `json:"-"` 4827 4828 // NullFields is a list of field names (e.g. "BookDisplayNumber") to 4829 // include in API requests with the JSON null value. By default, fields 4830 // with empty values are omitted from API requests. However, any field 4831 // with an empty value appearing in NullFields will be sent to the 4832 // server as null. It is an error if a field in this list has a 4833 // non-empty value. This may be used to include null fields in Patch 4834 // requests. 4835 NullFields []string `json:"-"` 4836} 4837 4838func (s *Volumeseriesinfo) MarshalJSON() ([]byte, error) { 4839 type NoMethod Volumeseriesinfo 4840 raw := NoMethod(*s) 4841 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4842} 4843 4844type VolumeseriesinfoVolumeSeries struct { 4845 // Issue: List of issues. Applicable only for Collection Edition and 4846 // Omnibus. 4847 Issue []*VolumeseriesinfoVolumeSeriesIssue `json:"issue,omitempty"` 4848 4849 // OrderNumber: The book order number in the series. 4850 OrderNumber int64 `json:"orderNumber,omitempty"` 4851 4852 // SeriesBookType: The book type in the context of series. Examples - 4853 // Single Issue, Collection Edition, etc. 4854 SeriesBookType string `json:"seriesBookType,omitempty"` 4855 4856 // SeriesId: The series id. 4857 SeriesId string `json:"seriesId,omitempty"` 4858 4859 // ForceSendFields is a list of field names (e.g. "Issue") to 4860 // unconditionally include in API requests. By default, fields with 4861 // empty values are omitted from API requests. However, any non-pointer, 4862 // non-interface field appearing in ForceSendFields will be sent to the 4863 // server regardless of whether the field is empty or not. This may be 4864 // used to include empty fields in Patch requests. 4865 ForceSendFields []string `json:"-"` 4866 4867 // NullFields is a list of field names (e.g. "Issue") to include in API 4868 // requests with the JSON null value. By default, fields with empty 4869 // values are omitted from API requests. However, any field with an 4870 // empty value appearing in NullFields will be sent to the server as 4871 // null. It is an error if a field in this list has a non-empty value. 4872 // This may be used to include null fields in Patch requests. 4873 NullFields []string `json:"-"` 4874} 4875 4876func (s *VolumeseriesinfoVolumeSeries) MarshalJSON() ([]byte, error) { 4877 type NoMethod VolumeseriesinfoVolumeSeries 4878 raw := NoMethod(*s) 4879 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4880} 4881 4882type VolumeseriesinfoVolumeSeriesIssue struct { 4883 IssueDisplayNumber string `json:"issueDisplayNumber,omitempty"` 4884 4885 IssueOrderNumber int64 `json:"issueOrderNumber,omitempty"` 4886 4887 // ForceSendFields is a list of field names (e.g. "IssueDisplayNumber") 4888 // to unconditionally include in API requests. By default, fields with 4889 // empty values are omitted from API requests. However, any non-pointer, 4890 // non-interface field appearing in ForceSendFields will be sent to the 4891 // server regardless of whether the field is empty or not. This may be 4892 // used to include empty fields in Patch requests. 4893 ForceSendFields []string `json:"-"` 4894 4895 // NullFields is a list of field names (e.g. "IssueDisplayNumber") to 4896 // include in API requests with the JSON null value. By default, fields 4897 // with empty values are omitted from API requests. However, any field 4898 // with an empty value appearing in NullFields will be sent to the 4899 // server as null. It is an error if a field in this list has a 4900 // non-empty value. This may be used to include null fields in Patch 4901 // requests. 4902 NullFields []string `json:"-"` 4903} 4904 4905func (s *VolumeseriesinfoVolumeSeriesIssue) MarshalJSON() ([]byte, error) { 4906 type NoMethod VolumeseriesinfoVolumeSeriesIssue 4907 raw := NoMethod(*s) 4908 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4909} 4910 4911// method id "books.bookshelves.get": 4912 4913type BookshelvesGetCall struct { 4914 s *Service 4915 userId string 4916 shelf string 4917 urlParams_ gensupport.URLParams 4918 ifNoneMatch_ string 4919 ctx_ context.Context 4920 header_ http.Header 4921} 4922 4923// Get: Retrieves metadata for a specific bookshelf for the specified 4924// user. 4925func (r *BookshelvesService) Get(userId string, shelf string) *BookshelvesGetCall { 4926 c := &BookshelvesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4927 c.userId = userId 4928 c.shelf = shelf 4929 return c 4930} 4931 4932// Source sets the optional parameter "source": String to identify the 4933// originator of this request. 4934func (c *BookshelvesGetCall) Source(source string) *BookshelvesGetCall { 4935 c.urlParams_.Set("source", source) 4936 return c 4937} 4938 4939// Fields allows partial responses to be retrieved. See 4940// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4941// for more information. 4942func (c *BookshelvesGetCall) Fields(s ...googleapi.Field) *BookshelvesGetCall { 4943 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4944 return c 4945} 4946 4947// IfNoneMatch sets the optional parameter which makes the operation 4948// fail if the object's ETag matches the given value. This is useful for 4949// getting updates only after the object has changed since the last 4950// request. Use googleapi.IsNotModified to check whether the response 4951// error from Do is the result of In-None-Match. 4952func (c *BookshelvesGetCall) IfNoneMatch(entityTag string) *BookshelvesGetCall { 4953 c.ifNoneMatch_ = entityTag 4954 return c 4955} 4956 4957// Context sets the context to be used in this call's Do method. Any 4958// pending HTTP request will be aborted if the provided context is 4959// canceled. 4960func (c *BookshelvesGetCall) Context(ctx context.Context) *BookshelvesGetCall { 4961 c.ctx_ = ctx 4962 return c 4963} 4964 4965// Header returns an http.Header that can be modified by the caller to 4966// add HTTP headers to the request. 4967func (c *BookshelvesGetCall) Header() http.Header { 4968 if c.header_ == nil { 4969 c.header_ = make(http.Header) 4970 } 4971 return c.header_ 4972} 4973 4974func (c *BookshelvesGetCall) doRequest(alt string) (*http.Response, error) { 4975 reqHeaders := make(http.Header) 4976 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 4977 for k, v := range c.header_ { 4978 reqHeaders[k] = v 4979 } 4980 reqHeaders.Set("User-Agent", c.s.userAgent()) 4981 if c.ifNoneMatch_ != "" { 4982 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4983 } 4984 var body io.Reader = nil 4985 c.urlParams_.Set("alt", alt) 4986 c.urlParams_.Set("prettyPrint", "false") 4987 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/users/{userId}/bookshelves/{shelf}") 4988 urls += "?" + c.urlParams_.Encode() 4989 req, err := http.NewRequest("GET", urls, body) 4990 if err != nil { 4991 return nil, err 4992 } 4993 req.Header = reqHeaders 4994 googleapi.Expand(req.URL, map[string]string{ 4995 "userId": c.userId, 4996 "shelf": c.shelf, 4997 }) 4998 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4999} 5000 5001// Do executes the "books.bookshelves.get" call. 5002// Exactly one of *Bookshelf or error will be non-nil. Any non-2xx 5003// status code is an error. Response headers are in either 5004// *Bookshelf.ServerResponse.Header or (if a response was returned at 5005// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5006// to check whether the returned error was because 5007// http.StatusNotModified was returned. 5008func (c *BookshelvesGetCall) Do(opts ...googleapi.CallOption) (*Bookshelf, error) { 5009 gensupport.SetOptions(c.urlParams_, opts...) 5010 res, err := c.doRequest("json") 5011 if res != nil && res.StatusCode == http.StatusNotModified { 5012 if res.Body != nil { 5013 res.Body.Close() 5014 } 5015 return nil, &googleapi.Error{ 5016 Code: res.StatusCode, 5017 Header: res.Header, 5018 } 5019 } 5020 if err != nil { 5021 return nil, err 5022 } 5023 defer googleapi.CloseBody(res) 5024 if err := googleapi.CheckResponse(res); err != nil { 5025 return nil, err 5026 } 5027 ret := &Bookshelf{ 5028 ServerResponse: googleapi.ServerResponse{ 5029 Header: res.Header, 5030 HTTPStatusCode: res.StatusCode, 5031 }, 5032 } 5033 target := &ret 5034 if err := gensupport.DecodeResponse(target, res); err != nil { 5035 return nil, err 5036 } 5037 return ret, nil 5038 // { 5039 // "description": "Retrieves metadata for a specific bookshelf for the specified user.", 5040 // "flatPath": "books/v1/users/{userId}/bookshelves/{shelf}", 5041 // "httpMethod": "GET", 5042 // "id": "books.bookshelves.get", 5043 // "parameterOrder": [ 5044 // "userId", 5045 // "shelf" 5046 // ], 5047 // "parameters": { 5048 // "shelf": { 5049 // "description": "ID of bookshelf to retrieve.", 5050 // "location": "path", 5051 // "required": true, 5052 // "type": "string" 5053 // }, 5054 // "source": { 5055 // "description": "String to identify the originator of this request.", 5056 // "location": "query", 5057 // "type": "string" 5058 // }, 5059 // "userId": { 5060 // "description": "ID of user for whom to retrieve bookshelves.", 5061 // "location": "path", 5062 // "required": true, 5063 // "type": "string" 5064 // } 5065 // }, 5066 // "path": "books/v1/users/{userId}/bookshelves/{shelf}", 5067 // "response": { 5068 // "$ref": "Bookshelf" 5069 // }, 5070 // "scopes": [ 5071 // "https://www.googleapis.com/auth/books" 5072 // ] 5073 // } 5074 5075} 5076 5077// method id "books.bookshelves.list": 5078 5079type BookshelvesListCall struct { 5080 s *Service 5081 userId string 5082 urlParams_ gensupport.URLParams 5083 ifNoneMatch_ string 5084 ctx_ context.Context 5085 header_ http.Header 5086} 5087 5088// List: Retrieves a list of public bookshelves for the specified user. 5089func (r *BookshelvesService) List(userId string) *BookshelvesListCall { 5090 c := &BookshelvesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5091 c.userId = userId 5092 return c 5093} 5094 5095// Source sets the optional parameter "source": String to identify the 5096// originator of this request. 5097func (c *BookshelvesListCall) Source(source string) *BookshelvesListCall { 5098 c.urlParams_.Set("source", source) 5099 return c 5100} 5101 5102// Fields allows partial responses to be retrieved. See 5103// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5104// for more information. 5105func (c *BookshelvesListCall) Fields(s ...googleapi.Field) *BookshelvesListCall { 5106 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5107 return c 5108} 5109 5110// IfNoneMatch sets the optional parameter which makes the operation 5111// fail if the object's ETag matches the given value. This is useful for 5112// getting updates only after the object has changed since the last 5113// request. Use googleapi.IsNotModified to check whether the response 5114// error from Do is the result of In-None-Match. 5115func (c *BookshelvesListCall) IfNoneMatch(entityTag string) *BookshelvesListCall { 5116 c.ifNoneMatch_ = entityTag 5117 return c 5118} 5119 5120// Context sets the context to be used in this call's Do method. Any 5121// pending HTTP request will be aborted if the provided context is 5122// canceled. 5123func (c *BookshelvesListCall) Context(ctx context.Context) *BookshelvesListCall { 5124 c.ctx_ = ctx 5125 return c 5126} 5127 5128// Header returns an http.Header that can be modified by the caller to 5129// add HTTP headers to the request. 5130func (c *BookshelvesListCall) Header() http.Header { 5131 if c.header_ == nil { 5132 c.header_ = make(http.Header) 5133 } 5134 return c.header_ 5135} 5136 5137func (c *BookshelvesListCall) doRequest(alt string) (*http.Response, error) { 5138 reqHeaders := make(http.Header) 5139 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 5140 for k, v := range c.header_ { 5141 reqHeaders[k] = v 5142 } 5143 reqHeaders.Set("User-Agent", c.s.userAgent()) 5144 if c.ifNoneMatch_ != "" { 5145 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5146 } 5147 var body io.Reader = nil 5148 c.urlParams_.Set("alt", alt) 5149 c.urlParams_.Set("prettyPrint", "false") 5150 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/users/{userId}/bookshelves") 5151 urls += "?" + c.urlParams_.Encode() 5152 req, err := http.NewRequest("GET", urls, body) 5153 if err != nil { 5154 return nil, err 5155 } 5156 req.Header = reqHeaders 5157 googleapi.Expand(req.URL, map[string]string{ 5158 "userId": c.userId, 5159 }) 5160 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5161} 5162 5163// Do executes the "books.bookshelves.list" call. 5164// Exactly one of *Bookshelves or error will be non-nil. Any non-2xx 5165// status code is an error. Response headers are in either 5166// *Bookshelves.ServerResponse.Header or (if a response was returned at 5167// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5168// to check whether the returned error was because 5169// http.StatusNotModified was returned. 5170func (c *BookshelvesListCall) Do(opts ...googleapi.CallOption) (*Bookshelves, error) { 5171 gensupport.SetOptions(c.urlParams_, opts...) 5172 res, err := c.doRequest("json") 5173 if res != nil && res.StatusCode == http.StatusNotModified { 5174 if res.Body != nil { 5175 res.Body.Close() 5176 } 5177 return nil, &googleapi.Error{ 5178 Code: res.StatusCode, 5179 Header: res.Header, 5180 } 5181 } 5182 if err != nil { 5183 return nil, err 5184 } 5185 defer googleapi.CloseBody(res) 5186 if err := googleapi.CheckResponse(res); err != nil { 5187 return nil, err 5188 } 5189 ret := &Bookshelves{ 5190 ServerResponse: googleapi.ServerResponse{ 5191 Header: res.Header, 5192 HTTPStatusCode: res.StatusCode, 5193 }, 5194 } 5195 target := &ret 5196 if err := gensupport.DecodeResponse(target, res); err != nil { 5197 return nil, err 5198 } 5199 return ret, nil 5200 // { 5201 // "description": "Retrieves a list of public bookshelves for the specified user.", 5202 // "flatPath": "books/v1/users/{userId}/bookshelves", 5203 // "httpMethod": "GET", 5204 // "id": "books.bookshelves.list", 5205 // "parameterOrder": [ 5206 // "userId" 5207 // ], 5208 // "parameters": { 5209 // "source": { 5210 // "description": "String to identify the originator of this request.", 5211 // "location": "query", 5212 // "type": "string" 5213 // }, 5214 // "userId": { 5215 // "description": "ID of user for whom to retrieve bookshelves.", 5216 // "location": "path", 5217 // "required": true, 5218 // "type": "string" 5219 // } 5220 // }, 5221 // "path": "books/v1/users/{userId}/bookshelves", 5222 // "response": { 5223 // "$ref": "Bookshelves" 5224 // }, 5225 // "scopes": [ 5226 // "https://www.googleapis.com/auth/books" 5227 // ] 5228 // } 5229 5230} 5231 5232// method id "books.bookshelves.volumes.list": 5233 5234type BookshelvesVolumesListCall struct { 5235 s *Service 5236 userId string 5237 shelf string 5238 urlParams_ gensupport.URLParams 5239 ifNoneMatch_ string 5240 ctx_ context.Context 5241 header_ http.Header 5242} 5243 5244// List: Retrieves volumes in a specific bookshelf for the specified 5245// user. 5246func (r *BookshelvesVolumesService) List(userId string, shelf string) *BookshelvesVolumesListCall { 5247 c := &BookshelvesVolumesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5248 c.userId = userId 5249 c.shelf = shelf 5250 return c 5251} 5252 5253// MaxResults sets the optional parameter "maxResults": Maximum number 5254// of results to return 5255func (c *BookshelvesVolumesListCall) MaxResults(maxResults int64) *BookshelvesVolumesListCall { 5256 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 5257 return c 5258} 5259 5260// ShowPreorders sets the optional parameter "showPreorders": Set to 5261// true to show pre-ordered books. Defaults to false. 5262func (c *BookshelvesVolumesListCall) ShowPreorders(showPreorders bool) *BookshelvesVolumesListCall { 5263 c.urlParams_.Set("showPreorders", fmt.Sprint(showPreorders)) 5264 return c 5265} 5266 5267// Source sets the optional parameter "source": String to identify the 5268// originator of this request. 5269func (c *BookshelvesVolumesListCall) Source(source string) *BookshelvesVolumesListCall { 5270 c.urlParams_.Set("source", source) 5271 return c 5272} 5273 5274// StartIndex sets the optional parameter "startIndex": Index of the 5275// first element to return (starts at 0) 5276func (c *BookshelvesVolumesListCall) StartIndex(startIndex int64) *BookshelvesVolumesListCall { 5277 c.urlParams_.Set("startIndex", fmt.Sprint(startIndex)) 5278 return c 5279} 5280 5281// Fields allows partial responses to be retrieved. See 5282// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5283// for more information. 5284func (c *BookshelvesVolumesListCall) Fields(s ...googleapi.Field) *BookshelvesVolumesListCall { 5285 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5286 return c 5287} 5288 5289// IfNoneMatch sets the optional parameter which makes the operation 5290// fail if the object's ETag matches the given value. This is useful for 5291// getting updates only after the object has changed since the last 5292// request. Use googleapi.IsNotModified to check whether the response 5293// error from Do is the result of In-None-Match. 5294func (c *BookshelvesVolumesListCall) IfNoneMatch(entityTag string) *BookshelvesVolumesListCall { 5295 c.ifNoneMatch_ = entityTag 5296 return c 5297} 5298 5299// Context sets the context to be used in this call's Do method. Any 5300// pending HTTP request will be aborted if the provided context is 5301// canceled. 5302func (c *BookshelvesVolumesListCall) Context(ctx context.Context) *BookshelvesVolumesListCall { 5303 c.ctx_ = ctx 5304 return c 5305} 5306 5307// Header returns an http.Header that can be modified by the caller to 5308// add HTTP headers to the request. 5309func (c *BookshelvesVolumesListCall) Header() http.Header { 5310 if c.header_ == nil { 5311 c.header_ = make(http.Header) 5312 } 5313 return c.header_ 5314} 5315 5316func (c *BookshelvesVolumesListCall) doRequest(alt string) (*http.Response, error) { 5317 reqHeaders := make(http.Header) 5318 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 5319 for k, v := range c.header_ { 5320 reqHeaders[k] = v 5321 } 5322 reqHeaders.Set("User-Agent", c.s.userAgent()) 5323 if c.ifNoneMatch_ != "" { 5324 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5325 } 5326 var body io.Reader = nil 5327 c.urlParams_.Set("alt", alt) 5328 c.urlParams_.Set("prettyPrint", "false") 5329 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/users/{userId}/bookshelves/{shelf}/volumes") 5330 urls += "?" + c.urlParams_.Encode() 5331 req, err := http.NewRequest("GET", urls, body) 5332 if err != nil { 5333 return nil, err 5334 } 5335 req.Header = reqHeaders 5336 googleapi.Expand(req.URL, map[string]string{ 5337 "userId": c.userId, 5338 "shelf": c.shelf, 5339 }) 5340 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5341} 5342 5343// Do executes the "books.bookshelves.volumes.list" call. 5344// Exactly one of *Volumes or error will be non-nil. Any non-2xx status 5345// code is an error. Response headers are in either 5346// *Volumes.ServerResponse.Header or (if a response was returned at all) 5347// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5348// check whether the returned error was because http.StatusNotModified 5349// was returned. 5350func (c *BookshelvesVolumesListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) { 5351 gensupport.SetOptions(c.urlParams_, opts...) 5352 res, err := c.doRequest("json") 5353 if res != nil && res.StatusCode == http.StatusNotModified { 5354 if res.Body != nil { 5355 res.Body.Close() 5356 } 5357 return nil, &googleapi.Error{ 5358 Code: res.StatusCode, 5359 Header: res.Header, 5360 } 5361 } 5362 if err != nil { 5363 return nil, err 5364 } 5365 defer googleapi.CloseBody(res) 5366 if err := googleapi.CheckResponse(res); err != nil { 5367 return nil, err 5368 } 5369 ret := &Volumes{ 5370 ServerResponse: googleapi.ServerResponse{ 5371 Header: res.Header, 5372 HTTPStatusCode: res.StatusCode, 5373 }, 5374 } 5375 target := &ret 5376 if err := gensupport.DecodeResponse(target, res); err != nil { 5377 return nil, err 5378 } 5379 return ret, nil 5380 // { 5381 // "description": "Retrieves volumes in a specific bookshelf for the specified user.", 5382 // "flatPath": "books/v1/users/{userId}/bookshelves/{shelf}/volumes", 5383 // "httpMethod": "GET", 5384 // "id": "books.bookshelves.volumes.list", 5385 // "parameterOrder": [ 5386 // "userId", 5387 // "shelf" 5388 // ], 5389 // "parameters": { 5390 // "maxResults": { 5391 // "description": "Maximum number of results to return", 5392 // "format": "uint32", 5393 // "location": "query", 5394 // "minimum": "0", 5395 // "type": "integer" 5396 // }, 5397 // "shelf": { 5398 // "description": "ID of bookshelf to retrieve volumes.", 5399 // "location": "path", 5400 // "required": true, 5401 // "type": "string" 5402 // }, 5403 // "showPreorders": { 5404 // "description": "Set to true to show pre-ordered books. Defaults to false.", 5405 // "location": "query", 5406 // "type": "boolean" 5407 // }, 5408 // "source": { 5409 // "description": "String to identify the originator of this request.", 5410 // "location": "query", 5411 // "type": "string" 5412 // }, 5413 // "startIndex": { 5414 // "description": "Index of the first element to return (starts at 0)", 5415 // "format": "uint32", 5416 // "location": "query", 5417 // "minimum": "0", 5418 // "type": "integer" 5419 // }, 5420 // "userId": { 5421 // "description": "ID of user for whom to retrieve bookshelf volumes.", 5422 // "location": "path", 5423 // "required": true, 5424 // "type": "string" 5425 // } 5426 // }, 5427 // "path": "books/v1/users/{userId}/bookshelves/{shelf}/volumes", 5428 // "response": { 5429 // "$ref": "Volumes" 5430 // }, 5431 // "scopes": [ 5432 // "https://www.googleapis.com/auth/books" 5433 // ] 5434 // } 5435 5436} 5437 5438// method id "books.cloudloading.addBook": 5439 5440type CloudloadingAddBookCall struct { 5441 s *Service 5442 urlParams_ gensupport.URLParams 5443 ctx_ context.Context 5444 header_ http.Header 5445} 5446 5447// AddBook: Add a user-upload volume and triggers processing. 5448func (r *CloudloadingService) AddBook() *CloudloadingAddBookCall { 5449 c := &CloudloadingAddBookCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5450 return c 5451} 5452 5453// DriveDocumentId sets the optional parameter "drive_document_id": A 5454// drive document id. The upload_client_token must not be set. 5455func (c *CloudloadingAddBookCall) DriveDocumentId(driveDocumentId string) *CloudloadingAddBookCall { 5456 c.urlParams_.Set("drive_document_id", driveDocumentId) 5457 return c 5458} 5459 5460// MimeType sets the optional parameter "mime_type": The document MIME 5461// type. It can be set only if the drive_document_id is set. 5462func (c *CloudloadingAddBookCall) MimeType(mimeType string) *CloudloadingAddBookCall { 5463 c.urlParams_.Set("mime_type", mimeType) 5464 return c 5465} 5466 5467// Name sets the optional parameter "name": The document name. It can be 5468// set only if the drive_document_id is set. 5469func (c *CloudloadingAddBookCall) Name(name string) *CloudloadingAddBookCall { 5470 c.urlParams_.Set("name", name) 5471 return c 5472} 5473 5474// UploadClientToken sets the optional parameter "upload_client_token": 5475// Scotty upload token. 5476func (c *CloudloadingAddBookCall) UploadClientToken(uploadClientToken string) *CloudloadingAddBookCall { 5477 c.urlParams_.Set("upload_client_token", uploadClientToken) 5478 return c 5479} 5480 5481// Fields allows partial responses to be retrieved. See 5482// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5483// for more information. 5484func (c *CloudloadingAddBookCall) Fields(s ...googleapi.Field) *CloudloadingAddBookCall { 5485 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5486 return c 5487} 5488 5489// Context sets the context to be used in this call's Do method. Any 5490// pending HTTP request will be aborted if the provided context is 5491// canceled. 5492func (c *CloudloadingAddBookCall) Context(ctx context.Context) *CloudloadingAddBookCall { 5493 c.ctx_ = ctx 5494 return c 5495} 5496 5497// Header returns an http.Header that can be modified by the caller to 5498// add HTTP headers to the request. 5499func (c *CloudloadingAddBookCall) Header() http.Header { 5500 if c.header_ == nil { 5501 c.header_ = make(http.Header) 5502 } 5503 return c.header_ 5504} 5505 5506func (c *CloudloadingAddBookCall) doRequest(alt string) (*http.Response, error) { 5507 reqHeaders := make(http.Header) 5508 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 5509 for k, v := range c.header_ { 5510 reqHeaders[k] = v 5511 } 5512 reqHeaders.Set("User-Agent", c.s.userAgent()) 5513 var body io.Reader = nil 5514 c.urlParams_.Set("alt", alt) 5515 c.urlParams_.Set("prettyPrint", "false") 5516 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/cloudloading/addBook") 5517 urls += "?" + c.urlParams_.Encode() 5518 req, err := http.NewRequest("POST", urls, body) 5519 if err != nil { 5520 return nil, err 5521 } 5522 req.Header = reqHeaders 5523 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5524} 5525 5526// Do executes the "books.cloudloading.addBook" call. 5527// Exactly one of *BooksCloudloadingResource or error will be non-nil. 5528// Any non-2xx status code is an error. Response headers are in either 5529// *BooksCloudloadingResource.ServerResponse.Header or (if a response 5530// was returned at all) in error.(*googleapi.Error).Header. Use 5531// googleapi.IsNotModified to check whether the returned error was 5532// because http.StatusNotModified was returned. 5533func (c *CloudloadingAddBookCall) Do(opts ...googleapi.CallOption) (*BooksCloudloadingResource, error) { 5534 gensupport.SetOptions(c.urlParams_, opts...) 5535 res, err := c.doRequest("json") 5536 if res != nil && res.StatusCode == http.StatusNotModified { 5537 if res.Body != nil { 5538 res.Body.Close() 5539 } 5540 return nil, &googleapi.Error{ 5541 Code: res.StatusCode, 5542 Header: res.Header, 5543 } 5544 } 5545 if err != nil { 5546 return nil, err 5547 } 5548 defer googleapi.CloseBody(res) 5549 if err := googleapi.CheckResponse(res); err != nil { 5550 return nil, err 5551 } 5552 ret := &BooksCloudloadingResource{ 5553 ServerResponse: googleapi.ServerResponse{ 5554 Header: res.Header, 5555 HTTPStatusCode: res.StatusCode, 5556 }, 5557 } 5558 target := &ret 5559 if err := gensupport.DecodeResponse(target, res); err != nil { 5560 return nil, err 5561 } 5562 return ret, nil 5563 // { 5564 // "description": "Add a user-upload volume and triggers processing.", 5565 // "flatPath": "books/v1/cloudloading/addBook", 5566 // "httpMethod": "POST", 5567 // "id": "books.cloudloading.addBook", 5568 // "parameterOrder": [], 5569 // "parameters": { 5570 // "drive_document_id": { 5571 // "description": "A drive document id. The upload_client_token must not be set.", 5572 // "location": "query", 5573 // "type": "string" 5574 // }, 5575 // "mime_type": { 5576 // "description": "The document MIME type. It can be set only if the drive_document_id is set.", 5577 // "location": "query", 5578 // "type": "string" 5579 // }, 5580 // "name": { 5581 // "description": "The document name. It can be set only if the drive_document_id is set.", 5582 // "location": "query", 5583 // "type": "string" 5584 // }, 5585 // "upload_client_token": { 5586 // "description": "Scotty upload token.", 5587 // "location": "query", 5588 // "type": "string" 5589 // } 5590 // }, 5591 // "path": "books/v1/cloudloading/addBook", 5592 // "response": { 5593 // "$ref": "BooksCloudloadingResource" 5594 // }, 5595 // "scopes": [ 5596 // "https://www.googleapis.com/auth/books" 5597 // ] 5598 // } 5599 5600} 5601 5602// method id "books.cloudloading.deleteBook": 5603 5604type CloudloadingDeleteBookCall struct { 5605 s *Service 5606 urlParams_ gensupport.URLParams 5607 ctx_ context.Context 5608 header_ http.Header 5609} 5610 5611// DeleteBook: Remove the book and its contents 5612func (r *CloudloadingService) DeleteBook(volumeId string) *CloudloadingDeleteBookCall { 5613 c := &CloudloadingDeleteBookCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5614 c.urlParams_.Set("volumeId", volumeId) 5615 return c 5616} 5617 5618// Fields allows partial responses to be retrieved. See 5619// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5620// for more information. 5621func (c *CloudloadingDeleteBookCall) Fields(s ...googleapi.Field) *CloudloadingDeleteBookCall { 5622 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5623 return c 5624} 5625 5626// Context sets the context to be used in this call's Do method. Any 5627// pending HTTP request will be aborted if the provided context is 5628// canceled. 5629func (c *CloudloadingDeleteBookCall) Context(ctx context.Context) *CloudloadingDeleteBookCall { 5630 c.ctx_ = ctx 5631 return c 5632} 5633 5634// Header returns an http.Header that can be modified by the caller to 5635// add HTTP headers to the request. 5636func (c *CloudloadingDeleteBookCall) Header() http.Header { 5637 if c.header_ == nil { 5638 c.header_ = make(http.Header) 5639 } 5640 return c.header_ 5641} 5642 5643func (c *CloudloadingDeleteBookCall) doRequest(alt string) (*http.Response, error) { 5644 reqHeaders := make(http.Header) 5645 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 5646 for k, v := range c.header_ { 5647 reqHeaders[k] = v 5648 } 5649 reqHeaders.Set("User-Agent", c.s.userAgent()) 5650 var body io.Reader = nil 5651 c.urlParams_.Set("alt", alt) 5652 c.urlParams_.Set("prettyPrint", "false") 5653 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/cloudloading/deleteBook") 5654 urls += "?" + c.urlParams_.Encode() 5655 req, err := http.NewRequest("POST", urls, body) 5656 if err != nil { 5657 return nil, err 5658 } 5659 req.Header = reqHeaders 5660 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5661} 5662 5663// Do executes the "books.cloudloading.deleteBook" call. 5664// Exactly one of *Empty or error will be non-nil. Any non-2xx status 5665// code is an error. Response headers are in either 5666// *Empty.ServerResponse.Header or (if a response was returned at all) 5667// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5668// check whether the returned error was because http.StatusNotModified 5669// was returned. 5670func (c *CloudloadingDeleteBookCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 5671 gensupport.SetOptions(c.urlParams_, opts...) 5672 res, err := c.doRequest("json") 5673 if res != nil && res.StatusCode == http.StatusNotModified { 5674 if res.Body != nil { 5675 res.Body.Close() 5676 } 5677 return nil, &googleapi.Error{ 5678 Code: res.StatusCode, 5679 Header: res.Header, 5680 } 5681 } 5682 if err != nil { 5683 return nil, err 5684 } 5685 defer googleapi.CloseBody(res) 5686 if err := googleapi.CheckResponse(res); err != nil { 5687 return nil, err 5688 } 5689 ret := &Empty{ 5690 ServerResponse: googleapi.ServerResponse{ 5691 Header: res.Header, 5692 HTTPStatusCode: res.StatusCode, 5693 }, 5694 } 5695 target := &ret 5696 if err := gensupport.DecodeResponse(target, res); err != nil { 5697 return nil, err 5698 } 5699 return ret, nil 5700 // { 5701 // "description": "Remove the book and its contents", 5702 // "flatPath": "books/v1/cloudloading/deleteBook", 5703 // "httpMethod": "POST", 5704 // "id": "books.cloudloading.deleteBook", 5705 // "parameterOrder": [ 5706 // "volumeId" 5707 // ], 5708 // "parameters": { 5709 // "volumeId": { 5710 // "description": "The id of the book to be removed.", 5711 // "location": "query", 5712 // "required": true, 5713 // "type": "string" 5714 // } 5715 // }, 5716 // "path": "books/v1/cloudloading/deleteBook", 5717 // "response": { 5718 // "$ref": "Empty" 5719 // }, 5720 // "scopes": [ 5721 // "https://www.googleapis.com/auth/books" 5722 // ] 5723 // } 5724 5725} 5726 5727// method id "books.cloudloading.updateBook": 5728 5729type CloudloadingUpdateBookCall struct { 5730 s *Service 5731 bookscloudloadingresource *BooksCloudloadingResource 5732 urlParams_ gensupport.URLParams 5733 ctx_ context.Context 5734 header_ http.Header 5735} 5736 5737// UpdateBook: Updates a user-upload volume. 5738func (r *CloudloadingService) UpdateBook(bookscloudloadingresource *BooksCloudloadingResource) *CloudloadingUpdateBookCall { 5739 c := &CloudloadingUpdateBookCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5740 c.bookscloudloadingresource = bookscloudloadingresource 5741 return c 5742} 5743 5744// Fields allows partial responses to be retrieved. See 5745// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5746// for more information. 5747func (c *CloudloadingUpdateBookCall) Fields(s ...googleapi.Field) *CloudloadingUpdateBookCall { 5748 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5749 return c 5750} 5751 5752// Context sets the context to be used in this call's Do method. Any 5753// pending HTTP request will be aborted if the provided context is 5754// canceled. 5755func (c *CloudloadingUpdateBookCall) Context(ctx context.Context) *CloudloadingUpdateBookCall { 5756 c.ctx_ = ctx 5757 return c 5758} 5759 5760// Header returns an http.Header that can be modified by the caller to 5761// add HTTP headers to the request. 5762func (c *CloudloadingUpdateBookCall) Header() http.Header { 5763 if c.header_ == nil { 5764 c.header_ = make(http.Header) 5765 } 5766 return c.header_ 5767} 5768 5769func (c *CloudloadingUpdateBookCall) doRequest(alt string) (*http.Response, error) { 5770 reqHeaders := make(http.Header) 5771 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 5772 for k, v := range c.header_ { 5773 reqHeaders[k] = v 5774 } 5775 reqHeaders.Set("User-Agent", c.s.userAgent()) 5776 var body io.Reader = nil 5777 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bookscloudloadingresource) 5778 if err != nil { 5779 return nil, err 5780 } 5781 reqHeaders.Set("Content-Type", "application/json") 5782 c.urlParams_.Set("alt", alt) 5783 c.urlParams_.Set("prettyPrint", "false") 5784 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/cloudloading/updateBook") 5785 urls += "?" + c.urlParams_.Encode() 5786 req, err := http.NewRequest("POST", urls, body) 5787 if err != nil { 5788 return nil, err 5789 } 5790 req.Header = reqHeaders 5791 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5792} 5793 5794// Do executes the "books.cloudloading.updateBook" call. 5795// Exactly one of *BooksCloudloadingResource or error will be non-nil. 5796// Any non-2xx status code is an error. Response headers are in either 5797// *BooksCloudloadingResource.ServerResponse.Header or (if a response 5798// was returned at all) in error.(*googleapi.Error).Header. Use 5799// googleapi.IsNotModified to check whether the returned error was 5800// because http.StatusNotModified was returned. 5801func (c *CloudloadingUpdateBookCall) Do(opts ...googleapi.CallOption) (*BooksCloudloadingResource, error) { 5802 gensupport.SetOptions(c.urlParams_, opts...) 5803 res, err := c.doRequest("json") 5804 if res != nil && res.StatusCode == http.StatusNotModified { 5805 if res.Body != nil { 5806 res.Body.Close() 5807 } 5808 return nil, &googleapi.Error{ 5809 Code: res.StatusCode, 5810 Header: res.Header, 5811 } 5812 } 5813 if err != nil { 5814 return nil, err 5815 } 5816 defer googleapi.CloseBody(res) 5817 if err := googleapi.CheckResponse(res); err != nil { 5818 return nil, err 5819 } 5820 ret := &BooksCloudloadingResource{ 5821 ServerResponse: googleapi.ServerResponse{ 5822 Header: res.Header, 5823 HTTPStatusCode: res.StatusCode, 5824 }, 5825 } 5826 target := &ret 5827 if err := gensupport.DecodeResponse(target, res); err != nil { 5828 return nil, err 5829 } 5830 return ret, nil 5831 // { 5832 // "description": "Updates a user-upload volume.", 5833 // "flatPath": "books/v1/cloudloading/updateBook", 5834 // "httpMethod": "POST", 5835 // "id": "books.cloudloading.updateBook", 5836 // "parameterOrder": [], 5837 // "parameters": {}, 5838 // "path": "books/v1/cloudloading/updateBook", 5839 // "request": { 5840 // "$ref": "BooksCloudloadingResource" 5841 // }, 5842 // "response": { 5843 // "$ref": "BooksCloudloadingResource" 5844 // }, 5845 // "scopes": [ 5846 // "https://www.googleapis.com/auth/books" 5847 // ] 5848 // } 5849 5850} 5851 5852// method id "books.dictionary.listOfflineMetadata": 5853 5854type DictionaryListOfflineMetadataCall struct { 5855 s *Service 5856 urlParams_ gensupport.URLParams 5857 ifNoneMatch_ string 5858 ctx_ context.Context 5859 header_ http.Header 5860} 5861 5862// ListOfflineMetadata: Returns a list of offline dictionary metadata 5863// available 5864func (r *DictionaryService) ListOfflineMetadata(cpksver string) *DictionaryListOfflineMetadataCall { 5865 c := &DictionaryListOfflineMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5866 c.urlParams_.Set("cpksver", cpksver) 5867 return c 5868} 5869 5870// Fields allows partial responses to be retrieved. See 5871// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5872// for more information. 5873func (c *DictionaryListOfflineMetadataCall) Fields(s ...googleapi.Field) *DictionaryListOfflineMetadataCall { 5874 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5875 return c 5876} 5877 5878// IfNoneMatch sets the optional parameter which makes the operation 5879// fail if the object's ETag matches the given value. This is useful for 5880// getting updates only after the object has changed since the last 5881// request. Use googleapi.IsNotModified to check whether the response 5882// error from Do is the result of In-None-Match. 5883func (c *DictionaryListOfflineMetadataCall) IfNoneMatch(entityTag string) *DictionaryListOfflineMetadataCall { 5884 c.ifNoneMatch_ = entityTag 5885 return c 5886} 5887 5888// Context sets the context to be used in this call's Do method. Any 5889// pending HTTP request will be aborted if the provided context is 5890// canceled. 5891func (c *DictionaryListOfflineMetadataCall) Context(ctx context.Context) *DictionaryListOfflineMetadataCall { 5892 c.ctx_ = ctx 5893 return c 5894} 5895 5896// Header returns an http.Header that can be modified by the caller to 5897// add HTTP headers to the request. 5898func (c *DictionaryListOfflineMetadataCall) Header() http.Header { 5899 if c.header_ == nil { 5900 c.header_ = make(http.Header) 5901 } 5902 return c.header_ 5903} 5904 5905func (c *DictionaryListOfflineMetadataCall) doRequest(alt string) (*http.Response, error) { 5906 reqHeaders := make(http.Header) 5907 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 5908 for k, v := range c.header_ { 5909 reqHeaders[k] = v 5910 } 5911 reqHeaders.Set("User-Agent", c.s.userAgent()) 5912 if c.ifNoneMatch_ != "" { 5913 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5914 } 5915 var body io.Reader = nil 5916 c.urlParams_.Set("alt", alt) 5917 c.urlParams_.Set("prettyPrint", "false") 5918 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/dictionary/listOfflineMetadata") 5919 urls += "?" + c.urlParams_.Encode() 5920 req, err := http.NewRequest("GET", urls, body) 5921 if err != nil { 5922 return nil, err 5923 } 5924 req.Header = reqHeaders 5925 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5926} 5927 5928// Do executes the "books.dictionary.listOfflineMetadata" call. 5929// Exactly one of *Metadata or error will be non-nil. Any non-2xx status 5930// code is an error. Response headers are in either 5931// *Metadata.ServerResponse.Header or (if a response was returned at 5932// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5933// to check whether the returned error was because 5934// http.StatusNotModified was returned. 5935func (c *DictionaryListOfflineMetadataCall) Do(opts ...googleapi.CallOption) (*Metadata, error) { 5936 gensupport.SetOptions(c.urlParams_, opts...) 5937 res, err := c.doRequest("json") 5938 if res != nil && res.StatusCode == http.StatusNotModified { 5939 if res.Body != nil { 5940 res.Body.Close() 5941 } 5942 return nil, &googleapi.Error{ 5943 Code: res.StatusCode, 5944 Header: res.Header, 5945 } 5946 } 5947 if err != nil { 5948 return nil, err 5949 } 5950 defer googleapi.CloseBody(res) 5951 if err := googleapi.CheckResponse(res); err != nil { 5952 return nil, err 5953 } 5954 ret := &Metadata{ 5955 ServerResponse: googleapi.ServerResponse{ 5956 Header: res.Header, 5957 HTTPStatusCode: res.StatusCode, 5958 }, 5959 } 5960 target := &ret 5961 if err := gensupport.DecodeResponse(target, res); err != nil { 5962 return nil, err 5963 } 5964 return ret, nil 5965 // { 5966 // "description": "Returns a list of offline dictionary metadata available", 5967 // "flatPath": "books/v1/dictionary/listOfflineMetadata", 5968 // "httpMethod": "GET", 5969 // "id": "books.dictionary.listOfflineMetadata", 5970 // "parameterOrder": [ 5971 // "cpksver" 5972 // ], 5973 // "parameters": { 5974 // "cpksver": { 5975 // "description": "The device/version ID from which to request the data.", 5976 // "location": "query", 5977 // "required": true, 5978 // "type": "string" 5979 // } 5980 // }, 5981 // "path": "books/v1/dictionary/listOfflineMetadata", 5982 // "response": { 5983 // "$ref": "Metadata" 5984 // }, 5985 // "scopes": [ 5986 // "https://www.googleapis.com/auth/books" 5987 // ] 5988 // } 5989 5990} 5991 5992// method id "books.familysharing.getFamilyInfo": 5993 5994type FamilysharingGetFamilyInfoCall struct { 5995 s *Service 5996 urlParams_ gensupport.URLParams 5997 ifNoneMatch_ string 5998 ctx_ context.Context 5999 header_ http.Header 6000} 6001 6002// GetFamilyInfo: Gets information regarding the family that the user is 6003// part of. 6004func (r *FamilysharingService) GetFamilyInfo() *FamilysharingGetFamilyInfoCall { 6005 c := &FamilysharingGetFamilyInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6006 return c 6007} 6008 6009// Source sets the optional parameter "source": String to identify the 6010// originator of this request. 6011func (c *FamilysharingGetFamilyInfoCall) Source(source string) *FamilysharingGetFamilyInfoCall { 6012 c.urlParams_.Set("source", source) 6013 return c 6014} 6015 6016// Fields allows partial responses to be retrieved. See 6017// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6018// for more information. 6019func (c *FamilysharingGetFamilyInfoCall) Fields(s ...googleapi.Field) *FamilysharingGetFamilyInfoCall { 6020 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6021 return c 6022} 6023 6024// IfNoneMatch sets the optional parameter which makes the operation 6025// fail if the object's ETag matches the given value. This is useful for 6026// getting updates only after the object has changed since the last 6027// request. Use googleapi.IsNotModified to check whether the response 6028// error from Do is the result of In-None-Match. 6029func (c *FamilysharingGetFamilyInfoCall) IfNoneMatch(entityTag string) *FamilysharingGetFamilyInfoCall { 6030 c.ifNoneMatch_ = entityTag 6031 return c 6032} 6033 6034// Context sets the context to be used in this call's Do method. Any 6035// pending HTTP request will be aborted if the provided context is 6036// canceled. 6037func (c *FamilysharingGetFamilyInfoCall) Context(ctx context.Context) *FamilysharingGetFamilyInfoCall { 6038 c.ctx_ = ctx 6039 return c 6040} 6041 6042// Header returns an http.Header that can be modified by the caller to 6043// add HTTP headers to the request. 6044func (c *FamilysharingGetFamilyInfoCall) Header() http.Header { 6045 if c.header_ == nil { 6046 c.header_ = make(http.Header) 6047 } 6048 return c.header_ 6049} 6050 6051func (c *FamilysharingGetFamilyInfoCall) doRequest(alt string) (*http.Response, error) { 6052 reqHeaders := make(http.Header) 6053 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6054 for k, v := range c.header_ { 6055 reqHeaders[k] = v 6056 } 6057 reqHeaders.Set("User-Agent", c.s.userAgent()) 6058 if c.ifNoneMatch_ != "" { 6059 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6060 } 6061 var body io.Reader = nil 6062 c.urlParams_.Set("alt", alt) 6063 c.urlParams_.Set("prettyPrint", "false") 6064 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/familysharing/getFamilyInfo") 6065 urls += "?" + c.urlParams_.Encode() 6066 req, err := http.NewRequest("GET", urls, body) 6067 if err != nil { 6068 return nil, err 6069 } 6070 req.Header = reqHeaders 6071 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6072} 6073 6074// Do executes the "books.familysharing.getFamilyInfo" call. 6075// Exactly one of *FamilyInfo or error will be non-nil. Any non-2xx 6076// status code is an error. Response headers are in either 6077// *FamilyInfo.ServerResponse.Header or (if a response was returned at 6078// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6079// to check whether the returned error was because 6080// http.StatusNotModified was returned. 6081func (c *FamilysharingGetFamilyInfoCall) Do(opts ...googleapi.CallOption) (*FamilyInfo, error) { 6082 gensupport.SetOptions(c.urlParams_, opts...) 6083 res, err := c.doRequest("json") 6084 if res != nil && res.StatusCode == http.StatusNotModified { 6085 if res.Body != nil { 6086 res.Body.Close() 6087 } 6088 return nil, &googleapi.Error{ 6089 Code: res.StatusCode, 6090 Header: res.Header, 6091 } 6092 } 6093 if err != nil { 6094 return nil, err 6095 } 6096 defer googleapi.CloseBody(res) 6097 if err := googleapi.CheckResponse(res); err != nil { 6098 return nil, err 6099 } 6100 ret := &FamilyInfo{ 6101 ServerResponse: googleapi.ServerResponse{ 6102 Header: res.Header, 6103 HTTPStatusCode: res.StatusCode, 6104 }, 6105 } 6106 target := &ret 6107 if err := gensupport.DecodeResponse(target, res); err != nil { 6108 return nil, err 6109 } 6110 return ret, nil 6111 // { 6112 // "description": "Gets information regarding the family that the user is part of.", 6113 // "flatPath": "books/v1/familysharing/getFamilyInfo", 6114 // "httpMethod": "GET", 6115 // "id": "books.familysharing.getFamilyInfo", 6116 // "parameterOrder": [], 6117 // "parameters": { 6118 // "source": { 6119 // "description": "String to identify the originator of this request.", 6120 // "location": "query", 6121 // "type": "string" 6122 // } 6123 // }, 6124 // "path": "books/v1/familysharing/getFamilyInfo", 6125 // "response": { 6126 // "$ref": "FamilyInfo" 6127 // }, 6128 // "scopes": [ 6129 // "https://www.googleapis.com/auth/books" 6130 // ] 6131 // } 6132 6133} 6134 6135// method id "books.familysharing.share": 6136 6137type FamilysharingShareCall struct { 6138 s *Service 6139 urlParams_ gensupport.URLParams 6140 ctx_ context.Context 6141 header_ http.Header 6142} 6143 6144// Share: Initiates sharing of the content with the user's family. Empty 6145// response indicates success. 6146func (r *FamilysharingService) Share() *FamilysharingShareCall { 6147 c := &FamilysharingShareCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6148 return c 6149} 6150 6151// DocId sets the optional parameter "docId": The docid to share. 6152func (c *FamilysharingShareCall) DocId(docId string) *FamilysharingShareCall { 6153 c.urlParams_.Set("docId", docId) 6154 return c 6155} 6156 6157// Source sets the optional parameter "source": String to identify the 6158// originator of this request. 6159func (c *FamilysharingShareCall) Source(source string) *FamilysharingShareCall { 6160 c.urlParams_.Set("source", source) 6161 return c 6162} 6163 6164// VolumeId sets the optional parameter "volumeId": The volume to share. 6165func (c *FamilysharingShareCall) VolumeId(volumeId string) *FamilysharingShareCall { 6166 c.urlParams_.Set("volumeId", volumeId) 6167 return c 6168} 6169 6170// Fields allows partial responses to be retrieved. See 6171// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6172// for more information. 6173func (c *FamilysharingShareCall) Fields(s ...googleapi.Field) *FamilysharingShareCall { 6174 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6175 return c 6176} 6177 6178// Context sets the context to be used in this call's Do method. Any 6179// pending HTTP request will be aborted if the provided context is 6180// canceled. 6181func (c *FamilysharingShareCall) Context(ctx context.Context) *FamilysharingShareCall { 6182 c.ctx_ = ctx 6183 return c 6184} 6185 6186// Header returns an http.Header that can be modified by the caller to 6187// add HTTP headers to the request. 6188func (c *FamilysharingShareCall) Header() http.Header { 6189 if c.header_ == nil { 6190 c.header_ = make(http.Header) 6191 } 6192 return c.header_ 6193} 6194 6195func (c *FamilysharingShareCall) doRequest(alt string) (*http.Response, error) { 6196 reqHeaders := make(http.Header) 6197 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6198 for k, v := range c.header_ { 6199 reqHeaders[k] = v 6200 } 6201 reqHeaders.Set("User-Agent", c.s.userAgent()) 6202 var body io.Reader = nil 6203 c.urlParams_.Set("alt", alt) 6204 c.urlParams_.Set("prettyPrint", "false") 6205 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/familysharing/share") 6206 urls += "?" + c.urlParams_.Encode() 6207 req, err := http.NewRequest("POST", urls, body) 6208 if err != nil { 6209 return nil, err 6210 } 6211 req.Header = reqHeaders 6212 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6213} 6214 6215// Do executes the "books.familysharing.share" call. 6216// Exactly one of *Empty or error will be non-nil. Any non-2xx status 6217// code is an error. Response headers are in either 6218// *Empty.ServerResponse.Header or (if a response was returned at all) 6219// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6220// check whether the returned error was because http.StatusNotModified 6221// was returned. 6222func (c *FamilysharingShareCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 6223 gensupport.SetOptions(c.urlParams_, opts...) 6224 res, err := c.doRequest("json") 6225 if res != nil && res.StatusCode == http.StatusNotModified { 6226 if res.Body != nil { 6227 res.Body.Close() 6228 } 6229 return nil, &googleapi.Error{ 6230 Code: res.StatusCode, 6231 Header: res.Header, 6232 } 6233 } 6234 if err != nil { 6235 return nil, err 6236 } 6237 defer googleapi.CloseBody(res) 6238 if err := googleapi.CheckResponse(res); err != nil { 6239 return nil, err 6240 } 6241 ret := &Empty{ 6242 ServerResponse: googleapi.ServerResponse{ 6243 Header: res.Header, 6244 HTTPStatusCode: res.StatusCode, 6245 }, 6246 } 6247 target := &ret 6248 if err := gensupport.DecodeResponse(target, res); err != nil { 6249 return nil, err 6250 } 6251 return ret, nil 6252 // { 6253 // "description": "Initiates sharing of the content with the user's family. Empty response indicates success.", 6254 // "flatPath": "books/v1/familysharing/share", 6255 // "httpMethod": "POST", 6256 // "id": "books.familysharing.share", 6257 // "parameterOrder": [], 6258 // "parameters": { 6259 // "docId": { 6260 // "description": "The docid to share.", 6261 // "location": "query", 6262 // "type": "string" 6263 // }, 6264 // "source": { 6265 // "description": "String to identify the originator of this request.", 6266 // "location": "query", 6267 // "type": "string" 6268 // }, 6269 // "volumeId": { 6270 // "description": "The volume to share.", 6271 // "location": "query", 6272 // "type": "string" 6273 // } 6274 // }, 6275 // "path": "books/v1/familysharing/share", 6276 // "response": { 6277 // "$ref": "Empty" 6278 // }, 6279 // "scopes": [ 6280 // "https://www.googleapis.com/auth/books" 6281 // ] 6282 // } 6283 6284} 6285 6286// method id "books.familysharing.unshare": 6287 6288type FamilysharingUnshareCall struct { 6289 s *Service 6290 urlParams_ gensupport.URLParams 6291 ctx_ context.Context 6292 header_ http.Header 6293} 6294 6295// Unshare: Initiates revoking content that has already been shared with 6296// the user's family. Empty response indicates success. 6297func (r *FamilysharingService) Unshare() *FamilysharingUnshareCall { 6298 c := &FamilysharingUnshareCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6299 return c 6300} 6301 6302// DocId sets the optional parameter "docId": The docid to unshare. 6303func (c *FamilysharingUnshareCall) DocId(docId string) *FamilysharingUnshareCall { 6304 c.urlParams_.Set("docId", docId) 6305 return c 6306} 6307 6308// Source sets the optional parameter "source": String to identify the 6309// originator of this request. 6310func (c *FamilysharingUnshareCall) Source(source string) *FamilysharingUnshareCall { 6311 c.urlParams_.Set("source", source) 6312 return c 6313} 6314 6315// VolumeId sets the optional parameter "volumeId": The volume to 6316// unshare. 6317func (c *FamilysharingUnshareCall) VolumeId(volumeId string) *FamilysharingUnshareCall { 6318 c.urlParams_.Set("volumeId", volumeId) 6319 return c 6320} 6321 6322// Fields allows partial responses to be retrieved. See 6323// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6324// for more information. 6325func (c *FamilysharingUnshareCall) Fields(s ...googleapi.Field) *FamilysharingUnshareCall { 6326 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6327 return c 6328} 6329 6330// Context sets the context to be used in this call's Do method. Any 6331// pending HTTP request will be aborted if the provided context is 6332// canceled. 6333func (c *FamilysharingUnshareCall) Context(ctx context.Context) *FamilysharingUnshareCall { 6334 c.ctx_ = ctx 6335 return c 6336} 6337 6338// Header returns an http.Header that can be modified by the caller to 6339// add HTTP headers to the request. 6340func (c *FamilysharingUnshareCall) Header() http.Header { 6341 if c.header_ == nil { 6342 c.header_ = make(http.Header) 6343 } 6344 return c.header_ 6345} 6346 6347func (c *FamilysharingUnshareCall) doRequest(alt string) (*http.Response, error) { 6348 reqHeaders := make(http.Header) 6349 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6350 for k, v := range c.header_ { 6351 reqHeaders[k] = v 6352 } 6353 reqHeaders.Set("User-Agent", c.s.userAgent()) 6354 var body io.Reader = nil 6355 c.urlParams_.Set("alt", alt) 6356 c.urlParams_.Set("prettyPrint", "false") 6357 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/familysharing/unshare") 6358 urls += "?" + c.urlParams_.Encode() 6359 req, err := http.NewRequest("POST", urls, body) 6360 if err != nil { 6361 return nil, err 6362 } 6363 req.Header = reqHeaders 6364 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6365} 6366 6367// Do executes the "books.familysharing.unshare" call. 6368// Exactly one of *Empty or error will be non-nil. Any non-2xx status 6369// code is an error. Response headers are in either 6370// *Empty.ServerResponse.Header or (if a response was returned at all) 6371// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6372// check whether the returned error was because http.StatusNotModified 6373// was returned. 6374func (c *FamilysharingUnshareCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 6375 gensupport.SetOptions(c.urlParams_, opts...) 6376 res, err := c.doRequest("json") 6377 if res != nil && res.StatusCode == http.StatusNotModified { 6378 if res.Body != nil { 6379 res.Body.Close() 6380 } 6381 return nil, &googleapi.Error{ 6382 Code: res.StatusCode, 6383 Header: res.Header, 6384 } 6385 } 6386 if err != nil { 6387 return nil, err 6388 } 6389 defer googleapi.CloseBody(res) 6390 if err := googleapi.CheckResponse(res); err != nil { 6391 return nil, err 6392 } 6393 ret := &Empty{ 6394 ServerResponse: googleapi.ServerResponse{ 6395 Header: res.Header, 6396 HTTPStatusCode: res.StatusCode, 6397 }, 6398 } 6399 target := &ret 6400 if err := gensupport.DecodeResponse(target, res); err != nil { 6401 return nil, err 6402 } 6403 return ret, nil 6404 // { 6405 // "description": "Initiates revoking content that has already been shared with the user's family. Empty response indicates success.", 6406 // "flatPath": "books/v1/familysharing/unshare", 6407 // "httpMethod": "POST", 6408 // "id": "books.familysharing.unshare", 6409 // "parameterOrder": [], 6410 // "parameters": { 6411 // "docId": { 6412 // "description": "The docid to unshare.", 6413 // "location": "query", 6414 // "type": "string" 6415 // }, 6416 // "source": { 6417 // "description": "String to identify the originator of this request.", 6418 // "location": "query", 6419 // "type": "string" 6420 // }, 6421 // "volumeId": { 6422 // "description": "The volume to unshare.", 6423 // "location": "query", 6424 // "type": "string" 6425 // } 6426 // }, 6427 // "path": "books/v1/familysharing/unshare", 6428 // "response": { 6429 // "$ref": "Empty" 6430 // }, 6431 // "scopes": [ 6432 // "https://www.googleapis.com/auth/books" 6433 // ] 6434 // } 6435 6436} 6437 6438// method id "books.layers.get": 6439 6440type LayersGetCall struct { 6441 s *Service 6442 volumeId string 6443 summaryId string 6444 urlParams_ gensupport.URLParams 6445 ifNoneMatch_ string 6446 ctx_ context.Context 6447 header_ http.Header 6448} 6449 6450// Get: Gets the layer summary for a volume. 6451func (r *LayersService) Get(volumeId string, summaryId string) *LayersGetCall { 6452 c := &LayersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6453 c.volumeId = volumeId 6454 c.summaryId = summaryId 6455 return c 6456} 6457 6458// ContentVersion sets the optional parameter "contentVersion": The 6459// content version for the requested volume. 6460func (c *LayersGetCall) ContentVersion(contentVersion string) *LayersGetCall { 6461 c.urlParams_.Set("contentVersion", contentVersion) 6462 return c 6463} 6464 6465// Source sets the optional parameter "source": String to identify the 6466// originator of this request. 6467func (c *LayersGetCall) Source(source string) *LayersGetCall { 6468 c.urlParams_.Set("source", source) 6469 return c 6470} 6471 6472// Fields allows partial responses to be retrieved. See 6473// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6474// for more information. 6475func (c *LayersGetCall) Fields(s ...googleapi.Field) *LayersGetCall { 6476 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6477 return c 6478} 6479 6480// IfNoneMatch sets the optional parameter which makes the operation 6481// fail if the object's ETag matches the given value. This is useful for 6482// getting updates only after the object has changed since the last 6483// request. Use googleapi.IsNotModified to check whether the response 6484// error from Do is the result of In-None-Match. 6485func (c *LayersGetCall) IfNoneMatch(entityTag string) *LayersGetCall { 6486 c.ifNoneMatch_ = entityTag 6487 return c 6488} 6489 6490// Context sets the context to be used in this call's Do method. Any 6491// pending HTTP request will be aborted if the provided context is 6492// canceled. 6493func (c *LayersGetCall) Context(ctx context.Context) *LayersGetCall { 6494 c.ctx_ = ctx 6495 return c 6496} 6497 6498// Header returns an http.Header that can be modified by the caller to 6499// add HTTP headers to the request. 6500func (c *LayersGetCall) Header() http.Header { 6501 if c.header_ == nil { 6502 c.header_ = make(http.Header) 6503 } 6504 return c.header_ 6505} 6506 6507func (c *LayersGetCall) doRequest(alt string) (*http.Response, error) { 6508 reqHeaders := make(http.Header) 6509 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6510 for k, v := range c.header_ { 6511 reqHeaders[k] = v 6512 } 6513 reqHeaders.Set("User-Agent", c.s.userAgent()) 6514 if c.ifNoneMatch_ != "" { 6515 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6516 } 6517 var body io.Reader = nil 6518 c.urlParams_.Set("alt", alt) 6519 c.urlParams_.Set("prettyPrint", "false") 6520 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/volumes/{volumeId}/layersummary/{summaryId}") 6521 urls += "?" + c.urlParams_.Encode() 6522 req, err := http.NewRequest("GET", urls, body) 6523 if err != nil { 6524 return nil, err 6525 } 6526 req.Header = reqHeaders 6527 googleapi.Expand(req.URL, map[string]string{ 6528 "volumeId": c.volumeId, 6529 "summaryId": c.summaryId, 6530 }) 6531 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6532} 6533 6534// Do executes the "books.layers.get" call. 6535// Exactly one of *Layersummary or error will be non-nil. Any non-2xx 6536// status code is an error. Response headers are in either 6537// *Layersummary.ServerResponse.Header or (if a response was returned at 6538// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6539// to check whether the returned error was because 6540// http.StatusNotModified was returned. 6541func (c *LayersGetCall) Do(opts ...googleapi.CallOption) (*Layersummary, error) { 6542 gensupport.SetOptions(c.urlParams_, opts...) 6543 res, err := c.doRequest("json") 6544 if res != nil && res.StatusCode == http.StatusNotModified { 6545 if res.Body != nil { 6546 res.Body.Close() 6547 } 6548 return nil, &googleapi.Error{ 6549 Code: res.StatusCode, 6550 Header: res.Header, 6551 } 6552 } 6553 if err != nil { 6554 return nil, err 6555 } 6556 defer googleapi.CloseBody(res) 6557 if err := googleapi.CheckResponse(res); err != nil { 6558 return nil, err 6559 } 6560 ret := &Layersummary{ 6561 ServerResponse: googleapi.ServerResponse{ 6562 Header: res.Header, 6563 HTTPStatusCode: res.StatusCode, 6564 }, 6565 } 6566 target := &ret 6567 if err := gensupport.DecodeResponse(target, res); err != nil { 6568 return nil, err 6569 } 6570 return ret, nil 6571 // { 6572 // "description": "Gets the layer summary for a volume.", 6573 // "flatPath": "books/v1/volumes/{volumeId}/layersummary/{summaryId}", 6574 // "httpMethod": "GET", 6575 // "id": "books.layers.get", 6576 // "parameterOrder": [ 6577 // "volumeId", 6578 // "summaryId" 6579 // ], 6580 // "parameters": { 6581 // "contentVersion": { 6582 // "description": "The content version for the requested volume.", 6583 // "location": "query", 6584 // "type": "string" 6585 // }, 6586 // "source": { 6587 // "description": "String to identify the originator of this request.", 6588 // "location": "query", 6589 // "type": "string" 6590 // }, 6591 // "summaryId": { 6592 // "description": "The ID for the layer to get the summary for.", 6593 // "location": "path", 6594 // "required": true, 6595 // "type": "string" 6596 // }, 6597 // "volumeId": { 6598 // "description": "The volume to retrieve layers for.", 6599 // "location": "path", 6600 // "required": true, 6601 // "type": "string" 6602 // } 6603 // }, 6604 // "path": "books/v1/volumes/{volumeId}/layersummary/{summaryId}", 6605 // "response": { 6606 // "$ref": "Layersummary" 6607 // }, 6608 // "scopes": [ 6609 // "https://www.googleapis.com/auth/books" 6610 // ] 6611 // } 6612 6613} 6614 6615// method id "books.layers.list": 6616 6617type LayersListCall struct { 6618 s *Service 6619 volumeId string 6620 urlParams_ gensupport.URLParams 6621 ifNoneMatch_ string 6622 ctx_ context.Context 6623 header_ http.Header 6624} 6625 6626// List: List the layer summaries for a volume. 6627func (r *LayersService) List(volumeId string) *LayersListCall { 6628 c := &LayersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6629 c.volumeId = volumeId 6630 return c 6631} 6632 6633// ContentVersion sets the optional parameter "contentVersion": The 6634// content version for the requested volume. 6635func (c *LayersListCall) ContentVersion(contentVersion string) *LayersListCall { 6636 c.urlParams_.Set("contentVersion", contentVersion) 6637 return c 6638} 6639 6640// MaxResults sets the optional parameter "maxResults": Maximum number 6641// of results to return 6642func (c *LayersListCall) MaxResults(maxResults int64) *LayersListCall { 6643 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 6644 return c 6645} 6646 6647// PageToken sets the optional parameter "pageToken": The value of the 6648// nextToken from the previous page. 6649func (c *LayersListCall) PageToken(pageToken string) *LayersListCall { 6650 c.urlParams_.Set("pageToken", pageToken) 6651 return c 6652} 6653 6654// Source sets the optional parameter "source": String to identify the 6655// originator of this request. 6656func (c *LayersListCall) Source(source string) *LayersListCall { 6657 c.urlParams_.Set("source", source) 6658 return c 6659} 6660 6661// Fields allows partial responses to be retrieved. See 6662// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6663// for more information. 6664func (c *LayersListCall) Fields(s ...googleapi.Field) *LayersListCall { 6665 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6666 return c 6667} 6668 6669// IfNoneMatch sets the optional parameter which makes the operation 6670// fail if the object's ETag matches the given value. This is useful for 6671// getting updates only after the object has changed since the last 6672// request. Use googleapi.IsNotModified to check whether the response 6673// error from Do is the result of In-None-Match. 6674func (c *LayersListCall) IfNoneMatch(entityTag string) *LayersListCall { 6675 c.ifNoneMatch_ = entityTag 6676 return c 6677} 6678 6679// Context sets the context to be used in this call's Do method. Any 6680// pending HTTP request will be aborted if the provided context is 6681// canceled. 6682func (c *LayersListCall) Context(ctx context.Context) *LayersListCall { 6683 c.ctx_ = ctx 6684 return c 6685} 6686 6687// Header returns an http.Header that can be modified by the caller to 6688// add HTTP headers to the request. 6689func (c *LayersListCall) Header() http.Header { 6690 if c.header_ == nil { 6691 c.header_ = make(http.Header) 6692 } 6693 return c.header_ 6694} 6695 6696func (c *LayersListCall) doRequest(alt string) (*http.Response, error) { 6697 reqHeaders := make(http.Header) 6698 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6699 for k, v := range c.header_ { 6700 reqHeaders[k] = v 6701 } 6702 reqHeaders.Set("User-Agent", c.s.userAgent()) 6703 if c.ifNoneMatch_ != "" { 6704 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6705 } 6706 var body io.Reader = nil 6707 c.urlParams_.Set("alt", alt) 6708 c.urlParams_.Set("prettyPrint", "false") 6709 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/volumes/{volumeId}/layersummary") 6710 urls += "?" + c.urlParams_.Encode() 6711 req, err := http.NewRequest("GET", urls, body) 6712 if err != nil { 6713 return nil, err 6714 } 6715 req.Header = reqHeaders 6716 googleapi.Expand(req.URL, map[string]string{ 6717 "volumeId": c.volumeId, 6718 }) 6719 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6720} 6721 6722// Do executes the "books.layers.list" call. 6723// Exactly one of *Layersummaries or error will be non-nil. Any non-2xx 6724// status code is an error. Response headers are in either 6725// *Layersummaries.ServerResponse.Header or (if a response was returned 6726// at all) in error.(*googleapi.Error).Header. Use 6727// googleapi.IsNotModified to check whether the returned error was 6728// because http.StatusNotModified was returned. 6729func (c *LayersListCall) Do(opts ...googleapi.CallOption) (*Layersummaries, error) { 6730 gensupport.SetOptions(c.urlParams_, opts...) 6731 res, err := c.doRequest("json") 6732 if res != nil && res.StatusCode == http.StatusNotModified { 6733 if res.Body != nil { 6734 res.Body.Close() 6735 } 6736 return nil, &googleapi.Error{ 6737 Code: res.StatusCode, 6738 Header: res.Header, 6739 } 6740 } 6741 if err != nil { 6742 return nil, err 6743 } 6744 defer googleapi.CloseBody(res) 6745 if err := googleapi.CheckResponse(res); err != nil { 6746 return nil, err 6747 } 6748 ret := &Layersummaries{ 6749 ServerResponse: googleapi.ServerResponse{ 6750 Header: res.Header, 6751 HTTPStatusCode: res.StatusCode, 6752 }, 6753 } 6754 target := &ret 6755 if err := gensupport.DecodeResponse(target, res); err != nil { 6756 return nil, err 6757 } 6758 return ret, nil 6759 // { 6760 // "description": "List the layer summaries for a volume.", 6761 // "flatPath": "books/v1/volumes/{volumeId}/layersummary", 6762 // "httpMethod": "GET", 6763 // "id": "books.layers.list", 6764 // "parameterOrder": [ 6765 // "volumeId" 6766 // ], 6767 // "parameters": { 6768 // "contentVersion": { 6769 // "description": "The content version for the requested volume.", 6770 // "location": "query", 6771 // "type": "string" 6772 // }, 6773 // "maxResults": { 6774 // "description": "Maximum number of results to return", 6775 // "format": "uint32", 6776 // "location": "query", 6777 // "maximum": "200", 6778 // "minimum": "0", 6779 // "type": "integer" 6780 // }, 6781 // "pageToken": { 6782 // "description": "The value of the nextToken from the previous page.", 6783 // "location": "query", 6784 // "type": "string" 6785 // }, 6786 // "source": { 6787 // "description": "String to identify the originator of this request.", 6788 // "location": "query", 6789 // "type": "string" 6790 // }, 6791 // "volumeId": { 6792 // "description": "The volume to retrieve layers for.", 6793 // "location": "path", 6794 // "required": true, 6795 // "type": "string" 6796 // } 6797 // }, 6798 // "path": "books/v1/volumes/{volumeId}/layersummary", 6799 // "response": { 6800 // "$ref": "Layersummaries" 6801 // }, 6802 // "scopes": [ 6803 // "https://www.googleapis.com/auth/books" 6804 // ] 6805 // } 6806 6807} 6808 6809// method id "books.layers.annotationData.get": 6810 6811type LayersAnnotationDataGetCall struct { 6812 s *Service 6813 volumeId string 6814 layerId string 6815 annotationDataId string 6816 urlParams_ gensupport.URLParams 6817 ifNoneMatch_ string 6818 ctx_ context.Context 6819 header_ http.Header 6820} 6821 6822// Get: Gets the annotation data. 6823func (r *LayersAnnotationDataService) Get(volumeId string, layerId string, annotationDataId string, contentVersion string) *LayersAnnotationDataGetCall { 6824 c := &LayersAnnotationDataGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6825 c.volumeId = volumeId 6826 c.layerId = layerId 6827 c.annotationDataId = annotationDataId 6828 c.urlParams_.Set("contentVersion", contentVersion) 6829 return c 6830} 6831 6832// AllowWebDefinitions sets the optional parameter 6833// "allowWebDefinitions": For the dictionary layer. Whether or not to 6834// allow web definitions. 6835func (c *LayersAnnotationDataGetCall) AllowWebDefinitions(allowWebDefinitions bool) *LayersAnnotationDataGetCall { 6836 c.urlParams_.Set("allowWebDefinitions", fmt.Sprint(allowWebDefinitions)) 6837 return c 6838} 6839 6840// H sets the optional parameter "h": The requested pixel height for any 6841// images. If height is provided width must also be provided. 6842func (c *LayersAnnotationDataGetCall) H(h int64) *LayersAnnotationDataGetCall { 6843 c.urlParams_.Set("h", fmt.Sprint(h)) 6844 return c 6845} 6846 6847// Locale sets the optional parameter "locale": The locale information 6848// for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 6849// 'en_US'. 6850func (c *LayersAnnotationDataGetCall) Locale(locale string) *LayersAnnotationDataGetCall { 6851 c.urlParams_.Set("locale", locale) 6852 return c 6853} 6854 6855// Scale sets the optional parameter "scale": The requested scale for 6856// the image. 6857func (c *LayersAnnotationDataGetCall) Scale(scale int64) *LayersAnnotationDataGetCall { 6858 c.urlParams_.Set("scale", fmt.Sprint(scale)) 6859 return c 6860} 6861 6862// Source sets the optional parameter "source": String to identify the 6863// originator of this request. 6864func (c *LayersAnnotationDataGetCall) Source(source string) *LayersAnnotationDataGetCall { 6865 c.urlParams_.Set("source", source) 6866 return c 6867} 6868 6869// W sets the optional parameter "w": The requested pixel width for any 6870// images. If width is provided height must also be provided. 6871func (c *LayersAnnotationDataGetCall) W(w int64) *LayersAnnotationDataGetCall { 6872 c.urlParams_.Set("w", fmt.Sprint(w)) 6873 return c 6874} 6875 6876// Fields allows partial responses to be retrieved. See 6877// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6878// for more information. 6879func (c *LayersAnnotationDataGetCall) Fields(s ...googleapi.Field) *LayersAnnotationDataGetCall { 6880 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6881 return c 6882} 6883 6884// IfNoneMatch sets the optional parameter which makes the operation 6885// fail if the object's ETag matches the given value. This is useful for 6886// getting updates only after the object has changed since the last 6887// request. Use googleapi.IsNotModified to check whether the response 6888// error from Do is the result of In-None-Match. 6889func (c *LayersAnnotationDataGetCall) IfNoneMatch(entityTag string) *LayersAnnotationDataGetCall { 6890 c.ifNoneMatch_ = entityTag 6891 return c 6892} 6893 6894// Context sets the context to be used in this call's Do method. Any 6895// pending HTTP request will be aborted if the provided context is 6896// canceled. 6897func (c *LayersAnnotationDataGetCall) Context(ctx context.Context) *LayersAnnotationDataGetCall { 6898 c.ctx_ = ctx 6899 return c 6900} 6901 6902// Header returns an http.Header that can be modified by the caller to 6903// add HTTP headers to the request. 6904func (c *LayersAnnotationDataGetCall) Header() http.Header { 6905 if c.header_ == nil { 6906 c.header_ = make(http.Header) 6907 } 6908 return c.header_ 6909} 6910 6911func (c *LayersAnnotationDataGetCall) doRequest(alt string) (*http.Response, error) { 6912 reqHeaders := make(http.Header) 6913 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 6914 for k, v := range c.header_ { 6915 reqHeaders[k] = v 6916 } 6917 reqHeaders.Set("User-Agent", c.s.userAgent()) 6918 if c.ifNoneMatch_ != "" { 6919 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6920 } 6921 var body io.Reader = nil 6922 c.urlParams_.Set("alt", alt) 6923 c.urlParams_.Set("prettyPrint", "false") 6924 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/volumes/{volumeId}/layers/{layerId}/data/{annotationDataId}") 6925 urls += "?" + c.urlParams_.Encode() 6926 req, err := http.NewRequest("GET", urls, body) 6927 if err != nil { 6928 return nil, err 6929 } 6930 req.Header = reqHeaders 6931 googleapi.Expand(req.URL, map[string]string{ 6932 "volumeId": c.volumeId, 6933 "layerId": c.layerId, 6934 "annotationDataId": c.annotationDataId, 6935 }) 6936 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6937} 6938 6939// Do executes the "books.layers.annotationData.get" call. 6940// Exactly one of *DictionaryAnnotationdata or error will be non-nil. 6941// Any non-2xx status code is an error. Response headers are in either 6942// *DictionaryAnnotationdata.ServerResponse.Header or (if a response was 6943// returned at all) in error.(*googleapi.Error).Header. Use 6944// googleapi.IsNotModified to check whether the returned error was 6945// because http.StatusNotModified was returned. 6946func (c *LayersAnnotationDataGetCall) Do(opts ...googleapi.CallOption) (*DictionaryAnnotationdata, error) { 6947 gensupport.SetOptions(c.urlParams_, opts...) 6948 res, err := c.doRequest("json") 6949 if res != nil && res.StatusCode == http.StatusNotModified { 6950 if res.Body != nil { 6951 res.Body.Close() 6952 } 6953 return nil, &googleapi.Error{ 6954 Code: res.StatusCode, 6955 Header: res.Header, 6956 } 6957 } 6958 if err != nil { 6959 return nil, err 6960 } 6961 defer googleapi.CloseBody(res) 6962 if err := googleapi.CheckResponse(res); err != nil { 6963 return nil, err 6964 } 6965 ret := &DictionaryAnnotationdata{ 6966 ServerResponse: googleapi.ServerResponse{ 6967 Header: res.Header, 6968 HTTPStatusCode: res.StatusCode, 6969 }, 6970 } 6971 target := &ret 6972 if err := gensupport.DecodeResponse(target, res); err != nil { 6973 return nil, err 6974 } 6975 return ret, nil 6976 // { 6977 // "description": "Gets the annotation data.", 6978 // "flatPath": "books/v1/volumes/{volumeId}/layers/{layerId}/data/{annotationDataId}", 6979 // "httpMethod": "GET", 6980 // "id": "books.layers.annotationData.get", 6981 // "parameterOrder": [ 6982 // "volumeId", 6983 // "layerId", 6984 // "annotationDataId", 6985 // "contentVersion" 6986 // ], 6987 // "parameters": { 6988 // "allowWebDefinitions": { 6989 // "description": "For the dictionary layer. Whether or not to allow web definitions.", 6990 // "location": "query", 6991 // "type": "boolean" 6992 // }, 6993 // "annotationDataId": { 6994 // "description": "The ID of the annotation data to retrieve.", 6995 // "location": "path", 6996 // "required": true, 6997 // "type": "string" 6998 // }, 6999 // "contentVersion": { 7000 // "description": "The content version for the volume you are trying to retrieve.", 7001 // "location": "query", 7002 // "required": true, 7003 // "type": "string" 7004 // }, 7005 // "h": { 7006 // "description": "The requested pixel height for any images. If height is provided width must also be provided.", 7007 // "format": "int32", 7008 // "location": "query", 7009 // "type": "integer" 7010 // }, 7011 // "layerId": { 7012 // "description": "The ID for the layer to get the annotations.", 7013 // "location": "path", 7014 // "required": true, 7015 // "type": "string" 7016 // }, 7017 // "locale": { 7018 // "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.", 7019 // "location": "query", 7020 // "type": "string" 7021 // }, 7022 // "scale": { 7023 // "description": "The requested scale for the image.", 7024 // "format": "int32", 7025 // "location": "query", 7026 // "minimum": "0", 7027 // "type": "integer" 7028 // }, 7029 // "source": { 7030 // "description": "String to identify the originator of this request.", 7031 // "location": "query", 7032 // "type": "string" 7033 // }, 7034 // "volumeId": { 7035 // "description": "The volume to retrieve annotations for.", 7036 // "location": "path", 7037 // "required": true, 7038 // "type": "string" 7039 // }, 7040 // "w": { 7041 // "description": "The requested pixel width for any images. If width is provided height must also be provided.", 7042 // "format": "int32", 7043 // "location": "query", 7044 // "type": "integer" 7045 // } 7046 // }, 7047 // "path": "books/v1/volumes/{volumeId}/layers/{layerId}/data/{annotationDataId}", 7048 // "response": { 7049 // "$ref": "DictionaryAnnotationdata" 7050 // }, 7051 // "scopes": [ 7052 // "https://www.googleapis.com/auth/books" 7053 // ] 7054 // } 7055 7056} 7057 7058// method id "books.layers.annotationData.list": 7059 7060type LayersAnnotationDataListCall struct { 7061 s *Service 7062 volumeId string 7063 layerId string 7064 urlParams_ gensupport.URLParams 7065 ifNoneMatch_ string 7066 ctx_ context.Context 7067 header_ http.Header 7068} 7069 7070// List: Gets the annotation data for a volume and layer. 7071func (r *LayersAnnotationDataService) List(volumeId string, layerId string, contentVersion string) *LayersAnnotationDataListCall { 7072 c := &LayersAnnotationDataListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7073 c.volumeId = volumeId 7074 c.layerId = layerId 7075 c.urlParams_.Set("contentVersion", contentVersion) 7076 return c 7077} 7078 7079// AnnotationDataId sets the optional parameter "annotationDataId": The 7080// list of Annotation Data Ids to retrieve. Pagination is ignored if 7081// this is set. 7082func (c *LayersAnnotationDataListCall) AnnotationDataId(annotationDataId ...string) *LayersAnnotationDataListCall { 7083 c.urlParams_.SetMulti("annotationDataId", append([]string{}, annotationDataId...)) 7084 return c 7085} 7086 7087// H sets the optional parameter "h": The requested pixel height for any 7088// images. If height is provided width must also be provided. 7089func (c *LayersAnnotationDataListCall) H(h int64) *LayersAnnotationDataListCall { 7090 c.urlParams_.Set("h", fmt.Sprint(h)) 7091 return c 7092} 7093 7094// Locale sets the optional parameter "locale": The locale information 7095// for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 7096// 'en_US'. 7097func (c *LayersAnnotationDataListCall) Locale(locale string) *LayersAnnotationDataListCall { 7098 c.urlParams_.Set("locale", locale) 7099 return c 7100} 7101 7102// MaxResults sets the optional parameter "maxResults": Maximum number 7103// of results to return 7104func (c *LayersAnnotationDataListCall) MaxResults(maxResults int64) *LayersAnnotationDataListCall { 7105 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 7106 return c 7107} 7108 7109// PageToken sets the optional parameter "pageToken": The value of the 7110// nextToken from the previous page. 7111func (c *LayersAnnotationDataListCall) PageToken(pageToken string) *LayersAnnotationDataListCall { 7112 c.urlParams_.Set("pageToken", pageToken) 7113 return c 7114} 7115 7116// Scale sets the optional parameter "scale": The requested scale for 7117// the image. 7118func (c *LayersAnnotationDataListCall) Scale(scale int64) *LayersAnnotationDataListCall { 7119 c.urlParams_.Set("scale", fmt.Sprint(scale)) 7120 return c 7121} 7122 7123// Source sets the optional parameter "source": String to identify the 7124// originator of this request. 7125func (c *LayersAnnotationDataListCall) Source(source string) *LayersAnnotationDataListCall { 7126 c.urlParams_.Set("source", source) 7127 return c 7128} 7129 7130// UpdatedMax sets the optional parameter "updatedMax": RFC 3339 7131// timestamp to restrict to items updated prior to this timestamp 7132// (exclusive). 7133func (c *LayersAnnotationDataListCall) UpdatedMax(updatedMax string) *LayersAnnotationDataListCall { 7134 c.urlParams_.Set("updatedMax", updatedMax) 7135 return c 7136} 7137 7138// UpdatedMin sets the optional parameter "updatedMin": RFC 3339 7139// timestamp to restrict to items updated since this timestamp 7140// (inclusive). 7141func (c *LayersAnnotationDataListCall) UpdatedMin(updatedMin string) *LayersAnnotationDataListCall { 7142 c.urlParams_.Set("updatedMin", updatedMin) 7143 return c 7144} 7145 7146// W sets the optional parameter "w": The requested pixel width for any 7147// images. If width is provided height must also be provided. 7148func (c *LayersAnnotationDataListCall) W(w int64) *LayersAnnotationDataListCall { 7149 c.urlParams_.Set("w", fmt.Sprint(w)) 7150 return c 7151} 7152 7153// Fields allows partial responses to be retrieved. See 7154// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7155// for more information. 7156func (c *LayersAnnotationDataListCall) Fields(s ...googleapi.Field) *LayersAnnotationDataListCall { 7157 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7158 return c 7159} 7160 7161// IfNoneMatch sets the optional parameter which makes the operation 7162// fail if the object's ETag matches the given value. This is useful for 7163// getting updates only after the object has changed since the last 7164// request. Use googleapi.IsNotModified to check whether the response 7165// error from Do is the result of In-None-Match. 7166func (c *LayersAnnotationDataListCall) IfNoneMatch(entityTag string) *LayersAnnotationDataListCall { 7167 c.ifNoneMatch_ = entityTag 7168 return c 7169} 7170 7171// Context sets the context to be used in this call's Do method. Any 7172// pending HTTP request will be aborted if the provided context is 7173// canceled. 7174func (c *LayersAnnotationDataListCall) Context(ctx context.Context) *LayersAnnotationDataListCall { 7175 c.ctx_ = ctx 7176 return c 7177} 7178 7179// Header returns an http.Header that can be modified by the caller to 7180// add HTTP headers to the request. 7181func (c *LayersAnnotationDataListCall) Header() http.Header { 7182 if c.header_ == nil { 7183 c.header_ = make(http.Header) 7184 } 7185 return c.header_ 7186} 7187 7188func (c *LayersAnnotationDataListCall) doRequest(alt string) (*http.Response, error) { 7189 reqHeaders := make(http.Header) 7190 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 7191 for k, v := range c.header_ { 7192 reqHeaders[k] = v 7193 } 7194 reqHeaders.Set("User-Agent", c.s.userAgent()) 7195 if c.ifNoneMatch_ != "" { 7196 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7197 } 7198 var body io.Reader = nil 7199 c.urlParams_.Set("alt", alt) 7200 c.urlParams_.Set("prettyPrint", "false") 7201 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/volumes/{volumeId}/layers/{layerId}/data") 7202 urls += "?" + c.urlParams_.Encode() 7203 req, err := http.NewRequest("GET", urls, body) 7204 if err != nil { 7205 return nil, err 7206 } 7207 req.Header = reqHeaders 7208 googleapi.Expand(req.URL, map[string]string{ 7209 "volumeId": c.volumeId, 7210 "layerId": c.layerId, 7211 }) 7212 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7213} 7214 7215// Do executes the "books.layers.annotationData.list" call. 7216// Exactly one of *Annotationsdata or error will be non-nil. Any non-2xx 7217// status code is an error. Response headers are in either 7218// *Annotationsdata.ServerResponse.Header or (if a response was returned 7219// at all) in error.(*googleapi.Error).Header. Use 7220// googleapi.IsNotModified to check whether the returned error was 7221// because http.StatusNotModified was returned. 7222func (c *LayersAnnotationDataListCall) Do(opts ...googleapi.CallOption) (*Annotationsdata, error) { 7223 gensupport.SetOptions(c.urlParams_, opts...) 7224 res, err := c.doRequest("json") 7225 if res != nil && res.StatusCode == http.StatusNotModified { 7226 if res.Body != nil { 7227 res.Body.Close() 7228 } 7229 return nil, &googleapi.Error{ 7230 Code: res.StatusCode, 7231 Header: res.Header, 7232 } 7233 } 7234 if err != nil { 7235 return nil, err 7236 } 7237 defer googleapi.CloseBody(res) 7238 if err := googleapi.CheckResponse(res); err != nil { 7239 return nil, err 7240 } 7241 ret := &Annotationsdata{ 7242 ServerResponse: googleapi.ServerResponse{ 7243 Header: res.Header, 7244 HTTPStatusCode: res.StatusCode, 7245 }, 7246 } 7247 target := &ret 7248 if err := gensupport.DecodeResponse(target, res); err != nil { 7249 return nil, err 7250 } 7251 return ret, nil 7252 // { 7253 // "description": "Gets the annotation data for a volume and layer.", 7254 // "flatPath": "books/v1/volumes/{volumeId}/layers/{layerId}/data", 7255 // "httpMethod": "GET", 7256 // "id": "books.layers.annotationData.list", 7257 // "parameterOrder": [ 7258 // "volumeId", 7259 // "layerId", 7260 // "contentVersion" 7261 // ], 7262 // "parameters": { 7263 // "annotationDataId": { 7264 // "description": "The list of Annotation Data Ids to retrieve. Pagination is ignored if this is set.", 7265 // "location": "query", 7266 // "repeated": true, 7267 // "type": "string" 7268 // }, 7269 // "contentVersion": { 7270 // "description": "The content version for the requested volume.", 7271 // "location": "query", 7272 // "required": true, 7273 // "type": "string" 7274 // }, 7275 // "h": { 7276 // "description": "The requested pixel height for any images. If height is provided width must also be provided.", 7277 // "format": "int32", 7278 // "location": "query", 7279 // "type": "integer" 7280 // }, 7281 // "layerId": { 7282 // "description": "The ID for the layer to get the annotation data.", 7283 // "location": "path", 7284 // "required": true, 7285 // "type": "string" 7286 // }, 7287 // "locale": { 7288 // "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.", 7289 // "location": "query", 7290 // "type": "string" 7291 // }, 7292 // "maxResults": { 7293 // "description": "Maximum number of results to return", 7294 // "format": "uint32", 7295 // "location": "query", 7296 // "maximum": "200", 7297 // "minimum": "0", 7298 // "type": "integer" 7299 // }, 7300 // "pageToken": { 7301 // "description": "The value of the nextToken from the previous page.", 7302 // "location": "query", 7303 // "type": "string" 7304 // }, 7305 // "scale": { 7306 // "description": "The requested scale for the image.", 7307 // "format": "int32", 7308 // "location": "query", 7309 // "minimum": "0", 7310 // "type": "integer" 7311 // }, 7312 // "source": { 7313 // "description": "String to identify the originator of this request.", 7314 // "location": "query", 7315 // "type": "string" 7316 // }, 7317 // "updatedMax": { 7318 // "description": "RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).", 7319 // "location": "query", 7320 // "type": "string" 7321 // }, 7322 // "updatedMin": { 7323 // "description": "RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).", 7324 // "location": "query", 7325 // "type": "string" 7326 // }, 7327 // "volumeId": { 7328 // "description": "The volume to retrieve annotation data for.", 7329 // "location": "path", 7330 // "required": true, 7331 // "type": "string" 7332 // }, 7333 // "w": { 7334 // "description": "The requested pixel width for any images. If width is provided height must also be provided.", 7335 // "format": "int32", 7336 // "location": "query", 7337 // "type": "integer" 7338 // } 7339 // }, 7340 // "path": "books/v1/volumes/{volumeId}/layers/{layerId}/data", 7341 // "response": { 7342 // "$ref": "Annotationsdata" 7343 // }, 7344 // "scopes": [ 7345 // "https://www.googleapis.com/auth/books" 7346 // ] 7347 // } 7348 7349} 7350 7351// Pages invokes f for each page of results. 7352// A non-nil error returned from f will halt the iteration. 7353// The provided context supersedes any context provided to the Context method. 7354func (c *LayersAnnotationDataListCall) Pages(ctx context.Context, f func(*Annotationsdata) error) error { 7355 c.ctx_ = ctx 7356 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7357 for { 7358 x, err := c.Do() 7359 if err != nil { 7360 return err 7361 } 7362 if err := f(x); err != nil { 7363 return err 7364 } 7365 if x.NextPageToken == "" { 7366 return nil 7367 } 7368 c.PageToken(x.NextPageToken) 7369 } 7370} 7371 7372// method id "books.layers.volumeAnnotations.get": 7373 7374type LayersVolumeAnnotationsGetCall struct { 7375 s *Service 7376 volumeId string 7377 layerId string 7378 annotationId string 7379 urlParams_ gensupport.URLParams 7380 ifNoneMatch_ string 7381 ctx_ context.Context 7382 header_ http.Header 7383} 7384 7385// Get: Gets the volume annotation. 7386func (r *LayersVolumeAnnotationsService) Get(volumeId string, layerId string, annotationId string) *LayersVolumeAnnotationsGetCall { 7387 c := &LayersVolumeAnnotationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7388 c.volumeId = volumeId 7389 c.layerId = layerId 7390 c.annotationId = annotationId 7391 return c 7392} 7393 7394// Locale sets the optional parameter "locale": The locale information 7395// for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 7396// 'en_US'. 7397func (c *LayersVolumeAnnotationsGetCall) Locale(locale string) *LayersVolumeAnnotationsGetCall { 7398 c.urlParams_.Set("locale", locale) 7399 return c 7400} 7401 7402// Source sets the optional parameter "source": String to identify the 7403// originator of this request. 7404func (c *LayersVolumeAnnotationsGetCall) Source(source string) *LayersVolumeAnnotationsGetCall { 7405 c.urlParams_.Set("source", source) 7406 return c 7407} 7408 7409// Fields allows partial responses to be retrieved. See 7410// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7411// for more information. 7412func (c *LayersVolumeAnnotationsGetCall) Fields(s ...googleapi.Field) *LayersVolumeAnnotationsGetCall { 7413 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7414 return c 7415} 7416 7417// IfNoneMatch sets the optional parameter which makes the operation 7418// fail if the object's ETag matches the given value. This is useful for 7419// getting updates only after the object has changed since the last 7420// request. Use googleapi.IsNotModified to check whether the response 7421// error from Do is the result of In-None-Match. 7422func (c *LayersVolumeAnnotationsGetCall) IfNoneMatch(entityTag string) *LayersVolumeAnnotationsGetCall { 7423 c.ifNoneMatch_ = entityTag 7424 return c 7425} 7426 7427// Context sets the context to be used in this call's Do method. Any 7428// pending HTTP request will be aborted if the provided context is 7429// canceled. 7430func (c *LayersVolumeAnnotationsGetCall) Context(ctx context.Context) *LayersVolumeAnnotationsGetCall { 7431 c.ctx_ = ctx 7432 return c 7433} 7434 7435// Header returns an http.Header that can be modified by the caller to 7436// add HTTP headers to the request. 7437func (c *LayersVolumeAnnotationsGetCall) Header() http.Header { 7438 if c.header_ == nil { 7439 c.header_ = make(http.Header) 7440 } 7441 return c.header_ 7442} 7443 7444func (c *LayersVolumeAnnotationsGetCall) doRequest(alt string) (*http.Response, error) { 7445 reqHeaders := make(http.Header) 7446 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 7447 for k, v := range c.header_ { 7448 reqHeaders[k] = v 7449 } 7450 reqHeaders.Set("User-Agent", c.s.userAgent()) 7451 if c.ifNoneMatch_ != "" { 7452 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7453 } 7454 var body io.Reader = nil 7455 c.urlParams_.Set("alt", alt) 7456 c.urlParams_.Set("prettyPrint", "false") 7457 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/volumes/{volumeId}/layers/{layerId}/annotations/{annotationId}") 7458 urls += "?" + c.urlParams_.Encode() 7459 req, err := http.NewRequest("GET", urls, body) 7460 if err != nil { 7461 return nil, err 7462 } 7463 req.Header = reqHeaders 7464 googleapi.Expand(req.URL, map[string]string{ 7465 "volumeId": c.volumeId, 7466 "layerId": c.layerId, 7467 "annotationId": c.annotationId, 7468 }) 7469 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7470} 7471 7472// Do executes the "books.layers.volumeAnnotations.get" call. 7473// Exactly one of *Volumeannotation or error will be non-nil. Any 7474// non-2xx status code is an error. Response headers are in either 7475// *Volumeannotation.ServerResponse.Header or (if a response was 7476// returned at all) in error.(*googleapi.Error).Header. Use 7477// googleapi.IsNotModified to check whether the returned error was 7478// because http.StatusNotModified was returned. 7479func (c *LayersVolumeAnnotationsGetCall) Do(opts ...googleapi.CallOption) (*Volumeannotation, error) { 7480 gensupport.SetOptions(c.urlParams_, opts...) 7481 res, err := c.doRequest("json") 7482 if res != nil && res.StatusCode == http.StatusNotModified { 7483 if res.Body != nil { 7484 res.Body.Close() 7485 } 7486 return nil, &googleapi.Error{ 7487 Code: res.StatusCode, 7488 Header: res.Header, 7489 } 7490 } 7491 if err != nil { 7492 return nil, err 7493 } 7494 defer googleapi.CloseBody(res) 7495 if err := googleapi.CheckResponse(res); err != nil { 7496 return nil, err 7497 } 7498 ret := &Volumeannotation{ 7499 ServerResponse: googleapi.ServerResponse{ 7500 Header: res.Header, 7501 HTTPStatusCode: res.StatusCode, 7502 }, 7503 } 7504 target := &ret 7505 if err := gensupport.DecodeResponse(target, res); err != nil { 7506 return nil, err 7507 } 7508 return ret, nil 7509 // { 7510 // "description": "Gets the volume annotation.", 7511 // "flatPath": "books/v1/volumes/{volumeId}/layers/{layerId}/annotations/{annotationId}", 7512 // "httpMethod": "GET", 7513 // "id": "books.layers.volumeAnnotations.get", 7514 // "parameterOrder": [ 7515 // "volumeId", 7516 // "layerId", 7517 // "annotationId" 7518 // ], 7519 // "parameters": { 7520 // "annotationId": { 7521 // "description": "The ID of the volume annotation to retrieve.", 7522 // "location": "path", 7523 // "required": true, 7524 // "type": "string" 7525 // }, 7526 // "layerId": { 7527 // "description": "The ID for the layer to get the annotations.", 7528 // "location": "path", 7529 // "required": true, 7530 // "type": "string" 7531 // }, 7532 // "locale": { 7533 // "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.", 7534 // "location": "query", 7535 // "type": "string" 7536 // }, 7537 // "source": { 7538 // "description": "String to identify the originator of this request.", 7539 // "location": "query", 7540 // "type": "string" 7541 // }, 7542 // "volumeId": { 7543 // "description": "The volume to retrieve annotations for.", 7544 // "location": "path", 7545 // "required": true, 7546 // "type": "string" 7547 // } 7548 // }, 7549 // "path": "books/v1/volumes/{volumeId}/layers/{layerId}/annotations/{annotationId}", 7550 // "response": { 7551 // "$ref": "Volumeannotation" 7552 // }, 7553 // "scopes": [ 7554 // "https://www.googleapis.com/auth/books" 7555 // ] 7556 // } 7557 7558} 7559 7560// method id "books.layers.volumeAnnotations.list": 7561 7562type LayersVolumeAnnotationsListCall struct { 7563 s *Service 7564 volumeId string 7565 layerId string 7566 urlParams_ gensupport.URLParams 7567 ifNoneMatch_ string 7568 ctx_ context.Context 7569 header_ http.Header 7570} 7571 7572// List: Gets the volume annotations for a volume and layer. 7573func (r *LayersVolumeAnnotationsService) List(volumeId string, layerId string, contentVersion string) *LayersVolumeAnnotationsListCall { 7574 c := &LayersVolumeAnnotationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7575 c.volumeId = volumeId 7576 c.layerId = layerId 7577 c.urlParams_.Set("contentVersion", contentVersion) 7578 return c 7579} 7580 7581// EndOffset sets the optional parameter "endOffset": The end offset to 7582// end retrieving data from. 7583func (c *LayersVolumeAnnotationsListCall) EndOffset(endOffset string) *LayersVolumeAnnotationsListCall { 7584 c.urlParams_.Set("endOffset", endOffset) 7585 return c 7586} 7587 7588// EndPosition sets the optional parameter "endPosition": The end 7589// position to end retrieving data from. 7590func (c *LayersVolumeAnnotationsListCall) EndPosition(endPosition string) *LayersVolumeAnnotationsListCall { 7591 c.urlParams_.Set("endPosition", endPosition) 7592 return c 7593} 7594 7595// Locale sets the optional parameter "locale": The locale information 7596// for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 7597// 'en_US'. 7598func (c *LayersVolumeAnnotationsListCall) Locale(locale string) *LayersVolumeAnnotationsListCall { 7599 c.urlParams_.Set("locale", locale) 7600 return c 7601} 7602 7603// MaxResults sets the optional parameter "maxResults": Maximum number 7604// of results to return 7605func (c *LayersVolumeAnnotationsListCall) MaxResults(maxResults int64) *LayersVolumeAnnotationsListCall { 7606 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 7607 return c 7608} 7609 7610// PageToken sets the optional parameter "pageToken": The value of the 7611// nextToken from the previous page. 7612func (c *LayersVolumeAnnotationsListCall) PageToken(pageToken string) *LayersVolumeAnnotationsListCall { 7613 c.urlParams_.Set("pageToken", pageToken) 7614 return c 7615} 7616 7617// ShowDeleted sets the optional parameter "showDeleted": Set to true to 7618// return deleted annotations. updatedMin must be in the request to use 7619// this. Defaults to false. 7620func (c *LayersVolumeAnnotationsListCall) ShowDeleted(showDeleted bool) *LayersVolumeAnnotationsListCall { 7621 c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) 7622 return c 7623} 7624 7625// Source sets the optional parameter "source": String to identify the 7626// originator of this request. 7627func (c *LayersVolumeAnnotationsListCall) Source(source string) *LayersVolumeAnnotationsListCall { 7628 c.urlParams_.Set("source", source) 7629 return c 7630} 7631 7632// StartOffset sets the optional parameter "startOffset": The start 7633// offset to start retrieving data from. 7634func (c *LayersVolumeAnnotationsListCall) StartOffset(startOffset string) *LayersVolumeAnnotationsListCall { 7635 c.urlParams_.Set("startOffset", startOffset) 7636 return c 7637} 7638 7639// StartPosition sets the optional parameter "startPosition": The start 7640// position to start retrieving data from. 7641func (c *LayersVolumeAnnotationsListCall) StartPosition(startPosition string) *LayersVolumeAnnotationsListCall { 7642 c.urlParams_.Set("startPosition", startPosition) 7643 return c 7644} 7645 7646// UpdatedMax sets the optional parameter "updatedMax": RFC 3339 7647// timestamp to restrict to items updated prior to this timestamp 7648// (exclusive). 7649func (c *LayersVolumeAnnotationsListCall) UpdatedMax(updatedMax string) *LayersVolumeAnnotationsListCall { 7650 c.urlParams_.Set("updatedMax", updatedMax) 7651 return c 7652} 7653 7654// UpdatedMin sets the optional parameter "updatedMin": RFC 3339 7655// timestamp to restrict to items updated since this timestamp 7656// (inclusive). 7657func (c *LayersVolumeAnnotationsListCall) UpdatedMin(updatedMin string) *LayersVolumeAnnotationsListCall { 7658 c.urlParams_.Set("updatedMin", updatedMin) 7659 return c 7660} 7661 7662// VolumeAnnotationsVersion sets the optional parameter 7663// "volumeAnnotationsVersion": The version of the volume annotations 7664// that you are requesting. 7665func (c *LayersVolumeAnnotationsListCall) VolumeAnnotationsVersion(volumeAnnotationsVersion string) *LayersVolumeAnnotationsListCall { 7666 c.urlParams_.Set("volumeAnnotationsVersion", volumeAnnotationsVersion) 7667 return c 7668} 7669 7670// Fields allows partial responses to be retrieved. See 7671// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7672// for more information. 7673func (c *LayersVolumeAnnotationsListCall) Fields(s ...googleapi.Field) *LayersVolumeAnnotationsListCall { 7674 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7675 return c 7676} 7677 7678// IfNoneMatch sets the optional parameter which makes the operation 7679// fail if the object's ETag matches the given value. This is useful for 7680// getting updates only after the object has changed since the last 7681// request. Use googleapi.IsNotModified to check whether the response 7682// error from Do is the result of In-None-Match. 7683func (c *LayersVolumeAnnotationsListCall) IfNoneMatch(entityTag string) *LayersVolumeAnnotationsListCall { 7684 c.ifNoneMatch_ = entityTag 7685 return c 7686} 7687 7688// Context sets the context to be used in this call's Do method. Any 7689// pending HTTP request will be aborted if the provided context is 7690// canceled. 7691func (c *LayersVolumeAnnotationsListCall) Context(ctx context.Context) *LayersVolumeAnnotationsListCall { 7692 c.ctx_ = ctx 7693 return c 7694} 7695 7696// Header returns an http.Header that can be modified by the caller to 7697// add HTTP headers to the request. 7698func (c *LayersVolumeAnnotationsListCall) Header() http.Header { 7699 if c.header_ == nil { 7700 c.header_ = make(http.Header) 7701 } 7702 return c.header_ 7703} 7704 7705func (c *LayersVolumeAnnotationsListCall) doRequest(alt string) (*http.Response, error) { 7706 reqHeaders := make(http.Header) 7707 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 7708 for k, v := range c.header_ { 7709 reqHeaders[k] = v 7710 } 7711 reqHeaders.Set("User-Agent", c.s.userAgent()) 7712 if c.ifNoneMatch_ != "" { 7713 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7714 } 7715 var body io.Reader = nil 7716 c.urlParams_.Set("alt", alt) 7717 c.urlParams_.Set("prettyPrint", "false") 7718 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/volumes/{volumeId}/layers/{layerId}") 7719 urls += "?" + c.urlParams_.Encode() 7720 req, err := http.NewRequest("GET", urls, body) 7721 if err != nil { 7722 return nil, err 7723 } 7724 req.Header = reqHeaders 7725 googleapi.Expand(req.URL, map[string]string{ 7726 "volumeId": c.volumeId, 7727 "layerId": c.layerId, 7728 }) 7729 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7730} 7731 7732// Do executes the "books.layers.volumeAnnotations.list" call. 7733// Exactly one of *Volumeannotations or error will be non-nil. Any 7734// non-2xx status code is an error. Response headers are in either 7735// *Volumeannotations.ServerResponse.Header or (if a response was 7736// returned at all) in error.(*googleapi.Error).Header. Use 7737// googleapi.IsNotModified to check whether the returned error was 7738// because http.StatusNotModified was returned. 7739func (c *LayersVolumeAnnotationsListCall) Do(opts ...googleapi.CallOption) (*Volumeannotations, error) { 7740 gensupport.SetOptions(c.urlParams_, opts...) 7741 res, err := c.doRequest("json") 7742 if res != nil && res.StatusCode == http.StatusNotModified { 7743 if res.Body != nil { 7744 res.Body.Close() 7745 } 7746 return nil, &googleapi.Error{ 7747 Code: res.StatusCode, 7748 Header: res.Header, 7749 } 7750 } 7751 if err != nil { 7752 return nil, err 7753 } 7754 defer googleapi.CloseBody(res) 7755 if err := googleapi.CheckResponse(res); err != nil { 7756 return nil, err 7757 } 7758 ret := &Volumeannotations{ 7759 ServerResponse: googleapi.ServerResponse{ 7760 Header: res.Header, 7761 HTTPStatusCode: res.StatusCode, 7762 }, 7763 } 7764 target := &ret 7765 if err := gensupport.DecodeResponse(target, res); err != nil { 7766 return nil, err 7767 } 7768 return ret, nil 7769 // { 7770 // "description": "Gets the volume annotations for a volume and layer.", 7771 // "flatPath": "books/v1/volumes/{volumeId}/layers/{layerId}", 7772 // "httpMethod": "GET", 7773 // "id": "books.layers.volumeAnnotations.list", 7774 // "parameterOrder": [ 7775 // "volumeId", 7776 // "layerId", 7777 // "contentVersion" 7778 // ], 7779 // "parameters": { 7780 // "contentVersion": { 7781 // "description": "The content version for the requested volume.", 7782 // "location": "query", 7783 // "required": true, 7784 // "type": "string" 7785 // }, 7786 // "endOffset": { 7787 // "description": "The end offset to end retrieving data from.", 7788 // "location": "query", 7789 // "type": "string" 7790 // }, 7791 // "endPosition": { 7792 // "description": "The end position to end retrieving data from.", 7793 // "location": "query", 7794 // "type": "string" 7795 // }, 7796 // "layerId": { 7797 // "description": "The ID for the layer to get the annotations.", 7798 // "location": "path", 7799 // "required": true, 7800 // "type": "string" 7801 // }, 7802 // "locale": { 7803 // "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.", 7804 // "location": "query", 7805 // "type": "string" 7806 // }, 7807 // "maxResults": { 7808 // "description": "Maximum number of results to return", 7809 // "format": "uint32", 7810 // "location": "query", 7811 // "maximum": "200", 7812 // "minimum": "0", 7813 // "type": "integer" 7814 // }, 7815 // "pageToken": { 7816 // "description": "The value of the nextToken from the previous page.", 7817 // "location": "query", 7818 // "type": "string" 7819 // }, 7820 // "showDeleted": { 7821 // "description": "Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false.", 7822 // "location": "query", 7823 // "type": "boolean" 7824 // }, 7825 // "source": { 7826 // "description": "String to identify the originator of this request.", 7827 // "location": "query", 7828 // "type": "string" 7829 // }, 7830 // "startOffset": { 7831 // "description": "The start offset to start retrieving data from.", 7832 // "location": "query", 7833 // "type": "string" 7834 // }, 7835 // "startPosition": { 7836 // "description": "The start position to start retrieving data from.", 7837 // "location": "query", 7838 // "type": "string" 7839 // }, 7840 // "updatedMax": { 7841 // "description": "RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).", 7842 // "location": "query", 7843 // "type": "string" 7844 // }, 7845 // "updatedMin": { 7846 // "description": "RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).", 7847 // "location": "query", 7848 // "type": "string" 7849 // }, 7850 // "volumeAnnotationsVersion": { 7851 // "description": "The version of the volume annotations that you are requesting.", 7852 // "location": "query", 7853 // "type": "string" 7854 // }, 7855 // "volumeId": { 7856 // "description": "The volume to retrieve annotations for.", 7857 // "location": "path", 7858 // "required": true, 7859 // "type": "string" 7860 // } 7861 // }, 7862 // "path": "books/v1/volumes/{volumeId}/layers/{layerId}", 7863 // "response": { 7864 // "$ref": "Volumeannotations" 7865 // }, 7866 // "scopes": [ 7867 // "https://www.googleapis.com/auth/books" 7868 // ] 7869 // } 7870 7871} 7872 7873// Pages invokes f for each page of results. 7874// A non-nil error returned from f will halt the iteration. 7875// The provided context supersedes any context provided to the Context method. 7876func (c *LayersVolumeAnnotationsListCall) Pages(ctx context.Context, f func(*Volumeannotations) error) error { 7877 c.ctx_ = ctx 7878 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7879 for { 7880 x, err := c.Do() 7881 if err != nil { 7882 return err 7883 } 7884 if err := f(x); err != nil { 7885 return err 7886 } 7887 if x.NextPageToken == "" { 7888 return nil 7889 } 7890 c.PageToken(x.NextPageToken) 7891 } 7892} 7893 7894// method id "books.myconfig.getUserSettings": 7895 7896type MyconfigGetUserSettingsCall struct { 7897 s *Service 7898 urlParams_ gensupport.URLParams 7899 ifNoneMatch_ string 7900 ctx_ context.Context 7901 header_ http.Header 7902} 7903 7904// GetUserSettings: Gets the current settings for the user. 7905func (r *MyconfigService) GetUserSettings() *MyconfigGetUserSettingsCall { 7906 c := &MyconfigGetUserSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7907 return c 7908} 7909 7910// Country sets the optional parameter "country": Unused. Added only to 7911// workaround TEX mandatory request template requirement 7912func (c *MyconfigGetUserSettingsCall) Country(country string) *MyconfigGetUserSettingsCall { 7913 c.urlParams_.Set("country", country) 7914 return c 7915} 7916 7917// Fields allows partial responses to be retrieved. See 7918// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7919// for more information. 7920func (c *MyconfigGetUserSettingsCall) Fields(s ...googleapi.Field) *MyconfigGetUserSettingsCall { 7921 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7922 return c 7923} 7924 7925// IfNoneMatch sets the optional parameter which makes the operation 7926// fail if the object's ETag matches the given value. This is useful for 7927// getting updates only after the object has changed since the last 7928// request. Use googleapi.IsNotModified to check whether the response 7929// error from Do is the result of In-None-Match. 7930func (c *MyconfigGetUserSettingsCall) IfNoneMatch(entityTag string) *MyconfigGetUserSettingsCall { 7931 c.ifNoneMatch_ = entityTag 7932 return c 7933} 7934 7935// Context sets the context to be used in this call's Do method. Any 7936// pending HTTP request will be aborted if the provided context is 7937// canceled. 7938func (c *MyconfigGetUserSettingsCall) Context(ctx context.Context) *MyconfigGetUserSettingsCall { 7939 c.ctx_ = ctx 7940 return c 7941} 7942 7943// Header returns an http.Header that can be modified by the caller to 7944// add HTTP headers to the request. 7945func (c *MyconfigGetUserSettingsCall) Header() http.Header { 7946 if c.header_ == nil { 7947 c.header_ = make(http.Header) 7948 } 7949 return c.header_ 7950} 7951 7952func (c *MyconfigGetUserSettingsCall) doRequest(alt string) (*http.Response, error) { 7953 reqHeaders := make(http.Header) 7954 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 7955 for k, v := range c.header_ { 7956 reqHeaders[k] = v 7957 } 7958 reqHeaders.Set("User-Agent", c.s.userAgent()) 7959 if c.ifNoneMatch_ != "" { 7960 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7961 } 7962 var body io.Reader = nil 7963 c.urlParams_.Set("alt", alt) 7964 c.urlParams_.Set("prettyPrint", "false") 7965 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/myconfig/getUserSettings") 7966 urls += "?" + c.urlParams_.Encode() 7967 req, err := http.NewRequest("GET", urls, body) 7968 if err != nil { 7969 return nil, err 7970 } 7971 req.Header = reqHeaders 7972 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7973} 7974 7975// Do executes the "books.myconfig.getUserSettings" call. 7976// Exactly one of *Usersettings or error will be non-nil. Any non-2xx 7977// status code is an error. Response headers are in either 7978// *Usersettings.ServerResponse.Header or (if a response was returned at 7979// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7980// to check whether the returned error was because 7981// http.StatusNotModified was returned. 7982func (c *MyconfigGetUserSettingsCall) Do(opts ...googleapi.CallOption) (*Usersettings, error) { 7983 gensupport.SetOptions(c.urlParams_, opts...) 7984 res, err := c.doRequest("json") 7985 if res != nil && res.StatusCode == http.StatusNotModified { 7986 if res.Body != nil { 7987 res.Body.Close() 7988 } 7989 return nil, &googleapi.Error{ 7990 Code: res.StatusCode, 7991 Header: res.Header, 7992 } 7993 } 7994 if err != nil { 7995 return nil, err 7996 } 7997 defer googleapi.CloseBody(res) 7998 if err := googleapi.CheckResponse(res); err != nil { 7999 return nil, err 8000 } 8001 ret := &Usersettings{ 8002 ServerResponse: googleapi.ServerResponse{ 8003 Header: res.Header, 8004 HTTPStatusCode: res.StatusCode, 8005 }, 8006 } 8007 target := &ret 8008 if err := gensupport.DecodeResponse(target, res); err != nil { 8009 return nil, err 8010 } 8011 return ret, nil 8012 // { 8013 // "description": "Gets the current settings for the user.", 8014 // "flatPath": "books/v1/myconfig/getUserSettings", 8015 // "httpMethod": "GET", 8016 // "id": "books.myconfig.getUserSettings", 8017 // "parameterOrder": [], 8018 // "parameters": { 8019 // "country": { 8020 // "description": "Unused. Added only to workaround TEX mandatory request template requirement", 8021 // "location": "query", 8022 // "type": "string" 8023 // } 8024 // }, 8025 // "path": "books/v1/myconfig/getUserSettings", 8026 // "response": { 8027 // "$ref": "Usersettings" 8028 // }, 8029 // "scopes": [ 8030 // "https://www.googleapis.com/auth/books" 8031 // ] 8032 // } 8033 8034} 8035 8036// method id "books.myconfig.releaseDownloadAccess": 8037 8038type MyconfigReleaseDownloadAccessCall struct { 8039 s *Service 8040 urlParams_ gensupport.URLParams 8041 ctx_ context.Context 8042 header_ http.Header 8043} 8044 8045// ReleaseDownloadAccess: Release downloaded content access restriction. 8046func (r *MyconfigService) ReleaseDownloadAccess(cpksver string, volumeIds []string) *MyconfigReleaseDownloadAccessCall { 8047 c := &MyconfigReleaseDownloadAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8048 c.urlParams_.Set("cpksver", cpksver) 8049 c.urlParams_.SetMulti("volumeIds", append([]string{}, volumeIds...)) 8050 return c 8051} 8052 8053// Locale sets the optional parameter "locale": ISO-639-1, ISO-3166-1 8054// codes for message localization, i.e. en_US. 8055func (c *MyconfigReleaseDownloadAccessCall) Locale(locale string) *MyconfigReleaseDownloadAccessCall { 8056 c.urlParams_.Set("locale", locale) 8057 return c 8058} 8059 8060// Source sets the optional parameter "source": String to identify the 8061// originator of this request. 8062func (c *MyconfigReleaseDownloadAccessCall) Source(source string) *MyconfigReleaseDownloadAccessCall { 8063 c.urlParams_.Set("source", source) 8064 return c 8065} 8066 8067// Fields allows partial responses to be retrieved. See 8068// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8069// for more information. 8070func (c *MyconfigReleaseDownloadAccessCall) Fields(s ...googleapi.Field) *MyconfigReleaseDownloadAccessCall { 8071 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8072 return c 8073} 8074 8075// Context sets the context to be used in this call's Do method. Any 8076// pending HTTP request will be aborted if the provided context is 8077// canceled. 8078func (c *MyconfigReleaseDownloadAccessCall) Context(ctx context.Context) *MyconfigReleaseDownloadAccessCall { 8079 c.ctx_ = ctx 8080 return c 8081} 8082 8083// Header returns an http.Header that can be modified by the caller to 8084// add HTTP headers to the request. 8085func (c *MyconfigReleaseDownloadAccessCall) Header() http.Header { 8086 if c.header_ == nil { 8087 c.header_ = make(http.Header) 8088 } 8089 return c.header_ 8090} 8091 8092func (c *MyconfigReleaseDownloadAccessCall) doRequest(alt string) (*http.Response, error) { 8093 reqHeaders := make(http.Header) 8094 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8095 for k, v := range c.header_ { 8096 reqHeaders[k] = v 8097 } 8098 reqHeaders.Set("User-Agent", c.s.userAgent()) 8099 var body io.Reader = nil 8100 c.urlParams_.Set("alt", alt) 8101 c.urlParams_.Set("prettyPrint", "false") 8102 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/myconfig/releaseDownloadAccess") 8103 urls += "?" + c.urlParams_.Encode() 8104 req, err := http.NewRequest("POST", urls, body) 8105 if err != nil { 8106 return nil, err 8107 } 8108 req.Header = reqHeaders 8109 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8110} 8111 8112// Do executes the "books.myconfig.releaseDownloadAccess" call. 8113// Exactly one of *DownloadAccesses or error will be non-nil. Any 8114// non-2xx status code is an error. Response headers are in either 8115// *DownloadAccesses.ServerResponse.Header or (if a response was 8116// returned at all) in error.(*googleapi.Error).Header. Use 8117// googleapi.IsNotModified to check whether the returned error was 8118// because http.StatusNotModified was returned. 8119func (c *MyconfigReleaseDownloadAccessCall) Do(opts ...googleapi.CallOption) (*DownloadAccesses, error) { 8120 gensupport.SetOptions(c.urlParams_, opts...) 8121 res, err := c.doRequest("json") 8122 if res != nil && res.StatusCode == http.StatusNotModified { 8123 if res.Body != nil { 8124 res.Body.Close() 8125 } 8126 return nil, &googleapi.Error{ 8127 Code: res.StatusCode, 8128 Header: res.Header, 8129 } 8130 } 8131 if err != nil { 8132 return nil, err 8133 } 8134 defer googleapi.CloseBody(res) 8135 if err := googleapi.CheckResponse(res); err != nil { 8136 return nil, err 8137 } 8138 ret := &DownloadAccesses{ 8139 ServerResponse: googleapi.ServerResponse{ 8140 Header: res.Header, 8141 HTTPStatusCode: res.StatusCode, 8142 }, 8143 } 8144 target := &ret 8145 if err := gensupport.DecodeResponse(target, res); err != nil { 8146 return nil, err 8147 } 8148 return ret, nil 8149 // { 8150 // "description": "Release downloaded content access restriction.", 8151 // "flatPath": "books/v1/myconfig/releaseDownloadAccess", 8152 // "httpMethod": "POST", 8153 // "id": "books.myconfig.releaseDownloadAccess", 8154 // "parameterOrder": [ 8155 // "cpksver", 8156 // "volumeIds" 8157 // ], 8158 // "parameters": { 8159 // "cpksver": { 8160 // "description": "The device/version ID from which to release the restriction.", 8161 // "location": "query", 8162 // "required": true, 8163 // "type": "string" 8164 // }, 8165 // "locale": { 8166 // "description": "ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.", 8167 // "location": "query", 8168 // "type": "string" 8169 // }, 8170 // "source": { 8171 // "description": "String to identify the originator of this request.", 8172 // "location": "query", 8173 // "type": "string" 8174 // }, 8175 // "volumeIds": { 8176 // "description": "The volume(s) to release restrictions for.", 8177 // "location": "query", 8178 // "repeated": true, 8179 // "required": true, 8180 // "type": "string" 8181 // } 8182 // }, 8183 // "path": "books/v1/myconfig/releaseDownloadAccess", 8184 // "response": { 8185 // "$ref": "DownloadAccesses" 8186 // }, 8187 // "scopes": [ 8188 // "https://www.googleapis.com/auth/books" 8189 // ] 8190 // } 8191 8192} 8193 8194// method id "books.myconfig.requestAccess": 8195 8196type MyconfigRequestAccessCall struct { 8197 s *Service 8198 urlParams_ gensupport.URLParams 8199 ctx_ context.Context 8200 header_ http.Header 8201} 8202 8203// RequestAccess: Request concurrent and download access restrictions. 8204func (r *MyconfigService) RequestAccess(cpksver string, nonce string, source string, volumeId string) *MyconfigRequestAccessCall { 8205 c := &MyconfigRequestAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8206 c.urlParams_.Set("cpksver", cpksver) 8207 c.urlParams_.Set("nonce", nonce) 8208 c.urlParams_.Set("source", source) 8209 c.urlParams_.Set("volumeId", volumeId) 8210 return c 8211} 8212 8213// LicenseTypes sets the optional parameter "licenseTypes": The type of 8214// access license to request. If not specified, the default is BOTH. 8215// 8216// Possible values: 8217// "LICENSE_TYPES_UNDEFINED" 8218// "BOTH" - Both concurrent and download licenses. 8219// "CONCURRENT" - Concurrent access license. 8220// "DOWNLOAD" - Offline download access license. 8221func (c *MyconfigRequestAccessCall) LicenseTypes(licenseTypes string) *MyconfigRequestAccessCall { 8222 c.urlParams_.Set("licenseTypes", licenseTypes) 8223 return c 8224} 8225 8226// Locale sets the optional parameter "locale": ISO-639-1, ISO-3166-1 8227// codes for message localization, i.e. en_US. 8228func (c *MyconfigRequestAccessCall) Locale(locale string) *MyconfigRequestAccessCall { 8229 c.urlParams_.Set("locale", locale) 8230 return c 8231} 8232 8233// Fields allows partial responses to be retrieved. See 8234// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8235// for more information. 8236func (c *MyconfigRequestAccessCall) Fields(s ...googleapi.Field) *MyconfigRequestAccessCall { 8237 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8238 return c 8239} 8240 8241// Context sets the context to be used in this call's Do method. Any 8242// pending HTTP request will be aborted if the provided context is 8243// canceled. 8244func (c *MyconfigRequestAccessCall) Context(ctx context.Context) *MyconfigRequestAccessCall { 8245 c.ctx_ = ctx 8246 return c 8247} 8248 8249// Header returns an http.Header that can be modified by the caller to 8250// add HTTP headers to the request. 8251func (c *MyconfigRequestAccessCall) Header() http.Header { 8252 if c.header_ == nil { 8253 c.header_ = make(http.Header) 8254 } 8255 return c.header_ 8256} 8257 8258func (c *MyconfigRequestAccessCall) doRequest(alt string) (*http.Response, error) { 8259 reqHeaders := make(http.Header) 8260 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8261 for k, v := range c.header_ { 8262 reqHeaders[k] = v 8263 } 8264 reqHeaders.Set("User-Agent", c.s.userAgent()) 8265 var body io.Reader = nil 8266 c.urlParams_.Set("alt", alt) 8267 c.urlParams_.Set("prettyPrint", "false") 8268 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/myconfig/requestAccess") 8269 urls += "?" + c.urlParams_.Encode() 8270 req, err := http.NewRequest("POST", urls, body) 8271 if err != nil { 8272 return nil, err 8273 } 8274 req.Header = reqHeaders 8275 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8276} 8277 8278// Do executes the "books.myconfig.requestAccess" call. 8279// Exactly one of *RequestAccessData or error will be non-nil. Any 8280// non-2xx status code is an error. Response headers are in either 8281// *RequestAccessData.ServerResponse.Header or (if a response was 8282// returned at all) in error.(*googleapi.Error).Header. Use 8283// googleapi.IsNotModified to check whether the returned error was 8284// because http.StatusNotModified was returned. 8285func (c *MyconfigRequestAccessCall) Do(opts ...googleapi.CallOption) (*RequestAccessData, error) { 8286 gensupport.SetOptions(c.urlParams_, opts...) 8287 res, err := c.doRequest("json") 8288 if res != nil && res.StatusCode == http.StatusNotModified { 8289 if res.Body != nil { 8290 res.Body.Close() 8291 } 8292 return nil, &googleapi.Error{ 8293 Code: res.StatusCode, 8294 Header: res.Header, 8295 } 8296 } 8297 if err != nil { 8298 return nil, err 8299 } 8300 defer googleapi.CloseBody(res) 8301 if err := googleapi.CheckResponse(res); err != nil { 8302 return nil, err 8303 } 8304 ret := &RequestAccessData{ 8305 ServerResponse: googleapi.ServerResponse{ 8306 Header: res.Header, 8307 HTTPStatusCode: res.StatusCode, 8308 }, 8309 } 8310 target := &ret 8311 if err := gensupport.DecodeResponse(target, res); err != nil { 8312 return nil, err 8313 } 8314 return ret, nil 8315 // { 8316 // "description": "Request concurrent and download access restrictions.", 8317 // "flatPath": "books/v1/myconfig/requestAccess", 8318 // "httpMethod": "POST", 8319 // "id": "books.myconfig.requestAccess", 8320 // "parameterOrder": [ 8321 // "cpksver", 8322 // "nonce", 8323 // "source", 8324 // "volumeId" 8325 // ], 8326 // "parameters": { 8327 // "cpksver": { 8328 // "description": "The device/version ID from which to request the restrictions.", 8329 // "location": "query", 8330 // "required": true, 8331 // "type": "string" 8332 // }, 8333 // "licenseTypes": { 8334 // "description": "The type of access license to request. If not specified, the default is BOTH.", 8335 // "enum": [ 8336 // "LICENSE_TYPES_UNDEFINED", 8337 // "BOTH", 8338 // "CONCURRENT", 8339 // "DOWNLOAD" 8340 // ], 8341 // "enumDescriptions": [ 8342 // "", 8343 // "Both concurrent and download licenses.", 8344 // "Concurrent access license.", 8345 // "Offline download access license." 8346 // ], 8347 // "location": "query", 8348 // "type": "string" 8349 // }, 8350 // "locale": { 8351 // "description": "ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.", 8352 // "location": "query", 8353 // "type": "string" 8354 // }, 8355 // "nonce": { 8356 // "description": "The client nonce value.", 8357 // "location": "query", 8358 // "required": true, 8359 // "type": "string" 8360 // }, 8361 // "source": { 8362 // "description": "String to identify the originator of this request.", 8363 // "location": "query", 8364 // "required": true, 8365 // "type": "string" 8366 // }, 8367 // "volumeId": { 8368 // "description": "The volume to request concurrent/download restrictions for.", 8369 // "location": "query", 8370 // "required": true, 8371 // "type": "string" 8372 // } 8373 // }, 8374 // "path": "books/v1/myconfig/requestAccess", 8375 // "response": { 8376 // "$ref": "RequestAccessData" 8377 // }, 8378 // "scopes": [ 8379 // "https://www.googleapis.com/auth/books" 8380 // ] 8381 // } 8382 8383} 8384 8385// method id "books.myconfig.syncVolumeLicenses": 8386 8387type MyconfigSyncVolumeLicensesCall struct { 8388 s *Service 8389 urlParams_ gensupport.URLParams 8390 ctx_ context.Context 8391 header_ http.Header 8392} 8393 8394// SyncVolumeLicenses: Request downloaded content access for specified 8395// volumes on the My eBooks shelf. 8396func (r *MyconfigService) SyncVolumeLicenses(cpksver string, nonce string, source string) *MyconfigSyncVolumeLicensesCall { 8397 c := &MyconfigSyncVolumeLicensesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8398 c.urlParams_.Set("cpksver", cpksver) 8399 c.urlParams_.Set("nonce", nonce) 8400 c.urlParams_.Set("source", source) 8401 return c 8402} 8403 8404// Features sets the optional parameter "features": List of features 8405// supported by the client, i.e., 'RENTALS' 8406// 8407// Possible values: 8408// "FEATURES_UNDEFINED" 8409// "RENTALS" - Client supports rentals. 8410func (c *MyconfigSyncVolumeLicensesCall) Features(features ...string) *MyconfigSyncVolumeLicensesCall { 8411 c.urlParams_.SetMulti("features", append([]string{}, features...)) 8412 return c 8413} 8414 8415// IncludeNonComicsSeries sets the optional parameter 8416// "includeNonComicsSeries": Set to true to include non-comics series. 8417// Defaults to false. 8418func (c *MyconfigSyncVolumeLicensesCall) IncludeNonComicsSeries(includeNonComicsSeries bool) *MyconfigSyncVolumeLicensesCall { 8419 c.urlParams_.Set("includeNonComicsSeries", fmt.Sprint(includeNonComicsSeries)) 8420 return c 8421} 8422 8423// Locale sets the optional parameter "locale": ISO-639-1, ISO-3166-1 8424// codes for message localization, i.e. en_US. 8425func (c *MyconfigSyncVolumeLicensesCall) Locale(locale string) *MyconfigSyncVolumeLicensesCall { 8426 c.urlParams_.Set("locale", locale) 8427 return c 8428} 8429 8430// ShowPreorders sets the optional parameter "showPreorders": Set to 8431// true to show pre-ordered books. Defaults to false. 8432func (c *MyconfigSyncVolumeLicensesCall) ShowPreorders(showPreorders bool) *MyconfigSyncVolumeLicensesCall { 8433 c.urlParams_.Set("showPreorders", fmt.Sprint(showPreorders)) 8434 return c 8435} 8436 8437// VolumeIds sets the optional parameter "volumeIds": The volume(s) to 8438// request download restrictions for. 8439func (c *MyconfigSyncVolumeLicensesCall) VolumeIds(volumeIds ...string) *MyconfigSyncVolumeLicensesCall { 8440 c.urlParams_.SetMulti("volumeIds", append([]string{}, volumeIds...)) 8441 return c 8442} 8443 8444// Fields allows partial responses to be retrieved. See 8445// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8446// for more information. 8447func (c *MyconfigSyncVolumeLicensesCall) Fields(s ...googleapi.Field) *MyconfigSyncVolumeLicensesCall { 8448 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8449 return c 8450} 8451 8452// Context sets the context to be used in this call's Do method. Any 8453// pending HTTP request will be aborted if the provided context is 8454// canceled. 8455func (c *MyconfigSyncVolumeLicensesCall) Context(ctx context.Context) *MyconfigSyncVolumeLicensesCall { 8456 c.ctx_ = ctx 8457 return c 8458} 8459 8460// Header returns an http.Header that can be modified by the caller to 8461// add HTTP headers to the request. 8462func (c *MyconfigSyncVolumeLicensesCall) Header() http.Header { 8463 if c.header_ == nil { 8464 c.header_ = make(http.Header) 8465 } 8466 return c.header_ 8467} 8468 8469func (c *MyconfigSyncVolumeLicensesCall) doRequest(alt string) (*http.Response, error) { 8470 reqHeaders := make(http.Header) 8471 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8472 for k, v := range c.header_ { 8473 reqHeaders[k] = v 8474 } 8475 reqHeaders.Set("User-Agent", c.s.userAgent()) 8476 var body io.Reader = nil 8477 c.urlParams_.Set("alt", alt) 8478 c.urlParams_.Set("prettyPrint", "false") 8479 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/myconfig/syncVolumeLicenses") 8480 urls += "?" + c.urlParams_.Encode() 8481 req, err := http.NewRequest("POST", urls, body) 8482 if err != nil { 8483 return nil, err 8484 } 8485 req.Header = reqHeaders 8486 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8487} 8488 8489// Do executes the "books.myconfig.syncVolumeLicenses" call. 8490// Exactly one of *Volumes or error will be non-nil. Any non-2xx status 8491// code is an error. Response headers are in either 8492// *Volumes.ServerResponse.Header or (if a response was returned at all) 8493// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8494// check whether the returned error was because http.StatusNotModified 8495// was returned. 8496func (c *MyconfigSyncVolumeLicensesCall) Do(opts ...googleapi.CallOption) (*Volumes, error) { 8497 gensupport.SetOptions(c.urlParams_, opts...) 8498 res, err := c.doRequest("json") 8499 if res != nil && res.StatusCode == http.StatusNotModified { 8500 if res.Body != nil { 8501 res.Body.Close() 8502 } 8503 return nil, &googleapi.Error{ 8504 Code: res.StatusCode, 8505 Header: res.Header, 8506 } 8507 } 8508 if err != nil { 8509 return nil, err 8510 } 8511 defer googleapi.CloseBody(res) 8512 if err := googleapi.CheckResponse(res); err != nil { 8513 return nil, err 8514 } 8515 ret := &Volumes{ 8516 ServerResponse: googleapi.ServerResponse{ 8517 Header: res.Header, 8518 HTTPStatusCode: res.StatusCode, 8519 }, 8520 } 8521 target := &ret 8522 if err := gensupport.DecodeResponse(target, res); err != nil { 8523 return nil, err 8524 } 8525 return ret, nil 8526 // { 8527 // "description": "Request downloaded content access for specified volumes on the My eBooks shelf.", 8528 // "flatPath": "books/v1/myconfig/syncVolumeLicenses", 8529 // "httpMethod": "POST", 8530 // "id": "books.myconfig.syncVolumeLicenses", 8531 // "parameterOrder": [ 8532 // "cpksver", 8533 // "nonce", 8534 // "source" 8535 // ], 8536 // "parameters": { 8537 // "cpksver": { 8538 // "description": "The device/version ID from which to release the restriction.", 8539 // "location": "query", 8540 // "required": true, 8541 // "type": "string" 8542 // }, 8543 // "features": { 8544 // "description": "List of features supported by the client, i.e., 'RENTALS'", 8545 // "enum": [ 8546 // "FEATURES_UNDEFINED", 8547 // "RENTALS" 8548 // ], 8549 // "enumDescriptions": [ 8550 // "", 8551 // "Client supports rentals." 8552 // ], 8553 // "location": "query", 8554 // "repeated": true, 8555 // "type": "string" 8556 // }, 8557 // "includeNonComicsSeries": { 8558 // "description": "Set to true to include non-comics series. Defaults to false.", 8559 // "location": "query", 8560 // "type": "boolean" 8561 // }, 8562 // "locale": { 8563 // "description": "ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.", 8564 // "location": "query", 8565 // "type": "string" 8566 // }, 8567 // "nonce": { 8568 // "description": "The client nonce value.", 8569 // "location": "query", 8570 // "required": true, 8571 // "type": "string" 8572 // }, 8573 // "showPreorders": { 8574 // "description": "Set to true to show pre-ordered books. Defaults to false.", 8575 // "location": "query", 8576 // "type": "boolean" 8577 // }, 8578 // "source": { 8579 // "description": "String to identify the originator of this request.", 8580 // "location": "query", 8581 // "required": true, 8582 // "type": "string" 8583 // }, 8584 // "volumeIds": { 8585 // "description": "The volume(s) to request download restrictions for.", 8586 // "location": "query", 8587 // "repeated": true, 8588 // "type": "string" 8589 // } 8590 // }, 8591 // "path": "books/v1/myconfig/syncVolumeLicenses", 8592 // "response": { 8593 // "$ref": "Volumes" 8594 // }, 8595 // "scopes": [ 8596 // "https://www.googleapis.com/auth/books" 8597 // ] 8598 // } 8599 8600} 8601 8602// method id "books.myconfig.updateUserSettings": 8603 8604type MyconfigUpdateUserSettingsCall struct { 8605 s *Service 8606 usersettings *Usersettings 8607 urlParams_ gensupport.URLParams 8608 ctx_ context.Context 8609 header_ http.Header 8610} 8611 8612// UpdateUserSettings: Sets the settings for the user. If a sub-object 8613// is specified, it will overwrite the existing sub-object stored in the 8614// server. Unspecified sub-objects will retain the existing value. 8615func (r *MyconfigService) UpdateUserSettings(usersettings *Usersettings) *MyconfigUpdateUserSettingsCall { 8616 c := &MyconfigUpdateUserSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8617 c.usersettings = usersettings 8618 return c 8619} 8620 8621// Fields allows partial responses to be retrieved. See 8622// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8623// for more information. 8624func (c *MyconfigUpdateUserSettingsCall) Fields(s ...googleapi.Field) *MyconfigUpdateUserSettingsCall { 8625 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8626 return c 8627} 8628 8629// Context sets the context to be used in this call's Do method. Any 8630// pending HTTP request will be aborted if the provided context is 8631// canceled. 8632func (c *MyconfigUpdateUserSettingsCall) Context(ctx context.Context) *MyconfigUpdateUserSettingsCall { 8633 c.ctx_ = ctx 8634 return c 8635} 8636 8637// Header returns an http.Header that can be modified by the caller to 8638// add HTTP headers to the request. 8639func (c *MyconfigUpdateUserSettingsCall) Header() http.Header { 8640 if c.header_ == nil { 8641 c.header_ = make(http.Header) 8642 } 8643 return c.header_ 8644} 8645 8646func (c *MyconfigUpdateUserSettingsCall) doRequest(alt string) (*http.Response, error) { 8647 reqHeaders := make(http.Header) 8648 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8649 for k, v := range c.header_ { 8650 reqHeaders[k] = v 8651 } 8652 reqHeaders.Set("User-Agent", c.s.userAgent()) 8653 var body io.Reader = nil 8654 body, err := googleapi.WithoutDataWrapper.JSONReader(c.usersettings) 8655 if err != nil { 8656 return nil, err 8657 } 8658 reqHeaders.Set("Content-Type", "application/json") 8659 c.urlParams_.Set("alt", alt) 8660 c.urlParams_.Set("prettyPrint", "false") 8661 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/myconfig/updateUserSettings") 8662 urls += "?" + c.urlParams_.Encode() 8663 req, err := http.NewRequest("POST", urls, body) 8664 if err != nil { 8665 return nil, err 8666 } 8667 req.Header = reqHeaders 8668 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8669} 8670 8671// Do executes the "books.myconfig.updateUserSettings" call. 8672// Exactly one of *Usersettings or error will be non-nil. Any non-2xx 8673// status code is an error. Response headers are in either 8674// *Usersettings.ServerResponse.Header or (if a response was returned at 8675// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8676// to check whether the returned error was because 8677// http.StatusNotModified was returned. 8678func (c *MyconfigUpdateUserSettingsCall) Do(opts ...googleapi.CallOption) (*Usersettings, error) { 8679 gensupport.SetOptions(c.urlParams_, opts...) 8680 res, err := c.doRequest("json") 8681 if res != nil && res.StatusCode == http.StatusNotModified { 8682 if res.Body != nil { 8683 res.Body.Close() 8684 } 8685 return nil, &googleapi.Error{ 8686 Code: res.StatusCode, 8687 Header: res.Header, 8688 } 8689 } 8690 if err != nil { 8691 return nil, err 8692 } 8693 defer googleapi.CloseBody(res) 8694 if err := googleapi.CheckResponse(res); err != nil { 8695 return nil, err 8696 } 8697 ret := &Usersettings{ 8698 ServerResponse: googleapi.ServerResponse{ 8699 Header: res.Header, 8700 HTTPStatusCode: res.StatusCode, 8701 }, 8702 } 8703 target := &ret 8704 if err := gensupport.DecodeResponse(target, res); err != nil { 8705 return nil, err 8706 } 8707 return ret, nil 8708 // { 8709 // "description": "Sets the settings for the user. If a sub-object is specified, it will overwrite the existing sub-object stored in the server. Unspecified sub-objects will retain the existing value.", 8710 // "flatPath": "books/v1/myconfig/updateUserSettings", 8711 // "httpMethod": "POST", 8712 // "id": "books.myconfig.updateUserSettings", 8713 // "parameterOrder": [], 8714 // "parameters": {}, 8715 // "path": "books/v1/myconfig/updateUserSettings", 8716 // "request": { 8717 // "$ref": "Usersettings" 8718 // }, 8719 // "response": { 8720 // "$ref": "Usersettings" 8721 // }, 8722 // "scopes": [ 8723 // "https://www.googleapis.com/auth/books" 8724 // ] 8725 // } 8726 8727} 8728 8729// method id "books.mylibrary.annotations.delete": 8730 8731type MylibraryAnnotationsDeleteCall struct { 8732 s *Service 8733 annotationId string 8734 urlParams_ gensupport.URLParams 8735 ctx_ context.Context 8736 header_ http.Header 8737} 8738 8739// Delete: Deletes an annotation. 8740func (r *MylibraryAnnotationsService) Delete(annotationId string) *MylibraryAnnotationsDeleteCall { 8741 c := &MylibraryAnnotationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8742 c.annotationId = annotationId 8743 return c 8744} 8745 8746// Source sets the optional parameter "source": String to identify the 8747// originator of this request. 8748func (c *MylibraryAnnotationsDeleteCall) Source(source string) *MylibraryAnnotationsDeleteCall { 8749 c.urlParams_.Set("source", source) 8750 return c 8751} 8752 8753// Fields allows partial responses to be retrieved. See 8754// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8755// for more information. 8756func (c *MylibraryAnnotationsDeleteCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsDeleteCall { 8757 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8758 return c 8759} 8760 8761// Context sets the context to be used in this call's Do method. Any 8762// pending HTTP request will be aborted if the provided context is 8763// canceled. 8764func (c *MylibraryAnnotationsDeleteCall) Context(ctx context.Context) *MylibraryAnnotationsDeleteCall { 8765 c.ctx_ = ctx 8766 return c 8767} 8768 8769// Header returns an http.Header that can be modified by the caller to 8770// add HTTP headers to the request. 8771func (c *MylibraryAnnotationsDeleteCall) Header() http.Header { 8772 if c.header_ == nil { 8773 c.header_ = make(http.Header) 8774 } 8775 return c.header_ 8776} 8777 8778func (c *MylibraryAnnotationsDeleteCall) doRequest(alt string) (*http.Response, error) { 8779 reqHeaders := make(http.Header) 8780 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8781 for k, v := range c.header_ { 8782 reqHeaders[k] = v 8783 } 8784 reqHeaders.Set("User-Agent", c.s.userAgent()) 8785 var body io.Reader = nil 8786 c.urlParams_.Set("alt", alt) 8787 c.urlParams_.Set("prettyPrint", "false") 8788 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/mylibrary/annotations/{annotationId}") 8789 urls += "?" + c.urlParams_.Encode() 8790 req, err := http.NewRequest("DELETE", urls, body) 8791 if err != nil { 8792 return nil, err 8793 } 8794 req.Header = reqHeaders 8795 googleapi.Expand(req.URL, map[string]string{ 8796 "annotationId": c.annotationId, 8797 }) 8798 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8799} 8800 8801// Do executes the "books.mylibrary.annotations.delete" call. 8802// Exactly one of *Empty or error will be non-nil. Any non-2xx status 8803// code is an error. Response headers are in either 8804// *Empty.ServerResponse.Header or (if a response was returned at all) 8805// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8806// check whether the returned error was because http.StatusNotModified 8807// was returned. 8808func (c *MylibraryAnnotationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 8809 gensupport.SetOptions(c.urlParams_, opts...) 8810 res, err := c.doRequest("json") 8811 if res != nil && res.StatusCode == http.StatusNotModified { 8812 if res.Body != nil { 8813 res.Body.Close() 8814 } 8815 return nil, &googleapi.Error{ 8816 Code: res.StatusCode, 8817 Header: res.Header, 8818 } 8819 } 8820 if err != nil { 8821 return nil, err 8822 } 8823 defer googleapi.CloseBody(res) 8824 if err := googleapi.CheckResponse(res); err != nil { 8825 return nil, err 8826 } 8827 ret := &Empty{ 8828 ServerResponse: googleapi.ServerResponse{ 8829 Header: res.Header, 8830 HTTPStatusCode: res.StatusCode, 8831 }, 8832 } 8833 target := &ret 8834 if err := gensupport.DecodeResponse(target, res); err != nil { 8835 return nil, err 8836 } 8837 return ret, nil 8838 // { 8839 // "description": "Deletes an annotation.", 8840 // "flatPath": "books/v1/mylibrary/annotations/{annotationId}", 8841 // "httpMethod": "DELETE", 8842 // "id": "books.mylibrary.annotations.delete", 8843 // "parameterOrder": [ 8844 // "annotationId" 8845 // ], 8846 // "parameters": { 8847 // "annotationId": { 8848 // "description": "The ID for the annotation to delete.", 8849 // "location": "path", 8850 // "required": true, 8851 // "type": "string" 8852 // }, 8853 // "source": { 8854 // "description": "String to identify the originator of this request.", 8855 // "location": "query", 8856 // "type": "string" 8857 // } 8858 // }, 8859 // "path": "books/v1/mylibrary/annotations/{annotationId}", 8860 // "response": { 8861 // "$ref": "Empty" 8862 // }, 8863 // "scopes": [ 8864 // "https://www.googleapis.com/auth/books" 8865 // ] 8866 // } 8867 8868} 8869 8870// method id "books.mylibrary.annotations.insert": 8871 8872type MylibraryAnnotationsInsertCall struct { 8873 s *Service 8874 annotation *Annotation 8875 urlParams_ gensupport.URLParams 8876 ctx_ context.Context 8877 header_ http.Header 8878} 8879 8880// Insert: Inserts a new annotation. 8881func (r *MylibraryAnnotationsService) Insert(annotation *Annotation) *MylibraryAnnotationsInsertCall { 8882 c := &MylibraryAnnotationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8883 c.annotation = annotation 8884 return c 8885} 8886 8887// AnnotationId sets the optional parameter "annotationId": The ID for 8888// the annotation to insert. 8889func (c *MylibraryAnnotationsInsertCall) AnnotationId(annotationId string) *MylibraryAnnotationsInsertCall { 8890 c.urlParams_.Set("annotationId", annotationId) 8891 return c 8892} 8893 8894// Country sets the optional parameter "country": ISO-3166-1 code to 8895// override the IP-based location. 8896func (c *MylibraryAnnotationsInsertCall) Country(country string) *MylibraryAnnotationsInsertCall { 8897 c.urlParams_.Set("country", country) 8898 return c 8899} 8900 8901// ShowOnlySummaryInResponse sets the optional parameter 8902// "showOnlySummaryInResponse": Requests that only the summary of the 8903// specified layer be provided in the response. 8904func (c *MylibraryAnnotationsInsertCall) ShowOnlySummaryInResponse(showOnlySummaryInResponse bool) *MylibraryAnnotationsInsertCall { 8905 c.urlParams_.Set("showOnlySummaryInResponse", fmt.Sprint(showOnlySummaryInResponse)) 8906 return c 8907} 8908 8909// Source sets the optional parameter "source": String to identify the 8910// originator of this request. 8911func (c *MylibraryAnnotationsInsertCall) Source(source string) *MylibraryAnnotationsInsertCall { 8912 c.urlParams_.Set("source", source) 8913 return c 8914} 8915 8916// Fields allows partial responses to be retrieved. See 8917// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8918// for more information. 8919func (c *MylibraryAnnotationsInsertCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsInsertCall { 8920 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8921 return c 8922} 8923 8924// Context sets the context to be used in this call's Do method. Any 8925// pending HTTP request will be aborted if the provided context is 8926// canceled. 8927func (c *MylibraryAnnotationsInsertCall) Context(ctx context.Context) *MylibraryAnnotationsInsertCall { 8928 c.ctx_ = ctx 8929 return c 8930} 8931 8932// Header returns an http.Header that can be modified by the caller to 8933// add HTTP headers to the request. 8934func (c *MylibraryAnnotationsInsertCall) Header() http.Header { 8935 if c.header_ == nil { 8936 c.header_ = make(http.Header) 8937 } 8938 return c.header_ 8939} 8940 8941func (c *MylibraryAnnotationsInsertCall) doRequest(alt string) (*http.Response, error) { 8942 reqHeaders := make(http.Header) 8943 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 8944 for k, v := range c.header_ { 8945 reqHeaders[k] = v 8946 } 8947 reqHeaders.Set("User-Agent", c.s.userAgent()) 8948 var body io.Reader = nil 8949 body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation) 8950 if err != nil { 8951 return nil, err 8952 } 8953 reqHeaders.Set("Content-Type", "application/json") 8954 c.urlParams_.Set("alt", alt) 8955 c.urlParams_.Set("prettyPrint", "false") 8956 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/mylibrary/annotations") 8957 urls += "?" + c.urlParams_.Encode() 8958 req, err := http.NewRequest("POST", urls, body) 8959 if err != nil { 8960 return nil, err 8961 } 8962 req.Header = reqHeaders 8963 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8964} 8965 8966// Do executes the "books.mylibrary.annotations.insert" call. 8967// Exactly one of *Annotation or error will be non-nil. Any non-2xx 8968// status code is an error. Response headers are in either 8969// *Annotation.ServerResponse.Header or (if a response was returned at 8970// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8971// to check whether the returned error was because 8972// http.StatusNotModified was returned. 8973func (c *MylibraryAnnotationsInsertCall) Do(opts ...googleapi.CallOption) (*Annotation, error) { 8974 gensupport.SetOptions(c.urlParams_, opts...) 8975 res, err := c.doRequest("json") 8976 if res != nil && res.StatusCode == http.StatusNotModified { 8977 if res.Body != nil { 8978 res.Body.Close() 8979 } 8980 return nil, &googleapi.Error{ 8981 Code: res.StatusCode, 8982 Header: res.Header, 8983 } 8984 } 8985 if err != nil { 8986 return nil, err 8987 } 8988 defer googleapi.CloseBody(res) 8989 if err := googleapi.CheckResponse(res); err != nil { 8990 return nil, err 8991 } 8992 ret := &Annotation{ 8993 ServerResponse: googleapi.ServerResponse{ 8994 Header: res.Header, 8995 HTTPStatusCode: res.StatusCode, 8996 }, 8997 } 8998 target := &ret 8999 if err := gensupport.DecodeResponse(target, res); err != nil { 9000 return nil, err 9001 } 9002 return ret, nil 9003 // { 9004 // "description": "Inserts a new annotation.", 9005 // "flatPath": "books/v1/mylibrary/annotations", 9006 // "httpMethod": "POST", 9007 // "id": "books.mylibrary.annotations.insert", 9008 // "parameterOrder": [], 9009 // "parameters": { 9010 // "annotationId": { 9011 // "description": "The ID for the annotation to insert.", 9012 // "location": "query", 9013 // "type": "string" 9014 // }, 9015 // "country": { 9016 // "description": "ISO-3166-1 code to override the IP-based location.", 9017 // "location": "query", 9018 // "type": "string" 9019 // }, 9020 // "showOnlySummaryInResponse": { 9021 // "description": "Requests that only the summary of the specified layer be provided in the response.", 9022 // "location": "query", 9023 // "type": "boolean" 9024 // }, 9025 // "source": { 9026 // "description": "String to identify the originator of this request.", 9027 // "location": "query", 9028 // "type": "string" 9029 // } 9030 // }, 9031 // "path": "books/v1/mylibrary/annotations", 9032 // "request": { 9033 // "$ref": "Annotation" 9034 // }, 9035 // "response": { 9036 // "$ref": "Annotation" 9037 // }, 9038 // "scopes": [ 9039 // "https://www.googleapis.com/auth/books" 9040 // ] 9041 // } 9042 9043} 9044 9045// method id "books.mylibrary.annotations.list": 9046 9047type MylibraryAnnotationsListCall struct { 9048 s *Service 9049 urlParams_ gensupport.URLParams 9050 ifNoneMatch_ string 9051 ctx_ context.Context 9052 header_ http.Header 9053} 9054 9055// List: Retrieves a list of annotations, possibly filtered. 9056func (r *MylibraryAnnotationsService) List() *MylibraryAnnotationsListCall { 9057 c := &MylibraryAnnotationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9058 return c 9059} 9060 9061// ContentVersion sets the optional parameter "contentVersion": The 9062// content version for the requested volume. 9063func (c *MylibraryAnnotationsListCall) ContentVersion(contentVersion string) *MylibraryAnnotationsListCall { 9064 c.urlParams_.Set("contentVersion", contentVersion) 9065 return c 9066} 9067 9068// LayerId sets the optional parameter "layerId": The layer ID to limit 9069// annotation by. 9070func (c *MylibraryAnnotationsListCall) LayerId(layerId string) *MylibraryAnnotationsListCall { 9071 c.urlParams_.Set("layerId", layerId) 9072 return c 9073} 9074 9075// LayerIds sets the optional parameter "layerIds": The layer ID(s) to 9076// limit annotation by. 9077func (c *MylibraryAnnotationsListCall) LayerIds(layerIds ...string) *MylibraryAnnotationsListCall { 9078 c.urlParams_.SetMulti("layerIds", append([]string{}, layerIds...)) 9079 return c 9080} 9081 9082// MaxResults sets the optional parameter "maxResults": Maximum number 9083// of results to return 9084func (c *MylibraryAnnotationsListCall) MaxResults(maxResults int64) *MylibraryAnnotationsListCall { 9085 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 9086 return c 9087} 9088 9089// PageToken sets the optional parameter "pageToken": The value of the 9090// nextToken from the previous page. 9091func (c *MylibraryAnnotationsListCall) PageToken(pageToken string) *MylibraryAnnotationsListCall { 9092 c.urlParams_.Set("pageToken", pageToken) 9093 return c 9094} 9095 9096// ShowDeleted sets the optional parameter "showDeleted": Set to true to 9097// return deleted annotations. updatedMin must be in the request to use 9098// this. Defaults to false. 9099func (c *MylibraryAnnotationsListCall) ShowDeleted(showDeleted bool) *MylibraryAnnotationsListCall { 9100 c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) 9101 return c 9102} 9103 9104// Source sets the optional parameter "source": String to identify the 9105// originator of this request. 9106func (c *MylibraryAnnotationsListCall) Source(source string) *MylibraryAnnotationsListCall { 9107 c.urlParams_.Set("source", source) 9108 return c 9109} 9110 9111// UpdatedMax sets the optional parameter "updatedMax": RFC 3339 9112// timestamp to restrict to items updated prior to this timestamp 9113// (exclusive). 9114func (c *MylibraryAnnotationsListCall) UpdatedMax(updatedMax string) *MylibraryAnnotationsListCall { 9115 c.urlParams_.Set("updatedMax", updatedMax) 9116 return c 9117} 9118 9119// UpdatedMin sets the optional parameter "updatedMin": RFC 3339 9120// timestamp to restrict to items updated since this timestamp 9121// (inclusive). 9122func (c *MylibraryAnnotationsListCall) UpdatedMin(updatedMin string) *MylibraryAnnotationsListCall { 9123 c.urlParams_.Set("updatedMin", updatedMin) 9124 return c 9125} 9126 9127// VolumeId sets the optional parameter "volumeId": The volume to 9128// restrict annotations to. 9129func (c *MylibraryAnnotationsListCall) VolumeId(volumeId string) *MylibraryAnnotationsListCall { 9130 c.urlParams_.Set("volumeId", volumeId) 9131 return c 9132} 9133 9134// Fields allows partial responses to be retrieved. See 9135// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9136// for more information. 9137func (c *MylibraryAnnotationsListCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsListCall { 9138 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9139 return c 9140} 9141 9142// IfNoneMatch sets the optional parameter which makes the operation 9143// fail if the object's ETag matches the given value. This is useful for 9144// getting updates only after the object has changed since the last 9145// request. Use googleapi.IsNotModified to check whether the response 9146// error from Do is the result of In-None-Match. 9147func (c *MylibraryAnnotationsListCall) IfNoneMatch(entityTag string) *MylibraryAnnotationsListCall { 9148 c.ifNoneMatch_ = entityTag 9149 return c 9150} 9151 9152// Context sets the context to be used in this call's Do method. Any 9153// pending HTTP request will be aborted if the provided context is 9154// canceled. 9155func (c *MylibraryAnnotationsListCall) Context(ctx context.Context) *MylibraryAnnotationsListCall { 9156 c.ctx_ = ctx 9157 return c 9158} 9159 9160// Header returns an http.Header that can be modified by the caller to 9161// add HTTP headers to the request. 9162func (c *MylibraryAnnotationsListCall) Header() http.Header { 9163 if c.header_ == nil { 9164 c.header_ = make(http.Header) 9165 } 9166 return c.header_ 9167} 9168 9169func (c *MylibraryAnnotationsListCall) doRequest(alt string) (*http.Response, error) { 9170 reqHeaders := make(http.Header) 9171 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9172 for k, v := range c.header_ { 9173 reqHeaders[k] = v 9174 } 9175 reqHeaders.Set("User-Agent", c.s.userAgent()) 9176 if c.ifNoneMatch_ != "" { 9177 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9178 } 9179 var body io.Reader = nil 9180 c.urlParams_.Set("alt", alt) 9181 c.urlParams_.Set("prettyPrint", "false") 9182 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/mylibrary/annotations") 9183 urls += "?" + c.urlParams_.Encode() 9184 req, err := http.NewRequest("GET", urls, body) 9185 if err != nil { 9186 return nil, err 9187 } 9188 req.Header = reqHeaders 9189 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9190} 9191 9192// Do executes the "books.mylibrary.annotations.list" call. 9193// Exactly one of *Annotations or error will be non-nil. Any non-2xx 9194// status code is an error. Response headers are in either 9195// *Annotations.ServerResponse.Header or (if a response was returned at 9196// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9197// to check whether the returned error was because 9198// http.StatusNotModified was returned. 9199func (c *MylibraryAnnotationsListCall) Do(opts ...googleapi.CallOption) (*Annotations, error) { 9200 gensupport.SetOptions(c.urlParams_, opts...) 9201 res, err := c.doRequest("json") 9202 if res != nil && res.StatusCode == http.StatusNotModified { 9203 if res.Body != nil { 9204 res.Body.Close() 9205 } 9206 return nil, &googleapi.Error{ 9207 Code: res.StatusCode, 9208 Header: res.Header, 9209 } 9210 } 9211 if err != nil { 9212 return nil, err 9213 } 9214 defer googleapi.CloseBody(res) 9215 if err := googleapi.CheckResponse(res); err != nil { 9216 return nil, err 9217 } 9218 ret := &Annotations{ 9219 ServerResponse: googleapi.ServerResponse{ 9220 Header: res.Header, 9221 HTTPStatusCode: res.StatusCode, 9222 }, 9223 } 9224 target := &ret 9225 if err := gensupport.DecodeResponse(target, res); err != nil { 9226 return nil, err 9227 } 9228 return ret, nil 9229 // { 9230 // "description": "Retrieves a list of annotations, possibly filtered.", 9231 // "flatPath": "books/v1/mylibrary/annotations", 9232 // "httpMethod": "GET", 9233 // "id": "books.mylibrary.annotations.list", 9234 // "parameterOrder": [], 9235 // "parameters": { 9236 // "contentVersion": { 9237 // "description": "The content version for the requested volume.", 9238 // "location": "query", 9239 // "type": "string" 9240 // }, 9241 // "layerId": { 9242 // "description": "The layer ID to limit annotation by.", 9243 // "location": "query", 9244 // "type": "string" 9245 // }, 9246 // "layerIds": { 9247 // "description": "The layer ID(s) to limit annotation by.", 9248 // "location": "query", 9249 // "repeated": true, 9250 // "type": "string" 9251 // }, 9252 // "maxResults": { 9253 // "description": "Maximum number of results to return", 9254 // "format": "uint32", 9255 // "location": "query", 9256 // "maximum": "40", 9257 // "minimum": "0", 9258 // "type": "integer" 9259 // }, 9260 // "pageToken": { 9261 // "description": "The value of the nextToken from the previous page.", 9262 // "location": "query", 9263 // "type": "string" 9264 // }, 9265 // "showDeleted": { 9266 // "description": "Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false.", 9267 // "location": "query", 9268 // "type": "boolean" 9269 // }, 9270 // "source": { 9271 // "description": "String to identify the originator of this request.", 9272 // "location": "query", 9273 // "type": "string" 9274 // }, 9275 // "updatedMax": { 9276 // "description": "RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).", 9277 // "location": "query", 9278 // "type": "string" 9279 // }, 9280 // "updatedMin": { 9281 // "description": "RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).", 9282 // "location": "query", 9283 // "type": "string" 9284 // }, 9285 // "volumeId": { 9286 // "description": "The volume to restrict annotations to.", 9287 // "location": "query", 9288 // "type": "string" 9289 // } 9290 // }, 9291 // "path": "books/v1/mylibrary/annotations", 9292 // "response": { 9293 // "$ref": "Annotations" 9294 // }, 9295 // "scopes": [ 9296 // "https://www.googleapis.com/auth/books" 9297 // ] 9298 // } 9299 9300} 9301 9302// Pages invokes f for each page of results. 9303// A non-nil error returned from f will halt the iteration. 9304// The provided context supersedes any context provided to the Context method. 9305func (c *MylibraryAnnotationsListCall) Pages(ctx context.Context, f func(*Annotations) error) error { 9306 c.ctx_ = ctx 9307 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9308 for { 9309 x, err := c.Do() 9310 if err != nil { 9311 return err 9312 } 9313 if err := f(x); err != nil { 9314 return err 9315 } 9316 if x.NextPageToken == "" { 9317 return nil 9318 } 9319 c.PageToken(x.NextPageToken) 9320 } 9321} 9322 9323// method id "books.mylibrary.annotations.summary": 9324 9325type MylibraryAnnotationsSummaryCall struct { 9326 s *Service 9327 urlParams_ gensupport.URLParams 9328 ctx_ context.Context 9329 header_ http.Header 9330} 9331 9332// Summary: Gets the summary of specified layers. 9333func (r *MylibraryAnnotationsService) Summary(layerIds []string, volumeId string) *MylibraryAnnotationsSummaryCall { 9334 c := &MylibraryAnnotationsSummaryCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9335 c.urlParams_.SetMulti("layerIds", append([]string{}, layerIds...)) 9336 c.urlParams_.Set("volumeId", volumeId) 9337 return c 9338} 9339 9340// Fields allows partial responses to be retrieved. See 9341// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9342// for more information. 9343func (c *MylibraryAnnotationsSummaryCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsSummaryCall { 9344 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9345 return c 9346} 9347 9348// Context sets the context to be used in this call's Do method. Any 9349// pending HTTP request will be aborted if the provided context is 9350// canceled. 9351func (c *MylibraryAnnotationsSummaryCall) Context(ctx context.Context) *MylibraryAnnotationsSummaryCall { 9352 c.ctx_ = ctx 9353 return c 9354} 9355 9356// Header returns an http.Header that can be modified by the caller to 9357// add HTTP headers to the request. 9358func (c *MylibraryAnnotationsSummaryCall) Header() http.Header { 9359 if c.header_ == nil { 9360 c.header_ = make(http.Header) 9361 } 9362 return c.header_ 9363} 9364 9365func (c *MylibraryAnnotationsSummaryCall) doRequest(alt string) (*http.Response, error) { 9366 reqHeaders := make(http.Header) 9367 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9368 for k, v := range c.header_ { 9369 reqHeaders[k] = v 9370 } 9371 reqHeaders.Set("User-Agent", c.s.userAgent()) 9372 var body io.Reader = nil 9373 c.urlParams_.Set("alt", alt) 9374 c.urlParams_.Set("prettyPrint", "false") 9375 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/mylibrary/annotations/summary") 9376 urls += "?" + c.urlParams_.Encode() 9377 req, err := http.NewRequest("POST", urls, body) 9378 if err != nil { 9379 return nil, err 9380 } 9381 req.Header = reqHeaders 9382 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9383} 9384 9385// Do executes the "books.mylibrary.annotations.summary" call. 9386// Exactly one of *AnnotationsSummary or error will be non-nil. Any 9387// non-2xx status code is an error. Response headers are in either 9388// *AnnotationsSummary.ServerResponse.Header or (if a response was 9389// returned at all) in error.(*googleapi.Error).Header. Use 9390// googleapi.IsNotModified to check whether the returned error was 9391// because http.StatusNotModified was returned. 9392func (c *MylibraryAnnotationsSummaryCall) Do(opts ...googleapi.CallOption) (*AnnotationsSummary, error) { 9393 gensupport.SetOptions(c.urlParams_, opts...) 9394 res, err := c.doRequest("json") 9395 if res != nil && res.StatusCode == http.StatusNotModified { 9396 if res.Body != nil { 9397 res.Body.Close() 9398 } 9399 return nil, &googleapi.Error{ 9400 Code: res.StatusCode, 9401 Header: res.Header, 9402 } 9403 } 9404 if err != nil { 9405 return nil, err 9406 } 9407 defer googleapi.CloseBody(res) 9408 if err := googleapi.CheckResponse(res); err != nil { 9409 return nil, err 9410 } 9411 ret := &AnnotationsSummary{ 9412 ServerResponse: googleapi.ServerResponse{ 9413 Header: res.Header, 9414 HTTPStatusCode: res.StatusCode, 9415 }, 9416 } 9417 target := &ret 9418 if err := gensupport.DecodeResponse(target, res); err != nil { 9419 return nil, err 9420 } 9421 return ret, nil 9422 // { 9423 // "description": "Gets the summary of specified layers.", 9424 // "flatPath": "books/v1/mylibrary/annotations/summary", 9425 // "httpMethod": "POST", 9426 // "id": "books.mylibrary.annotations.summary", 9427 // "parameterOrder": [ 9428 // "layerIds", 9429 // "volumeId" 9430 // ], 9431 // "parameters": { 9432 // "layerIds": { 9433 // "description": "Array of layer IDs to get the summary for.", 9434 // "location": "query", 9435 // "repeated": true, 9436 // "required": true, 9437 // "type": "string" 9438 // }, 9439 // "volumeId": { 9440 // "description": "Volume id to get the summary for.", 9441 // "location": "query", 9442 // "required": true, 9443 // "type": "string" 9444 // } 9445 // }, 9446 // "path": "books/v1/mylibrary/annotations/summary", 9447 // "response": { 9448 // "$ref": "AnnotationsSummary" 9449 // }, 9450 // "scopes": [ 9451 // "https://www.googleapis.com/auth/books" 9452 // ] 9453 // } 9454 9455} 9456 9457// method id "books.mylibrary.annotations.update": 9458 9459type MylibraryAnnotationsUpdateCall struct { 9460 s *Service 9461 annotationId string 9462 annotation *Annotation 9463 urlParams_ gensupport.URLParams 9464 ctx_ context.Context 9465 header_ http.Header 9466} 9467 9468// Update: Updates an existing annotation. 9469func (r *MylibraryAnnotationsService) Update(annotationId string, annotation *Annotation) *MylibraryAnnotationsUpdateCall { 9470 c := &MylibraryAnnotationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9471 c.annotationId = annotationId 9472 c.annotation = annotation 9473 return c 9474} 9475 9476// Source sets the optional parameter "source": String to identify the 9477// originator of this request. 9478func (c *MylibraryAnnotationsUpdateCall) Source(source string) *MylibraryAnnotationsUpdateCall { 9479 c.urlParams_.Set("source", source) 9480 return c 9481} 9482 9483// Fields allows partial responses to be retrieved. See 9484// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9485// for more information. 9486func (c *MylibraryAnnotationsUpdateCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsUpdateCall { 9487 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9488 return c 9489} 9490 9491// Context sets the context to be used in this call's Do method. Any 9492// pending HTTP request will be aborted if the provided context is 9493// canceled. 9494func (c *MylibraryAnnotationsUpdateCall) Context(ctx context.Context) *MylibraryAnnotationsUpdateCall { 9495 c.ctx_ = ctx 9496 return c 9497} 9498 9499// Header returns an http.Header that can be modified by the caller to 9500// add HTTP headers to the request. 9501func (c *MylibraryAnnotationsUpdateCall) Header() http.Header { 9502 if c.header_ == nil { 9503 c.header_ = make(http.Header) 9504 } 9505 return c.header_ 9506} 9507 9508func (c *MylibraryAnnotationsUpdateCall) doRequest(alt string) (*http.Response, error) { 9509 reqHeaders := make(http.Header) 9510 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9511 for k, v := range c.header_ { 9512 reqHeaders[k] = v 9513 } 9514 reqHeaders.Set("User-Agent", c.s.userAgent()) 9515 var body io.Reader = nil 9516 body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation) 9517 if err != nil { 9518 return nil, err 9519 } 9520 reqHeaders.Set("Content-Type", "application/json") 9521 c.urlParams_.Set("alt", alt) 9522 c.urlParams_.Set("prettyPrint", "false") 9523 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/mylibrary/annotations/{annotationId}") 9524 urls += "?" + c.urlParams_.Encode() 9525 req, err := http.NewRequest("PUT", urls, body) 9526 if err != nil { 9527 return nil, err 9528 } 9529 req.Header = reqHeaders 9530 googleapi.Expand(req.URL, map[string]string{ 9531 "annotationId": c.annotationId, 9532 }) 9533 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9534} 9535 9536// Do executes the "books.mylibrary.annotations.update" call. 9537// Exactly one of *Annotation or error will be non-nil. Any non-2xx 9538// status code is an error. Response headers are in either 9539// *Annotation.ServerResponse.Header or (if a response was returned at 9540// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9541// to check whether the returned error was because 9542// http.StatusNotModified was returned. 9543func (c *MylibraryAnnotationsUpdateCall) Do(opts ...googleapi.CallOption) (*Annotation, error) { 9544 gensupport.SetOptions(c.urlParams_, opts...) 9545 res, err := c.doRequest("json") 9546 if res != nil && res.StatusCode == http.StatusNotModified { 9547 if res.Body != nil { 9548 res.Body.Close() 9549 } 9550 return nil, &googleapi.Error{ 9551 Code: res.StatusCode, 9552 Header: res.Header, 9553 } 9554 } 9555 if err != nil { 9556 return nil, err 9557 } 9558 defer googleapi.CloseBody(res) 9559 if err := googleapi.CheckResponse(res); err != nil { 9560 return nil, err 9561 } 9562 ret := &Annotation{ 9563 ServerResponse: googleapi.ServerResponse{ 9564 Header: res.Header, 9565 HTTPStatusCode: res.StatusCode, 9566 }, 9567 } 9568 target := &ret 9569 if err := gensupport.DecodeResponse(target, res); err != nil { 9570 return nil, err 9571 } 9572 return ret, nil 9573 // { 9574 // "description": "Updates an existing annotation.", 9575 // "flatPath": "books/v1/mylibrary/annotations/{annotationId}", 9576 // "httpMethod": "PUT", 9577 // "id": "books.mylibrary.annotations.update", 9578 // "parameterOrder": [ 9579 // "annotationId" 9580 // ], 9581 // "parameters": { 9582 // "annotationId": { 9583 // "description": "The ID for the annotation to update.", 9584 // "location": "path", 9585 // "required": true, 9586 // "type": "string" 9587 // }, 9588 // "source": { 9589 // "description": "String to identify the originator of this request.", 9590 // "location": "query", 9591 // "type": "string" 9592 // } 9593 // }, 9594 // "path": "books/v1/mylibrary/annotations/{annotationId}", 9595 // "request": { 9596 // "$ref": "Annotation" 9597 // }, 9598 // "response": { 9599 // "$ref": "Annotation" 9600 // }, 9601 // "scopes": [ 9602 // "https://www.googleapis.com/auth/books" 9603 // ] 9604 // } 9605 9606} 9607 9608// method id "books.mylibrary.bookshelves.addVolume": 9609 9610type MylibraryBookshelvesAddVolumeCall struct { 9611 s *Service 9612 shelf string 9613 urlParams_ gensupport.URLParams 9614 ctx_ context.Context 9615 header_ http.Header 9616} 9617 9618// AddVolume: Adds a volume to a bookshelf. 9619func (r *MylibraryBookshelvesService) AddVolume(shelf string, volumeId string) *MylibraryBookshelvesAddVolumeCall { 9620 c := &MylibraryBookshelvesAddVolumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9621 c.shelf = shelf 9622 c.urlParams_.Set("volumeId", volumeId) 9623 return c 9624} 9625 9626// Reason sets the optional parameter "reason": The reason for which the 9627// book is added to the library. 9628// 9629// Possible values: 9630// "REASON_UNDEFINED" 9631// "IOS_PREX" - Volumes added from the PREX flow on iOS. 9632// "IOS_SEARCH" - Volumes added from the Search flow on iOS. 9633// "ONBOARDING" - Volumes added from the Onboarding flow. 9634func (c *MylibraryBookshelvesAddVolumeCall) Reason(reason string) *MylibraryBookshelvesAddVolumeCall { 9635 c.urlParams_.Set("reason", reason) 9636 return c 9637} 9638 9639// Source sets the optional parameter "source": String to identify the 9640// originator of this request. 9641func (c *MylibraryBookshelvesAddVolumeCall) Source(source string) *MylibraryBookshelvesAddVolumeCall { 9642 c.urlParams_.Set("source", source) 9643 return c 9644} 9645 9646// Fields allows partial responses to be retrieved. See 9647// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9648// for more information. 9649func (c *MylibraryBookshelvesAddVolumeCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesAddVolumeCall { 9650 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9651 return c 9652} 9653 9654// Context sets the context to be used in this call's Do method. Any 9655// pending HTTP request will be aborted if the provided context is 9656// canceled. 9657func (c *MylibraryBookshelvesAddVolumeCall) Context(ctx context.Context) *MylibraryBookshelvesAddVolumeCall { 9658 c.ctx_ = ctx 9659 return c 9660} 9661 9662// Header returns an http.Header that can be modified by the caller to 9663// add HTTP headers to the request. 9664func (c *MylibraryBookshelvesAddVolumeCall) Header() http.Header { 9665 if c.header_ == nil { 9666 c.header_ = make(http.Header) 9667 } 9668 return c.header_ 9669} 9670 9671func (c *MylibraryBookshelvesAddVolumeCall) doRequest(alt string) (*http.Response, error) { 9672 reqHeaders := make(http.Header) 9673 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9674 for k, v := range c.header_ { 9675 reqHeaders[k] = v 9676 } 9677 reqHeaders.Set("User-Agent", c.s.userAgent()) 9678 var body io.Reader = nil 9679 c.urlParams_.Set("alt", alt) 9680 c.urlParams_.Set("prettyPrint", "false") 9681 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/mylibrary/bookshelves/{shelf}/addVolume") 9682 urls += "?" + c.urlParams_.Encode() 9683 req, err := http.NewRequest("POST", urls, body) 9684 if err != nil { 9685 return nil, err 9686 } 9687 req.Header = reqHeaders 9688 googleapi.Expand(req.URL, map[string]string{ 9689 "shelf": c.shelf, 9690 }) 9691 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9692} 9693 9694// Do executes the "books.mylibrary.bookshelves.addVolume" call. 9695// Exactly one of *Empty or error will be non-nil. Any non-2xx status 9696// code is an error. Response headers are in either 9697// *Empty.ServerResponse.Header or (if a response was returned at all) 9698// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9699// check whether the returned error was because http.StatusNotModified 9700// was returned. 9701func (c *MylibraryBookshelvesAddVolumeCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 9702 gensupport.SetOptions(c.urlParams_, opts...) 9703 res, err := c.doRequest("json") 9704 if res != nil && res.StatusCode == http.StatusNotModified { 9705 if res.Body != nil { 9706 res.Body.Close() 9707 } 9708 return nil, &googleapi.Error{ 9709 Code: res.StatusCode, 9710 Header: res.Header, 9711 } 9712 } 9713 if err != nil { 9714 return nil, err 9715 } 9716 defer googleapi.CloseBody(res) 9717 if err := googleapi.CheckResponse(res); err != nil { 9718 return nil, err 9719 } 9720 ret := &Empty{ 9721 ServerResponse: googleapi.ServerResponse{ 9722 Header: res.Header, 9723 HTTPStatusCode: res.StatusCode, 9724 }, 9725 } 9726 target := &ret 9727 if err := gensupport.DecodeResponse(target, res); err != nil { 9728 return nil, err 9729 } 9730 return ret, nil 9731 // { 9732 // "description": "Adds a volume to a bookshelf.", 9733 // "flatPath": "books/v1/mylibrary/bookshelves/{shelf}/addVolume", 9734 // "httpMethod": "POST", 9735 // "id": "books.mylibrary.bookshelves.addVolume", 9736 // "parameterOrder": [ 9737 // "shelf", 9738 // "volumeId" 9739 // ], 9740 // "parameters": { 9741 // "reason": { 9742 // "description": "The reason for which the book is added to the library.", 9743 // "enum": [ 9744 // "REASON_UNDEFINED", 9745 // "IOS_PREX", 9746 // "IOS_SEARCH", 9747 // "ONBOARDING" 9748 // ], 9749 // "enumDescriptions": [ 9750 // "", 9751 // "Volumes added from the PREX flow on iOS.", 9752 // "Volumes added from the Search flow on iOS.", 9753 // "Volumes added from the Onboarding flow." 9754 // ], 9755 // "location": "query", 9756 // "type": "string" 9757 // }, 9758 // "shelf": { 9759 // "description": "ID of bookshelf to which to add a volume.", 9760 // "location": "path", 9761 // "required": true, 9762 // "type": "string" 9763 // }, 9764 // "source": { 9765 // "description": "String to identify the originator of this request.", 9766 // "location": "query", 9767 // "type": "string" 9768 // }, 9769 // "volumeId": { 9770 // "description": "ID of volume to add.", 9771 // "location": "query", 9772 // "required": true, 9773 // "type": "string" 9774 // } 9775 // }, 9776 // "path": "books/v1/mylibrary/bookshelves/{shelf}/addVolume", 9777 // "response": { 9778 // "$ref": "Empty" 9779 // }, 9780 // "scopes": [ 9781 // "https://www.googleapis.com/auth/books" 9782 // ] 9783 // } 9784 9785} 9786 9787// method id "books.mylibrary.bookshelves.clearVolumes": 9788 9789type MylibraryBookshelvesClearVolumesCall struct { 9790 s *Service 9791 shelf string 9792 urlParams_ gensupport.URLParams 9793 ctx_ context.Context 9794 header_ http.Header 9795} 9796 9797// ClearVolumes: Clears all volumes from a bookshelf. 9798func (r *MylibraryBookshelvesService) ClearVolumes(shelf string) *MylibraryBookshelvesClearVolumesCall { 9799 c := &MylibraryBookshelvesClearVolumesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9800 c.shelf = shelf 9801 return c 9802} 9803 9804// Source sets the optional parameter "source": String to identify the 9805// originator of this request. 9806func (c *MylibraryBookshelvesClearVolumesCall) Source(source string) *MylibraryBookshelvesClearVolumesCall { 9807 c.urlParams_.Set("source", source) 9808 return c 9809} 9810 9811// Fields allows partial responses to be retrieved. See 9812// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9813// for more information. 9814func (c *MylibraryBookshelvesClearVolumesCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesClearVolumesCall { 9815 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9816 return c 9817} 9818 9819// Context sets the context to be used in this call's Do method. Any 9820// pending HTTP request will be aborted if the provided context is 9821// canceled. 9822func (c *MylibraryBookshelvesClearVolumesCall) Context(ctx context.Context) *MylibraryBookshelvesClearVolumesCall { 9823 c.ctx_ = ctx 9824 return c 9825} 9826 9827// Header returns an http.Header that can be modified by the caller to 9828// add HTTP headers to the request. 9829func (c *MylibraryBookshelvesClearVolumesCall) Header() http.Header { 9830 if c.header_ == nil { 9831 c.header_ = make(http.Header) 9832 } 9833 return c.header_ 9834} 9835 9836func (c *MylibraryBookshelvesClearVolumesCall) doRequest(alt string) (*http.Response, error) { 9837 reqHeaders := make(http.Header) 9838 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9839 for k, v := range c.header_ { 9840 reqHeaders[k] = v 9841 } 9842 reqHeaders.Set("User-Agent", c.s.userAgent()) 9843 var body io.Reader = nil 9844 c.urlParams_.Set("alt", alt) 9845 c.urlParams_.Set("prettyPrint", "false") 9846 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/mylibrary/bookshelves/{shelf}/clearVolumes") 9847 urls += "?" + c.urlParams_.Encode() 9848 req, err := http.NewRequest("POST", urls, body) 9849 if err != nil { 9850 return nil, err 9851 } 9852 req.Header = reqHeaders 9853 googleapi.Expand(req.URL, map[string]string{ 9854 "shelf": c.shelf, 9855 }) 9856 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9857} 9858 9859// Do executes the "books.mylibrary.bookshelves.clearVolumes" call. 9860// Exactly one of *Empty or error will be non-nil. Any non-2xx status 9861// code is an error. Response headers are in either 9862// *Empty.ServerResponse.Header or (if a response was returned at all) 9863// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9864// check whether the returned error was because http.StatusNotModified 9865// was returned. 9866func (c *MylibraryBookshelvesClearVolumesCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 9867 gensupport.SetOptions(c.urlParams_, opts...) 9868 res, err := c.doRequest("json") 9869 if res != nil && res.StatusCode == http.StatusNotModified { 9870 if res.Body != nil { 9871 res.Body.Close() 9872 } 9873 return nil, &googleapi.Error{ 9874 Code: res.StatusCode, 9875 Header: res.Header, 9876 } 9877 } 9878 if err != nil { 9879 return nil, err 9880 } 9881 defer googleapi.CloseBody(res) 9882 if err := googleapi.CheckResponse(res); err != nil { 9883 return nil, err 9884 } 9885 ret := &Empty{ 9886 ServerResponse: googleapi.ServerResponse{ 9887 Header: res.Header, 9888 HTTPStatusCode: res.StatusCode, 9889 }, 9890 } 9891 target := &ret 9892 if err := gensupport.DecodeResponse(target, res); err != nil { 9893 return nil, err 9894 } 9895 return ret, nil 9896 // { 9897 // "description": "Clears all volumes from a bookshelf.", 9898 // "flatPath": "books/v1/mylibrary/bookshelves/{shelf}/clearVolumes", 9899 // "httpMethod": "POST", 9900 // "id": "books.mylibrary.bookshelves.clearVolumes", 9901 // "parameterOrder": [ 9902 // "shelf" 9903 // ], 9904 // "parameters": { 9905 // "shelf": { 9906 // "description": "ID of bookshelf from which to remove a volume.", 9907 // "location": "path", 9908 // "required": true, 9909 // "type": "string" 9910 // }, 9911 // "source": { 9912 // "description": "String to identify the originator of this request.", 9913 // "location": "query", 9914 // "type": "string" 9915 // } 9916 // }, 9917 // "path": "books/v1/mylibrary/bookshelves/{shelf}/clearVolumes", 9918 // "response": { 9919 // "$ref": "Empty" 9920 // }, 9921 // "scopes": [ 9922 // "https://www.googleapis.com/auth/books" 9923 // ] 9924 // } 9925 9926} 9927 9928// method id "books.mylibrary.bookshelves.get": 9929 9930type MylibraryBookshelvesGetCall struct { 9931 s *Service 9932 shelf string 9933 urlParams_ gensupport.URLParams 9934 ifNoneMatch_ string 9935 ctx_ context.Context 9936 header_ http.Header 9937} 9938 9939// Get: Retrieves metadata for a specific bookshelf belonging to the 9940// authenticated user. 9941func (r *MylibraryBookshelvesService) Get(shelf string) *MylibraryBookshelvesGetCall { 9942 c := &MylibraryBookshelvesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9943 c.shelf = shelf 9944 return c 9945} 9946 9947// Source sets the optional parameter "source": String to identify the 9948// originator of this request. 9949func (c *MylibraryBookshelvesGetCall) Source(source string) *MylibraryBookshelvesGetCall { 9950 c.urlParams_.Set("source", source) 9951 return c 9952} 9953 9954// Fields allows partial responses to be retrieved. See 9955// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9956// for more information. 9957func (c *MylibraryBookshelvesGetCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesGetCall { 9958 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9959 return c 9960} 9961 9962// IfNoneMatch sets the optional parameter which makes the operation 9963// fail if the object's ETag matches the given value. This is useful for 9964// getting updates only after the object has changed since the last 9965// request. Use googleapi.IsNotModified to check whether the response 9966// error from Do is the result of In-None-Match. 9967func (c *MylibraryBookshelvesGetCall) IfNoneMatch(entityTag string) *MylibraryBookshelvesGetCall { 9968 c.ifNoneMatch_ = entityTag 9969 return c 9970} 9971 9972// Context sets the context to be used in this call's Do method. Any 9973// pending HTTP request will be aborted if the provided context is 9974// canceled. 9975func (c *MylibraryBookshelvesGetCall) Context(ctx context.Context) *MylibraryBookshelvesGetCall { 9976 c.ctx_ = ctx 9977 return c 9978} 9979 9980// Header returns an http.Header that can be modified by the caller to 9981// add HTTP headers to the request. 9982func (c *MylibraryBookshelvesGetCall) Header() http.Header { 9983 if c.header_ == nil { 9984 c.header_ = make(http.Header) 9985 } 9986 return c.header_ 9987} 9988 9989func (c *MylibraryBookshelvesGetCall) doRequest(alt string) (*http.Response, error) { 9990 reqHeaders := make(http.Header) 9991 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 9992 for k, v := range c.header_ { 9993 reqHeaders[k] = v 9994 } 9995 reqHeaders.Set("User-Agent", c.s.userAgent()) 9996 if c.ifNoneMatch_ != "" { 9997 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9998 } 9999 var body io.Reader = nil 10000 c.urlParams_.Set("alt", alt) 10001 c.urlParams_.Set("prettyPrint", "false") 10002 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/mylibrary/bookshelves/{shelf}") 10003 urls += "?" + c.urlParams_.Encode() 10004 req, err := http.NewRequest("GET", urls, body) 10005 if err != nil { 10006 return nil, err 10007 } 10008 req.Header = reqHeaders 10009 googleapi.Expand(req.URL, map[string]string{ 10010 "shelf": c.shelf, 10011 }) 10012 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10013} 10014 10015// Do executes the "books.mylibrary.bookshelves.get" call. 10016// Exactly one of *Bookshelf or error will be non-nil. Any non-2xx 10017// status code is an error. Response headers are in either 10018// *Bookshelf.ServerResponse.Header or (if a response was returned at 10019// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10020// to check whether the returned error was because 10021// http.StatusNotModified was returned. 10022func (c *MylibraryBookshelvesGetCall) Do(opts ...googleapi.CallOption) (*Bookshelf, error) { 10023 gensupport.SetOptions(c.urlParams_, opts...) 10024 res, err := c.doRequest("json") 10025 if res != nil && res.StatusCode == http.StatusNotModified { 10026 if res.Body != nil { 10027 res.Body.Close() 10028 } 10029 return nil, &googleapi.Error{ 10030 Code: res.StatusCode, 10031 Header: res.Header, 10032 } 10033 } 10034 if err != nil { 10035 return nil, err 10036 } 10037 defer googleapi.CloseBody(res) 10038 if err := googleapi.CheckResponse(res); err != nil { 10039 return nil, err 10040 } 10041 ret := &Bookshelf{ 10042 ServerResponse: googleapi.ServerResponse{ 10043 Header: res.Header, 10044 HTTPStatusCode: res.StatusCode, 10045 }, 10046 } 10047 target := &ret 10048 if err := gensupport.DecodeResponse(target, res); err != nil { 10049 return nil, err 10050 } 10051 return ret, nil 10052 // { 10053 // "description": "Retrieves metadata for a specific bookshelf belonging to the authenticated user.", 10054 // "flatPath": "books/v1/mylibrary/bookshelves/{shelf}", 10055 // "httpMethod": "GET", 10056 // "id": "books.mylibrary.bookshelves.get", 10057 // "parameterOrder": [ 10058 // "shelf" 10059 // ], 10060 // "parameters": { 10061 // "shelf": { 10062 // "description": "ID of bookshelf to retrieve.", 10063 // "location": "path", 10064 // "required": true, 10065 // "type": "string" 10066 // }, 10067 // "source": { 10068 // "description": "String to identify the originator of this request.", 10069 // "location": "query", 10070 // "type": "string" 10071 // } 10072 // }, 10073 // "path": "books/v1/mylibrary/bookshelves/{shelf}", 10074 // "response": { 10075 // "$ref": "Bookshelf" 10076 // }, 10077 // "scopes": [ 10078 // "https://www.googleapis.com/auth/books" 10079 // ] 10080 // } 10081 10082} 10083 10084// method id "books.mylibrary.bookshelves.list": 10085 10086type MylibraryBookshelvesListCall struct { 10087 s *Service 10088 urlParams_ gensupport.URLParams 10089 ifNoneMatch_ string 10090 ctx_ context.Context 10091 header_ http.Header 10092} 10093 10094// List: Retrieves a list of bookshelves belonging to the authenticated 10095// user. 10096func (r *MylibraryBookshelvesService) List() *MylibraryBookshelvesListCall { 10097 c := &MylibraryBookshelvesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10098 return c 10099} 10100 10101// Source sets the optional parameter "source": String to identify the 10102// originator of this request. 10103func (c *MylibraryBookshelvesListCall) Source(source string) *MylibraryBookshelvesListCall { 10104 c.urlParams_.Set("source", source) 10105 return c 10106} 10107 10108// Fields allows partial responses to be retrieved. See 10109// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10110// for more information. 10111func (c *MylibraryBookshelvesListCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesListCall { 10112 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10113 return c 10114} 10115 10116// IfNoneMatch sets the optional parameter which makes the operation 10117// fail if the object's ETag matches the given value. This is useful for 10118// getting updates only after the object has changed since the last 10119// request. Use googleapi.IsNotModified to check whether the response 10120// error from Do is the result of In-None-Match. 10121func (c *MylibraryBookshelvesListCall) IfNoneMatch(entityTag string) *MylibraryBookshelvesListCall { 10122 c.ifNoneMatch_ = entityTag 10123 return c 10124} 10125 10126// Context sets the context to be used in this call's Do method. Any 10127// pending HTTP request will be aborted if the provided context is 10128// canceled. 10129func (c *MylibraryBookshelvesListCall) Context(ctx context.Context) *MylibraryBookshelvesListCall { 10130 c.ctx_ = ctx 10131 return c 10132} 10133 10134// Header returns an http.Header that can be modified by the caller to 10135// add HTTP headers to the request. 10136func (c *MylibraryBookshelvesListCall) Header() http.Header { 10137 if c.header_ == nil { 10138 c.header_ = make(http.Header) 10139 } 10140 return c.header_ 10141} 10142 10143func (c *MylibraryBookshelvesListCall) doRequest(alt string) (*http.Response, error) { 10144 reqHeaders := make(http.Header) 10145 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10146 for k, v := range c.header_ { 10147 reqHeaders[k] = v 10148 } 10149 reqHeaders.Set("User-Agent", c.s.userAgent()) 10150 if c.ifNoneMatch_ != "" { 10151 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10152 } 10153 var body io.Reader = nil 10154 c.urlParams_.Set("alt", alt) 10155 c.urlParams_.Set("prettyPrint", "false") 10156 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/mylibrary/bookshelves") 10157 urls += "?" + c.urlParams_.Encode() 10158 req, err := http.NewRequest("GET", urls, body) 10159 if err != nil { 10160 return nil, err 10161 } 10162 req.Header = reqHeaders 10163 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10164} 10165 10166// Do executes the "books.mylibrary.bookshelves.list" call. 10167// Exactly one of *Bookshelves or error will be non-nil. Any non-2xx 10168// status code is an error. Response headers are in either 10169// *Bookshelves.ServerResponse.Header or (if a response was returned at 10170// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10171// to check whether the returned error was because 10172// http.StatusNotModified was returned. 10173func (c *MylibraryBookshelvesListCall) Do(opts ...googleapi.CallOption) (*Bookshelves, error) { 10174 gensupport.SetOptions(c.urlParams_, opts...) 10175 res, err := c.doRequest("json") 10176 if res != nil && res.StatusCode == http.StatusNotModified { 10177 if res.Body != nil { 10178 res.Body.Close() 10179 } 10180 return nil, &googleapi.Error{ 10181 Code: res.StatusCode, 10182 Header: res.Header, 10183 } 10184 } 10185 if err != nil { 10186 return nil, err 10187 } 10188 defer googleapi.CloseBody(res) 10189 if err := googleapi.CheckResponse(res); err != nil { 10190 return nil, err 10191 } 10192 ret := &Bookshelves{ 10193 ServerResponse: googleapi.ServerResponse{ 10194 Header: res.Header, 10195 HTTPStatusCode: res.StatusCode, 10196 }, 10197 } 10198 target := &ret 10199 if err := gensupport.DecodeResponse(target, res); err != nil { 10200 return nil, err 10201 } 10202 return ret, nil 10203 // { 10204 // "description": "Retrieves a list of bookshelves belonging to the authenticated user.", 10205 // "flatPath": "books/v1/mylibrary/bookshelves", 10206 // "httpMethod": "GET", 10207 // "id": "books.mylibrary.bookshelves.list", 10208 // "parameterOrder": [], 10209 // "parameters": { 10210 // "source": { 10211 // "description": "String to identify the originator of this request.", 10212 // "location": "query", 10213 // "type": "string" 10214 // } 10215 // }, 10216 // "path": "books/v1/mylibrary/bookshelves", 10217 // "response": { 10218 // "$ref": "Bookshelves" 10219 // }, 10220 // "scopes": [ 10221 // "https://www.googleapis.com/auth/books" 10222 // ] 10223 // } 10224 10225} 10226 10227// method id "books.mylibrary.bookshelves.moveVolume": 10228 10229type MylibraryBookshelvesMoveVolumeCall struct { 10230 s *Service 10231 shelf string 10232 urlParams_ gensupport.URLParams 10233 ctx_ context.Context 10234 header_ http.Header 10235} 10236 10237// MoveVolume: Moves a volume within a bookshelf. 10238func (r *MylibraryBookshelvesService) MoveVolume(shelf string, volumeId string, volumePosition int64) *MylibraryBookshelvesMoveVolumeCall { 10239 c := &MylibraryBookshelvesMoveVolumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10240 c.shelf = shelf 10241 c.urlParams_.Set("volumeId", volumeId) 10242 c.urlParams_.Set("volumePosition", fmt.Sprint(volumePosition)) 10243 return c 10244} 10245 10246// Source sets the optional parameter "source": String to identify the 10247// originator of this request. 10248func (c *MylibraryBookshelvesMoveVolumeCall) Source(source string) *MylibraryBookshelvesMoveVolumeCall { 10249 c.urlParams_.Set("source", source) 10250 return c 10251} 10252 10253// Fields allows partial responses to be retrieved. See 10254// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10255// for more information. 10256func (c *MylibraryBookshelvesMoveVolumeCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesMoveVolumeCall { 10257 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10258 return c 10259} 10260 10261// Context sets the context to be used in this call's Do method. Any 10262// pending HTTP request will be aborted if the provided context is 10263// canceled. 10264func (c *MylibraryBookshelvesMoveVolumeCall) Context(ctx context.Context) *MylibraryBookshelvesMoveVolumeCall { 10265 c.ctx_ = ctx 10266 return c 10267} 10268 10269// Header returns an http.Header that can be modified by the caller to 10270// add HTTP headers to the request. 10271func (c *MylibraryBookshelvesMoveVolumeCall) Header() http.Header { 10272 if c.header_ == nil { 10273 c.header_ = make(http.Header) 10274 } 10275 return c.header_ 10276} 10277 10278func (c *MylibraryBookshelvesMoveVolumeCall) doRequest(alt string) (*http.Response, error) { 10279 reqHeaders := make(http.Header) 10280 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10281 for k, v := range c.header_ { 10282 reqHeaders[k] = v 10283 } 10284 reqHeaders.Set("User-Agent", c.s.userAgent()) 10285 var body io.Reader = nil 10286 c.urlParams_.Set("alt", alt) 10287 c.urlParams_.Set("prettyPrint", "false") 10288 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/mylibrary/bookshelves/{shelf}/moveVolume") 10289 urls += "?" + c.urlParams_.Encode() 10290 req, err := http.NewRequest("POST", urls, body) 10291 if err != nil { 10292 return nil, err 10293 } 10294 req.Header = reqHeaders 10295 googleapi.Expand(req.URL, map[string]string{ 10296 "shelf": c.shelf, 10297 }) 10298 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10299} 10300 10301// Do executes the "books.mylibrary.bookshelves.moveVolume" call. 10302// Exactly one of *Empty or error will be non-nil. Any non-2xx status 10303// code is an error. Response headers are in either 10304// *Empty.ServerResponse.Header or (if a response was returned at all) 10305// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10306// check whether the returned error was because http.StatusNotModified 10307// was returned. 10308func (c *MylibraryBookshelvesMoveVolumeCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 10309 gensupport.SetOptions(c.urlParams_, opts...) 10310 res, err := c.doRequest("json") 10311 if res != nil && res.StatusCode == http.StatusNotModified { 10312 if res.Body != nil { 10313 res.Body.Close() 10314 } 10315 return nil, &googleapi.Error{ 10316 Code: res.StatusCode, 10317 Header: res.Header, 10318 } 10319 } 10320 if err != nil { 10321 return nil, err 10322 } 10323 defer googleapi.CloseBody(res) 10324 if err := googleapi.CheckResponse(res); err != nil { 10325 return nil, err 10326 } 10327 ret := &Empty{ 10328 ServerResponse: googleapi.ServerResponse{ 10329 Header: res.Header, 10330 HTTPStatusCode: res.StatusCode, 10331 }, 10332 } 10333 target := &ret 10334 if err := gensupport.DecodeResponse(target, res); err != nil { 10335 return nil, err 10336 } 10337 return ret, nil 10338 // { 10339 // "description": "Moves a volume within a bookshelf.", 10340 // "flatPath": "books/v1/mylibrary/bookshelves/{shelf}/moveVolume", 10341 // "httpMethod": "POST", 10342 // "id": "books.mylibrary.bookshelves.moveVolume", 10343 // "parameterOrder": [ 10344 // "shelf", 10345 // "volumeId", 10346 // "volumePosition" 10347 // ], 10348 // "parameters": { 10349 // "shelf": { 10350 // "description": "ID of bookshelf with the volume.", 10351 // "location": "path", 10352 // "required": true, 10353 // "type": "string" 10354 // }, 10355 // "source": { 10356 // "description": "String to identify the originator of this request.", 10357 // "location": "query", 10358 // "type": "string" 10359 // }, 10360 // "volumeId": { 10361 // "description": "ID of volume to move.", 10362 // "location": "query", 10363 // "required": true, 10364 // "type": "string" 10365 // }, 10366 // "volumePosition": { 10367 // "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.)", 10368 // "format": "int32", 10369 // "location": "query", 10370 // "required": true, 10371 // "type": "integer" 10372 // } 10373 // }, 10374 // "path": "books/v1/mylibrary/bookshelves/{shelf}/moveVolume", 10375 // "response": { 10376 // "$ref": "Empty" 10377 // }, 10378 // "scopes": [ 10379 // "https://www.googleapis.com/auth/books" 10380 // ] 10381 // } 10382 10383} 10384 10385// method id "books.mylibrary.bookshelves.removeVolume": 10386 10387type MylibraryBookshelvesRemoveVolumeCall struct { 10388 s *Service 10389 shelf string 10390 urlParams_ gensupport.URLParams 10391 ctx_ context.Context 10392 header_ http.Header 10393} 10394 10395// RemoveVolume: Removes a volume from a bookshelf. 10396func (r *MylibraryBookshelvesService) RemoveVolume(shelf string, volumeId string) *MylibraryBookshelvesRemoveVolumeCall { 10397 c := &MylibraryBookshelvesRemoveVolumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10398 c.shelf = shelf 10399 c.urlParams_.Set("volumeId", volumeId) 10400 return c 10401} 10402 10403// Reason sets the optional parameter "reason": The reason for which the 10404// book is removed from the library. 10405// 10406// Possible values: 10407// "REASON_UNDEFINED" 10408// "ONBOARDING" - Samples removed from the Onboarding flow. 10409func (c *MylibraryBookshelvesRemoveVolumeCall) Reason(reason string) *MylibraryBookshelvesRemoveVolumeCall { 10410 c.urlParams_.Set("reason", reason) 10411 return c 10412} 10413 10414// Source sets the optional parameter "source": String to identify the 10415// originator of this request. 10416func (c *MylibraryBookshelvesRemoveVolumeCall) Source(source string) *MylibraryBookshelvesRemoveVolumeCall { 10417 c.urlParams_.Set("source", source) 10418 return c 10419} 10420 10421// Fields allows partial responses to be retrieved. See 10422// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10423// for more information. 10424func (c *MylibraryBookshelvesRemoveVolumeCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesRemoveVolumeCall { 10425 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10426 return c 10427} 10428 10429// Context sets the context to be used in this call's Do method. Any 10430// pending HTTP request will be aborted if the provided context is 10431// canceled. 10432func (c *MylibraryBookshelvesRemoveVolumeCall) Context(ctx context.Context) *MylibraryBookshelvesRemoveVolumeCall { 10433 c.ctx_ = ctx 10434 return c 10435} 10436 10437// Header returns an http.Header that can be modified by the caller to 10438// add HTTP headers to the request. 10439func (c *MylibraryBookshelvesRemoveVolumeCall) Header() http.Header { 10440 if c.header_ == nil { 10441 c.header_ = make(http.Header) 10442 } 10443 return c.header_ 10444} 10445 10446func (c *MylibraryBookshelvesRemoveVolumeCall) doRequest(alt string) (*http.Response, error) { 10447 reqHeaders := make(http.Header) 10448 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10449 for k, v := range c.header_ { 10450 reqHeaders[k] = v 10451 } 10452 reqHeaders.Set("User-Agent", c.s.userAgent()) 10453 var body io.Reader = nil 10454 c.urlParams_.Set("alt", alt) 10455 c.urlParams_.Set("prettyPrint", "false") 10456 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/mylibrary/bookshelves/{shelf}/removeVolume") 10457 urls += "?" + c.urlParams_.Encode() 10458 req, err := http.NewRequest("POST", urls, body) 10459 if err != nil { 10460 return nil, err 10461 } 10462 req.Header = reqHeaders 10463 googleapi.Expand(req.URL, map[string]string{ 10464 "shelf": c.shelf, 10465 }) 10466 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10467} 10468 10469// Do executes the "books.mylibrary.bookshelves.removeVolume" call. 10470// Exactly one of *Empty or error will be non-nil. Any non-2xx status 10471// code is an error. Response headers are in either 10472// *Empty.ServerResponse.Header or (if a response was returned at all) 10473// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10474// check whether the returned error was because http.StatusNotModified 10475// was returned. 10476func (c *MylibraryBookshelvesRemoveVolumeCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 10477 gensupport.SetOptions(c.urlParams_, opts...) 10478 res, err := c.doRequest("json") 10479 if res != nil && res.StatusCode == http.StatusNotModified { 10480 if res.Body != nil { 10481 res.Body.Close() 10482 } 10483 return nil, &googleapi.Error{ 10484 Code: res.StatusCode, 10485 Header: res.Header, 10486 } 10487 } 10488 if err != nil { 10489 return nil, err 10490 } 10491 defer googleapi.CloseBody(res) 10492 if err := googleapi.CheckResponse(res); err != nil { 10493 return nil, err 10494 } 10495 ret := &Empty{ 10496 ServerResponse: googleapi.ServerResponse{ 10497 Header: res.Header, 10498 HTTPStatusCode: res.StatusCode, 10499 }, 10500 } 10501 target := &ret 10502 if err := gensupport.DecodeResponse(target, res); err != nil { 10503 return nil, err 10504 } 10505 return ret, nil 10506 // { 10507 // "description": "Removes a volume from a bookshelf.", 10508 // "flatPath": "books/v1/mylibrary/bookshelves/{shelf}/removeVolume", 10509 // "httpMethod": "POST", 10510 // "id": "books.mylibrary.bookshelves.removeVolume", 10511 // "parameterOrder": [ 10512 // "shelf", 10513 // "volumeId" 10514 // ], 10515 // "parameters": { 10516 // "reason": { 10517 // "description": "The reason for which the book is removed from the library.", 10518 // "enum": [ 10519 // "REASON_UNDEFINED", 10520 // "ONBOARDING" 10521 // ], 10522 // "enumDescriptions": [ 10523 // "", 10524 // "Samples removed from the Onboarding flow." 10525 // ], 10526 // "location": "query", 10527 // "type": "string" 10528 // }, 10529 // "shelf": { 10530 // "description": "ID of bookshelf from which to remove a volume.", 10531 // "location": "path", 10532 // "required": true, 10533 // "type": "string" 10534 // }, 10535 // "source": { 10536 // "description": "String to identify the originator of this request.", 10537 // "location": "query", 10538 // "type": "string" 10539 // }, 10540 // "volumeId": { 10541 // "description": "ID of volume to remove.", 10542 // "location": "query", 10543 // "required": true, 10544 // "type": "string" 10545 // } 10546 // }, 10547 // "path": "books/v1/mylibrary/bookshelves/{shelf}/removeVolume", 10548 // "response": { 10549 // "$ref": "Empty" 10550 // }, 10551 // "scopes": [ 10552 // "https://www.googleapis.com/auth/books" 10553 // ] 10554 // } 10555 10556} 10557 10558// method id "books.mylibrary.bookshelves.volumes.list": 10559 10560type MylibraryBookshelvesVolumesListCall struct { 10561 s *Service 10562 shelf string 10563 urlParams_ gensupport.URLParams 10564 ifNoneMatch_ string 10565 ctx_ context.Context 10566 header_ http.Header 10567} 10568 10569// List: Gets volume information for volumes on a bookshelf. 10570func (r *MylibraryBookshelvesVolumesService) List(shelf string) *MylibraryBookshelvesVolumesListCall { 10571 c := &MylibraryBookshelvesVolumesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10572 c.shelf = shelf 10573 return c 10574} 10575 10576// Country sets the optional parameter "country": ISO-3166-1 code to 10577// override the IP-based location. 10578func (c *MylibraryBookshelvesVolumesListCall) Country(country string) *MylibraryBookshelvesVolumesListCall { 10579 c.urlParams_.Set("country", country) 10580 return c 10581} 10582 10583// MaxResults sets the optional parameter "maxResults": Maximum number 10584// of results to return 10585func (c *MylibraryBookshelvesVolumesListCall) MaxResults(maxResults int64) *MylibraryBookshelvesVolumesListCall { 10586 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 10587 return c 10588} 10589 10590// Projection sets the optional parameter "projection": Restrict 10591// information returned to a set of selected fields. 10592// 10593// Possible values: 10594// "PROJECTION_UNDEFINED" 10595// "FULL" - Includes all volume data. 10596// "LITE" - Includes a subset of fields in volumeInfo and accessInfo. 10597func (c *MylibraryBookshelvesVolumesListCall) Projection(projection string) *MylibraryBookshelvesVolumesListCall { 10598 c.urlParams_.Set("projection", projection) 10599 return c 10600} 10601 10602// Q sets the optional parameter "q": Full-text search query string in 10603// this bookshelf. 10604func (c *MylibraryBookshelvesVolumesListCall) Q(q string) *MylibraryBookshelvesVolumesListCall { 10605 c.urlParams_.Set("q", q) 10606 return c 10607} 10608 10609// ShowPreorders sets the optional parameter "showPreorders": Set to 10610// true to show pre-ordered books. Defaults to false. 10611func (c *MylibraryBookshelvesVolumesListCall) ShowPreorders(showPreorders bool) *MylibraryBookshelvesVolumesListCall { 10612 c.urlParams_.Set("showPreorders", fmt.Sprint(showPreorders)) 10613 return c 10614} 10615 10616// Source sets the optional parameter "source": String to identify the 10617// originator of this request. 10618func (c *MylibraryBookshelvesVolumesListCall) Source(source string) *MylibraryBookshelvesVolumesListCall { 10619 c.urlParams_.Set("source", source) 10620 return c 10621} 10622 10623// StartIndex sets the optional parameter "startIndex": Index of the 10624// first element to return (starts at 0) 10625func (c *MylibraryBookshelvesVolumesListCall) StartIndex(startIndex int64) *MylibraryBookshelvesVolumesListCall { 10626 c.urlParams_.Set("startIndex", fmt.Sprint(startIndex)) 10627 return c 10628} 10629 10630// Fields allows partial responses to be retrieved. See 10631// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10632// for more information. 10633func (c *MylibraryBookshelvesVolumesListCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesVolumesListCall { 10634 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10635 return c 10636} 10637 10638// IfNoneMatch sets the optional parameter which makes the operation 10639// fail if the object's ETag matches the given value. This is useful for 10640// getting updates only after the object has changed since the last 10641// request. Use googleapi.IsNotModified to check whether the response 10642// error from Do is the result of In-None-Match. 10643func (c *MylibraryBookshelvesVolumesListCall) IfNoneMatch(entityTag string) *MylibraryBookshelvesVolumesListCall { 10644 c.ifNoneMatch_ = entityTag 10645 return c 10646} 10647 10648// Context sets the context to be used in this call's Do method. Any 10649// pending HTTP request will be aborted if the provided context is 10650// canceled. 10651func (c *MylibraryBookshelvesVolumesListCall) Context(ctx context.Context) *MylibraryBookshelvesVolumesListCall { 10652 c.ctx_ = ctx 10653 return c 10654} 10655 10656// Header returns an http.Header that can be modified by the caller to 10657// add HTTP headers to the request. 10658func (c *MylibraryBookshelvesVolumesListCall) Header() http.Header { 10659 if c.header_ == nil { 10660 c.header_ = make(http.Header) 10661 } 10662 return c.header_ 10663} 10664 10665func (c *MylibraryBookshelvesVolumesListCall) doRequest(alt string) (*http.Response, error) { 10666 reqHeaders := make(http.Header) 10667 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10668 for k, v := range c.header_ { 10669 reqHeaders[k] = v 10670 } 10671 reqHeaders.Set("User-Agent", c.s.userAgent()) 10672 if c.ifNoneMatch_ != "" { 10673 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10674 } 10675 var body io.Reader = nil 10676 c.urlParams_.Set("alt", alt) 10677 c.urlParams_.Set("prettyPrint", "false") 10678 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/mylibrary/bookshelves/{shelf}/volumes") 10679 urls += "?" + c.urlParams_.Encode() 10680 req, err := http.NewRequest("GET", urls, body) 10681 if err != nil { 10682 return nil, err 10683 } 10684 req.Header = reqHeaders 10685 googleapi.Expand(req.URL, map[string]string{ 10686 "shelf": c.shelf, 10687 }) 10688 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10689} 10690 10691// Do executes the "books.mylibrary.bookshelves.volumes.list" call. 10692// Exactly one of *Volumes or error will be non-nil. Any non-2xx status 10693// code is an error. Response headers are in either 10694// *Volumes.ServerResponse.Header or (if a response was returned at all) 10695// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10696// check whether the returned error was because http.StatusNotModified 10697// was returned. 10698func (c *MylibraryBookshelvesVolumesListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) { 10699 gensupport.SetOptions(c.urlParams_, opts...) 10700 res, err := c.doRequest("json") 10701 if res != nil && res.StatusCode == http.StatusNotModified { 10702 if res.Body != nil { 10703 res.Body.Close() 10704 } 10705 return nil, &googleapi.Error{ 10706 Code: res.StatusCode, 10707 Header: res.Header, 10708 } 10709 } 10710 if err != nil { 10711 return nil, err 10712 } 10713 defer googleapi.CloseBody(res) 10714 if err := googleapi.CheckResponse(res); err != nil { 10715 return nil, err 10716 } 10717 ret := &Volumes{ 10718 ServerResponse: googleapi.ServerResponse{ 10719 Header: res.Header, 10720 HTTPStatusCode: res.StatusCode, 10721 }, 10722 } 10723 target := &ret 10724 if err := gensupport.DecodeResponse(target, res); err != nil { 10725 return nil, err 10726 } 10727 return ret, nil 10728 // { 10729 // "description": "Gets volume information for volumes on a bookshelf.", 10730 // "flatPath": "books/v1/mylibrary/bookshelves/{shelf}/volumes", 10731 // "httpMethod": "GET", 10732 // "id": "books.mylibrary.bookshelves.volumes.list", 10733 // "parameterOrder": [ 10734 // "shelf" 10735 // ], 10736 // "parameters": { 10737 // "country": { 10738 // "description": "ISO-3166-1 code to override the IP-based location.", 10739 // "location": "query", 10740 // "type": "string" 10741 // }, 10742 // "maxResults": { 10743 // "description": "Maximum number of results to return", 10744 // "format": "uint32", 10745 // "location": "query", 10746 // "minimum": "0", 10747 // "type": "integer" 10748 // }, 10749 // "projection": { 10750 // "description": "Restrict information returned to a set of selected fields.", 10751 // "enum": [ 10752 // "PROJECTION_UNDEFINED", 10753 // "FULL", 10754 // "LITE" 10755 // ], 10756 // "enumDescriptions": [ 10757 // "", 10758 // "Includes all volume data.", 10759 // "Includes a subset of fields in volumeInfo and accessInfo." 10760 // ], 10761 // "location": "query", 10762 // "type": "string" 10763 // }, 10764 // "q": { 10765 // "description": "Full-text search query string in this bookshelf.", 10766 // "location": "query", 10767 // "type": "string" 10768 // }, 10769 // "shelf": { 10770 // "description": "The bookshelf ID or name retrieve volumes for.", 10771 // "location": "path", 10772 // "required": true, 10773 // "type": "string" 10774 // }, 10775 // "showPreorders": { 10776 // "description": "Set to true to show pre-ordered books. Defaults to false.", 10777 // "location": "query", 10778 // "type": "boolean" 10779 // }, 10780 // "source": { 10781 // "description": "String to identify the originator of this request.", 10782 // "location": "query", 10783 // "type": "string" 10784 // }, 10785 // "startIndex": { 10786 // "description": "Index of the first element to return (starts at 0)", 10787 // "format": "uint32", 10788 // "location": "query", 10789 // "minimum": "0", 10790 // "type": "integer" 10791 // } 10792 // }, 10793 // "path": "books/v1/mylibrary/bookshelves/{shelf}/volumes", 10794 // "response": { 10795 // "$ref": "Volumes" 10796 // }, 10797 // "scopes": [ 10798 // "https://www.googleapis.com/auth/books" 10799 // ] 10800 // } 10801 10802} 10803 10804// method id "books.mylibrary.readingpositions.get": 10805 10806type MylibraryReadingpositionsGetCall struct { 10807 s *Service 10808 volumeId string 10809 urlParams_ gensupport.URLParams 10810 ifNoneMatch_ string 10811 ctx_ context.Context 10812 header_ http.Header 10813} 10814 10815// Get: Retrieves my reading position information for a volume. 10816func (r *MylibraryReadingpositionsService) Get(volumeId string) *MylibraryReadingpositionsGetCall { 10817 c := &MylibraryReadingpositionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10818 c.volumeId = volumeId 10819 return c 10820} 10821 10822// ContentVersion sets the optional parameter "contentVersion": Volume 10823// content version for which this reading position is requested. 10824func (c *MylibraryReadingpositionsGetCall) ContentVersion(contentVersion string) *MylibraryReadingpositionsGetCall { 10825 c.urlParams_.Set("contentVersion", contentVersion) 10826 return c 10827} 10828 10829// Source sets the optional parameter "source": String to identify the 10830// originator of this request. 10831func (c *MylibraryReadingpositionsGetCall) Source(source string) *MylibraryReadingpositionsGetCall { 10832 c.urlParams_.Set("source", source) 10833 return c 10834} 10835 10836// Fields allows partial responses to be retrieved. See 10837// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10838// for more information. 10839func (c *MylibraryReadingpositionsGetCall) Fields(s ...googleapi.Field) *MylibraryReadingpositionsGetCall { 10840 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10841 return c 10842} 10843 10844// IfNoneMatch sets the optional parameter which makes the operation 10845// fail if the object's ETag matches the given value. This is useful for 10846// getting updates only after the object has changed since the last 10847// request. Use googleapi.IsNotModified to check whether the response 10848// error from Do is the result of In-None-Match. 10849func (c *MylibraryReadingpositionsGetCall) IfNoneMatch(entityTag string) *MylibraryReadingpositionsGetCall { 10850 c.ifNoneMatch_ = entityTag 10851 return c 10852} 10853 10854// Context sets the context to be used in this call's Do method. Any 10855// pending HTTP request will be aborted if the provided context is 10856// canceled. 10857func (c *MylibraryReadingpositionsGetCall) Context(ctx context.Context) *MylibraryReadingpositionsGetCall { 10858 c.ctx_ = ctx 10859 return c 10860} 10861 10862// Header returns an http.Header that can be modified by the caller to 10863// add HTTP headers to the request. 10864func (c *MylibraryReadingpositionsGetCall) Header() http.Header { 10865 if c.header_ == nil { 10866 c.header_ = make(http.Header) 10867 } 10868 return c.header_ 10869} 10870 10871func (c *MylibraryReadingpositionsGetCall) doRequest(alt string) (*http.Response, error) { 10872 reqHeaders := make(http.Header) 10873 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 10874 for k, v := range c.header_ { 10875 reqHeaders[k] = v 10876 } 10877 reqHeaders.Set("User-Agent", c.s.userAgent()) 10878 if c.ifNoneMatch_ != "" { 10879 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10880 } 10881 var body io.Reader = nil 10882 c.urlParams_.Set("alt", alt) 10883 c.urlParams_.Set("prettyPrint", "false") 10884 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/mylibrary/readingpositions/{volumeId}") 10885 urls += "?" + c.urlParams_.Encode() 10886 req, err := http.NewRequest("GET", urls, body) 10887 if err != nil { 10888 return nil, err 10889 } 10890 req.Header = reqHeaders 10891 googleapi.Expand(req.URL, map[string]string{ 10892 "volumeId": c.volumeId, 10893 }) 10894 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10895} 10896 10897// Do executes the "books.mylibrary.readingpositions.get" call. 10898// Exactly one of *ReadingPosition or error will be non-nil. Any non-2xx 10899// status code is an error. Response headers are in either 10900// *ReadingPosition.ServerResponse.Header or (if a response was returned 10901// at all) in error.(*googleapi.Error).Header. Use 10902// googleapi.IsNotModified to check whether the returned error was 10903// because http.StatusNotModified was returned. 10904func (c *MylibraryReadingpositionsGetCall) Do(opts ...googleapi.CallOption) (*ReadingPosition, error) { 10905 gensupport.SetOptions(c.urlParams_, opts...) 10906 res, err := c.doRequest("json") 10907 if res != nil && res.StatusCode == http.StatusNotModified { 10908 if res.Body != nil { 10909 res.Body.Close() 10910 } 10911 return nil, &googleapi.Error{ 10912 Code: res.StatusCode, 10913 Header: res.Header, 10914 } 10915 } 10916 if err != nil { 10917 return nil, err 10918 } 10919 defer googleapi.CloseBody(res) 10920 if err := googleapi.CheckResponse(res); err != nil { 10921 return nil, err 10922 } 10923 ret := &ReadingPosition{ 10924 ServerResponse: googleapi.ServerResponse{ 10925 Header: res.Header, 10926 HTTPStatusCode: res.StatusCode, 10927 }, 10928 } 10929 target := &ret 10930 if err := gensupport.DecodeResponse(target, res); err != nil { 10931 return nil, err 10932 } 10933 return ret, nil 10934 // { 10935 // "description": "Retrieves my reading position information for a volume.", 10936 // "flatPath": "books/v1/mylibrary/readingpositions/{volumeId}", 10937 // "httpMethod": "GET", 10938 // "id": "books.mylibrary.readingpositions.get", 10939 // "parameterOrder": [ 10940 // "volumeId" 10941 // ], 10942 // "parameters": { 10943 // "contentVersion": { 10944 // "description": "Volume content version for which this reading position is requested.", 10945 // "location": "query", 10946 // "type": "string" 10947 // }, 10948 // "source": { 10949 // "description": "String to identify the originator of this request.", 10950 // "location": "query", 10951 // "type": "string" 10952 // }, 10953 // "volumeId": { 10954 // "description": "ID of volume for which to retrieve a reading position.", 10955 // "location": "path", 10956 // "required": true, 10957 // "type": "string" 10958 // } 10959 // }, 10960 // "path": "books/v1/mylibrary/readingpositions/{volumeId}", 10961 // "response": { 10962 // "$ref": "ReadingPosition" 10963 // }, 10964 // "scopes": [ 10965 // "https://www.googleapis.com/auth/books" 10966 // ] 10967 // } 10968 10969} 10970 10971// method id "books.mylibrary.readingpositions.setPosition": 10972 10973type MylibraryReadingpositionsSetPositionCall struct { 10974 s *Service 10975 volumeId string 10976 urlParams_ gensupport.URLParams 10977 ctx_ context.Context 10978 header_ http.Header 10979} 10980 10981// SetPosition: Sets my reading position information for a volume. 10982func (r *MylibraryReadingpositionsService) SetPosition(volumeId string, position string, timestamp string) *MylibraryReadingpositionsSetPositionCall { 10983 c := &MylibraryReadingpositionsSetPositionCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10984 c.volumeId = volumeId 10985 c.urlParams_.Set("position", position) 10986 c.urlParams_.Set("timestamp", timestamp) 10987 return c 10988} 10989 10990// Action sets the optional parameter "action": Action that caused this 10991// reading position to be set. 10992// 10993// Possible values: 10994// "ACTION_UNDEFINED" 10995// "bookmark" - User chose bookmark within volume. 10996// "chapter" - User selected chapter from list. 10997// "next-page" - Next page event. 10998// "prev-page" - Previous page event. 10999// "scroll" - User navigated to page. 11000// "search" - User chose search results within volume. 11001func (c *MylibraryReadingpositionsSetPositionCall) Action(action string) *MylibraryReadingpositionsSetPositionCall { 11002 c.urlParams_.Set("action", action) 11003 return c 11004} 11005 11006// ContentVersion sets the optional parameter "contentVersion": Volume 11007// content version for which this reading position applies. 11008func (c *MylibraryReadingpositionsSetPositionCall) ContentVersion(contentVersion string) *MylibraryReadingpositionsSetPositionCall { 11009 c.urlParams_.Set("contentVersion", contentVersion) 11010 return c 11011} 11012 11013// DeviceCookie sets the optional parameter "deviceCookie": Random 11014// persistent device cookie optional on set position. 11015func (c *MylibraryReadingpositionsSetPositionCall) DeviceCookie(deviceCookie string) *MylibraryReadingpositionsSetPositionCall { 11016 c.urlParams_.Set("deviceCookie", deviceCookie) 11017 return c 11018} 11019 11020// Source sets the optional parameter "source": String to identify the 11021// originator of this request. 11022func (c *MylibraryReadingpositionsSetPositionCall) Source(source string) *MylibraryReadingpositionsSetPositionCall { 11023 c.urlParams_.Set("source", source) 11024 return c 11025} 11026 11027// Fields allows partial responses to be retrieved. See 11028// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11029// for more information. 11030func (c *MylibraryReadingpositionsSetPositionCall) Fields(s ...googleapi.Field) *MylibraryReadingpositionsSetPositionCall { 11031 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11032 return c 11033} 11034 11035// Context sets the context to be used in this call's Do method. Any 11036// pending HTTP request will be aborted if the provided context is 11037// canceled. 11038func (c *MylibraryReadingpositionsSetPositionCall) Context(ctx context.Context) *MylibraryReadingpositionsSetPositionCall { 11039 c.ctx_ = ctx 11040 return c 11041} 11042 11043// Header returns an http.Header that can be modified by the caller to 11044// add HTTP headers to the request. 11045func (c *MylibraryReadingpositionsSetPositionCall) Header() http.Header { 11046 if c.header_ == nil { 11047 c.header_ = make(http.Header) 11048 } 11049 return c.header_ 11050} 11051 11052func (c *MylibraryReadingpositionsSetPositionCall) doRequest(alt string) (*http.Response, error) { 11053 reqHeaders := make(http.Header) 11054 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11055 for k, v := range c.header_ { 11056 reqHeaders[k] = v 11057 } 11058 reqHeaders.Set("User-Agent", c.s.userAgent()) 11059 var body io.Reader = nil 11060 c.urlParams_.Set("alt", alt) 11061 c.urlParams_.Set("prettyPrint", "false") 11062 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/mylibrary/readingpositions/{volumeId}/setPosition") 11063 urls += "?" + c.urlParams_.Encode() 11064 req, err := http.NewRequest("POST", urls, body) 11065 if err != nil { 11066 return nil, err 11067 } 11068 req.Header = reqHeaders 11069 googleapi.Expand(req.URL, map[string]string{ 11070 "volumeId": c.volumeId, 11071 }) 11072 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11073} 11074 11075// Do executes the "books.mylibrary.readingpositions.setPosition" call. 11076// Exactly one of *Empty or error will be non-nil. Any non-2xx status 11077// code is an error. Response headers are in either 11078// *Empty.ServerResponse.Header or (if a response was returned at all) 11079// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11080// check whether the returned error was because http.StatusNotModified 11081// was returned. 11082func (c *MylibraryReadingpositionsSetPositionCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 11083 gensupport.SetOptions(c.urlParams_, opts...) 11084 res, err := c.doRequest("json") 11085 if res != nil && res.StatusCode == http.StatusNotModified { 11086 if res.Body != nil { 11087 res.Body.Close() 11088 } 11089 return nil, &googleapi.Error{ 11090 Code: res.StatusCode, 11091 Header: res.Header, 11092 } 11093 } 11094 if err != nil { 11095 return nil, err 11096 } 11097 defer googleapi.CloseBody(res) 11098 if err := googleapi.CheckResponse(res); err != nil { 11099 return nil, err 11100 } 11101 ret := &Empty{ 11102 ServerResponse: googleapi.ServerResponse{ 11103 Header: res.Header, 11104 HTTPStatusCode: res.StatusCode, 11105 }, 11106 } 11107 target := &ret 11108 if err := gensupport.DecodeResponse(target, res); err != nil { 11109 return nil, err 11110 } 11111 return ret, nil 11112 // { 11113 // "description": "Sets my reading position information for a volume.", 11114 // "flatPath": "books/v1/mylibrary/readingpositions/{volumeId}/setPosition", 11115 // "httpMethod": "POST", 11116 // "id": "books.mylibrary.readingpositions.setPosition", 11117 // "parameterOrder": [ 11118 // "volumeId", 11119 // "position", 11120 // "timestamp" 11121 // ], 11122 // "parameters": { 11123 // "action": { 11124 // "description": "Action that caused this reading position to be set.", 11125 // "enum": [ 11126 // "ACTION_UNDEFINED", 11127 // "bookmark", 11128 // "chapter", 11129 // "next-page", 11130 // "prev-page", 11131 // "scroll", 11132 // "search" 11133 // ], 11134 // "enumDescriptions": [ 11135 // "", 11136 // "User chose bookmark within volume.", 11137 // "User selected chapter from list.", 11138 // "Next page event.", 11139 // "Previous page event.", 11140 // "User navigated to page.", 11141 // "User chose search results within volume." 11142 // ], 11143 // "location": "query", 11144 // "type": "string" 11145 // }, 11146 // "contentVersion": { 11147 // "description": "Volume content version for which this reading position applies.", 11148 // "location": "query", 11149 // "type": "string" 11150 // }, 11151 // "deviceCookie": { 11152 // "description": "Random persistent device cookie optional on set position.", 11153 // "location": "query", 11154 // "type": "string" 11155 // }, 11156 // "position": { 11157 // "description": "Position string for the new volume reading position.", 11158 // "location": "query", 11159 // "required": true, 11160 // "type": "string" 11161 // }, 11162 // "source": { 11163 // "description": "String to identify the originator of this request.", 11164 // "location": "query", 11165 // "type": "string" 11166 // }, 11167 // "timestamp": { 11168 // "description": "RFC 3339 UTC format timestamp associated with this reading position.", 11169 // "location": "query", 11170 // "required": true, 11171 // "type": "string" 11172 // }, 11173 // "volumeId": { 11174 // "description": "ID of volume for which to update the reading position.", 11175 // "location": "path", 11176 // "required": true, 11177 // "type": "string" 11178 // } 11179 // }, 11180 // "path": "books/v1/mylibrary/readingpositions/{volumeId}/setPosition", 11181 // "response": { 11182 // "$ref": "Empty" 11183 // }, 11184 // "scopes": [ 11185 // "https://www.googleapis.com/auth/books" 11186 // ] 11187 // } 11188 11189} 11190 11191// method id "books.notification.get": 11192 11193type NotificationGetCall struct { 11194 s *Service 11195 urlParams_ gensupport.URLParams 11196 ifNoneMatch_ string 11197 ctx_ context.Context 11198 header_ http.Header 11199} 11200 11201// Get: Returns notification details for a given notification id. 11202func (r *NotificationService) Get(notificationId string) *NotificationGetCall { 11203 c := &NotificationGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11204 c.urlParams_.Set("notification_id", notificationId) 11205 return c 11206} 11207 11208// Locale sets the optional parameter "locale": ISO-639-1 language and 11209// ISO-3166-1 country code. Ex: 'en_US'. Used for generating 11210// notification title and body. 11211func (c *NotificationGetCall) Locale(locale string) *NotificationGetCall { 11212 c.urlParams_.Set("locale", locale) 11213 return c 11214} 11215 11216// Source sets the optional parameter "source": String to identify the 11217// originator of this request. 11218func (c *NotificationGetCall) Source(source string) *NotificationGetCall { 11219 c.urlParams_.Set("source", source) 11220 return c 11221} 11222 11223// Fields allows partial responses to be retrieved. See 11224// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11225// for more information. 11226func (c *NotificationGetCall) Fields(s ...googleapi.Field) *NotificationGetCall { 11227 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11228 return c 11229} 11230 11231// IfNoneMatch sets the optional parameter which makes the operation 11232// fail if the object's ETag matches the given value. This is useful for 11233// getting updates only after the object has changed since the last 11234// request. Use googleapi.IsNotModified to check whether the response 11235// error from Do is the result of In-None-Match. 11236func (c *NotificationGetCall) IfNoneMatch(entityTag string) *NotificationGetCall { 11237 c.ifNoneMatch_ = entityTag 11238 return c 11239} 11240 11241// Context sets the context to be used in this call's Do method. Any 11242// pending HTTP request will be aborted if the provided context is 11243// canceled. 11244func (c *NotificationGetCall) Context(ctx context.Context) *NotificationGetCall { 11245 c.ctx_ = ctx 11246 return c 11247} 11248 11249// Header returns an http.Header that can be modified by the caller to 11250// add HTTP headers to the request. 11251func (c *NotificationGetCall) Header() http.Header { 11252 if c.header_ == nil { 11253 c.header_ = make(http.Header) 11254 } 11255 return c.header_ 11256} 11257 11258func (c *NotificationGetCall) doRequest(alt string) (*http.Response, error) { 11259 reqHeaders := make(http.Header) 11260 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11261 for k, v := range c.header_ { 11262 reqHeaders[k] = v 11263 } 11264 reqHeaders.Set("User-Agent", c.s.userAgent()) 11265 if c.ifNoneMatch_ != "" { 11266 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11267 } 11268 var body io.Reader = nil 11269 c.urlParams_.Set("alt", alt) 11270 c.urlParams_.Set("prettyPrint", "false") 11271 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/notification/get") 11272 urls += "?" + c.urlParams_.Encode() 11273 req, err := http.NewRequest("GET", urls, body) 11274 if err != nil { 11275 return nil, err 11276 } 11277 req.Header = reqHeaders 11278 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11279} 11280 11281// Do executes the "books.notification.get" call. 11282// Exactly one of *Notification or error will be non-nil. Any non-2xx 11283// status code is an error. Response headers are in either 11284// *Notification.ServerResponse.Header or (if a response was returned at 11285// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11286// to check whether the returned error was because 11287// http.StatusNotModified was returned. 11288func (c *NotificationGetCall) Do(opts ...googleapi.CallOption) (*Notification, error) { 11289 gensupport.SetOptions(c.urlParams_, opts...) 11290 res, err := c.doRequest("json") 11291 if res != nil && res.StatusCode == http.StatusNotModified { 11292 if res.Body != nil { 11293 res.Body.Close() 11294 } 11295 return nil, &googleapi.Error{ 11296 Code: res.StatusCode, 11297 Header: res.Header, 11298 } 11299 } 11300 if err != nil { 11301 return nil, err 11302 } 11303 defer googleapi.CloseBody(res) 11304 if err := googleapi.CheckResponse(res); err != nil { 11305 return nil, err 11306 } 11307 ret := &Notification{ 11308 ServerResponse: googleapi.ServerResponse{ 11309 Header: res.Header, 11310 HTTPStatusCode: res.StatusCode, 11311 }, 11312 } 11313 target := &ret 11314 if err := gensupport.DecodeResponse(target, res); err != nil { 11315 return nil, err 11316 } 11317 return ret, nil 11318 // { 11319 // "description": "Returns notification details for a given notification id.", 11320 // "flatPath": "books/v1/notification/get", 11321 // "httpMethod": "GET", 11322 // "id": "books.notification.get", 11323 // "parameterOrder": [ 11324 // "notification_id" 11325 // ], 11326 // "parameters": { 11327 // "locale": { 11328 // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating notification title and body.", 11329 // "location": "query", 11330 // "type": "string" 11331 // }, 11332 // "notification_id": { 11333 // "description": "String to identify the notification.", 11334 // "location": "query", 11335 // "required": true, 11336 // "type": "string" 11337 // }, 11338 // "source": { 11339 // "description": "String to identify the originator of this request.", 11340 // "location": "query", 11341 // "type": "string" 11342 // } 11343 // }, 11344 // "path": "books/v1/notification/get", 11345 // "response": { 11346 // "$ref": "Notification" 11347 // }, 11348 // "scopes": [ 11349 // "https://www.googleapis.com/auth/books" 11350 // ] 11351 // } 11352 11353} 11354 11355// method id "books.onboarding.listCategories": 11356 11357type OnboardingListCategoriesCall struct { 11358 s *Service 11359 urlParams_ gensupport.URLParams 11360 ifNoneMatch_ string 11361 ctx_ context.Context 11362 header_ http.Header 11363} 11364 11365// ListCategories: List categories for onboarding experience. 11366func (r *OnboardingService) ListCategories() *OnboardingListCategoriesCall { 11367 c := &OnboardingListCategoriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11368 return c 11369} 11370 11371// Locale sets the optional parameter "locale": ISO-639-1 language and 11372// ISO-3166-1 country code. Default is en-US if unset. 11373func (c *OnboardingListCategoriesCall) Locale(locale string) *OnboardingListCategoriesCall { 11374 c.urlParams_.Set("locale", locale) 11375 return c 11376} 11377 11378// Fields allows partial responses to be retrieved. See 11379// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11380// for more information. 11381func (c *OnboardingListCategoriesCall) Fields(s ...googleapi.Field) *OnboardingListCategoriesCall { 11382 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11383 return c 11384} 11385 11386// IfNoneMatch sets the optional parameter which makes the operation 11387// fail if the object's ETag matches the given value. This is useful for 11388// getting updates only after the object has changed since the last 11389// request. Use googleapi.IsNotModified to check whether the response 11390// error from Do is the result of In-None-Match. 11391func (c *OnboardingListCategoriesCall) IfNoneMatch(entityTag string) *OnboardingListCategoriesCall { 11392 c.ifNoneMatch_ = entityTag 11393 return c 11394} 11395 11396// Context sets the context to be used in this call's Do method. Any 11397// pending HTTP request will be aborted if the provided context is 11398// canceled. 11399func (c *OnboardingListCategoriesCall) Context(ctx context.Context) *OnboardingListCategoriesCall { 11400 c.ctx_ = ctx 11401 return c 11402} 11403 11404// Header returns an http.Header that can be modified by the caller to 11405// add HTTP headers to the request. 11406func (c *OnboardingListCategoriesCall) Header() http.Header { 11407 if c.header_ == nil { 11408 c.header_ = make(http.Header) 11409 } 11410 return c.header_ 11411} 11412 11413func (c *OnboardingListCategoriesCall) doRequest(alt string) (*http.Response, error) { 11414 reqHeaders := make(http.Header) 11415 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11416 for k, v := range c.header_ { 11417 reqHeaders[k] = v 11418 } 11419 reqHeaders.Set("User-Agent", c.s.userAgent()) 11420 if c.ifNoneMatch_ != "" { 11421 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11422 } 11423 var body io.Reader = nil 11424 c.urlParams_.Set("alt", alt) 11425 c.urlParams_.Set("prettyPrint", "false") 11426 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/onboarding/listCategories") 11427 urls += "?" + c.urlParams_.Encode() 11428 req, err := http.NewRequest("GET", urls, body) 11429 if err != nil { 11430 return nil, err 11431 } 11432 req.Header = reqHeaders 11433 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11434} 11435 11436// Do executes the "books.onboarding.listCategories" call. 11437// Exactly one of *Category or error will be non-nil. Any non-2xx status 11438// code is an error. Response headers are in either 11439// *Category.ServerResponse.Header or (if a response was returned at 11440// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11441// to check whether the returned error was because 11442// http.StatusNotModified was returned. 11443func (c *OnboardingListCategoriesCall) Do(opts ...googleapi.CallOption) (*Category, error) { 11444 gensupport.SetOptions(c.urlParams_, opts...) 11445 res, err := c.doRequest("json") 11446 if res != nil && res.StatusCode == http.StatusNotModified { 11447 if res.Body != nil { 11448 res.Body.Close() 11449 } 11450 return nil, &googleapi.Error{ 11451 Code: res.StatusCode, 11452 Header: res.Header, 11453 } 11454 } 11455 if err != nil { 11456 return nil, err 11457 } 11458 defer googleapi.CloseBody(res) 11459 if err := googleapi.CheckResponse(res); err != nil { 11460 return nil, err 11461 } 11462 ret := &Category{ 11463 ServerResponse: googleapi.ServerResponse{ 11464 Header: res.Header, 11465 HTTPStatusCode: res.StatusCode, 11466 }, 11467 } 11468 target := &ret 11469 if err := gensupport.DecodeResponse(target, res); err != nil { 11470 return nil, err 11471 } 11472 return ret, nil 11473 // { 11474 // "description": "List categories for onboarding experience.", 11475 // "flatPath": "books/v1/onboarding/listCategories", 11476 // "httpMethod": "GET", 11477 // "id": "books.onboarding.listCategories", 11478 // "parameterOrder": [], 11479 // "parameters": { 11480 // "locale": { 11481 // "description": "ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset.", 11482 // "location": "query", 11483 // "type": "string" 11484 // } 11485 // }, 11486 // "path": "books/v1/onboarding/listCategories", 11487 // "response": { 11488 // "$ref": "Category" 11489 // }, 11490 // "scopes": [ 11491 // "https://www.googleapis.com/auth/books" 11492 // ] 11493 // } 11494 11495} 11496 11497// method id "books.onboarding.listCategoryVolumes": 11498 11499type OnboardingListCategoryVolumesCall struct { 11500 s *Service 11501 urlParams_ gensupport.URLParams 11502 ifNoneMatch_ string 11503 ctx_ context.Context 11504 header_ http.Header 11505} 11506 11507// ListCategoryVolumes: List available volumes under categories for 11508// onboarding experience. 11509func (r *OnboardingService) ListCategoryVolumes() *OnboardingListCategoryVolumesCall { 11510 c := &OnboardingListCategoryVolumesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11511 return c 11512} 11513 11514// CategoryId sets the optional parameter "categoryId": List of category 11515// ids requested. 11516func (c *OnboardingListCategoryVolumesCall) CategoryId(categoryId ...string) *OnboardingListCategoryVolumesCall { 11517 c.urlParams_.SetMulti("categoryId", append([]string{}, categoryId...)) 11518 return c 11519} 11520 11521// Locale sets the optional parameter "locale": ISO-639-1 language and 11522// ISO-3166-1 country code. Default is en-US if unset. 11523func (c *OnboardingListCategoryVolumesCall) Locale(locale string) *OnboardingListCategoryVolumesCall { 11524 c.urlParams_.Set("locale", locale) 11525 return c 11526} 11527 11528// MaxAllowedMaturityRating sets the optional parameter 11529// "maxAllowedMaturityRating": The maximum allowed maturity rating of 11530// returned volumes. Books with a higher maturity rating are filtered 11531// out. 11532// 11533// Possible values: 11534// "MAX_ALLOWED_MATURITY_RATING_UNDEFINED" 11535// "MATURE" - Show books which are rated mature or lower. 11536// "not-mature" - Show books which are rated not mature. 11537func (c *OnboardingListCategoryVolumesCall) MaxAllowedMaturityRating(maxAllowedMaturityRating string) *OnboardingListCategoryVolumesCall { 11538 c.urlParams_.Set("maxAllowedMaturityRating", maxAllowedMaturityRating) 11539 return c 11540} 11541 11542// PageSize sets the optional parameter "pageSize": Number of maximum 11543// results per page to be included in the response. 11544func (c *OnboardingListCategoryVolumesCall) PageSize(pageSize int64) *OnboardingListCategoryVolumesCall { 11545 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11546 return c 11547} 11548 11549// PageToken sets the optional parameter "pageToken": The value of the 11550// nextToken from the previous page. 11551func (c *OnboardingListCategoryVolumesCall) PageToken(pageToken string) *OnboardingListCategoryVolumesCall { 11552 c.urlParams_.Set("pageToken", pageToken) 11553 return c 11554} 11555 11556// Fields allows partial responses to be retrieved. See 11557// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11558// for more information. 11559func (c *OnboardingListCategoryVolumesCall) Fields(s ...googleapi.Field) *OnboardingListCategoryVolumesCall { 11560 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11561 return c 11562} 11563 11564// IfNoneMatch sets the optional parameter which makes the operation 11565// fail if the object's ETag matches the given value. This is useful for 11566// getting updates only after the object has changed since the last 11567// request. Use googleapi.IsNotModified to check whether the response 11568// error from Do is the result of In-None-Match. 11569func (c *OnboardingListCategoryVolumesCall) IfNoneMatch(entityTag string) *OnboardingListCategoryVolumesCall { 11570 c.ifNoneMatch_ = entityTag 11571 return c 11572} 11573 11574// Context sets the context to be used in this call's Do method. Any 11575// pending HTTP request will be aborted if the provided context is 11576// canceled. 11577func (c *OnboardingListCategoryVolumesCall) Context(ctx context.Context) *OnboardingListCategoryVolumesCall { 11578 c.ctx_ = ctx 11579 return c 11580} 11581 11582// Header returns an http.Header that can be modified by the caller to 11583// add HTTP headers to the request. 11584func (c *OnboardingListCategoryVolumesCall) Header() http.Header { 11585 if c.header_ == nil { 11586 c.header_ = make(http.Header) 11587 } 11588 return c.header_ 11589} 11590 11591func (c *OnboardingListCategoryVolumesCall) doRequest(alt string) (*http.Response, error) { 11592 reqHeaders := make(http.Header) 11593 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11594 for k, v := range c.header_ { 11595 reqHeaders[k] = v 11596 } 11597 reqHeaders.Set("User-Agent", c.s.userAgent()) 11598 if c.ifNoneMatch_ != "" { 11599 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11600 } 11601 var body io.Reader = nil 11602 c.urlParams_.Set("alt", alt) 11603 c.urlParams_.Set("prettyPrint", "false") 11604 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/onboarding/listCategoryVolumes") 11605 urls += "?" + c.urlParams_.Encode() 11606 req, err := http.NewRequest("GET", urls, body) 11607 if err != nil { 11608 return nil, err 11609 } 11610 req.Header = reqHeaders 11611 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11612} 11613 11614// Do executes the "books.onboarding.listCategoryVolumes" call. 11615// Exactly one of *Volume2 or error will be non-nil. Any non-2xx status 11616// code is an error. Response headers are in either 11617// *Volume2.ServerResponse.Header or (if a response was returned at all) 11618// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11619// check whether the returned error was because http.StatusNotModified 11620// was returned. 11621func (c *OnboardingListCategoryVolumesCall) Do(opts ...googleapi.CallOption) (*Volume2, error) { 11622 gensupport.SetOptions(c.urlParams_, opts...) 11623 res, err := c.doRequest("json") 11624 if res != nil && res.StatusCode == http.StatusNotModified { 11625 if res.Body != nil { 11626 res.Body.Close() 11627 } 11628 return nil, &googleapi.Error{ 11629 Code: res.StatusCode, 11630 Header: res.Header, 11631 } 11632 } 11633 if err != nil { 11634 return nil, err 11635 } 11636 defer googleapi.CloseBody(res) 11637 if err := googleapi.CheckResponse(res); err != nil { 11638 return nil, err 11639 } 11640 ret := &Volume2{ 11641 ServerResponse: googleapi.ServerResponse{ 11642 Header: res.Header, 11643 HTTPStatusCode: res.StatusCode, 11644 }, 11645 } 11646 target := &ret 11647 if err := gensupport.DecodeResponse(target, res); err != nil { 11648 return nil, err 11649 } 11650 return ret, nil 11651 // { 11652 // "description": "List available volumes under categories for onboarding experience.", 11653 // "flatPath": "books/v1/onboarding/listCategoryVolumes", 11654 // "httpMethod": "GET", 11655 // "id": "books.onboarding.listCategoryVolumes", 11656 // "parameterOrder": [], 11657 // "parameters": { 11658 // "categoryId": { 11659 // "description": "List of category ids requested.", 11660 // "location": "query", 11661 // "repeated": true, 11662 // "type": "string" 11663 // }, 11664 // "locale": { 11665 // "description": "ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset.", 11666 // "location": "query", 11667 // "type": "string" 11668 // }, 11669 // "maxAllowedMaturityRating": { 11670 // "description": "The maximum allowed maturity rating of returned volumes. Books with a higher maturity rating are filtered out.", 11671 // "enum": [ 11672 // "MAX_ALLOWED_MATURITY_RATING_UNDEFINED", 11673 // "MATURE", 11674 // "not-mature" 11675 // ], 11676 // "enumDescriptions": [ 11677 // "", 11678 // "Show books which are rated mature or lower.", 11679 // "Show books which are rated not mature." 11680 // ], 11681 // "location": "query", 11682 // "type": "string" 11683 // }, 11684 // "pageSize": { 11685 // "description": "Number of maximum results per page to be included in the response.", 11686 // "format": "uint32", 11687 // "location": "query", 11688 // "type": "integer" 11689 // }, 11690 // "pageToken": { 11691 // "description": "The value of the nextToken from the previous page.", 11692 // "location": "query", 11693 // "type": "string" 11694 // } 11695 // }, 11696 // "path": "books/v1/onboarding/listCategoryVolumes", 11697 // "response": { 11698 // "$ref": "Volume2" 11699 // }, 11700 // "scopes": [ 11701 // "https://www.googleapis.com/auth/books" 11702 // ] 11703 // } 11704 11705} 11706 11707// Pages invokes f for each page of results. 11708// A non-nil error returned from f will halt the iteration. 11709// The provided context supersedes any context provided to the Context method. 11710func (c *OnboardingListCategoryVolumesCall) Pages(ctx context.Context, f func(*Volume2) error) error { 11711 c.ctx_ = ctx 11712 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 11713 for { 11714 x, err := c.Do() 11715 if err != nil { 11716 return err 11717 } 11718 if err := f(x); err != nil { 11719 return err 11720 } 11721 if x.NextPageToken == "" { 11722 return nil 11723 } 11724 c.PageToken(x.NextPageToken) 11725 } 11726} 11727 11728// method id "books.personalizedstream.get": 11729 11730type PersonalizedstreamGetCall struct { 11731 s *Service 11732 urlParams_ gensupport.URLParams 11733 ifNoneMatch_ string 11734 ctx_ context.Context 11735 header_ http.Header 11736} 11737 11738// Get: Returns a stream of personalized book clusters 11739func (r *PersonalizedstreamService) Get() *PersonalizedstreamGetCall { 11740 c := &PersonalizedstreamGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11741 return c 11742} 11743 11744// Locale sets the optional parameter "locale": ISO-639-1 language and 11745// ISO-3166-1 country code. Ex: 'en_US'. Used for generating 11746// recommendations. 11747func (c *PersonalizedstreamGetCall) Locale(locale string) *PersonalizedstreamGetCall { 11748 c.urlParams_.Set("locale", locale) 11749 return c 11750} 11751 11752// MaxAllowedMaturityRating sets the optional parameter 11753// "maxAllowedMaturityRating": The maximum allowed maturity rating of 11754// returned recommendations. Books with a higher maturity rating are 11755// filtered out. 11756// 11757// Possible values: 11758// "MAX_ALLOWED_MATURITY_RATING_UNDEFINED" 11759// "MATURE" - Show books which are rated mature or lower. 11760// "not-mature" - Show books which are rated not mature. 11761func (c *PersonalizedstreamGetCall) MaxAllowedMaturityRating(maxAllowedMaturityRating string) *PersonalizedstreamGetCall { 11762 c.urlParams_.Set("maxAllowedMaturityRating", maxAllowedMaturityRating) 11763 return c 11764} 11765 11766// Source sets the optional parameter "source": String to identify the 11767// originator of this request. 11768func (c *PersonalizedstreamGetCall) Source(source string) *PersonalizedstreamGetCall { 11769 c.urlParams_.Set("source", source) 11770 return c 11771} 11772 11773// Fields allows partial responses to be retrieved. See 11774// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11775// for more information. 11776func (c *PersonalizedstreamGetCall) Fields(s ...googleapi.Field) *PersonalizedstreamGetCall { 11777 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11778 return c 11779} 11780 11781// IfNoneMatch sets the optional parameter which makes the operation 11782// fail if the object's ETag matches the given value. This is useful for 11783// getting updates only after the object has changed since the last 11784// request. Use googleapi.IsNotModified to check whether the response 11785// error from Do is the result of In-None-Match. 11786func (c *PersonalizedstreamGetCall) IfNoneMatch(entityTag string) *PersonalizedstreamGetCall { 11787 c.ifNoneMatch_ = entityTag 11788 return c 11789} 11790 11791// Context sets the context to be used in this call's Do method. Any 11792// pending HTTP request will be aborted if the provided context is 11793// canceled. 11794func (c *PersonalizedstreamGetCall) Context(ctx context.Context) *PersonalizedstreamGetCall { 11795 c.ctx_ = ctx 11796 return c 11797} 11798 11799// Header returns an http.Header that can be modified by the caller to 11800// add HTTP headers to the request. 11801func (c *PersonalizedstreamGetCall) Header() http.Header { 11802 if c.header_ == nil { 11803 c.header_ = make(http.Header) 11804 } 11805 return c.header_ 11806} 11807 11808func (c *PersonalizedstreamGetCall) doRequest(alt string) (*http.Response, error) { 11809 reqHeaders := make(http.Header) 11810 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 11811 for k, v := range c.header_ { 11812 reqHeaders[k] = v 11813 } 11814 reqHeaders.Set("User-Agent", c.s.userAgent()) 11815 if c.ifNoneMatch_ != "" { 11816 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11817 } 11818 var body io.Reader = nil 11819 c.urlParams_.Set("alt", alt) 11820 c.urlParams_.Set("prettyPrint", "false") 11821 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/personalizedstream/get") 11822 urls += "?" + c.urlParams_.Encode() 11823 req, err := http.NewRequest("GET", urls, body) 11824 if err != nil { 11825 return nil, err 11826 } 11827 req.Header = reqHeaders 11828 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11829} 11830 11831// Do executes the "books.personalizedstream.get" call. 11832// Exactly one of *Discoveryclusters or error will be non-nil. Any 11833// non-2xx status code is an error. Response headers are in either 11834// *Discoveryclusters.ServerResponse.Header or (if a response was 11835// returned at all) in error.(*googleapi.Error).Header. Use 11836// googleapi.IsNotModified to check whether the returned error was 11837// because http.StatusNotModified was returned. 11838func (c *PersonalizedstreamGetCall) Do(opts ...googleapi.CallOption) (*Discoveryclusters, error) { 11839 gensupport.SetOptions(c.urlParams_, opts...) 11840 res, err := c.doRequest("json") 11841 if res != nil && res.StatusCode == http.StatusNotModified { 11842 if res.Body != nil { 11843 res.Body.Close() 11844 } 11845 return nil, &googleapi.Error{ 11846 Code: res.StatusCode, 11847 Header: res.Header, 11848 } 11849 } 11850 if err != nil { 11851 return nil, err 11852 } 11853 defer googleapi.CloseBody(res) 11854 if err := googleapi.CheckResponse(res); err != nil { 11855 return nil, err 11856 } 11857 ret := &Discoveryclusters{ 11858 ServerResponse: googleapi.ServerResponse{ 11859 Header: res.Header, 11860 HTTPStatusCode: res.StatusCode, 11861 }, 11862 } 11863 target := &ret 11864 if err := gensupport.DecodeResponse(target, res); err != nil { 11865 return nil, err 11866 } 11867 return ret, nil 11868 // { 11869 // "description": "Returns a stream of personalized book clusters", 11870 // "flatPath": "books/v1/personalizedstream/get", 11871 // "httpMethod": "GET", 11872 // "id": "books.personalizedstream.get", 11873 // "parameterOrder": [], 11874 // "parameters": { 11875 // "locale": { 11876 // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.", 11877 // "location": "query", 11878 // "type": "string" 11879 // }, 11880 // "maxAllowedMaturityRating": { 11881 // "description": "The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.", 11882 // "enum": [ 11883 // "MAX_ALLOWED_MATURITY_RATING_UNDEFINED", 11884 // "MATURE", 11885 // "not-mature" 11886 // ], 11887 // "enumDescriptions": [ 11888 // "", 11889 // "Show books which are rated mature or lower.", 11890 // "Show books which are rated not mature." 11891 // ], 11892 // "location": "query", 11893 // "type": "string" 11894 // }, 11895 // "source": { 11896 // "description": "String to identify the originator of this request.", 11897 // "location": "query", 11898 // "type": "string" 11899 // } 11900 // }, 11901 // "path": "books/v1/personalizedstream/get", 11902 // "response": { 11903 // "$ref": "Discoveryclusters" 11904 // }, 11905 // "scopes": [ 11906 // "https://www.googleapis.com/auth/books" 11907 // ] 11908 // } 11909 11910} 11911 11912// method id "books.promooffer.accept": 11913 11914type PromoofferAcceptCall struct { 11915 s *Service 11916 urlParams_ gensupport.URLParams 11917 ctx_ context.Context 11918 header_ http.Header 11919} 11920 11921// Accept: Accepts the promo offer. 11922func (r *PromoofferService) Accept() *PromoofferAcceptCall { 11923 c := &PromoofferAcceptCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11924 return c 11925} 11926 11927// AndroidId sets the optional parameter "androidId": device android_id 11928func (c *PromoofferAcceptCall) AndroidId(androidId string) *PromoofferAcceptCall { 11929 c.urlParams_.Set("androidId", androidId) 11930 return c 11931} 11932 11933// Device sets the optional parameter "device": device device 11934func (c *PromoofferAcceptCall) Device(device string) *PromoofferAcceptCall { 11935 c.urlParams_.Set("device", device) 11936 return c 11937} 11938 11939// Manufacturer sets the optional parameter "manufacturer": device 11940// manufacturer 11941func (c *PromoofferAcceptCall) Manufacturer(manufacturer string) *PromoofferAcceptCall { 11942 c.urlParams_.Set("manufacturer", manufacturer) 11943 return c 11944} 11945 11946// Model sets the optional parameter "model": device model 11947func (c *PromoofferAcceptCall) Model(model string) *PromoofferAcceptCall { 11948 c.urlParams_.Set("model", model) 11949 return c 11950} 11951 11952// OfferId sets the optional parameter "offerId": 11953func (c *PromoofferAcceptCall) OfferId(offerId string) *PromoofferAcceptCall { 11954 c.urlParams_.Set("offerId", offerId) 11955 return c 11956} 11957 11958// Product sets the optional parameter "product": device product 11959func (c *PromoofferAcceptCall) Product(product string) *PromoofferAcceptCall { 11960 c.urlParams_.Set("product", product) 11961 return c 11962} 11963 11964// Serial sets the optional parameter "serial": device serial 11965func (c *PromoofferAcceptCall) Serial(serial string) *PromoofferAcceptCall { 11966 c.urlParams_.Set("serial", serial) 11967 return c 11968} 11969 11970// VolumeId sets the optional parameter "volumeId": Volume id to 11971// exercise the offer 11972func (c *PromoofferAcceptCall) VolumeId(volumeId string) *PromoofferAcceptCall { 11973 c.urlParams_.Set("volumeId", volumeId) 11974 return c 11975} 11976 11977// Fields allows partial responses to be retrieved. See 11978// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11979// for more information. 11980func (c *PromoofferAcceptCall) Fields(s ...googleapi.Field) *PromoofferAcceptCall { 11981 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11982 return c 11983} 11984 11985// Context sets the context to be used in this call's Do method. Any 11986// pending HTTP request will be aborted if the provided context is 11987// canceled. 11988func (c *PromoofferAcceptCall) Context(ctx context.Context) *PromoofferAcceptCall { 11989 c.ctx_ = ctx 11990 return c 11991} 11992 11993// Header returns an http.Header that can be modified by the caller to 11994// add HTTP headers to the request. 11995func (c *PromoofferAcceptCall) Header() http.Header { 11996 if c.header_ == nil { 11997 c.header_ = make(http.Header) 11998 } 11999 return c.header_ 12000} 12001 12002func (c *PromoofferAcceptCall) doRequest(alt string) (*http.Response, error) { 12003 reqHeaders := make(http.Header) 12004 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12005 for k, v := range c.header_ { 12006 reqHeaders[k] = v 12007 } 12008 reqHeaders.Set("User-Agent", c.s.userAgent()) 12009 var body io.Reader = nil 12010 c.urlParams_.Set("alt", alt) 12011 c.urlParams_.Set("prettyPrint", "false") 12012 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/promooffer/accept") 12013 urls += "?" + c.urlParams_.Encode() 12014 req, err := http.NewRequest("POST", urls, body) 12015 if err != nil { 12016 return nil, err 12017 } 12018 req.Header = reqHeaders 12019 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12020} 12021 12022// Do executes the "books.promooffer.accept" call. 12023// Exactly one of *Empty or error will be non-nil. Any non-2xx status 12024// code is an error. Response headers are in either 12025// *Empty.ServerResponse.Header or (if a response was returned at all) 12026// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12027// check whether the returned error was because http.StatusNotModified 12028// was returned. 12029func (c *PromoofferAcceptCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 12030 gensupport.SetOptions(c.urlParams_, opts...) 12031 res, err := c.doRequest("json") 12032 if res != nil && res.StatusCode == http.StatusNotModified { 12033 if res.Body != nil { 12034 res.Body.Close() 12035 } 12036 return nil, &googleapi.Error{ 12037 Code: res.StatusCode, 12038 Header: res.Header, 12039 } 12040 } 12041 if err != nil { 12042 return nil, err 12043 } 12044 defer googleapi.CloseBody(res) 12045 if err := googleapi.CheckResponse(res); err != nil { 12046 return nil, err 12047 } 12048 ret := &Empty{ 12049 ServerResponse: googleapi.ServerResponse{ 12050 Header: res.Header, 12051 HTTPStatusCode: res.StatusCode, 12052 }, 12053 } 12054 target := &ret 12055 if err := gensupport.DecodeResponse(target, res); err != nil { 12056 return nil, err 12057 } 12058 return ret, nil 12059 // { 12060 // "description": "Accepts the promo offer.", 12061 // "flatPath": "books/v1/promooffer/accept", 12062 // "httpMethod": "POST", 12063 // "id": "books.promooffer.accept", 12064 // "parameterOrder": [], 12065 // "parameters": { 12066 // "androidId": { 12067 // "description": "device android_id", 12068 // "location": "query", 12069 // "type": "string" 12070 // }, 12071 // "device": { 12072 // "description": "device device", 12073 // "location": "query", 12074 // "type": "string" 12075 // }, 12076 // "manufacturer": { 12077 // "description": "device manufacturer", 12078 // "location": "query", 12079 // "type": "string" 12080 // }, 12081 // "model": { 12082 // "description": "device model", 12083 // "location": "query", 12084 // "type": "string" 12085 // }, 12086 // "offerId": { 12087 // "location": "query", 12088 // "type": "string" 12089 // }, 12090 // "product": { 12091 // "description": "device product", 12092 // "location": "query", 12093 // "type": "string" 12094 // }, 12095 // "serial": { 12096 // "description": "device serial", 12097 // "location": "query", 12098 // "type": "string" 12099 // }, 12100 // "volumeId": { 12101 // "description": "Volume id to exercise the offer", 12102 // "location": "query", 12103 // "type": "string" 12104 // } 12105 // }, 12106 // "path": "books/v1/promooffer/accept", 12107 // "response": { 12108 // "$ref": "Empty" 12109 // }, 12110 // "scopes": [ 12111 // "https://www.googleapis.com/auth/books" 12112 // ] 12113 // } 12114 12115} 12116 12117// method id "books.promooffer.dismiss": 12118 12119type PromoofferDismissCall struct { 12120 s *Service 12121 urlParams_ gensupport.URLParams 12122 ctx_ context.Context 12123 header_ http.Header 12124} 12125 12126// Dismiss: Marks the promo offer as dismissed. 12127func (r *PromoofferService) Dismiss() *PromoofferDismissCall { 12128 c := &PromoofferDismissCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12129 return c 12130} 12131 12132// AndroidId sets the optional parameter "androidId": device android_id 12133func (c *PromoofferDismissCall) AndroidId(androidId string) *PromoofferDismissCall { 12134 c.urlParams_.Set("androidId", androidId) 12135 return c 12136} 12137 12138// Device sets the optional parameter "device": device device 12139func (c *PromoofferDismissCall) Device(device string) *PromoofferDismissCall { 12140 c.urlParams_.Set("device", device) 12141 return c 12142} 12143 12144// Manufacturer sets the optional parameter "manufacturer": device 12145// manufacturer 12146func (c *PromoofferDismissCall) Manufacturer(manufacturer string) *PromoofferDismissCall { 12147 c.urlParams_.Set("manufacturer", manufacturer) 12148 return c 12149} 12150 12151// Model sets the optional parameter "model": device model 12152func (c *PromoofferDismissCall) Model(model string) *PromoofferDismissCall { 12153 c.urlParams_.Set("model", model) 12154 return c 12155} 12156 12157// OfferId sets the optional parameter "offerId": Offer to dimiss 12158func (c *PromoofferDismissCall) OfferId(offerId string) *PromoofferDismissCall { 12159 c.urlParams_.Set("offerId", offerId) 12160 return c 12161} 12162 12163// Product sets the optional parameter "product": device product 12164func (c *PromoofferDismissCall) Product(product string) *PromoofferDismissCall { 12165 c.urlParams_.Set("product", product) 12166 return c 12167} 12168 12169// Serial sets the optional parameter "serial": device serial 12170func (c *PromoofferDismissCall) Serial(serial string) *PromoofferDismissCall { 12171 c.urlParams_.Set("serial", serial) 12172 return c 12173} 12174 12175// Fields allows partial responses to be retrieved. See 12176// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12177// for more information. 12178func (c *PromoofferDismissCall) Fields(s ...googleapi.Field) *PromoofferDismissCall { 12179 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12180 return c 12181} 12182 12183// Context sets the context to be used in this call's Do method. Any 12184// pending HTTP request will be aborted if the provided context is 12185// canceled. 12186func (c *PromoofferDismissCall) Context(ctx context.Context) *PromoofferDismissCall { 12187 c.ctx_ = ctx 12188 return c 12189} 12190 12191// Header returns an http.Header that can be modified by the caller to 12192// add HTTP headers to the request. 12193func (c *PromoofferDismissCall) Header() http.Header { 12194 if c.header_ == nil { 12195 c.header_ = make(http.Header) 12196 } 12197 return c.header_ 12198} 12199 12200func (c *PromoofferDismissCall) doRequest(alt string) (*http.Response, error) { 12201 reqHeaders := make(http.Header) 12202 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12203 for k, v := range c.header_ { 12204 reqHeaders[k] = v 12205 } 12206 reqHeaders.Set("User-Agent", c.s.userAgent()) 12207 var body io.Reader = nil 12208 c.urlParams_.Set("alt", alt) 12209 c.urlParams_.Set("prettyPrint", "false") 12210 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/promooffer/dismiss") 12211 urls += "?" + c.urlParams_.Encode() 12212 req, err := http.NewRequest("POST", urls, body) 12213 if err != nil { 12214 return nil, err 12215 } 12216 req.Header = reqHeaders 12217 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12218} 12219 12220// Do executes the "books.promooffer.dismiss" call. 12221// Exactly one of *Empty or error will be non-nil. Any non-2xx status 12222// code is an error. Response headers are in either 12223// *Empty.ServerResponse.Header or (if a response was returned at all) 12224// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12225// check whether the returned error was because http.StatusNotModified 12226// was returned. 12227func (c *PromoofferDismissCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 12228 gensupport.SetOptions(c.urlParams_, opts...) 12229 res, err := c.doRequest("json") 12230 if res != nil && res.StatusCode == http.StatusNotModified { 12231 if res.Body != nil { 12232 res.Body.Close() 12233 } 12234 return nil, &googleapi.Error{ 12235 Code: res.StatusCode, 12236 Header: res.Header, 12237 } 12238 } 12239 if err != nil { 12240 return nil, err 12241 } 12242 defer googleapi.CloseBody(res) 12243 if err := googleapi.CheckResponse(res); err != nil { 12244 return nil, err 12245 } 12246 ret := &Empty{ 12247 ServerResponse: googleapi.ServerResponse{ 12248 Header: res.Header, 12249 HTTPStatusCode: res.StatusCode, 12250 }, 12251 } 12252 target := &ret 12253 if err := gensupport.DecodeResponse(target, res); err != nil { 12254 return nil, err 12255 } 12256 return ret, nil 12257 // { 12258 // "description": "Marks the promo offer as dismissed.", 12259 // "flatPath": "books/v1/promooffer/dismiss", 12260 // "httpMethod": "POST", 12261 // "id": "books.promooffer.dismiss", 12262 // "parameterOrder": [], 12263 // "parameters": { 12264 // "androidId": { 12265 // "description": "device android_id", 12266 // "location": "query", 12267 // "type": "string" 12268 // }, 12269 // "device": { 12270 // "description": "device device", 12271 // "location": "query", 12272 // "type": "string" 12273 // }, 12274 // "manufacturer": { 12275 // "description": "device manufacturer", 12276 // "location": "query", 12277 // "type": "string" 12278 // }, 12279 // "model": { 12280 // "description": "device model", 12281 // "location": "query", 12282 // "type": "string" 12283 // }, 12284 // "offerId": { 12285 // "description": "Offer to dimiss", 12286 // "location": "query", 12287 // "type": "string" 12288 // }, 12289 // "product": { 12290 // "description": "device product", 12291 // "location": "query", 12292 // "type": "string" 12293 // }, 12294 // "serial": { 12295 // "description": "device serial", 12296 // "location": "query", 12297 // "type": "string" 12298 // } 12299 // }, 12300 // "path": "books/v1/promooffer/dismiss", 12301 // "response": { 12302 // "$ref": "Empty" 12303 // }, 12304 // "scopes": [ 12305 // "https://www.googleapis.com/auth/books" 12306 // ] 12307 // } 12308 12309} 12310 12311// method id "books.promooffer.get": 12312 12313type PromoofferGetCall struct { 12314 s *Service 12315 urlParams_ gensupport.URLParams 12316 ifNoneMatch_ string 12317 ctx_ context.Context 12318 header_ http.Header 12319} 12320 12321// Get: Returns a list of promo offers available to the user 12322func (r *PromoofferService) Get() *PromoofferGetCall { 12323 c := &PromoofferGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12324 return c 12325} 12326 12327// AndroidId sets the optional parameter "androidId": device android_id 12328func (c *PromoofferGetCall) AndroidId(androidId string) *PromoofferGetCall { 12329 c.urlParams_.Set("androidId", androidId) 12330 return c 12331} 12332 12333// Device sets the optional parameter "device": device device 12334func (c *PromoofferGetCall) Device(device string) *PromoofferGetCall { 12335 c.urlParams_.Set("device", device) 12336 return c 12337} 12338 12339// Manufacturer sets the optional parameter "manufacturer": device 12340// manufacturer 12341func (c *PromoofferGetCall) Manufacturer(manufacturer string) *PromoofferGetCall { 12342 c.urlParams_.Set("manufacturer", manufacturer) 12343 return c 12344} 12345 12346// Model sets the optional parameter "model": device model 12347func (c *PromoofferGetCall) Model(model string) *PromoofferGetCall { 12348 c.urlParams_.Set("model", model) 12349 return c 12350} 12351 12352// Product sets the optional parameter "product": device product 12353func (c *PromoofferGetCall) Product(product string) *PromoofferGetCall { 12354 c.urlParams_.Set("product", product) 12355 return c 12356} 12357 12358// Serial sets the optional parameter "serial": device serial 12359func (c *PromoofferGetCall) Serial(serial string) *PromoofferGetCall { 12360 c.urlParams_.Set("serial", serial) 12361 return c 12362} 12363 12364// Fields allows partial responses to be retrieved. See 12365// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12366// for more information. 12367func (c *PromoofferGetCall) Fields(s ...googleapi.Field) *PromoofferGetCall { 12368 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12369 return c 12370} 12371 12372// IfNoneMatch sets the optional parameter which makes the operation 12373// fail if the object's ETag matches the given value. This is useful for 12374// getting updates only after the object has changed since the last 12375// request. Use googleapi.IsNotModified to check whether the response 12376// error from Do is the result of In-None-Match. 12377func (c *PromoofferGetCall) IfNoneMatch(entityTag string) *PromoofferGetCall { 12378 c.ifNoneMatch_ = entityTag 12379 return c 12380} 12381 12382// Context sets the context to be used in this call's Do method. Any 12383// pending HTTP request will be aborted if the provided context is 12384// canceled. 12385func (c *PromoofferGetCall) Context(ctx context.Context) *PromoofferGetCall { 12386 c.ctx_ = ctx 12387 return c 12388} 12389 12390// Header returns an http.Header that can be modified by the caller to 12391// add HTTP headers to the request. 12392func (c *PromoofferGetCall) Header() http.Header { 12393 if c.header_ == nil { 12394 c.header_ = make(http.Header) 12395 } 12396 return c.header_ 12397} 12398 12399func (c *PromoofferGetCall) doRequest(alt string) (*http.Response, error) { 12400 reqHeaders := make(http.Header) 12401 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12402 for k, v := range c.header_ { 12403 reqHeaders[k] = v 12404 } 12405 reqHeaders.Set("User-Agent", c.s.userAgent()) 12406 if c.ifNoneMatch_ != "" { 12407 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12408 } 12409 var body io.Reader = nil 12410 c.urlParams_.Set("alt", alt) 12411 c.urlParams_.Set("prettyPrint", "false") 12412 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/promooffer/get") 12413 urls += "?" + c.urlParams_.Encode() 12414 req, err := http.NewRequest("GET", urls, body) 12415 if err != nil { 12416 return nil, err 12417 } 12418 req.Header = reqHeaders 12419 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12420} 12421 12422// Do executes the "books.promooffer.get" call. 12423// Exactly one of *Offers or error will be non-nil. Any non-2xx status 12424// code is an error. Response headers are in either 12425// *Offers.ServerResponse.Header or (if a response was returned at all) 12426// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12427// check whether the returned error was because http.StatusNotModified 12428// was returned. 12429func (c *PromoofferGetCall) Do(opts ...googleapi.CallOption) (*Offers, error) { 12430 gensupport.SetOptions(c.urlParams_, opts...) 12431 res, err := c.doRequest("json") 12432 if res != nil && res.StatusCode == http.StatusNotModified { 12433 if res.Body != nil { 12434 res.Body.Close() 12435 } 12436 return nil, &googleapi.Error{ 12437 Code: res.StatusCode, 12438 Header: res.Header, 12439 } 12440 } 12441 if err != nil { 12442 return nil, err 12443 } 12444 defer googleapi.CloseBody(res) 12445 if err := googleapi.CheckResponse(res); err != nil { 12446 return nil, err 12447 } 12448 ret := &Offers{ 12449 ServerResponse: googleapi.ServerResponse{ 12450 Header: res.Header, 12451 HTTPStatusCode: res.StatusCode, 12452 }, 12453 } 12454 target := &ret 12455 if err := gensupport.DecodeResponse(target, res); err != nil { 12456 return nil, err 12457 } 12458 return ret, nil 12459 // { 12460 // "description": "Returns a list of promo offers available to the user", 12461 // "flatPath": "books/v1/promooffer/get", 12462 // "httpMethod": "GET", 12463 // "id": "books.promooffer.get", 12464 // "parameterOrder": [], 12465 // "parameters": { 12466 // "androidId": { 12467 // "description": "device android_id", 12468 // "location": "query", 12469 // "type": "string" 12470 // }, 12471 // "device": { 12472 // "description": "device device", 12473 // "location": "query", 12474 // "type": "string" 12475 // }, 12476 // "manufacturer": { 12477 // "description": "device manufacturer", 12478 // "location": "query", 12479 // "type": "string" 12480 // }, 12481 // "model": { 12482 // "description": "device model", 12483 // "location": "query", 12484 // "type": "string" 12485 // }, 12486 // "product": { 12487 // "description": "device product", 12488 // "location": "query", 12489 // "type": "string" 12490 // }, 12491 // "serial": { 12492 // "description": "device serial", 12493 // "location": "query", 12494 // "type": "string" 12495 // } 12496 // }, 12497 // "path": "books/v1/promooffer/get", 12498 // "response": { 12499 // "$ref": "Offers" 12500 // }, 12501 // "scopes": [ 12502 // "https://www.googleapis.com/auth/books" 12503 // ] 12504 // } 12505 12506} 12507 12508// method id "books.series.get": 12509 12510type SeriesGetCall struct { 12511 s *Service 12512 urlParams_ gensupport.URLParams 12513 ifNoneMatch_ string 12514 ctx_ context.Context 12515 header_ http.Header 12516} 12517 12518// Get: Returns Series metadata for the given series ids. 12519func (r *SeriesService) Get(seriesId []string) *SeriesGetCall { 12520 c := &SeriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12521 c.urlParams_.SetMulti("series_id", append([]string{}, seriesId...)) 12522 return c 12523} 12524 12525// Fields allows partial responses to be retrieved. See 12526// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12527// for more information. 12528func (c *SeriesGetCall) Fields(s ...googleapi.Field) *SeriesGetCall { 12529 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12530 return c 12531} 12532 12533// IfNoneMatch sets the optional parameter which makes the operation 12534// fail if the object's ETag matches the given value. This is useful for 12535// getting updates only after the object has changed since the last 12536// request. Use googleapi.IsNotModified to check whether the response 12537// error from Do is the result of In-None-Match. 12538func (c *SeriesGetCall) IfNoneMatch(entityTag string) *SeriesGetCall { 12539 c.ifNoneMatch_ = entityTag 12540 return c 12541} 12542 12543// Context sets the context to be used in this call's Do method. Any 12544// pending HTTP request will be aborted if the provided context is 12545// canceled. 12546func (c *SeriesGetCall) Context(ctx context.Context) *SeriesGetCall { 12547 c.ctx_ = ctx 12548 return c 12549} 12550 12551// Header returns an http.Header that can be modified by the caller to 12552// add HTTP headers to the request. 12553func (c *SeriesGetCall) Header() http.Header { 12554 if c.header_ == nil { 12555 c.header_ = make(http.Header) 12556 } 12557 return c.header_ 12558} 12559 12560func (c *SeriesGetCall) doRequest(alt string) (*http.Response, error) { 12561 reqHeaders := make(http.Header) 12562 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12563 for k, v := range c.header_ { 12564 reqHeaders[k] = v 12565 } 12566 reqHeaders.Set("User-Agent", c.s.userAgent()) 12567 if c.ifNoneMatch_ != "" { 12568 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12569 } 12570 var body io.Reader = nil 12571 c.urlParams_.Set("alt", alt) 12572 c.urlParams_.Set("prettyPrint", "false") 12573 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/series/get") 12574 urls += "?" + c.urlParams_.Encode() 12575 req, err := http.NewRequest("GET", urls, body) 12576 if err != nil { 12577 return nil, err 12578 } 12579 req.Header = reqHeaders 12580 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12581} 12582 12583// Do executes the "books.series.get" call. 12584// Exactly one of *Series or error will be non-nil. Any non-2xx status 12585// code is an error. Response headers are in either 12586// *Series.ServerResponse.Header or (if a response was returned at all) 12587// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12588// check whether the returned error was because http.StatusNotModified 12589// was returned. 12590func (c *SeriesGetCall) Do(opts ...googleapi.CallOption) (*Series, error) { 12591 gensupport.SetOptions(c.urlParams_, opts...) 12592 res, err := c.doRequest("json") 12593 if res != nil && res.StatusCode == http.StatusNotModified { 12594 if res.Body != nil { 12595 res.Body.Close() 12596 } 12597 return nil, &googleapi.Error{ 12598 Code: res.StatusCode, 12599 Header: res.Header, 12600 } 12601 } 12602 if err != nil { 12603 return nil, err 12604 } 12605 defer googleapi.CloseBody(res) 12606 if err := googleapi.CheckResponse(res); err != nil { 12607 return nil, err 12608 } 12609 ret := &Series{ 12610 ServerResponse: googleapi.ServerResponse{ 12611 Header: res.Header, 12612 HTTPStatusCode: res.StatusCode, 12613 }, 12614 } 12615 target := &ret 12616 if err := gensupport.DecodeResponse(target, res); err != nil { 12617 return nil, err 12618 } 12619 return ret, nil 12620 // { 12621 // "description": "Returns Series metadata for the given series ids.", 12622 // "flatPath": "books/v1/series/get", 12623 // "httpMethod": "GET", 12624 // "id": "books.series.get", 12625 // "parameterOrder": [ 12626 // "series_id" 12627 // ], 12628 // "parameters": { 12629 // "series_id": { 12630 // "description": "String that identifies the series", 12631 // "location": "query", 12632 // "repeated": true, 12633 // "required": true, 12634 // "type": "string" 12635 // } 12636 // }, 12637 // "path": "books/v1/series/get", 12638 // "response": { 12639 // "$ref": "Series" 12640 // }, 12641 // "scopes": [ 12642 // "https://www.googleapis.com/auth/books" 12643 // ] 12644 // } 12645 12646} 12647 12648// method id "books.series.membership.get": 12649 12650type SeriesMembershipGetCall struct { 12651 s *Service 12652 urlParams_ gensupport.URLParams 12653 ifNoneMatch_ string 12654 ctx_ context.Context 12655 header_ http.Header 12656} 12657 12658// Get: Returns Series membership data given the series id. 12659func (r *SeriesMembershipService) Get(seriesId string) *SeriesMembershipGetCall { 12660 c := &SeriesMembershipGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12661 c.urlParams_.Set("series_id", seriesId) 12662 return c 12663} 12664 12665// PageSize sets the optional parameter "page_size": Number of maximum 12666// results per page to be included in the response. 12667func (c *SeriesMembershipGetCall) PageSize(pageSize int64) *SeriesMembershipGetCall { 12668 c.urlParams_.Set("page_size", fmt.Sprint(pageSize)) 12669 return c 12670} 12671 12672// PageToken sets the optional parameter "page_token": The value of the 12673// nextToken from the previous page. 12674func (c *SeriesMembershipGetCall) PageToken(pageToken string) *SeriesMembershipGetCall { 12675 c.urlParams_.Set("page_token", pageToken) 12676 return c 12677} 12678 12679// Fields allows partial responses to be retrieved. See 12680// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12681// for more information. 12682func (c *SeriesMembershipGetCall) Fields(s ...googleapi.Field) *SeriesMembershipGetCall { 12683 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12684 return c 12685} 12686 12687// IfNoneMatch sets the optional parameter which makes the operation 12688// fail if the object's ETag matches the given value. This is useful for 12689// getting updates only after the object has changed since the last 12690// request. Use googleapi.IsNotModified to check whether the response 12691// error from Do is the result of In-None-Match. 12692func (c *SeriesMembershipGetCall) IfNoneMatch(entityTag string) *SeriesMembershipGetCall { 12693 c.ifNoneMatch_ = entityTag 12694 return c 12695} 12696 12697// Context sets the context to be used in this call's Do method. Any 12698// pending HTTP request will be aborted if the provided context is 12699// canceled. 12700func (c *SeriesMembershipGetCall) Context(ctx context.Context) *SeriesMembershipGetCall { 12701 c.ctx_ = ctx 12702 return c 12703} 12704 12705// Header returns an http.Header that can be modified by the caller to 12706// add HTTP headers to the request. 12707func (c *SeriesMembershipGetCall) Header() http.Header { 12708 if c.header_ == nil { 12709 c.header_ = make(http.Header) 12710 } 12711 return c.header_ 12712} 12713 12714func (c *SeriesMembershipGetCall) doRequest(alt string) (*http.Response, error) { 12715 reqHeaders := make(http.Header) 12716 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12717 for k, v := range c.header_ { 12718 reqHeaders[k] = v 12719 } 12720 reqHeaders.Set("User-Agent", c.s.userAgent()) 12721 if c.ifNoneMatch_ != "" { 12722 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12723 } 12724 var body io.Reader = nil 12725 c.urlParams_.Set("alt", alt) 12726 c.urlParams_.Set("prettyPrint", "false") 12727 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/series/membership/get") 12728 urls += "?" + c.urlParams_.Encode() 12729 req, err := http.NewRequest("GET", urls, body) 12730 if err != nil { 12731 return nil, err 12732 } 12733 req.Header = reqHeaders 12734 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12735} 12736 12737// Do executes the "books.series.membership.get" call. 12738// Exactly one of *Seriesmembership or error will be non-nil. Any 12739// non-2xx status code is an error. Response headers are in either 12740// *Seriesmembership.ServerResponse.Header or (if a response was 12741// returned at all) in error.(*googleapi.Error).Header. Use 12742// googleapi.IsNotModified to check whether the returned error was 12743// because http.StatusNotModified was returned. 12744func (c *SeriesMembershipGetCall) Do(opts ...googleapi.CallOption) (*Seriesmembership, error) { 12745 gensupport.SetOptions(c.urlParams_, opts...) 12746 res, err := c.doRequest("json") 12747 if res != nil && res.StatusCode == http.StatusNotModified { 12748 if res.Body != nil { 12749 res.Body.Close() 12750 } 12751 return nil, &googleapi.Error{ 12752 Code: res.StatusCode, 12753 Header: res.Header, 12754 } 12755 } 12756 if err != nil { 12757 return nil, err 12758 } 12759 defer googleapi.CloseBody(res) 12760 if err := googleapi.CheckResponse(res); err != nil { 12761 return nil, err 12762 } 12763 ret := &Seriesmembership{ 12764 ServerResponse: googleapi.ServerResponse{ 12765 Header: res.Header, 12766 HTTPStatusCode: res.StatusCode, 12767 }, 12768 } 12769 target := &ret 12770 if err := gensupport.DecodeResponse(target, res); err != nil { 12771 return nil, err 12772 } 12773 return ret, nil 12774 // { 12775 // "description": "Returns Series membership data given the series id.", 12776 // "flatPath": "books/v1/series/membership/get", 12777 // "httpMethod": "GET", 12778 // "id": "books.series.membership.get", 12779 // "parameterOrder": [ 12780 // "series_id" 12781 // ], 12782 // "parameters": { 12783 // "page_size": { 12784 // "description": "Number of maximum results per page to be included in the response.", 12785 // "format": "uint32", 12786 // "location": "query", 12787 // "type": "integer" 12788 // }, 12789 // "page_token": { 12790 // "description": "The value of the nextToken from the previous page.", 12791 // "location": "query", 12792 // "type": "string" 12793 // }, 12794 // "series_id": { 12795 // "description": "String that identifies the series", 12796 // "location": "query", 12797 // "required": true, 12798 // "type": "string" 12799 // } 12800 // }, 12801 // "path": "books/v1/series/membership/get", 12802 // "response": { 12803 // "$ref": "Seriesmembership" 12804 // }, 12805 // "scopes": [ 12806 // "https://www.googleapis.com/auth/books" 12807 // ] 12808 // } 12809 12810} 12811 12812// method id "books.volumes.get": 12813 12814type VolumesGetCall struct { 12815 s *Service 12816 volumeId string 12817 urlParams_ gensupport.URLParams 12818 ifNoneMatch_ string 12819 ctx_ context.Context 12820 header_ http.Header 12821} 12822 12823// Get: Gets volume information for a single volume. 12824func (r *VolumesService) Get(volumeId string) *VolumesGetCall { 12825 c := &VolumesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12826 c.volumeId = volumeId 12827 return c 12828} 12829 12830// Country sets the optional parameter "country": ISO-3166-1 code to 12831// override the IP-based location. 12832func (c *VolumesGetCall) Country(country string) *VolumesGetCall { 12833 c.urlParams_.Set("country", country) 12834 return c 12835} 12836 12837// IncludeNonComicsSeries sets the optional parameter 12838// "includeNonComicsSeries": Set to true to include non-comics series. 12839// Defaults to false. 12840func (c *VolumesGetCall) IncludeNonComicsSeries(includeNonComicsSeries bool) *VolumesGetCall { 12841 c.urlParams_.Set("includeNonComicsSeries", fmt.Sprint(includeNonComicsSeries)) 12842 return c 12843} 12844 12845// Partner sets the optional parameter "partner": Brand results for 12846// partner ID. 12847func (c *VolumesGetCall) Partner(partner string) *VolumesGetCall { 12848 c.urlParams_.Set("partner", partner) 12849 return c 12850} 12851 12852// Projection sets the optional parameter "projection": Restrict 12853// information returned to a set of selected fields. 12854// 12855// Possible values: 12856// "PROJECTION_UNDEFINED" 12857// "FULL" - Includes all volume data. 12858// "LITE" - Includes a subset of fields in volumeInfo and accessInfo. 12859func (c *VolumesGetCall) Projection(projection string) *VolumesGetCall { 12860 c.urlParams_.Set("projection", projection) 12861 return c 12862} 12863 12864// Source sets the optional parameter "source": string to identify the 12865// originator of this request. 12866func (c *VolumesGetCall) Source(source string) *VolumesGetCall { 12867 c.urlParams_.Set("source", source) 12868 return c 12869} 12870 12871// UserLibraryConsistentRead sets the optional parameter 12872// "user_library_consistent_read": 12873func (c *VolumesGetCall) UserLibraryConsistentRead(userLibraryConsistentRead bool) *VolumesGetCall { 12874 c.urlParams_.Set("user_library_consistent_read", fmt.Sprint(userLibraryConsistentRead)) 12875 return c 12876} 12877 12878// Fields allows partial responses to be retrieved. See 12879// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12880// for more information. 12881func (c *VolumesGetCall) Fields(s ...googleapi.Field) *VolumesGetCall { 12882 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12883 return c 12884} 12885 12886// IfNoneMatch sets the optional parameter which makes the operation 12887// fail if the object's ETag matches the given value. This is useful for 12888// getting updates only after the object has changed since the last 12889// request. Use googleapi.IsNotModified to check whether the response 12890// error from Do is the result of In-None-Match. 12891func (c *VolumesGetCall) IfNoneMatch(entityTag string) *VolumesGetCall { 12892 c.ifNoneMatch_ = entityTag 12893 return c 12894} 12895 12896// Context sets the context to be used in this call's Do method. Any 12897// pending HTTP request will be aborted if the provided context is 12898// canceled. 12899func (c *VolumesGetCall) Context(ctx context.Context) *VolumesGetCall { 12900 c.ctx_ = ctx 12901 return c 12902} 12903 12904// Header returns an http.Header that can be modified by the caller to 12905// add HTTP headers to the request. 12906func (c *VolumesGetCall) Header() http.Header { 12907 if c.header_ == nil { 12908 c.header_ = make(http.Header) 12909 } 12910 return c.header_ 12911} 12912 12913func (c *VolumesGetCall) doRequest(alt string) (*http.Response, error) { 12914 reqHeaders := make(http.Header) 12915 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 12916 for k, v := range c.header_ { 12917 reqHeaders[k] = v 12918 } 12919 reqHeaders.Set("User-Agent", c.s.userAgent()) 12920 if c.ifNoneMatch_ != "" { 12921 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12922 } 12923 var body io.Reader = nil 12924 c.urlParams_.Set("alt", alt) 12925 c.urlParams_.Set("prettyPrint", "false") 12926 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/volumes/{volumeId}") 12927 urls += "?" + c.urlParams_.Encode() 12928 req, err := http.NewRequest("GET", urls, body) 12929 if err != nil { 12930 return nil, err 12931 } 12932 req.Header = reqHeaders 12933 googleapi.Expand(req.URL, map[string]string{ 12934 "volumeId": c.volumeId, 12935 }) 12936 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12937} 12938 12939// Do executes the "books.volumes.get" call. 12940// Exactly one of *Volume or error will be non-nil. Any non-2xx status 12941// code is an error. Response headers are in either 12942// *Volume.ServerResponse.Header or (if a response was returned at all) 12943// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12944// check whether the returned error was because http.StatusNotModified 12945// was returned. 12946func (c *VolumesGetCall) Do(opts ...googleapi.CallOption) (*Volume, error) { 12947 gensupport.SetOptions(c.urlParams_, opts...) 12948 res, err := c.doRequest("json") 12949 if res != nil && res.StatusCode == http.StatusNotModified { 12950 if res.Body != nil { 12951 res.Body.Close() 12952 } 12953 return nil, &googleapi.Error{ 12954 Code: res.StatusCode, 12955 Header: res.Header, 12956 } 12957 } 12958 if err != nil { 12959 return nil, err 12960 } 12961 defer googleapi.CloseBody(res) 12962 if err := googleapi.CheckResponse(res); err != nil { 12963 return nil, err 12964 } 12965 ret := &Volume{ 12966 ServerResponse: googleapi.ServerResponse{ 12967 Header: res.Header, 12968 HTTPStatusCode: res.StatusCode, 12969 }, 12970 } 12971 target := &ret 12972 if err := gensupport.DecodeResponse(target, res); err != nil { 12973 return nil, err 12974 } 12975 return ret, nil 12976 // { 12977 // "description": "Gets volume information for a single volume.", 12978 // "flatPath": "books/v1/volumes/{volumeId}", 12979 // "httpMethod": "GET", 12980 // "id": "books.volumes.get", 12981 // "parameterOrder": [ 12982 // "volumeId" 12983 // ], 12984 // "parameters": { 12985 // "country": { 12986 // "description": "ISO-3166-1 code to override the IP-based location.", 12987 // "location": "query", 12988 // "type": "string" 12989 // }, 12990 // "includeNonComicsSeries": { 12991 // "description": "Set to true to include non-comics series. Defaults to false.", 12992 // "location": "query", 12993 // "type": "boolean" 12994 // }, 12995 // "partner": { 12996 // "description": "Brand results for partner ID.", 12997 // "location": "query", 12998 // "type": "string" 12999 // }, 13000 // "projection": { 13001 // "description": "Restrict information returned to a set of selected fields.", 13002 // "enum": [ 13003 // "PROJECTION_UNDEFINED", 13004 // "FULL", 13005 // "LITE" 13006 // ], 13007 // "enumDescriptions": [ 13008 // "", 13009 // "Includes all volume data.", 13010 // "Includes a subset of fields in volumeInfo and accessInfo." 13011 // ], 13012 // "location": "query", 13013 // "type": "string" 13014 // }, 13015 // "source": { 13016 // "description": "string to identify the originator of this request.", 13017 // "location": "query", 13018 // "type": "string" 13019 // }, 13020 // "user_library_consistent_read": { 13021 // "location": "query", 13022 // "type": "boolean" 13023 // }, 13024 // "volumeId": { 13025 // "description": "ID of volume to retrieve.", 13026 // "location": "path", 13027 // "required": true, 13028 // "type": "string" 13029 // } 13030 // }, 13031 // "path": "books/v1/volumes/{volumeId}", 13032 // "response": { 13033 // "$ref": "Volume" 13034 // }, 13035 // "scopes": [ 13036 // "https://www.googleapis.com/auth/books" 13037 // ] 13038 // } 13039 13040} 13041 13042// method id "books.volumes.list": 13043 13044type VolumesListCall struct { 13045 s *Service 13046 urlParams_ gensupport.URLParams 13047 ifNoneMatch_ string 13048 ctx_ context.Context 13049 header_ http.Header 13050} 13051 13052// List: Performs a book search. 13053func (r *VolumesService) List(q string) *VolumesListCall { 13054 c := &VolumesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13055 c.urlParams_.Set("q", q) 13056 return c 13057} 13058 13059// Download sets the optional parameter "download": Restrict to volumes 13060// by download availability. 13061// 13062// Possible values: 13063// "DOWNLOAD_UNDEFINED" 13064// "EPUB" - All volumes with epub. 13065func (c *VolumesListCall) Download(download string) *VolumesListCall { 13066 c.urlParams_.Set("download", download) 13067 return c 13068} 13069 13070// Filter sets the optional parameter "filter": Filter search results. 13071// 13072// Possible values: 13073// "FILTER_UNDEFINED" 13074// "ebooks" - All Google eBooks. 13075// "free-ebooks" - Google eBook with full volume text viewability. 13076// "full" - Public can view entire volume text. 13077// "paid-ebooks" - Google eBook with a price. 13078// "partial" - Public able to see parts of text. 13079func (c *VolumesListCall) Filter(filter string) *VolumesListCall { 13080 c.urlParams_.Set("filter", filter) 13081 return c 13082} 13083 13084// LangRestrict sets the optional parameter "langRestrict": Restrict 13085// results to books with this language code. 13086func (c *VolumesListCall) LangRestrict(langRestrict string) *VolumesListCall { 13087 c.urlParams_.Set("langRestrict", langRestrict) 13088 return c 13089} 13090 13091// LibraryRestrict sets the optional parameter "libraryRestrict": 13092// Restrict search to this user's library. 13093// 13094// Possible values: 13095// "LIBRARY_RESTRICT_UNDEFINED" 13096// "my-library" - Restrict to the user's library, any shelf. 13097// "no-restrict" - Do not restrict based on user's library. 13098func (c *VolumesListCall) LibraryRestrict(libraryRestrict string) *VolumesListCall { 13099 c.urlParams_.Set("libraryRestrict", libraryRestrict) 13100 return c 13101} 13102 13103// MaxAllowedMaturityRating sets the optional parameter 13104// "maxAllowedMaturityRating": The maximum allowed maturity rating of 13105// returned recommendations. Books with a higher maturity rating are 13106// filtered out. 13107// 13108// Possible values: 13109// "MAX_ALLOWED_MATURITY_RATING_UNDEFINED" 13110// "MATURE" - Show books which are rated mature or lower. 13111// "not-mature" - Show books which are rated not mature. 13112func (c *VolumesListCall) MaxAllowedMaturityRating(maxAllowedMaturityRating string) *VolumesListCall { 13113 c.urlParams_.Set("maxAllowedMaturityRating", maxAllowedMaturityRating) 13114 return c 13115} 13116 13117// MaxResults sets the optional parameter "maxResults": Maximum number 13118// of results to return. 13119func (c *VolumesListCall) MaxResults(maxResults int64) *VolumesListCall { 13120 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 13121 return c 13122} 13123 13124// OrderBy sets the optional parameter "orderBy": Sort search results. 13125// 13126// Possible values: 13127// "ORDER_BY_UNDEFINED" 13128// "newest" - Most recently published. 13129// "relevance" - Relevance to search terms. 13130func (c *VolumesListCall) OrderBy(orderBy string) *VolumesListCall { 13131 c.urlParams_.Set("orderBy", orderBy) 13132 return c 13133} 13134 13135// Partner sets the optional parameter "partner": Restrict and brand 13136// results for partner ID. 13137func (c *VolumesListCall) Partner(partner string) *VolumesListCall { 13138 c.urlParams_.Set("partner", partner) 13139 return c 13140} 13141 13142// PrintType sets the optional parameter "printType": Restrict to books 13143// or magazines. 13144// 13145// Possible values: 13146// "PRINT_TYPE_UNDEFINED" 13147// "ALL" - All volume content types. 13148// "BOOKS" - Just books. 13149// "MAGAZINES" - Just magazines. 13150func (c *VolumesListCall) PrintType(printType string) *VolumesListCall { 13151 c.urlParams_.Set("printType", printType) 13152 return c 13153} 13154 13155// Projection sets the optional parameter "projection": Restrict 13156// information returned to a set of selected fields. 13157// 13158// Possible values: 13159// "PROJECTION_UNDEFINED" 13160// "FULL" - Includes all volume data. 13161// "LITE" - Includes a subset of fields in volumeInfo and accessInfo. 13162func (c *VolumesListCall) Projection(projection string) *VolumesListCall { 13163 c.urlParams_.Set("projection", projection) 13164 return c 13165} 13166 13167// ShowPreorders sets the optional parameter "showPreorders": Set to 13168// true to show books available for preorder. Defaults to false. 13169func (c *VolumesListCall) ShowPreorders(showPreorders bool) *VolumesListCall { 13170 c.urlParams_.Set("showPreorders", fmt.Sprint(showPreorders)) 13171 return c 13172} 13173 13174// Source sets the optional parameter "source": String to identify the 13175// originator of this request. 13176func (c *VolumesListCall) Source(source string) *VolumesListCall { 13177 c.urlParams_.Set("source", source) 13178 return c 13179} 13180 13181// StartIndex sets the optional parameter "startIndex": Index of the 13182// first result to return (starts at 0) 13183func (c *VolumesListCall) StartIndex(startIndex int64) *VolumesListCall { 13184 c.urlParams_.Set("startIndex", fmt.Sprint(startIndex)) 13185 return c 13186} 13187 13188// Fields allows partial responses to be retrieved. See 13189// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13190// for more information. 13191func (c *VolumesListCall) Fields(s ...googleapi.Field) *VolumesListCall { 13192 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13193 return c 13194} 13195 13196// IfNoneMatch sets the optional parameter which makes the operation 13197// fail if the object's ETag matches the given value. This is useful for 13198// getting updates only after the object has changed since the last 13199// request. Use googleapi.IsNotModified to check whether the response 13200// error from Do is the result of In-None-Match. 13201func (c *VolumesListCall) IfNoneMatch(entityTag string) *VolumesListCall { 13202 c.ifNoneMatch_ = entityTag 13203 return c 13204} 13205 13206// Context sets the context to be used in this call's Do method. Any 13207// pending HTTP request will be aborted if the provided context is 13208// canceled. 13209func (c *VolumesListCall) Context(ctx context.Context) *VolumesListCall { 13210 c.ctx_ = ctx 13211 return c 13212} 13213 13214// Header returns an http.Header that can be modified by the caller to 13215// add HTTP headers to the request. 13216func (c *VolumesListCall) Header() http.Header { 13217 if c.header_ == nil { 13218 c.header_ = make(http.Header) 13219 } 13220 return c.header_ 13221} 13222 13223func (c *VolumesListCall) doRequest(alt string) (*http.Response, error) { 13224 reqHeaders := make(http.Header) 13225 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 13226 for k, v := range c.header_ { 13227 reqHeaders[k] = v 13228 } 13229 reqHeaders.Set("User-Agent", c.s.userAgent()) 13230 if c.ifNoneMatch_ != "" { 13231 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13232 } 13233 var body io.Reader = nil 13234 c.urlParams_.Set("alt", alt) 13235 c.urlParams_.Set("prettyPrint", "false") 13236 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/volumes") 13237 urls += "?" + c.urlParams_.Encode() 13238 req, err := http.NewRequest("GET", urls, body) 13239 if err != nil { 13240 return nil, err 13241 } 13242 req.Header = reqHeaders 13243 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13244} 13245 13246// Do executes the "books.volumes.list" call. 13247// Exactly one of *Volumes or error will be non-nil. Any non-2xx status 13248// code is an error. Response headers are in either 13249// *Volumes.ServerResponse.Header or (if a response was returned at all) 13250// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 13251// check whether the returned error was because http.StatusNotModified 13252// was returned. 13253func (c *VolumesListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) { 13254 gensupport.SetOptions(c.urlParams_, opts...) 13255 res, err := c.doRequest("json") 13256 if res != nil && res.StatusCode == http.StatusNotModified { 13257 if res.Body != nil { 13258 res.Body.Close() 13259 } 13260 return nil, &googleapi.Error{ 13261 Code: res.StatusCode, 13262 Header: res.Header, 13263 } 13264 } 13265 if err != nil { 13266 return nil, err 13267 } 13268 defer googleapi.CloseBody(res) 13269 if err := googleapi.CheckResponse(res); err != nil { 13270 return nil, err 13271 } 13272 ret := &Volumes{ 13273 ServerResponse: googleapi.ServerResponse{ 13274 Header: res.Header, 13275 HTTPStatusCode: res.StatusCode, 13276 }, 13277 } 13278 target := &ret 13279 if err := gensupport.DecodeResponse(target, res); err != nil { 13280 return nil, err 13281 } 13282 return ret, nil 13283 // { 13284 // "description": "Performs a book search.", 13285 // "flatPath": "books/v1/volumes", 13286 // "httpMethod": "GET", 13287 // "id": "books.volumes.list", 13288 // "parameterOrder": [ 13289 // "q" 13290 // ], 13291 // "parameters": { 13292 // "download": { 13293 // "description": "Restrict to volumes by download availability.", 13294 // "enum": [ 13295 // "DOWNLOAD_UNDEFINED", 13296 // "EPUB" 13297 // ], 13298 // "enumDescriptions": [ 13299 // "", 13300 // "All volumes with epub." 13301 // ], 13302 // "location": "query", 13303 // "type": "string" 13304 // }, 13305 // "filter": { 13306 // "description": "Filter search results.", 13307 // "enum": [ 13308 // "FILTER_UNDEFINED", 13309 // "ebooks", 13310 // "free-ebooks", 13311 // "full", 13312 // "paid-ebooks", 13313 // "partial" 13314 // ], 13315 // "enumDescriptions": [ 13316 // "", 13317 // "All Google eBooks.", 13318 // "Google eBook with full volume text viewability.", 13319 // "Public can view entire volume text.", 13320 // "Google eBook with a price.", 13321 // "Public able to see parts of text." 13322 // ], 13323 // "location": "query", 13324 // "type": "string" 13325 // }, 13326 // "langRestrict": { 13327 // "description": "Restrict results to books with this language code.", 13328 // "location": "query", 13329 // "type": "string" 13330 // }, 13331 // "libraryRestrict": { 13332 // "description": "Restrict search to this user's library.", 13333 // "enum": [ 13334 // "LIBRARY_RESTRICT_UNDEFINED", 13335 // "my-library", 13336 // "no-restrict" 13337 // ], 13338 // "enumDescriptions": [ 13339 // "", 13340 // "Restrict to the user's library, any shelf.", 13341 // "Do not restrict based on user's library." 13342 // ], 13343 // "location": "query", 13344 // "type": "string" 13345 // }, 13346 // "maxAllowedMaturityRating": { 13347 // "description": "The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.", 13348 // "enum": [ 13349 // "MAX_ALLOWED_MATURITY_RATING_UNDEFINED", 13350 // "MATURE", 13351 // "not-mature" 13352 // ], 13353 // "enumDescriptions": [ 13354 // "", 13355 // "Show books which are rated mature or lower.", 13356 // "Show books which are rated not mature." 13357 // ], 13358 // "location": "query", 13359 // "type": "string" 13360 // }, 13361 // "maxResults": { 13362 // "description": "Maximum number of results to return.", 13363 // "format": "uint32", 13364 // "location": "query", 13365 // "maximum": "40", 13366 // "minimum": "0", 13367 // "type": "integer" 13368 // }, 13369 // "orderBy": { 13370 // "description": "Sort search results.", 13371 // "enum": [ 13372 // "ORDER_BY_UNDEFINED", 13373 // "newest", 13374 // "relevance" 13375 // ], 13376 // "enumDescriptions": [ 13377 // "", 13378 // "Most recently published.", 13379 // "Relevance to search terms." 13380 // ], 13381 // "location": "query", 13382 // "type": "string" 13383 // }, 13384 // "partner": { 13385 // "description": "Restrict and brand results for partner ID.", 13386 // "location": "query", 13387 // "type": "string" 13388 // }, 13389 // "printType": { 13390 // "description": "Restrict to books or magazines.", 13391 // "enum": [ 13392 // "PRINT_TYPE_UNDEFINED", 13393 // "ALL", 13394 // "BOOKS", 13395 // "MAGAZINES" 13396 // ], 13397 // "enumDescriptions": [ 13398 // "", 13399 // "All volume content types.", 13400 // "Just books.", 13401 // "Just magazines." 13402 // ], 13403 // "location": "query", 13404 // "type": "string" 13405 // }, 13406 // "projection": { 13407 // "description": "Restrict information returned to a set of selected fields.", 13408 // "enum": [ 13409 // "PROJECTION_UNDEFINED", 13410 // "FULL", 13411 // "LITE" 13412 // ], 13413 // "enumDescriptions": [ 13414 // "", 13415 // "Includes all volume data.", 13416 // "Includes a subset of fields in volumeInfo and accessInfo." 13417 // ], 13418 // "location": "query", 13419 // "type": "string" 13420 // }, 13421 // "q": { 13422 // "description": "Full-text search query string.", 13423 // "location": "query", 13424 // "required": true, 13425 // "type": "string" 13426 // }, 13427 // "showPreorders": { 13428 // "description": "Set to true to show books available for preorder. Defaults to false.", 13429 // "location": "query", 13430 // "type": "boolean" 13431 // }, 13432 // "source": { 13433 // "description": "String to identify the originator of this request.", 13434 // "location": "query", 13435 // "type": "string" 13436 // }, 13437 // "startIndex": { 13438 // "description": "Index of the first result to return (starts at 0)", 13439 // "format": "uint32", 13440 // "location": "query", 13441 // "minimum": "0", 13442 // "type": "integer" 13443 // } 13444 // }, 13445 // "path": "books/v1/volumes", 13446 // "response": { 13447 // "$ref": "Volumes" 13448 // }, 13449 // "scopes": [ 13450 // "https://www.googleapis.com/auth/books" 13451 // ] 13452 // } 13453 13454} 13455 13456// method id "books.volumes.associated.list": 13457 13458type VolumesAssociatedListCall struct { 13459 s *Service 13460 volumeId string 13461 urlParams_ gensupport.URLParams 13462 ifNoneMatch_ string 13463 ctx_ context.Context 13464 header_ http.Header 13465} 13466 13467// List: Return a list of associated books. 13468func (r *VolumesAssociatedService) List(volumeId string) *VolumesAssociatedListCall { 13469 c := &VolumesAssociatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13470 c.volumeId = volumeId 13471 return c 13472} 13473 13474// Association sets the optional parameter "association": Association 13475// type. 13476// 13477// Possible values: 13478// "ASSOCIATION_UNDEFINED" 13479// "end-of-sample" - Recommendations for display end-of-sample. 13480// "end-of-volume" - Recommendations for display end-of-volume. 13481// "related-for-play" - Related volumes for Play Store. 13482func (c *VolumesAssociatedListCall) Association(association string) *VolumesAssociatedListCall { 13483 c.urlParams_.Set("association", association) 13484 return c 13485} 13486 13487// Locale sets the optional parameter "locale": ISO-639-1 language and 13488// ISO-3166-1 country code. Ex: 'en_US'. Used for generating 13489// recommendations. 13490func (c *VolumesAssociatedListCall) Locale(locale string) *VolumesAssociatedListCall { 13491 c.urlParams_.Set("locale", locale) 13492 return c 13493} 13494 13495// MaxAllowedMaturityRating sets the optional parameter 13496// "maxAllowedMaturityRating": The maximum allowed maturity rating of 13497// returned recommendations. Books with a higher maturity rating are 13498// filtered out. 13499// 13500// Possible values: 13501// "MAX_ALLOWED_MATURITY_RATING_UNDEFINED" 13502// "MATURE" - Show books which are rated mature or lower. 13503// "not-mature" - Show books which are rated not mature. 13504func (c *VolumesAssociatedListCall) MaxAllowedMaturityRating(maxAllowedMaturityRating string) *VolumesAssociatedListCall { 13505 c.urlParams_.Set("maxAllowedMaturityRating", maxAllowedMaturityRating) 13506 return c 13507} 13508 13509// Source sets the optional parameter "source": String to identify the 13510// originator of this request. 13511func (c *VolumesAssociatedListCall) Source(source string) *VolumesAssociatedListCall { 13512 c.urlParams_.Set("source", source) 13513 return c 13514} 13515 13516// Fields allows partial responses to be retrieved. See 13517// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13518// for more information. 13519func (c *VolumesAssociatedListCall) Fields(s ...googleapi.Field) *VolumesAssociatedListCall { 13520 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13521 return c 13522} 13523 13524// IfNoneMatch sets the optional parameter which makes the operation 13525// fail if the object's ETag matches the given value. This is useful for 13526// getting updates only after the object has changed since the last 13527// request. Use googleapi.IsNotModified to check whether the response 13528// error from Do is the result of In-None-Match. 13529func (c *VolumesAssociatedListCall) IfNoneMatch(entityTag string) *VolumesAssociatedListCall { 13530 c.ifNoneMatch_ = entityTag 13531 return c 13532} 13533 13534// Context sets the context to be used in this call's Do method. Any 13535// pending HTTP request will be aborted if the provided context is 13536// canceled. 13537func (c *VolumesAssociatedListCall) Context(ctx context.Context) *VolumesAssociatedListCall { 13538 c.ctx_ = ctx 13539 return c 13540} 13541 13542// Header returns an http.Header that can be modified by the caller to 13543// add HTTP headers to the request. 13544func (c *VolumesAssociatedListCall) Header() http.Header { 13545 if c.header_ == nil { 13546 c.header_ = make(http.Header) 13547 } 13548 return c.header_ 13549} 13550 13551func (c *VolumesAssociatedListCall) doRequest(alt string) (*http.Response, error) { 13552 reqHeaders := make(http.Header) 13553 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 13554 for k, v := range c.header_ { 13555 reqHeaders[k] = v 13556 } 13557 reqHeaders.Set("User-Agent", c.s.userAgent()) 13558 if c.ifNoneMatch_ != "" { 13559 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13560 } 13561 var body io.Reader = nil 13562 c.urlParams_.Set("alt", alt) 13563 c.urlParams_.Set("prettyPrint", "false") 13564 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/volumes/{volumeId}/associated") 13565 urls += "?" + c.urlParams_.Encode() 13566 req, err := http.NewRequest("GET", urls, body) 13567 if err != nil { 13568 return nil, err 13569 } 13570 req.Header = reqHeaders 13571 googleapi.Expand(req.URL, map[string]string{ 13572 "volumeId": c.volumeId, 13573 }) 13574 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13575} 13576 13577// Do executes the "books.volumes.associated.list" call. 13578// Exactly one of *Volumes or error will be non-nil. Any non-2xx status 13579// code is an error. Response headers are in either 13580// *Volumes.ServerResponse.Header or (if a response was returned at all) 13581// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 13582// check whether the returned error was because http.StatusNotModified 13583// was returned. 13584func (c *VolumesAssociatedListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) { 13585 gensupport.SetOptions(c.urlParams_, opts...) 13586 res, err := c.doRequest("json") 13587 if res != nil && res.StatusCode == http.StatusNotModified { 13588 if res.Body != nil { 13589 res.Body.Close() 13590 } 13591 return nil, &googleapi.Error{ 13592 Code: res.StatusCode, 13593 Header: res.Header, 13594 } 13595 } 13596 if err != nil { 13597 return nil, err 13598 } 13599 defer googleapi.CloseBody(res) 13600 if err := googleapi.CheckResponse(res); err != nil { 13601 return nil, err 13602 } 13603 ret := &Volumes{ 13604 ServerResponse: googleapi.ServerResponse{ 13605 Header: res.Header, 13606 HTTPStatusCode: res.StatusCode, 13607 }, 13608 } 13609 target := &ret 13610 if err := gensupport.DecodeResponse(target, res); err != nil { 13611 return nil, err 13612 } 13613 return ret, nil 13614 // { 13615 // "description": "Return a list of associated books.", 13616 // "flatPath": "books/v1/volumes/{volumeId}/associated", 13617 // "httpMethod": "GET", 13618 // "id": "books.volumes.associated.list", 13619 // "parameterOrder": [ 13620 // "volumeId" 13621 // ], 13622 // "parameters": { 13623 // "association": { 13624 // "description": "Association type.", 13625 // "enum": [ 13626 // "ASSOCIATION_UNDEFINED", 13627 // "end-of-sample", 13628 // "end-of-volume", 13629 // "related-for-play" 13630 // ], 13631 // "enumDescriptions": [ 13632 // "", 13633 // "Recommendations for display end-of-sample.", 13634 // "Recommendations for display end-of-volume.", 13635 // "Related volumes for Play Store." 13636 // ], 13637 // "location": "query", 13638 // "type": "string" 13639 // }, 13640 // "locale": { 13641 // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.", 13642 // "location": "query", 13643 // "type": "string" 13644 // }, 13645 // "maxAllowedMaturityRating": { 13646 // "description": "The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.", 13647 // "enum": [ 13648 // "MAX_ALLOWED_MATURITY_RATING_UNDEFINED", 13649 // "MATURE", 13650 // "not-mature" 13651 // ], 13652 // "enumDescriptions": [ 13653 // "", 13654 // "Show books which are rated mature or lower.", 13655 // "Show books which are rated not mature." 13656 // ], 13657 // "location": "query", 13658 // "type": "string" 13659 // }, 13660 // "source": { 13661 // "description": "String to identify the originator of this request.", 13662 // "location": "query", 13663 // "type": "string" 13664 // }, 13665 // "volumeId": { 13666 // "description": "ID of the source volume.", 13667 // "location": "path", 13668 // "required": true, 13669 // "type": "string" 13670 // } 13671 // }, 13672 // "path": "books/v1/volumes/{volumeId}/associated", 13673 // "response": { 13674 // "$ref": "Volumes" 13675 // }, 13676 // "scopes": [ 13677 // "https://www.googleapis.com/auth/books" 13678 // ] 13679 // } 13680 13681} 13682 13683// method id "books.volumes.mybooks.list": 13684 13685type VolumesMybooksListCall struct { 13686 s *Service 13687 urlParams_ gensupport.URLParams 13688 ifNoneMatch_ string 13689 ctx_ context.Context 13690 header_ http.Header 13691} 13692 13693// List: Return a list of books in My Library. 13694func (r *VolumesMybooksService) List() *VolumesMybooksListCall { 13695 c := &VolumesMybooksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13696 return c 13697} 13698 13699// AcquireMethod sets the optional parameter "acquireMethod": How the 13700// book was acquired 13701// 13702// Possible values: 13703// "ACQUIRE_METHOD_UNDEFINED" 13704// "FAMILY_SHARED" - Books acquired via Family Sharing 13705// "PREORDERED" - Preordered books (not yet available) 13706// "PREVIOUSLY_RENTED" - User-rented books past their expiration time 13707// "PUBLIC_DOMAIN" - Public domain books 13708// "PURCHASED" - Purchased books 13709// "RENTED" - User-rented books 13710// "SAMPLE" - Sample books 13711// "UPLOADED" - User uploaded books 13712func (c *VolumesMybooksListCall) AcquireMethod(acquireMethod ...string) *VolumesMybooksListCall { 13713 c.urlParams_.SetMulti("acquireMethod", append([]string{}, acquireMethod...)) 13714 return c 13715} 13716 13717// Country sets the optional parameter "country": ISO-3166-1 code to 13718// override the IP-based location. 13719func (c *VolumesMybooksListCall) Country(country string) *VolumesMybooksListCall { 13720 c.urlParams_.Set("country", country) 13721 return c 13722} 13723 13724// Locale sets the optional parameter "locale": ISO-639-1 language and 13725// ISO-3166-1 country code. Ex:'en_US'. Used for generating 13726// recommendations. 13727func (c *VolumesMybooksListCall) Locale(locale string) *VolumesMybooksListCall { 13728 c.urlParams_.Set("locale", locale) 13729 return c 13730} 13731 13732// MaxResults sets the optional parameter "maxResults": Maximum number 13733// of results to return. 13734func (c *VolumesMybooksListCall) MaxResults(maxResults int64) *VolumesMybooksListCall { 13735 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 13736 return c 13737} 13738 13739// ProcessingState sets the optional parameter "processingState": The 13740// processing state of the user uploaded volumes to be returned. 13741// Applicable only if the UPLOADED is specified in the acquireMethod. 13742// 13743// Possible values: 13744// "PROCESSING_STATE_UNDEFINED" 13745// "COMPLETED_FAILED" - The volume processing hase failed. 13746// "COMPLETED_SUCCESS" - The volume processing was completed. 13747// "RUNNING" - The volume processing is not completed. 13748func (c *VolumesMybooksListCall) ProcessingState(processingState ...string) *VolumesMybooksListCall { 13749 c.urlParams_.SetMulti("processingState", append([]string{}, processingState...)) 13750 return c 13751} 13752 13753// Source sets the optional parameter "source": String to identify the 13754// originator of this request. 13755func (c *VolumesMybooksListCall) Source(source string) *VolumesMybooksListCall { 13756 c.urlParams_.Set("source", source) 13757 return c 13758} 13759 13760// StartIndex sets the optional parameter "startIndex": Index of the 13761// first result to return (starts at 0) 13762func (c *VolumesMybooksListCall) StartIndex(startIndex int64) *VolumesMybooksListCall { 13763 c.urlParams_.Set("startIndex", fmt.Sprint(startIndex)) 13764 return c 13765} 13766 13767// Fields allows partial responses to be retrieved. See 13768// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13769// for more information. 13770func (c *VolumesMybooksListCall) Fields(s ...googleapi.Field) *VolumesMybooksListCall { 13771 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13772 return c 13773} 13774 13775// IfNoneMatch sets the optional parameter which makes the operation 13776// fail if the object's ETag matches the given value. This is useful for 13777// getting updates only after the object has changed since the last 13778// request. Use googleapi.IsNotModified to check whether the response 13779// error from Do is the result of In-None-Match. 13780func (c *VolumesMybooksListCall) IfNoneMatch(entityTag string) *VolumesMybooksListCall { 13781 c.ifNoneMatch_ = entityTag 13782 return c 13783} 13784 13785// Context sets the context to be used in this call's Do method. Any 13786// pending HTTP request will be aborted if the provided context is 13787// canceled. 13788func (c *VolumesMybooksListCall) Context(ctx context.Context) *VolumesMybooksListCall { 13789 c.ctx_ = ctx 13790 return c 13791} 13792 13793// Header returns an http.Header that can be modified by the caller to 13794// add HTTP headers to the request. 13795func (c *VolumesMybooksListCall) Header() http.Header { 13796 if c.header_ == nil { 13797 c.header_ = make(http.Header) 13798 } 13799 return c.header_ 13800} 13801 13802func (c *VolumesMybooksListCall) doRequest(alt string) (*http.Response, error) { 13803 reqHeaders := make(http.Header) 13804 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 13805 for k, v := range c.header_ { 13806 reqHeaders[k] = v 13807 } 13808 reqHeaders.Set("User-Agent", c.s.userAgent()) 13809 if c.ifNoneMatch_ != "" { 13810 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13811 } 13812 var body io.Reader = nil 13813 c.urlParams_.Set("alt", alt) 13814 c.urlParams_.Set("prettyPrint", "false") 13815 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/volumes/mybooks") 13816 urls += "?" + c.urlParams_.Encode() 13817 req, err := http.NewRequest("GET", urls, body) 13818 if err != nil { 13819 return nil, err 13820 } 13821 req.Header = reqHeaders 13822 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13823} 13824 13825// Do executes the "books.volumes.mybooks.list" call. 13826// Exactly one of *Volumes or error will be non-nil. Any non-2xx status 13827// code is an error. Response headers are in either 13828// *Volumes.ServerResponse.Header or (if a response was returned at all) 13829// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 13830// check whether the returned error was because http.StatusNotModified 13831// was returned. 13832func (c *VolumesMybooksListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) { 13833 gensupport.SetOptions(c.urlParams_, opts...) 13834 res, err := c.doRequest("json") 13835 if res != nil && res.StatusCode == http.StatusNotModified { 13836 if res.Body != nil { 13837 res.Body.Close() 13838 } 13839 return nil, &googleapi.Error{ 13840 Code: res.StatusCode, 13841 Header: res.Header, 13842 } 13843 } 13844 if err != nil { 13845 return nil, err 13846 } 13847 defer googleapi.CloseBody(res) 13848 if err := googleapi.CheckResponse(res); err != nil { 13849 return nil, err 13850 } 13851 ret := &Volumes{ 13852 ServerResponse: googleapi.ServerResponse{ 13853 Header: res.Header, 13854 HTTPStatusCode: res.StatusCode, 13855 }, 13856 } 13857 target := &ret 13858 if err := gensupport.DecodeResponse(target, res); err != nil { 13859 return nil, err 13860 } 13861 return ret, nil 13862 // { 13863 // "description": "Return a list of books in My Library.", 13864 // "flatPath": "books/v1/volumes/mybooks", 13865 // "httpMethod": "GET", 13866 // "id": "books.volumes.mybooks.list", 13867 // "parameterOrder": [], 13868 // "parameters": { 13869 // "acquireMethod": { 13870 // "description": "How the book was acquired", 13871 // "enum": [ 13872 // "ACQUIRE_METHOD_UNDEFINED", 13873 // "FAMILY_SHARED", 13874 // "PREORDERED", 13875 // "PREVIOUSLY_RENTED", 13876 // "PUBLIC_DOMAIN", 13877 // "PURCHASED", 13878 // "RENTED", 13879 // "SAMPLE", 13880 // "UPLOADED" 13881 // ], 13882 // "enumDescriptions": [ 13883 // "", 13884 // "Books acquired via Family Sharing", 13885 // "Preordered books (not yet available)", 13886 // "User-rented books past their expiration time", 13887 // "Public domain books", 13888 // "Purchased books", 13889 // "User-rented books", 13890 // "Sample books", 13891 // "User uploaded books" 13892 // ], 13893 // "location": "query", 13894 // "repeated": true, 13895 // "type": "string" 13896 // }, 13897 // "country": { 13898 // "description": "ISO-3166-1 code to override the IP-based location.", 13899 // "location": "query", 13900 // "type": "string" 13901 // }, 13902 // "locale": { 13903 // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex:'en_US'. Used for generating recommendations.", 13904 // "location": "query", 13905 // "type": "string" 13906 // }, 13907 // "maxResults": { 13908 // "description": "Maximum number of results to return.", 13909 // "format": "uint32", 13910 // "location": "query", 13911 // "maximum": "100", 13912 // "minimum": "0", 13913 // "type": "integer" 13914 // }, 13915 // "processingState": { 13916 // "description": "The processing state of the user uploaded volumes to be returned. Applicable only if the UPLOADED is specified in the acquireMethod.", 13917 // "enum": [ 13918 // "PROCESSING_STATE_UNDEFINED", 13919 // "COMPLETED_FAILED", 13920 // "COMPLETED_SUCCESS", 13921 // "RUNNING" 13922 // ], 13923 // "enumDescriptions": [ 13924 // "", 13925 // "The volume processing hase failed.", 13926 // "The volume processing was completed.", 13927 // "The volume processing is not completed." 13928 // ], 13929 // "location": "query", 13930 // "repeated": true, 13931 // "type": "string" 13932 // }, 13933 // "source": { 13934 // "description": "String to identify the originator of this request.", 13935 // "location": "query", 13936 // "type": "string" 13937 // }, 13938 // "startIndex": { 13939 // "description": "Index of the first result to return (starts at 0)", 13940 // "format": "uint32", 13941 // "location": "query", 13942 // "minimum": "0", 13943 // "type": "integer" 13944 // } 13945 // }, 13946 // "path": "books/v1/volumes/mybooks", 13947 // "response": { 13948 // "$ref": "Volumes" 13949 // }, 13950 // "scopes": [ 13951 // "https://www.googleapis.com/auth/books" 13952 // ] 13953 // } 13954 13955} 13956 13957// method id "books.volumes.recommended.list": 13958 13959type VolumesRecommendedListCall struct { 13960 s *Service 13961 urlParams_ gensupport.URLParams 13962 ifNoneMatch_ string 13963 ctx_ context.Context 13964 header_ http.Header 13965} 13966 13967// List: Return a list of recommended books for the current user. 13968func (r *VolumesRecommendedService) List() *VolumesRecommendedListCall { 13969 c := &VolumesRecommendedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13970 return c 13971} 13972 13973// Locale sets the optional parameter "locale": ISO-639-1 language and 13974// ISO-3166-1 country code. Ex: 'en_US'. Used for generating 13975// recommendations. 13976func (c *VolumesRecommendedListCall) Locale(locale string) *VolumesRecommendedListCall { 13977 c.urlParams_.Set("locale", locale) 13978 return c 13979} 13980 13981// MaxAllowedMaturityRating sets the optional parameter 13982// "maxAllowedMaturityRating": The maximum allowed maturity rating of 13983// returned recommendations. Books with a higher maturity rating are 13984// filtered out. 13985// 13986// Possible values: 13987// "MAX_ALLOWED_MATURITY_RATING_UNDEFINED" 13988// "MATURE" - Show books which are rated mature or lower. 13989// "not-mature" - Show books which are rated not mature. 13990func (c *VolumesRecommendedListCall) MaxAllowedMaturityRating(maxAllowedMaturityRating string) *VolumesRecommendedListCall { 13991 c.urlParams_.Set("maxAllowedMaturityRating", maxAllowedMaturityRating) 13992 return c 13993} 13994 13995// Source sets the optional parameter "source": String to identify the 13996// originator of this request. 13997func (c *VolumesRecommendedListCall) Source(source string) *VolumesRecommendedListCall { 13998 c.urlParams_.Set("source", source) 13999 return c 14000} 14001 14002// Fields allows partial responses to be retrieved. See 14003// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14004// for more information. 14005func (c *VolumesRecommendedListCall) Fields(s ...googleapi.Field) *VolumesRecommendedListCall { 14006 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14007 return c 14008} 14009 14010// IfNoneMatch sets the optional parameter which makes the operation 14011// fail if the object's ETag matches the given value. This is useful for 14012// getting updates only after the object has changed since the last 14013// request. Use googleapi.IsNotModified to check whether the response 14014// error from Do is the result of In-None-Match. 14015func (c *VolumesRecommendedListCall) IfNoneMatch(entityTag string) *VolumesRecommendedListCall { 14016 c.ifNoneMatch_ = entityTag 14017 return c 14018} 14019 14020// Context sets the context to be used in this call's Do method. Any 14021// pending HTTP request will be aborted if the provided context is 14022// canceled. 14023func (c *VolumesRecommendedListCall) Context(ctx context.Context) *VolumesRecommendedListCall { 14024 c.ctx_ = ctx 14025 return c 14026} 14027 14028// Header returns an http.Header that can be modified by the caller to 14029// add HTTP headers to the request. 14030func (c *VolumesRecommendedListCall) Header() http.Header { 14031 if c.header_ == nil { 14032 c.header_ = make(http.Header) 14033 } 14034 return c.header_ 14035} 14036 14037func (c *VolumesRecommendedListCall) doRequest(alt string) (*http.Response, error) { 14038 reqHeaders := make(http.Header) 14039 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 14040 for k, v := range c.header_ { 14041 reqHeaders[k] = v 14042 } 14043 reqHeaders.Set("User-Agent", c.s.userAgent()) 14044 if c.ifNoneMatch_ != "" { 14045 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14046 } 14047 var body io.Reader = nil 14048 c.urlParams_.Set("alt", alt) 14049 c.urlParams_.Set("prettyPrint", "false") 14050 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/volumes/recommended") 14051 urls += "?" + c.urlParams_.Encode() 14052 req, err := http.NewRequest("GET", urls, body) 14053 if err != nil { 14054 return nil, err 14055 } 14056 req.Header = reqHeaders 14057 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14058} 14059 14060// Do executes the "books.volumes.recommended.list" call. 14061// Exactly one of *Volumes or error will be non-nil. Any non-2xx status 14062// code is an error. Response headers are in either 14063// *Volumes.ServerResponse.Header or (if a response was returned at all) 14064// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 14065// check whether the returned error was because http.StatusNotModified 14066// was returned. 14067func (c *VolumesRecommendedListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) { 14068 gensupport.SetOptions(c.urlParams_, opts...) 14069 res, err := c.doRequest("json") 14070 if res != nil && res.StatusCode == http.StatusNotModified { 14071 if res.Body != nil { 14072 res.Body.Close() 14073 } 14074 return nil, &googleapi.Error{ 14075 Code: res.StatusCode, 14076 Header: res.Header, 14077 } 14078 } 14079 if err != nil { 14080 return nil, err 14081 } 14082 defer googleapi.CloseBody(res) 14083 if err := googleapi.CheckResponse(res); err != nil { 14084 return nil, err 14085 } 14086 ret := &Volumes{ 14087 ServerResponse: googleapi.ServerResponse{ 14088 Header: res.Header, 14089 HTTPStatusCode: res.StatusCode, 14090 }, 14091 } 14092 target := &ret 14093 if err := gensupport.DecodeResponse(target, res); err != nil { 14094 return nil, err 14095 } 14096 return ret, nil 14097 // { 14098 // "description": "Return a list of recommended books for the current user.", 14099 // "flatPath": "books/v1/volumes/recommended", 14100 // "httpMethod": "GET", 14101 // "id": "books.volumes.recommended.list", 14102 // "parameterOrder": [], 14103 // "parameters": { 14104 // "locale": { 14105 // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.", 14106 // "location": "query", 14107 // "type": "string" 14108 // }, 14109 // "maxAllowedMaturityRating": { 14110 // "description": "The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.", 14111 // "enum": [ 14112 // "MAX_ALLOWED_MATURITY_RATING_UNDEFINED", 14113 // "MATURE", 14114 // "not-mature" 14115 // ], 14116 // "enumDescriptions": [ 14117 // "", 14118 // "Show books which are rated mature or lower.", 14119 // "Show books which are rated not mature." 14120 // ], 14121 // "location": "query", 14122 // "type": "string" 14123 // }, 14124 // "source": { 14125 // "description": "String to identify the originator of this request.", 14126 // "location": "query", 14127 // "type": "string" 14128 // } 14129 // }, 14130 // "path": "books/v1/volumes/recommended", 14131 // "response": { 14132 // "$ref": "Volumes" 14133 // }, 14134 // "scopes": [ 14135 // "https://www.googleapis.com/auth/books" 14136 // ] 14137 // } 14138 14139} 14140 14141// method id "books.volumes.recommended.rate": 14142 14143type VolumesRecommendedRateCall struct { 14144 s *Service 14145 urlParams_ gensupport.URLParams 14146 ctx_ context.Context 14147 header_ http.Header 14148} 14149 14150// Rate: Rate a recommended book for the current user. 14151func (r *VolumesRecommendedService) Rate(rating string, volumeId string) *VolumesRecommendedRateCall { 14152 c := &VolumesRecommendedRateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14153 c.urlParams_.Set("rating", rating) 14154 c.urlParams_.Set("volumeId", volumeId) 14155 return c 14156} 14157 14158// Locale sets the optional parameter "locale": ISO-639-1 language and 14159// ISO-3166-1 country code. Ex: 'en_US'. Used for generating 14160// recommendations. 14161func (c *VolumesRecommendedRateCall) Locale(locale string) *VolumesRecommendedRateCall { 14162 c.urlParams_.Set("locale", locale) 14163 return c 14164} 14165 14166// Source sets the optional parameter "source": String to identify the 14167// originator of this request. 14168func (c *VolumesRecommendedRateCall) Source(source string) *VolumesRecommendedRateCall { 14169 c.urlParams_.Set("source", source) 14170 return c 14171} 14172 14173// Fields allows partial responses to be retrieved. See 14174// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14175// for more information. 14176func (c *VolumesRecommendedRateCall) Fields(s ...googleapi.Field) *VolumesRecommendedRateCall { 14177 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14178 return c 14179} 14180 14181// Context sets the context to be used in this call's Do method. Any 14182// pending HTTP request will be aborted if the provided context is 14183// canceled. 14184func (c *VolumesRecommendedRateCall) Context(ctx context.Context) *VolumesRecommendedRateCall { 14185 c.ctx_ = ctx 14186 return c 14187} 14188 14189// Header returns an http.Header that can be modified by the caller to 14190// add HTTP headers to the request. 14191func (c *VolumesRecommendedRateCall) Header() http.Header { 14192 if c.header_ == nil { 14193 c.header_ = make(http.Header) 14194 } 14195 return c.header_ 14196} 14197 14198func (c *VolumesRecommendedRateCall) doRequest(alt string) (*http.Response, error) { 14199 reqHeaders := make(http.Header) 14200 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 14201 for k, v := range c.header_ { 14202 reqHeaders[k] = v 14203 } 14204 reqHeaders.Set("User-Agent", c.s.userAgent()) 14205 var body io.Reader = nil 14206 c.urlParams_.Set("alt", alt) 14207 c.urlParams_.Set("prettyPrint", "false") 14208 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/volumes/recommended/rate") 14209 urls += "?" + c.urlParams_.Encode() 14210 req, err := http.NewRequest("POST", urls, body) 14211 if err != nil { 14212 return nil, err 14213 } 14214 req.Header = reqHeaders 14215 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14216} 14217 14218// Do executes the "books.volumes.recommended.rate" call. 14219// Exactly one of *BooksVolumesRecommendedRateResponse or error will be 14220// non-nil. Any non-2xx status code is an error. Response headers are in 14221// either *BooksVolumesRecommendedRateResponse.ServerResponse.Header or 14222// (if a response was returned at all) in 14223// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14224// whether the returned error was because http.StatusNotModified was 14225// returned. 14226func (c *VolumesRecommendedRateCall) Do(opts ...googleapi.CallOption) (*BooksVolumesRecommendedRateResponse, error) { 14227 gensupport.SetOptions(c.urlParams_, opts...) 14228 res, err := c.doRequest("json") 14229 if res != nil && res.StatusCode == http.StatusNotModified { 14230 if res.Body != nil { 14231 res.Body.Close() 14232 } 14233 return nil, &googleapi.Error{ 14234 Code: res.StatusCode, 14235 Header: res.Header, 14236 } 14237 } 14238 if err != nil { 14239 return nil, err 14240 } 14241 defer googleapi.CloseBody(res) 14242 if err := googleapi.CheckResponse(res); err != nil { 14243 return nil, err 14244 } 14245 ret := &BooksVolumesRecommendedRateResponse{ 14246 ServerResponse: googleapi.ServerResponse{ 14247 Header: res.Header, 14248 HTTPStatusCode: res.StatusCode, 14249 }, 14250 } 14251 target := &ret 14252 if err := gensupport.DecodeResponse(target, res); err != nil { 14253 return nil, err 14254 } 14255 return ret, nil 14256 // { 14257 // "description": "Rate a recommended book for the current user.", 14258 // "flatPath": "books/v1/volumes/recommended/rate", 14259 // "httpMethod": "POST", 14260 // "id": "books.volumes.recommended.rate", 14261 // "parameterOrder": [ 14262 // "rating", 14263 // "volumeId" 14264 // ], 14265 // "parameters": { 14266 // "locale": { 14267 // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.", 14268 // "location": "query", 14269 // "type": "string" 14270 // }, 14271 // "rating": { 14272 // "description": "Rating to be given to the volume.", 14273 // "enum": [ 14274 // "RATING_UNDEFINED", 14275 // "HAVE_IT", 14276 // "NOT_INTERESTED" 14277 // ], 14278 // "enumDescriptions": [ 14279 // "", 14280 // "Rating indicating a dismissal due to ownership.", 14281 // "Rating indicating a negative dismissal of a volume." 14282 // ], 14283 // "location": "query", 14284 // "required": true, 14285 // "type": "string" 14286 // }, 14287 // "source": { 14288 // "description": "String to identify the originator of this request.", 14289 // "location": "query", 14290 // "type": "string" 14291 // }, 14292 // "volumeId": { 14293 // "description": "ID of the source volume.", 14294 // "location": "query", 14295 // "required": true, 14296 // "type": "string" 14297 // } 14298 // }, 14299 // "path": "books/v1/volumes/recommended/rate", 14300 // "response": { 14301 // "$ref": "BooksVolumesRecommendedRateResponse" 14302 // }, 14303 // "scopes": [ 14304 // "https://www.googleapis.com/auth/books" 14305 // ] 14306 // } 14307 14308} 14309 14310// method id "books.volumes.useruploaded.list": 14311 14312type VolumesUseruploadedListCall struct { 14313 s *Service 14314 urlParams_ gensupport.URLParams 14315 ifNoneMatch_ string 14316 ctx_ context.Context 14317 header_ http.Header 14318} 14319 14320// List: Return a list of books uploaded by the current user. 14321func (r *VolumesUseruploadedService) List() *VolumesUseruploadedListCall { 14322 c := &VolumesUseruploadedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14323 return c 14324} 14325 14326// Locale sets the optional parameter "locale": ISO-639-1 language and 14327// ISO-3166-1 country code. Ex: 'en_US'. Used for generating 14328// recommendations. 14329func (c *VolumesUseruploadedListCall) Locale(locale string) *VolumesUseruploadedListCall { 14330 c.urlParams_.Set("locale", locale) 14331 return c 14332} 14333 14334// MaxResults sets the optional parameter "maxResults": Maximum number 14335// of results to return. 14336func (c *VolumesUseruploadedListCall) MaxResults(maxResults int64) *VolumesUseruploadedListCall { 14337 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 14338 return c 14339} 14340 14341// ProcessingState sets the optional parameter "processingState": The 14342// processing state of the user uploaded volumes to be returned. 14343// 14344// Possible values: 14345// "PROCESSING_STATE_UNDEFINED" 14346// "COMPLETED_FAILED" - The volume processing hase failed. 14347// "COMPLETED_SUCCESS" - The volume processing was completed. 14348// "RUNNING" - The volume processing is not completed. 14349func (c *VolumesUseruploadedListCall) ProcessingState(processingState ...string) *VolumesUseruploadedListCall { 14350 c.urlParams_.SetMulti("processingState", append([]string{}, processingState...)) 14351 return c 14352} 14353 14354// Source sets the optional parameter "source": String to identify the 14355// originator of this request. 14356func (c *VolumesUseruploadedListCall) Source(source string) *VolumesUseruploadedListCall { 14357 c.urlParams_.Set("source", source) 14358 return c 14359} 14360 14361// StartIndex sets the optional parameter "startIndex": Index of the 14362// first result to return (starts at 0) 14363func (c *VolumesUseruploadedListCall) StartIndex(startIndex int64) *VolumesUseruploadedListCall { 14364 c.urlParams_.Set("startIndex", fmt.Sprint(startIndex)) 14365 return c 14366} 14367 14368// VolumeId sets the optional parameter "volumeId": The ids of the 14369// volumes to be returned. If not specified all that match the 14370// processingState are returned. 14371func (c *VolumesUseruploadedListCall) VolumeId(volumeId ...string) *VolumesUseruploadedListCall { 14372 c.urlParams_.SetMulti("volumeId", append([]string{}, volumeId...)) 14373 return c 14374} 14375 14376// Fields allows partial responses to be retrieved. See 14377// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14378// for more information. 14379func (c *VolumesUseruploadedListCall) Fields(s ...googleapi.Field) *VolumesUseruploadedListCall { 14380 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14381 return c 14382} 14383 14384// IfNoneMatch sets the optional parameter which makes the operation 14385// fail if the object's ETag matches the given value. This is useful for 14386// getting updates only after the object has changed since the last 14387// request. Use googleapi.IsNotModified to check whether the response 14388// error from Do is the result of In-None-Match. 14389func (c *VolumesUseruploadedListCall) IfNoneMatch(entityTag string) *VolumesUseruploadedListCall { 14390 c.ifNoneMatch_ = entityTag 14391 return c 14392} 14393 14394// Context sets the context to be used in this call's Do method. Any 14395// pending HTTP request will be aborted if the provided context is 14396// canceled. 14397func (c *VolumesUseruploadedListCall) Context(ctx context.Context) *VolumesUseruploadedListCall { 14398 c.ctx_ = ctx 14399 return c 14400} 14401 14402// Header returns an http.Header that can be modified by the caller to 14403// add HTTP headers to the request. 14404func (c *VolumesUseruploadedListCall) Header() http.Header { 14405 if c.header_ == nil { 14406 c.header_ = make(http.Header) 14407 } 14408 return c.header_ 14409} 14410 14411func (c *VolumesUseruploadedListCall) doRequest(alt string) (*http.Response, error) { 14412 reqHeaders := make(http.Header) 14413 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124") 14414 for k, v := range c.header_ { 14415 reqHeaders[k] = v 14416 } 14417 reqHeaders.Set("User-Agent", c.s.userAgent()) 14418 if c.ifNoneMatch_ != "" { 14419 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14420 } 14421 var body io.Reader = nil 14422 c.urlParams_.Set("alt", alt) 14423 c.urlParams_.Set("prettyPrint", "false") 14424 urls := googleapi.ResolveRelative(c.s.BasePath, "books/v1/volumes/useruploaded") 14425 urls += "?" + c.urlParams_.Encode() 14426 req, err := http.NewRequest("GET", urls, body) 14427 if err != nil { 14428 return nil, err 14429 } 14430 req.Header = reqHeaders 14431 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14432} 14433 14434// Do executes the "books.volumes.useruploaded.list" call. 14435// Exactly one of *Volumes or error will be non-nil. Any non-2xx status 14436// code is an error. Response headers are in either 14437// *Volumes.ServerResponse.Header or (if a response was returned at all) 14438// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 14439// check whether the returned error was because http.StatusNotModified 14440// was returned. 14441func (c *VolumesUseruploadedListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) { 14442 gensupport.SetOptions(c.urlParams_, opts...) 14443 res, err := c.doRequest("json") 14444 if res != nil && res.StatusCode == http.StatusNotModified { 14445 if res.Body != nil { 14446 res.Body.Close() 14447 } 14448 return nil, &googleapi.Error{ 14449 Code: res.StatusCode, 14450 Header: res.Header, 14451 } 14452 } 14453 if err != nil { 14454 return nil, err 14455 } 14456 defer googleapi.CloseBody(res) 14457 if err := googleapi.CheckResponse(res); err != nil { 14458 return nil, err 14459 } 14460 ret := &Volumes{ 14461 ServerResponse: googleapi.ServerResponse{ 14462 Header: res.Header, 14463 HTTPStatusCode: res.StatusCode, 14464 }, 14465 } 14466 target := &ret 14467 if err := gensupport.DecodeResponse(target, res); err != nil { 14468 return nil, err 14469 } 14470 return ret, nil 14471 // { 14472 // "description": "Return a list of books uploaded by the current user.", 14473 // "flatPath": "books/v1/volumes/useruploaded", 14474 // "httpMethod": "GET", 14475 // "id": "books.volumes.useruploaded.list", 14476 // "parameterOrder": [], 14477 // "parameters": { 14478 // "locale": { 14479 // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.", 14480 // "location": "query", 14481 // "type": "string" 14482 // }, 14483 // "maxResults": { 14484 // "description": "Maximum number of results to return.", 14485 // "format": "uint32", 14486 // "location": "query", 14487 // "maximum": "40", 14488 // "minimum": "0", 14489 // "type": "integer" 14490 // }, 14491 // "processingState": { 14492 // "description": "The processing state of the user uploaded volumes to be returned.", 14493 // "enum": [ 14494 // "PROCESSING_STATE_UNDEFINED", 14495 // "COMPLETED_FAILED", 14496 // "COMPLETED_SUCCESS", 14497 // "RUNNING" 14498 // ], 14499 // "enumDescriptions": [ 14500 // "", 14501 // "The volume processing hase failed.", 14502 // "The volume processing was completed.", 14503 // "The volume processing is not completed." 14504 // ], 14505 // "location": "query", 14506 // "repeated": true, 14507 // "type": "string" 14508 // }, 14509 // "source": { 14510 // "description": "String to identify the originator of this request.", 14511 // "location": "query", 14512 // "type": "string" 14513 // }, 14514 // "startIndex": { 14515 // "description": "Index of the first result to return (starts at 0)", 14516 // "format": "uint32", 14517 // "location": "query", 14518 // "minimum": "0", 14519 // "type": "integer" 14520 // }, 14521 // "volumeId": { 14522 // "description": "The ids of the volumes to be returned. If not specified all that match the processingState are returned.", 14523 // "location": "query", 14524 // "repeated": true, 14525 // "type": "string" 14526 // } 14527 // }, 14528 // "path": "books/v1/volumes/useruploaded", 14529 // "response": { 14530 // "$ref": "Volumes" 14531 // }, 14532 // "scopes": [ 14533 // "https://www.googleapis.com/auth/books" 14534 // ] 14535 // } 14536 14537} 14538