You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

13810 lines
471 KiB

  1. // Copyright 2019 Google LLC.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated file. DO NOT EDIT.
  5. // Package books provides access to the Books API.
  6. //
  7. // For product documentation, see: https://developers.google.com/books/docs/v1/getting_started
  8. //
  9. // Creating a client
  10. //
  11. // Usage example:
  12. //
  13. // import "google.golang.org/api/books/v1"
  14. // ...
  15. // ctx := context.Background()
  16. // booksService, err := books.NewService(ctx)
  17. //
  18. // In this example, Google Application Default Credentials are used for authentication.
  19. //
  20. // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
  21. //
  22. // Other authentication options
  23. //
  24. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  25. //
  26. // booksService, err := books.NewService(ctx, option.WithAPIKey("AIza..."))
  27. //
  28. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  29. //
  30. // config := &oauth2.Config{...}
  31. // // ...
  32. // token, err := config.Exchange(ctx, ...)
  33. // booksService, err := books.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  34. //
  35. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  36. package books // import "google.golang.org/api/books/v1"
  37. import (
  38. "bytes"
  39. "context"
  40. "encoding/json"
  41. "errors"
  42. "fmt"
  43. "io"
  44. "net/http"
  45. "net/url"
  46. "strconv"
  47. "strings"
  48. gensupport "google.golang.org/api/gensupport"
  49. googleapi "google.golang.org/api/googleapi"
  50. option "google.golang.org/api/option"
  51. htransport "google.golang.org/api/transport/http"
  52. )
  53. // Always reference these packages, just in case the auto-generated code
  54. // below doesn't.
  55. var _ = bytes.NewBuffer
  56. var _ = strconv.Itoa
  57. var _ = fmt.Sprintf
  58. var _ = json.NewDecoder
  59. var _ = io.Copy
  60. var _ = url.Parse
  61. var _ = gensupport.MarshalJSON
  62. var _ = googleapi.Version
  63. var _ = errors.New
  64. var _ = strings.Replace
  65. var _ = context.Canceled
  66. const apiId = "books:v1"
  67. const apiName = "books"
  68. const apiVersion = "v1"
  69. const basePath = "https://www.googleapis.com/books/v1/"
  70. // OAuth2 scopes used by this API.
  71. const (
  72. // Manage your books
  73. BooksScope = "https://www.googleapis.com/auth/books"
  74. )
  75. // NewService creates a new Service.
  76. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  77. scopesOption := option.WithScopes(
  78. "https://www.googleapis.com/auth/books",
  79. )
  80. // NOTE: prepend, so we don't override user-specified scopes.
  81. opts = append([]option.ClientOption{scopesOption}, opts...)
  82. client, endpoint, err := htransport.NewClient(ctx, opts...)
  83. if err != nil {
  84. return nil, err
  85. }
  86. s, err := New(client)
  87. if err != nil {
  88. return nil, err
  89. }
  90. if endpoint != "" {
  91. s.BasePath = endpoint
  92. }
  93. return s, nil
  94. }
  95. // New creates a new Service. It uses the provided http.Client for requests.
  96. //
  97. // Deprecated: please use NewService instead.
  98. // To provide a custom HTTP client, use option.WithHTTPClient.
  99. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  100. func New(client *http.Client) (*Service, error) {
  101. if client == nil {
  102. return nil, errors.New("client is nil")
  103. }
  104. s := &Service{client: client, BasePath: basePath}
  105. s.Bookshelves = NewBookshelvesService(s)
  106. s.Cloudloading = NewCloudloadingService(s)
  107. s.Dictionary = NewDictionaryService(s)
  108. s.Familysharing = NewFamilysharingService(s)
  109. s.Layers = NewLayersService(s)
  110. s.Myconfig = NewMyconfigService(s)
  111. s.Mylibrary = NewMylibraryService(s)
  112. s.Notification = NewNotificationService(s)
  113. s.Onboarding = NewOnboardingService(s)
  114. s.Personalizedstream = NewPersonalizedstreamService(s)
  115. s.Promooffer = NewPromoofferService(s)
  116. s.Series = NewSeriesService(s)
  117. s.Volumes = NewVolumesService(s)
  118. return s, nil
  119. }
  120. type Service struct {
  121. client *http.Client
  122. BasePath string // API endpoint base URL
  123. UserAgent string // optional additional User-Agent fragment
  124. Bookshelves *BookshelvesService
  125. Cloudloading *CloudloadingService
  126. Dictionary *DictionaryService
  127. Familysharing *FamilysharingService
  128. Layers *LayersService
  129. Myconfig *MyconfigService
  130. Mylibrary *MylibraryService
  131. Notification *NotificationService
  132. Onboarding *OnboardingService
  133. Personalizedstream *PersonalizedstreamService
  134. Promooffer *PromoofferService
  135. Series *SeriesService
  136. Volumes *VolumesService
  137. }
  138. func (s *Service) userAgent() string {
  139. if s.UserAgent == "" {
  140. return googleapi.UserAgent
  141. }
  142. return googleapi.UserAgent + " " + s.UserAgent
  143. }
  144. func NewBookshelvesService(s *Service) *BookshelvesService {
  145. rs := &BookshelvesService{s: s}
  146. rs.Volumes = NewBookshelvesVolumesService(s)
  147. return rs
  148. }
  149. type BookshelvesService struct {
  150. s *Service
  151. Volumes *BookshelvesVolumesService
  152. }
  153. func NewBookshelvesVolumesService(s *Service) *BookshelvesVolumesService {
  154. rs := &BookshelvesVolumesService{s: s}
  155. return rs
  156. }
  157. type BookshelvesVolumesService struct {
  158. s *Service
  159. }
  160. func NewCloudloadingService(s *Service) *CloudloadingService {
  161. rs := &CloudloadingService{s: s}
  162. return rs
  163. }
  164. type CloudloadingService struct {
  165. s *Service
  166. }
  167. func NewDictionaryService(s *Service) *DictionaryService {
  168. rs := &DictionaryService{s: s}
  169. return rs
  170. }
  171. type DictionaryService struct {
  172. s *Service
  173. }
  174. func NewFamilysharingService(s *Service) *FamilysharingService {
  175. rs := &FamilysharingService{s: s}
  176. return rs
  177. }
  178. type FamilysharingService struct {
  179. s *Service
  180. }
  181. func NewLayersService(s *Service) *LayersService {
  182. rs := &LayersService{s: s}
  183. rs.AnnotationData = NewLayersAnnotationDataService(s)
  184. rs.VolumeAnnotations = NewLayersVolumeAnnotationsService(s)
  185. return rs
  186. }
  187. type LayersService struct {
  188. s *Service
  189. AnnotationData *LayersAnnotationDataService
  190. VolumeAnnotations *LayersVolumeAnnotationsService
  191. }
  192. func NewLayersAnnotationDataService(s *Service) *LayersAnnotationDataService {
  193. rs := &LayersAnnotationDataService{s: s}
  194. return rs
  195. }
  196. type LayersAnnotationDataService struct {
  197. s *Service
  198. }
  199. func NewLayersVolumeAnnotationsService(s *Service) *LayersVolumeAnnotationsService {
  200. rs := &LayersVolumeAnnotationsService{s: s}
  201. return rs
  202. }
  203. type LayersVolumeAnnotationsService struct {
  204. s *Service
  205. }
  206. func NewMyconfigService(s *Service) *MyconfigService {
  207. rs := &MyconfigService{s: s}
  208. return rs
  209. }
  210. type MyconfigService struct {
  211. s *Service
  212. }
  213. func NewMylibraryService(s *Service) *MylibraryService {
  214. rs := &MylibraryService{s: s}
  215. rs.Annotations = NewMylibraryAnnotationsService(s)
  216. rs.Bookshelves = NewMylibraryBookshelvesService(s)
  217. rs.Readingpositions = NewMylibraryReadingpositionsService(s)
  218. return rs
  219. }
  220. type MylibraryService struct {
  221. s *Service
  222. Annotations *MylibraryAnnotationsService
  223. Bookshelves *MylibraryBookshelvesService
  224. Readingpositions *MylibraryReadingpositionsService
  225. }
  226. func NewMylibraryAnnotationsService(s *Service) *MylibraryAnnotationsService {
  227. rs := &MylibraryAnnotationsService{s: s}
  228. return rs
  229. }
  230. type MylibraryAnnotationsService struct {
  231. s *Service
  232. }
  233. func NewMylibraryBookshelvesService(s *Service) *MylibraryBookshelvesService {
  234. rs := &MylibraryBookshelvesService{s: s}
  235. rs.Volumes = NewMylibraryBookshelvesVolumesService(s)
  236. return rs
  237. }
  238. type MylibraryBookshelvesService struct {
  239. s *Service
  240. Volumes *MylibraryBookshelvesVolumesService
  241. }
  242. func NewMylibraryBookshelvesVolumesService(s *Service) *MylibraryBookshelvesVolumesService {
  243. rs := &MylibraryBookshelvesVolumesService{s: s}
  244. return rs
  245. }
  246. type MylibraryBookshelvesVolumesService struct {
  247. s *Service
  248. }
  249. func NewMylibraryReadingpositionsService(s *Service) *MylibraryReadingpositionsService {
  250. rs := &MylibraryReadingpositionsService{s: s}
  251. return rs
  252. }
  253. type MylibraryReadingpositionsService struct {
  254. s *Service
  255. }
  256. func NewNotificationService(s *Service) *NotificationService {
  257. rs := &NotificationService{s: s}
  258. return rs
  259. }
  260. type NotificationService struct {
  261. s *Service
  262. }
  263. func NewOnboardingService(s *Service) *OnboardingService {
  264. rs := &OnboardingService{s: s}
  265. return rs
  266. }
  267. type OnboardingService struct {
  268. s *Service
  269. }
  270. func NewPersonalizedstreamService(s *Service) *PersonalizedstreamService {
  271. rs := &PersonalizedstreamService{s: s}
  272. return rs
  273. }
  274. type PersonalizedstreamService struct {
  275. s *Service
  276. }
  277. func NewPromoofferService(s *Service) *PromoofferService {
  278. rs := &PromoofferService{s: s}
  279. return rs
  280. }
  281. type PromoofferService struct {
  282. s *Service
  283. }
  284. func NewSeriesService(s *Service) *SeriesService {
  285. rs := &SeriesService{s: s}
  286. rs.Membership = NewSeriesMembershipService(s)
  287. return rs
  288. }
  289. type SeriesService struct {
  290. s *Service
  291. Membership *SeriesMembershipService
  292. }
  293. func NewSeriesMembershipService(s *Service) *SeriesMembershipService {
  294. rs := &SeriesMembershipService{s: s}
  295. return rs
  296. }
  297. type SeriesMembershipService struct {
  298. s *Service
  299. }
  300. func NewVolumesService(s *Service) *VolumesService {
  301. rs := &VolumesService{s: s}
  302. rs.Associated = NewVolumesAssociatedService(s)
  303. rs.Mybooks = NewVolumesMybooksService(s)
  304. rs.Recommended = NewVolumesRecommendedService(s)
  305. rs.Useruploaded = NewVolumesUseruploadedService(s)
  306. return rs
  307. }
  308. type VolumesService struct {
  309. s *Service
  310. Associated *VolumesAssociatedService
  311. Mybooks *VolumesMybooksService
  312. Recommended *VolumesRecommendedService
  313. Useruploaded *VolumesUseruploadedService
  314. }
  315. func NewVolumesAssociatedService(s *Service) *VolumesAssociatedService {
  316. rs := &VolumesAssociatedService{s: s}
  317. return rs
  318. }
  319. type VolumesAssociatedService struct {
  320. s *Service
  321. }
  322. func NewVolumesMybooksService(s *Service) *VolumesMybooksService {
  323. rs := &VolumesMybooksService{s: s}
  324. return rs
  325. }
  326. type VolumesMybooksService struct {
  327. s *Service
  328. }
  329. func NewVolumesRecommendedService(s *Service) *VolumesRecommendedService {
  330. rs := &VolumesRecommendedService{s: s}
  331. return rs
  332. }
  333. type VolumesRecommendedService struct {
  334. s *Service
  335. }
  336. func NewVolumesUseruploadedService(s *Service) *VolumesUseruploadedService {
  337. rs := &VolumesUseruploadedService{s: s}
  338. return rs
  339. }
  340. type VolumesUseruploadedService struct {
  341. s *Service
  342. }
  343. type Annotation struct {
  344. // AfterSelectedText: Anchor text after excerpt. For requests, if the
  345. // user bookmarked a screen that has no flowing text on it, then this
  346. // field should be empty.
  347. AfterSelectedText string `json:"afterSelectedText,omitempty"`
  348. // BeforeSelectedText: Anchor text before excerpt. For requests, if the
  349. // user bookmarked a screen that has no flowing text on it, then this
  350. // field should be empty.
  351. BeforeSelectedText string `json:"beforeSelectedText,omitempty"`
  352. // ClientVersionRanges: Selection ranges sent from the client.
  353. ClientVersionRanges *AnnotationClientVersionRanges `json:"clientVersionRanges,omitempty"`
  354. // Created: Timestamp for the created time of this annotation.
  355. Created string `json:"created,omitempty"`
  356. // CurrentVersionRanges: Selection ranges for the most recent content
  357. // version.
  358. CurrentVersionRanges *AnnotationCurrentVersionRanges `json:"currentVersionRanges,omitempty"`
  359. // Data: User-created data for this annotation.
  360. Data string `json:"data,omitempty"`
  361. // Deleted: Indicates that this annotation is deleted.
  362. Deleted bool `json:"deleted,omitempty"`
  363. // HighlightStyle: The highlight style for this annotation.
  364. HighlightStyle string `json:"highlightStyle,omitempty"`
  365. // Id: Id of this annotation, in the form of a GUID.
  366. Id string `json:"id,omitempty"`
  367. // Kind: Resource type.
  368. Kind string `json:"kind,omitempty"`
  369. // LayerId: The layer this annotation is for.
  370. LayerId string `json:"layerId,omitempty"`
  371. LayerSummary *AnnotationLayerSummary `json:"layerSummary,omitempty"`
  372. // PageIds: Pages that this annotation spans.
  373. PageIds []string `json:"pageIds,omitempty"`
  374. // SelectedText: Excerpt from the volume.
  375. SelectedText string `json:"selectedText,omitempty"`
  376. // SelfLink: URL to this resource.
  377. SelfLink string `json:"selfLink,omitempty"`
  378. // Updated: Timestamp for the last time this annotation was modified.
  379. Updated string `json:"updated,omitempty"`
  380. // VolumeId: The volume that this annotation belongs to.
  381. VolumeId string `json:"volumeId,omitempty"`
  382. // ServerResponse contains the HTTP response code and headers from the
  383. // server.
  384. googleapi.ServerResponse `json:"-"`
  385. // ForceSendFields is a list of field names (e.g. "AfterSelectedText")
  386. // to unconditionally include in API requests. By default, fields with
  387. // empty values are omitted from API requests. However, any non-pointer,
  388. // non-interface field appearing in ForceSendFields will be sent to the
  389. // server regardless of whether the field is empty or not. This may be
  390. // used to include empty fields in Patch requests.
  391. ForceSendFields []string `json:"-"`
  392. // NullFields is a list of field names (e.g. "AfterSelectedText") to
  393. // include in API requests with the JSON null value. By default, fields
  394. // with empty values are omitted from API requests. However, any field
  395. // with an empty value appearing in NullFields will be sent to the
  396. // server as null. It is an error if a field in this list has a
  397. // non-empty value. This may be used to include null fields in Patch
  398. // requests.
  399. NullFields []string `json:"-"`
  400. }
  401. func (s *Annotation) MarshalJSON() ([]byte, error) {
  402. type NoMethod Annotation
  403. raw := NoMethod(*s)
  404. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  405. }
  406. // AnnotationClientVersionRanges: Selection ranges sent from the client.
  407. type AnnotationClientVersionRanges struct {
  408. // CfiRange: Range in CFI format for this annotation sent by client.
  409. CfiRange *BooksAnnotationsRange `json:"cfiRange,omitempty"`
  410. // ContentVersion: Content version the client sent in.
  411. ContentVersion string `json:"contentVersion,omitempty"`
  412. // GbImageRange: Range in GB image format for this annotation sent by
  413. // client.
  414. GbImageRange *BooksAnnotationsRange `json:"gbImageRange,omitempty"`
  415. // GbTextRange: Range in GB text format for this annotation sent by
  416. // client.
  417. GbTextRange *BooksAnnotationsRange `json:"gbTextRange,omitempty"`
  418. // ImageCfiRange: Range in image CFI format for this annotation sent by
  419. // client.
  420. ImageCfiRange *BooksAnnotationsRange `json:"imageCfiRange,omitempty"`
  421. // ForceSendFields is a list of field names (e.g. "CfiRange") to
  422. // unconditionally include in API requests. By default, fields with
  423. // empty values are omitted from API requests. However, any non-pointer,
  424. // non-interface field appearing in ForceSendFields will be sent to the
  425. // server regardless of whether the field is empty or not. This may be
  426. // used to include empty fields in Patch requests.
  427. ForceSendFields []string `json:"-"`
  428. // NullFields is a list of field names (e.g. "CfiRange") to include in
  429. // API requests with the JSON null value. By default, fields with empty
  430. // values are omitted from API requests. However, any field with an
  431. // empty value appearing in NullFields will be sent to the server as
  432. // null. It is an error if a field in this list has a non-empty value.
  433. // This may be used to include null fields in Patch requests.
  434. NullFields []string `json:"-"`
  435. }
  436. func (s *AnnotationClientVersionRanges) MarshalJSON() ([]byte, error) {
  437. type NoMethod AnnotationClientVersionRanges
  438. raw := NoMethod(*s)
  439. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  440. }
  441. // AnnotationCurrentVersionRanges: Selection ranges for the most recent
  442. // content version.
  443. type AnnotationCurrentVersionRanges struct {
  444. // CfiRange: Range in CFI format for this annotation for version above.
  445. CfiRange *BooksAnnotationsRange `json:"cfiRange,omitempty"`
  446. // ContentVersion: Content version applicable to ranges below.
  447. ContentVersion string `json:"contentVersion,omitempty"`
  448. // GbImageRange: Range in GB image format for this annotation for
  449. // version above.
  450. GbImageRange *BooksAnnotationsRange `json:"gbImageRange,omitempty"`
  451. // GbTextRange: Range in GB text format for this annotation for version
  452. // above.
  453. GbTextRange *BooksAnnotationsRange `json:"gbTextRange,omitempty"`
  454. // ImageCfiRange: Range in image CFI format for this annotation for
  455. // version above.
  456. ImageCfiRange *BooksAnnotationsRange `json:"imageCfiRange,omitempty"`
  457. // ForceSendFields is a list of field names (e.g. "CfiRange") to
  458. // unconditionally include in API requests. By default, fields with
  459. // empty values are omitted from API requests. However, any non-pointer,
  460. // non-interface field appearing in ForceSendFields will be sent to the
  461. // server regardless of whether the field is empty or not. This may be
  462. // used to include empty fields in Patch requests.
  463. ForceSendFields []string `json:"-"`
  464. // NullFields is a list of field names (e.g. "CfiRange") to include in
  465. // API requests with the JSON null value. By default, fields with empty
  466. // values are omitted from API requests. However, any field with an
  467. // empty value appearing in NullFields will be sent to the server as
  468. // null. It is an error if a field in this list has a non-empty value.
  469. // This may be used to include null fields in Patch requests.
  470. NullFields []string `json:"-"`
  471. }
  472. func (s *AnnotationCurrentVersionRanges) MarshalJSON() ([]byte, error) {
  473. type NoMethod AnnotationCurrentVersionRanges
  474. raw := NoMethod(*s)
  475. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  476. }
  477. type AnnotationLayerSummary struct {
  478. // AllowedCharacterCount: Maximum allowed characters on this layer,
  479. // especially for the "copy" layer.
  480. AllowedCharacterCount int64 `json:"allowedCharacterCount,omitempty"`
  481. // LimitType: Type of limitation on this layer. "limited" or "unlimited"
  482. // for the "copy" layer.
  483. LimitType string `json:"limitType,omitempty"`
  484. // RemainingCharacterCount: Remaining allowed characters on this layer,
  485. // especially for the "copy" layer.
  486. RemainingCharacterCount int64 `json:"remainingCharacterCount,omitempty"`
  487. // ForceSendFields is a list of field names (e.g.
  488. // "AllowedCharacterCount") to unconditionally include in API requests.
  489. // By default, fields with empty values are omitted from API requests.
  490. // However, any non-pointer, non-interface field appearing in
  491. // ForceSendFields will be sent to the server regardless of whether the
  492. // field is empty or not. This may be used to include empty fields in
  493. // Patch requests.
  494. ForceSendFields []string `json:"-"`
  495. // NullFields is a list of field names (e.g. "AllowedCharacterCount") to
  496. // include in API requests with the JSON null value. By default, fields
  497. // with empty values are omitted from API requests. However, any field
  498. // with an empty value appearing in NullFields will be sent to the
  499. // server as null. It is an error if a field in this list has a
  500. // non-empty value. This may be used to include null fields in Patch
  501. // requests.
  502. NullFields []string `json:"-"`
  503. }
  504. func (s *AnnotationLayerSummary) MarshalJSON() ([]byte, error) {
  505. type NoMethod AnnotationLayerSummary
  506. raw := NoMethod(*s)
  507. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  508. }
  509. type Annotationdata struct {
  510. // AnnotationType: The type of annotation this data is for.
  511. AnnotationType string `json:"annotationType,omitempty"`
  512. Data interface{} `json:"data,omitempty"`
  513. // EncodedData: Base64 encoded data for this annotation data.
  514. EncodedData string `json:"encoded_data,omitempty"`
  515. // Id: Unique id for this annotation data.
  516. Id string `json:"id,omitempty"`
  517. // Kind: Resource Type
  518. Kind string `json:"kind,omitempty"`
  519. // LayerId: The Layer id for this data. *
  520. LayerId string `json:"layerId,omitempty"`
  521. // SelfLink: URL for this resource. *
  522. SelfLink string `json:"selfLink,omitempty"`
  523. // Updated: Timestamp for the last time this data was updated. (RFC 3339
  524. // UTC date-time format).
  525. Updated string `json:"updated,omitempty"`
  526. // VolumeId: The volume id for this data. *
  527. VolumeId string `json:"volumeId,omitempty"`
  528. // ServerResponse contains the HTTP response code and headers from the
  529. // server.
  530. googleapi.ServerResponse `json:"-"`
  531. // ForceSendFields is a list of field names (e.g. "AnnotationType") to
  532. // unconditionally include in API requests. By default, fields with
  533. // empty values are omitted from API requests. However, any non-pointer,
  534. // non-interface field appearing in ForceSendFields will be sent to the
  535. // server regardless of whether the field is empty or not. This may be
  536. // used to include empty fields in Patch requests.
  537. ForceSendFields []string `json:"-"`
  538. // NullFields is a list of field names (e.g. "AnnotationType") to
  539. // include in API requests with the JSON null value. By default, fields
  540. // with empty values are omitted from API requests. However, any field
  541. // with an empty value appearing in NullFields will be sent to the
  542. // server as null. It is an error if a field in this list has a
  543. // non-empty value. This may be used to include null fields in Patch
  544. // requests.
  545. NullFields []string `json:"-"`
  546. }
  547. func (s *Annotationdata) MarshalJSON() ([]byte, error) {
  548. type NoMethod Annotationdata
  549. raw := NoMethod(*s)
  550. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  551. }
  552. type Annotations struct {
  553. // Items: A list of annotations.
  554. Items []*Annotation `json:"items,omitempty"`
  555. // Kind: Resource type.
  556. Kind string `json:"kind,omitempty"`
  557. // NextPageToken: Token to pass in for pagination for the next page.
  558. // This will not be present if this request does not have more results.
  559. NextPageToken string `json:"nextPageToken,omitempty"`
  560. // TotalItems: Total number of annotations found. This may be greater
  561. // than the number of notes returned in this response if results have
  562. // been paginated.
  563. TotalItems int64 `json:"totalItems,omitempty"`
  564. // ServerResponse contains the HTTP response code and headers from the
  565. // server.
  566. googleapi.ServerResponse `json:"-"`
  567. // ForceSendFields is a list of field names (e.g. "Items") to
  568. // unconditionally include in API requests. By default, fields with
  569. // empty values are omitted from API requests. However, any non-pointer,
  570. // non-interface field appearing in ForceSendFields will be sent to the
  571. // server regardless of whether the field is empty or not. This may be
  572. // used to include empty fields in Patch requests.
  573. ForceSendFields []string `json:"-"`
  574. // NullFields is a list of field names (e.g. "Items") to include in API
  575. // requests with the JSON null value. By default, fields with empty
  576. // values are omitted from API requests. However, any field with an
  577. // empty value appearing in NullFields will be sent to the server as
  578. // null. It is an error if a field in this list has a non-empty value.
  579. // This may be used to include null fields in Patch requests.
  580. NullFields []string `json:"-"`
  581. }
  582. func (s *Annotations) MarshalJSON() ([]byte, error) {
  583. type NoMethod Annotations
  584. raw := NoMethod(*s)
  585. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  586. }
  587. type AnnotationsSummary struct {
  588. Kind string `json:"kind,omitempty"`
  589. Layers []*AnnotationsSummaryLayers `json:"layers,omitempty"`
  590. // ServerResponse contains the HTTP response code and headers from the
  591. // server.
  592. googleapi.ServerResponse `json:"-"`
  593. // ForceSendFields is a list of field names (e.g. "Kind") to
  594. // unconditionally include in API requests. By default, fields with
  595. // empty values are omitted from API requests. However, any non-pointer,
  596. // non-interface field appearing in ForceSendFields will be sent to the
  597. // server regardless of whether the field is empty or not. This may be
  598. // used to include empty fields in Patch requests.
  599. ForceSendFields []string `json:"-"`
  600. // NullFields is a list of field names (e.g. "Kind") to include in API
  601. // requests with the JSON null value. By default, fields with empty
  602. // values are omitted from API requests. However, any field with an
  603. // empty value appearing in NullFields will be sent to the server as
  604. // null. It is an error if a field in this list has a non-empty value.
  605. // This may be used to include null fields in Patch requests.
  606. NullFields []string `json:"-"`
  607. }
  608. func (s *AnnotationsSummary) MarshalJSON() ([]byte, error) {
  609. type NoMethod AnnotationsSummary
  610. raw := NoMethod(*s)
  611. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  612. }
  613. type AnnotationsSummaryLayers struct {
  614. AllowedCharacterCount int64 `json:"allowedCharacterCount,omitempty"`
  615. LayerId string `json:"layerId,omitempty"`
  616. LimitType string `json:"limitType,omitempty"`
  617. RemainingCharacterCount int64 `json:"remainingCharacterCount,omitempty"`
  618. Updated string `json:"updated,omitempty"`
  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. // NullFields is a list of field names (e.g. "AllowedCharacterCount") to
  628. // include in API requests with the JSON null value. By default, fields
  629. // with empty values are omitted from API requests. However, any field
  630. // with an empty value appearing in NullFields will be sent to the
  631. // server as null. It is an error if a field in this list has a
  632. // non-empty value. This may be used to include null fields in Patch
  633. // requests.
  634. NullFields []string `json:"-"`
  635. }
  636. func (s *AnnotationsSummaryLayers) MarshalJSON() ([]byte, error) {
  637. type NoMethod AnnotationsSummaryLayers
  638. raw := NoMethod(*s)
  639. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  640. }
  641. type Annotationsdata struct {
  642. // Items: A list of Annotation Data.
  643. Items []*Annotationdata `json:"items,omitempty"`
  644. // Kind: Resource type
  645. Kind string `json:"kind,omitempty"`
  646. // NextPageToken: Token to pass in for pagination for the next page.
  647. // This will not be present if this request does not have more results.
  648. NextPageToken string `json:"nextPageToken,omitempty"`
  649. // TotalItems: The total number of volume annotations found.
  650. TotalItems int64 `json:"totalItems,omitempty"`
  651. // ServerResponse contains the HTTP response code and headers from the
  652. // server.
  653. googleapi.ServerResponse `json:"-"`
  654. // ForceSendFields is a list of field names (e.g. "Items") to
  655. // unconditionally include in API requests. By default, fields with
  656. // empty values are omitted from API requests. However, any non-pointer,
  657. // non-interface field appearing in ForceSendFields will be sent to the
  658. // server regardless of whether the field is empty or not. This may be
  659. // used to include empty fields in Patch requests.
  660. ForceSendFields []string `json:"-"`
  661. // NullFields is a list of field names (e.g. "Items") to include in API
  662. // requests with the JSON null value. By default, fields with empty
  663. // values are omitted from API requests. However, any field with an
  664. // empty value appearing in NullFields will be sent to the server as
  665. // null. It is an error if a field in this list has a non-empty value.
  666. // This may be used to include null fields in Patch requests.
  667. NullFields []string `json:"-"`
  668. }
  669. func (s *Annotationsdata) MarshalJSON() ([]byte, error) {
  670. type NoMethod Annotationsdata
  671. raw := NoMethod(*s)
  672. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  673. }
  674. type BooksAnnotationsRange struct {
  675. // EndOffset: The offset from the ending position.
  676. EndOffset string `json:"endOffset,omitempty"`
  677. // EndPosition: The ending position for the range.
  678. EndPosition string `json:"endPosition,omitempty"`
  679. // StartOffset: The offset from the starting position.
  680. StartOffset string `json:"startOffset,omitempty"`
  681. // StartPosition: The starting position for the range.
  682. StartPosition string `json:"startPosition,omitempty"`
  683. // ForceSendFields is a list of field names (e.g. "EndOffset") to
  684. // unconditionally include in API requests. By default, fields with
  685. // empty values are omitted from API requests. However, any non-pointer,
  686. // non-interface field appearing in ForceSendFields will be sent to the
  687. // server regardless of whether the field is empty or not. This may be
  688. // used to include empty fields in Patch requests.
  689. ForceSendFields []string `json:"-"`
  690. // NullFields is a list of field names (e.g. "EndOffset") to include in
  691. // API requests with the JSON null value. By default, fields with empty
  692. // values are omitted from API requests. However, any field with an
  693. // empty value appearing in NullFields will be sent to the server as
  694. // null. It is an error if a field in this list has a non-empty value.
  695. // This may be used to include null fields in Patch requests.
  696. NullFields []string `json:"-"`
  697. }
  698. func (s *BooksAnnotationsRange) MarshalJSON() ([]byte, error) {
  699. type NoMethod BooksAnnotationsRange
  700. raw := NoMethod(*s)
  701. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  702. }
  703. type BooksCloudloadingResource struct {
  704. Author string `json:"author,omitempty"`
  705. ProcessingState string `json:"processingState,omitempty"`
  706. Title string `json:"title,omitempty"`
  707. VolumeId string `json:"volumeId,omitempty"`
  708. // ServerResponse contains the HTTP response code and headers from the
  709. // server.
  710. googleapi.ServerResponse `json:"-"`
  711. // ForceSendFields is a list of field names (e.g. "Author") to
  712. // unconditionally include in API requests. By default, fields with
  713. // empty values are omitted from API requests. However, any non-pointer,
  714. // non-interface field appearing in ForceSendFields will be sent to the
  715. // server regardless of whether the field is empty or not. This may be
  716. // used to include empty fields in Patch requests.
  717. ForceSendFields []string `json:"-"`
  718. // NullFields is a list of field names (e.g. "Author") to include in API
  719. // requests with the JSON null value. By default, fields with empty
  720. // values are omitted from API requests. However, any field with an
  721. // empty value appearing in NullFields will be sent to the server as
  722. // null. It is an error if a field in this list has a non-empty value.
  723. // This may be used to include null fields in Patch requests.
  724. NullFields []string `json:"-"`
  725. }
  726. func (s *BooksCloudloadingResource) MarshalJSON() ([]byte, error) {
  727. type NoMethod BooksCloudloadingResource
  728. raw := NoMethod(*s)
  729. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  730. }
  731. type BooksVolumesRecommendedRateResponse struct {
  732. ConsistencyToken string `json:"consistency_token,omitempty"`
  733. // ServerResponse contains the HTTP response code and headers from the
  734. // server.
  735. googleapi.ServerResponse `json:"-"`
  736. // ForceSendFields is a list of field names (e.g. "ConsistencyToken") to
  737. // unconditionally include in API requests. By default, fields with
  738. // empty values are omitted from API requests. However, any non-pointer,
  739. // non-interface field appearing in ForceSendFields will be sent to the
  740. // server regardless of whether the field is empty or not. This may be
  741. // used to include empty fields in Patch requests.
  742. ForceSendFields []string `json:"-"`
  743. // NullFields is a list of field names (e.g. "ConsistencyToken") to
  744. // include in API requests with the JSON null value. By default, fields
  745. // with empty values are omitted from API requests. However, any field
  746. // with an empty value appearing in NullFields will be sent to the
  747. // server as null. It is an error if a field in this list has a
  748. // non-empty value. This may be used to include null fields in Patch
  749. // requests.
  750. NullFields []string `json:"-"`
  751. }
  752. func (s *BooksVolumesRecommendedRateResponse) MarshalJSON() ([]byte, error) {
  753. type NoMethod BooksVolumesRecommendedRateResponse
  754. raw := NoMethod(*s)
  755. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  756. }
  757. type Bookshelf struct {
  758. // Access: Whether this bookshelf is PUBLIC or PRIVATE.
  759. Access string `json:"access,omitempty"`
  760. // Created: Created time for this bookshelf (formatted UTC timestamp
  761. // with millisecond resolution).
  762. Created string `json:"created,omitempty"`
  763. // Description: Description of this bookshelf.
  764. Description string `json:"description,omitempty"`
  765. // Id: Id of this bookshelf, only unique by user.
  766. Id int64 `json:"id,omitempty"`
  767. // Kind: Resource type for bookshelf metadata.
  768. Kind string `json:"kind,omitempty"`
  769. // SelfLink: URL to this resource.
  770. SelfLink string `json:"selfLink,omitempty"`
  771. // Title: Title of this bookshelf.
  772. Title string `json:"title,omitempty"`
  773. // Updated: Last modified time of this bookshelf (formatted UTC
  774. // timestamp with millisecond resolution).
  775. Updated string `json:"updated,omitempty"`
  776. // VolumeCount: Number of volumes in this bookshelf.
  777. VolumeCount int64 `json:"volumeCount,omitempty"`
  778. // VolumesLastUpdated: Last time a volume was added or removed from this
  779. // bookshelf (formatted UTC timestamp with millisecond resolution).
  780. VolumesLastUpdated string `json:"volumesLastUpdated,omitempty"`
  781. // ServerResponse contains the HTTP response code and headers from the
  782. // server.
  783. googleapi.ServerResponse `json:"-"`
  784. // ForceSendFields is a list of field names (e.g. "Access") to
  785. // unconditionally include in API requests. By default, fields with
  786. // empty values are omitted from API requests. However, any non-pointer,
  787. // non-interface field appearing in ForceSendFields will be sent to the
  788. // server regardless of whether the field is empty or not. This may be
  789. // used to include empty fields in Patch requests.
  790. ForceSendFields []string `json:"-"`
  791. // NullFields is a list of field names (e.g. "Access") to include in API
  792. // requests with the JSON null value. By default, fields with empty
  793. // values are omitted from API requests. However, any field with an
  794. // empty value appearing in NullFields will be sent to the server as
  795. // null. It is an error if a field in this list has a non-empty value.
  796. // This may be used to include null fields in Patch requests.
  797. NullFields []string `json:"-"`
  798. }
  799. func (s *Bookshelf) MarshalJSON() ([]byte, error) {
  800. type NoMethod Bookshelf
  801. raw := NoMethod(*s)
  802. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  803. }
  804. type Bookshelves struct {
  805. // Items: A list of bookshelves.
  806. Items []*Bookshelf `json:"items,omitempty"`
  807. // Kind: Resource type.
  808. Kind string `json:"kind,omitempty"`
  809. // ServerResponse contains the HTTP response code and headers from the
  810. // server.
  811. googleapi.ServerResponse `json:"-"`
  812. // ForceSendFields is a list of field names (e.g. "Items") to
  813. // unconditionally include in API requests. By default, fields with
  814. // empty values are omitted from API requests. However, any non-pointer,
  815. // non-interface field appearing in ForceSendFields will be sent to the
  816. // server regardless of whether the field is empty or not. This may be
  817. // used to include empty fields in Patch requests.
  818. ForceSendFields []string `json:"-"`
  819. // NullFields is a list of field names (e.g. "Items") to include in API
  820. // requests with the JSON null value. By default, fields with empty
  821. // values are omitted from API requests. However, any field with an
  822. // empty value appearing in NullFields will be sent to the server as
  823. // null. It is an error if a field in this list has a non-empty value.
  824. // This may be used to include null fields in Patch requests.
  825. NullFields []string `json:"-"`
  826. }
  827. func (s *Bookshelves) MarshalJSON() ([]byte, error) {
  828. type NoMethod Bookshelves
  829. raw := NoMethod(*s)
  830. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  831. }
  832. type Category struct {
  833. // Items: A list of onboarding categories.
  834. Items []*CategoryItems `json:"items,omitempty"`
  835. // Kind: Resource type.
  836. Kind string `json:"kind,omitempty"`
  837. // ServerResponse contains the HTTP response code and headers from the
  838. // server.
  839. googleapi.ServerResponse `json:"-"`
  840. // ForceSendFields is a list of field names (e.g. "Items") to
  841. // unconditionally include in API requests. By default, fields with
  842. // empty values are omitted from API requests. However, any non-pointer,
  843. // non-interface field appearing in ForceSendFields will be sent to the
  844. // server regardless of whether the field is empty or not. This may be
  845. // used to include empty fields in Patch requests.
  846. ForceSendFields []string `json:"-"`
  847. // NullFields is a list of field names (e.g. "Items") to include in API
  848. // requests with the JSON null value. By default, fields with empty
  849. // values are omitted from API requests. However, any field with an
  850. // empty value appearing in NullFields will be sent to the server as
  851. // null. It is an error if a field in this list has a non-empty value.
  852. // This may be used to include null fields in Patch requests.
  853. NullFields []string `json:"-"`
  854. }
  855. func (s *Category) MarshalJSON() ([]byte, error) {
  856. type NoMethod Category
  857. raw := NoMethod(*s)
  858. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  859. }
  860. type CategoryItems struct {
  861. BadgeUrl string `json:"badgeUrl,omitempty"`
  862. CategoryId string `json:"categoryId,omitempty"`
  863. Name string `json:"name,omitempty"`
  864. // ForceSendFields is a list of field names (e.g. "BadgeUrl") to
  865. // unconditionally include in API requests. By default, fields with
  866. // empty values are omitted from API requests. However, any non-pointer,
  867. // non-interface field appearing in ForceSendFields will be sent to the
  868. // server regardless of whether the field is empty or not. This may be
  869. // used to include empty fields in Patch requests.
  870. ForceSendFields []string `json:"-"`
  871. // NullFields is a list of field names (e.g. "BadgeUrl") to include in
  872. // API requests with the JSON null value. By default, fields with empty
  873. // values are omitted from API requests. However, any field with an
  874. // empty value appearing in NullFields will be sent to the server as
  875. // null. It is an error if a field in this list has a non-empty value.
  876. // This may be used to include null fields in Patch requests.
  877. NullFields []string `json:"-"`
  878. }
  879. func (s *CategoryItems) MarshalJSON() ([]byte, error) {
  880. type NoMethod CategoryItems
  881. raw := NoMethod(*s)
  882. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  883. }
  884. type ConcurrentAccessRestriction struct {
  885. // DeviceAllowed: Whether access is granted for this (user, device,
  886. // volume).
  887. DeviceAllowed bool `json:"deviceAllowed,omitempty"`
  888. // Kind: Resource type.
  889. Kind string `json:"kind,omitempty"`
  890. // MaxConcurrentDevices: The maximum number of concurrent access
  891. // licenses for this volume.
  892. MaxConcurrentDevices int64 `json:"maxConcurrentDevices,omitempty"`
  893. // Message: Error/warning message.
  894. Message string `json:"message,omitempty"`
  895. // Nonce: Client nonce for verification. Download access and
  896. // client-validation only.
  897. Nonce string `json:"nonce,omitempty"`
  898. // ReasonCode: Error/warning reason code.
  899. ReasonCode string `json:"reasonCode,omitempty"`
  900. // Restricted: Whether this volume has any concurrent access
  901. // restrictions.
  902. Restricted bool `json:"restricted,omitempty"`
  903. // Signature: Response signature.
  904. Signature string `json:"signature,omitempty"`
  905. // Source: Client app identifier for verification. Download access and
  906. // client-validation only.
  907. Source string `json:"source,omitempty"`
  908. // TimeWindowSeconds: Time in seconds for license auto-expiration.
  909. TimeWindowSeconds int64 `json:"timeWindowSeconds,omitempty"`
  910. // VolumeId: Identifies the volume for which this entry applies.
  911. VolumeId string `json:"volumeId,omitempty"`
  912. // ForceSendFields is a list of field names (e.g. "DeviceAllowed") to
  913. // unconditionally include in API requests. By default, fields with
  914. // empty values are omitted from API requests. However, any non-pointer,
  915. // non-interface field appearing in ForceSendFields will be sent to the
  916. // server regardless of whether the field is empty or not. This may be
  917. // used to include empty fields in Patch requests.
  918. ForceSendFields []string `json:"-"`
  919. // NullFields is a list of field names (e.g. "DeviceAllowed") to include
  920. // in API requests with the JSON null value. By default, fields with
  921. // empty values are omitted from API requests. However, any field with
  922. // an empty value appearing in NullFields will be sent to the server as
  923. // null. It is an error if a field in this list has a non-empty value.
  924. // This may be used to include null fields in Patch requests.
  925. NullFields []string `json:"-"`
  926. }
  927. func (s *ConcurrentAccessRestriction) MarshalJSON() ([]byte, error) {
  928. type NoMethod ConcurrentAccessRestriction
  929. raw := NoMethod(*s)
  930. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  931. }
  932. type Dictlayerdata struct {
  933. Common *DictlayerdataCommon `json:"common,omitempty"`
  934. Dict *DictlayerdataDict `json:"dict,omitempty"`
  935. Kind string `json:"kind,omitempty"`
  936. // ForceSendFields is a list of field names (e.g. "Common") to
  937. // unconditionally include in API requests. By default, fields with
  938. // empty values are omitted from API requests. However, any non-pointer,
  939. // non-interface field appearing in ForceSendFields will be sent to the
  940. // server regardless of whether the field is empty or not. This may be
  941. // used to include empty fields in Patch requests.
  942. ForceSendFields []string `json:"-"`
  943. // NullFields is a list of field names (e.g. "Common") to include in API
  944. // requests with the JSON null value. By default, fields with empty
  945. // values are omitted from API requests. However, any field with an
  946. // empty value appearing in NullFields will be sent to the server as
  947. // null. It is an error if a field in this list has a non-empty value.
  948. // This may be used to include null fields in Patch requests.
  949. NullFields []string `json:"-"`
  950. }
  951. func (s *Dictlayerdata) MarshalJSON() ([]byte, error) {
  952. type NoMethod Dictlayerdata
  953. raw := NoMethod(*s)
  954. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  955. }
  956. type DictlayerdataCommon struct {
  957. // Title: The display title and localized canonical name to use when
  958. // searching for this entity on Google search.
  959. Title string `json:"title,omitempty"`
  960. // ForceSendFields is a list of field names (e.g. "Title") to
  961. // unconditionally include in API requests. By default, fields with
  962. // empty values are omitted from API requests. However, any non-pointer,
  963. // non-interface field appearing in ForceSendFields will be sent to the
  964. // server regardless of whether the field is empty or not. This may be
  965. // used to include empty fields in Patch requests.
  966. ForceSendFields []string `json:"-"`
  967. // NullFields is a list of field names (e.g. "Title") to include in API
  968. // requests with the JSON null value. By default, fields with empty
  969. // values are omitted from API requests. However, any field with an
  970. // empty value appearing in NullFields will be sent to the server as
  971. // null. It is an error if a field in this list has a non-empty value.
  972. // This may be used to include null fields in Patch requests.
  973. NullFields []string `json:"-"`
  974. }
  975. func (s *DictlayerdataCommon) MarshalJSON() ([]byte, error) {
  976. type NoMethod DictlayerdataCommon
  977. raw := NoMethod(*s)
  978. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  979. }
  980. type DictlayerdataDict struct {
  981. // Source: The source, url and attribution for this dictionary data.
  982. Source *DictlayerdataDictSource `json:"source,omitempty"`
  983. Words []*DictlayerdataDictWords `json:"words,omitempty"`
  984. // ForceSendFields is a list of field names (e.g. "Source") to
  985. // unconditionally include in API requests. By default, fields with
  986. // empty values are omitted from API requests. However, any non-pointer,
  987. // non-interface field appearing in ForceSendFields will be sent to the
  988. // server regardless of whether the field is empty or not. This may be
  989. // used to include empty fields in Patch requests.
  990. ForceSendFields []string `json:"-"`
  991. // NullFields is a list of field names (e.g. "Source") to include in API
  992. // requests with the JSON null value. By default, fields with empty
  993. // values are omitted from API requests. However, any field with an
  994. // empty value appearing in NullFields will be sent to the server as
  995. // null. It is an error if a field in this list has a non-empty value.
  996. // This may be used to include null fields in Patch requests.
  997. NullFields []string `json:"-"`
  998. }
  999. func (s *DictlayerdataDict) MarshalJSON() ([]byte, error) {
  1000. type NoMethod DictlayerdataDict
  1001. raw := NoMethod(*s)
  1002. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1003. }
  1004. // DictlayerdataDictSource: The source, url and attribution for this
  1005. // dictionary data.
  1006. type DictlayerdataDictSource struct {
  1007. Attribution string `json:"attribution,omitempty"`
  1008. Url string `json:"url,omitempty"`
  1009. // ForceSendFields is a list of field names (e.g. "Attribution") to
  1010. // unconditionally include in API requests. By default, fields with
  1011. // empty values are omitted from API requests. However, any non-pointer,
  1012. // non-interface field appearing in ForceSendFields will be sent to the
  1013. // server regardless of whether the field is empty or not. This may be
  1014. // used to include empty fields in Patch requests.
  1015. ForceSendFields []string `json:"-"`
  1016. // NullFields is a list of field names (e.g. "Attribution") to include
  1017. // in API requests with the JSON null value. By default, fields with
  1018. // empty values are omitted from API requests. However, any field with
  1019. // an empty value appearing in NullFields will be sent to the server as
  1020. // null. It is an error if a field in this list has a non-empty value.
  1021. // This may be used to include null fields in Patch requests.
  1022. NullFields []string `json:"-"`
  1023. }
  1024. func (s *DictlayerdataDictSource) MarshalJSON() ([]byte, error) {
  1025. type NoMethod DictlayerdataDictSource
  1026. raw := NoMethod(*s)
  1027. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1028. }
  1029. type DictlayerdataDictWords struct {
  1030. Derivatives []*DictlayerdataDictWordsDerivatives `json:"derivatives,omitempty"`
  1031. Examples []*DictlayerdataDictWordsExamples `json:"examples,omitempty"`
  1032. Senses []*DictlayerdataDictWordsSenses `json:"senses,omitempty"`
  1033. // Source: The words with different meanings but not related words, e.g.
  1034. // "go" (game) and "go" (verb).
  1035. Source *DictlayerdataDictWordsSource `json:"source,omitempty"`
  1036. // ForceSendFields is a list of field names (e.g. "Derivatives") to
  1037. // unconditionally include in API requests. By default, fields with
  1038. // empty values are omitted from API requests. However, any non-pointer,
  1039. // non-interface field appearing in ForceSendFields will be sent to the
  1040. // server regardless of whether the field is empty or not. This may be
  1041. // used to include empty fields in Patch requests.
  1042. ForceSendFields []string `json:"-"`
  1043. // NullFields is a list of field names (e.g. "Derivatives") to include
  1044. // in API requests with the JSON null value. By default, fields with
  1045. // empty values are omitted from API requests. However, any field with
  1046. // an 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. func (s *DictlayerdataDictWords) MarshalJSON() ([]byte, error) {
  1052. type NoMethod DictlayerdataDictWords
  1053. raw := NoMethod(*s)
  1054. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1055. }
  1056. type DictlayerdataDictWordsDerivatives struct {
  1057. Source *DictlayerdataDictWordsDerivativesSource `json:"source,omitempty"`
  1058. Text string `json:"text,omitempty"`
  1059. // ForceSendFields is a list of field names (e.g. "Source") to
  1060. // unconditionally include in API requests. By default, fields with
  1061. // empty values are omitted from API requests. However, any non-pointer,
  1062. // non-interface field appearing in ForceSendFields will be sent to the
  1063. // server regardless of whether the field is empty or not. This may be
  1064. // used to include empty fields in Patch requests.
  1065. ForceSendFields []string `json:"-"`
  1066. // NullFields is a list of field names (e.g. "Source") to include in API
  1067. // requests with the JSON null value. By default, fields with empty
  1068. // values are omitted from API requests. However, any field with an
  1069. // empty value appearing in NullFields will be sent to the server as
  1070. // null. It is an error if a field in this list has a non-empty value.
  1071. // This may be used to include null fields in Patch requests.
  1072. NullFields []string `json:"-"`
  1073. }
  1074. func (s *DictlayerdataDictWordsDerivatives) MarshalJSON() ([]byte, error) {
  1075. type NoMethod DictlayerdataDictWordsDerivatives
  1076. raw := NoMethod(*s)
  1077. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1078. }
  1079. type DictlayerdataDictWordsDerivativesSource struct {
  1080. Attribution string `json:"attribution,omitempty"`
  1081. Url string `json:"url,omitempty"`
  1082. // ForceSendFields is a list of field names (e.g. "Attribution") to
  1083. // unconditionally include in API requests. By default, fields with
  1084. // empty values are omitted from API requests. However, any non-pointer,
  1085. // non-interface field appearing in ForceSendFields will be sent to the
  1086. // server regardless of whether the field is empty or not. This may be
  1087. // used to include empty fields in Patch requests.
  1088. ForceSendFields []string `json:"-"`
  1089. // NullFields is a list of field names (e.g. "Attribution") to include
  1090. // in API requests with the JSON null value. By default, fields with
  1091. // empty values are omitted from API requests. However, any field with
  1092. // an empty value appearing in NullFields will be sent to the server as
  1093. // null. It is an error if a field in this list has a non-empty value.
  1094. // This may be used to include null fields in Patch requests.
  1095. NullFields []string `json:"-"`
  1096. }
  1097. func (s *DictlayerdataDictWordsDerivativesSource) MarshalJSON() ([]byte, error) {
  1098. type NoMethod DictlayerdataDictWordsDerivativesSource
  1099. raw := NoMethod(*s)
  1100. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1101. }
  1102. type DictlayerdataDictWordsExamples struct {
  1103. Source *DictlayerdataDictWordsExamplesSource `json:"source,omitempty"`
  1104. Text string `json:"text,omitempty"`
  1105. // ForceSendFields is a list of field names (e.g. "Source") to
  1106. // unconditionally include in API requests. By default, fields with
  1107. // empty values are omitted from API requests. However, any non-pointer,
  1108. // non-interface field appearing in ForceSendFields will be sent to the
  1109. // server regardless of whether the field is empty or not. This may be
  1110. // used to include empty fields in Patch requests.
  1111. ForceSendFields []string `json:"-"`
  1112. // NullFields is a list of field names (e.g. "Source") to include in API
  1113. // requests with the JSON null value. By default, fields with empty
  1114. // values are omitted from API requests. However, any field with an
  1115. // empty value appearing in NullFields will be sent to the server as
  1116. // null. It is an error if a field in this list has a non-empty value.
  1117. // This may be used to include null fields in Patch requests.
  1118. NullFields []string `json:"-"`
  1119. }
  1120. func (s *DictlayerdataDictWordsExamples) MarshalJSON() ([]byte, error) {
  1121. type NoMethod DictlayerdataDictWordsExamples
  1122. raw := NoMethod(*s)
  1123. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1124. }
  1125. type DictlayerdataDictWordsExamplesSource struct {
  1126. Attribution string `json:"attribution,omitempty"`
  1127. Url string `json:"url,omitempty"`
  1128. // ForceSendFields is a list of field names (e.g. "Attribution") to
  1129. // unconditionally include in API requests. By default, fields with
  1130. // empty values are omitted from API requests. However, any non-pointer,
  1131. // non-interface field appearing in ForceSendFields will be sent to the
  1132. // server regardless of whether the field is empty or not. This may be
  1133. // used to include empty fields in Patch requests.
  1134. ForceSendFields []string `json:"-"`
  1135. // NullFields is a list of field names (e.g. "Attribution") to include
  1136. // in API requests with the JSON null value. By default, fields with
  1137. // empty values are omitted from API requests. However, any field with
  1138. // an empty value appearing in NullFields will be sent to the server as
  1139. // null. It is an error if a field in this list has a non-empty value.
  1140. // This may be used to include null fields in Patch requests.
  1141. NullFields []string `json:"-"`
  1142. }
  1143. func (s *DictlayerdataDictWordsExamplesSource) MarshalJSON() ([]byte, error) {
  1144. type NoMethod DictlayerdataDictWordsExamplesSource
  1145. raw := NoMethod(*s)
  1146. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1147. }
  1148. type DictlayerdataDictWordsSenses struct {
  1149. Conjugations []*DictlayerdataDictWordsSensesConjugations `json:"conjugations,omitempty"`
  1150. Definitions []*DictlayerdataDictWordsSensesDefinitions `json:"definitions,omitempty"`
  1151. PartOfSpeech string `json:"partOfSpeech,omitempty"`
  1152. Pronunciation string `json:"pronunciation,omitempty"`
  1153. PronunciationUrl string `json:"pronunciationUrl,omitempty"`
  1154. Source *DictlayerdataDictWordsSensesSource `json:"source,omitempty"`
  1155. Syllabification string `json:"syllabification,omitempty"`
  1156. Synonyms []*DictlayerdataDictWordsSensesSynonyms `json:"synonyms,omitempty"`
  1157. // ForceSendFields is a list of field names (e.g. "Conjugations") to
  1158. // unconditionally include in API requests. By default, fields with
  1159. // empty values are omitted from API requests. However, any non-pointer,
  1160. // non-interface field appearing in ForceSendFields will be sent to the
  1161. // server regardless of whether the field is empty or not. This may be
  1162. // used to include empty fields in Patch requests.
  1163. ForceSendFields []string `json:"-"`
  1164. // NullFields is a list of field names (e.g. "Conjugations") to include
  1165. // in API requests with the JSON null value. By default, fields with
  1166. // empty values are omitted from API requests. However, any field with
  1167. // an empty value appearing in NullFields will be sent to the server as
  1168. // null. It is an error if a field in this list has a non-empty value.
  1169. // This may be used to include null fields in Patch requests.
  1170. NullFields []string `json:"-"`
  1171. }
  1172. func (s *DictlayerdataDictWordsSenses) MarshalJSON() ([]byte, error) {
  1173. type NoMethod DictlayerdataDictWordsSenses
  1174. raw := NoMethod(*s)
  1175. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1176. }
  1177. type DictlayerdataDictWordsSensesConjugations struct {
  1178. Type string `json:"type,omitempty"`
  1179. Value string `json:"value,omitempty"`
  1180. // ForceSendFields is a list of field names (e.g. "Type") to
  1181. // unconditionally include in API requests. By default, fields with
  1182. // empty values are omitted from API requests. However, any non-pointer,
  1183. // non-interface field appearing in ForceSendFields will be sent to the
  1184. // server regardless of whether the field is empty or not. This may be
  1185. // used to include empty fields in Patch requests.
  1186. ForceSendFields []string `json:"-"`
  1187. // NullFields is a list of field names (e.g. "Type") to include in API
  1188. // requests with the JSON null value. By default, fields with empty
  1189. // values are omitted from API requests. However, any field with an
  1190. // empty value appearing in NullFields will be sent to the server as
  1191. // null. It is an error if a field in this list has a non-empty value.
  1192. // This may be used to include null fields in Patch requests.
  1193. NullFields []string `json:"-"`
  1194. }
  1195. func (s *DictlayerdataDictWordsSensesConjugations) MarshalJSON() ([]byte, error) {
  1196. type NoMethod DictlayerdataDictWordsSensesConjugations
  1197. raw := NoMethod(*s)
  1198. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1199. }
  1200. type DictlayerdataDictWordsSensesDefinitions struct {
  1201. Definition string `json:"definition,omitempty"`
  1202. Examples []*DictlayerdataDictWordsSensesDefinitionsExamples `json:"examples,omitempty"`
  1203. // ForceSendFields is a list of field names (e.g. "Definition") to
  1204. // unconditionally include in API requests. By default, fields with
  1205. // empty values are omitted from API requests. However, any non-pointer,
  1206. // non-interface field appearing in ForceSendFields will be sent to the
  1207. // server regardless of whether the field is empty or not. This may be
  1208. // used to include empty fields in Patch requests.
  1209. ForceSendFields []string `json:"-"`
  1210. // NullFields is a list of field names (e.g. "Definition") to include in
  1211. // API requests with the JSON null value. By default, fields with empty
  1212. // values are omitted from API requests. However, any field with an
  1213. // empty value appearing in NullFields will be sent to the server as
  1214. // null. It is an error if a field in this list has a non-empty value.
  1215. // This may be used to include null fields in Patch requests.
  1216. NullFields []string `json:"-"`
  1217. }
  1218. func (s *DictlayerdataDictWordsSensesDefinitions) MarshalJSON() ([]byte, error) {
  1219. type NoMethod DictlayerdataDictWordsSensesDefinitions
  1220. raw := NoMethod(*s)
  1221. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1222. }
  1223. type DictlayerdataDictWordsSensesDefinitionsExamples struct {
  1224. Source *DictlayerdataDictWordsSensesDefinitionsExamplesSource `json:"source,omitempty"`
  1225. Text string `json:"text,omitempty"`
  1226. // ForceSendFields is a list of field names (e.g. "Source") to
  1227. // unconditionally include in API requests. By default, fields with
  1228. // empty values are omitted from API requests. However, any non-pointer,
  1229. // non-interface field appearing in ForceSendFields will be sent to the
  1230. // server regardless of whether the field is empty or not. This may be
  1231. // used to include empty fields in Patch requests.
  1232. ForceSendFields []string `json:"-"`
  1233. // NullFields is a list of field names (e.g. "Source") to include in API
  1234. // requests with the JSON null value. By default, fields with empty
  1235. // values are omitted from API requests. However, any field with an
  1236. // empty value appearing in NullFields will be sent to the server as
  1237. // null. It is an error if a field in this list has a non-empty value.
  1238. // This may be used to include null fields in Patch requests.
  1239. NullFields []string `json:"-"`
  1240. }
  1241. func (s *DictlayerdataDictWordsSensesDefinitionsExamples) MarshalJSON() ([]byte, error) {
  1242. type NoMethod DictlayerdataDictWordsSensesDefinitionsExamples
  1243. raw := NoMethod(*s)
  1244. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1245. }
  1246. type DictlayerdataDictWordsSensesDefinitionsExamplesSource struct {
  1247. Attribution string `json:"attribution,omitempty"`
  1248. Url string `json:"url,omitempty"`
  1249. // ForceSendFields is a list of field names (e.g. "Attribution") to
  1250. // unconditionally include in API requests. By default, fields with
  1251. // empty values are omitted from API requests. However, any non-pointer,
  1252. // non-interface field appearing in ForceSendFields will be sent to the
  1253. // server regardless of whether the field is empty or not. This may be
  1254. // used to include empty fields in Patch requests.
  1255. ForceSendFields []string `json:"-"`
  1256. // NullFields is a list of field names (e.g. "Attribution") to include
  1257. // in API requests with the JSON null value. By default, fields with
  1258. // empty values are omitted from API requests. However, any field with
  1259. // an empty value appearing in NullFields will be sent to the server as
  1260. // null. It is an error if a field in this list has a non-empty value.
  1261. // This may be used to include null fields in Patch requests.
  1262. NullFields []string `json:"-"`
  1263. }
  1264. func (s *DictlayerdataDictWordsSensesDefinitionsExamplesSource) MarshalJSON() ([]byte, error) {
  1265. type NoMethod DictlayerdataDictWordsSensesDefinitionsExamplesSource
  1266. raw := NoMethod(*s)
  1267. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1268. }
  1269. type DictlayerdataDictWordsSensesSource struct {
  1270. Attribution string `json:"attribution,omitempty"`
  1271. Url string `json:"url,omitempty"`
  1272. // ForceSendFields is a list of field names (e.g. "Attribution") to
  1273. // unconditionally include in API requests. By default, fields with
  1274. // empty values are omitted from API requests. However, any non-pointer,
  1275. // non-interface field appearing in ForceSendFields will be sent to the
  1276. // server regardless of whether the field is empty or not. This may be
  1277. // used to include empty fields in Patch requests.
  1278. ForceSendFields []string `json:"-"`
  1279. // NullFields is a list of field names (e.g. "Attribution") to include
  1280. // in API requests with the JSON null value. By default, fields with
  1281. // empty values are omitted from API requests. However, any field with
  1282. // an empty value appearing in NullFields will be sent to the server as
  1283. // null. It is an error if a field in this list has a non-empty value.
  1284. // This may be used to include null fields in Patch requests.
  1285. NullFields []string `json:"-"`
  1286. }
  1287. func (s *DictlayerdataDictWordsSensesSource) MarshalJSON() ([]byte, error) {
  1288. type NoMethod DictlayerdataDictWordsSensesSource
  1289. raw := NoMethod(*s)
  1290. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1291. }
  1292. type DictlayerdataDictWordsSensesSynonyms struct {
  1293. Source *DictlayerdataDictWordsSensesSynonymsSource `json:"source,omitempty"`
  1294. Text string `json:"text,omitempty"`
  1295. // ForceSendFields is a list of field names (e.g. "Source") to
  1296. // unconditionally include in API requests. By default, fields with
  1297. // empty values are omitted from API requests. However, any non-pointer,
  1298. // non-interface field appearing in ForceSendFields will be sent to the
  1299. // server regardless of whether the field is empty or not. This may be
  1300. // used to include empty fields in Patch requests.
  1301. ForceSendFields []string `json:"-"`
  1302. // NullFields is a list of field names (e.g. "Source") to include in API
  1303. // requests with the JSON null value. By default, fields with empty
  1304. // values are omitted from API requests. However, any field with an
  1305. // empty value appearing in NullFields will be sent to the server as
  1306. // null. It is an error if a field in this list has a non-empty value.
  1307. // This may be used to include null fields in Patch requests.
  1308. NullFields []string `json:"-"`
  1309. }
  1310. func (s *DictlayerdataDictWordsSensesSynonyms) MarshalJSON() ([]byte, error) {
  1311. type NoMethod DictlayerdataDictWordsSensesSynonyms
  1312. raw := NoMethod(*s)
  1313. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1314. }
  1315. type DictlayerdataDictWordsSensesSynonymsSource struct {
  1316. Attribution string `json:"attribution,omitempty"`
  1317. Url string `json:"url,omitempty"`
  1318. // ForceSendFields is a list of field names (e.g. "Attribution") to
  1319. // unconditionally include in API requests. By default, fields with
  1320. // empty values are omitted from API requests. However, any non-pointer,
  1321. // non-interface field appearing in ForceSendFields will be sent to the
  1322. // server regardless of whether the field is empty or not. This may be
  1323. // used to include empty fields in Patch requests.
  1324. ForceSendFields []string `json:"-"`
  1325. // NullFields is a list of field names (e.g. "Attribution") to include
  1326. // in API requests with the JSON null value. By default, fields with
  1327. // empty values are omitted from API requests. However, any field with
  1328. // an empty value appearing in NullFields will be sent to the server as
  1329. // null. It is an error if a field in this list has a non-empty value.
  1330. // This may be used to include null fields in Patch requests.
  1331. NullFields []string `json:"-"`
  1332. }
  1333. func (s *DictlayerdataDictWordsSensesSynonymsSource) MarshalJSON() ([]byte, error) {
  1334. type NoMethod DictlayerdataDictWordsSensesSynonymsSource
  1335. raw := NoMethod(*s)
  1336. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1337. }
  1338. // DictlayerdataDictWordsSource: The words with different meanings but
  1339. // not related words, e.g. "go" (game) and "go" (verb).
  1340. type DictlayerdataDictWordsSource struct {
  1341. Attribution string `json:"attribution,omitempty"`
  1342. Url string `json:"url,omitempty"`
  1343. // ForceSendFields is a list of field names (e.g. "Attribution") to
  1344. // unconditionally include in API requests. By default, fields with
  1345. // empty values are omitted from API requests. However, any non-pointer,
  1346. // non-interface field appearing in ForceSendFields will be sent to the
  1347. // server regardless of whether the field is empty or not. This may be
  1348. // used to include empty fields in Patch requests.
  1349. ForceSendFields []string `json:"-"`
  1350. // NullFields is a list of field names (e.g. "Attribution") to include
  1351. // in API requests with the JSON null value. By default, fields with
  1352. // empty values are omitted from API requests. However, any field with
  1353. // an empty value appearing in NullFields will be sent to the server as
  1354. // null. It is an error if a field in this list has a non-empty value.
  1355. // This may be used to include null fields in Patch requests.
  1356. NullFields []string `json:"-"`
  1357. }
  1358. func (s *DictlayerdataDictWordsSource) MarshalJSON() ([]byte, error) {
  1359. type NoMethod DictlayerdataDictWordsSource
  1360. raw := NoMethod(*s)
  1361. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1362. }
  1363. type Discoveryclusters struct {
  1364. Clusters []*DiscoveryclustersClusters `json:"clusters,omitempty"`
  1365. // Kind: Resorce type.
  1366. Kind string `json:"kind,omitempty"`
  1367. TotalClusters int64 `json:"totalClusters,omitempty"`
  1368. // ServerResponse contains the HTTP response code and headers from the
  1369. // server.
  1370. googleapi.ServerResponse `json:"-"`
  1371. // ForceSendFields is a list of field names (e.g. "Clusters") to
  1372. // unconditionally include in API requests. By default, fields with
  1373. // empty values are omitted from API requests. However, any non-pointer,
  1374. // non-interface field appearing in ForceSendFields will be sent to the
  1375. // server regardless of whether the field is empty or not. This may be
  1376. // used to include empty fields in Patch requests.
  1377. ForceSendFields []string `json:"-"`
  1378. // NullFields is a list of field names (e.g. "Clusters") to include in
  1379. // API requests with the JSON null value. By default, fields with empty
  1380. // values are omitted from API requests. However, any field with an
  1381. // empty value appearing in NullFields will be sent to the server as
  1382. // null. It is an error if a field in this list has a non-empty value.
  1383. // This may be used to include null fields in Patch requests.
  1384. NullFields []string `json:"-"`
  1385. }
  1386. func (s *Discoveryclusters) MarshalJSON() ([]byte, error) {
  1387. type NoMethod Discoveryclusters
  1388. raw := NoMethod(*s)
  1389. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1390. }
  1391. type DiscoveryclustersClusters struct {
  1392. BannerWithContentContainer *DiscoveryclustersClustersBannerWithContentContainer `json:"banner_with_content_container,omitempty"`
  1393. SubTitle string `json:"subTitle,omitempty"`
  1394. Title string `json:"title,omitempty"`
  1395. TotalVolumes int64 `json:"totalVolumes,omitempty"`
  1396. Uid string `json:"uid,omitempty"`
  1397. Volumes []*Volume `json:"volumes,omitempty"`
  1398. // ForceSendFields is a list of field names (e.g.
  1399. // "BannerWithContentContainer") to unconditionally include in API
  1400. // requests. By default, fields with empty values are omitted from API
  1401. // requests. However, any non-pointer, non-interface field appearing in
  1402. // ForceSendFields will be sent to the server regardless of whether the
  1403. // field is empty or not. This may be used to include empty fields in
  1404. // Patch requests.
  1405. ForceSendFields []string `json:"-"`
  1406. // NullFields is a list of field names (e.g.
  1407. // "BannerWithContentContainer") to include in API requests with the
  1408. // JSON null value. By default, fields with empty values are omitted
  1409. // from API requests. However, any field with an empty value appearing
  1410. // in NullFields will be sent to the server as null. It is an error if a
  1411. // field in this list has a non-empty value. This may be used to include
  1412. // null fields in Patch requests.
  1413. NullFields []string `json:"-"`
  1414. }
  1415. func (s *DiscoveryclustersClusters) MarshalJSON() ([]byte, error) {
  1416. type NoMethod DiscoveryclustersClusters
  1417. raw := NoMethod(*s)
  1418. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1419. }
  1420. type DiscoveryclustersClustersBannerWithContentContainer struct {
  1421. FillColorArgb string `json:"fillColorArgb,omitempty"`
  1422. ImageUrl string `json:"imageUrl,omitempty"`
  1423. MaskColorArgb string `json:"maskColorArgb,omitempty"`
  1424. MoreButtonText string `json:"moreButtonText,omitempty"`
  1425. MoreButtonUrl string `json:"moreButtonUrl,omitempty"`
  1426. TextColorArgb string `json:"textColorArgb,omitempty"`
  1427. // ForceSendFields is a list of field names (e.g. "FillColorArgb") to
  1428. // unconditionally include in API requests. By default, fields with
  1429. // empty values are omitted from API requests. However, any non-pointer,
  1430. // non-interface field appearing in ForceSendFields will be sent to the
  1431. // server regardless of whether the field is empty or not. This may be
  1432. // used to include empty fields in Patch requests.
  1433. ForceSendFields []string `json:"-"`
  1434. // NullFields is a list of field names (e.g. "FillColorArgb") to include
  1435. // in API requests with the JSON null value. By default, fields with
  1436. // empty values are omitted from API requests. However, any field with
  1437. // an empty value appearing in NullFields will be sent to the server as
  1438. // null. It is an error if a field in this list has a non-empty value.
  1439. // This may be used to include null fields in Patch requests.
  1440. NullFields []string `json:"-"`
  1441. }
  1442. func (s *DiscoveryclustersClustersBannerWithContentContainer) MarshalJSON() ([]byte, error) {
  1443. type NoMethod DiscoveryclustersClustersBannerWithContentContainer
  1444. raw := NoMethod(*s)
  1445. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1446. }
  1447. type DownloadAccessRestriction struct {
  1448. // DeviceAllowed: If restricted, whether access is granted for this
  1449. // (user, device, volume).
  1450. DeviceAllowed bool `json:"deviceAllowed,omitempty"`
  1451. // DownloadsAcquired: If restricted, the number of content download
  1452. // licenses already acquired (including the requesting client, if
  1453. // licensed).
  1454. DownloadsAcquired int64 `json:"downloadsAcquired,omitempty"`
  1455. // JustAcquired: If deviceAllowed, whether access was just acquired with
  1456. // this request.
  1457. JustAcquired bool `json:"justAcquired,omitempty"`
  1458. // Kind: Resource type.
  1459. Kind string `json:"kind,omitempty"`
  1460. // MaxDownloadDevices: If restricted, the maximum number of content
  1461. // download licenses for this volume.
  1462. MaxDownloadDevices int64 `json:"maxDownloadDevices,omitempty"`
  1463. // Message: Error/warning message.
  1464. Message string `json:"message,omitempty"`
  1465. // Nonce: Client nonce for verification. Download access and
  1466. // client-validation only.
  1467. Nonce string `json:"nonce,omitempty"`
  1468. // ReasonCode: Error/warning reason code. Additional codes may be added
  1469. // in the future. 0 OK 100 ACCESS_DENIED_PUBLISHER_LIMIT 101
  1470. // ACCESS_DENIED_LIMIT 200 WARNING_USED_LAST_ACCESS
  1471. ReasonCode string `json:"reasonCode,omitempty"`
  1472. // Restricted: Whether this volume has any download access restrictions.
  1473. Restricted bool `json:"restricted,omitempty"`
  1474. // Signature: Response signature.
  1475. Signature string `json:"signature,omitempty"`
  1476. // Source: Client app identifier for verification. Download access and
  1477. // client-validation only.
  1478. Source string `json:"source,omitempty"`
  1479. // VolumeId: Identifies the volume for which this entry applies.
  1480. VolumeId string `json:"volumeId,omitempty"`
  1481. // ForceSendFields is a list of field names (e.g. "DeviceAllowed") to
  1482. // unconditionally include in API requests. By default, fields with
  1483. // empty values are omitted from API requests. However, any non-pointer,
  1484. // non-interface field appearing in ForceSendFields will be sent to the
  1485. // server regardless of whether the field is empty or not. This may be
  1486. // used to include empty fields in Patch requests.
  1487. ForceSendFields []string `json:"-"`
  1488. // NullFields is a list of field names (e.g. "DeviceAllowed") to include
  1489. // in API requests with the JSON null value. By default, fields with
  1490. // empty values are omitted from API requests. However, any field with
  1491. // an empty value appearing in NullFields will be sent to the server as
  1492. // null. It is an error if a field in this list has a non-empty value.
  1493. // This may be used to include null fields in Patch requests.
  1494. NullFields []string `json:"-"`
  1495. }
  1496. func (s *DownloadAccessRestriction) MarshalJSON() ([]byte, error) {
  1497. type NoMethod DownloadAccessRestriction
  1498. raw := NoMethod(*s)
  1499. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1500. }
  1501. type DownloadAccesses struct {
  1502. // DownloadAccessList: A list of download access responses.
  1503. DownloadAccessList []*DownloadAccessRestriction `json:"downloadAccessList,omitempty"`
  1504. // Kind: Resource type.
  1505. Kind string `json:"kind,omitempty"`
  1506. // ServerResponse contains the HTTP response code and headers from the
  1507. // server.
  1508. googleapi.ServerResponse `json:"-"`
  1509. // ForceSendFields is a list of field names (e.g. "DownloadAccessList")
  1510. // to unconditionally include in API requests. By default, fields with
  1511. // empty values are omitted from API requests. However, any non-pointer,
  1512. // non-interface field appearing in ForceSendFields will be sent to the
  1513. // server regardless of whether the field is empty or not. This may be
  1514. // used to include empty fields in Patch requests.
  1515. ForceSendFields []string `json:"-"`
  1516. // NullFields is a list of field names (e.g. "DownloadAccessList") to
  1517. // include in API requests with the JSON null value. By default, fields
  1518. // with empty values are omitted from API requests. However, any field
  1519. // with an empty value appearing in NullFields will be sent to the
  1520. // server as null. It is an error if a field in this list has a
  1521. // non-empty value. This may be used to include null fields in Patch
  1522. // requests.
  1523. NullFields []string `json:"-"`
  1524. }
  1525. func (s *DownloadAccesses) MarshalJSON() ([]byte, error) {
  1526. type NoMethod DownloadAccesses
  1527. raw := NoMethod(*s)
  1528. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1529. }
  1530. type FamilyInfo struct {
  1531. // Kind: Resource type.
  1532. Kind string `json:"kind,omitempty"`
  1533. // Membership: Family membership info of the user that made the request.
  1534. Membership *FamilyInfoMembership `json:"membership,omitempty"`
  1535. // ServerResponse contains the HTTP response code and headers from the
  1536. // server.
  1537. googleapi.ServerResponse `json:"-"`
  1538. // ForceSendFields is a list of field names (e.g. "Kind") to
  1539. // unconditionally include in API requests. By default, fields with
  1540. // empty values are omitted from API requests. However, any non-pointer,
  1541. // non-interface field appearing in ForceSendFields will be sent to the
  1542. // server regardless of whether the field is empty or not. This may be
  1543. // used to include empty fields in Patch requests.
  1544. ForceSendFields []string `json:"-"`
  1545. // NullFields is a list of field names (e.g. "Kind") to include in API
  1546. // requests with the JSON null value. By default, fields with empty
  1547. // values are omitted from API requests. However, any field with an
  1548. // empty value appearing in NullFields will be sent to the server as
  1549. // null. It is an error if a field in this list has a non-empty value.
  1550. // This may be used to include null fields in Patch requests.
  1551. NullFields []string `json:"-"`
  1552. }
  1553. func (s *FamilyInfo) MarshalJSON() ([]byte, error) {
  1554. type NoMethod FamilyInfo
  1555. raw := NoMethod(*s)
  1556. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1557. }
  1558. // FamilyInfoMembership: Family membership info of the user that made
  1559. // the request.
  1560. type FamilyInfoMembership struct {
  1561. // AcquirePermission: Restrictions on user buying and acquiring content.
  1562. AcquirePermission string `json:"acquirePermission,omitempty"`
  1563. // AgeGroup: The age group of the user.
  1564. AgeGroup string `json:"ageGroup,omitempty"`
  1565. // AllowedMaturityRating: The maximum allowed maturity rating for the
  1566. // user.
  1567. AllowedMaturityRating string `json:"allowedMaturityRating,omitempty"`
  1568. IsInFamily bool `json:"isInFamily,omitempty"`
  1569. // Role: The role of the user in the family.
  1570. Role string `json:"role,omitempty"`
  1571. // ForceSendFields is a list of field names (e.g. "AcquirePermission")
  1572. // to 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. // NullFields is a list of field names (e.g. "AcquirePermission") to
  1579. // include in API requests with the JSON null value. By default, fields
  1580. // with empty values are omitted from API requests. However, any field
  1581. // with an empty value appearing in NullFields will be sent to the
  1582. // server as null. It is an error if a field in this list has a
  1583. // non-empty value. This may be used to include null fields in Patch
  1584. // requests.
  1585. NullFields []string `json:"-"`
  1586. }
  1587. func (s *FamilyInfoMembership) MarshalJSON() ([]byte, error) {
  1588. type NoMethod FamilyInfoMembership
  1589. raw := NoMethod(*s)
  1590. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1591. }
  1592. type Geolayerdata struct {
  1593. Common *GeolayerdataCommon `json:"common,omitempty"`
  1594. Geo *GeolayerdataGeo `json:"geo,omitempty"`
  1595. Kind string `json:"kind,omitempty"`
  1596. // ForceSendFields is a list of field names (e.g. "Common") to
  1597. // unconditionally include in API requests. By default, fields with
  1598. // empty values are omitted from API requests. However, any non-pointer,
  1599. // non-interface field appearing in ForceSendFields will be sent to the
  1600. // server regardless of whether the field is empty or not. This may be
  1601. // used to include empty fields in Patch requests.
  1602. ForceSendFields []string `json:"-"`
  1603. // NullFields is a list of field names (e.g. "Common") to include in API
  1604. // requests with the JSON null value. By default, fields with empty
  1605. // values are omitted from API requests. However, any field with an
  1606. // empty value appearing in NullFields will be sent to the server as
  1607. // null. It is an error if a field in this list has a non-empty value.
  1608. // This may be used to include null fields in Patch requests.
  1609. NullFields []string `json:"-"`
  1610. }
  1611. func (s *Geolayerdata) MarshalJSON() ([]byte, error) {
  1612. type NoMethod Geolayerdata
  1613. raw := NoMethod(*s)
  1614. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1615. }
  1616. type GeolayerdataCommon struct {
  1617. // Lang: The language of the information url and description.
  1618. Lang string `json:"lang,omitempty"`
  1619. // PreviewImageUrl: The URL for the preview image information.
  1620. PreviewImageUrl string `json:"previewImageUrl,omitempty"`
  1621. // Snippet: The description for this location.
  1622. Snippet string `json:"snippet,omitempty"`
  1623. // SnippetUrl: The URL for information for this location. Ex: wikipedia
  1624. // link.
  1625. SnippetUrl string `json:"snippetUrl,omitempty"`
  1626. // Title: The display title and localized canonical name to use when
  1627. // searching for this entity on Google search.
  1628. Title string `json:"title,omitempty"`
  1629. // ForceSendFields is a list of field names (e.g. "Lang") to
  1630. // unconditionally include in API requests. By default, fields with
  1631. // empty values are omitted from API requests. However, any non-pointer,
  1632. // non-interface field appearing in ForceSendFields will be sent to the
  1633. // server regardless of whether the field is empty or not. This may be
  1634. // used to include empty fields in Patch requests.
  1635. ForceSendFields []string `json:"-"`
  1636. // NullFields is a list of field names (e.g. "Lang") to include in API
  1637. // requests with the JSON null value. By default, fields with empty
  1638. // values are omitted from API requests. However, any field with an
  1639. // empty value appearing in NullFields will be sent to the server as
  1640. // null. It is an error if a field in this list has a non-empty value.
  1641. // This may be used to include null fields in Patch requests.
  1642. NullFields []string `json:"-"`
  1643. }
  1644. func (s *GeolayerdataCommon) MarshalJSON() ([]byte, error) {
  1645. type NoMethod GeolayerdataCommon
  1646. raw := NoMethod(*s)
  1647. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1648. }
  1649. type GeolayerdataGeo struct {
  1650. // Boundary: The boundary of the location as a set of loops containing
  1651. // pairs of latitude, longitude coordinates.
  1652. Boundary [][]*GeolayerdataGeoBoundaryItem `json:"boundary,omitempty"`
  1653. // CachePolicy: The cache policy active for this data. EX: UNRESTRICTED,
  1654. // RESTRICTED, NEVER
  1655. CachePolicy string `json:"cachePolicy,omitempty"`
  1656. // CountryCode: The country code of the location.
  1657. CountryCode string `json:"countryCode,omitempty"`
  1658. // Latitude: The latitude of the location.
  1659. Latitude float64 `json:"latitude,omitempty"`
  1660. // Longitude: The longitude of the location.
  1661. Longitude float64 `json:"longitude,omitempty"`
  1662. // MapType: The type of map that should be used for this location. EX:
  1663. // HYBRID, ROADMAP, SATELLITE, TERRAIN
  1664. MapType string `json:"mapType,omitempty"`
  1665. // Viewport: The viewport for showing this location. This is a latitude,
  1666. // longitude rectangle.
  1667. Viewport *GeolayerdataGeoViewport `json:"viewport,omitempty"`
  1668. // Zoom: The Zoom level to use for the map. Zoom levels between 0 (the
  1669. // lowest zoom level, in which the entire world can be seen on one map)
  1670. // to 21+ (down to individual buildings). See:
  1671. // https://developers.google.com/maps/documentation/staticmaps/#Zoomlevels
  1672. Zoom int64 `json:"zoom,omitempty"`
  1673. // ForceSendFields is a list of field names (e.g. "Boundary") to
  1674. // unconditionally include in API requests. By default, fields with
  1675. // empty values are omitted from API requests. However, any non-pointer,
  1676. // non-interface field appearing in ForceSendFields will be sent to the
  1677. // server regardless of whether the field is empty or not. This may be
  1678. // used to include empty fields in Patch requests.
  1679. ForceSendFields []string `json:"-"`
  1680. // NullFields is a list of field names (e.g. "Boundary") to include in
  1681. // API requests with the JSON null value. By default, fields with empty
  1682. // values are omitted from API requests. However, any field with an
  1683. // empty value appearing in NullFields will be sent to the server as
  1684. // null. It is an error if a field in this list has a non-empty value.
  1685. // This may be used to include null fields in Patch requests.
  1686. NullFields []string `json:"-"`
  1687. }
  1688. func (s *GeolayerdataGeo) MarshalJSON() ([]byte, error) {
  1689. type NoMethod GeolayerdataGeo
  1690. raw := NoMethod(*s)
  1691. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1692. }
  1693. func (s *GeolayerdataGeo) UnmarshalJSON(data []byte) error {
  1694. type NoMethod GeolayerdataGeo
  1695. var s1 struct {
  1696. Latitude gensupport.JSONFloat64 `json:"latitude"`
  1697. Longitude gensupport.JSONFloat64 `json:"longitude"`
  1698. *NoMethod
  1699. }
  1700. s1.NoMethod = (*NoMethod)(s)
  1701. if err := json.Unmarshal(data, &s1); err != nil {
  1702. return err
  1703. }
  1704. s.Latitude = float64(s1.Latitude)
  1705. s.Longitude = float64(s1.Longitude)
  1706. return nil
  1707. }
  1708. type GeolayerdataGeoBoundaryItem struct {
  1709. Latitude int64 `json:"latitude,omitempty"`
  1710. Longitude int64 `json:"longitude,omitempty"`
  1711. // ForceSendFields is a list of field names (e.g. "Latitude") to
  1712. // unconditionally include in API requests. By default, fields with
  1713. // empty values are omitted from API requests. However, any non-pointer,
  1714. // non-interface field appearing in ForceSendFields will be sent to the
  1715. // server regardless of whether the field is empty or not. This may be
  1716. // used to include empty fields in Patch requests.
  1717. ForceSendFields []string `json:"-"`
  1718. // NullFields is a list of field names (e.g. "Latitude") to include in
  1719. // API requests with the JSON null value. By default, fields with empty
  1720. // values are omitted from API requests. However, any field with an
  1721. // empty value appearing in NullFields will be sent to the server as
  1722. // null. It is an error if a field in this list has a non-empty value.
  1723. // This may be used to include null fields in Patch requests.
  1724. NullFields []string `json:"-"`
  1725. }
  1726. func (s *GeolayerdataGeoBoundaryItem) MarshalJSON() ([]byte, error) {
  1727. type NoMethod GeolayerdataGeoBoundaryItem
  1728. raw := NoMethod(*s)
  1729. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1730. }
  1731. // GeolayerdataGeoViewport: The viewport for showing this location. This
  1732. // is a latitude, longitude rectangle.
  1733. type GeolayerdataGeoViewport struct {
  1734. Hi *GeolayerdataGeoViewportHi `json:"hi,omitempty"`
  1735. Lo *GeolayerdataGeoViewportLo `json:"lo,omitempty"`
  1736. // ForceSendFields is a list of field names (e.g. "Hi") to
  1737. // unconditionally include in API requests. By default, fields with
  1738. // empty values are omitted from API requests. However, any non-pointer,
  1739. // non-interface field appearing in ForceSendFields will be sent to the
  1740. // server regardless of whether the field is empty or not. This may be
  1741. // used to include empty fields in Patch requests.
  1742. ForceSendFields []string `json:"-"`
  1743. // NullFields is a list of field names (e.g. "Hi") to include in API
  1744. // requests with the JSON null value. By default, fields with empty
  1745. // values are omitted from API requests. However, any field with an
  1746. // empty value appearing in NullFields will be sent to the server as
  1747. // null. It is an error if a field in this list has a non-empty value.
  1748. // This may be used to include null fields in Patch requests.
  1749. NullFields []string `json:"-"`
  1750. }
  1751. func (s *GeolayerdataGeoViewport) MarshalJSON() ([]byte, error) {
  1752. type NoMethod GeolayerdataGeoViewport
  1753. raw := NoMethod(*s)
  1754. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1755. }
  1756. type GeolayerdataGeoViewportHi struct {
  1757. Latitude float64 `json:"latitude,omitempty"`
  1758. Longitude float64 `json:"longitude,omitempty"`
  1759. // ForceSendFields is a list of field names (e.g. "Latitude") to
  1760. // unconditionally include in API requests. By default, fields with
  1761. // empty values are omitted from API requests. However, any non-pointer,
  1762. // non-interface field appearing in ForceSendFields will be sent to the
  1763. // server regardless of whether the field is empty or not. This may be
  1764. // used to include empty fields in Patch requests.
  1765. ForceSendFields []string `json:"-"`
  1766. // NullFields is a list of field names (e.g. "Latitude") to include in
  1767. // API requests with the JSON null value. By default, fields with empty
  1768. // values are omitted from API requests. However, any field with an
  1769. // empty value appearing in NullFields will be sent to the server as
  1770. // null. It is an error if a field in this list has a non-empty value.
  1771. // This may be used to include null fields in Patch requests.
  1772. NullFields []string `json:"-"`
  1773. }
  1774. func (s *GeolayerdataGeoViewportHi) MarshalJSON() ([]byte, error) {
  1775. type NoMethod GeolayerdataGeoViewportHi
  1776. raw := NoMethod(*s)
  1777. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1778. }
  1779. func (s *GeolayerdataGeoViewportHi) UnmarshalJSON(data []byte) error {
  1780. type NoMethod GeolayerdataGeoViewportHi
  1781. var s1 struct {
  1782. Latitude gensupport.JSONFloat64 `json:"latitude"`
  1783. Longitude gensupport.JSONFloat64 `json:"longitude"`
  1784. *NoMethod
  1785. }
  1786. s1.NoMethod = (*NoMethod)(s)
  1787. if err := json.Unmarshal(data, &s1); err != nil {
  1788. return err
  1789. }
  1790. s.Latitude = float64(s1.Latitude)
  1791. s.Longitude = float64(s1.Longitude)
  1792. return nil
  1793. }
  1794. type GeolayerdataGeoViewportLo struct {
  1795. Latitude float64 `json:"latitude,omitempty"`
  1796. Longitude float64 `json:"longitude,omitempty"`
  1797. // ForceSendFields is a list of field names (e.g. "Latitude") to
  1798. // unconditionally include in API requests. By default, fields with
  1799. // empty values are omitted from API requests. However, any non-pointer,
  1800. // non-interface field appearing in ForceSendFields will be sent to the
  1801. // server regardless of whether the field is empty or not. This may be
  1802. // used to include empty fields in Patch requests.
  1803. ForceSendFields []string `json:"-"`
  1804. // NullFields is a list of field names (e.g. "Latitude") to include in
  1805. // API requests with the JSON null value. By default, fields with empty
  1806. // values are omitted from API requests. However, any field with an
  1807. // empty value appearing in NullFields will be sent to the server as
  1808. // null. It is an error if a field in this list has a non-empty value.
  1809. // This may be used to include null fields in Patch requests.
  1810. NullFields []string `json:"-"`
  1811. }
  1812. func (s *GeolayerdataGeoViewportLo) MarshalJSON() ([]byte, error) {
  1813. type NoMethod GeolayerdataGeoViewportLo
  1814. raw := NoMethod(*s)
  1815. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1816. }
  1817. func (s *GeolayerdataGeoViewportLo) UnmarshalJSON(data []byte) error {
  1818. type NoMethod GeolayerdataGeoViewportLo
  1819. var s1 struct {
  1820. Latitude gensupport.JSONFloat64 `json:"latitude"`
  1821. Longitude gensupport.JSONFloat64 `json:"longitude"`
  1822. *NoMethod
  1823. }
  1824. s1.NoMethod = (*NoMethod)(s)
  1825. if err := json.Unmarshal(data, &s1); err != nil {
  1826. return err
  1827. }
  1828. s.Latitude = float64(s1.Latitude)
  1829. s.Longitude = float64(s1.Longitude)
  1830. return nil
  1831. }
  1832. type Layersummaries struct {
  1833. // Items: A list of layer summary items.
  1834. Items []*Layersummary `json:"items,omitempty"`
  1835. // Kind: Resource type.
  1836. Kind string `json:"kind,omitempty"`
  1837. // TotalItems: The total number of layer summaries found.
  1838. TotalItems int64 `json:"totalItems,omitempty"`
  1839. // ServerResponse contains the HTTP response code and headers from the
  1840. // server.
  1841. googleapi.ServerResponse `json:"-"`
  1842. // ForceSendFields is a list of field names (e.g. "Items") to
  1843. // unconditionally include in API requests. By default, fields with
  1844. // empty values are omitted from API requests. However, any non-pointer,
  1845. // non-interface field appearing in ForceSendFields will be sent to the
  1846. // server regardless of whether the field is empty or not. This may be
  1847. // used to include empty fields in Patch requests.
  1848. ForceSendFields []string `json:"-"`
  1849. // NullFields is a list of field names (e.g. "Items") to include in API
  1850. // requests with the JSON null value. By default, fields with empty
  1851. // values are omitted from API requests. However, any field with an
  1852. // empty value appearing in NullFields will be sent to the server as
  1853. // null. It is an error if a field in this list has a non-empty value.
  1854. // This may be used to include null fields in Patch requests.
  1855. NullFields []string `json:"-"`
  1856. }
  1857. func (s *Layersummaries) MarshalJSON() ([]byte, error) {
  1858. type NoMethod Layersummaries
  1859. raw := NoMethod(*s)
  1860. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1861. }
  1862. type Layersummary struct {
  1863. // AnnotationCount: The number of annotations for this layer.
  1864. AnnotationCount int64 `json:"annotationCount,omitempty"`
  1865. // AnnotationTypes: The list of annotation types contained for this
  1866. // layer.
  1867. AnnotationTypes []string `json:"annotationTypes,omitempty"`
  1868. // AnnotationsDataLink: Link to get data for this annotation.
  1869. AnnotationsDataLink string `json:"annotationsDataLink,omitempty"`
  1870. // AnnotationsLink: The link to get the annotations for this layer.
  1871. AnnotationsLink string `json:"annotationsLink,omitempty"`
  1872. // ContentVersion: The content version this resource is for.
  1873. ContentVersion string `json:"contentVersion,omitempty"`
  1874. // DataCount: The number of data items for this layer.
  1875. DataCount int64 `json:"dataCount,omitempty"`
  1876. // Id: Unique id of this layer summary.
  1877. Id string `json:"id,omitempty"`
  1878. // Kind: Resource Type
  1879. Kind string `json:"kind,omitempty"`
  1880. // LayerId: The layer id for this summary.
  1881. LayerId string `json:"layerId,omitempty"`
  1882. // SelfLink: URL to this resource.
  1883. SelfLink string `json:"selfLink,omitempty"`
  1884. // Updated: Timestamp for the last time an item in this layer was
  1885. // updated. (RFC 3339 UTC date-time format).
  1886. Updated string `json:"updated,omitempty"`
  1887. // VolumeAnnotationsVersion: The current version of this layer's volume
  1888. // annotations. Note that this version applies only to the data in the
  1889. // books.layers.volumeAnnotations.* responses. The actual annotation
  1890. // data is versioned separately.
  1891. VolumeAnnotationsVersion string `json:"volumeAnnotationsVersion,omitempty"`
  1892. // VolumeId: The volume id this resource is for.
  1893. VolumeId string `json:"volumeId,omitempty"`
  1894. // ServerResponse contains the HTTP response code and headers from the
  1895. // server.
  1896. googleapi.ServerResponse `json:"-"`
  1897. // ForceSendFields is a list of field names (e.g. "AnnotationCount") to
  1898. // 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. // NullFields is a list of field names (e.g. "AnnotationCount") to
  1905. // include in API requests with the JSON null value. By default, fields
  1906. // with empty values are omitted from API requests. However, any field
  1907. // with an empty value appearing in NullFields will be sent to the
  1908. // server as null. It is an error if a field in this list has a
  1909. // non-empty value. This may be used to include null fields in Patch
  1910. // requests.
  1911. NullFields []string `json:"-"`
  1912. }
  1913. func (s *Layersummary) MarshalJSON() ([]byte, error) {
  1914. type NoMethod Layersummary
  1915. raw := NoMethod(*s)
  1916. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1917. }
  1918. type Metadata struct {
  1919. // Items: A list of offline dictionary metadata.
  1920. Items []*MetadataItems `json:"items,omitempty"`
  1921. // Kind: Resource type.
  1922. Kind string `json:"kind,omitempty"`
  1923. // ServerResponse contains the HTTP response code and headers from the
  1924. // server.
  1925. googleapi.ServerResponse `json:"-"`
  1926. // ForceSendFields is a list of field names (e.g. "Items") to
  1927. // unconditionally include in API requests. By default, fields with
  1928. // empty values are omitted from API requests. However, any non-pointer,
  1929. // non-interface field appearing in ForceSendFields will be sent to the
  1930. // server regardless of whether the field is empty or not. This may be
  1931. // used to include empty fields in Patch requests.
  1932. ForceSendFields []string `json:"-"`
  1933. // NullFields is a list of field names (e.g. "Items") to include in API
  1934. // requests with the JSON null value. By default, fields with empty
  1935. // values are omitted from API requests. However, any field with an
  1936. // empty value appearing in NullFields will be sent to the server as
  1937. // null. It is an error if a field in this list has a non-empty value.
  1938. // This may be used to include null fields in Patch requests.
  1939. NullFields []string `json:"-"`
  1940. }
  1941. func (s *Metadata) MarshalJSON() ([]byte, error) {
  1942. type NoMethod Metadata
  1943. raw := NoMethod(*s)
  1944. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1945. }
  1946. type MetadataItems struct {
  1947. DownloadUrl string `json:"download_url,omitempty"`
  1948. EncryptedKey string `json:"encrypted_key,omitempty"`
  1949. Language string `json:"language,omitempty"`
  1950. Size int64 `json:"size,omitempty,string"`
  1951. Version int64 `json:"version,omitempty,string"`
  1952. // ForceSendFields is a list of field names (e.g. "DownloadUrl") to
  1953. // unconditionally include in API requests. By default, fields with
  1954. // empty values are omitted from API requests. However, any non-pointer,
  1955. // non-interface field appearing in ForceSendFields will be sent to the
  1956. // server regardless of whether the field is empty or not. This may be
  1957. // used to include empty fields in Patch requests.
  1958. ForceSendFields []string `json:"-"`
  1959. // NullFields is a list of field names (e.g. "DownloadUrl") to include
  1960. // in API requests with the JSON null value. By default, fields with
  1961. // empty values are omitted from API requests. However, any field with
  1962. // an empty value appearing in NullFields will be sent to the server as
  1963. // null. It is an error if a field in this list has a non-empty value.
  1964. // This may be used to include null fields in Patch requests.
  1965. NullFields []string `json:"-"`
  1966. }
  1967. func (s *MetadataItems) MarshalJSON() ([]byte, error) {
  1968. type NoMethod MetadataItems
  1969. raw := NoMethod(*s)
  1970. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1971. }
  1972. type Notification struct {
  1973. Body string `json:"body,omitempty"`
  1974. // CrmExperimentIds: The list of crm experiment ids.
  1975. CrmExperimentIds googleapi.Int64s `json:"crmExperimentIds,omitempty"`
  1976. DocId string `json:"doc_id,omitempty"`
  1977. DocType string `json:"doc_type,omitempty"`
  1978. DontShowNotification bool `json:"dont_show_notification,omitempty"`
  1979. IconUrl string `json:"iconUrl,omitempty"`
  1980. IsDocumentMature bool `json:"is_document_mature,omitempty"`
  1981. // Kind: Resource type.
  1982. Kind string `json:"kind,omitempty"`
  1983. NotificationGroup string `json:"notificationGroup,omitempty"`
  1984. NotificationType string `json:"notification_type,omitempty"`
  1985. PcampaignId string `json:"pcampaign_id,omitempty"`
  1986. Reason string `json:"reason,omitempty"`
  1987. ShowNotificationSettingsAction bool `json:"show_notification_settings_action,omitempty"`
  1988. TargetUrl string `json:"targetUrl,omitempty"`
  1989. TimeToExpireMs int64 `json:"timeToExpireMs,omitempty,string"`
  1990. Title string `json:"title,omitempty"`
  1991. // ServerResponse contains the HTTP response code and headers from the
  1992. // server.
  1993. googleapi.ServerResponse `json:"-"`
  1994. // ForceSendFields is a list of field names (e.g. "Body") to
  1995. // unconditionally include in API requests. By default, fields with
  1996. // empty values are omitted from API requests. However, any non-pointer,
  1997. // non-interface field appearing in ForceSendFields will be sent to the
  1998. // server regardless of whether the field is empty or not. This may be
  1999. // used to include empty fields in Patch requests.
  2000. ForceSendFields []string `json:"-"`
  2001. // NullFields is a list of field names (e.g. "Body") to include in API
  2002. // requests with the JSON null value. By default, fields with empty
  2003. // values are omitted from API requests. However, any field with an
  2004. // empty value appearing in NullFields will be sent to the server as
  2005. // null. It is an error if a field in this list has a non-empty value.
  2006. // This may be used to include null fields in Patch requests.
  2007. NullFields []string `json:"-"`
  2008. }
  2009. func (s *Notification) MarshalJSON() ([]byte, error) {
  2010. type NoMethod Notification
  2011. raw := NoMethod(*s)
  2012. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2013. }
  2014. type Offers struct {
  2015. // Items: A list of offers.
  2016. Items []*OffersItems `json:"items,omitempty"`
  2017. // Kind: Resource type.
  2018. Kind string `json:"kind,omitempty"`
  2019. // ServerResponse contains the HTTP response code and headers from the
  2020. // server.
  2021. googleapi.ServerResponse `json:"-"`
  2022. // ForceSendFields is a list of field names (e.g. "Items") to
  2023. // unconditionally include in API requests. By default, fields with
  2024. // empty values are omitted from API requests. However, any non-pointer,
  2025. // non-interface field appearing in ForceSendFields will be sent to the
  2026. // server regardless of whether the field is empty or not. This may be
  2027. // used to include empty fields in Patch requests.
  2028. ForceSendFields []string `json:"-"`
  2029. // NullFields is a list of field names (e.g. "Items") to include in API
  2030. // requests with the JSON null value. By default, fields with empty
  2031. // values are omitted from API requests. However, any field with an
  2032. // empty value appearing in NullFields will be sent to the server as
  2033. // null. It is an error if a field in this list has a non-empty value.
  2034. // This may be used to include null fields in Patch requests.
  2035. NullFields []string `json:"-"`
  2036. }
  2037. func (s *Offers) MarshalJSON() ([]byte, error) {
  2038. type NoMethod Offers
  2039. raw := NoMethod(*s)
  2040. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2041. }
  2042. type OffersItems struct {
  2043. ArtUrl string `json:"artUrl,omitempty"`
  2044. GservicesKey string `json:"gservicesKey,omitempty"`
  2045. Id string `json:"id,omitempty"`
  2046. Items []*OffersItemsItems `json:"items,omitempty"`
  2047. // ForceSendFields is a list of field names (e.g. "ArtUrl") to
  2048. // unconditionally include in API requests. By default, fields with
  2049. // empty values are omitted from API requests. However, any non-pointer,
  2050. // non-interface field appearing in ForceSendFields will be sent to the
  2051. // server regardless of whether the field is empty or not. This may be
  2052. // used to include empty fields in Patch requests.
  2053. ForceSendFields []string `json:"-"`
  2054. // NullFields is a list of field names (e.g. "ArtUrl") to include in API
  2055. // requests with the JSON null value. By default, fields with empty
  2056. // values are omitted from API requests. However, any field with an
  2057. // empty value appearing in NullFields will be sent to the server as
  2058. // null. It is an error if a field in this list has a non-empty value.
  2059. // This may be used to include null fields in Patch requests.
  2060. NullFields []string `json:"-"`
  2061. }
  2062. func (s *OffersItems) MarshalJSON() ([]byte, error) {
  2063. type NoMethod OffersItems
  2064. raw := NoMethod(*s)
  2065. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2066. }
  2067. type OffersItemsItems struct {
  2068. Author string `json:"author,omitempty"`
  2069. CanonicalVolumeLink string `json:"canonicalVolumeLink,omitempty"`
  2070. CoverUrl string `json:"coverUrl,omitempty"`
  2071. Description string `json:"description,omitempty"`
  2072. Title string `json:"title,omitempty"`
  2073. VolumeId string `json:"volumeId,omitempty"`
  2074. // ForceSendFields is a list of field names (e.g. "Author") to
  2075. // unconditionally include in API requests. By default, fields with
  2076. // empty values are omitted from API requests. However, any non-pointer,
  2077. // non-interface field appearing in ForceSendFields will be sent to the
  2078. // server regardless of whether the field is empty or not. This may be
  2079. // used to include empty fields in Patch requests.
  2080. ForceSendFields []string `json:"-"`
  2081. // NullFields is a list of field names (e.g. "Author") to include in API
  2082. // requests with the JSON null value. By default, fields with empty
  2083. // values are omitted from API requests. However, any field with an
  2084. // empty value appearing in NullFields will be sent to the server as
  2085. // null. It is an error if a field in this list has a non-empty value.
  2086. // This may be used to include null fields in Patch requests.
  2087. NullFields []string `json:"-"`
  2088. }
  2089. func (s *OffersItemsItems) MarshalJSON() ([]byte, error) {
  2090. type NoMethod OffersItemsItems
  2091. raw := NoMethod(*s)
  2092. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2093. }
  2094. type ReadingPosition struct {
  2095. // EpubCfiPosition: Position in an EPUB as a CFI.
  2096. EpubCfiPosition string `json:"epubCfiPosition,omitempty"`
  2097. // GbImagePosition: Position in a volume for image-based content.
  2098. GbImagePosition string `json:"gbImagePosition,omitempty"`
  2099. // GbTextPosition: Position in a volume for text-based content.
  2100. GbTextPosition string `json:"gbTextPosition,omitempty"`
  2101. // Kind: Resource type for a reading position.
  2102. Kind string `json:"kind,omitempty"`
  2103. // PdfPosition: Position in a PDF file.
  2104. PdfPosition string `json:"pdfPosition,omitempty"`
  2105. // Updated: Timestamp when this reading position was last updated
  2106. // (formatted UTC timestamp with millisecond resolution).
  2107. Updated string `json:"updated,omitempty"`
  2108. // VolumeId: Volume id associated with this reading position.
  2109. VolumeId string `json:"volumeId,omitempty"`
  2110. // ServerResponse contains the HTTP response code and headers from the
  2111. // server.
  2112. googleapi.ServerResponse `json:"-"`
  2113. // ForceSendFields is a list of field names (e.g. "EpubCfiPosition") to
  2114. // unconditionally include in API requests. By default, fields with
  2115. // empty values are omitted from API requests. However, any non-pointer,
  2116. // non-interface field appearing in ForceSendFields will be sent to the
  2117. // server regardless of whether the field is empty or not. This may be
  2118. // used to include empty fields in Patch requests.
  2119. ForceSendFields []string `json:"-"`
  2120. // NullFields is a list of field names (e.g. "EpubCfiPosition") to
  2121. // include in API requests with the JSON null value. By default, fields
  2122. // with empty values are omitted from API requests. However, any field
  2123. // with an empty value appearing in NullFields will be sent to the
  2124. // server as null. It is an error if a field in this list has a
  2125. // non-empty value. This may be used to include null fields in Patch
  2126. // requests.
  2127. NullFields []string `json:"-"`
  2128. }
  2129. func (s *ReadingPosition) MarshalJSON() ([]byte, error) {
  2130. type NoMethod ReadingPosition
  2131. raw := NoMethod(*s)
  2132. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2133. }
  2134. type RequestAccess struct {
  2135. // ConcurrentAccess: A concurrent access response.
  2136. ConcurrentAccess *ConcurrentAccessRestriction `json:"concurrentAccess,omitempty"`
  2137. // DownloadAccess: A download access response.
  2138. DownloadAccess *DownloadAccessRestriction `json:"downloadAccess,omitempty"`
  2139. // Kind: Resource type.
  2140. Kind string `json:"kind,omitempty"`
  2141. // ServerResponse contains the HTTP response code and headers from the
  2142. // server.
  2143. googleapi.ServerResponse `json:"-"`
  2144. // ForceSendFields is a list of field names (e.g. "ConcurrentAccess") to
  2145. // unconditionally include in API requests. By default, fields with
  2146. // empty values are omitted from API requests. However, any non-pointer,
  2147. // non-interface field appearing in ForceSendFields will be sent to the
  2148. // server regardless of whether the field is empty or not. This may be
  2149. // used to include empty fields in Patch requests.
  2150. ForceSendFields []string `json:"-"`
  2151. // NullFields is a list of field names (e.g. "ConcurrentAccess") to
  2152. // include in API requests with the JSON null value. By default, fields
  2153. // with empty values are omitted from API requests. However, any field
  2154. // with an empty value appearing in NullFields will be sent to the
  2155. // server as null. It is an error if a field in this list has a
  2156. // non-empty value. This may be used to include null fields in Patch
  2157. // requests.
  2158. NullFields []string `json:"-"`
  2159. }
  2160. func (s *RequestAccess) MarshalJSON() ([]byte, error) {
  2161. type NoMethod RequestAccess
  2162. raw := NoMethod(*s)
  2163. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2164. }
  2165. type Review struct {
  2166. // Author: Author of this review.
  2167. Author *ReviewAuthor `json:"author,omitempty"`
  2168. // Content: Review text.
  2169. Content string `json:"content,omitempty"`
  2170. // Date: Date of this review.
  2171. Date string `json:"date,omitempty"`
  2172. // FullTextUrl: URL for the full review text, for reviews gathered from
  2173. // the web.
  2174. FullTextUrl string `json:"fullTextUrl,omitempty"`
  2175. // Kind: Resource type for a review.
  2176. Kind string `json:"kind,omitempty"`
  2177. // Rating: Star rating for this review. Possible values are ONE, TWO,
  2178. // THREE, FOUR, FIVE or NOT_RATED.
  2179. Rating string `json:"rating,omitempty"`
  2180. // Source: Information regarding the source of this review, when the
  2181. // review is not from a Google Books user.
  2182. Source *ReviewSource `json:"source,omitempty"`
  2183. // Title: Title for this review.
  2184. Title string `json:"title,omitempty"`
  2185. // Type: Source type for this review. Possible values are EDITORIAL,
  2186. // WEB_USER or GOOGLE_USER.
  2187. Type string `json:"type,omitempty"`
  2188. // VolumeId: Volume that this review is for.
  2189. VolumeId string `json:"volumeId,omitempty"`
  2190. // ForceSendFields is a list of field names (e.g. "Author") to
  2191. // unconditionally include in API requests. By default, fields with
  2192. // empty values are omitted from API requests. However, any non-pointer,
  2193. // non-interface field appearing in ForceSendFields will be sent to the
  2194. // server regardless of whether the field is empty or not. This may be
  2195. // used to include empty fields in Patch requests.
  2196. ForceSendFields []string `json:"-"`
  2197. // NullFields is a list of field names (e.g. "Author") to include in API
  2198. // requests with the JSON null value. By default, fields with empty
  2199. // values are omitted from API requests. However, any field with an
  2200. // empty value appearing in NullFields will be sent to the server as
  2201. // null. It is an error if a field in this list has a non-empty value.
  2202. // This may be used to include null fields in Patch requests.
  2203. NullFields []string `json:"-"`
  2204. }
  2205. func (s *Review) MarshalJSON() ([]byte, error) {
  2206. type NoMethod Review
  2207. raw := NoMethod(*s)
  2208. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2209. }
  2210. // ReviewAuthor: Author of this review.
  2211. type ReviewAuthor struct {
  2212. // DisplayName: Name of this person.
  2213. DisplayName string `json:"displayName,omitempty"`
  2214. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  2215. // unconditionally include in API requests. By default, fields with
  2216. // empty values are omitted from API requests. However, any non-pointer,
  2217. // non-interface field appearing in ForceSendFields will be sent to the
  2218. // server regardless of whether the field is empty or not. This may be
  2219. // used to include empty fields in Patch requests.
  2220. ForceSendFields []string `json:"-"`
  2221. // NullFields is a list of field names (e.g. "DisplayName") to include
  2222. // in API requests with the JSON null value. By default, fields with
  2223. // empty values are omitted from API requests. However, any field with
  2224. // an 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. func (s *ReviewAuthor) MarshalJSON() ([]byte, error) {
  2230. type NoMethod ReviewAuthor
  2231. raw := NoMethod(*s)
  2232. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2233. }
  2234. // ReviewSource: Information regarding the source of this review, when
  2235. // the review is not from a Google Books user.
  2236. type ReviewSource struct {
  2237. // Description: Name of the source.
  2238. Description string `json:"description,omitempty"`
  2239. // ExtraDescription: Extra text about the source of the review.
  2240. ExtraDescription string `json:"extraDescription,omitempty"`
  2241. // Url: URL of the source of the review.
  2242. Url string `json:"url,omitempty"`
  2243. // ForceSendFields is a list of field names (e.g. "Description") to
  2244. // unconditionally include in API requests. By default, fields with
  2245. // empty values are omitted from API requests. However, any non-pointer,
  2246. // non-interface field appearing in ForceSendFields will be sent to the
  2247. // server regardless of whether the field is empty or not. This may be
  2248. // used to include empty fields in Patch requests.
  2249. ForceSendFields []string `json:"-"`
  2250. // NullFields is a list of field names (e.g. "Description") to include
  2251. // in API requests with the JSON null value. By default, fields with
  2252. // empty values are omitted from API requests. However, any field with
  2253. // an empty value appearing in NullFields will be sent to the server as
  2254. // null. It is an error if a field in this list has a non-empty value.
  2255. // This may be used to include null fields in Patch requests.
  2256. NullFields []string `json:"-"`
  2257. }
  2258. func (s *ReviewSource) MarshalJSON() ([]byte, error) {
  2259. type NoMethod ReviewSource
  2260. raw := NoMethod(*s)
  2261. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2262. }
  2263. type Series struct {
  2264. // Kind: Resource type.
  2265. Kind string `json:"kind,omitempty"`
  2266. Series []*SeriesSeries `json:"series,omitempty"`
  2267. // ServerResponse contains the HTTP response code and headers from the
  2268. // server.
  2269. googleapi.ServerResponse `json:"-"`
  2270. // ForceSendFields is a list of field names (e.g. "Kind") to
  2271. // unconditionally include in API requests. By default, fields with
  2272. // empty values are omitted from API requests. However, any non-pointer,
  2273. // non-interface field appearing in ForceSendFields will be sent to the
  2274. // server regardless of whether the field is empty or not. This may be
  2275. // used to include empty fields in Patch requests.
  2276. ForceSendFields []string `json:"-"`
  2277. // NullFields is a list of field names (e.g. "Kind") to include in API
  2278. // requests with the JSON null value. By default, fields with empty
  2279. // values are omitted from API requests. However, any field with an
  2280. // empty value appearing in NullFields will be sent to the server as
  2281. // null. It is an error if a field in this list has a non-empty value.
  2282. // This may be used to include null fields in Patch requests.
  2283. NullFields []string `json:"-"`
  2284. }
  2285. func (s *Series) MarshalJSON() ([]byte, error) {
  2286. type NoMethod Series
  2287. raw := NoMethod(*s)
  2288. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2289. }
  2290. type SeriesSeries struct {
  2291. BannerImageUrl string `json:"bannerImageUrl,omitempty"`
  2292. ImageUrl string `json:"imageUrl,omitempty"`
  2293. SeriesId string `json:"seriesId,omitempty"`
  2294. SeriesType string `json:"seriesType,omitempty"`
  2295. Title string `json:"title,omitempty"`
  2296. // ForceSendFields is a list of field names (e.g. "BannerImageUrl") to
  2297. // unconditionally include in API requests. By default, fields with
  2298. // empty values are omitted from API requests. However, any non-pointer,
  2299. // non-interface field appearing in ForceSendFields will be sent to the
  2300. // server regardless of whether the field is empty or not. This may be
  2301. // used to include empty fields in Patch requests.
  2302. ForceSendFields []string `json:"-"`
  2303. // NullFields is a list of field names (e.g. "BannerImageUrl") to
  2304. // include in API requests with the JSON null value. By default, fields
  2305. // with empty values are omitted from API requests. However, any field
  2306. // with an empty value appearing in NullFields will be sent to the
  2307. // server as null. It is an error if a field in this list has a
  2308. // non-empty value. This may be used to include null fields in Patch
  2309. // requests.
  2310. NullFields []string `json:"-"`
  2311. }
  2312. func (s *SeriesSeries) MarshalJSON() ([]byte, error) {
  2313. type NoMethod SeriesSeries
  2314. raw := NoMethod(*s)
  2315. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2316. }
  2317. type Seriesmembership struct {
  2318. // Kind: Resorce type.
  2319. Kind string `json:"kind,omitempty"`
  2320. Member []*Volume `json:"member,omitempty"`
  2321. NextPageToken string `json:"nextPageToken,omitempty"`
  2322. // ServerResponse contains the HTTP response code and headers from the
  2323. // server.
  2324. googleapi.ServerResponse `json:"-"`
  2325. // ForceSendFields is a list of field names (e.g. "Kind") to
  2326. // unconditionally include in API requests. By default, fields with
  2327. // empty values are omitted from API requests. However, any non-pointer,
  2328. // non-interface field appearing in ForceSendFields will be sent to the
  2329. // server regardless of whether the field is empty or not. This may be
  2330. // used to include empty fields in Patch requests.
  2331. ForceSendFields []string `json:"-"`
  2332. // NullFields is a list of field names (e.g. "Kind") to include in API
  2333. // requests with the JSON null value. By default, fields with empty
  2334. // values are omitted from API requests. However, any field with an
  2335. // empty value appearing in NullFields will be sent to the server as
  2336. // null. It is an error if a field in this list has a non-empty value.
  2337. // This may be used to include null fields in Patch requests.
  2338. NullFields []string `json:"-"`
  2339. }
  2340. func (s *Seriesmembership) MarshalJSON() ([]byte, error) {
  2341. type NoMethod Seriesmembership
  2342. raw := NoMethod(*s)
  2343. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2344. }
  2345. type Usersettings struct {
  2346. // Kind: Resource type.
  2347. Kind string `json:"kind,omitempty"`
  2348. // NotesExport: User settings in sub-objects, each for different
  2349. // purposes.
  2350. NotesExport *UsersettingsNotesExport `json:"notesExport,omitempty"`
  2351. Notification *UsersettingsNotification `json:"notification,omitempty"`
  2352. // ServerResponse contains the HTTP response code and headers from the
  2353. // server.
  2354. googleapi.ServerResponse `json:"-"`
  2355. // ForceSendFields is a list of field names (e.g. "Kind") to
  2356. // unconditionally include in API requests. By default, fields with
  2357. // empty values are omitted from API requests. However, any non-pointer,
  2358. // non-interface field appearing in ForceSendFields will be sent to the
  2359. // server regardless of whether the field is empty or not. This may be
  2360. // used to include empty fields in Patch requests.
  2361. ForceSendFields []string `json:"-"`
  2362. // NullFields is a list of field names (e.g. "Kind") to include in API
  2363. // requests with the JSON null value. By default, fields with empty
  2364. // values are omitted from API requests. However, any field with an
  2365. // empty value appearing in NullFields will be sent to the server as
  2366. // null. It is an error if a field in this list has a non-empty value.
  2367. // This may be used to include null fields in Patch requests.
  2368. NullFields []string `json:"-"`
  2369. }
  2370. func (s *Usersettings) MarshalJSON() ([]byte, error) {
  2371. type NoMethod Usersettings
  2372. raw := NoMethod(*s)
  2373. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2374. }
  2375. // UsersettingsNotesExport: User settings in sub-objects, each for
  2376. // different purposes.
  2377. type UsersettingsNotesExport struct {
  2378. FolderName string `json:"folderName,omitempty"`
  2379. IsEnabled bool `json:"isEnabled,omitempty"`
  2380. // ForceSendFields is a list of field names (e.g. "FolderName") to
  2381. // unconditionally include in API requests. By default, fields with
  2382. // empty values are omitted from API requests. However, any non-pointer,
  2383. // non-interface field appearing in ForceSendFields will be sent to the
  2384. // server regardless of whether the field is empty or not. This may be
  2385. // used to include empty fields in Patch requests.
  2386. ForceSendFields []string `json:"-"`
  2387. // NullFields is a list of field names (e.g. "FolderName") to include in
  2388. // API requests with the JSON null value. By default, fields with empty
  2389. // values are omitted from API requests. However, any field with an
  2390. // empty value appearing in NullFields will be sent to the server as
  2391. // null. It is an error if a field in this list has a non-empty value.
  2392. // This may be used to include null fields in Patch requests.
  2393. NullFields []string `json:"-"`
  2394. }
  2395. func (s *UsersettingsNotesExport) MarshalJSON() ([]byte, error) {
  2396. type NoMethod UsersettingsNotesExport
  2397. raw := NoMethod(*s)
  2398. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2399. }
  2400. type UsersettingsNotification struct {
  2401. MatchMyInterests *UsersettingsNotificationMatchMyInterests `json:"matchMyInterests,omitempty"`
  2402. MoreFromAuthors *UsersettingsNotificationMoreFromAuthors `json:"moreFromAuthors,omitempty"`
  2403. MoreFromSeries *UsersettingsNotificationMoreFromSeries `json:"moreFromSeries,omitempty"`
  2404. PriceDrop *UsersettingsNotificationPriceDrop `json:"priceDrop,omitempty"`
  2405. RewardExpirations *UsersettingsNotificationRewardExpirations `json:"rewardExpirations,omitempty"`
  2406. // ForceSendFields is a list of field names (e.g. "MatchMyInterests") to
  2407. // unconditionally include in API requests. By default, fields with
  2408. // empty values are omitted from API requests. However, any non-pointer,
  2409. // non-interface field appearing in ForceSendFields will be sent to the
  2410. // server regardless of whether the field is empty or not. This may be
  2411. // used to include empty fields in Patch requests.
  2412. ForceSendFields []string `json:"-"`
  2413. // NullFields is a list of field names (e.g. "MatchMyInterests") to
  2414. // include in API requests with the JSON null value. By default, fields
  2415. // with empty values are omitted from API requests. However, any field
  2416. // with an empty value appearing in NullFields will be sent to the
  2417. // server as null. It is an error if a field in this list has a
  2418. // non-empty value. This may be used to include null fields in Patch
  2419. // requests.
  2420. NullFields []string `json:"-"`
  2421. }
  2422. func (s *UsersettingsNotification) MarshalJSON() ([]byte, error) {
  2423. type NoMethod UsersettingsNotification
  2424. raw := NoMethod(*s)
  2425. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2426. }
  2427. type UsersettingsNotificationMatchMyInterests struct {
  2428. OptedState string `json:"opted_state,omitempty"`
  2429. // ForceSendFields is a list of field names (e.g. "OptedState") to
  2430. // unconditionally include in API requests. By default, fields with
  2431. // empty values are omitted from API requests. However, any non-pointer,
  2432. // non-interface field appearing in ForceSendFields will be sent to the
  2433. // server regardless of whether the field is empty or not. This may be
  2434. // used to include empty fields in Patch requests.
  2435. ForceSendFields []string `json:"-"`
  2436. // NullFields is a list of field names (e.g. "OptedState") to include in
  2437. // API requests with the JSON null value. By default, fields with empty
  2438. // values are omitted from API requests. However, any field with an
  2439. // empty value appearing in NullFields will be sent to the server as
  2440. // null. It is an error if a field in this list has a non-empty value.
  2441. // This may be used to include null fields in Patch requests.
  2442. NullFields []string `json:"-"`
  2443. }
  2444. func (s *UsersettingsNotificationMatchMyInterests) MarshalJSON() ([]byte, error) {
  2445. type NoMethod UsersettingsNotificationMatchMyInterests
  2446. raw := NoMethod(*s)
  2447. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2448. }
  2449. type UsersettingsNotificationMoreFromAuthors struct {
  2450. OptedState string `json:"opted_state,omitempty"`
  2451. // ForceSendFields is a list of field names (e.g. "OptedState") to
  2452. // unconditionally include in API requests. By default, fields with
  2453. // empty values are omitted from API requests. However, any non-pointer,
  2454. // non-interface field appearing in ForceSendFields will be sent to the
  2455. // server regardless of whether the field is empty or not. This may be
  2456. // used to include empty fields in Patch requests.
  2457. ForceSendFields []string `json:"-"`
  2458. // NullFields is a list of field names (e.g. "OptedState") to include in
  2459. // API requests with the JSON null value. By default, fields with empty
  2460. // values are omitted from API requests. However, any field with an
  2461. // empty value appearing in NullFields will be sent to the server as
  2462. // null. It is an error if a field in this list has a non-empty value.
  2463. // This may be used to include null fields in Patch requests.
  2464. NullFields []string `json:"-"`
  2465. }
  2466. func (s *UsersettingsNotificationMoreFromAuthors) MarshalJSON() ([]byte, error) {
  2467. type NoMethod UsersettingsNotificationMoreFromAuthors
  2468. raw := NoMethod(*s)
  2469. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2470. }
  2471. type UsersettingsNotificationMoreFromSeries struct {
  2472. OptedState string `json:"opted_state,omitempty"`
  2473. // ForceSendFields is a list of field names (e.g. "OptedState") to
  2474. // unconditionally include in API requests. By default, fields with
  2475. // empty values are omitted from API requests. However, any non-pointer,
  2476. // non-interface field appearing in ForceSendFields will be sent to the
  2477. // server regardless of whether the field is empty or not. This may be
  2478. // used to include empty fields in Patch requests.
  2479. ForceSendFields []string `json:"-"`
  2480. // NullFields is a list of field names (e.g. "OptedState") to include in
  2481. // API requests with the JSON null value. By default, fields with empty
  2482. // values are omitted from API requests. However, any field with an
  2483. // empty value appearing in NullFields will be sent to the server as
  2484. // null. It is an error if a field in this list has a non-empty value.
  2485. // This may be used to include null fields in Patch requests.
  2486. NullFields []string `json:"-"`
  2487. }
  2488. func (s *UsersettingsNotificationMoreFromSeries) MarshalJSON() ([]byte, error) {
  2489. type NoMethod UsersettingsNotificationMoreFromSeries
  2490. raw := NoMethod(*s)
  2491. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2492. }
  2493. type UsersettingsNotificationPriceDrop struct {
  2494. OptedState string `json:"opted_state,omitempty"`
  2495. // ForceSendFields is a list of field names (e.g. "OptedState") to
  2496. // unconditionally include in API requests. By default, fields with
  2497. // empty values are omitted from API requests. However, any non-pointer,
  2498. // non-interface field appearing in ForceSendFields will be sent to the
  2499. // server regardless of whether the field is empty or not. This may be
  2500. // used to include empty fields in Patch requests.
  2501. ForceSendFields []string `json:"-"`
  2502. // NullFields is a list of field names (e.g. "OptedState") to include in
  2503. // API requests with the JSON null value. By default, fields with empty
  2504. // values are omitted from API requests. However, any field with an
  2505. // empty value appearing in NullFields will be sent to the server as
  2506. // null. It is an error if a field in this list has a non-empty value.
  2507. // This may be used to include null fields in Patch requests.
  2508. NullFields []string `json:"-"`
  2509. }
  2510. func (s *UsersettingsNotificationPriceDrop) MarshalJSON() ([]byte, error) {
  2511. type NoMethod UsersettingsNotificationPriceDrop
  2512. raw := NoMethod(*s)
  2513. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2514. }
  2515. type UsersettingsNotificationRewardExpirations struct {
  2516. OptedState string `json:"opted_state,omitempty"`
  2517. // ForceSendFields is a list of field names (e.g. "OptedState") to
  2518. // unconditionally include in API requests. By default, fields with
  2519. // empty values are omitted from API requests. However, any non-pointer,
  2520. // non-interface field appearing in ForceSendFields will be sent to the
  2521. // server regardless of whether the field is empty or not. This may be
  2522. // used to include empty fields in Patch requests.
  2523. ForceSendFields []string `json:"-"`
  2524. // NullFields is a list of field names (e.g. "OptedState") to include in
  2525. // API requests with the JSON null value. By default, fields with empty
  2526. // values are omitted from API requests. However, any field with an
  2527. // empty value appearing in NullFields will be sent to the server as
  2528. // null. It is an error if a field in this list has a non-empty value.
  2529. // This may be used to include null fields in Patch requests.
  2530. NullFields []string `json:"-"`
  2531. }
  2532. func (s *UsersettingsNotificationRewardExpirations) MarshalJSON() ([]byte, error) {
  2533. type NoMethod UsersettingsNotificationRewardExpirations
  2534. raw := NoMethod(*s)
  2535. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2536. }
  2537. type Volume struct {
  2538. // AccessInfo: Any information about a volume related to reading or
  2539. // obtaining that volume text. This information can depend on country
  2540. // (books may be public domain in one country but not in another, e.g.).
  2541. AccessInfo *VolumeAccessInfo `json:"accessInfo,omitempty"`
  2542. // Etag: Opaque identifier for a specific version of a volume resource.
  2543. // (In LITE projection)
  2544. Etag string `json:"etag,omitempty"`
  2545. // Id: Unique identifier for a volume. (In LITE projection.)
  2546. Id string `json:"id,omitempty"`
  2547. // Kind: Resource type for a volume. (In LITE projection.)
  2548. Kind string `json:"kind,omitempty"`
  2549. // LayerInfo: What layers exist in this volume and high level
  2550. // information about them.
  2551. LayerInfo *VolumeLayerInfo `json:"layerInfo,omitempty"`
  2552. // RecommendedInfo: Recommendation related information for this volume.
  2553. RecommendedInfo *VolumeRecommendedInfo `json:"recommendedInfo,omitempty"`
  2554. // SaleInfo: Any information about a volume related to the eBookstore
  2555. // and/or purchaseability. This information can depend on the country
  2556. // where the request originates from (i.e. books may not be for sale in
  2557. // certain countries).
  2558. SaleInfo *VolumeSaleInfo `json:"saleInfo,omitempty"`
  2559. // SearchInfo: Search result information related to this volume.
  2560. SearchInfo *VolumeSearchInfo `json:"searchInfo,omitempty"`
  2561. // SelfLink: URL to this resource. (In LITE projection.)
  2562. SelfLink string `json:"selfLink,omitempty"`
  2563. // UserInfo: User specific information related to this volume. (e.g.
  2564. // page this user last read or whether they purchased this book)
  2565. UserInfo *VolumeUserInfo `json:"userInfo,omitempty"`
  2566. // VolumeInfo: General volume information.
  2567. VolumeInfo *VolumeVolumeInfo `json:"volumeInfo,omitempty"`
  2568. // ServerResponse contains the HTTP response code and headers from the
  2569. // server.
  2570. googleapi.ServerResponse `json:"-"`
  2571. // ForceSendFields is a list of field names (e.g. "AccessInfo") to
  2572. // unconditionally include in API requests. By default, fields with
  2573. // empty values are omitted from API requests. However, any non-pointer,
  2574. // non-interface field appearing in ForceSendFields will be sent to the
  2575. // server regardless of whether the field is empty or not. This may be
  2576. // used to include empty fields in Patch requests.
  2577. ForceSendFields []string `json:"-"`
  2578. // NullFields is a list of field names (e.g. "AccessInfo") to include in
  2579. // API requests with the JSON null value. By default, fields with empty
  2580. // values are omitted from API requests. However, any field with an
  2581. // empty value appearing in NullFields will be sent to the server as
  2582. // null. It is an error if a field in this list has a non-empty value.
  2583. // This may be used to include null fields in Patch requests.
  2584. NullFields []string `json:"-"`
  2585. }
  2586. func (s *Volume) MarshalJSON() ([]byte, error) {
  2587. type NoMethod Volume
  2588. raw := NoMethod(*s)
  2589. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2590. }
  2591. // VolumeAccessInfo: Any information about a volume related to reading
  2592. // or obtaining that volume text. This information can depend on country
  2593. // (books may be public domain in one country but not in another, e.g.).
  2594. type VolumeAccessInfo struct {
  2595. // AccessViewStatus: Combines the access and viewability of this volume
  2596. // into a single status field for this user. Values can be
  2597. // FULL_PURCHASED, FULL_PUBLIC_DOMAIN, SAMPLE or NONE. (In LITE
  2598. // projection.)
  2599. AccessViewStatus string `json:"accessViewStatus,omitempty"`
  2600. // Country: The two-letter ISO_3166-1 country code for which this access
  2601. // information is valid. (In LITE projection.)
  2602. Country string `json:"country,omitempty"`
  2603. // DownloadAccess: Information about a volume's download license access
  2604. // restrictions.
  2605. DownloadAccess *DownloadAccessRestriction `json:"downloadAccess,omitempty"`
  2606. // DriveImportedContentLink: URL to the Google Drive viewer if this
  2607. // volume is uploaded by the user by selecting the file from Google
  2608. // Drive.
  2609. DriveImportedContentLink string `json:"driveImportedContentLink,omitempty"`
  2610. // Embeddable: Whether this volume can be embedded in a viewport using
  2611. // the Embedded Viewer API.
  2612. Embeddable bool `json:"embeddable,omitempty"`
  2613. // Epub: Information about epub content. (In LITE projection.)
  2614. Epub *VolumeAccessInfoEpub `json:"epub,omitempty"`
  2615. // ExplicitOfflineLicenseManagement: Whether this volume requires that
  2616. // the client explicitly request offline download license rather than
  2617. // have it done automatically when loading the content, if the client
  2618. // supports it.
  2619. ExplicitOfflineLicenseManagement bool `json:"explicitOfflineLicenseManagement,omitempty"`
  2620. // Pdf: Information about pdf content. (In LITE projection.)
  2621. Pdf *VolumeAccessInfoPdf `json:"pdf,omitempty"`
  2622. // PublicDomain: Whether or not this book is public domain in the
  2623. // country listed above.
  2624. PublicDomain bool `json:"publicDomain,omitempty"`
  2625. // QuoteSharingAllowed: Whether quote sharing is allowed for this
  2626. // volume.
  2627. QuoteSharingAllowed bool `json:"quoteSharingAllowed,omitempty"`
  2628. // TextToSpeechPermission: Whether text-to-speech is permitted for this
  2629. // volume. Values can be ALLOWED, ALLOWED_FOR_ACCESSIBILITY, or
  2630. // NOT_ALLOWED.
  2631. TextToSpeechPermission string `json:"textToSpeechPermission,omitempty"`
  2632. // ViewOrderUrl: For ordered but not yet processed orders, we give a URL
  2633. // that can be used to go to the appropriate Google Wallet page.
  2634. ViewOrderUrl string `json:"viewOrderUrl,omitempty"`
  2635. // Viewability: The read access of a volume. Possible values are
  2636. // PARTIAL, ALL_PAGES, NO_PAGES or UNKNOWN. This value depends on the
  2637. // country listed above. A value of PARTIAL means that the publisher has
  2638. // allowed some portion of the volume to be viewed publicly, without
  2639. // purchase. This can apply to eBooks as well as non-eBooks. Public
  2640. // domain books will always have a value of ALL_PAGES.
  2641. Viewability string `json:"viewability,omitempty"`
  2642. // WebReaderLink: URL to read this volume on the Google Books site. Link
  2643. // will not allow users to read non-viewable volumes.
  2644. WebReaderLink string `json:"webReaderLink,omitempty"`
  2645. // ForceSendFields is a list of field names (e.g. "AccessViewStatus") to
  2646. // unconditionally include in API requests. By default, fields with
  2647. // empty values are omitted from API requests. However, any non-pointer,
  2648. // non-interface field appearing in ForceSendFields will be sent to the
  2649. // server regardless of whether the field is empty or not. This may be
  2650. // used to include empty fields in Patch requests.
  2651. ForceSendFields []string `json:"-"`
  2652. // NullFields is a list of field names (e.g. "AccessViewStatus") to
  2653. // include in API requests with the JSON null value. By default, fields
  2654. // with empty values are omitted from API requests. However, any field
  2655. // with an empty value appearing in NullFields will be sent to the
  2656. // server as null. It is an error if a field in this list has a
  2657. // non-empty value. This may be used to include null fields in Patch
  2658. // requests.
  2659. NullFields []string `json:"-"`
  2660. }
  2661. func (s *VolumeAccessInfo) MarshalJSON() ([]byte, error) {
  2662. type NoMethod VolumeAccessInfo
  2663. raw := NoMethod(*s)
  2664. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2665. }
  2666. // VolumeAccessInfoEpub: Information about epub content. (In LITE
  2667. // projection.)
  2668. type VolumeAccessInfoEpub struct {
  2669. // AcsTokenLink: URL to retrieve ACS token for epub download. (In LITE
  2670. // projection.)
  2671. AcsTokenLink string `json:"acsTokenLink,omitempty"`
  2672. // DownloadLink: URL to download epub. (In LITE projection.)
  2673. DownloadLink string `json:"downloadLink,omitempty"`
  2674. // IsAvailable: Is a flowing text epub available either as public domain
  2675. // or for purchase. (In LITE projection.)
  2676. IsAvailable bool `json:"isAvailable,omitempty"`
  2677. // ForceSendFields is a list of field names (e.g. "AcsTokenLink") to
  2678. // unconditionally include in API requests. By default, fields with
  2679. // empty values are omitted from API requests. However, any non-pointer,
  2680. // non-interface field appearing in ForceSendFields will be sent to the
  2681. // server regardless of whether the field is empty or not. This may be
  2682. // used to include empty fields in Patch requests.
  2683. ForceSendFields []string `json:"-"`
  2684. // NullFields is a list of field names (e.g. "AcsTokenLink") to include
  2685. // in API requests with the JSON null value. By default, fields with
  2686. // empty values are omitted from API requests. However, any field with
  2687. // an empty value appearing in NullFields will be sent to the server as
  2688. // null. It is an error if a field in this list has a non-empty value.
  2689. // This may be used to include null fields in Patch requests.
  2690. NullFields []string `json:"-"`
  2691. }
  2692. func (s *VolumeAccessInfoEpub) MarshalJSON() ([]byte, error) {
  2693. type NoMethod VolumeAccessInfoEpub
  2694. raw := NoMethod(*s)
  2695. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2696. }
  2697. // VolumeAccessInfoPdf: Information about pdf content. (In LITE
  2698. // projection.)
  2699. type VolumeAccessInfoPdf struct {
  2700. // AcsTokenLink: URL to retrieve ACS token for pdf download. (In LITE
  2701. // projection.)
  2702. AcsTokenLink string `json:"acsTokenLink,omitempty"`
  2703. // DownloadLink: URL to download pdf. (In LITE projection.)
  2704. DownloadLink string `json:"downloadLink,omitempty"`
  2705. // IsAvailable: Is a scanned image pdf available either as public domain
  2706. // or for purchase. (In LITE projection.)
  2707. IsAvailable bool `json:"isAvailable,omitempty"`
  2708. // ForceSendFields is a list of field names (e.g. "AcsTokenLink") to
  2709. // unconditionally include in API requests. By default, fields with
  2710. // empty values are omitted from API requests. However, any non-pointer,
  2711. // non-interface field appearing in ForceSendFields will be sent to the
  2712. // server regardless of whether the field is empty or not. This may be
  2713. // used to include empty fields in Patch requests.
  2714. ForceSendFields []string `json:"-"`
  2715. // NullFields is a list of field names (e.g. "AcsTokenLink") to include
  2716. // in API requests with the JSON null value. By default, fields with
  2717. // empty values are omitted from API requests. However, any field with
  2718. // an empty value appearing in NullFields will be sent to the server as
  2719. // null. It is an error if a field in this list has a non-empty value.
  2720. // This may be used to include null fields in Patch requests.
  2721. NullFields []string `json:"-"`
  2722. }
  2723. func (s *VolumeAccessInfoPdf) MarshalJSON() ([]byte, error) {
  2724. type NoMethod VolumeAccessInfoPdf
  2725. raw := NoMethod(*s)
  2726. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2727. }
  2728. // VolumeLayerInfo: What layers exist in this volume and high level
  2729. // information about them.
  2730. type VolumeLayerInfo struct {
  2731. // Layers: A layer should appear here if and only if the layer exists
  2732. // for this book.
  2733. Layers []*VolumeLayerInfoLayers `json:"layers,omitempty"`
  2734. // ForceSendFields is a list of field names (e.g. "Layers") to
  2735. // unconditionally include in API requests. By default, fields with
  2736. // empty values are omitted from API requests. However, any non-pointer,
  2737. // non-interface field appearing in ForceSendFields will be sent to the
  2738. // server regardless of whether the field is empty or not. This may be
  2739. // used to include empty fields in Patch requests.
  2740. ForceSendFields []string `json:"-"`
  2741. // NullFields is a list of field names (e.g. "Layers") to include in API
  2742. // requests with the JSON null value. By default, fields with empty
  2743. // values are omitted from API requests. However, any field with an
  2744. // empty value appearing in NullFields will be sent to the server as
  2745. // null. It is an error if a field in this list has a non-empty value.
  2746. // This may be used to include null fields in Patch requests.
  2747. NullFields []string `json:"-"`
  2748. }
  2749. func (s *VolumeLayerInfo) MarshalJSON() ([]byte, error) {
  2750. type NoMethod VolumeLayerInfo
  2751. raw := NoMethod(*s)
  2752. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2753. }
  2754. type VolumeLayerInfoLayers struct {
  2755. // LayerId: The layer id of this layer (e.g. "geo").
  2756. LayerId string `json:"layerId,omitempty"`
  2757. // VolumeAnnotationsVersion: The current version of this layer's volume
  2758. // annotations. Note that this version applies only to the data in the
  2759. // books.layers.volumeAnnotations.* responses. The actual annotation
  2760. // data is versioned separately.
  2761. VolumeAnnotationsVersion string `json:"volumeAnnotationsVersion,omitempty"`
  2762. // ForceSendFields is a list of field names (e.g. "LayerId") to
  2763. // unconditionally include in API requests. By default, fields with
  2764. // empty values are omitted from API requests. However, any non-pointer,
  2765. // non-interface field appearing in ForceSendFields will be sent to the
  2766. // server regardless of whether the field is empty or not. This may be
  2767. // used to include empty fields in Patch requests.
  2768. ForceSendFields []string `json:"-"`
  2769. // NullFields is a list of field names (e.g. "LayerId") to include in
  2770. // API requests with the JSON null value. By default, fields with empty
  2771. // values are omitted from API requests. However, any field with an
  2772. // empty value appearing in NullFields will be sent to the server as
  2773. // null. It is an error if a field in this list has a non-empty value.
  2774. // This may be used to include null fields in Patch requests.
  2775. NullFields []string `json:"-"`
  2776. }
  2777. func (s *VolumeLayerInfoLayers) MarshalJSON() ([]byte, error) {
  2778. type NoMethod VolumeLayerInfoLayers
  2779. raw := NoMethod(*s)
  2780. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2781. }
  2782. // VolumeRecommendedInfo: Recommendation related information for this
  2783. // volume.
  2784. type VolumeRecommendedInfo struct {
  2785. // Explanation: A text explaining why this volume is recommended.
  2786. Explanation string `json:"explanation,omitempty"`
  2787. // ForceSendFields is a list of field names (e.g. "Explanation") to
  2788. // unconditionally include in API requests. By default, fields with
  2789. // empty values are omitted from API requests. However, any non-pointer,
  2790. // non-interface field appearing in ForceSendFields will be sent to the
  2791. // server regardless of whether the field is empty or not. This may be
  2792. // used to include empty fields in Patch requests.
  2793. ForceSendFields []string `json:"-"`
  2794. // NullFields is a list of field names (e.g. "Explanation") to include
  2795. // in API requests with the JSON null value. By default, fields with
  2796. // empty values are omitted from API requests. However, any field with
  2797. // an empty value appearing in NullFields will be sent to the server as
  2798. // null. It is an error if a field in this list has a non-empty value.
  2799. // This may be used to include null fields in Patch requests.
  2800. NullFields []string `json:"-"`
  2801. }
  2802. func (s *VolumeRecommendedInfo) MarshalJSON() ([]byte, error) {
  2803. type NoMethod VolumeRecommendedInfo
  2804. raw := NoMethod(*s)
  2805. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2806. }
  2807. // VolumeSaleInfo: Any information about a volume related to the
  2808. // eBookstore and/or purchaseability. This information can depend on the
  2809. // country where the request originates from (i.e. books may not be for
  2810. // sale in certain countries).
  2811. type VolumeSaleInfo struct {
  2812. // BuyLink: URL to purchase this volume on the Google Books site. (In
  2813. // LITE projection)
  2814. BuyLink string `json:"buyLink,omitempty"`
  2815. // Country: The two-letter ISO_3166-1 country code for which this sale
  2816. // information is valid. (In LITE projection.)
  2817. Country string `json:"country,omitempty"`
  2818. // IsEbook: Whether or not this volume is an eBook (can be added to the
  2819. // My eBooks shelf).
  2820. IsEbook bool `json:"isEbook,omitempty"`
  2821. // ListPrice: Suggested retail price. (In LITE projection.)
  2822. ListPrice *VolumeSaleInfoListPrice `json:"listPrice,omitempty"`
  2823. // Offers: Offers available for this volume (sales and rentals).
  2824. Offers []*VolumeSaleInfoOffers `json:"offers,omitempty"`
  2825. // OnSaleDate: The date on which this book is available for sale.
  2826. OnSaleDate string `json:"onSaleDate,omitempty"`
  2827. // RetailPrice: The actual selling price of the book. This is the same
  2828. // as the suggested retail or list price unless there are offers or
  2829. // discounts on this volume. (In LITE projection.)
  2830. RetailPrice *VolumeSaleInfoRetailPrice `json:"retailPrice,omitempty"`
  2831. // Saleability: Whether or not this book is available for sale or
  2832. // offered for free in the Google eBookstore for the country listed
  2833. // above. Possible values are FOR_SALE, FOR_RENTAL_ONLY,
  2834. // FOR_SALE_AND_RENTAL, FREE, NOT_FOR_SALE, or FOR_PREORDER.
  2835. Saleability string `json:"saleability,omitempty"`
  2836. // ForceSendFields is a list of field names (e.g. "BuyLink") to
  2837. // unconditionally include in API requests. By default, fields with
  2838. // empty values are omitted from API requests. However, any non-pointer,
  2839. // non-interface field appearing in ForceSendFields will be sent to the
  2840. // server regardless of whether the field is empty or not. This may be
  2841. // used to include empty fields in Patch requests.
  2842. ForceSendFields []string `json:"-"`
  2843. // NullFields is a list of field names (e.g. "BuyLink") to include in
  2844. // API requests with the JSON null value. By default, fields with empty
  2845. // values are omitted from API requests. However, any field with an
  2846. // empty value appearing in NullFields will be sent to the server as
  2847. // null. It is an error if a field in this list has a non-empty value.
  2848. // This may be used to include null fields in Patch requests.
  2849. NullFields []string `json:"-"`
  2850. }
  2851. func (s *VolumeSaleInfo) MarshalJSON() ([]byte, error) {
  2852. type NoMethod VolumeSaleInfo
  2853. raw := NoMethod(*s)
  2854. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2855. }
  2856. // VolumeSaleInfoListPrice: Suggested retail price. (In LITE
  2857. // projection.)
  2858. type VolumeSaleInfoListPrice struct {
  2859. // Amount: Amount in the currency listed below. (In LITE projection.)
  2860. Amount float64 `json:"amount,omitempty"`
  2861. // CurrencyCode: An ISO 4217, three-letter currency code. (In LITE
  2862. // projection.)
  2863. CurrencyCode string `json:"currencyCode,omitempty"`
  2864. // ForceSendFields is a list of field names (e.g. "Amount") to
  2865. // unconditionally include in API requests. By default, fields with
  2866. // empty values are omitted from API requests. However, any non-pointer,
  2867. // non-interface field appearing in ForceSendFields will be sent to the
  2868. // server regardless of whether the field is empty or not. This may be
  2869. // used to include empty fields in Patch requests.
  2870. ForceSendFields []string `json:"-"`
  2871. // NullFields is a list of field names (e.g. "Amount") to include in API
  2872. // requests with the JSON null value. By default, fields with empty
  2873. // values are omitted from API requests. However, any field with an
  2874. // empty value appearing in NullFields will be sent to the server as
  2875. // null. It is an error if a field in this list has a non-empty value.
  2876. // This may be used to include null fields in Patch requests.
  2877. NullFields []string `json:"-"`
  2878. }
  2879. func (s *VolumeSaleInfoListPrice) MarshalJSON() ([]byte, error) {
  2880. type NoMethod VolumeSaleInfoListPrice
  2881. raw := NoMethod(*s)
  2882. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2883. }
  2884. func (s *VolumeSaleInfoListPrice) UnmarshalJSON(data []byte) error {
  2885. type NoMethod VolumeSaleInfoListPrice
  2886. var s1 struct {
  2887. Amount gensupport.JSONFloat64 `json:"amount"`
  2888. *NoMethod
  2889. }
  2890. s1.NoMethod = (*NoMethod)(s)
  2891. if err := json.Unmarshal(data, &s1); err != nil {
  2892. return err
  2893. }
  2894. s.Amount = float64(s1.Amount)
  2895. return nil
  2896. }
  2897. type VolumeSaleInfoOffers struct {
  2898. // FinskyOfferType: The finsky offer type (e.g., PURCHASE=0 RENTAL=3)
  2899. FinskyOfferType int64 `json:"finskyOfferType,omitempty"`
  2900. // Giftable: Indicates whether the offer is giftable.
  2901. Giftable bool `json:"giftable,omitempty"`
  2902. // ListPrice: Offer list (=undiscounted) price in Micros.
  2903. ListPrice *VolumeSaleInfoOffersListPrice `json:"listPrice,omitempty"`
  2904. // RentalDuration: The rental duration (for rental offers only).
  2905. RentalDuration *VolumeSaleInfoOffersRentalDuration `json:"rentalDuration,omitempty"`
  2906. // RetailPrice: Offer retail (=discounted) price in Micros
  2907. RetailPrice *VolumeSaleInfoOffersRetailPrice `json:"retailPrice,omitempty"`
  2908. // ForceSendFields is a list of field names (e.g. "FinskyOfferType") to
  2909. // unconditionally include in API requests. By default, fields with
  2910. // empty values are omitted from API requests. However, any non-pointer,
  2911. // non-interface field appearing in ForceSendFields will be sent to the
  2912. // server regardless of whether the field is empty or not. This may be
  2913. // used to include empty fields in Patch requests.
  2914. ForceSendFields []string `json:"-"`
  2915. // NullFields is a list of field names (e.g. "FinskyOfferType") to
  2916. // include in API requests with the JSON null value. By default, fields
  2917. // with empty values are omitted from API requests. However, any field
  2918. // with an empty value appearing in NullFields will be sent to the
  2919. // server as null. It is an error if a field in this list has a
  2920. // non-empty value. This may be used to include null fields in Patch
  2921. // requests.
  2922. NullFields []string `json:"-"`
  2923. }
  2924. func (s *VolumeSaleInfoOffers) MarshalJSON() ([]byte, error) {
  2925. type NoMethod VolumeSaleInfoOffers
  2926. raw := NoMethod(*s)
  2927. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2928. }
  2929. // VolumeSaleInfoOffersListPrice: Offer list (=undiscounted) price in
  2930. // Micros.
  2931. type VolumeSaleInfoOffersListPrice struct {
  2932. AmountInMicros float64 `json:"amountInMicros,omitempty"`
  2933. CurrencyCode string `json:"currencyCode,omitempty"`
  2934. // ForceSendFields is a list of field names (e.g. "AmountInMicros") to
  2935. // unconditionally include in API requests. By default, fields with
  2936. // empty values are omitted from API requests. However, any non-pointer,
  2937. // non-interface field appearing in ForceSendFields will be sent to the
  2938. // server regardless of whether the field is empty or not. This may be
  2939. // used to include empty fields in Patch requests.
  2940. ForceSendFields []string `json:"-"`
  2941. // NullFields is a list of field names (e.g. "AmountInMicros") to
  2942. // include in API requests with the JSON null value. By default, fields
  2943. // with empty values are omitted from API requests. However, any field
  2944. // with an empty value appearing in NullFields will be sent to the
  2945. // server as null. It is an error if a field in this list has a
  2946. // non-empty value. This may be used to include null fields in Patch
  2947. // requests.
  2948. NullFields []string `json:"-"`
  2949. }
  2950. func (s *VolumeSaleInfoOffersListPrice) MarshalJSON() ([]byte, error) {
  2951. type NoMethod VolumeSaleInfoOffersListPrice
  2952. raw := NoMethod(*s)
  2953. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2954. }
  2955. func (s *VolumeSaleInfoOffersListPrice) UnmarshalJSON(data []byte) error {
  2956. type NoMethod VolumeSaleInfoOffersListPrice
  2957. var s1 struct {
  2958. AmountInMicros gensupport.JSONFloat64 `json:"amountInMicros"`
  2959. *NoMethod
  2960. }
  2961. s1.NoMethod = (*NoMethod)(s)
  2962. if err := json.Unmarshal(data, &s1); err != nil {
  2963. return err
  2964. }
  2965. s.AmountInMicros = float64(s1.AmountInMicros)
  2966. return nil
  2967. }
  2968. // VolumeSaleInfoOffersRentalDuration: The rental duration (for rental
  2969. // offers only).
  2970. type VolumeSaleInfoOffersRentalDuration struct {
  2971. Count float64 `json:"count,omitempty"`
  2972. Unit string `json:"unit,omitempty"`
  2973. // ForceSendFields is a list of field names (e.g. "Count") to
  2974. // unconditionally include in API requests. By default, fields with
  2975. // empty values are omitted from API requests. However, any non-pointer,
  2976. // non-interface field appearing in ForceSendFields will be sent to the
  2977. // server regardless of whether the field is empty or not. This may be
  2978. // used to include empty fields in Patch requests.
  2979. ForceSendFields []string `json:"-"`
  2980. // NullFields is a list of field names (e.g. "Count") to include in API
  2981. // requests with the JSON null value. By default, fields with empty
  2982. // values are omitted from API requests. However, any field with an
  2983. // empty value appearing in NullFields will be sent to the server as
  2984. // null. It is an error if a field in this list has a non-empty value.
  2985. // This may be used to include null fields in Patch requests.
  2986. NullFields []string `json:"-"`
  2987. }
  2988. func (s *VolumeSaleInfoOffersRentalDuration) MarshalJSON() ([]byte, error) {
  2989. type NoMethod VolumeSaleInfoOffersRentalDuration
  2990. raw := NoMethod(*s)
  2991. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2992. }
  2993. func (s *VolumeSaleInfoOffersRentalDuration) UnmarshalJSON(data []byte) error {
  2994. type NoMethod VolumeSaleInfoOffersRentalDuration
  2995. var s1 struct {
  2996. Count gensupport.JSONFloat64 `json:"count"`
  2997. *NoMethod
  2998. }
  2999. s1.NoMethod = (*NoMethod)(s)
  3000. if err := json.Unmarshal(data, &s1); err != nil {
  3001. return err
  3002. }
  3003. s.Count = float64(s1.Count)
  3004. return nil
  3005. }
  3006. // VolumeSaleInfoOffersRetailPrice: Offer retail (=discounted) price in
  3007. // Micros
  3008. type VolumeSaleInfoOffersRetailPrice struct {
  3009. AmountInMicros float64 `json:"amountInMicros,omitempty"`
  3010. CurrencyCode string `json:"currencyCode,omitempty"`
  3011. // ForceSendFields is a list of field names (e.g. "AmountInMicros") to
  3012. // unconditionally include in API requests. By default, fields with
  3013. // empty values are omitted from API requests. However, any non-pointer,
  3014. // non-interface field appearing in ForceSendFields will be sent to the
  3015. // server regardless of whether the field is empty or not. This may be
  3016. // used to include empty fields in Patch requests.
  3017. ForceSendFields []string `json:"-"`
  3018. // NullFields is a list of field names (e.g. "AmountInMicros") to
  3019. // include in API requests with the JSON null value. By default, fields
  3020. // with empty values are omitted from API requests. However, any field
  3021. // with an empty value appearing in NullFields will be sent to the
  3022. // server as null. It is an error if a field in this list has a
  3023. // non-empty value. This may be used to include null fields in Patch
  3024. // requests.
  3025. NullFields []string `json:"-"`
  3026. }
  3027. func (s *VolumeSaleInfoOffersRetailPrice) MarshalJSON() ([]byte, error) {
  3028. type NoMethod VolumeSaleInfoOffersRetailPrice
  3029. raw := NoMethod(*s)
  3030. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3031. }
  3032. func (s *VolumeSaleInfoOffersRetailPrice) UnmarshalJSON(data []byte) error {
  3033. type NoMethod VolumeSaleInfoOffersRetailPrice
  3034. var s1 struct {
  3035. AmountInMicros gensupport.JSONFloat64 `json:"amountInMicros"`
  3036. *NoMethod
  3037. }
  3038. s1.NoMethod = (*NoMethod)(s)
  3039. if err := json.Unmarshal(data, &s1); err != nil {
  3040. return err
  3041. }
  3042. s.AmountInMicros = float64(s1.AmountInMicros)
  3043. return nil
  3044. }
  3045. // VolumeSaleInfoRetailPrice: The actual selling price of the book. This
  3046. // is the same as the suggested retail or list price unless there are
  3047. // offers or discounts on this volume. (In LITE projection.)
  3048. type VolumeSaleInfoRetailPrice struct {
  3049. // Amount: Amount in the currency listed below. (In LITE projection.)
  3050. Amount float64 `json:"amount,omitempty"`
  3051. // CurrencyCode: An ISO 4217, three-letter currency code. (In LITE
  3052. // projection.)
  3053. CurrencyCode string `json:"currencyCode,omitempty"`
  3054. // ForceSendFields is a list of field names (e.g. "Amount") to
  3055. // unconditionally include in API requests. By default, fields with
  3056. // empty values are omitted from API requests. However, any non-pointer,
  3057. // non-interface field appearing in ForceSendFields will be sent to the
  3058. // server regardless of whether the field is empty or not. This may be
  3059. // used to include empty fields in Patch requests.
  3060. ForceSendFields []string `json:"-"`
  3061. // NullFields is a list of field names (e.g. "Amount") to include in API
  3062. // requests with the JSON null value. By default, fields with empty
  3063. // values are omitted from API requests. However, any field with an
  3064. // empty value appearing in NullFields will be sent to the server as
  3065. // null. It is an error if a field in this list has a non-empty value.
  3066. // This may be used to include null fields in Patch requests.
  3067. NullFields []string `json:"-"`
  3068. }
  3069. func (s *VolumeSaleInfoRetailPrice) MarshalJSON() ([]byte, error) {
  3070. type NoMethod VolumeSaleInfoRetailPrice
  3071. raw := NoMethod(*s)
  3072. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3073. }
  3074. func (s *VolumeSaleInfoRetailPrice) UnmarshalJSON(data []byte) error {
  3075. type NoMethod VolumeSaleInfoRetailPrice
  3076. var s1 struct {
  3077. Amount gensupport.JSONFloat64 `json:"amount"`
  3078. *NoMethod
  3079. }
  3080. s1.NoMethod = (*NoMethod)(s)
  3081. if err := json.Unmarshal(data, &s1); err != nil {
  3082. return err
  3083. }
  3084. s.Amount = float64(s1.Amount)
  3085. return nil
  3086. }
  3087. // VolumeSearchInfo: Search result information related to this volume.
  3088. type VolumeSearchInfo struct {
  3089. // TextSnippet: A text snippet containing the search query.
  3090. TextSnippet string `json:"textSnippet,omitempty"`
  3091. // ForceSendFields is a list of field names (e.g. "TextSnippet") to
  3092. // unconditionally include in API requests. By default, fields with
  3093. // empty values are omitted from API requests. However, any non-pointer,
  3094. // non-interface field appearing in ForceSendFields will be sent to the
  3095. // server regardless of whether the field is empty or not. This may be
  3096. // used to include empty fields in Patch requests.
  3097. ForceSendFields []string `json:"-"`
  3098. // NullFields is a list of field names (e.g. "TextSnippet") to include
  3099. // in API requests with the JSON null value. By default, fields with
  3100. // empty values are omitted from API requests. However, any field with
  3101. // an empty value appearing in NullFields will be sent to the server as
  3102. // null. It is an error if a field in this list has a non-empty value.
  3103. // This may be used to include null fields in Patch requests.
  3104. NullFields []string `json:"-"`
  3105. }
  3106. func (s *VolumeSearchInfo) MarshalJSON() ([]byte, error) {
  3107. type NoMethod VolumeSearchInfo
  3108. raw := NoMethod(*s)
  3109. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3110. }
  3111. // VolumeUserInfo: User specific information related to this volume.
  3112. // (e.g. page this user last read or whether they purchased this book)
  3113. type VolumeUserInfo struct {
  3114. // AcquiredTime: Timestamp when this volume was acquired by the user.
  3115. // (RFC 3339 UTC date-time format) Acquiring includes purchase, user
  3116. // upload, receiving family sharing, etc.
  3117. AcquiredTime string `json:"acquiredTime,omitempty"`
  3118. // AcquisitionType: How this volume was acquired.
  3119. AcquisitionType int64 `json:"acquisitionType,omitempty"`
  3120. // Copy: Copy/Paste accounting information.
  3121. Copy *VolumeUserInfoCopy `json:"copy,omitempty"`
  3122. // EntitlementType: Whether this volume is purchased, sample, pd
  3123. // download etc.
  3124. EntitlementType int64 `json:"entitlementType,omitempty"`
  3125. // FamilySharing: Information on the ability to share with the family.
  3126. FamilySharing *VolumeUserInfoFamilySharing `json:"familySharing,omitempty"`
  3127. // IsFamilySharedFromUser: Whether or not the user shared this volume
  3128. // with the family.
  3129. IsFamilySharedFromUser bool `json:"isFamilySharedFromUser,omitempty"`
  3130. // IsFamilySharedToUser: Whether or not the user received this volume
  3131. // through family sharing.
  3132. IsFamilySharedToUser bool `json:"isFamilySharedToUser,omitempty"`
  3133. // IsFamilySharingAllowed: Deprecated: Replaced by familySharing.
  3134. IsFamilySharingAllowed bool `json:"isFamilySharingAllowed,omitempty"`
  3135. // IsFamilySharingDisabledByFop: Deprecated: Replaced by familySharing.
  3136. IsFamilySharingDisabledByFop bool `json:"isFamilySharingDisabledByFop,omitempty"`
  3137. // IsInMyBooks: Whether or not this volume is currently in "my books."
  3138. IsInMyBooks bool `json:"isInMyBooks,omitempty"`
  3139. // IsPreordered: Whether or not this volume was pre-ordered by the
  3140. // authenticated user making the request. (In LITE projection.)
  3141. IsPreordered bool `json:"isPreordered,omitempty"`
  3142. // IsPurchased: Whether or not this volume was purchased by the
  3143. // authenticated user making the request. (In LITE projection.)
  3144. IsPurchased bool `json:"isPurchased,omitempty"`
  3145. // IsUploaded: Whether or not this volume was user uploaded.
  3146. IsUploaded bool `json:"isUploaded,omitempty"`
  3147. // ReadingPosition: The user's current reading position in the volume,
  3148. // if one is available. (In LITE projection.)
  3149. ReadingPosition *ReadingPosition `json:"readingPosition,omitempty"`
  3150. // RentalPeriod: Period during this book is/was a valid rental.
  3151. RentalPeriod *VolumeUserInfoRentalPeriod `json:"rentalPeriod,omitempty"`
  3152. // RentalState: Whether this book is an active or an expired rental.
  3153. RentalState string `json:"rentalState,omitempty"`
  3154. // Review: This user's review of this volume, if one exists.
  3155. Review *Review `json:"review,omitempty"`
  3156. // Updated: Timestamp when this volume was last modified by a user
  3157. // action, such as a reading position update, volume purchase or writing
  3158. // a review. (RFC 3339 UTC date-time format).
  3159. Updated string `json:"updated,omitempty"`
  3160. UserUploadedVolumeInfo *VolumeUserInfoUserUploadedVolumeInfo `json:"userUploadedVolumeInfo,omitempty"`
  3161. // ForceSendFields is a list of field names (e.g. "AcquiredTime") to
  3162. // unconditionally include in API requests. By default, fields with
  3163. // empty values are omitted from API requests. However, any non-pointer,
  3164. // non-interface field appearing in ForceSendFields will be sent to the
  3165. // server regardless of whether the field is empty or not. This may be
  3166. // used to include empty fields in Patch requests.
  3167. ForceSendFields []string `json:"-"`
  3168. // NullFields is a list of field names (e.g. "AcquiredTime") to include
  3169. // in API requests with the JSON null value. By default, fields with
  3170. // empty values are omitted from API requests. However, any field with
  3171. // an empty value appearing in NullFields will be sent to the server as
  3172. // null. It is an error if a field in this list has a non-empty value.
  3173. // This may be used to include null fields in Patch requests.
  3174. NullFields []string `json:"-"`
  3175. }
  3176. func (s *VolumeUserInfo) MarshalJSON() ([]byte, error) {
  3177. type NoMethod VolumeUserInfo
  3178. raw := NoMethod(*s)
  3179. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3180. }
  3181. // VolumeUserInfoCopy: Copy/Paste accounting information.
  3182. type VolumeUserInfoCopy struct {
  3183. AllowedCharacterCount int64 `json:"allowedCharacterCount,omitempty"`
  3184. LimitType string `json:"limitType,omitempty"`
  3185. RemainingCharacterCount int64 `json:"remainingCharacterCount,omitempty"`
  3186. Updated string `json:"updated,omitempty"`
  3187. // ForceSendFields is a list of field names (e.g.
  3188. // "AllowedCharacterCount") to unconditionally include in API requests.
  3189. // By default, fields with empty values are omitted from API requests.
  3190. // However, any non-pointer, non-interface field appearing in
  3191. // ForceSendFields will be sent to the server regardless of whether the
  3192. // field is empty or not. This may be used to include empty fields in
  3193. // Patch requests.
  3194. ForceSendFields []string `json:"-"`
  3195. // NullFields is a list of field names (e.g. "AllowedCharacterCount") to
  3196. // include in API requests with the JSON null value. By default, fields
  3197. // with empty values are omitted from API requests. However, any field
  3198. // with an empty value appearing in NullFields will be sent to the
  3199. // server as null. It is an error if a field in this list has a
  3200. // non-empty value. This may be used to include null fields in Patch
  3201. // requests.
  3202. NullFields []string `json:"-"`
  3203. }
  3204. func (s *VolumeUserInfoCopy) MarshalJSON() ([]byte, error) {
  3205. type NoMethod VolumeUserInfoCopy
  3206. raw := NoMethod(*s)
  3207. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3208. }
  3209. // VolumeUserInfoFamilySharing: Information on the ability to share with
  3210. // the family.
  3211. type VolumeUserInfoFamilySharing struct {
  3212. // FamilyRole: The role of the user in the family.
  3213. FamilyRole string `json:"familyRole,omitempty"`
  3214. // IsSharingAllowed: Whether or not this volume can be shared with the
  3215. // family by the user. This includes sharing eligibility of both the
  3216. // volume and the user. If the value is true, the user can initiate a
  3217. // family sharing action.
  3218. IsSharingAllowed bool `json:"isSharingAllowed,omitempty"`
  3219. // IsSharingDisabledByFop: Whether or not sharing this volume is
  3220. // temporarily disabled due to issues with the Family Wallet.
  3221. IsSharingDisabledByFop bool `json:"isSharingDisabledByFop,omitempty"`
  3222. // ForceSendFields is a list of field names (e.g. "FamilyRole") to
  3223. // unconditionally include in API requests. By default, fields with
  3224. // empty values are omitted from API requests. However, any non-pointer,
  3225. // non-interface field appearing in ForceSendFields will be sent to the
  3226. // server regardless of whether the field is empty or not. This may be
  3227. // used to include empty fields in Patch requests.
  3228. ForceSendFields []string `json:"-"`
  3229. // NullFields is a list of field names (e.g. "FamilyRole") to include in
  3230. // API requests with the JSON null value. By default, fields with empty
  3231. // values are omitted from API requests. However, any field with an
  3232. // empty value appearing in NullFields will be sent to the server as
  3233. // null. It is an error if a field in this list has a non-empty value.
  3234. // This may be used to include null fields in Patch requests.
  3235. NullFields []string `json:"-"`
  3236. }
  3237. func (s *VolumeUserInfoFamilySharing) MarshalJSON() ([]byte, error) {
  3238. type NoMethod VolumeUserInfoFamilySharing
  3239. raw := NoMethod(*s)
  3240. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3241. }
  3242. // VolumeUserInfoRentalPeriod: Period during this book is/was a valid
  3243. // rental.
  3244. type VolumeUserInfoRentalPeriod struct {
  3245. EndUtcSec int64 `json:"endUtcSec,omitempty,string"`
  3246. StartUtcSec int64 `json:"startUtcSec,omitempty,string"`
  3247. // ForceSendFields is a list of field names (e.g. "EndUtcSec") to
  3248. // unconditionally include in API requests. By default, fields with
  3249. // empty values are omitted from API requests. However, any non-pointer,
  3250. // non-interface field appearing in ForceSendFields will be sent to the
  3251. // server regardless of whether the field is empty or not. This may be
  3252. // used to include empty fields in Patch requests.
  3253. ForceSendFields []string `json:"-"`
  3254. // NullFields is a list of field names (e.g. "EndUtcSec") 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. func (s *VolumeUserInfoRentalPeriod) MarshalJSON() ([]byte, error) {
  3263. type NoMethod VolumeUserInfoRentalPeriod
  3264. raw := NoMethod(*s)
  3265. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3266. }
  3267. type VolumeUserInfoUserUploadedVolumeInfo struct {
  3268. ProcessingState string `json:"processingState,omitempty"`
  3269. // ForceSendFields is a list of field names (e.g. "ProcessingState") to
  3270. // unconditionally include in API requests. By default, fields with
  3271. // empty values are omitted from API requests. However, any non-pointer,
  3272. // non-interface field appearing in ForceSendFields will be sent to the
  3273. // server regardless of whether the field is empty or not. This may be
  3274. // used to include empty fields in Patch requests.
  3275. ForceSendFields []string `json:"-"`
  3276. // NullFields is a list of field names (e.g. "ProcessingState") to
  3277. // include in API requests with the JSON null value. By default, fields
  3278. // with empty values are omitted from API requests. However, any field
  3279. // with an empty value appearing in NullFields will be sent to the
  3280. // server as null. It is an error if a field in this list has a
  3281. // non-empty value. This may be used to include null fields in Patch
  3282. // requests.
  3283. NullFields []string `json:"-"`
  3284. }
  3285. func (s *VolumeUserInfoUserUploadedVolumeInfo) MarshalJSON() ([]byte, error) {
  3286. type NoMethod VolumeUserInfoUserUploadedVolumeInfo
  3287. raw := NoMethod(*s)
  3288. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3289. }
  3290. // VolumeVolumeInfo: General volume information.
  3291. type VolumeVolumeInfo struct {
  3292. // AllowAnonLogging: Whether anonymous logging should be allowed.
  3293. AllowAnonLogging bool `json:"allowAnonLogging,omitempty"`
  3294. // Authors: The names of the authors and/or editors for this volume. (In
  3295. // LITE projection)
  3296. Authors []string `json:"authors,omitempty"`
  3297. // AverageRating: The mean review rating for this volume. (min = 1.0,
  3298. // max = 5.0)
  3299. AverageRating float64 `json:"averageRating,omitempty"`
  3300. // CanonicalVolumeLink: Canonical URL for a volume. (In LITE
  3301. // projection.)
  3302. CanonicalVolumeLink string `json:"canonicalVolumeLink,omitempty"`
  3303. // Categories: A list of subject categories, such as "Fiction",
  3304. // "Suspense", etc.
  3305. Categories []string `json:"categories,omitempty"`
  3306. // ComicsContent: Whether the volume has comics content.
  3307. ComicsContent bool `json:"comicsContent,omitempty"`
  3308. // ContentVersion: An identifier for the version of the volume content
  3309. // (text & images). (In LITE projection)
  3310. ContentVersion string `json:"contentVersion,omitempty"`
  3311. // Description: A synopsis of the volume. The text of the description is
  3312. // formatted in HTML and includes simple formatting elements, such as b,
  3313. // i, and br tags. (In LITE projection.)
  3314. Description string `json:"description,omitempty"`
  3315. // Dimensions: Physical dimensions of this volume.
  3316. Dimensions *VolumeVolumeInfoDimensions `json:"dimensions,omitempty"`
  3317. // ImageLinks: A list of image links for all the sizes that are
  3318. // available. (In LITE projection.)
  3319. ImageLinks *VolumeVolumeInfoImageLinks `json:"imageLinks,omitempty"`
  3320. // IndustryIdentifiers: Industry standard identifiers for this volume.
  3321. IndustryIdentifiers []*VolumeVolumeInfoIndustryIdentifiers `json:"industryIdentifiers,omitempty"`
  3322. // InfoLink: URL to view information about this volume on the Google
  3323. // Books site. (In LITE projection)
  3324. InfoLink string `json:"infoLink,omitempty"`
  3325. // Language: Best language for this volume (based on content). It is the
  3326. // two-letter ISO 639-1 code such as 'fr', 'en', etc.
  3327. Language string `json:"language,omitempty"`
  3328. // MainCategory: The main category to which this volume belongs. It will
  3329. // be the category from the categories list returned below that has the
  3330. // highest weight.
  3331. MainCategory string `json:"mainCategory,omitempty"`
  3332. MaturityRating string `json:"maturityRating,omitempty"`
  3333. // PageCount: Total number of pages as per publisher metadata.
  3334. PageCount int64 `json:"pageCount,omitempty"`
  3335. // PanelizationSummary: A top-level summary of the panelization info in
  3336. // this volume.
  3337. PanelizationSummary *VolumeVolumeInfoPanelizationSummary `json:"panelizationSummary,omitempty"`
  3338. // PreviewLink: URL to preview this volume on the Google Books site.
  3339. PreviewLink string `json:"previewLink,omitempty"`
  3340. // PrintType: Type of publication of this volume. Possible values are
  3341. // BOOK or MAGAZINE.
  3342. PrintType string `json:"printType,omitempty"`
  3343. // PrintedPageCount: Total number of printed pages in generated pdf
  3344. // representation.
  3345. PrintedPageCount int64 `json:"printedPageCount,omitempty"`
  3346. // PublishedDate: Date of publication. (In LITE projection.)
  3347. PublishedDate string `json:"publishedDate,omitempty"`
  3348. // Publisher: Publisher of this volume. (In LITE projection.)
  3349. Publisher string `json:"publisher,omitempty"`
  3350. // RatingsCount: The number of review ratings for this volume.
  3351. RatingsCount int64 `json:"ratingsCount,omitempty"`
  3352. // ReadingModes: The reading modes available for this volume.
  3353. ReadingModes interface{} `json:"readingModes,omitempty"`
  3354. // SamplePageCount: Total number of sample pages as per publisher
  3355. // metadata.
  3356. SamplePageCount int64 `json:"samplePageCount,omitempty"`
  3357. SeriesInfo *Volumeseriesinfo `json:"seriesInfo,omitempty"`
  3358. // Subtitle: Volume subtitle. (In LITE projection.)
  3359. Subtitle string `json:"subtitle,omitempty"`
  3360. // Title: Volume title. (In LITE projection.)
  3361. Title string `json:"title,omitempty"`
  3362. // ForceSendFields is a list of field names (e.g. "AllowAnonLogging") to
  3363. // unconditionally include in API requests. By default, fields with
  3364. // empty values are omitted from API requests. However, any non-pointer,
  3365. // non-interface field appearing in ForceSendFields will be sent to the
  3366. // server regardless of whether the field is empty or not. This may be
  3367. // used to include empty fields in Patch requests.
  3368. ForceSendFields []string `json:"-"`
  3369. // NullFields is a list of field names (e.g. "AllowAnonLogging") to
  3370. // include in API requests with the JSON null value. By default, fields
  3371. // with empty values are omitted from API requests. However, any field
  3372. // with an empty value appearing in NullFields will be sent to the
  3373. // server as null. It is an error if a field in this list has a
  3374. // non-empty value. This may be used to include null fields in Patch
  3375. // requests.
  3376. NullFields []string `json:"-"`
  3377. }
  3378. func (s *VolumeVolumeInfo) MarshalJSON() ([]byte, error) {
  3379. type NoMethod VolumeVolumeInfo
  3380. raw := NoMethod(*s)
  3381. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3382. }
  3383. func (s *VolumeVolumeInfo) UnmarshalJSON(data []byte) error {
  3384. type NoMethod VolumeVolumeInfo
  3385. var s1 struct {
  3386. AverageRating gensupport.JSONFloat64 `json:"averageRating"`
  3387. *NoMethod
  3388. }
  3389. s1.NoMethod = (*NoMethod)(s)
  3390. if err := json.Unmarshal(data, &s1); err != nil {
  3391. return err
  3392. }
  3393. s.AverageRating = float64(s1.AverageRating)
  3394. return nil
  3395. }
  3396. // VolumeVolumeInfoDimensions: Physical dimensions of this volume.
  3397. type VolumeVolumeInfoDimensions struct {
  3398. // Height: Height or length of this volume (in cm).
  3399. Height string `json:"height,omitempty"`
  3400. // Thickness: Thickness of this volume (in cm).
  3401. Thickness string `json:"thickness,omitempty"`
  3402. // Width: Width of this volume (in cm).
  3403. Width string `json:"width,omitempty"`
  3404. // ForceSendFields is a list of field names (e.g. "Height") to
  3405. // unconditionally include in API requests. By default, fields with
  3406. // empty values are omitted from API requests. However, any non-pointer,
  3407. // non-interface field appearing in ForceSendFields will be sent to the
  3408. // server regardless of whether the field is empty or not. This may be
  3409. // used to include empty fields in Patch requests.
  3410. ForceSendFields []string `json:"-"`
  3411. // NullFields is a list of field names (e.g. "Height") to include in API
  3412. // requests with the JSON null value. By default, fields with empty
  3413. // values are omitted from API requests. However, any field with an
  3414. // empty value appearing in NullFields will be sent to the server as
  3415. // null. It is an error if a field in this list has a non-empty value.
  3416. // This may be used to include null fields in Patch requests.
  3417. NullFields []string `json:"-"`
  3418. }
  3419. func (s *VolumeVolumeInfoDimensions) MarshalJSON() ([]byte, error) {
  3420. type NoMethod VolumeVolumeInfoDimensions
  3421. raw := NoMethod(*s)
  3422. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3423. }
  3424. // VolumeVolumeInfoImageLinks: A list of image links for all the sizes
  3425. // that are available. (In LITE projection.)
  3426. type VolumeVolumeInfoImageLinks struct {
  3427. // ExtraLarge: Image link for extra large size (width of ~1280 pixels).
  3428. // (In LITE projection)
  3429. ExtraLarge string `json:"extraLarge,omitempty"`
  3430. // Large: Image link for large size (width of ~800 pixels). (In LITE
  3431. // projection)
  3432. Large string `json:"large,omitempty"`
  3433. // Medium: Image link for medium size (width of ~575 pixels). (In LITE
  3434. // projection)
  3435. Medium string `json:"medium,omitempty"`
  3436. // Small: Image link for small size (width of ~300 pixels). (In LITE
  3437. // projection)
  3438. Small string `json:"small,omitempty"`
  3439. // SmallThumbnail: Image link for small thumbnail size (width of ~80
  3440. // pixels). (In LITE projection)
  3441. SmallThumbnail string `json:"smallThumbnail,omitempty"`
  3442. // Thumbnail: Image link for thumbnail size (width of ~128 pixels). (In
  3443. // LITE projection)
  3444. Thumbnail string `json:"thumbnail,omitempty"`
  3445. // ForceSendFields is a list of field names (e.g. "ExtraLarge") to
  3446. // unconditionally include in API requests. By default, fields with
  3447. // empty values are omitted from API requests. However, any non-pointer,
  3448. // non-interface field appearing in ForceSendFields will be sent to the
  3449. // server regardless of whether the field is empty or not. This may be
  3450. // used to include empty fields in Patch requests.
  3451. ForceSendFields []string `json:"-"`
  3452. // NullFields is a list of field names (e.g. "ExtraLarge") to include in
  3453. // API requests with the JSON null value. By default, fields with empty
  3454. // values are omitted from API requests. However, any field with an
  3455. // empty value appearing in NullFields will be sent to the server as
  3456. // null. It is an error if a field in this list has a non-empty value.
  3457. // This may be used to include null fields in Patch requests.
  3458. NullFields []string `json:"-"`
  3459. }
  3460. func (s *VolumeVolumeInfoImageLinks) MarshalJSON() ([]byte, error) {
  3461. type NoMethod VolumeVolumeInfoImageLinks
  3462. raw := NoMethod(*s)
  3463. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3464. }
  3465. type VolumeVolumeInfoIndustryIdentifiers struct {
  3466. // Identifier: Industry specific volume identifier.
  3467. Identifier string `json:"identifier,omitempty"`
  3468. // Type: Identifier type. Possible values are ISBN_10, ISBN_13, ISSN and
  3469. // OTHER.
  3470. Type string `json:"type,omitempty"`
  3471. // ForceSendFields is a list of field names (e.g. "Identifier") to
  3472. // unconditionally include in API requests. By default, fields with
  3473. // empty values are omitted from API requests. However, any non-pointer,
  3474. // non-interface field appearing in ForceSendFields will be sent to the
  3475. // server regardless of whether the field is empty or not. This may be
  3476. // used to include empty fields in Patch requests.
  3477. ForceSendFields []string `json:"-"`
  3478. // NullFields is a list of field names (e.g. "Identifier") to include in
  3479. // API requests with the JSON null value. By default, fields with empty
  3480. // values are omitted from API requests. However, any field with an
  3481. // empty value appearing in NullFields will be sent to the server as
  3482. // null. It is an error if a field in this list has a non-empty value.
  3483. // This may be used to include null fields in Patch requests.
  3484. NullFields []string `json:"-"`
  3485. }
  3486. func (s *VolumeVolumeInfoIndustryIdentifiers) MarshalJSON() ([]byte, error) {
  3487. type NoMethod VolumeVolumeInfoIndustryIdentifiers
  3488. raw := NoMethod(*s)
  3489. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3490. }
  3491. // VolumeVolumeInfoPanelizationSummary: A top-level summary of the
  3492. // panelization info in this volume.
  3493. type VolumeVolumeInfoPanelizationSummary struct {
  3494. ContainsEpubBubbles bool `json:"containsEpubBubbles,omitempty"`
  3495. ContainsImageBubbles bool `json:"containsImageBubbles,omitempty"`
  3496. EpubBubbleVersion string `json:"epubBubbleVersion,omitempty"`
  3497. ImageBubbleVersion string `json:"imageBubbleVersion,omitempty"`
  3498. // ForceSendFields is a list of field names (e.g. "ContainsEpubBubbles")
  3499. // to unconditionally include in API requests. By default, fields with
  3500. // empty values are omitted from API requests. However, any non-pointer,
  3501. // non-interface field appearing in ForceSendFields will be sent to the
  3502. // server regardless of whether the field is empty or not. This may be
  3503. // used to include empty fields in Patch requests.
  3504. ForceSendFields []string `json:"-"`
  3505. // NullFields is a list of field names (e.g. "ContainsEpubBubbles") to
  3506. // include in API requests with the JSON null value. By default, fields
  3507. // with empty values are omitted from API requests. However, any field
  3508. // with an empty value appearing in NullFields will be sent to the
  3509. // server as null. It is an error if a field in this list has a
  3510. // non-empty value. This may be used to include null fields in Patch
  3511. // requests.
  3512. NullFields []string `json:"-"`
  3513. }
  3514. func (s *VolumeVolumeInfoPanelizationSummary) MarshalJSON() ([]byte, error) {
  3515. type NoMethod VolumeVolumeInfoPanelizationSummary
  3516. raw := NoMethod(*s)
  3517. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3518. }
  3519. type Volume2 struct {
  3520. // Items: A list of volumes.
  3521. Items []*Volume `json:"items,omitempty"`
  3522. // Kind: Resource type.
  3523. Kind string `json:"kind,omitempty"`
  3524. NextPageToken string `json:"nextPageToken,omitempty"`
  3525. // ServerResponse contains the HTTP response code and headers from the
  3526. // server.
  3527. googleapi.ServerResponse `json:"-"`
  3528. // ForceSendFields is a list of field names (e.g. "Items") to
  3529. // unconditionally include in API requests. By default, fields with
  3530. // empty values are omitted from API requests. However, any non-pointer,
  3531. // non-interface field appearing in ForceSendFields will be sent to the
  3532. // server regardless of whether the field is empty or not. This may be
  3533. // used to include empty fields in Patch requests.
  3534. ForceSendFields []string `json:"-"`
  3535. // NullFields is a list of field names (e.g. "Items") to include in API
  3536. // requests with the JSON null value. By default, fields with empty
  3537. // values are omitted from API requests. However, any field with an
  3538. // empty value appearing in NullFields will be sent to the server as
  3539. // null. It is an error if a field in this list has a non-empty value.
  3540. // This may be used to include null fields in Patch requests.
  3541. NullFields []string `json:"-"`
  3542. }
  3543. func (s *Volume2) MarshalJSON() ([]byte, error) {
  3544. type NoMethod Volume2
  3545. raw := NoMethod(*s)
  3546. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3547. }
  3548. type Volumeannotation struct {
  3549. // AnnotationDataId: The annotation data id for this volume annotation.
  3550. AnnotationDataId string `json:"annotationDataId,omitempty"`
  3551. // AnnotationDataLink: Link to get data for this annotation.
  3552. AnnotationDataLink string `json:"annotationDataLink,omitempty"`
  3553. // AnnotationType: The type of annotation this is.
  3554. AnnotationType string `json:"annotationType,omitempty"`
  3555. // ContentRanges: The content ranges to identify the selected text.
  3556. ContentRanges *VolumeannotationContentRanges `json:"contentRanges,omitempty"`
  3557. // Data: Data for this annotation.
  3558. Data string `json:"data,omitempty"`
  3559. // Deleted: Indicates that this annotation is deleted.
  3560. Deleted bool `json:"deleted,omitempty"`
  3561. // Id: Unique id of this volume annotation.
  3562. Id string `json:"id,omitempty"`
  3563. // Kind: Resource Type
  3564. Kind string `json:"kind,omitempty"`
  3565. // LayerId: The Layer this annotation is for.
  3566. LayerId string `json:"layerId,omitempty"`
  3567. // PageIds: Pages the annotation spans.
  3568. PageIds []string `json:"pageIds,omitempty"`
  3569. // SelectedText: Excerpt from the volume.
  3570. SelectedText string `json:"selectedText,omitempty"`
  3571. // SelfLink: URL to this resource.
  3572. SelfLink string `json:"selfLink,omitempty"`
  3573. // Updated: Timestamp for the last time this anntoation was updated.
  3574. // (RFC 3339 UTC date-time format).
  3575. Updated string `json:"updated,omitempty"`
  3576. // VolumeId: The Volume this annotation is for.
  3577. VolumeId string `json:"volumeId,omitempty"`
  3578. // ServerResponse contains the HTTP response code and headers from the
  3579. // server.
  3580. googleapi.ServerResponse `json:"-"`
  3581. // ForceSendFields is a list of field names (e.g. "AnnotationDataId") to
  3582. // unconditionally include in API requests. By default, fields with
  3583. // empty values are omitted from API requests. However, any non-pointer,
  3584. // non-interface field appearing in ForceSendFields will be sent to the
  3585. // server regardless of whether the field is empty or not. This may be
  3586. // used to include empty fields in Patch requests.
  3587. ForceSendFields []string `json:"-"`
  3588. // NullFields is a list of field names (e.g. "AnnotationDataId") to
  3589. // include in API requests with the JSON null value. By default, fields
  3590. // with empty values are omitted from API requests. However, any field
  3591. // with an empty value appearing in NullFields will be sent to the
  3592. // server as null. It is an error if a field in this list has a
  3593. // non-empty value. This may be used to include null fields in Patch
  3594. // requests.
  3595. NullFields []string `json:"-"`
  3596. }
  3597. func (s *Volumeannotation) MarshalJSON() ([]byte, error) {
  3598. type NoMethod Volumeannotation
  3599. raw := NoMethod(*s)
  3600. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3601. }
  3602. // VolumeannotationContentRanges: The content ranges to identify the
  3603. // selected text.
  3604. type VolumeannotationContentRanges struct {
  3605. // CfiRange: Range in CFI format for this annotation for version above.
  3606. CfiRange *BooksAnnotationsRange `json:"cfiRange,omitempty"`
  3607. // ContentVersion: Content version applicable to ranges below.
  3608. ContentVersion string `json:"contentVersion,omitempty"`
  3609. // GbImageRange: Range in GB image format for this annotation for
  3610. // version above.
  3611. GbImageRange *BooksAnnotationsRange `json:"gbImageRange,omitempty"`
  3612. // GbTextRange: Range in GB text format for this annotation for version
  3613. // above.
  3614. GbTextRange *BooksAnnotationsRange `json:"gbTextRange,omitempty"`
  3615. // ForceSendFields is a list of field names (e.g. "CfiRange") to
  3616. // unconditionally include in API requests. By default, fields with
  3617. // empty values are omitted from API requests. However, any non-pointer,
  3618. // non-interface field appearing in ForceSendFields will be sent to the
  3619. // server regardless of whether the field is empty or not. This may be
  3620. // used to include empty fields in Patch requests.
  3621. ForceSendFields []string `json:"-"`
  3622. // NullFields is a list of field names (e.g. "CfiRange") to include in
  3623. // API requests with the JSON null value. By default, fields with empty
  3624. // values are omitted from API requests. However, any field with an
  3625. // empty value appearing in NullFields will be sent to the server as
  3626. // null. It is an error if a field in this list has a non-empty value.
  3627. // This may be used to include null fields in Patch requests.
  3628. NullFields []string `json:"-"`
  3629. }
  3630. func (s *VolumeannotationContentRanges) MarshalJSON() ([]byte, error) {
  3631. type NoMethod VolumeannotationContentRanges
  3632. raw := NoMethod(*s)
  3633. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3634. }
  3635. type Volumeannotations struct {
  3636. // Items: A list of volume annotations.
  3637. Items []*Volumeannotation `json:"items,omitempty"`
  3638. // Kind: Resource type
  3639. Kind string `json:"kind,omitempty"`
  3640. // NextPageToken: Token to pass in for pagination for the next page.
  3641. // This will not be present if this request does not have more results.
  3642. NextPageToken string `json:"nextPageToken,omitempty"`
  3643. // TotalItems: The total number of volume annotations found.
  3644. TotalItems int64 `json:"totalItems,omitempty"`
  3645. // Version: The version string for all of the volume annotations in this
  3646. // layer (not just the ones in this response). Note: the version string
  3647. // doesn't apply to the annotation data, just the information in this
  3648. // response (e.g. the location of annotations in the book).
  3649. Version string `json:"version,omitempty"`
  3650. // ServerResponse contains the HTTP response code and headers from the
  3651. // server.
  3652. googleapi.ServerResponse `json:"-"`
  3653. // ForceSendFields is a list of field names (e.g. "Items") to
  3654. // unconditionally include in API requests. By default, fields with
  3655. // empty values are omitted from API requests. However, any non-pointer,
  3656. // non-interface field appearing in ForceSendFields will be sent to the
  3657. // server regardless of whether the field is empty or not. This may be
  3658. // used to include empty fields in Patch requests.
  3659. ForceSendFields []string `json:"-"`
  3660. // NullFields is a list of field names (e.g. "Items") to include in API
  3661. // requests with the JSON null value. By default, fields with empty
  3662. // values are omitted from API requests. However, any field with an
  3663. // empty value appearing in NullFields will be sent to the server as
  3664. // null. It is an error if a field in this list has a non-empty value.
  3665. // This may be used to include null fields in Patch requests.
  3666. NullFields []string `json:"-"`
  3667. }
  3668. func (s *Volumeannotations) MarshalJSON() ([]byte, error) {
  3669. type NoMethod Volumeannotations
  3670. raw := NoMethod(*s)
  3671. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3672. }
  3673. type Volumes struct {
  3674. // Items: A list of volumes.
  3675. Items []*Volume `json:"items,omitempty"`
  3676. // Kind: Resource type.
  3677. Kind string `json:"kind,omitempty"`
  3678. // TotalItems: Total number of volumes found. This might be greater than
  3679. // the number of volumes returned in this response if results have been
  3680. // paginated.
  3681. TotalItems int64 `json:"totalItems,omitempty"`
  3682. // ServerResponse contains the HTTP response code and headers from the
  3683. // server.
  3684. googleapi.ServerResponse `json:"-"`
  3685. // ForceSendFields is a list of field names (e.g. "Items") to
  3686. // unconditionally include in API requests. By default, fields with
  3687. // empty values are omitted from API requests. However, any non-pointer,
  3688. // non-interface field appearing in ForceSendFields will be sent to the
  3689. // server regardless of whether the field is empty or not. This may be
  3690. // used to include empty fields in Patch requests.
  3691. ForceSendFields []string `json:"-"`
  3692. // NullFields is a list of field names (e.g. "Items") to include in API
  3693. // requests with the JSON null value. By default, fields with empty
  3694. // values are omitted from API requests. However, any field with an
  3695. // empty value appearing in NullFields will be sent to the server as
  3696. // null. It is an error if a field in this list has a non-empty value.
  3697. // This may be used to include null fields in Patch requests.
  3698. NullFields []string `json:"-"`
  3699. }
  3700. func (s *Volumes) MarshalJSON() ([]byte, error) {
  3701. type NoMethod Volumes
  3702. raw := NoMethod(*s)
  3703. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3704. }
  3705. type Volumeseriesinfo struct {
  3706. // BookDisplayNumber: The display number string. This should be used
  3707. // only for display purposes and the actual sequence should be inferred
  3708. // from the below orderNumber.
  3709. BookDisplayNumber string `json:"bookDisplayNumber,omitempty"`
  3710. // Kind: Resource type.
  3711. Kind string `json:"kind,omitempty"`
  3712. // ShortSeriesBookTitle: Short book title in the context of the series.
  3713. ShortSeriesBookTitle string `json:"shortSeriesBookTitle,omitempty"`
  3714. VolumeSeries []*VolumeseriesinfoVolumeSeries `json:"volumeSeries,omitempty"`
  3715. // ForceSendFields is a list of field names (e.g. "BookDisplayNumber")
  3716. // to unconditionally include in API requests. By default, fields with
  3717. // empty values are omitted from API requests. However, any non-pointer,
  3718. // non-interface field appearing in ForceSendFields will be sent to the
  3719. // server regardless of whether the field is empty or not. This may be
  3720. // used to include empty fields in Patch requests.
  3721. ForceSendFields []string `json:"-"`
  3722. // NullFields is a list of field names (e.g. "BookDisplayNumber") to
  3723. // include in API requests with the JSON null value. By default, fields
  3724. // with empty values are omitted from API requests. However, any field
  3725. // with an empty value appearing in NullFields will be sent to the
  3726. // server as null. It is an error if a field in this list has a
  3727. // non-empty value. This may be used to include null fields in Patch
  3728. // requests.
  3729. NullFields []string `json:"-"`
  3730. }
  3731. func (s *Volumeseriesinfo) MarshalJSON() ([]byte, error) {
  3732. type NoMethod Volumeseriesinfo
  3733. raw := NoMethod(*s)
  3734. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3735. }
  3736. type VolumeseriesinfoVolumeSeries struct {
  3737. // Issue: List of issues. Applicable only for Collection Edition and
  3738. // Omnibus.
  3739. Issue []*VolumeseriesinfoVolumeSeriesIssue `json:"issue,omitempty"`
  3740. // OrderNumber: The book order number in the series.
  3741. OrderNumber int64 `json:"orderNumber,omitempty"`
  3742. // SeriesBookType: The book type in the context of series. Examples -
  3743. // Single Issue, Collection Edition, etc.
  3744. SeriesBookType string `json:"seriesBookType,omitempty"`
  3745. // SeriesId: The series id.
  3746. SeriesId string `json:"seriesId,omitempty"`
  3747. // ForceSendFields is a list of field names (e.g. "Issue") to
  3748. // unconditionally include in API requests. By default, fields with
  3749. // empty values are omitted from API requests. However, any non-pointer,
  3750. // non-interface field appearing in ForceSendFields will be sent to the
  3751. // server regardless of whether the field is empty or not. This may be
  3752. // used to include empty fields in Patch requests.
  3753. ForceSendFields []string `json:"-"`
  3754. // NullFields is a list of field names (e.g. "Issue") to include in API
  3755. // requests with the JSON null value. By default, fields with empty
  3756. // values are omitted from API requests. However, any field with an
  3757. // empty value appearing in NullFields will be sent to the server as
  3758. // null. It is an error if a field in this list has a non-empty value.
  3759. // This may be used to include null fields in Patch requests.
  3760. NullFields []string `json:"-"`
  3761. }
  3762. func (s *VolumeseriesinfoVolumeSeries) MarshalJSON() ([]byte, error) {
  3763. type NoMethod VolumeseriesinfoVolumeSeries
  3764. raw := NoMethod(*s)
  3765. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3766. }
  3767. type VolumeseriesinfoVolumeSeriesIssue struct {
  3768. IssueDisplayNumber string `json:"issueDisplayNumber,omitempty"`
  3769. IssueOrderNumber int64 `json:"issueOrderNumber,omitempty"`
  3770. // ForceSendFields is a list of field names (e.g. "IssueDisplayNumber")
  3771. // to unconditionally include in API requests. By default, fields with
  3772. // empty values are omitted from API requests. However, any non-pointer,
  3773. // non-interface field appearing in ForceSendFields will be sent to the
  3774. // server regardless of whether the field is empty or not. This may be
  3775. // used to include empty fields in Patch requests.
  3776. ForceSendFields []string `json:"-"`
  3777. // NullFields is a list of field names (e.g. "IssueDisplayNumber") to
  3778. // include in API requests with the JSON null value. By default, fields
  3779. // with empty values are omitted from API requests. However, any field
  3780. // with an empty value appearing in NullFields will be sent to the
  3781. // server as null. It is an error if a field in this list has a
  3782. // non-empty value. This may be used to include null fields in Patch
  3783. // requests.
  3784. NullFields []string `json:"-"`
  3785. }
  3786. func (s *VolumeseriesinfoVolumeSeriesIssue) MarshalJSON() ([]byte, error) {
  3787. type NoMethod VolumeseriesinfoVolumeSeriesIssue
  3788. raw := NoMethod(*s)
  3789. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3790. }
  3791. // method id "books.bookshelves.get":
  3792. type BookshelvesGetCall struct {
  3793. s *Service
  3794. userId string
  3795. shelf string
  3796. urlParams_ gensupport.URLParams
  3797. ifNoneMatch_ string
  3798. ctx_ context.Context
  3799. header_ http.Header
  3800. }
  3801. // Get: Retrieves metadata for a specific bookshelf for the specified
  3802. // user.
  3803. func (r *BookshelvesService) Get(userId string, shelf string) *BookshelvesGetCall {
  3804. c := &BookshelvesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3805. c.userId = userId
  3806. c.shelf = shelf
  3807. return c
  3808. }
  3809. // Source sets the optional parameter "source": String to identify the
  3810. // originator of this request.
  3811. func (c *BookshelvesGetCall) Source(source string) *BookshelvesGetCall {
  3812. c.urlParams_.Set("source", source)
  3813. return c
  3814. }
  3815. // Fields allows partial responses to be retrieved. See
  3816. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3817. // for more information.
  3818. func (c *BookshelvesGetCall) Fields(s ...googleapi.Field) *BookshelvesGetCall {
  3819. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3820. return c
  3821. }
  3822. // IfNoneMatch sets the optional parameter which makes the operation
  3823. // fail if the object's ETag matches the given value. This is useful for
  3824. // getting updates only after the object has changed since the last
  3825. // request. Use googleapi.IsNotModified to check whether the response
  3826. // error from Do is the result of In-None-Match.
  3827. func (c *BookshelvesGetCall) IfNoneMatch(entityTag string) *BookshelvesGetCall {
  3828. c.ifNoneMatch_ = entityTag
  3829. return c
  3830. }
  3831. // Context sets the context to be used in this call's Do method. Any
  3832. // pending HTTP request will be aborted if the provided context is
  3833. // canceled.
  3834. func (c *BookshelvesGetCall) Context(ctx context.Context) *BookshelvesGetCall {
  3835. c.ctx_ = ctx
  3836. return c
  3837. }
  3838. // Header returns an http.Header that can be modified by the caller to
  3839. // add HTTP headers to the request.
  3840. func (c *BookshelvesGetCall) Header() http.Header {
  3841. if c.header_ == nil {
  3842. c.header_ = make(http.Header)
  3843. }
  3844. return c.header_
  3845. }
  3846. func (c *BookshelvesGetCall) doRequest(alt string) (*http.Response, error) {
  3847. reqHeaders := make(http.Header)
  3848. for k, v := range c.header_ {
  3849. reqHeaders[k] = v
  3850. }
  3851. reqHeaders.Set("User-Agent", c.s.userAgent())
  3852. if c.ifNoneMatch_ != "" {
  3853. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3854. }
  3855. var body io.Reader = nil
  3856. c.urlParams_.Set("alt", alt)
  3857. c.urlParams_.Set("prettyPrint", "false")
  3858. urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}/bookshelves/{shelf}")
  3859. urls += "?" + c.urlParams_.Encode()
  3860. req, err := http.NewRequest("GET", urls, body)
  3861. if err != nil {
  3862. return nil, err
  3863. }
  3864. req.Header = reqHeaders
  3865. googleapi.Expand(req.URL, map[string]string{
  3866. "userId": c.userId,
  3867. "shelf": c.shelf,
  3868. })
  3869. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3870. }
  3871. // Do executes the "books.bookshelves.get" call.
  3872. // Exactly one of *Bookshelf or error will be non-nil. Any non-2xx
  3873. // status code is an error. Response headers are in either
  3874. // *Bookshelf.ServerResponse.Header or (if a response was returned at
  3875. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3876. // to check whether the returned error was because
  3877. // http.StatusNotModified was returned.
  3878. func (c *BookshelvesGetCall) Do(opts ...googleapi.CallOption) (*Bookshelf, error) {
  3879. gensupport.SetOptions(c.urlParams_, opts...)
  3880. res, err := c.doRequest("json")
  3881. if res != nil && res.StatusCode == http.StatusNotModified {
  3882. if res.Body != nil {
  3883. res.Body.Close()
  3884. }
  3885. return nil, &googleapi.Error{
  3886. Code: res.StatusCode,
  3887. Header: res.Header,
  3888. }
  3889. }
  3890. if err != nil {
  3891. return nil, err
  3892. }
  3893. defer googleapi.CloseBody(res)
  3894. if err := googleapi.CheckResponse(res); err != nil {
  3895. return nil, err
  3896. }
  3897. ret := &Bookshelf{
  3898. ServerResponse: googleapi.ServerResponse{
  3899. Header: res.Header,
  3900. HTTPStatusCode: res.StatusCode,
  3901. },
  3902. }
  3903. target := &ret
  3904. if err := gensupport.DecodeResponse(target, res); err != nil {
  3905. return nil, err
  3906. }
  3907. return ret, nil
  3908. // {
  3909. // "description": "Retrieves metadata for a specific bookshelf for the specified user.",
  3910. // "httpMethod": "GET",
  3911. // "id": "books.bookshelves.get",
  3912. // "parameterOrder": [
  3913. // "userId",
  3914. // "shelf"
  3915. // ],
  3916. // "parameters": {
  3917. // "shelf": {
  3918. // "description": "ID of bookshelf to retrieve.",
  3919. // "location": "path",
  3920. // "required": true,
  3921. // "type": "string"
  3922. // },
  3923. // "source": {
  3924. // "description": "String to identify the originator of this request.",
  3925. // "location": "query",
  3926. // "type": "string"
  3927. // },
  3928. // "userId": {
  3929. // "description": "ID of user for whom to retrieve bookshelves.",
  3930. // "location": "path",
  3931. // "required": true,
  3932. // "type": "string"
  3933. // }
  3934. // },
  3935. // "path": "users/{userId}/bookshelves/{shelf}",
  3936. // "response": {
  3937. // "$ref": "Bookshelf"
  3938. // },
  3939. // "scopes": [
  3940. // "https://www.googleapis.com/auth/books"
  3941. // ]
  3942. // }
  3943. }
  3944. // method id "books.bookshelves.list":
  3945. type BookshelvesListCall struct {
  3946. s *Service
  3947. userId string
  3948. urlParams_ gensupport.URLParams
  3949. ifNoneMatch_ string
  3950. ctx_ context.Context
  3951. header_ http.Header
  3952. }
  3953. // List: Retrieves a list of public bookshelves for the specified user.
  3954. func (r *BookshelvesService) List(userId string) *BookshelvesListCall {
  3955. c := &BookshelvesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3956. c.userId = userId
  3957. return c
  3958. }
  3959. // Source sets the optional parameter "source": String to identify the
  3960. // originator of this request.
  3961. func (c *BookshelvesListCall) Source(source string) *BookshelvesListCall {
  3962. c.urlParams_.Set("source", source)
  3963. return c
  3964. }
  3965. // Fields allows partial responses to be retrieved. See
  3966. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3967. // for more information.
  3968. func (c *BookshelvesListCall) Fields(s ...googleapi.Field) *BookshelvesListCall {
  3969. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3970. return c
  3971. }
  3972. // IfNoneMatch sets the optional parameter which makes the operation
  3973. // fail if the object's ETag matches the given value. This is useful for
  3974. // getting updates only after the object has changed since the last
  3975. // request. Use googleapi.IsNotModified to check whether the response
  3976. // error from Do is the result of In-None-Match.
  3977. func (c *BookshelvesListCall) IfNoneMatch(entityTag string) *BookshelvesListCall {
  3978. c.ifNoneMatch_ = entityTag
  3979. return c
  3980. }
  3981. // Context sets the context to be used in this call's Do method. Any
  3982. // pending HTTP request will be aborted if the provided context is
  3983. // canceled.
  3984. func (c *BookshelvesListCall) Context(ctx context.Context) *BookshelvesListCall {
  3985. c.ctx_ = ctx
  3986. return c
  3987. }
  3988. // Header returns an http.Header that can be modified by the caller to
  3989. // add HTTP headers to the request.
  3990. func (c *BookshelvesListCall) Header() http.Header {
  3991. if c.header_ == nil {
  3992. c.header_ = make(http.Header)
  3993. }
  3994. return c.header_
  3995. }
  3996. func (c *BookshelvesListCall) doRequest(alt string) (*http.Response, error) {
  3997. reqHeaders := make(http.Header)
  3998. for k, v := range c.header_ {
  3999. reqHeaders[k] = v
  4000. }
  4001. reqHeaders.Set("User-Agent", c.s.userAgent())
  4002. if c.ifNoneMatch_ != "" {
  4003. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4004. }
  4005. var body io.Reader = nil
  4006. c.urlParams_.Set("alt", alt)
  4007. c.urlParams_.Set("prettyPrint", "false")
  4008. urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}/bookshelves")
  4009. urls += "?" + c.urlParams_.Encode()
  4010. req, err := http.NewRequest("GET", urls, body)
  4011. if err != nil {
  4012. return nil, err
  4013. }
  4014. req.Header = reqHeaders
  4015. googleapi.Expand(req.URL, map[string]string{
  4016. "userId": c.userId,
  4017. })
  4018. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4019. }
  4020. // Do executes the "books.bookshelves.list" call.
  4021. // Exactly one of *Bookshelves or error will be non-nil. Any non-2xx
  4022. // status code is an error. Response headers are in either
  4023. // *Bookshelves.ServerResponse.Header or (if a response was returned at
  4024. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4025. // to check whether the returned error was because
  4026. // http.StatusNotModified was returned.
  4027. func (c *BookshelvesListCall) Do(opts ...googleapi.CallOption) (*Bookshelves, error) {
  4028. gensupport.SetOptions(c.urlParams_, opts...)
  4029. res, err := c.doRequest("json")
  4030. if res != nil && res.StatusCode == http.StatusNotModified {
  4031. if res.Body != nil {
  4032. res.Body.Close()
  4033. }
  4034. return nil, &googleapi.Error{
  4035. Code: res.StatusCode,
  4036. Header: res.Header,
  4037. }
  4038. }
  4039. if err != nil {
  4040. return nil, err
  4041. }
  4042. defer googleapi.CloseBody(res)
  4043. if err := googleapi.CheckResponse(res); err != nil {
  4044. return nil, err
  4045. }
  4046. ret := &Bookshelves{
  4047. ServerResponse: googleapi.ServerResponse{
  4048. Header: res.Header,
  4049. HTTPStatusCode: res.StatusCode,
  4050. },
  4051. }
  4052. target := &ret
  4053. if err := gensupport.DecodeResponse(target, res); err != nil {
  4054. return nil, err
  4055. }
  4056. return ret, nil
  4057. // {
  4058. // "description": "Retrieves a list of public bookshelves for the specified user.",
  4059. // "httpMethod": "GET",
  4060. // "id": "books.bookshelves.list",
  4061. // "parameterOrder": [
  4062. // "userId"
  4063. // ],
  4064. // "parameters": {
  4065. // "source": {
  4066. // "description": "String to identify the originator of this request.",
  4067. // "location": "query",
  4068. // "type": "string"
  4069. // },
  4070. // "userId": {
  4071. // "description": "ID of user for whom to retrieve bookshelves.",
  4072. // "location": "path",
  4073. // "required": true,
  4074. // "type": "string"
  4075. // }
  4076. // },
  4077. // "path": "users/{userId}/bookshelves",
  4078. // "response": {
  4079. // "$ref": "Bookshelves"
  4080. // },
  4081. // "scopes": [
  4082. // "https://www.googleapis.com/auth/books"
  4083. // ]
  4084. // }
  4085. }
  4086. // method id "books.bookshelves.volumes.list":
  4087. type BookshelvesVolumesListCall struct {
  4088. s *Service
  4089. userId string
  4090. shelf string
  4091. urlParams_ gensupport.URLParams
  4092. ifNoneMatch_ string
  4093. ctx_ context.Context
  4094. header_ http.Header
  4095. }
  4096. // List: Retrieves volumes in a specific bookshelf for the specified
  4097. // user.
  4098. func (r *BookshelvesVolumesService) List(userId string, shelf string) *BookshelvesVolumesListCall {
  4099. c := &BookshelvesVolumesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4100. c.userId = userId
  4101. c.shelf = shelf
  4102. return c
  4103. }
  4104. // MaxResults sets the optional parameter "maxResults": Maximum number
  4105. // of results to return
  4106. func (c *BookshelvesVolumesListCall) MaxResults(maxResults int64) *BookshelvesVolumesListCall {
  4107. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4108. return c
  4109. }
  4110. // ShowPreorders sets the optional parameter "showPreorders": Set to
  4111. // true to show pre-ordered books. Defaults to false.
  4112. func (c *BookshelvesVolumesListCall) ShowPreorders(showPreorders bool) *BookshelvesVolumesListCall {
  4113. c.urlParams_.Set("showPreorders", fmt.Sprint(showPreorders))
  4114. return c
  4115. }
  4116. // Source sets the optional parameter "source": String to identify the
  4117. // originator of this request.
  4118. func (c *BookshelvesVolumesListCall) Source(source string) *BookshelvesVolumesListCall {
  4119. c.urlParams_.Set("source", source)
  4120. return c
  4121. }
  4122. // StartIndex sets the optional parameter "startIndex": Index of the
  4123. // first element to return (starts at 0)
  4124. func (c *BookshelvesVolumesListCall) StartIndex(startIndex int64) *BookshelvesVolumesListCall {
  4125. c.urlParams_.Set("startIndex", fmt.Sprint(startIndex))
  4126. return c
  4127. }
  4128. // Fields allows partial responses to be retrieved. See
  4129. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4130. // for more information.
  4131. func (c *BookshelvesVolumesListCall) Fields(s ...googleapi.Field) *BookshelvesVolumesListCall {
  4132. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4133. return c
  4134. }
  4135. // IfNoneMatch sets the optional parameter which makes the operation
  4136. // fail if the object's ETag matches the given value. This is useful for
  4137. // getting updates only after the object has changed since the last
  4138. // request. Use googleapi.IsNotModified to check whether the response
  4139. // error from Do is the result of In-None-Match.
  4140. func (c *BookshelvesVolumesListCall) IfNoneMatch(entityTag string) *BookshelvesVolumesListCall {
  4141. c.ifNoneMatch_ = entityTag
  4142. return c
  4143. }
  4144. // Context sets the context to be used in this call's Do method. Any
  4145. // pending HTTP request will be aborted if the provided context is
  4146. // canceled.
  4147. func (c *BookshelvesVolumesListCall) Context(ctx context.Context) *BookshelvesVolumesListCall {
  4148. c.ctx_ = ctx
  4149. return c
  4150. }
  4151. // Header returns an http.Header that can be modified by the caller to
  4152. // add HTTP headers to the request.
  4153. func (c *BookshelvesVolumesListCall) Header() http.Header {
  4154. if c.header_ == nil {
  4155. c.header_ = make(http.Header)
  4156. }
  4157. return c.header_
  4158. }
  4159. func (c *BookshelvesVolumesListCall) doRequest(alt string) (*http.Response, error) {
  4160. reqHeaders := make(http.Header)
  4161. for k, v := range c.header_ {
  4162. reqHeaders[k] = v
  4163. }
  4164. reqHeaders.Set("User-Agent", c.s.userAgent())
  4165. if c.ifNoneMatch_ != "" {
  4166. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4167. }
  4168. var body io.Reader = nil
  4169. c.urlParams_.Set("alt", alt)
  4170. c.urlParams_.Set("prettyPrint", "false")
  4171. urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}/bookshelves/{shelf}/volumes")
  4172. urls += "?" + c.urlParams_.Encode()
  4173. req, err := http.NewRequest("GET", urls, body)
  4174. if err != nil {
  4175. return nil, err
  4176. }
  4177. req.Header = reqHeaders
  4178. googleapi.Expand(req.URL, map[string]string{
  4179. "userId": c.userId,
  4180. "shelf": c.shelf,
  4181. })
  4182. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4183. }
  4184. // Do executes the "books.bookshelves.volumes.list" call.
  4185. // Exactly one of *Volumes or error will be non-nil. Any non-2xx status
  4186. // code is an error. Response headers are in either
  4187. // *Volumes.ServerResponse.Header or (if a response was returned at all)
  4188. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4189. // check whether the returned error was because http.StatusNotModified
  4190. // was returned.
  4191. func (c *BookshelvesVolumesListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) {
  4192. gensupport.SetOptions(c.urlParams_, opts...)
  4193. res, err := c.doRequest("json")
  4194. if res != nil && res.StatusCode == http.StatusNotModified {
  4195. if res.Body != nil {
  4196. res.Body.Close()
  4197. }
  4198. return nil, &googleapi.Error{
  4199. Code: res.StatusCode,
  4200. Header: res.Header,
  4201. }
  4202. }
  4203. if err != nil {
  4204. return nil, err
  4205. }
  4206. defer googleapi.CloseBody(res)
  4207. if err := googleapi.CheckResponse(res); err != nil {
  4208. return nil, err
  4209. }
  4210. ret := &Volumes{
  4211. ServerResponse: googleapi.ServerResponse{
  4212. Header: res.Header,
  4213. HTTPStatusCode: res.StatusCode,
  4214. },
  4215. }
  4216. target := &ret
  4217. if err := gensupport.DecodeResponse(target, res); err != nil {
  4218. return nil, err
  4219. }
  4220. return ret, nil
  4221. // {
  4222. // "description": "Retrieves volumes in a specific bookshelf for the specified user.",
  4223. // "httpMethod": "GET",
  4224. // "id": "books.bookshelves.volumes.list",
  4225. // "parameterOrder": [
  4226. // "userId",
  4227. // "shelf"
  4228. // ],
  4229. // "parameters": {
  4230. // "maxResults": {
  4231. // "description": "Maximum number of results to return",
  4232. // "format": "uint32",
  4233. // "location": "query",
  4234. // "minimum": "0",
  4235. // "type": "integer"
  4236. // },
  4237. // "shelf": {
  4238. // "description": "ID of bookshelf to retrieve volumes.",
  4239. // "location": "path",
  4240. // "required": true,
  4241. // "type": "string"
  4242. // },
  4243. // "showPreorders": {
  4244. // "description": "Set to true to show pre-ordered books. Defaults to false.",
  4245. // "location": "query",
  4246. // "type": "boolean"
  4247. // },
  4248. // "source": {
  4249. // "description": "String to identify the originator of this request.",
  4250. // "location": "query",
  4251. // "type": "string"
  4252. // },
  4253. // "startIndex": {
  4254. // "description": "Index of the first element to return (starts at 0)",
  4255. // "format": "uint32",
  4256. // "location": "query",
  4257. // "minimum": "0",
  4258. // "type": "integer"
  4259. // },
  4260. // "userId": {
  4261. // "description": "ID of user for whom to retrieve bookshelf volumes.",
  4262. // "location": "path",
  4263. // "required": true,
  4264. // "type": "string"
  4265. // }
  4266. // },
  4267. // "path": "users/{userId}/bookshelves/{shelf}/volumes",
  4268. // "response": {
  4269. // "$ref": "Volumes"
  4270. // },
  4271. // "scopes": [
  4272. // "https://www.googleapis.com/auth/books"
  4273. // ]
  4274. // }
  4275. }
  4276. // method id "books.cloudloading.addBook":
  4277. type CloudloadingAddBookCall struct {
  4278. s *Service
  4279. urlParams_ gensupport.URLParams
  4280. ctx_ context.Context
  4281. header_ http.Header
  4282. }
  4283. // AddBook:
  4284. func (r *CloudloadingService) AddBook() *CloudloadingAddBookCall {
  4285. c := &CloudloadingAddBookCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4286. return c
  4287. }
  4288. // DriveDocumentId sets the optional parameter "drive_document_id": A
  4289. // drive document id. The upload_client_token must not be set.
  4290. func (c *CloudloadingAddBookCall) DriveDocumentId(driveDocumentId string) *CloudloadingAddBookCall {
  4291. c.urlParams_.Set("drive_document_id", driveDocumentId)
  4292. return c
  4293. }
  4294. // MimeType sets the optional parameter "mime_type": The document MIME
  4295. // type. It can be set only if the drive_document_id is set.
  4296. func (c *CloudloadingAddBookCall) MimeType(mimeType string) *CloudloadingAddBookCall {
  4297. c.urlParams_.Set("mime_type", mimeType)
  4298. return c
  4299. }
  4300. // Name sets the optional parameter "name": The document name. It can be
  4301. // set only if the drive_document_id is set.
  4302. func (c *CloudloadingAddBookCall) Name(name string) *CloudloadingAddBookCall {
  4303. c.urlParams_.Set("name", name)
  4304. return c
  4305. }
  4306. // UploadClientToken sets the optional parameter "upload_client_token":
  4307. func (c *CloudloadingAddBookCall) UploadClientToken(uploadClientToken string) *CloudloadingAddBookCall {
  4308. c.urlParams_.Set("upload_client_token", uploadClientToken)
  4309. return c
  4310. }
  4311. // Fields allows partial responses to be retrieved. See
  4312. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4313. // for more information.
  4314. func (c *CloudloadingAddBookCall) Fields(s ...googleapi.Field) *CloudloadingAddBookCall {
  4315. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4316. return c
  4317. }
  4318. // Context sets the context to be used in this call's Do method. Any
  4319. // pending HTTP request will be aborted if the provided context is
  4320. // canceled.
  4321. func (c *CloudloadingAddBookCall) Context(ctx context.Context) *CloudloadingAddBookCall {
  4322. c.ctx_ = ctx
  4323. return c
  4324. }
  4325. // Header returns an http.Header that can be modified by the caller to
  4326. // add HTTP headers to the request.
  4327. func (c *CloudloadingAddBookCall) Header() http.Header {
  4328. if c.header_ == nil {
  4329. c.header_ = make(http.Header)
  4330. }
  4331. return c.header_
  4332. }
  4333. func (c *CloudloadingAddBookCall) doRequest(alt string) (*http.Response, error) {
  4334. reqHeaders := make(http.Header)
  4335. for k, v := range c.header_ {
  4336. reqHeaders[k] = v
  4337. }
  4338. reqHeaders.Set("User-Agent", c.s.userAgent())
  4339. var body io.Reader = nil
  4340. c.urlParams_.Set("alt", alt)
  4341. c.urlParams_.Set("prettyPrint", "false")
  4342. urls := googleapi.ResolveRelative(c.s.BasePath, "cloudloading/addBook")
  4343. urls += "?" + c.urlParams_.Encode()
  4344. req, err := http.NewRequest("POST", urls, body)
  4345. if err != nil {
  4346. return nil, err
  4347. }
  4348. req.Header = reqHeaders
  4349. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4350. }
  4351. // Do executes the "books.cloudloading.addBook" call.
  4352. // Exactly one of *BooksCloudloadingResource or error will be non-nil.
  4353. // Any non-2xx status code is an error. Response headers are in either
  4354. // *BooksCloudloadingResource.ServerResponse.Header or (if a response
  4355. // was returned at all) in error.(*googleapi.Error).Header. Use
  4356. // googleapi.IsNotModified to check whether the returned error was
  4357. // because http.StatusNotModified was returned.
  4358. func (c *CloudloadingAddBookCall) Do(opts ...googleapi.CallOption) (*BooksCloudloadingResource, error) {
  4359. gensupport.SetOptions(c.urlParams_, opts...)
  4360. res, err := c.doRequest("json")
  4361. if res != nil && res.StatusCode == http.StatusNotModified {
  4362. if res.Body != nil {
  4363. res.Body.Close()
  4364. }
  4365. return nil, &googleapi.Error{
  4366. Code: res.StatusCode,
  4367. Header: res.Header,
  4368. }
  4369. }
  4370. if err != nil {
  4371. return nil, err
  4372. }
  4373. defer googleapi.CloseBody(res)
  4374. if err := googleapi.CheckResponse(res); err != nil {
  4375. return nil, err
  4376. }
  4377. ret := &BooksCloudloadingResource{
  4378. ServerResponse: googleapi.ServerResponse{
  4379. Header: res.Header,
  4380. HTTPStatusCode: res.StatusCode,
  4381. },
  4382. }
  4383. target := &ret
  4384. if err := gensupport.DecodeResponse(target, res); err != nil {
  4385. return nil, err
  4386. }
  4387. return ret, nil
  4388. // {
  4389. // "description": "",
  4390. // "httpMethod": "POST",
  4391. // "id": "books.cloudloading.addBook",
  4392. // "parameters": {
  4393. // "drive_document_id": {
  4394. // "description": "A drive document id. The upload_client_token must not be set.",
  4395. // "location": "query",
  4396. // "type": "string"
  4397. // },
  4398. // "mime_type": {
  4399. // "description": "The document MIME type. It can be set only if the drive_document_id is set.",
  4400. // "location": "query",
  4401. // "type": "string"
  4402. // },
  4403. // "name": {
  4404. // "description": "The document name. It can be set only if the drive_document_id is set.",
  4405. // "location": "query",
  4406. // "type": "string"
  4407. // },
  4408. // "upload_client_token": {
  4409. // "location": "query",
  4410. // "type": "string"
  4411. // }
  4412. // },
  4413. // "path": "cloudloading/addBook",
  4414. // "response": {
  4415. // "$ref": "BooksCloudloadingResource"
  4416. // },
  4417. // "scopes": [
  4418. // "https://www.googleapis.com/auth/books"
  4419. // ]
  4420. // }
  4421. }
  4422. // method id "books.cloudloading.deleteBook":
  4423. type CloudloadingDeleteBookCall struct {
  4424. s *Service
  4425. urlParams_ gensupport.URLParams
  4426. ctx_ context.Context
  4427. header_ http.Header
  4428. }
  4429. // DeleteBook: Remove the book and its contents
  4430. func (r *CloudloadingService) DeleteBook(volumeId string) *CloudloadingDeleteBookCall {
  4431. c := &CloudloadingDeleteBookCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4432. c.urlParams_.Set("volumeId", volumeId)
  4433. return c
  4434. }
  4435. // Fields allows partial responses to be retrieved. See
  4436. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4437. // for more information.
  4438. func (c *CloudloadingDeleteBookCall) Fields(s ...googleapi.Field) *CloudloadingDeleteBookCall {
  4439. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4440. return c
  4441. }
  4442. // Context sets the context to be used in this call's Do method. Any
  4443. // pending HTTP request will be aborted if the provided context is
  4444. // canceled.
  4445. func (c *CloudloadingDeleteBookCall) Context(ctx context.Context) *CloudloadingDeleteBookCall {
  4446. c.ctx_ = ctx
  4447. return c
  4448. }
  4449. // Header returns an http.Header that can be modified by the caller to
  4450. // add HTTP headers to the request.
  4451. func (c *CloudloadingDeleteBookCall) Header() http.Header {
  4452. if c.header_ == nil {
  4453. c.header_ = make(http.Header)
  4454. }
  4455. return c.header_
  4456. }
  4457. func (c *CloudloadingDeleteBookCall) doRequest(alt string) (*http.Response, error) {
  4458. reqHeaders := make(http.Header)
  4459. for k, v := range c.header_ {
  4460. reqHeaders[k] = v
  4461. }
  4462. reqHeaders.Set("User-Agent", c.s.userAgent())
  4463. var body io.Reader = nil
  4464. c.urlParams_.Set("alt", alt)
  4465. c.urlParams_.Set("prettyPrint", "false")
  4466. urls := googleapi.ResolveRelative(c.s.BasePath, "cloudloading/deleteBook")
  4467. urls += "?" + c.urlParams_.Encode()
  4468. req, err := http.NewRequest("POST", urls, body)
  4469. if err != nil {
  4470. return nil, err
  4471. }
  4472. req.Header = reqHeaders
  4473. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4474. }
  4475. // Do executes the "books.cloudloading.deleteBook" call.
  4476. func (c *CloudloadingDeleteBookCall) Do(opts ...googleapi.CallOption) error {
  4477. gensupport.SetOptions(c.urlParams_, opts...)
  4478. res, err := c.doRequest("json")
  4479. if err != nil {
  4480. return err
  4481. }
  4482. defer googleapi.CloseBody(res)
  4483. if err := googleapi.CheckResponse(res); err != nil {
  4484. return err
  4485. }
  4486. return nil
  4487. // {
  4488. // "description": "Remove the book and its contents",
  4489. // "httpMethod": "POST",
  4490. // "id": "books.cloudloading.deleteBook",
  4491. // "parameterOrder": [
  4492. // "volumeId"
  4493. // ],
  4494. // "parameters": {
  4495. // "volumeId": {
  4496. // "description": "The id of the book to be removed.",
  4497. // "location": "query",
  4498. // "required": true,
  4499. // "type": "string"
  4500. // }
  4501. // },
  4502. // "path": "cloudloading/deleteBook",
  4503. // "scopes": [
  4504. // "https://www.googleapis.com/auth/books"
  4505. // ]
  4506. // }
  4507. }
  4508. // method id "books.cloudloading.updateBook":
  4509. type CloudloadingUpdateBookCall struct {
  4510. s *Service
  4511. bookscloudloadingresource *BooksCloudloadingResource
  4512. urlParams_ gensupport.URLParams
  4513. ctx_ context.Context
  4514. header_ http.Header
  4515. }
  4516. // UpdateBook:
  4517. func (r *CloudloadingService) UpdateBook(bookscloudloadingresource *BooksCloudloadingResource) *CloudloadingUpdateBookCall {
  4518. c := &CloudloadingUpdateBookCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4519. c.bookscloudloadingresource = bookscloudloadingresource
  4520. return c
  4521. }
  4522. // Fields allows partial responses to be retrieved. See
  4523. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4524. // for more information.
  4525. func (c *CloudloadingUpdateBookCall) Fields(s ...googleapi.Field) *CloudloadingUpdateBookCall {
  4526. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4527. return c
  4528. }
  4529. // Context sets the context to be used in this call's Do method. Any
  4530. // pending HTTP request will be aborted if the provided context is
  4531. // canceled.
  4532. func (c *CloudloadingUpdateBookCall) Context(ctx context.Context) *CloudloadingUpdateBookCall {
  4533. c.ctx_ = ctx
  4534. return c
  4535. }
  4536. // Header returns an http.Header that can be modified by the caller to
  4537. // add HTTP headers to the request.
  4538. func (c *CloudloadingUpdateBookCall) Header() http.Header {
  4539. if c.header_ == nil {
  4540. c.header_ = make(http.Header)
  4541. }
  4542. return c.header_
  4543. }
  4544. func (c *CloudloadingUpdateBookCall) doRequest(alt string) (*http.Response, error) {
  4545. reqHeaders := make(http.Header)
  4546. for k, v := range c.header_ {
  4547. reqHeaders[k] = v
  4548. }
  4549. reqHeaders.Set("User-Agent", c.s.userAgent())
  4550. var body io.Reader = nil
  4551. body, err := googleapi.WithoutDataWrapper.JSONReader(c.bookscloudloadingresource)
  4552. if err != nil {
  4553. return nil, err
  4554. }
  4555. reqHeaders.Set("Content-Type", "application/json")
  4556. c.urlParams_.Set("alt", alt)
  4557. c.urlParams_.Set("prettyPrint", "false")
  4558. urls := googleapi.ResolveRelative(c.s.BasePath, "cloudloading/updateBook")
  4559. urls += "?" + c.urlParams_.Encode()
  4560. req, err := http.NewRequest("POST", urls, body)
  4561. if err != nil {
  4562. return nil, err
  4563. }
  4564. req.Header = reqHeaders
  4565. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4566. }
  4567. // Do executes the "books.cloudloading.updateBook" call.
  4568. // Exactly one of *BooksCloudloadingResource or error will be non-nil.
  4569. // Any non-2xx status code is an error. Response headers are in either
  4570. // *BooksCloudloadingResource.ServerResponse.Header or (if a response
  4571. // was returned at all) in error.(*googleapi.Error).Header. Use
  4572. // googleapi.IsNotModified to check whether the returned error was
  4573. // because http.StatusNotModified was returned.
  4574. func (c *CloudloadingUpdateBookCall) Do(opts ...googleapi.CallOption) (*BooksCloudloadingResource, error) {
  4575. gensupport.SetOptions(c.urlParams_, opts...)
  4576. res, err := c.doRequest("json")
  4577. if res != nil && res.StatusCode == http.StatusNotModified {
  4578. if res.Body != nil {
  4579. res.Body.Close()
  4580. }
  4581. return nil, &googleapi.Error{
  4582. Code: res.StatusCode,
  4583. Header: res.Header,
  4584. }
  4585. }
  4586. if err != nil {
  4587. return nil, err
  4588. }
  4589. defer googleapi.CloseBody(res)
  4590. if err := googleapi.CheckResponse(res); err != nil {
  4591. return nil, err
  4592. }
  4593. ret := &BooksCloudloadingResource{
  4594. ServerResponse: googleapi.ServerResponse{
  4595. Header: res.Header,
  4596. HTTPStatusCode: res.StatusCode,
  4597. },
  4598. }
  4599. target := &ret
  4600. if err := gensupport.DecodeResponse(target, res); err != nil {
  4601. return nil, err
  4602. }
  4603. return ret, nil
  4604. // {
  4605. // "description": "",
  4606. // "httpMethod": "POST",
  4607. // "id": "books.cloudloading.updateBook",
  4608. // "path": "cloudloading/updateBook",
  4609. // "request": {
  4610. // "$ref": "BooksCloudloadingResource"
  4611. // },
  4612. // "response": {
  4613. // "$ref": "BooksCloudloadingResource"
  4614. // },
  4615. // "scopes": [
  4616. // "https://www.googleapis.com/auth/books"
  4617. // ]
  4618. // }
  4619. }
  4620. // method id "books.dictionary.listOfflineMetadata":
  4621. type DictionaryListOfflineMetadataCall struct {
  4622. s *Service
  4623. urlParams_ gensupport.URLParams
  4624. ifNoneMatch_ string
  4625. ctx_ context.Context
  4626. header_ http.Header
  4627. }
  4628. // ListOfflineMetadata: Returns a list of offline dictionary metadata
  4629. // available
  4630. func (r *DictionaryService) ListOfflineMetadata(cpksver string) *DictionaryListOfflineMetadataCall {
  4631. c := &DictionaryListOfflineMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4632. c.urlParams_.Set("cpksver", cpksver)
  4633. return c
  4634. }
  4635. // Fields allows partial responses to be retrieved. See
  4636. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4637. // for more information.
  4638. func (c *DictionaryListOfflineMetadataCall) Fields(s ...googleapi.Field) *DictionaryListOfflineMetadataCall {
  4639. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4640. return c
  4641. }
  4642. // IfNoneMatch sets the optional parameter which makes the operation
  4643. // fail if the object's ETag matches the given value. This is useful for
  4644. // getting updates only after the object has changed since the last
  4645. // request. Use googleapi.IsNotModified to check whether the response
  4646. // error from Do is the result of In-None-Match.
  4647. func (c *DictionaryListOfflineMetadataCall) IfNoneMatch(entityTag string) *DictionaryListOfflineMetadataCall {
  4648. c.ifNoneMatch_ = entityTag
  4649. return c
  4650. }
  4651. // Context sets the context to be used in this call's Do method. Any
  4652. // pending HTTP request will be aborted if the provided context is
  4653. // canceled.
  4654. func (c *DictionaryListOfflineMetadataCall) Context(ctx context.Context) *DictionaryListOfflineMetadataCall {
  4655. c.ctx_ = ctx
  4656. return c
  4657. }
  4658. // Header returns an http.Header that can be modified by the caller to
  4659. // add HTTP headers to the request.
  4660. func (c *DictionaryListOfflineMetadataCall) Header() http.Header {
  4661. if c.header_ == nil {
  4662. c.header_ = make(http.Header)
  4663. }
  4664. return c.header_
  4665. }
  4666. func (c *DictionaryListOfflineMetadataCall) doRequest(alt string) (*http.Response, error) {
  4667. reqHeaders := make(http.Header)
  4668. for k, v := range c.header_ {
  4669. reqHeaders[k] = v
  4670. }
  4671. reqHeaders.Set("User-Agent", c.s.userAgent())
  4672. if c.ifNoneMatch_ != "" {
  4673. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4674. }
  4675. var body io.Reader = nil
  4676. c.urlParams_.Set("alt", alt)
  4677. c.urlParams_.Set("prettyPrint", "false")
  4678. urls := googleapi.ResolveRelative(c.s.BasePath, "dictionary/listOfflineMetadata")
  4679. urls += "?" + c.urlParams_.Encode()
  4680. req, err := http.NewRequest("GET", urls, body)
  4681. if err != nil {
  4682. return nil, err
  4683. }
  4684. req.Header = reqHeaders
  4685. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4686. }
  4687. // Do executes the "books.dictionary.listOfflineMetadata" call.
  4688. // Exactly one of *Metadata or error will be non-nil. Any non-2xx status
  4689. // code is an error. Response headers are in either
  4690. // *Metadata.ServerResponse.Header or (if a response was returned at
  4691. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4692. // to check whether the returned error was because
  4693. // http.StatusNotModified was returned.
  4694. func (c *DictionaryListOfflineMetadataCall) Do(opts ...googleapi.CallOption) (*Metadata, error) {
  4695. gensupport.SetOptions(c.urlParams_, opts...)
  4696. res, err := c.doRequest("json")
  4697. if res != nil && res.StatusCode == http.StatusNotModified {
  4698. if res.Body != nil {
  4699. res.Body.Close()
  4700. }
  4701. return nil, &googleapi.Error{
  4702. Code: res.StatusCode,
  4703. Header: res.Header,
  4704. }
  4705. }
  4706. if err != nil {
  4707. return nil, err
  4708. }
  4709. defer googleapi.CloseBody(res)
  4710. if err := googleapi.CheckResponse(res); err != nil {
  4711. return nil, err
  4712. }
  4713. ret := &Metadata{
  4714. ServerResponse: googleapi.ServerResponse{
  4715. Header: res.Header,
  4716. HTTPStatusCode: res.StatusCode,
  4717. },
  4718. }
  4719. target := &ret
  4720. if err := gensupport.DecodeResponse(target, res); err != nil {
  4721. return nil, err
  4722. }
  4723. return ret, nil
  4724. // {
  4725. // "description": "Returns a list of offline dictionary metadata available",
  4726. // "httpMethod": "GET",
  4727. // "id": "books.dictionary.listOfflineMetadata",
  4728. // "parameterOrder": [
  4729. // "cpksver"
  4730. // ],
  4731. // "parameters": {
  4732. // "cpksver": {
  4733. // "description": "The device/version ID from which to request the data.",
  4734. // "location": "query",
  4735. // "required": true,
  4736. // "type": "string"
  4737. // }
  4738. // },
  4739. // "path": "dictionary/listOfflineMetadata",
  4740. // "response": {
  4741. // "$ref": "Metadata"
  4742. // },
  4743. // "scopes": [
  4744. // "https://www.googleapis.com/auth/books"
  4745. // ]
  4746. // }
  4747. }
  4748. // method id "books.familysharing.getFamilyInfo":
  4749. type FamilysharingGetFamilyInfoCall struct {
  4750. s *Service
  4751. urlParams_ gensupport.URLParams
  4752. ifNoneMatch_ string
  4753. ctx_ context.Context
  4754. header_ http.Header
  4755. }
  4756. // GetFamilyInfo: Gets information regarding the family that the user is
  4757. // part of.
  4758. func (r *FamilysharingService) GetFamilyInfo() *FamilysharingGetFamilyInfoCall {
  4759. c := &FamilysharingGetFamilyInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4760. return c
  4761. }
  4762. // Source sets the optional parameter "source": String to identify the
  4763. // originator of this request.
  4764. func (c *FamilysharingGetFamilyInfoCall) Source(source string) *FamilysharingGetFamilyInfoCall {
  4765. c.urlParams_.Set("source", source)
  4766. return c
  4767. }
  4768. // Fields allows partial responses to be retrieved. See
  4769. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4770. // for more information.
  4771. func (c *FamilysharingGetFamilyInfoCall) Fields(s ...googleapi.Field) *FamilysharingGetFamilyInfoCall {
  4772. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4773. return c
  4774. }
  4775. // IfNoneMatch sets the optional parameter which makes the operation
  4776. // fail if the object's ETag matches the given value. This is useful for
  4777. // getting updates only after the object has changed since the last
  4778. // request. Use googleapi.IsNotModified to check whether the response
  4779. // error from Do is the result of In-None-Match.
  4780. func (c *FamilysharingGetFamilyInfoCall) IfNoneMatch(entityTag string) *FamilysharingGetFamilyInfoCall {
  4781. c.ifNoneMatch_ = entityTag
  4782. return c
  4783. }
  4784. // Context sets the context to be used in this call's Do method. Any
  4785. // pending HTTP request will be aborted if the provided context is
  4786. // canceled.
  4787. func (c *FamilysharingGetFamilyInfoCall) Context(ctx context.Context) *FamilysharingGetFamilyInfoCall {
  4788. c.ctx_ = ctx
  4789. return c
  4790. }
  4791. // Header returns an http.Header that can be modified by the caller to
  4792. // add HTTP headers to the request.
  4793. func (c *FamilysharingGetFamilyInfoCall) Header() http.Header {
  4794. if c.header_ == nil {
  4795. c.header_ = make(http.Header)
  4796. }
  4797. return c.header_
  4798. }
  4799. func (c *FamilysharingGetFamilyInfoCall) doRequest(alt string) (*http.Response, error) {
  4800. reqHeaders := make(http.Header)
  4801. for k, v := range c.header_ {
  4802. reqHeaders[k] = v
  4803. }
  4804. reqHeaders.Set("User-Agent", c.s.userAgent())
  4805. if c.ifNoneMatch_ != "" {
  4806. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4807. }
  4808. var body io.Reader = nil
  4809. c.urlParams_.Set("alt", alt)
  4810. c.urlParams_.Set("prettyPrint", "false")
  4811. urls := googleapi.ResolveRelative(c.s.BasePath, "familysharing/getFamilyInfo")
  4812. urls += "?" + c.urlParams_.Encode()
  4813. req, err := http.NewRequest("GET", urls, body)
  4814. if err != nil {
  4815. return nil, err
  4816. }
  4817. req.Header = reqHeaders
  4818. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4819. }
  4820. // Do executes the "books.familysharing.getFamilyInfo" call.
  4821. // Exactly one of *FamilyInfo or error will be non-nil. Any non-2xx
  4822. // status code is an error. Response headers are in either
  4823. // *FamilyInfo.ServerResponse.Header or (if a response was returned at
  4824. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4825. // to check whether the returned error was because
  4826. // http.StatusNotModified was returned.
  4827. func (c *FamilysharingGetFamilyInfoCall) Do(opts ...googleapi.CallOption) (*FamilyInfo, error) {
  4828. gensupport.SetOptions(c.urlParams_, opts...)
  4829. res, err := c.doRequest("json")
  4830. if res != nil && res.StatusCode == http.StatusNotModified {
  4831. if res.Body != nil {
  4832. res.Body.Close()
  4833. }
  4834. return nil, &googleapi.Error{
  4835. Code: res.StatusCode,
  4836. Header: res.Header,
  4837. }
  4838. }
  4839. if err != nil {
  4840. return nil, err
  4841. }
  4842. defer googleapi.CloseBody(res)
  4843. if err := googleapi.CheckResponse(res); err != nil {
  4844. return nil, err
  4845. }
  4846. ret := &FamilyInfo{
  4847. ServerResponse: googleapi.ServerResponse{
  4848. Header: res.Header,
  4849. HTTPStatusCode: res.StatusCode,
  4850. },
  4851. }
  4852. target := &ret
  4853. if err := gensupport.DecodeResponse(target, res); err != nil {
  4854. return nil, err
  4855. }
  4856. return ret, nil
  4857. // {
  4858. // "description": "Gets information regarding the family that the user is part of.",
  4859. // "httpMethod": "GET",
  4860. // "id": "books.familysharing.getFamilyInfo",
  4861. // "parameters": {
  4862. // "source": {
  4863. // "description": "String to identify the originator of this request.",
  4864. // "location": "query",
  4865. // "type": "string"
  4866. // }
  4867. // },
  4868. // "path": "familysharing/getFamilyInfo",
  4869. // "response": {
  4870. // "$ref": "FamilyInfo"
  4871. // },
  4872. // "scopes": [
  4873. // "https://www.googleapis.com/auth/books"
  4874. // ]
  4875. // }
  4876. }
  4877. // method id "books.familysharing.share":
  4878. type FamilysharingShareCall struct {
  4879. s *Service
  4880. urlParams_ gensupport.URLParams
  4881. ctx_ context.Context
  4882. header_ http.Header
  4883. }
  4884. // Share: Initiates sharing of the content with the user's family. Empty
  4885. // response indicates success.
  4886. func (r *FamilysharingService) Share() *FamilysharingShareCall {
  4887. c := &FamilysharingShareCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4888. return c
  4889. }
  4890. // DocId sets the optional parameter "docId": The docid to share.
  4891. func (c *FamilysharingShareCall) DocId(docId string) *FamilysharingShareCall {
  4892. c.urlParams_.Set("docId", docId)
  4893. return c
  4894. }
  4895. // Source sets the optional parameter "source": String to identify the
  4896. // originator of this request.
  4897. func (c *FamilysharingShareCall) Source(source string) *FamilysharingShareCall {
  4898. c.urlParams_.Set("source", source)
  4899. return c
  4900. }
  4901. // VolumeId sets the optional parameter "volumeId": The volume to share.
  4902. func (c *FamilysharingShareCall) VolumeId(volumeId string) *FamilysharingShareCall {
  4903. c.urlParams_.Set("volumeId", volumeId)
  4904. return c
  4905. }
  4906. // Fields allows partial responses to be retrieved. See
  4907. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4908. // for more information.
  4909. func (c *FamilysharingShareCall) Fields(s ...googleapi.Field) *FamilysharingShareCall {
  4910. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4911. return c
  4912. }
  4913. // Context sets the context to be used in this call's Do method. Any
  4914. // pending HTTP request will be aborted if the provided context is
  4915. // canceled.
  4916. func (c *FamilysharingShareCall) Context(ctx context.Context) *FamilysharingShareCall {
  4917. c.ctx_ = ctx
  4918. return c
  4919. }
  4920. // Header returns an http.Header that can be modified by the caller to
  4921. // add HTTP headers to the request.
  4922. func (c *FamilysharingShareCall) Header() http.Header {
  4923. if c.header_ == nil {
  4924. c.header_ = make(http.Header)
  4925. }
  4926. return c.header_
  4927. }
  4928. func (c *FamilysharingShareCall) doRequest(alt string) (*http.Response, error) {
  4929. reqHeaders := make(http.Header)
  4930. for k, v := range c.header_ {
  4931. reqHeaders[k] = v
  4932. }
  4933. reqHeaders.Set("User-Agent", c.s.userAgent())
  4934. var body io.Reader = nil
  4935. c.urlParams_.Set("alt", alt)
  4936. c.urlParams_.Set("prettyPrint", "false")
  4937. urls := googleapi.ResolveRelative(c.s.BasePath, "familysharing/share")
  4938. urls += "?" + c.urlParams_.Encode()
  4939. req, err := http.NewRequest("POST", urls, body)
  4940. if err != nil {
  4941. return nil, err
  4942. }
  4943. req.Header = reqHeaders
  4944. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4945. }
  4946. // Do executes the "books.familysharing.share" call.
  4947. func (c *FamilysharingShareCall) Do(opts ...googleapi.CallOption) error {
  4948. gensupport.SetOptions(c.urlParams_, opts...)
  4949. res, err := c.doRequest("json")
  4950. if err != nil {
  4951. return err
  4952. }
  4953. defer googleapi.CloseBody(res)
  4954. if err := googleapi.CheckResponse(res); err != nil {
  4955. return err
  4956. }
  4957. return nil
  4958. // {
  4959. // "description": "Initiates sharing of the content with the user's family. Empty response indicates success.",
  4960. // "httpMethod": "POST",
  4961. // "id": "books.familysharing.share",
  4962. // "parameters": {
  4963. // "docId": {
  4964. // "description": "The docid to share.",
  4965. // "location": "query",
  4966. // "type": "string"
  4967. // },
  4968. // "source": {
  4969. // "description": "String to identify the originator of this request.",
  4970. // "location": "query",
  4971. // "type": "string"
  4972. // },
  4973. // "volumeId": {
  4974. // "description": "The volume to share.",
  4975. // "location": "query",
  4976. // "type": "string"
  4977. // }
  4978. // },
  4979. // "path": "familysharing/share",
  4980. // "scopes": [
  4981. // "https://www.googleapis.com/auth/books"
  4982. // ]
  4983. // }
  4984. }
  4985. // method id "books.familysharing.unshare":
  4986. type FamilysharingUnshareCall struct {
  4987. s *Service
  4988. urlParams_ gensupport.URLParams
  4989. ctx_ context.Context
  4990. header_ http.Header
  4991. }
  4992. // Unshare: Initiates revoking content that has already been shared with
  4993. // the user's family. Empty response indicates success.
  4994. func (r *FamilysharingService) Unshare() *FamilysharingUnshareCall {
  4995. c := &FamilysharingUnshareCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4996. return c
  4997. }
  4998. // DocId sets the optional parameter "docId": The docid to unshare.
  4999. func (c *FamilysharingUnshareCall) DocId(docId string) *FamilysharingUnshareCall {
  5000. c.urlParams_.Set("docId", docId)
  5001. return c
  5002. }
  5003. // Source sets the optional parameter "source": String to identify the
  5004. // originator of this request.
  5005. func (c *FamilysharingUnshareCall) Source(source string) *FamilysharingUnshareCall {
  5006. c.urlParams_.Set("source", source)
  5007. return c
  5008. }
  5009. // VolumeId sets the optional parameter "volumeId": The volume to
  5010. // unshare.
  5011. func (c *FamilysharingUnshareCall) VolumeId(volumeId string) *FamilysharingUnshareCall {
  5012. c.urlParams_.Set("volumeId", volumeId)
  5013. return c
  5014. }
  5015. // Fields allows partial responses to be retrieved. See
  5016. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5017. // for more information.
  5018. func (c *FamilysharingUnshareCall) Fields(s ...googleapi.Field) *FamilysharingUnshareCall {
  5019. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5020. return c
  5021. }
  5022. // Context sets the context to be used in this call's Do method. Any
  5023. // pending HTTP request will be aborted if the provided context is
  5024. // canceled.
  5025. func (c *FamilysharingUnshareCall) Context(ctx context.Context) *FamilysharingUnshareCall {
  5026. c.ctx_ = ctx
  5027. return c
  5028. }
  5029. // Header returns an http.Header that can be modified by the caller to
  5030. // add HTTP headers to the request.
  5031. func (c *FamilysharingUnshareCall) Header() http.Header {
  5032. if c.header_ == nil {
  5033. c.header_ = make(http.Header)
  5034. }
  5035. return c.header_
  5036. }
  5037. func (c *FamilysharingUnshareCall) doRequest(alt string) (*http.Response, error) {
  5038. reqHeaders := make(http.Header)
  5039. for k, v := range c.header_ {
  5040. reqHeaders[k] = v
  5041. }
  5042. reqHeaders.Set("User-Agent", c.s.userAgent())
  5043. var body io.Reader = nil
  5044. c.urlParams_.Set("alt", alt)
  5045. c.urlParams_.Set("prettyPrint", "false")
  5046. urls := googleapi.ResolveRelative(c.s.BasePath, "familysharing/unshare")
  5047. urls += "?" + c.urlParams_.Encode()
  5048. req, err := http.NewRequest("POST", urls, body)
  5049. if err != nil {
  5050. return nil, err
  5051. }
  5052. req.Header = reqHeaders
  5053. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5054. }
  5055. // Do executes the "books.familysharing.unshare" call.
  5056. func (c *FamilysharingUnshareCall) Do(opts ...googleapi.CallOption) error {
  5057. gensupport.SetOptions(c.urlParams_, opts...)
  5058. res, err := c.doRequest("json")
  5059. if err != nil {
  5060. return err
  5061. }
  5062. defer googleapi.CloseBody(res)
  5063. if err := googleapi.CheckResponse(res); err != nil {
  5064. return err
  5065. }
  5066. return nil
  5067. // {
  5068. // "description": "Initiates revoking content that has already been shared with the user's family. Empty response indicates success.",
  5069. // "httpMethod": "POST",
  5070. // "id": "books.familysharing.unshare",
  5071. // "parameters": {
  5072. // "docId": {
  5073. // "description": "The docid to unshare.",
  5074. // "location": "query",
  5075. // "type": "string"
  5076. // },
  5077. // "source": {
  5078. // "description": "String to identify the originator of this request.",
  5079. // "location": "query",
  5080. // "type": "string"
  5081. // },
  5082. // "volumeId": {
  5083. // "description": "The volume to unshare.",
  5084. // "location": "query",
  5085. // "type": "string"
  5086. // }
  5087. // },
  5088. // "path": "familysharing/unshare",
  5089. // "scopes": [
  5090. // "https://www.googleapis.com/auth/books"
  5091. // ]
  5092. // }
  5093. }
  5094. // method id "books.layers.get":
  5095. type LayersGetCall struct {
  5096. s *Service
  5097. volumeId string
  5098. summaryId string
  5099. urlParams_ gensupport.URLParams
  5100. ifNoneMatch_ string
  5101. ctx_ context.Context
  5102. header_ http.Header
  5103. }
  5104. // Get: Gets the layer summary for a volume.
  5105. func (r *LayersService) Get(volumeId string, summaryId string) *LayersGetCall {
  5106. c := &LayersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5107. c.volumeId = volumeId
  5108. c.summaryId = summaryId
  5109. return c
  5110. }
  5111. // ContentVersion sets the optional parameter "contentVersion": The
  5112. // content version for the requested volume.
  5113. func (c *LayersGetCall) ContentVersion(contentVersion string) *LayersGetCall {
  5114. c.urlParams_.Set("contentVersion", contentVersion)
  5115. return c
  5116. }
  5117. // Source sets the optional parameter "source": String to identify the
  5118. // originator of this request.
  5119. func (c *LayersGetCall) Source(source string) *LayersGetCall {
  5120. c.urlParams_.Set("source", source)
  5121. return c
  5122. }
  5123. // Fields allows partial responses to be retrieved. See
  5124. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5125. // for more information.
  5126. func (c *LayersGetCall) Fields(s ...googleapi.Field) *LayersGetCall {
  5127. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5128. return c
  5129. }
  5130. // IfNoneMatch sets the optional parameter which makes the operation
  5131. // fail if the object's ETag matches the given value. This is useful for
  5132. // getting updates only after the object has changed since the last
  5133. // request. Use googleapi.IsNotModified to check whether the response
  5134. // error from Do is the result of In-None-Match.
  5135. func (c *LayersGetCall) IfNoneMatch(entityTag string) *LayersGetCall {
  5136. c.ifNoneMatch_ = entityTag
  5137. return c
  5138. }
  5139. // Context sets the context to be used in this call's Do method. Any
  5140. // pending HTTP request will be aborted if the provided context is
  5141. // canceled.
  5142. func (c *LayersGetCall) Context(ctx context.Context) *LayersGetCall {
  5143. c.ctx_ = ctx
  5144. return c
  5145. }
  5146. // Header returns an http.Header that can be modified by the caller to
  5147. // add HTTP headers to the request.
  5148. func (c *LayersGetCall) Header() http.Header {
  5149. if c.header_ == nil {
  5150. c.header_ = make(http.Header)
  5151. }
  5152. return c.header_
  5153. }
  5154. func (c *LayersGetCall) doRequest(alt string) (*http.Response, error) {
  5155. reqHeaders := make(http.Header)
  5156. for k, v := range c.header_ {
  5157. reqHeaders[k] = v
  5158. }
  5159. reqHeaders.Set("User-Agent", c.s.userAgent())
  5160. if c.ifNoneMatch_ != "" {
  5161. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5162. }
  5163. var body io.Reader = nil
  5164. c.urlParams_.Set("alt", alt)
  5165. c.urlParams_.Set("prettyPrint", "false")
  5166. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layersummary/{summaryId}")
  5167. urls += "?" + c.urlParams_.Encode()
  5168. req, err := http.NewRequest("GET", urls, body)
  5169. if err != nil {
  5170. return nil, err
  5171. }
  5172. req.Header = reqHeaders
  5173. googleapi.Expand(req.URL, map[string]string{
  5174. "volumeId": c.volumeId,
  5175. "summaryId": c.summaryId,
  5176. })
  5177. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5178. }
  5179. // Do executes the "books.layers.get" call.
  5180. // Exactly one of *Layersummary or error will be non-nil. Any non-2xx
  5181. // status code is an error. Response headers are in either
  5182. // *Layersummary.ServerResponse.Header or (if a response was returned at
  5183. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5184. // to check whether the returned error was because
  5185. // http.StatusNotModified was returned.
  5186. func (c *LayersGetCall) Do(opts ...googleapi.CallOption) (*Layersummary, error) {
  5187. gensupport.SetOptions(c.urlParams_, opts...)
  5188. res, err := c.doRequest("json")
  5189. if res != nil && res.StatusCode == http.StatusNotModified {
  5190. if res.Body != nil {
  5191. res.Body.Close()
  5192. }
  5193. return nil, &googleapi.Error{
  5194. Code: res.StatusCode,
  5195. Header: res.Header,
  5196. }
  5197. }
  5198. if err != nil {
  5199. return nil, err
  5200. }
  5201. defer googleapi.CloseBody(res)
  5202. if err := googleapi.CheckResponse(res); err != nil {
  5203. return nil, err
  5204. }
  5205. ret := &Layersummary{
  5206. ServerResponse: googleapi.ServerResponse{
  5207. Header: res.Header,
  5208. HTTPStatusCode: res.StatusCode,
  5209. },
  5210. }
  5211. target := &ret
  5212. if err := gensupport.DecodeResponse(target, res); err != nil {
  5213. return nil, err
  5214. }
  5215. return ret, nil
  5216. // {
  5217. // "description": "Gets the layer summary for a volume.",
  5218. // "httpMethod": "GET",
  5219. // "id": "books.layers.get",
  5220. // "parameterOrder": [
  5221. // "volumeId",
  5222. // "summaryId"
  5223. // ],
  5224. // "parameters": {
  5225. // "contentVersion": {
  5226. // "description": "The content version for the requested volume.",
  5227. // "location": "query",
  5228. // "type": "string"
  5229. // },
  5230. // "source": {
  5231. // "description": "String to identify the originator of this request.",
  5232. // "location": "query",
  5233. // "type": "string"
  5234. // },
  5235. // "summaryId": {
  5236. // "description": "The ID for the layer to get the summary for.",
  5237. // "location": "path",
  5238. // "required": true,
  5239. // "type": "string"
  5240. // },
  5241. // "volumeId": {
  5242. // "description": "The volume to retrieve layers for.",
  5243. // "location": "path",
  5244. // "required": true,
  5245. // "type": "string"
  5246. // }
  5247. // },
  5248. // "path": "volumes/{volumeId}/layersummary/{summaryId}",
  5249. // "response": {
  5250. // "$ref": "Layersummary"
  5251. // },
  5252. // "scopes": [
  5253. // "https://www.googleapis.com/auth/books"
  5254. // ]
  5255. // }
  5256. }
  5257. // method id "books.layers.list":
  5258. type LayersListCall struct {
  5259. s *Service
  5260. volumeId string
  5261. urlParams_ gensupport.URLParams
  5262. ifNoneMatch_ string
  5263. ctx_ context.Context
  5264. header_ http.Header
  5265. }
  5266. // List: List the layer summaries for a volume.
  5267. func (r *LayersService) List(volumeId string) *LayersListCall {
  5268. c := &LayersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5269. c.volumeId = volumeId
  5270. return c
  5271. }
  5272. // ContentVersion sets the optional parameter "contentVersion": The
  5273. // content version for the requested volume.
  5274. func (c *LayersListCall) ContentVersion(contentVersion string) *LayersListCall {
  5275. c.urlParams_.Set("contentVersion", contentVersion)
  5276. return c
  5277. }
  5278. // MaxResults sets the optional parameter "maxResults": Maximum number
  5279. // of results to return
  5280. func (c *LayersListCall) MaxResults(maxResults int64) *LayersListCall {
  5281. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5282. return c
  5283. }
  5284. // PageToken sets the optional parameter "pageToken": The value of the
  5285. // nextToken from the previous page.
  5286. func (c *LayersListCall) PageToken(pageToken string) *LayersListCall {
  5287. c.urlParams_.Set("pageToken", pageToken)
  5288. return c
  5289. }
  5290. // Source sets the optional parameter "source": String to identify the
  5291. // originator of this request.
  5292. func (c *LayersListCall) Source(source string) *LayersListCall {
  5293. c.urlParams_.Set("source", source)
  5294. return c
  5295. }
  5296. // Fields allows partial responses to be retrieved. See
  5297. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5298. // for more information.
  5299. func (c *LayersListCall) Fields(s ...googleapi.Field) *LayersListCall {
  5300. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5301. return c
  5302. }
  5303. // IfNoneMatch sets the optional parameter which makes the operation
  5304. // fail if the object's ETag matches the given value. This is useful for
  5305. // getting updates only after the object has changed since the last
  5306. // request. Use googleapi.IsNotModified to check whether the response
  5307. // error from Do is the result of In-None-Match.
  5308. func (c *LayersListCall) IfNoneMatch(entityTag string) *LayersListCall {
  5309. c.ifNoneMatch_ = entityTag
  5310. return c
  5311. }
  5312. // Context sets the context to be used in this call's Do method. Any
  5313. // pending HTTP request will be aborted if the provided context is
  5314. // canceled.
  5315. func (c *LayersListCall) Context(ctx context.Context) *LayersListCall {
  5316. c.ctx_ = ctx
  5317. return c
  5318. }
  5319. // Header returns an http.Header that can be modified by the caller to
  5320. // add HTTP headers to the request.
  5321. func (c *LayersListCall) Header() http.Header {
  5322. if c.header_ == nil {
  5323. c.header_ = make(http.Header)
  5324. }
  5325. return c.header_
  5326. }
  5327. func (c *LayersListCall) doRequest(alt string) (*http.Response, error) {
  5328. reqHeaders := make(http.Header)
  5329. for k, v := range c.header_ {
  5330. reqHeaders[k] = v
  5331. }
  5332. reqHeaders.Set("User-Agent", c.s.userAgent())
  5333. if c.ifNoneMatch_ != "" {
  5334. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5335. }
  5336. var body io.Reader = nil
  5337. c.urlParams_.Set("alt", alt)
  5338. c.urlParams_.Set("prettyPrint", "false")
  5339. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layersummary")
  5340. urls += "?" + c.urlParams_.Encode()
  5341. req, err := http.NewRequest("GET", urls, body)
  5342. if err != nil {
  5343. return nil, err
  5344. }
  5345. req.Header = reqHeaders
  5346. googleapi.Expand(req.URL, map[string]string{
  5347. "volumeId": c.volumeId,
  5348. })
  5349. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5350. }
  5351. // Do executes the "books.layers.list" call.
  5352. // Exactly one of *Layersummaries or error will be non-nil. Any non-2xx
  5353. // status code is an error. Response headers are in either
  5354. // *Layersummaries.ServerResponse.Header or (if a response was returned
  5355. // at all) in error.(*googleapi.Error).Header. Use
  5356. // googleapi.IsNotModified to check whether the returned error was
  5357. // because http.StatusNotModified was returned.
  5358. func (c *LayersListCall) Do(opts ...googleapi.CallOption) (*Layersummaries, error) {
  5359. gensupport.SetOptions(c.urlParams_, opts...)
  5360. res, err := c.doRequest("json")
  5361. if res != nil && res.StatusCode == http.StatusNotModified {
  5362. if res.Body != nil {
  5363. res.Body.Close()
  5364. }
  5365. return nil, &googleapi.Error{
  5366. Code: res.StatusCode,
  5367. Header: res.Header,
  5368. }
  5369. }
  5370. if err != nil {
  5371. return nil, err
  5372. }
  5373. defer googleapi.CloseBody(res)
  5374. if err := googleapi.CheckResponse(res); err != nil {
  5375. return nil, err
  5376. }
  5377. ret := &Layersummaries{
  5378. ServerResponse: googleapi.ServerResponse{
  5379. Header: res.Header,
  5380. HTTPStatusCode: res.StatusCode,
  5381. },
  5382. }
  5383. target := &ret
  5384. if err := gensupport.DecodeResponse(target, res); err != nil {
  5385. return nil, err
  5386. }
  5387. return ret, nil
  5388. // {
  5389. // "description": "List the layer summaries for a volume.",
  5390. // "httpMethod": "GET",
  5391. // "id": "books.layers.list",
  5392. // "parameterOrder": [
  5393. // "volumeId"
  5394. // ],
  5395. // "parameters": {
  5396. // "contentVersion": {
  5397. // "description": "The content version for the requested volume.",
  5398. // "location": "query",
  5399. // "type": "string"
  5400. // },
  5401. // "maxResults": {
  5402. // "description": "Maximum number of results to return",
  5403. // "format": "uint32",
  5404. // "location": "query",
  5405. // "maximum": "200",
  5406. // "minimum": "0",
  5407. // "type": "integer"
  5408. // },
  5409. // "pageToken": {
  5410. // "description": "The value of the nextToken from the previous page.",
  5411. // "location": "query",
  5412. // "type": "string"
  5413. // },
  5414. // "source": {
  5415. // "description": "String to identify the originator of this request.",
  5416. // "location": "query",
  5417. // "type": "string"
  5418. // },
  5419. // "volumeId": {
  5420. // "description": "The volume to retrieve layers for.",
  5421. // "location": "path",
  5422. // "required": true,
  5423. // "type": "string"
  5424. // }
  5425. // },
  5426. // "path": "volumes/{volumeId}/layersummary",
  5427. // "response": {
  5428. // "$ref": "Layersummaries"
  5429. // },
  5430. // "scopes": [
  5431. // "https://www.googleapis.com/auth/books"
  5432. // ]
  5433. // }
  5434. }
  5435. // method id "books.layers.annotationData.get":
  5436. type LayersAnnotationDataGetCall struct {
  5437. s *Service
  5438. volumeId string
  5439. layerId string
  5440. annotationDataId string
  5441. urlParams_ gensupport.URLParams
  5442. ifNoneMatch_ string
  5443. ctx_ context.Context
  5444. header_ http.Header
  5445. }
  5446. // Get: Gets the annotation data.
  5447. func (r *LayersAnnotationDataService) Get(volumeId string, layerId string, annotationDataId string, contentVersion string) *LayersAnnotationDataGetCall {
  5448. c := &LayersAnnotationDataGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5449. c.volumeId = volumeId
  5450. c.layerId = layerId
  5451. c.annotationDataId = annotationDataId
  5452. c.urlParams_.Set("contentVersion", contentVersion)
  5453. return c
  5454. }
  5455. // AllowWebDefinitions sets the optional parameter
  5456. // "allowWebDefinitions": For the dictionary layer. Whether or not to
  5457. // allow web definitions.
  5458. func (c *LayersAnnotationDataGetCall) AllowWebDefinitions(allowWebDefinitions bool) *LayersAnnotationDataGetCall {
  5459. c.urlParams_.Set("allowWebDefinitions", fmt.Sprint(allowWebDefinitions))
  5460. return c
  5461. }
  5462. // H sets the optional parameter "h": The requested pixel height for any
  5463. // images. If height is provided width must also be provided.
  5464. func (c *LayersAnnotationDataGetCall) H(h int64) *LayersAnnotationDataGetCall {
  5465. c.urlParams_.Set("h", fmt.Sprint(h))
  5466. return c
  5467. }
  5468. // Locale sets the optional parameter "locale": The locale information
  5469. // for the data. ISO-639-1 language and ISO-3166-1 country code. Ex:
  5470. // 'en_US'.
  5471. func (c *LayersAnnotationDataGetCall) Locale(locale string) *LayersAnnotationDataGetCall {
  5472. c.urlParams_.Set("locale", locale)
  5473. return c
  5474. }
  5475. // Scale sets the optional parameter "scale": The requested scale for
  5476. // the image.
  5477. func (c *LayersAnnotationDataGetCall) Scale(scale int64) *LayersAnnotationDataGetCall {
  5478. c.urlParams_.Set("scale", fmt.Sprint(scale))
  5479. return c
  5480. }
  5481. // Source sets the optional parameter "source": String to identify the
  5482. // originator of this request.
  5483. func (c *LayersAnnotationDataGetCall) Source(source string) *LayersAnnotationDataGetCall {
  5484. c.urlParams_.Set("source", source)
  5485. return c
  5486. }
  5487. // W sets the optional parameter "w": The requested pixel width for any
  5488. // images. If width is provided height must also be provided.
  5489. func (c *LayersAnnotationDataGetCall) W(w int64) *LayersAnnotationDataGetCall {
  5490. c.urlParams_.Set("w", fmt.Sprint(w))
  5491. return c
  5492. }
  5493. // Fields allows partial responses to be retrieved. See
  5494. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5495. // for more information.
  5496. func (c *LayersAnnotationDataGetCall) Fields(s ...googleapi.Field) *LayersAnnotationDataGetCall {
  5497. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5498. return c
  5499. }
  5500. // IfNoneMatch sets the optional parameter which makes the operation
  5501. // fail if the object's ETag matches the given value. This is useful for
  5502. // getting updates only after the object has changed since the last
  5503. // request. Use googleapi.IsNotModified to check whether the response
  5504. // error from Do is the result of In-None-Match.
  5505. func (c *LayersAnnotationDataGetCall) IfNoneMatch(entityTag string) *LayersAnnotationDataGetCall {
  5506. c.ifNoneMatch_ = entityTag
  5507. return c
  5508. }
  5509. // Context sets the context to be used in this call's Do method. Any
  5510. // pending HTTP request will be aborted if the provided context is
  5511. // canceled.
  5512. func (c *LayersAnnotationDataGetCall) Context(ctx context.Context) *LayersAnnotationDataGetCall {
  5513. c.ctx_ = ctx
  5514. return c
  5515. }
  5516. // Header returns an http.Header that can be modified by the caller to
  5517. // add HTTP headers to the request.
  5518. func (c *LayersAnnotationDataGetCall) Header() http.Header {
  5519. if c.header_ == nil {
  5520. c.header_ = make(http.Header)
  5521. }
  5522. return c.header_
  5523. }
  5524. func (c *LayersAnnotationDataGetCall) doRequest(alt string) (*http.Response, error) {
  5525. reqHeaders := make(http.Header)
  5526. for k, v := range c.header_ {
  5527. reqHeaders[k] = v
  5528. }
  5529. reqHeaders.Set("User-Agent", c.s.userAgent())
  5530. if c.ifNoneMatch_ != "" {
  5531. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5532. }
  5533. var body io.Reader = nil
  5534. c.urlParams_.Set("alt", alt)
  5535. c.urlParams_.Set("prettyPrint", "false")
  5536. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layers/{layerId}/data/{annotationDataId}")
  5537. urls += "?" + c.urlParams_.Encode()
  5538. req, err := http.NewRequest("GET", urls, body)
  5539. if err != nil {
  5540. return nil, err
  5541. }
  5542. req.Header = reqHeaders
  5543. googleapi.Expand(req.URL, map[string]string{
  5544. "volumeId": c.volumeId,
  5545. "layerId": c.layerId,
  5546. "annotationDataId": c.annotationDataId,
  5547. })
  5548. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5549. }
  5550. // Do executes the "books.layers.annotationData.get" call.
  5551. // Exactly one of *Annotationdata or error will be non-nil. Any non-2xx
  5552. // status code is an error. Response headers are in either
  5553. // *Annotationdata.ServerResponse.Header or (if a response was returned
  5554. // at all) in error.(*googleapi.Error).Header. Use
  5555. // googleapi.IsNotModified to check whether the returned error was
  5556. // because http.StatusNotModified was returned.
  5557. func (c *LayersAnnotationDataGetCall) Do(opts ...googleapi.CallOption) (*Annotationdata, error) {
  5558. gensupport.SetOptions(c.urlParams_, opts...)
  5559. res, err := c.doRequest("json")
  5560. if res != nil && res.StatusCode == http.StatusNotModified {
  5561. if res.Body != nil {
  5562. res.Body.Close()
  5563. }
  5564. return nil, &googleapi.Error{
  5565. Code: res.StatusCode,
  5566. Header: res.Header,
  5567. }
  5568. }
  5569. if err != nil {
  5570. return nil, err
  5571. }
  5572. defer googleapi.CloseBody(res)
  5573. if err := googleapi.CheckResponse(res); err != nil {
  5574. return nil, err
  5575. }
  5576. ret := &Annotationdata{
  5577. ServerResponse: googleapi.ServerResponse{
  5578. Header: res.Header,
  5579. HTTPStatusCode: res.StatusCode,
  5580. },
  5581. }
  5582. target := &ret
  5583. if err := gensupport.DecodeResponse(target, res); err != nil {
  5584. return nil, err
  5585. }
  5586. return ret, nil
  5587. // {
  5588. // "description": "Gets the annotation data.",
  5589. // "httpMethod": "GET",
  5590. // "id": "books.layers.annotationData.get",
  5591. // "parameterOrder": [
  5592. // "volumeId",
  5593. // "layerId",
  5594. // "annotationDataId",
  5595. // "contentVersion"
  5596. // ],
  5597. // "parameters": {
  5598. // "allowWebDefinitions": {
  5599. // "description": "For the dictionary layer. Whether or not to allow web definitions.",
  5600. // "location": "query",
  5601. // "type": "boolean"
  5602. // },
  5603. // "annotationDataId": {
  5604. // "description": "The ID of the annotation data to retrieve.",
  5605. // "location": "path",
  5606. // "required": true,
  5607. // "type": "string"
  5608. // },
  5609. // "contentVersion": {
  5610. // "description": "The content version for the volume you are trying to retrieve.",
  5611. // "location": "query",
  5612. // "required": true,
  5613. // "type": "string"
  5614. // },
  5615. // "h": {
  5616. // "description": "The requested pixel height for any images. If height is provided width must also be provided.",
  5617. // "format": "int32",
  5618. // "location": "query",
  5619. // "type": "integer"
  5620. // },
  5621. // "layerId": {
  5622. // "description": "The ID for the layer to get the annotations.",
  5623. // "location": "path",
  5624. // "required": true,
  5625. // "type": "string"
  5626. // },
  5627. // "locale": {
  5628. // "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.",
  5629. // "location": "query",
  5630. // "type": "string"
  5631. // },
  5632. // "scale": {
  5633. // "description": "The requested scale for the image.",
  5634. // "format": "int32",
  5635. // "location": "query",
  5636. // "minimum": "0",
  5637. // "type": "integer"
  5638. // },
  5639. // "source": {
  5640. // "description": "String to identify the originator of this request.",
  5641. // "location": "query",
  5642. // "type": "string"
  5643. // },
  5644. // "volumeId": {
  5645. // "description": "The volume to retrieve annotations for.",
  5646. // "location": "path",
  5647. // "required": true,
  5648. // "type": "string"
  5649. // },
  5650. // "w": {
  5651. // "description": "The requested pixel width for any images. If width is provided height must also be provided.",
  5652. // "format": "int32",
  5653. // "location": "query",
  5654. // "type": "integer"
  5655. // }
  5656. // },
  5657. // "path": "volumes/{volumeId}/layers/{layerId}/data/{annotationDataId}",
  5658. // "response": {
  5659. // "$ref": "Annotationdata"
  5660. // },
  5661. // "scopes": [
  5662. // "https://www.googleapis.com/auth/books"
  5663. // ]
  5664. // }
  5665. }
  5666. // method id "books.layers.annotationData.list":
  5667. type LayersAnnotationDataListCall struct {
  5668. s *Service
  5669. volumeId string
  5670. layerId string
  5671. urlParams_ gensupport.URLParams
  5672. ifNoneMatch_ string
  5673. ctx_ context.Context
  5674. header_ http.Header
  5675. }
  5676. // List: Gets the annotation data for a volume and layer.
  5677. func (r *LayersAnnotationDataService) List(volumeId string, layerId string, contentVersion string) *LayersAnnotationDataListCall {
  5678. c := &LayersAnnotationDataListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5679. c.volumeId = volumeId
  5680. c.layerId = layerId
  5681. c.urlParams_.Set("contentVersion", contentVersion)
  5682. return c
  5683. }
  5684. // AnnotationDataId sets the optional parameter "annotationDataId": The
  5685. // list of Annotation Data Ids to retrieve. Pagination is ignored if
  5686. // this is set.
  5687. func (c *LayersAnnotationDataListCall) AnnotationDataId(annotationDataId ...string) *LayersAnnotationDataListCall {
  5688. c.urlParams_.SetMulti("annotationDataId", append([]string{}, annotationDataId...))
  5689. return c
  5690. }
  5691. // H sets the optional parameter "h": The requested pixel height for any
  5692. // images. If height is provided width must also be provided.
  5693. func (c *LayersAnnotationDataListCall) H(h int64) *LayersAnnotationDataListCall {
  5694. c.urlParams_.Set("h", fmt.Sprint(h))
  5695. return c
  5696. }
  5697. // Locale sets the optional parameter "locale": The locale information
  5698. // for the data. ISO-639-1 language and ISO-3166-1 country code. Ex:
  5699. // 'en_US'.
  5700. func (c *LayersAnnotationDataListCall) Locale(locale string) *LayersAnnotationDataListCall {
  5701. c.urlParams_.Set("locale", locale)
  5702. return c
  5703. }
  5704. // MaxResults sets the optional parameter "maxResults": Maximum number
  5705. // of results to return
  5706. func (c *LayersAnnotationDataListCall) MaxResults(maxResults int64) *LayersAnnotationDataListCall {
  5707. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5708. return c
  5709. }
  5710. // PageToken sets the optional parameter "pageToken": The value of the
  5711. // nextToken from the previous page.
  5712. func (c *LayersAnnotationDataListCall) PageToken(pageToken string) *LayersAnnotationDataListCall {
  5713. c.urlParams_.Set("pageToken", pageToken)
  5714. return c
  5715. }
  5716. // Scale sets the optional parameter "scale": The requested scale for
  5717. // the image.
  5718. func (c *LayersAnnotationDataListCall) Scale(scale int64) *LayersAnnotationDataListCall {
  5719. c.urlParams_.Set("scale", fmt.Sprint(scale))
  5720. return c
  5721. }
  5722. // Source sets the optional parameter "source": String to identify the
  5723. // originator of this request.
  5724. func (c *LayersAnnotationDataListCall) Source(source string) *LayersAnnotationDataListCall {
  5725. c.urlParams_.Set("source", source)
  5726. return c
  5727. }
  5728. // UpdatedMax sets the optional parameter "updatedMax": RFC 3339
  5729. // timestamp to restrict to items updated prior to this timestamp
  5730. // (exclusive).
  5731. func (c *LayersAnnotationDataListCall) UpdatedMax(updatedMax string) *LayersAnnotationDataListCall {
  5732. c.urlParams_.Set("updatedMax", updatedMax)
  5733. return c
  5734. }
  5735. // UpdatedMin sets the optional parameter "updatedMin": RFC 3339
  5736. // timestamp to restrict to items updated since this timestamp
  5737. // (inclusive).
  5738. func (c *LayersAnnotationDataListCall) UpdatedMin(updatedMin string) *LayersAnnotationDataListCall {
  5739. c.urlParams_.Set("updatedMin", updatedMin)
  5740. return c
  5741. }
  5742. // W sets the optional parameter "w": The requested pixel width for any
  5743. // images. If width is provided height must also be provided.
  5744. func (c *LayersAnnotationDataListCall) W(w int64) *LayersAnnotationDataListCall {
  5745. c.urlParams_.Set("w", fmt.Sprint(w))
  5746. return c
  5747. }
  5748. // Fields allows partial responses to be retrieved. See
  5749. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5750. // for more information.
  5751. func (c *LayersAnnotationDataListCall) Fields(s ...googleapi.Field) *LayersAnnotationDataListCall {
  5752. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5753. return c
  5754. }
  5755. // IfNoneMatch sets the optional parameter which makes the operation
  5756. // fail if the object's ETag matches the given value. This is useful for
  5757. // getting updates only after the object has changed since the last
  5758. // request. Use googleapi.IsNotModified to check whether the response
  5759. // error from Do is the result of In-None-Match.
  5760. func (c *LayersAnnotationDataListCall) IfNoneMatch(entityTag string) *LayersAnnotationDataListCall {
  5761. c.ifNoneMatch_ = entityTag
  5762. return c
  5763. }
  5764. // Context sets the context to be used in this call's Do method. Any
  5765. // pending HTTP request will be aborted if the provided context is
  5766. // canceled.
  5767. func (c *LayersAnnotationDataListCall) Context(ctx context.Context) *LayersAnnotationDataListCall {
  5768. c.ctx_ = ctx
  5769. return c
  5770. }
  5771. // Header returns an http.Header that can be modified by the caller to
  5772. // add HTTP headers to the request.
  5773. func (c *LayersAnnotationDataListCall) Header() http.Header {
  5774. if c.header_ == nil {
  5775. c.header_ = make(http.Header)
  5776. }
  5777. return c.header_
  5778. }
  5779. func (c *LayersAnnotationDataListCall) doRequest(alt string) (*http.Response, error) {
  5780. reqHeaders := make(http.Header)
  5781. for k, v := range c.header_ {
  5782. reqHeaders[k] = v
  5783. }
  5784. reqHeaders.Set("User-Agent", c.s.userAgent())
  5785. if c.ifNoneMatch_ != "" {
  5786. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5787. }
  5788. var body io.Reader = nil
  5789. c.urlParams_.Set("alt", alt)
  5790. c.urlParams_.Set("prettyPrint", "false")
  5791. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layers/{layerId}/data")
  5792. urls += "?" + c.urlParams_.Encode()
  5793. req, err := http.NewRequest("GET", urls, body)
  5794. if err != nil {
  5795. return nil, err
  5796. }
  5797. req.Header = reqHeaders
  5798. googleapi.Expand(req.URL, map[string]string{
  5799. "volumeId": c.volumeId,
  5800. "layerId": c.layerId,
  5801. })
  5802. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5803. }
  5804. // Do executes the "books.layers.annotationData.list" call.
  5805. // Exactly one of *Annotationsdata or error will be non-nil. Any non-2xx
  5806. // status code is an error. Response headers are in either
  5807. // *Annotationsdata.ServerResponse.Header or (if a response was returned
  5808. // at all) in error.(*googleapi.Error).Header. Use
  5809. // googleapi.IsNotModified to check whether the returned error was
  5810. // because http.StatusNotModified was returned.
  5811. func (c *LayersAnnotationDataListCall) Do(opts ...googleapi.CallOption) (*Annotationsdata, error) {
  5812. gensupport.SetOptions(c.urlParams_, opts...)
  5813. res, err := c.doRequest("json")
  5814. if res != nil && res.StatusCode == http.StatusNotModified {
  5815. if res.Body != nil {
  5816. res.Body.Close()
  5817. }
  5818. return nil, &googleapi.Error{
  5819. Code: res.StatusCode,
  5820. Header: res.Header,
  5821. }
  5822. }
  5823. if err != nil {
  5824. return nil, err
  5825. }
  5826. defer googleapi.CloseBody(res)
  5827. if err := googleapi.CheckResponse(res); err != nil {
  5828. return nil, err
  5829. }
  5830. ret := &Annotationsdata{
  5831. ServerResponse: googleapi.ServerResponse{
  5832. Header: res.Header,
  5833. HTTPStatusCode: res.StatusCode,
  5834. },
  5835. }
  5836. target := &ret
  5837. if err := gensupport.DecodeResponse(target, res); err != nil {
  5838. return nil, err
  5839. }
  5840. return ret, nil
  5841. // {
  5842. // "description": "Gets the annotation data for a volume and layer.",
  5843. // "httpMethod": "GET",
  5844. // "id": "books.layers.annotationData.list",
  5845. // "parameterOrder": [
  5846. // "volumeId",
  5847. // "layerId",
  5848. // "contentVersion"
  5849. // ],
  5850. // "parameters": {
  5851. // "annotationDataId": {
  5852. // "description": "The list of Annotation Data Ids to retrieve. Pagination is ignored if this is set.",
  5853. // "location": "query",
  5854. // "repeated": true,
  5855. // "type": "string"
  5856. // },
  5857. // "contentVersion": {
  5858. // "description": "The content version for the requested volume.",
  5859. // "location": "query",
  5860. // "required": true,
  5861. // "type": "string"
  5862. // },
  5863. // "h": {
  5864. // "description": "The requested pixel height for any images. If height is provided width must also be provided.",
  5865. // "format": "int32",
  5866. // "location": "query",
  5867. // "type": "integer"
  5868. // },
  5869. // "layerId": {
  5870. // "description": "The ID for the layer to get the annotation data.",
  5871. // "location": "path",
  5872. // "required": true,
  5873. // "type": "string"
  5874. // },
  5875. // "locale": {
  5876. // "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.",
  5877. // "location": "query",
  5878. // "type": "string"
  5879. // },
  5880. // "maxResults": {
  5881. // "description": "Maximum number of results to return",
  5882. // "format": "uint32",
  5883. // "location": "query",
  5884. // "maximum": "200",
  5885. // "minimum": "0",
  5886. // "type": "integer"
  5887. // },
  5888. // "pageToken": {
  5889. // "description": "The value of the nextToken from the previous page.",
  5890. // "location": "query",
  5891. // "type": "string"
  5892. // },
  5893. // "scale": {
  5894. // "description": "The requested scale for the image.",
  5895. // "format": "int32",
  5896. // "location": "query",
  5897. // "minimum": "0",
  5898. // "type": "integer"
  5899. // },
  5900. // "source": {
  5901. // "description": "String to identify the originator of this request.",
  5902. // "location": "query",
  5903. // "type": "string"
  5904. // },
  5905. // "updatedMax": {
  5906. // "description": "RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).",
  5907. // "location": "query",
  5908. // "type": "string"
  5909. // },
  5910. // "updatedMin": {
  5911. // "description": "RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).",
  5912. // "location": "query",
  5913. // "type": "string"
  5914. // },
  5915. // "volumeId": {
  5916. // "description": "The volume to retrieve annotation data for.",
  5917. // "location": "path",
  5918. // "required": true,
  5919. // "type": "string"
  5920. // },
  5921. // "w": {
  5922. // "description": "The requested pixel width for any images. If width is provided height must also be provided.",
  5923. // "format": "int32",
  5924. // "location": "query",
  5925. // "type": "integer"
  5926. // }
  5927. // },
  5928. // "path": "volumes/{volumeId}/layers/{layerId}/data",
  5929. // "response": {
  5930. // "$ref": "Annotationsdata"
  5931. // },
  5932. // "scopes": [
  5933. // "https://www.googleapis.com/auth/books"
  5934. // ]
  5935. // }
  5936. }
  5937. // Pages invokes f for each page of results.
  5938. // A non-nil error returned from f will halt the iteration.
  5939. // The provided context supersedes any context provided to the Context method.
  5940. func (c *LayersAnnotationDataListCall) Pages(ctx context.Context, f func(*Annotationsdata) error) error {
  5941. c.ctx_ = ctx
  5942. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5943. for {
  5944. x, err := c.Do()
  5945. if err != nil {
  5946. return err
  5947. }
  5948. if err := f(x); err != nil {
  5949. return err
  5950. }
  5951. if x.NextPageToken == "" {
  5952. return nil
  5953. }
  5954. c.PageToken(x.NextPageToken)
  5955. }
  5956. }
  5957. // method id "books.layers.volumeAnnotations.get":
  5958. type LayersVolumeAnnotationsGetCall struct {
  5959. s *Service
  5960. volumeId string
  5961. layerId string
  5962. annotationId string
  5963. urlParams_ gensupport.URLParams
  5964. ifNoneMatch_ string
  5965. ctx_ context.Context
  5966. header_ http.Header
  5967. }
  5968. // Get: Gets the volume annotation.
  5969. func (r *LayersVolumeAnnotationsService) Get(volumeId string, layerId string, annotationId string) *LayersVolumeAnnotationsGetCall {
  5970. c := &LayersVolumeAnnotationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5971. c.volumeId = volumeId
  5972. c.layerId = layerId
  5973. c.annotationId = annotationId
  5974. return c
  5975. }
  5976. // Locale sets the optional parameter "locale": The locale information
  5977. // for the data. ISO-639-1 language and ISO-3166-1 country code. Ex:
  5978. // 'en_US'.
  5979. func (c *LayersVolumeAnnotationsGetCall) Locale(locale string) *LayersVolumeAnnotationsGetCall {
  5980. c.urlParams_.Set("locale", locale)
  5981. return c
  5982. }
  5983. // Source sets the optional parameter "source": String to identify the
  5984. // originator of this request.
  5985. func (c *LayersVolumeAnnotationsGetCall) Source(source string) *LayersVolumeAnnotationsGetCall {
  5986. c.urlParams_.Set("source", source)
  5987. return c
  5988. }
  5989. // Fields allows partial responses to be retrieved. See
  5990. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5991. // for more information.
  5992. func (c *LayersVolumeAnnotationsGetCall) Fields(s ...googleapi.Field) *LayersVolumeAnnotationsGetCall {
  5993. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5994. return c
  5995. }
  5996. // IfNoneMatch sets the optional parameter which makes the operation
  5997. // fail if the object's ETag matches the given value. This is useful for
  5998. // getting updates only after the object has changed since the last
  5999. // request. Use googleapi.IsNotModified to check whether the response
  6000. // error from Do is the result of In-None-Match.
  6001. func (c *LayersVolumeAnnotationsGetCall) IfNoneMatch(entityTag string) *LayersVolumeAnnotationsGetCall {
  6002. c.ifNoneMatch_ = entityTag
  6003. return c
  6004. }
  6005. // Context sets the context to be used in this call's Do method. Any
  6006. // pending HTTP request will be aborted if the provided context is
  6007. // canceled.
  6008. func (c *LayersVolumeAnnotationsGetCall) Context(ctx context.Context) *LayersVolumeAnnotationsGetCall {
  6009. c.ctx_ = ctx
  6010. return c
  6011. }
  6012. // Header returns an http.Header that can be modified by the caller to
  6013. // add HTTP headers to the request.
  6014. func (c *LayersVolumeAnnotationsGetCall) Header() http.Header {
  6015. if c.header_ == nil {
  6016. c.header_ = make(http.Header)
  6017. }
  6018. return c.header_
  6019. }
  6020. func (c *LayersVolumeAnnotationsGetCall) doRequest(alt string) (*http.Response, error) {
  6021. reqHeaders := make(http.Header)
  6022. for k, v := range c.header_ {
  6023. reqHeaders[k] = v
  6024. }
  6025. reqHeaders.Set("User-Agent", c.s.userAgent())
  6026. if c.ifNoneMatch_ != "" {
  6027. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6028. }
  6029. var body io.Reader = nil
  6030. c.urlParams_.Set("alt", alt)
  6031. c.urlParams_.Set("prettyPrint", "false")
  6032. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layers/{layerId}/annotations/{annotationId}")
  6033. urls += "?" + c.urlParams_.Encode()
  6034. req, err := http.NewRequest("GET", urls, body)
  6035. if err != nil {
  6036. return nil, err
  6037. }
  6038. req.Header = reqHeaders
  6039. googleapi.Expand(req.URL, map[string]string{
  6040. "volumeId": c.volumeId,
  6041. "layerId": c.layerId,
  6042. "annotationId": c.annotationId,
  6043. })
  6044. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6045. }
  6046. // Do executes the "books.layers.volumeAnnotations.get" call.
  6047. // Exactly one of *Volumeannotation or error will be non-nil. Any
  6048. // non-2xx status code is an error. Response headers are in either
  6049. // *Volumeannotation.ServerResponse.Header or (if a response was
  6050. // returned at all) in error.(*googleapi.Error).Header. Use
  6051. // googleapi.IsNotModified to check whether the returned error was
  6052. // because http.StatusNotModified was returned.
  6053. func (c *LayersVolumeAnnotationsGetCall) Do(opts ...googleapi.CallOption) (*Volumeannotation, error) {
  6054. gensupport.SetOptions(c.urlParams_, opts...)
  6055. res, err := c.doRequest("json")
  6056. if res != nil && res.StatusCode == http.StatusNotModified {
  6057. if res.Body != nil {
  6058. res.Body.Close()
  6059. }
  6060. return nil, &googleapi.Error{
  6061. Code: res.StatusCode,
  6062. Header: res.Header,
  6063. }
  6064. }
  6065. if err != nil {
  6066. return nil, err
  6067. }
  6068. defer googleapi.CloseBody(res)
  6069. if err := googleapi.CheckResponse(res); err != nil {
  6070. return nil, err
  6071. }
  6072. ret := &Volumeannotation{
  6073. ServerResponse: googleapi.ServerResponse{
  6074. Header: res.Header,
  6075. HTTPStatusCode: res.StatusCode,
  6076. },
  6077. }
  6078. target := &ret
  6079. if err := gensupport.DecodeResponse(target, res); err != nil {
  6080. return nil, err
  6081. }
  6082. return ret, nil
  6083. // {
  6084. // "description": "Gets the volume annotation.",
  6085. // "httpMethod": "GET",
  6086. // "id": "books.layers.volumeAnnotations.get",
  6087. // "parameterOrder": [
  6088. // "volumeId",
  6089. // "layerId",
  6090. // "annotationId"
  6091. // ],
  6092. // "parameters": {
  6093. // "annotationId": {
  6094. // "description": "The ID of the volume annotation to retrieve.",
  6095. // "location": "path",
  6096. // "required": true,
  6097. // "type": "string"
  6098. // },
  6099. // "layerId": {
  6100. // "description": "The ID for the layer to get the annotations.",
  6101. // "location": "path",
  6102. // "required": true,
  6103. // "type": "string"
  6104. // },
  6105. // "locale": {
  6106. // "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.",
  6107. // "location": "query",
  6108. // "type": "string"
  6109. // },
  6110. // "source": {
  6111. // "description": "String to identify the originator of this request.",
  6112. // "location": "query",
  6113. // "type": "string"
  6114. // },
  6115. // "volumeId": {
  6116. // "description": "The volume to retrieve annotations for.",
  6117. // "location": "path",
  6118. // "required": true,
  6119. // "type": "string"
  6120. // }
  6121. // },
  6122. // "path": "volumes/{volumeId}/layers/{layerId}/annotations/{annotationId}",
  6123. // "response": {
  6124. // "$ref": "Volumeannotation"
  6125. // },
  6126. // "scopes": [
  6127. // "https://www.googleapis.com/auth/books"
  6128. // ]
  6129. // }
  6130. }
  6131. // method id "books.layers.volumeAnnotations.list":
  6132. type LayersVolumeAnnotationsListCall struct {
  6133. s *Service
  6134. volumeId string
  6135. layerId string
  6136. urlParams_ gensupport.URLParams
  6137. ifNoneMatch_ string
  6138. ctx_ context.Context
  6139. header_ http.Header
  6140. }
  6141. // List: Gets the volume annotations for a volume and layer.
  6142. func (r *LayersVolumeAnnotationsService) List(volumeId string, layerId string, contentVersion string) *LayersVolumeAnnotationsListCall {
  6143. c := &LayersVolumeAnnotationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6144. c.volumeId = volumeId
  6145. c.layerId = layerId
  6146. c.urlParams_.Set("contentVersion", contentVersion)
  6147. return c
  6148. }
  6149. // EndOffset sets the optional parameter "endOffset": The end offset to
  6150. // end retrieving data from.
  6151. func (c *LayersVolumeAnnotationsListCall) EndOffset(endOffset string) *LayersVolumeAnnotationsListCall {
  6152. c.urlParams_.Set("endOffset", endOffset)
  6153. return c
  6154. }
  6155. // EndPosition sets the optional parameter "endPosition": The end
  6156. // position to end retrieving data from.
  6157. func (c *LayersVolumeAnnotationsListCall) EndPosition(endPosition string) *LayersVolumeAnnotationsListCall {
  6158. c.urlParams_.Set("endPosition", endPosition)
  6159. return c
  6160. }
  6161. // Locale sets the optional parameter "locale": The locale information
  6162. // for the data. ISO-639-1 language and ISO-3166-1 country code. Ex:
  6163. // 'en_US'.
  6164. func (c *LayersVolumeAnnotationsListCall) Locale(locale string) *LayersVolumeAnnotationsListCall {
  6165. c.urlParams_.Set("locale", locale)
  6166. return c
  6167. }
  6168. // MaxResults sets the optional parameter "maxResults": Maximum number
  6169. // of results to return
  6170. func (c *LayersVolumeAnnotationsListCall) MaxResults(maxResults int64) *LayersVolumeAnnotationsListCall {
  6171. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  6172. return c
  6173. }
  6174. // PageToken sets the optional parameter "pageToken": The value of the
  6175. // nextToken from the previous page.
  6176. func (c *LayersVolumeAnnotationsListCall) PageToken(pageToken string) *LayersVolumeAnnotationsListCall {
  6177. c.urlParams_.Set("pageToken", pageToken)
  6178. return c
  6179. }
  6180. // ShowDeleted sets the optional parameter "showDeleted": Set to true to
  6181. // return deleted annotations. updatedMin must be in the request to use
  6182. // this. Defaults to false.
  6183. func (c *LayersVolumeAnnotationsListCall) ShowDeleted(showDeleted bool) *LayersVolumeAnnotationsListCall {
  6184. c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
  6185. return c
  6186. }
  6187. // Source sets the optional parameter "source": String to identify the
  6188. // originator of this request.
  6189. func (c *LayersVolumeAnnotationsListCall) Source(source string) *LayersVolumeAnnotationsListCall {
  6190. c.urlParams_.Set("source", source)
  6191. return c
  6192. }
  6193. // StartOffset sets the optional parameter "startOffset": The start
  6194. // offset to start retrieving data from.
  6195. func (c *LayersVolumeAnnotationsListCall) StartOffset(startOffset string) *LayersVolumeAnnotationsListCall {
  6196. c.urlParams_.Set("startOffset", startOffset)
  6197. return c
  6198. }
  6199. // StartPosition sets the optional parameter "startPosition": The start
  6200. // position to start retrieving data from.
  6201. func (c *LayersVolumeAnnotationsListCall) StartPosition(startPosition string) *LayersVolumeAnnotationsListCall {
  6202. c.urlParams_.Set("startPosition", startPosition)
  6203. return c
  6204. }
  6205. // UpdatedMax sets the optional parameter "updatedMax": RFC 3339
  6206. // timestamp to restrict to items updated prior to this timestamp
  6207. // (exclusive).
  6208. func (c *LayersVolumeAnnotationsListCall) UpdatedMax(updatedMax string) *LayersVolumeAnnotationsListCall {
  6209. c.urlParams_.Set("updatedMax", updatedMax)
  6210. return c
  6211. }
  6212. // UpdatedMin sets the optional parameter "updatedMin": RFC 3339
  6213. // timestamp to restrict to items updated since this timestamp
  6214. // (inclusive).
  6215. func (c *LayersVolumeAnnotationsListCall) UpdatedMin(updatedMin string) *LayersVolumeAnnotationsListCall {
  6216. c.urlParams_.Set("updatedMin", updatedMin)
  6217. return c
  6218. }
  6219. // VolumeAnnotationsVersion sets the optional parameter
  6220. // "volumeAnnotationsVersion": The version of the volume annotations
  6221. // that you are requesting.
  6222. func (c *LayersVolumeAnnotationsListCall) VolumeAnnotationsVersion(volumeAnnotationsVersion string) *LayersVolumeAnnotationsListCall {
  6223. c.urlParams_.Set("volumeAnnotationsVersion", volumeAnnotationsVersion)
  6224. return c
  6225. }
  6226. // Fields allows partial responses to be retrieved. See
  6227. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6228. // for more information.
  6229. func (c *LayersVolumeAnnotationsListCall) Fields(s ...googleapi.Field) *LayersVolumeAnnotationsListCall {
  6230. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6231. return c
  6232. }
  6233. // IfNoneMatch sets the optional parameter which makes the operation
  6234. // fail if the object's ETag matches the given value. This is useful for
  6235. // getting updates only after the object has changed since the last
  6236. // request. Use googleapi.IsNotModified to check whether the response
  6237. // error from Do is the result of In-None-Match.
  6238. func (c *LayersVolumeAnnotationsListCall) IfNoneMatch(entityTag string) *LayersVolumeAnnotationsListCall {
  6239. c.ifNoneMatch_ = entityTag
  6240. return c
  6241. }
  6242. // Context sets the context to be used in this call's Do method. Any
  6243. // pending HTTP request will be aborted if the provided context is
  6244. // canceled.
  6245. func (c *LayersVolumeAnnotationsListCall) Context(ctx context.Context) *LayersVolumeAnnotationsListCall {
  6246. c.ctx_ = ctx
  6247. return c
  6248. }
  6249. // Header returns an http.Header that can be modified by the caller to
  6250. // add HTTP headers to the request.
  6251. func (c *LayersVolumeAnnotationsListCall) Header() http.Header {
  6252. if c.header_ == nil {
  6253. c.header_ = make(http.Header)
  6254. }
  6255. return c.header_
  6256. }
  6257. func (c *LayersVolumeAnnotationsListCall) doRequest(alt string) (*http.Response, error) {
  6258. reqHeaders := make(http.Header)
  6259. for k, v := range c.header_ {
  6260. reqHeaders[k] = v
  6261. }
  6262. reqHeaders.Set("User-Agent", c.s.userAgent())
  6263. if c.ifNoneMatch_ != "" {
  6264. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6265. }
  6266. var body io.Reader = nil
  6267. c.urlParams_.Set("alt", alt)
  6268. c.urlParams_.Set("prettyPrint", "false")
  6269. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layers/{layerId}")
  6270. urls += "?" + c.urlParams_.Encode()
  6271. req, err := http.NewRequest("GET", urls, body)
  6272. if err != nil {
  6273. return nil, err
  6274. }
  6275. req.Header = reqHeaders
  6276. googleapi.Expand(req.URL, map[string]string{
  6277. "volumeId": c.volumeId,
  6278. "layerId": c.layerId,
  6279. })
  6280. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6281. }
  6282. // Do executes the "books.layers.volumeAnnotations.list" call.
  6283. // Exactly one of *Volumeannotations or error will be non-nil. Any
  6284. // non-2xx status code is an error. Response headers are in either
  6285. // *Volumeannotations.ServerResponse.Header or (if a response was
  6286. // returned at all) in error.(*googleapi.Error).Header. Use
  6287. // googleapi.IsNotModified to check whether the returned error was
  6288. // because http.StatusNotModified was returned.
  6289. func (c *LayersVolumeAnnotationsListCall) Do(opts ...googleapi.CallOption) (*Volumeannotations, error) {
  6290. gensupport.SetOptions(c.urlParams_, opts...)
  6291. res, err := c.doRequest("json")
  6292. if res != nil && res.StatusCode == http.StatusNotModified {
  6293. if res.Body != nil {
  6294. res.Body.Close()
  6295. }
  6296. return nil, &googleapi.Error{
  6297. Code: res.StatusCode,
  6298. Header: res.Header,
  6299. }
  6300. }
  6301. if err != nil {
  6302. return nil, err
  6303. }
  6304. defer googleapi.CloseBody(res)
  6305. if err := googleapi.CheckResponse(res); err != nil {
  6306. return nil, err
  6307. }
  6308. ret := &Volumeannotations{
  6309. ServerResponse: googleapi.ServerResponse{
  6310. Header: res.Header,
  6311. HTTPStatusCode: res.StatusCode,
  6312. },
  6313. }
  6314. target := &ret
  6315. if err := gensupport.DecodeResponse(target, res); err != nil {
  6316. return nil, err
  6317. }
  6318. return ret, nil
  6319. // {
  6320. // "description": "Gets the volume annotations for a volume and layer.",
  6321. // "httpMethod": "GET",
  6322. // "id": "books.layers.volumeAnnotations.list",
  6323. // "parameterOrder": [
  6324. // "volumeId",
  6325. // "layerId",
  6326. // "contentVersion"
  6327. // ],
  6328. // "parameters": {
  6329. // "contentVersion": {
  6330. // "description": "The content version for the requested volume.",
  6331. // "location": "query",
  6332. // "required": true,
  6333. // "type": "string"
  6334. // },
  6335. // "endOffset": {
  6336. // "description": "The end offset to end retrieving data from.",
  6337. // "location": "query",
  6338. // "type": "string"
  6339. // },
  6340. // "endPosition": {
  6341. // "description": "The end position to end retrieving data from.",
  6342. // "location": "query",
  6343. // "type": "string"
  6344. // },
  6345. // "layerId": {
  6346. // "description": "The ID for the layer to get the annotations.",
  6347. // "location": "path",
  6348. // "required": true,
  6349. // "type": "string"
  6350. // },
  6351. // "locale": {
  6352. // "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.",
  6353. // "location": "query",
  6354. // "type": "string"
  6355. // },
  6356. // "maxResults": {
  6357. // "description": "Maximum number of results to return",
  6358. // "format": "uint32",
  6359. // "location": "query",
  6360. // "maximum": "200",
  6361. // "minimum": "0",
  6362. // "type": "integer"
  6363. // },
  6364. // "pageToken": {
  6365. // "description": "The value of the nextToken from the previous page.",
  6366. // "location": "query",
  6367. // "type": "string"
  6368. // },
  6369. // "showDeleted": {
  6370. // "description": "Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false.",
  6371. // "location": "query",
  6372. // "type": "boolean"
  6373. // },
  6374. // "source": {
  6375. // "description": "String to identify the originator of this request.",
  6376. // "location": "query",
  6377. // "type": "string"
  6378. // },
  6379. // "startOffset": {
  6380. // "description": "The start offset to start retrieving data from.",
  6381. // "location": "query",
  6382. // "type": "string"
  6383. // },
  6384. // "startPosition": {
  6385. // "description": "The start position to start retrieving data from.",
  6386. // "location": "query",
  6387. // "type": "string"
  6388. // },
  6389. // "updatedMax": {
  6390. // "description": "RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).",
  6391. // "location": "query",
  6392. // "type": "string"
  6393. // },
  6394. // "updatedMin": {
  6395. // "description": "RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).",
  6396. // "location": "query",
  6397. // "type": "string"
  6398. // },
  6399. // "volumeAnnotationsVersion": {
  6400. // "description": "The version of the volume annotations that you are requesting.",
  6401. // "location": "query",
  6402. // "type": "string"
  6403. // },
  6404. // "volumeId": {
  6405. // "description": "The volume to retrieve annotations for.",
  6406. // "location": "path",
  6407. // "required": true,
  6408. // "type": "string"
  6409. // }
  6410. // },
  6411. // "path": "volumes/{volumeId}/layers/{layerId}",
  6412. // "response": {
  6413. // "$ref": "Volumeannotations"
  6414. // },
  6415. // "scopes": [
  6416. // "https://www.googleapis.com/auth/books"
  6417. // ]
  6418. // }
  6419. }
  6420. // Pages invokes f for each page of results.
  6421. // A non-nil error returned from f will halt the iteration.
  6422. // The provided context supersedes any context provided to the Context method.
  6423. func (c *LayersVolumeAnnotationsListCall) Pages(ctx context.Context, f func(*Volumeannotations) error) error {
  6424. c.ctx_ = ctx
  6425. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6426. for {
  6427. x, err := c.Do()
  6428. if err != nil {
  6429. return err
  6430. }
  6431. if err := f(x); err != nil {
  6432. return err
  6433. }
  6434. if x.NextPageToken == "" {
  6435. return nil
  6436. }
  6437. c.PageToken(x.NextPageToken)
  6438. }
  6439. }
  6440. // method id "books.myconfig.getUserSettings":
  6441. type MyconfigGetUserSettingsCall struct {
  6442. s *Service
  6443. urlParams_ gensupport.URLParams
  6444. ifNoneMatch_ string
  6445. ctx_ context.Context
  6446. header_ http.Header
  6447. }
  6448. // GetUserSettings: Gets the current settings for the user.
  6449. func (r *MyconfigService) GetUserSettings() *MyconfigGetUserSettingsCall {
  6450. c := &MyconfigGetUserSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6451. return c
  6452. }
  6453. // Fields allows partial responses to be retrieved. See
  6454. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6455. // for more information.
  6456. func (c *MyconfigGetUserSettingsCall) Fields(s ...googleapi.Field) *MyconfigGetUserSettingsCall {
  6457. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6458. return c
  6459. }
  6460. // IfNoneMatch sets the optional parameter which makes the operation
  6461. // fail if the object's ETag matches the given value. This is useful for
  6462. // getting updates only after the object has changed since the last
  6463. // request. Use googleapi.IsNotModified to check whether the response
  6464. // error from Do is the result of In-None-Match.
  6465. func (c *MyconfigGetUserSettingsCall) IfNoneMatch(entityTag string) *MyconfigGetUserSettingsCall {
  6466. c.ifNoneMatch_ = entityTag
  6467. return c
  6468. }
  6469. // Context sets the context to be used in this call's Do method. Any
  6470. // pending HTTP request will be aborted if the provided context is
  6471. // canceled.
  6472. func (c *MyconfigGetUserSettingsCall) Context(ctx context.Context) *MyconfigGetUserSettingsCall {
  6473. c.ctx_ = ctx
  6474. return c
  6475. }
  6476. // Header returns an http.Header that can be modified by the caller to
  6477. // add HTTP headers to the request.
  6478. func (c *MyconfigGetUserSettingsCall) Header() http.Header {
  6479. if c.header_ == nil {
  6480. c.header_ = make(http.Header)
  6481. }
  6482. return c.header_
  6483. }
  6484. func (c *MyconfigGetUserSettingsCall) doRequest(alt string) (*http.Response, error) {
  6485. reqHeaders := make(http.Header)
  6486. for k, v := range c.header_ {
  6487. reqHeaders[k] = v
  6488. }
  6489. reqHeaders.Set("User-Agent", c.s.userAgent())
  6490. if c.ifNoneMatch_ != "" {
  6491. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6492. }
  6493. var body io.Reader = nil
  6494. c.urlParams_.Set("alt", alt)
  6495. c.urlParams_.Set("prettyPrint", "false")
  6496. urls := googleapi.ResolveRelative(c.s.BasePath, "myconfig/getUserSettings")
  6497. urls += "?" + c.urlParams_.Encode()
  6498. req, err := http.NewRequest("GET", urls, body)
  6499. if err != nil {
  6500. return nil, err
  6501. }
  6502. req.Header = reqHeaders
  6503. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6504. }
  6505. // Do executes the "books.myconfig.getUserSettings" call.
  6506. // Exactly one of *Usersettings or error will be non-nil. Any non-2xx
  6507. // status code is an error. Response headers are in either
  6508. // *Usersettings.ServerResponse.Header or (if a response was returned at
  6509. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6510. // to check whether the returned error was because
  6511. // http.StatusNotModified was returned.
  6512. func (c *MyconfigGetUserSettingsCall) Do(opts ...googleapi.CallOption) (*Usersettings, error) {
  6513. gensupport.SetOptions(c.urlParams_, opts...)
  6514. res, err := c.doRequest("json")
  6515. if res != nil && res.StatusCode == http.StatusNotModified {
  6516. if res.Body != nil {
  6517. res.Body.Close()
  6518. }
  6519. return nil, &googleapi.Error{
  6520. Code: res.StatusCode,
  6521. Header: res.Header,
  6522. }
  6523. }
  6524. if err != nil {
  6525. return nil, err
  6526. }
  6527. defer googleapi.CloseBody(res)
  6528. if err := googleapi.CheckResponse(res); err != nil {
  6529. return nil, err
  6530. }
  6531. ret := &Usersettings{
  6532. ServerResponse: googleapi.ServerResponse{
  6533. Header: res.Header,
  6534. HTTPStatusCode: res.StatusCode,
  6535. },
  6536. }
  6537. target := &ret
  6538. if err := gensupport.DecodeResponse(target, res); err != nil {
  6539. return nil, err
  6540. }
  6541. return ret, nil
  6542. // {
  6543. // "description": "Gets the current settings for the user.",
  6544. // "httpMethod": "GET",
  6545. // "id": "books.myconfig.getUserSettings",
  6546. // "path": "myconfig/getUserSettings",
  6547. // "response": {
  6548. // "$ref": "Usersettings"
  6549. // },
  6550. // "scopes": [
  6551. // "https://www.googleapis.com/auth/books"
  6552. // ]
  6553. // }
  6554. }
  6555. // method id "books.myconfig.releaseDownloadAccess":
  6556. type MyconfigReleaseDownloadAccessCall struct {
  6557. s *Service
  6558. urlParams_ gensupport.URLParams
  6559. ctx_ context.Context
  6560. header_ http.Header
  6561. }
  6562. // ReleaseDownloadAccess: Release downloaded content access restriction.
  6563. func (r *MyconfigService) ReleaseDownloadAccess(volumeIds []string, cpksver string) *MyconfigReleaseDownloadAccessCall {
  6564. c := &MyconfigReleaseDownloadAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6565. c.urlParams_.SetMulti("volumeIds", append([]string{}, volumeIds...))
  6566. c.urlParams_.Set("cpksver", cpksver)
  6567. return c
  6568. }
  6569. // Locale sets the optional parameter "locale": ISO-639-1, ISO-3166-1
  6570. // codes for message localization, i.e. en_US.
  6571. func (c *MyconfigReleaseDownloadAccessCall) Locale(locale string) *MyconfigReleaseDownloadAccessCall {
  6572. c.urlParams_.Set("locale", locale)
  6573. return c
  6574. }
  6575. // Source sets the optional parameter "source": String to identify the
  6576. // originator of this request.
  6577. func (c *MyconfigReleaseDownloadAccessCall) Source(source string) *MyconfigReleaseDownloadAccessCall {
  6578. c.urlParams_.Set("source", source)
  6579. return c
  6580. }
  6581. // Fields allows partial responses to be retrieved. See
  6582. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6583. // for more information.
  6584. func (c *MyconfigReleaseDownloadAccessCall) Fields(s ...googleapi.Field) *MyconfigReleaseDownloadAccessCall {
  6585. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6586. return c
  6587. }
  6588. // Context sets the context to be used in this call's Do method. Any
  6589. // pending HTTP request will be aborted if the provided context is
  6590. // canceled.
  6591. func (c *MyconfigReleaseDownloadAccessCall) Context(ctx context.Context) *MyconfigReleaseDownloadAccessCall {
  6592. c.ctx_ = ctx
  6593. return c
  6594. }
  6595. // Header returns an http.Header that can be modified by the caller to
  6596. // add HTTP headers to the request.
  6597. func (c *MyconfigReleaseDownloadAccessCall) Header() http.Header {
  6598. if c.header_ == nil {
  6599. c.header_ = make(http.Header)
  6600. }
  6601. return c.header_
  6602. }
  6603. func (c *MyconfigReleaseDownloadAccessCall) doRequest(alt string) (*http.Response, error) {
  6604. reqHeaders := make(http.Header)
  6605. for k, v := range c.header_ {
  6606. reqHeaders[k] = v
  6607. }
  6608. reqHeaders.Set("User-Agent", c.s.userAgent())
  6609. var body io.Reader = nil
  6610. c.urlParams_.Set("alt", alt)
  6611. c.urlParams_.Set("prettyPrint", "false")
  6612. urls := googleapi.ResolveRelative(c.s.BasePath, "myconfig/releaseDownloadAccess")
  6613. urls += "?" + c.urlParams_.Encode()
  6614. req, err := http.NewRequest("POST", urls, body)
  6615. if err != nil {
  6616. return nil, err
  6617. }
  6618. req.Header = reqHeaders
  6619. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6620. }
  6621. // Do executes the "books.myconfig.releaseDownloadAccess" call.
  6622. // Exactly one of *DownloadAccesses or error will be non-nil. Any
  6623. // non-2xx status code is an error. Response headers are in either
  6624. // *DownloadAccesses.ServerResponse.Header or (if a response was
  6625. // returned at all) in error.(*googleapi.Error).Header. Use
  6626. // googleapi.IsNotModified to check whether the returned error was
  6627. // because http.StatusNotModified was returned.
  6628. func (c *MyconfigReleaseDownloadAccessCall) Do(opts ...googleapi.CallOption) (*DownloadAccesses, error) {
  6629. gensupport.SetOptions(c.urlParams_, opts...)
  6630. res, err := c.doRequest("json")
  6631. if res != nil && res.StatusCode == http.StatusNotModified {
  6632. if res.Body != nil {
  6633. res.Body.Close()
  6634. }
  6635. return nil, &googleapi.Error{
  6636. Code: res.StatusCode,
  6637. Header: res.Header,
  6638. }
  6639. }
  6640. if err != nil {
  6641. return nil, err
  6642. }
  6643. defer googleapi.CloseBody(res)
  6644. if err := googleapi.CheckResponse(res); err != nil {
  6645. return nil, err
  6646. }
  6647. ret := &DownloadAccesses{
  6648. ServerResponse: googleapi.ServerResponse{
  6649. Header: res.Header,
  6650. HTTPStatusCode: res.StatusCode,
  6651. },
  6652. }
  6653. target := &ret
  6654. if err := gensupport.DecodeResponse(target, res); err != nil {
  6655. return nil, err
  6656. }
  6657. return ret, nil
  6658. // {
  6659. // "description": "Release downloaded content access restriction.",
  6660. // "httpMethod": "POST",
  6661. // "id": "books.myconfig.releaseDownloadAccess",
  6662. // "parameterOrder": [
  6663. // "volumeIds",
  6664. // "cpksver"
  6665. // ],
  6666. // "parameters": {
  6667. // "cpksver": {
  6668. // "description": "The device/version ID from which to release the restriction.",
  6669. // "location": "query",
  6670. // "required": true,
  6671. // "type": "string"
  6672. // },
  6673. // "locale": {
  6674. // "description": "ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.",
  6675. // "location": "query",
  6676. // "type": "string"
  6677. // },
  6678. // "source": {
  6679. // "description": "String to identify the originator of this request.",
  6680. // "location": "query",
  6681. // "type": "string"
  6682. // },
  6683. // "volumeIds": {
  6684. // "description": "The volume(s) to release restrictions for.",
  6685. // "location": "query",
  6686. // "repeated": true,
  6687. // "required": true,
  6688. // "type": "string"
  6689. // }
  6690. // },
  6691. // "path": "myconfig/releaseDownloadAccess",
  6692. // "response": {
  6693. // "$ref": "DownloadAccesses"
  6694. // },
  6695. // "scopes": [
  6696. // "https://www.googleapis.com/auth/books"
  6697. // ]
  6698. // }
  6699. }
  6700. // method id "books.myconfig.requestAccess":
  6701. type MyconfigRequestAccessCall struct {
  6702. s *Service
  6703. urlParams_ gensupport.URLParams
  6704. ctx_ context.Context
  6705. header_ http.Header
  6706. }
  6707. // RequestAccess: Request concurrent and download access restrictions.
  6708. func (r *MyconfigService) RequestAccess(source string, volumeId string, nonce string, cpksver string) *MyconfigRequestAccessCall {
  6709. c := &MyconfigRequestAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6710. c.urlParams_.Set("source", source)
  6711. c.urlParams_.Set("volumeId", volumeId)
  6712. c.urlParams_.Set("nonce", nonce)
  6713. c.urlParams_.Set("cpksver", cpksver)
  6714. return c
  6715. }
  6716. // LicenseTypes sets the optional parameter "licenseTypes": The type of
  6717. // access license to request. If not specified, the default is BOTH.
  6718. //
  6719. // Possible values:
  6720. // "BOTH" - Both concurrent and download licenses.
  6721. // "CONCURRENT" - Concurrent access license.
  6722. // "DOWNLOAD" - Offline download access license.
  6723. func (c *MyconfigRequestAccessCall) LicenseTypes(licenseTypes string) *MyconfigRequestAccessCall {
  6724. c.urlParams_.Set("licenseTypes", licenseTypes)
  6725. return c
  6726. }
  6727. // Locale sets the optional parameter "locale": ISO-639-1, ISO-3166-1
  6728. // codes for message localization, i.e. en_US.
  6729. func (c *MyconfigRequestAccessCall) Locale(locale string) *MyconfigRequestAccessCall {
  6730. c.urlParams_.Set("locale", locale)
  6731. return c
  6732. }
  6733. // Fields allows partial responses to be retrieved. See
  6734. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6735. // for more information.
  6736. func (c *MyconfigRequestAccessCall) Fields(s ...googleapi.Field) *MyconfigRequestAccessCall {
  6737. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6738. return c
  6739. }
  6740. // Context sets the context to be used in this call's Do method. Any
  6741. // pending HTTP request will be aborted if the provided context is
  6742. // canceled.
  6743. func (c *MyconfigRequestAccessCall) Context(ctx context.Context) *MyconfigRequestAccessCall {
  6744. c.ctx_ = ctx
  6745. return c
  6746. }
  6747. // Header returns an http.Header that can be modified by the caller to
  6748. // add HTTP headers to the request.
  6749. func (c *MyconfigRequestAccessCall) Header() http.Header {
  6750. if c.header_ == nil {
  6751. c.header_ = make(http.Header)
  6752. }
  6753. return c.header_
  6754. }
  6755. func (c *MyconfigRequestAccessCall) doRequest(alt string) (*http.Response, error) {
  6756. reqHeaders := make(http.Header)
  6757. for k, v := range c.header_ {
  6758. reqHeaders[k] = v
  6759. }
  6760. reqHeaders.Set("User-Agent", c.s.userAgent())
  6761. var body io.Reader = nil
  6762. c.urlParams_.Set("alt", alt)
  6763. c.urlParams_.Set("prettyPrint", "false")
  6764. urls := googleapi.ResolveRelative(c.s.BasePath, "myconfig/requestAccess")
  6765. urls += "?" + c.urlParams_.Encode()
  6766. req, err := http.NewRequest("POST", urls, body)
  6767. if err != nil {
  6768. return nil, err
  6769. }
  6770. req.Header = reqHeaders
  6771. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6772. }
  6773. // Do executes the "books.myconfig.requestAccess" call.
  6774. // Exactly one of *RequestAccess or error will be non-nil. Any non-2xx
  6775. // status code is an error. Response headers are in either
  6776. // *RequestAccess.ServerResponse.Header or (if a response was returned
  6777. // at all) in error.(*googleapi.Error).Header. Use
  6778. // googleapi.IsNotModified to check whether the returned error was
  6779. // because http.StatusNotModified was returned.
  6780. func (c *MyconfigRequestAccessCall) Do(opts ...googleapi.CallOption) (*RequestAccess, error) {
  6781. gensupport.SetOptions(c.urlParams_, opts...)
  6782. res, err := c.doRequest("json")
  6783. if res != nil && res.StatusCode == http.StatusNotModified {
  6784. if res.Body != nil {
  6785. res.Body.Close()
  6786. }
  6787. return nil, &googleapi.Error{
  6788. Code: res.StatusCode,
  6789. Header: res.Header,
  6790. }
  6791. }
  6792. if err != nil {
  6793. return nil, err
  6794. }
  6795. defer googleapi.CloseBody(res)
  6796. if err := googleapi.CheckResponse(res); err != nil {
  6797. return nil, err
  6798. }
  6799. ret := &RequestAccess{
  6800. ServerResponse: googleapi.ServerResponse{
  6801. Header: res.Header,
  6802. HTTPStatusCode: res.StatusCode,
  6803. },
  6804. }
  6805. target := &ret
  6806. if err := gensupport.DecodeResponse(target, res); err != nil {
  6807. return nil, err
  6808. }
  6809. return ret, nil
  6810. // {
  6811. // "description": "Request concurrent and download access restrictions.",
  6812. // "httpMethod": "POST",
  6813. // "id": "books.myconfig.requestAccess",
  6814. // "parameterOrder": [
  6815. // "source",
  6816. // "volumeId",
  6817. // "nonce",
  6818. // "cpksver"
  6819. // ],
  6820. // "parameters": {
  6821. // "cpksver": {
  6822. // "description": "The device/version ID from which to request the restrictions.",
  6823. // "location": "query",
  6824. // "required": true,
  6825. // "type": "string"
  6826. // },
  6827. // "licenseTypes": {
  6828. // "description": "The type of access license to request. If not specified, the default is BOTH.",
  6829. // "enum": [
  6830. // "BOTH",
  6831. // "CONCURRENT",
  6832. // "DOWNLOAD"
  6833. // ],
  6834. // "enumDescriptions": [
  6835. // "Both concurrent and download licenses.",
  6836. // "Concurrent access license.",
  6837. // "Offline download access license."
  6838. // ],
  6839. // "location": "query",
  6840. // "type": "string"
  6841. // },
  6842. // "locale": {
  6843. // "description": "ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.",
  6844. // "location": "query",
  6845. // "type": "string"
  6846. // },
  6847. // "nonce": {
  6848. // "description": "The client nonce value.",
  6849. // "location": "query",
  6850. // "required": true,
  6851. // "type": "string"
  6852. // },
  6853. // "source": {
  6854. // "description": "String to identify the originator of this request.",
  6855. // "location": "query",
  6856. // "required": true,
  6857. // "type": "string"
  6858. // },
  6859. // "volumeId": {
  6860. // "description": "The volume to request concurrent/download restrictions for.",
  6861. // "location": "query",
  6862. // "required": true,
  6863. // "type": "string"
  6864. // }
  6865. // },
  6866. // "path": "myconfig/requestAccess",
  6867. // "response": {
  6868. // "$ref": "RequestAccess"
  6869. // },
  6870. // "scopes": [
  6871. // "https://www.googleapis.com/auth/books"
  6872. // ]
  6873. // }
  6874. }
  6875. // method id "books.myconfig.syncVolumeLicenses":
  6876. type MyconfigSyncVolumeLicensesCall struct {
  6877. s *Service
  6878. urlParams_ gensupport.URLParams
  6879. ctx_ context.Context
  6880. header_ http.Header
  6881. }
  6882. // SyncVolumeLicenses: Request downloaded content access for specified
  6883. // volumes on the My eBooks shelf.
  6884. func (r *MyconfigService) SyncVolumeLicenses(source string, nonce string, cpksver string) *MyconfigSyncVolumeLicensesCall {
  6885. c := &MyconfigSyncVolumeLicensesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6886. c.urlParams_.Set("source", source)
  6887. c.urlParams_.Set("nonce", nonce)
  6888. c.urlParams_.Set("cpksver", cpksver)
  6889. return c
  6890. }
  6891. // Features sets the optional parameter "features": List of features
  6892. // supported by the client, i.e., 'RENTALS'
  6893. //
  6894. // Possible values:
  6895. // "RENTALS" - Client supports rentals.
  6896. func (c *MyconfigSyncVolumeLicensesCall) Features(features ...string) *MyconfigSyncVolumeLicensesCall {
  6897. c.urlParams_.SetMulti("features", append([]string{}, features...))
  6898. return c
  6899. }
  6900. // IncludeNonComicsSeries sets the optional parameter
  6901. // "includeNonComicsSeries": Set to true to include non-comics series.
  6902. // Defaults to false.
  6903. func (c *MyconfigSyncVolumeLicensesCall) IncludeNonComicsSeries(includeNonComicsSeries bool) *MyconfigSyncVolumeLicensesCall {
  6904. c.urlParams_.Set("includeNonComicsSeries", fmt.Sprint(includeNonComicsSeries))
  6905. return c
  6906. }
  6907. // Locale sets the optional parameter "locale": ISO-639-1, ISO-3166-1
  6908. // codes for message localization, i.e. en_US.
  6909. func (c *MyconfigSyncVolumeLicensesCall) Locale(locale string) *MyconfigSyncVolumeLicensesCall {
  6910. c.urlParams_.Set("locale", locale)
  6911. return c
  6912. }
  6913. // ShowPreorders sets the optional parameter "showPreorders": Set to
  6914. // true to show pre-ordered books. Defaults to false.
  6915. func (c *MyconfigSyncVolumeLicensesCall) ShowPreorders(showPreorders bool) *MyconfigSyncVolumeLicensesCall {
  6916. c.urlParams_.Set("showPreorders", fmt.Sprint(showPreorders))
  6917. return c
  6918. }
  6919. // VolumeIds sets the optional parameter "volumeIds": The volume(s) to
  6920. // request download restrictions for.
  6921. func (c *MyconfigSyncVolumeLicensesCall) VolumeIds(volumeIds ...string) *MyconfigSyncVolumeLicensesCall {
  6922. c.urlParams_.SetMulti("volumeIds", append([]string{}, volumeIds...))
  6923. return c
  6924. }
  6925. // Fields allows partial responses to be retrieved. See
  6926. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6927. // for more information.
  6928. func (c *MyconfigSyncVolumeLicensesCall) Fields(s ...googleapi.Field) *MyconfigSyncVolumeLicensesCall {
  6929. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6930. return c
  6931. }
  6932. // Context sets the context to be used in this call's Do method. Any
  6933. // pending HTTP request will be aborted if the provided context is
  6934. // canceled.
  6935. func (c *MyconfigSyncVolumeLicensesCall) Context(ctx context.Context) *MyconfigSyncVolumeLicensesCall {
  6936. c.ctx_ = ctx
  6937. return c
  6938. }
  6939. // Header returns an http.Header that can be modified by the caller to
  6940. // add HTTP headers to the request.
  6941. func (c *MyconfigSyncVolumeLicensesCall) Header() http.Header {
  6942. if c.header_ == nil {
  6943. c.header_ = make(http.Header)
  6944. }
  6945. return c.header_
  6946. }
  6947. func (c *MyconfigSyncVolumeLicensesCall) doRequest(alt string) (*http.Response, error) {
  6948. reqHeaders := make(http.Header)
  6949. for k, v := range c.header_ {
  6950. reqHeaders[k] = v
  6951. }
  6952. reqHeaders.Set("User-Agent", c.s.userAgent())
  6953. var body io.Reader = nil
  6954. c.urlParams_.Set("alt", alt)
  6955. c.urlParams_.Set("prettyPrint", "false")
  6956. urls := googleapi.ResolveRelative(c.s.BasePath, "myconfig/syncVolumeLicenses")
  6957. urls += "?" + c.urlParams_.Encode()
  6958. req, err := http.NewRequest("POST", urls, body)
  6959. if err != nil {
  6960. return nil, err
  6961. }
  6962. req.Header = reqHeaders
  6963. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6964. }
  6965. // Do executes the "books.myconfig.syncVolumeLicenses" call.
  6966. // Exactly one of *Volumes or error will be non-nil. Any non-2xx status
  6967. // code is an error. Response headers are in either
  6968. // *Volumes.ServerResponse.Header or (if a response was returned at all)
  6969. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6970. // check whether the returned error was because http.StatusNotModified
  6971. // was returned.
  6972. func (c *MyconfigSyncVolumeLicensesCall) Do(opts ...googleapi.CallOption) (*Volumes, error) {
  6973. gensupport.SetOptions(c.urlParams_, opts...)
  6974. res, err := c.doRequest("json")
  6975. if res != nil && res.StatusCode == http.StatusNotModified {
  6976. if res.Body != nil {
  6977. res.Body.Close()
  6978. }
  6979. return nil, &googleapi.Error{
  6980. Code: res.StatusCode,
  6981. Header: res.Header,
  6982. }
  6983. }
  6984. if err != nil {
  6985. return nil, err
  6986. }
  6987. defer googleapi.CloseBody(res)
  6988. if err := googleapi.CheckResponse(res); err != nil {
  6989. return nil, err
  6990. }
  6991. ret := &Volumes{
  6992. ServerResponse: googleapi.ServerResponse{
  6993. Header: res.Header,
  6994. HTTPStatusCode: res.StatusCode,
  6995. },
  6996. }
  6997. target := &ret
  6998. if err := gensupport.DecodeResponse(target, res); err != nil {
  6999. return nil, err
  7000. }
  7001. return ret, nil
  7002. // {
  7003. // "description": "Request downloaded content access for specified volumes on the My eBooks shelf.",
  7004. // "httpMethod": "POST",
  7005. // "id": "books.myconfig.syncVolumeLicenses",
  7006. // "parameterOrder": [
  7007. // "source",
  7008. // "nonce",
  7009. // "cpksver"
  7010. // ],
  7011. // "parameters": {
  7012. // "cpksver": {
  7013. // "description": "The device/version ID from which to release the restriction.",
  7014. // "location": "query",
  7015. // "required": true,
  7016. // "type": "string"
  7017. // },
  7018. // "features": {
  7019. // "description": "List of features supported by the client, i.e., 'RENTALS'",
  7020. // "enum": [
  7021. // "RENTALS"
  7022. // ],
  7023. // "enumDescriptions": [
  7024. // "Client supports rentals."
  7025. // ],
  7026. // "location": "query",
  7027. // "repeated": true,
  7028. // "type": "string"
  7029. // },
  7030. // "includeNonComicsSeries": {
  7031. // "description": "Set to true to include non-comics series. Defaults to false.",
  7032. // "location": "query",
  7033. // "type": "boolean"
  7034. // },
  7035. // "locale": {
  7036. // "description": "ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.",
  7037. // "location": "query",
  7038. // "type": "string"
  7039. // },
  7040. // "nonce": {
  7041. // "description": "The client nonce value.",
  7042. // "location": "query",
  7043. // "required": true,
  7044. // "type": "string"
  7045. // },
  7046. // "showPreorders": {
  7047. // "description": "Set to true to show pre-ordered books. Defaults to false.",
  7048. // "location": "query",
  7049. // "type": "boolean"
  7050. // },
  7051. // "source": {
  7052. // "description": "String to identify the originator of this request.",
  7053. // "location": "query",
  7054. // "required": true,
  7055. // "type": "string"
  7056. // },
  7057. // "volumeIds": {
  7058. // "description": "The volume(s) to request download restrictions for.",
  7059. // "location": "query",
  7060. // "repeated": true,
  7061. // "type": "string"
  7062. // }
  7063. // },
  7064. // "path": "myconfig/syncVolumeLicenses",
  7065. // "response": {
  7066. // "$ref": "Volumes"
  7067. // },
  7068. // "scopes": [
  7069. // "https://www.googleapis.com/auth/books"
  7070. // ]
  7071. // }
  7072. }
  7073. // method id "books.myconfig.updateUserSettings":
  7074. type MyconfigUpdateUserSettingsCall struct {
  7075. s *Service
  7076. usersettings *Usersettings
  7077. urlParams_ gensupport.URLParams
  7078. ctx_ context.Context
  7079. header_ http.Header
  7080. }
  7081. // UpdateUserSettings: Sets the settings for the user. If a sub-object
  7082. // is specified, it will overwrite the existing sub-object stored in the
  7083. // server. Unspecified sub-objects will retain the existing value.
  7084. func (r *MyconfigService) UpdateUserSettings(usersettings *Usersettings) *MyconfigUpdateUserSettingsCall {
  7085. c := &MyconfigUpdateUserSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7086. c.usersettings = usersettings
  7087. return c
  7088. }
  7089. // Fields allows partial responses to be retrieved. See
  7090. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7091. // for more information.
  7092. func (c *MyconfigUpdateUserSettingsCall) Fields(s ...googleapi.Field) *MyconfigUpdateUserSettingsCall {
  7093. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7094. return c
  7095. }
  7096. // Context sets the context to be used in this call's Do method. Any
  7097. // pending HTTP request will be aborted if the provided context is
  7098. // canceled.
  7099. func (c *MyconfigUpdateUserSettingsCall) Context(ctx context.Context) *MyconfigUpdateUserSettingsCall {
  7100. c.ctx_ = ctx
  7101. return c
  7102. }
  7103. // Header returns an http.Header that can be modified by the caller to
  7104. // add HTTP headers to the request.
  7105. func (c *MyconfigUpdateUserSettingsCall) Header() http.Header {
  7106. if c.header_ == nil {
  7107. c.header_ = make(http.Header)
  7108. }
  7109. return c.header_
  7110. }
  7111. func (c *MyconfigUpdateUserSettingsCall) doRequest(alt string) (*http.Response, error) {
  7112. reqHeaders := make(http.Header)
  7113. for k, v := range c.header_ {
  7114. reqHeaders[k] = v
  7115. }
  7116. reqHeaders.Set("User-Agent", c.s.userAgent())
  7117. var body io.Reader = nil
  7118. body, err := googleapi.WithoutDataWrapper.JSONReader(c.usersettings)
  7119. if err != nil {
  7120. return nil, err
  7121. }
  7122. reqHeaders.Set("Content-Type", "application/json")
  7123. c.urlParams_.Set("alt", alt)
  7124. c.urlParams_.Set("prettyPrint", "false")
  7125. urls := googleapi.ResolveRelative(c.s.BasePath, "myconfig/updateUserSettings")
  7126. urls += "?" + c.urlParams_.Encode()
  7127. req, err := http.NewRequest("POST", urls, body)
  7128. if err != nil {
  7129. return nil, err
  7130. }
  7131. req.Header = reqHeaders
  7132. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7133. }
  7134. // Do executes the "books.myconfig.updateUserSettings" call.
  7135. // Exactly one of *Usersettings or error will be non-nil. Any non-2xx
  7136. // status code is an error. Response headers are in either
  7137. // *Usersettings.ServerResponse.Header or (if a response was returned at
  7138. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7139. // to check whether the returned error was because
  7140. // http.StatusNotModified was returned.
  7141. func (c *MyconfigUpdateUserSettingsCall) Do(opts ...googleapi.CallOption) (*Usersettings, error) {
  7142. gensupport.SetOptions(c.urlParams_, opts...)
  7143. res, err := c.doRequest("json")
  7144. if res != nil && res.StatusCode == http.StatusNotModified {
  7145. if res.Body != nil {
  7146. res.Body.Close()
  7147. }
  7148. return nil, &googleapi.Error{
  7149. Code: res.StatusCode,
  7150. Header: res.Header,
  7151. }
  7152. }
  7153. if err != nil {
  7154. return nil, err
  7155. }
  7156. defer googleapi.CloseBody(res)
  7157. if err := googleapi.CheckResponse(res); err != nil {
  7158. return nil, err
  7159. }
  7160. ret := &Usersettings{
  7161. ServerResponse: googleapi.ServerResponse{
  7162. Header: res.Header,
  7163. HTTPStatusCode: res.StatusCode,
  7164. },
  7165. }
  7166. target := &ret
  7167. if err := gensupport.DecodeResponse(target, res); err != nil {
  7168. return nil, err
  7169. }
  7170. return ret, nil
  7171. // {
  7172. // "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.",
  7173. // "httpMethod": "POST",
  7174. // "id": "books.myconfig.updateUserSettings",
  7175. // "path": "myconfig/updateUserSettings",
  7176. // "request": {
  7177. // "$ref": "Usersettings"
  7178. // },
  7179. // "response": {
  7180. // "$ref": "Usersettings"
  7181. // },
  7182. // "scopes": [
  7183. // "https://www.googleapis.com/auth/books"
  7184. // ]
  7185. // }
  7186. }
  7187. // method id "books.mylibrary.annotations.delete":
  7188. type MylibraryAnnotationsDeleteCall struct {
  7189. s *Service
  7190. annotationId string
  7191. urlParams_ gensupport.URLParams
  7192. ctx_ context.Context
  7193. header_ http.Header
  7194. }
  7195. // Delete: Deletes an annotation.
  7196. func (r *MylibraryAnnotationsService) Delete(annotationId string) *MylibraryAnnotationsDeleteCall {
  7197. c := &MylibraryAnnotationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7198. c.annotationId = annotationId
  7199. return c
  7200. }
  7201. // Source sets the optional parameter "source": String to identify the
  7202. // originator of this request.
  7203. func (c *MylibraryAnnotationsDeleteCall) Source(source string) *MylibraryAnnotationsDeleteCall {
  7204. c.urlParams_.Set("source", source)
  7205. return c
  7206. }
  7207. // Fields allows partial responses to be retrieved. See
  7208. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7209. // for more information.
  7210. func (c *MylibraryAnnotationsDeleteCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsDeleteCall {
  7211. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7212. return c
  7213. }
  7214. // Context sets the context to be used in this call's Do method. Any
  7215. // pending HTTP request will be aborted if the provided context is
  7216. // canceled.
  7217. func (c *MylibraryAnnotationsDeleteCall) Context(ctx context.Context) *MylibraryAnnotationsDeleteCall {
  7218. c.ctx_ = ctx
  7219. return c
  7220. }
  7221. // Header returns an http.Header that can be modified by the caller to
  7222. // add HTTP headers to the request.
  7223. func (c *MylibraryAnnotationsDeleteCall) Header() http.Header {
  7224. if c.header_ == nil {
  7225. c.header_ = make(http.Header)
  7226. }
  7227. return c.header_
  7228. }
  7229. func (c *MylibraryAnnotationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7230. reqHeaders := make(http.Header)
  7231. for k, v := range c.header_ {
  7232. reqHeaders[k] = v
  7233. }
  7234. reqHeaders.Set("User-Agent", c.s.userAgent())
  7235. var body io.Reader = nil
  7236. c.urlParams_.Set("alt", alt)
  7237. c.urlParams_.Set("prettyPrint", "false")
  7238. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations/{annotationId}")
  7239. urls += "?" + c.urlParams_.Encode()
  7240. req, err := http.NewRequest("DELETE", urls, body)
  7241. if err != nil {
  7242. return nil, err
  7243. }
  7244. req.Header = reqHeaders
  7245. googleapi.Expand(req.URL, map[string]string{
  7246. "annotationId": c.annotationId,
  7247. })
  7248. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7249. }
  7250. // Do executes the "books.mylibrary.annotations.delete" call.
  7251. func (c *MylibraryAnnotationsDeleteCall) Do(opts ...googleapi.CallOption) error {
  7252. gensupport.SetOptions(c.urlParams_, opts...)
  7253. res, err := c.doRequest("json")
  7254. if err != nil {
  7255. return err
  7256. }
  7257. defer googleapi.CloseBody(res)
  7258. if err := googleapi.CheckResponse(res); err != nil {
  7259. return err
  7260. }
  7261. return nil
  7262. // {
  7263. // "description": "Deletes an annotation.",
  7264. // "httpMethod": "DELETE",
  7265. // "id": "books.mylibrary.annotations.delete",
  7266. // "parameterOrder": [
  7267. // "annotationId"
  7268. // ],
  7269. // "parameters": {
  7270. // "annotationId": {
  7271. // "description": "The ID for the annotation to delete.",
  7272. // "location": "path",
  7273. // "required": true,
  7274. // "type": "string"
  7275. // },
  7276. // "source": {
  7277. // "description": "String to identify the originator of this request.",
  7278. // "location": "query",
  7279. // "type": "string"
  7280. // }
  7281. // },
  7282. // "path": "mylibrary/annotations/{annotationId}",
  7283. // "scopes": [
  7284. // "https://www.googleapis.com/auth/books"
  7285. // ]
  7286. // }
  7287. }
  7288. // method id "books.mylibrary.annotations.insert":
  7289. type MylibraryAnnotationsInsertCall struct {
  7290. s *Service
  7291. annotation *Annotation
  7292. urlParams_ gensupport.URLParams
  7293. ctx_ context.Context
  7294. header_ http.Header
  7295. }
  7296. // Insert: Inserts a new annotation.
  7297. func (r *MylibraryAnnotationsService) Insert(annotation *Annotation) *MylibraryAnnotationsInsertCall {
  7298. c := &MylibraryAnnotationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7299. c.annotation = annotation
  7300. return c
  7301. }
  7302. // AnnotationId sets the optional parameter "annotationId": The ID for
  7303. // the annotation to insert.
  7304. func (c *MylibraryAnnotationsInsertCall) AnnotationId(annotationId string) *MylibraryAnnotationsInsertCall {
  7305. c.urlParams_.Set("annotationId", annotationId)
  7306. return c
  7307. }
  7308. // Country sets the optional parameter "country": ISO-3166-1 code to
  7309. // override the IP-based location.
  7310. func (c *MylibraryAnnotationsInsertCall) Country(country string) *MylibraryAnnotationsInsertCall {
  7311. c.urlParams_.Set("country", country)
  7312. return c
  7313. }
  7314. // ShowOnlySummaryInResponse sets the optional parameter
  7315. // "showOnlySummaryInResponse": Requests that only the summary of the
  7316. // specified layer be provided in the response.
  7317. func (c *MylibraryAnnotationsInsertCall) ShowOnlySummaryInResponse(showOnlySummaryInResponse bool) *MylibraryAnnotationsInsertCall {
  7318. c.urlParams_.Set("showOnlySummaryInResponse", fmt.Sprint(showOnlySummaryInResponse))
  7319. return c
  7320. }
  7321. // Source sets the optional parameter "source": String to identify the
  7322. // originator of this request.
  7323. func (c *MylibraryAnnotationsInsertCall) Source(source string) *MylibraryAnnotationsInsertCall {
  7324. c.urlParams_.Set("source", source)
  7325. return c
  7326. }
  7327. // Fields allows partial responses to be retrieved. See
  7328. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7329. // for more information.
  7330. func (c *MylibraryAnnotationsInsertCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsInsertCall {
  7331. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7332. return c
  7333. }
  7334. // Context sets the context to be used in this call's Do method. Any
  7335. // pending HTTP request will be aborted if the provided context is
  7336. // canceled.
  7337. func (c *MylibraryAnnotationsInsertCall) Context(ctx context.Context) *MylibraryAnnotationsInsertCall {
  7338. c.ctx_ = ctx
  7339. return c
  7340. }
  7341. // Header returns an http.Header that can be modified by the caller to
  7342. // add HTTP headers to the request.
  7343. func (c *MylibraryAnnotationsInsertCall) Header() http.Header {
  7344. if c.header_ == nil {
  7345. c.header_ = make(http.Header)
  7346. }
  7347. return c.header_
  7348. }
  7349. func (c *MylibraryAnnotationsInsertCall) doRequest(alt string) (*http.Response, error) {
  7350. reqHeaders := make(http.Header)
  7351. for k, v := range c.header_ {
  7352. reqHeaders[k] = v
  7353. }
  7354. reqHeaders.Set("User-Agent", c.s.userAgent())
  7355. var body io.Reader = nil
  7356. body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
  7357. if err != nil {
  7358. return nil, err
  7359. }
  7360. reqHeaders.Set("Content-Type", "application/json")
  7361. c.urlParams_.Set("alt", alt)
  7362. c.urlParams_.Set("prettyPrint", "false")
  7363. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations")
  7364. urls += "?" + c.urlParams_.Encode()
  7365. req, err := http.NewRequest("POST", urls, body)
  7366. if err != nil {
  7367. return nil, err
  7368. }
  7369. req.Header = reqHeaders
  7370. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7371. }
  7372. // Do executes the "books.mylibrary.annotations.insert" call.
  7373. // Exactly one of *Annotation or error will be non-nil. Any non-2xx
  7374. // status code is an error. Response headers are in either
  7375. // *Annotation.ServerResponse.Header or (if a response was returned at
  7376. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7377. // to check whether the returned error was because
  7378. // http.StatusNotModified was returned.
  7379. func (c *MylibraryAnnotationsInsertCall) Do(opts ...googleapi.CallOption) (*Annotation, error) {
  7380. gensupport.SetOptions(c.urlParams_, opts...)
  7381. res, err := c.doRequest("json")
  7382. if res != nil && res.StatusCode == http.StatusNotModified {
  7383. if res.Body != nil {
  7384. res.Body.Close()
  7385. }
  7386. return nil, &googleapi.Error{
  7387. Code: res.StatusCode,
  7388. Header: res.Header,
  7389. }
  7390. }
  7391. if err != nil {
  7392. return nil, err
  7393. }
  7394. defer googleapi.CloseBody(res)
  7395. if err := googleapi.CheckResponse(res); err != nil {
  7396. return nil, err
  7397. }
  7398. ret := &Annotation{
  7399. ServerResponse: googleapi.ServerResponse{
  7400. Header: res.Header,
  7401. HTTPStatusCode: res.StatusCode,
  7402. },
  7403. }
  7404. target := &ret
  7405. if err := gensupport.DecodeResponse(target, res); err != nil {
  7406. return nil, err
  7407. }
  7408. return ret, nil
  7409. // {
  7410. // "description": "Inserts a new annotation.",
  7411. // "httpMethod": "POST",
  7412. // "id": "books.mylibrary.annotations.insert",
  7413. // "parameters": {
  7414. // "annotationId": {
  7415. // "description": "The ID for the annotation to insert.",
  7416. // "location": "query",
  7417. // "type": "string"
  7418. // },
  7419. // "country": {
  7420. // "description": "ISO-3166-1 code to override the IP-based location.",
  7421. // "location": "query",
  7422. // "type": "string"
  7423. // },
  7424. // "showOnlySummaryInResponse": {
  7425. // "description": "Requests that only the summary of the specified layer be provided in the response.",
  7426. // "location": "query",
  7427. // "type": "boolean"
  7428. // },
  7429. // "source": {
  7430. // "description": "String to identify the originator of this request.",
  7431. // "location": "query",
  7432. // "type": "string"
  7433. // }
  7434. // },
  7435. // "path": "mylibrary/annotations",
  7436. // "request": {
  7437. // "$ref": "Annotation"
  7438. // },
  7439. // "response": {
  7440. // "$ref": "Annotation"
  7441. // },
  7442. // "scopes": [
  7443. // "https://www.googleapis.com/auth/books"
  7444. // ]
  7445. // }
  7446. }
  7447. // method id "books.mylibrary.annotations.list":
  7448. type MylibraryAnnotationsListCall struct {
  7449. s *Service
  7450. urlParams_ gensupport.URLParams
  7451. ifNoneMatch_ string
  7452. ctx_ context.Context
  7453. header_ http.Header
  7454. }
  7455. // List: Retrieves a list of annotations, possibly filtered.
  7456. func (r *MylibraryAnnotationsService) List() *MylibraryAnnotationsListCall {
  7457. c := &MylibraryAnnotationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7458. return c
  7459. }
  7460. // ContentVersion sets the optional parameter "contentVersion": The
  7461. // content version for the requested volume.
  7462. func (c *MylibraryAnnotationsListCall) ContentVersion(contentVersion string) *MylibraryAnnotationsListCall {
  7463. c.urlParams_.Set("contentVersion", contentVersion)
  7464. return c
  7465. }
  7466. // LayerId sets the optional parameter "layerId": The layer ID to limit
  7467. // annotation by.
  7468. func (c *MylibraryAnnotationsListCall) LayerId(layerId string) *MylibraryAnnotationsListCall {
  7469. c.urlParams_.Set("layerId", layerId)
  7470. return c
  7471. }
  7472. // LayerIds sets the optional parameter "layerIds": The layer ID(s) to
  7473. // limit annotation by.
  7474. func (c *MylibraryAnnotationsListCall) LayerIds(layerIds ...string) *MylibraryAnnotationsListCall {
  7475. c.urlParams_.SetMulti("layerIds", append([]string{}, layerIds...))
  7476. return c
  7477. }
  7478. // MaxResults sets the optional parameter "maxResults": Maximum number
  7479. // of results to return
  7480. func (c *MylibraryAnnotationsListCall) MaxResults(maxResults int64) *MylibraryAnnotationsListCall {
  7481. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7482. return c
  7483. }
  7484. // PageToken sets the optional parameter "pageToken": The value of the
  7485. // nextToken from the previous page.
  7486. func (c *MylibraryAnnotationsListCall) PageToken(pageToken string) *MylibraryAnnotationsListCall {
  7487. c.urlParams_.Set("pageToken", pageToken)
  7488. return c
  7489. }
  7490. // ShowDeleted sets the optional parameter "showDeleted": Set to true to
  7491. // return deleted annotations. updatedMin must be in the request to use
  7492. // this. Defaults to false.
  7493. func (c *MylibraryAnnotationsListCall) ShowDeleted(showDeleted bool) *MylibraryAnnotationsListCall {
  7494. c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
  7495. return c
  7496. }
  7497. // Source sets the optional parameter "source": String to identify the
  7498. // originator of this request.
  7499. func (c *MylibraryAnnotationsListCall) Source(source string) *MylibraryAnnotationsListCall {
  7500. c.urlParams_.Set("source", source)
  7501. return c
  7502. }
  7503. // UpdatedMax sets the optional parameter "updatedMax": RFC 3339
  7504. // timestamp to restrict to items updated prior to this timestamp
  7505. // (exclusive).
  7506. func (c *MylibraryAnnotationsListCall) UpdatedMax(updatedMax string) *MylibraryAnnotationsListCall {
  7507. c.urlParams_.Set("updatedMax", updatedMax)
  7508. return c
  7509. }
  7510. // UpdatedMin sets the optional parameter "updatedMin": RFC 3339
  7511. // timestamp to restrict to items updated since this timestamp
  7512. // (inclusive).
  7513. func (c *MylibraryAnnotationsListCall) UpdatedMin(updatedMin string) *MylibraryAnnotationsListCall {
  7514. c.urlParams_.Set("updatedMin", updatedMin)
  7515. return c
  7516. }
  7517. // VolumeId sets the optional parameter "volumeId": The volume to
  7518. // restrict annotations to.
  7519. func (c *MylibraryAnnotationsListCall) VolumeId(volumeId string) *MylibraryAnnotationsListCall {
  7520. c.urlParams_.Set("volumeId", volumeId)
  7521. return c
  7522. }
  7523. // Fields allows partial responses to be retrieved. See
  7524. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7525. // for more information.
  7526. func (c *MylibraryAnnotationsListCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsListCall {
  7527. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7528. return c
  7529. }
  7530. // IfNoneMatch sets the optional parameter which makes the operation
  7531. // fail if the object's ETag matches the given value. This is useful for
  7532. // getting updates only after the object has changed since the last
  7533. // request. Use googleapi.IsNotModified to check whether the response
  7534. // error from Do is the result of In-None-Match.
  7535. func (c *MylibraryAnnotationsListCall) IfNoneMatch(entityTag string) *MylibraryAnnotationsListCall {
  7536. c.ifNoneMatch_ = entityTag
  7537. return c
  7538. }
  7539. // Context sets the context to be used in this call's Do method. Any
  7540. // pending HTTP request will be aborted if the provided context is
  7541. // canceled.
  7542. func (c *MylibraryAnnotationsListCall) Context(ctx context.Context) *MylibraryAnnotationsListCall {
  7543. c.ctx_ = ctx
  7544. return c
  7545. }
  7546. // Header returns an http.Header that can be modified by the caller to
  7547. // add HTTP headers to the request.
  7548. func (c *MylibraryAnnotationsListCall) Header() http.Header {
  7549. if c.header_ == nil {
  7550. c.header_ = make(http.Header)
  7551. }
  7552. return c.header_
  7553. }
  7554. func (c *MylibraryAnnotationsListCall) doRequest(alt string) (*http.Response, error) {
  7555. reqHeaders := make(http.Header)
  7556. for k, v := range c.header_ {
  7557. reqHeaders[k] = v
  7558. }
  7559. reqHeaders.Set("User-Agent", c.s.userAgent())
  7560. if c.ifNoneMatch_ != "" {
  7561. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7562. }
  7563. var body io.Reader = nil
  7564. c.urlParams_.Set("alt", alt)
  7565. c.urlParams_.Set("prettyPrint", "false")
  7566. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations")
  7567. urls += "?" + c.urlParams_.Encode()
  7568. req, err := http.NewRequest("GET", urls, body)
  7569. if err != nil {
  7570. return nil, err
  7571. }
  7572. req.Header = reqHeaders
  7573. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7574. }
  7575. // Do executes the "books.mylibrary.annotations.list" call.
  7576. // Exactly one of *Annotations or error will be non-nil. Any non-2xx
  7577. // status code is an error. Response headers are in either
  7578. // *Annotations.ServerResponse.Header or (if a response was returned at
  7579. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7580. // to check whether the returned error was because
  7581. // http.StatusNotModified was returned.
  7582. func (c *MylibraryAnnotationsListCall) Do(opts ...googleapi.CallOption) (*Annotations, error) {
  7583. gensupport.SetOptions(c.urlParams_, opts...)
  7584. res, err := c.doRequest("json")
  7585. if res != nil && res.StatusCode == http.StatusNotModified {
  7586. if res.Body != nil {
  7587. res.Body.Close()
  7588. }
  7589. return nil, &googleapi.Error{
  7590. Code: res.StatusCode,
  7591. Header: res.Header,
  7592. }
  7593. }
  7594. if err != nil {
  7595. return nil, err
  7596. }
  7597. defer googleapi.CloseBody(res)
  7598. if err := googleapi.CheckResponse(res); err != nil {
  7599. return nil, err
  7600. }
  7601. ret := &Annotations{
  7602. ServerResponse: googleapi.ServerResponse{
  7603. Header: res.Header,
  7604. HTTPStatusCode: res.StatusCode,
  7605. },
  7606. }
  7607. target := &ret
  7608. if err := gensupport.DecodeResponse(target, res); err != nil {
  7609. return nil, err
  7610. }
  7611. return ret, nil
  7612. // {
  7613. // "description": "Retrieves a list of annotations, possibly filtered.",
  7614. // "httpMethod": "GET",
  7615. // "id": "books.mylibrary.annotations.list",
  7616. // "parameters": {
  7617. // "contentVersion": {
  7618. // "description": "The content version for the requested volume.",
  7619. // "location": "query",
  7620. // "type": "string"
  7621. // },
  7622. // "layerId": {
  7623. // "description": "The layer ID to limit annotation by.",
  7624. // "location": "query",
  7625. // "type": "string"
  7626. // },
  7627. // "layerIds": {
  7628. // "description": "The layer ID(s) to limit annotation by.",
  7629. // "location": "query",
  7630. // "repeated": true,
  7631. // "type": "string"
  7632. // },
  7633. // "maxResults": {
  7634. // "description": "Maximum number of results to return",
  7635. // "format": "uint32",
  7636. // "location": "query",
  7637. // "maximum": "40",
  7638. // "minimum": "0",
  7639. // "type": "integer"
  7640. // },
  7641. // "pageToken": {
  7642. // "description": "The value of the nextToken from the previous page.",
  7643. // "location": "query",
  7644. // "type": "string"
  7645. // },
  7646. // "showDeleted": {
  7647. // "description": "Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false.",
  7648. // "location": "query",
  7649. // "type": "boolean"
  7650. // },
  7651. // "source": {
  7652. // "description": "String to identify the originator of this request.",
  7653. // "location": "query",
  7654. // "type": "string"
  7655. // },
  7656. // "updatedMax": {
  7657. // "description": "RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).",
  7658. // "location": "query",
  7659. // "type": "string"
  7660. // },
  7661. // "updatedMin": {
  7662. // "description": "RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).",
  7663. // "location": "query",
  7664. // "type": "string"
  7665. // },
  7666. // "volumeId": {
  7667. // "description": "The volume to restrict annotations to.",
  7668. // "location": "query",
  7669. // "type": "string"
  7670. // }
  7671. // },
  7672. // "path": "mylibrary/annotations",
  7673. // "response": {
  7674. // "$ref": "Annotations"
  7675. // },
  7676. // "scopes": [
  7677. // "https://www.googleapis.com/auth/books"
  7678. // ]
  7679. // }
  7680. }
  7681. // Pages invokes f for each page of results.
  7682. // A non-nil error returned from f will halt the iteration.
  7683. // The provided context supersedes any context provided to the Context method.
  7684. func (c *MylibraryAnnotationsListCall) Pages(ctx context.Context, f func(*Annotations) error) error {
  7685. c.ctx_ = ctx
  7686. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7687. for {
  7688. x, err := c.Do()
  7689. if err != nil {
  7690. return err
  7691. }
  7692. if err := f(x); err != nil {
  7693. return err
  7694. }
  7695. if x.NextPageToken == "" {
  7696. return nil
  7697. }
  7698. c.PageToken(x.NextPageToken)
  7699. }
  7700. }
  7701. // method id "books.mylibrary.annotations.summary":
  7702. type MylibraryAnnotationsSummaryCall struct {
  7703. s *Service
  7704. urlParams_ gensupport.URLParams
  7705. ctx_ context.Context
  7706. header_ http.Header
  7707. }
  7708. // Summary: Gets the summary of specified layers.
  7709. func (r *MylibraryAnnotationsService) Summary(layerIds []string, volumeId string) *MylibraryAnnotationsSummaryCall {
  7710. c := &MylibraryAnnotationsSummaryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7711. c.urlParams_.SetMulti("layerIds", append([]string{}, layerIds...))
  7712. c.urlParams_.Set("volumeId", volumeId)
  7713. return c
  7714. }
  7715. // Fields allows partial responses to be retrieved. See
  7716. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7717. // for more information.
  7718. func (c *MylibraryAnnotationsSummaryCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsSummaryCall {
  7719. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7720. return c
  7721. }
  7722. // Context sets the context to be used in this call's Do method. Any
  7723. // pending HTTP request will be aborted if the provided context is
  7724. // canceled.
  7725. func (c *MylibraryAnnotationsSummaryCall) Context(ctx context.Context) *MylibraryAnnotationsSummaryCall {
  7726. c.ctx_ = ctx
  7727. return c
  7728. }
  7729. // Header returns an http.Header that can be modified by the caller to
  7730. // add HTTP headers to the request.
  7731. func (c *MylibraryAnnotationsSummaryCall) Header() http.Header {
  7732. if c.header_ == nil {
  7733. c.header_ = make(http.Header)
  7734. }
  7735. return c.header_
  7736. }
  7737. func (c *MylibraryAnnotationsSummaryCall) doRequest(alt string) (*http.Response, error) {
  7738. reqHeaders := make(http.Header)
  7739. for k, v := range c.header_ {
  7740. reqHeaders[k] = v
  7741. }
  7742. reqHeaders.Set("User-Agent", c.s.userAgent())
  7743. var body io.Reader = nil
  7744. c.urlParams_.Set("alt", alt)
  7745. c.urlParams_.Set("prettyPrint", "false")
  7746. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations/summary")
  7747. urls += "?" + c.urlParams_.Encode()
  7748. req, err := http.NewRequest("POST", urls, body)
  7749. if err != nil {
  7750. return nil, err
  7751. }
  7752. req.Header = reqHeaders
  7753. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7754. }
  7755. // Do executes the "books.mylibrary.annotations.summary" call.
  7756. // Exactly one of *AnnotationsSummary or error will be non-nil. Any
  7757. // non-2xx status code is an error. Response headers are in either
  7758. // *AnnotationsSummary.ServerResponse.Header or (if a response was
  7759. // returned at all) in error.(*googleapi.Error).Header. Use
  7760. // googleapi.IsNotModified to check whether the returned error was
  7761. // because http.StatusNotModified was returned.
  7762. func (c *MylibraryAnnotationsSummaryCall) Do(opts ...googleapi.CallOption) (*AnnotationsSummary, error) {
  7763. gensupport.SetOptions(c.urlParams_, opts...)
  7764. res, err := c.doRequest("json")
  7765. if res != nil && res.StatusCode == http.StatusNotModified {
  7766. if res.Body != nil {
  7767. res.Body.Close()
  7768. }
  7769. return nil, &googleapi.Error{
  7770. Code: res.StatusCode,
  7771. Header: res.Header,
  7772. }
  7773. }
  7774. if err != nil {
  7775. return nil, err
  7776. }
  7777. defer googleapi.CloseBody(res)
  7778. if err := googleapi.CheckResponse(res); err != nil {
  7779. return nil, err
  7780. }
  7781. ret := &AnnotationsSummary{
  7782. ServerResponse: googleapi.ServerResponse{
  7783. Header: res.Header,
  7784. HTTPStatusCode: res.StatusCode,
  7785. },
  7786. }
  7787. target := &ret
  7788. if err := gensupport.DecodeResponse(target, res); err != nil {
  7789. return nil, err
  7790. }
  7791. return ret, nil
  7792. // {
  7793. // "description": "Gets the summary of specified layers.",
  7794. // "httpMethod": "POST",
  7795. // "id": "books.mylibrary.annotations.summary",
  7796. // "parameterOrder": [
  7797. // "layerIds",
  7798. // "volumeId"
  7799. // ],
  7800. // "parameters": {
  7801. // "layerIds": {
  7802. // "description": "Array of layer IDs to get the summary for.",
  7803. // "location": "query",
  7804. // "repeated": true,
  7805. // "required": true,
  7806. // "type": "string"
  7807. // },
  7808. // "volumeId": {
  7809. // "description": "Volume id to get the summary for.",
  7810. // "location": "query",
  7811. // "required": true,
  7812. // "type": "string"
  7813. // }
  7814. // },
  7815. // "path": "mylibrary/annotations/summary",
  7816. // "response": {
  7817. // "$ref": "AnnotationsSummary"
  7818. // },
  7819. // "scopes": [
  7820. // "https://www.googleapis.com/auth/books"
  7821. // ]
  7822. // }
  7823. }
  7824. // method id "books.mylibrary.annotations.update":
  7825. type MylibraryAnnotationsUpdateCall struct {
  7826. s *Service
  7827. annotationId string
  7828. annotation *Annotation
  7829. urlParams_ gensupport.URLParams
  7830. ctx_ context.Context
  7831. header_ http.Header
  7832. }
  7833. // Update: Updates an existing annotation.
  7834. func (r *MylibraryAnnotationsService) Update(annotationId string, annotation *Annotation) *MylibraryAnnotationsUpdateCall {
  7835. c := &MylibraryAnnotationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7836. c.annotationId = annotationId
  7837. c.annotation = annotation
  7838. return c
  7839. }
  7840. // Source sets the optional parameter "source": String to identify the
  7841. // originator of this request.
  7842. func (c *MylibraryAnnotationsUpdateCall) Source(source string) *MylibraryAnnotationsUpdateCall {
  7843. c.urlParams_.Set("source", source)
  7844. return c
  7845. }
  7846. // Fields allows partial responses to be retrieved. See
  7847. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7848. // for more information.
  7849. func (c *MylibraryAnnotationsUpdateCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsUpdateCall {
  7850. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7851. return c
  7852. }
  7853. // Context sets the context to be used in this call's Do method. Any
  7854. // pending HTTP request will be aborted if the provided context is
  7855. // canceled.
  7856. func (c *MylibraryAnnotationsUpdateCall) Context(ctx context.Context) *MylibraryAnnotationsUpdateCall {
  7857. c.ctx_ = ctx
  7858. return c
  7859. }
  7860. // Header returns an http.Header that can be modified by the caller to
  7861. // add HTTP headers to the request.
  7862. func (c *MylibraryAnnotationsUpdateCall) Header() http.Header {
  7863. if c.header_ == nil {
  7864. c.header_ = make(http.Header)
  7865. }
  7866. return c.header_
  7867. }
  7868. func (c *MylibraryAnnotationsUpdateCall) doRequest(alt string) (*http.Response, error) {
  7869. reqHeaders := make(http.Header)
  7870. for k, v := range c.header_ {
  7871. reqHeaders[k] = v
  7872. }
  7873. reqHeaders.Set("User-Agent", c.s.userAgent())
  7874. var body io.Reader = nil
  7875. body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
  7876. if err != nil {
  7877. return nil, err
  7878. }
  7879. reqHeaders.Set("Content-Type", "application/json")
  7880. c.urlParams_.Set("alt", alt)
  7881. c.urlParams_.Set("prettyPrint", "false")
  7882. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations/{annotationId}")
  7883. urls += "?" + c.urlParams_.Encode()
  7884. req, err := http.NewRequest("PUT", urls, body)
  7885. if err != nil {
  7886. return nil, err
  7887. }
  7888. req.Header = reqHeaders
  7889. googleapi.Expand(req.URL, map[string]string{
  7890. "annotationId": c.annotationId,
  7891. })
  7892. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7893. }
  7894. // Do executes the "books.mylibrary.annotations.update" call.
  7895. // Exactly one of *Annotation or error will be non-nil. Any non-2xx
  7896. // status code is an error. Response headers are in either
  7897. // *Annotation.ServerResponse.Header or (if a response was returned at
  7898. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7899. // to check whether the returned error was because
  7900. // http.StatusNotModified was returned.
  7901. func (c *MylibraryAnnotationsUpdateCall) Do(opts ...googleapi.CallOption) (*Annotation, error) {
  7902. gensupport.SetOptions(c.urlParams_, opts...)
  7903. res, err := c.doRequest("json")
  7904. if res != nil && res.StatusCode == http.StatusNotModified {
  7905. if res.Body != nil {
  7906. res.Body.Close()
  7907. }
  7908. return nil, &googleapi.Error{
  7909. Code: res.StatusCode,
  7910. Header: res.Header,
  7911. }
  7912. }
  7913. if err != nil {
  7914. return nil, err
  7915. }
  7916. defer googleapi.CloseBody(res)
  7917. if err := googleapi.CheckResponse(res); err != nil {
  7918. return nil, err
  7919. }
  7920. ret := &Annotation{
  7921. ServerResponse: googleapi.ServerResponse{
  7922. Header: res.Header,
  7923. HTTPStatusCode: res.StatusCode,
  7924. },
  7925. }
  7926. target := &ret
  7927. if err := gensupport.DecodeResponse(target, res); err != nil {
  7928. return nil, err
  7929. }
  7930. return ret, nil
  7931. // {
  7932. // "description": "Updates an existing annotation.",
  7933. // "httpMethod": "PUT",
  7934. // "id": "books.mylibrary.annotations.update",
  7935. // "parameterOrder": [
  7936. // "annotationId"
  7937. // ],
  7938. // "parameters": {
  7939. // "annotationId": {
  7940. // "description": "The ID for the annotation to update.",
  7941. // "location": "path",
  7942. // "required": true,
  7943. // "type": "string"
  7944. // },
  7945. // "source": {
  7946. // "description": "String to identify the originator of this request.",
  7947. // "location": "query",
  7948. // "type": "string"
  7949. // }
  7950. // },
  7951. // "path": "mylibrary/annotations/{annotationId}",
  7952. // "request": {
  7953. // "$ref": "Annotation"
  7954. // },
  7955. // "response": {
  7956. // "$ref": "Annotation"
  7957. // },
  7958. // "scopes": [
  7959. // "https://www.googleapis.com/auth/books"
  7960. // ]
  7961. // }
  7962. }
  7963. // method id "books.mylibrary.bookshelves.addVolume":
  7964. type MylibraryBookshelvesAddVolumeCall struct {
  7965. s *Service
  7966. shelf string
  7967. urlParams_ gensupport.URLParams
  7968. ctx_ context.Context
  7969. header_ http.Header
  7970. }
  7971. // AddVolume: Adds a volume to a bookshelf.
  7972. func (r *MylibraryBookshelvesService) AddVolume(shelf string, volumeId string) *MylibraryBookshelvesAddVolumeCall {
  7973. c := &MylibraryBookshelvesAddVolumeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7974. c.shelf = shelf
  7975. c.urlParams_.Set("volumeId", volumeId)
  7976. return c
  7977. }
  7978. // Reason sets the optional parameter "reason": The reason for which the
  7979. // book is added to the library.
  7980. //
  7981. // Possible values:
  7982. // "IOS_PREX" - Volumes added from the PREX flow on iOS.
  7983. // "IOS_SEARCH" - Volumes added from the Search flow on iOS.
  7984. // "ONBOARDING" - Volumes added from the Onboarding flow.
  7985. func (c *MylibraryBookshelvesAddVolumeCall) Reason(reason string) *MylibraryBookshelvesAddVolumeCall {
  7986. c.urlParams_.Set("reason", reason)
  7987. return c
  7988. }
  7989. // Source sets the optional parameter "source": String to identify the
  7990. // originator of this request.
  7991. func (c *MylibraryBookshelvesAddVolumeCall) Source(source string) *MylibraryBookshelvesAddVolumeCall {
  7992. c.urlParams_.Set("source", source)
  7993. return c
  7994. }
  7995. // Fields allows partial responses to be retrieved. See
  7996. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7997. // for more information.
  7998. func (c *MylibraryBookshelvesAddVolumeCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesAddVolumeCall {
  7999. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8000. return c
  8001. }
  8002. // Context sets the context to be used in this call's Do method. Any
  8003. // pending HTTP request will be aborted if the provided context is
  8004. // canceled.
  8005. func (c *MylibraryBookshelvesAddVolumeCall) Context(ctx context.Context) *MylibraryBookshelvesAddVolumeCall {
  8006. c.ctx_ = ctx
  8007. return c
  8008. }
  8009. // Header returns an http.Header that can be modified by the caller to
  8010. // add HTTP headers to the request.
  8011. func (c *MylibraryBookshelvesAddVolumeCall) Header() http.Header {
  8012. if c.header_ == nil {
  8013. c.header_ = make(http.Header)
  8014. }
  8015. return c.header_
  8016. }
  8017. func (c *MylibraryBookshelvesAddVolumeCall) doRequest(alt string) (*http.Response, error) {
  8018. reqHeaders := make(http.Header)
  8019. for k, v := range c.header_ {
  8020. reqHeaders[k] = v
  8021. }
  8022. reqHeaders.Set("User-Agent", c.s.userAgent())
  8023. var body io.Reader = nil
  8024. c.urlParams_.Set("alt", alt)
  8025. c.urlParams_.Set("prettyPrint", "false")
  8026. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/addVolume")
  8027. urls += "?" + c.urlParams_.Encode()
  8028. req, err := http.NewRequest("POST", urls, body)
  8029. if err != nil {
  8030. return nil, err
  8031. }
  8032. req.Header = reqHeaders
  8033. googleapi.Expand(req.URL, map[string]string{
  8034. "shelf": c.shelf,
  8035. })
  8036. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8037. }
  8038. // Do executes the "books.mylibrary.bookshelves.addVolume" call.
  8039. func (c *MylibraryBookshelvesAddVolumeCall) Do(opts ...googleapi.CallOption) error {
  8040. gensupport.SetOptions(c.urlParams_, opts...)
  8041. res, err := c.doRequest("json")
  8042. if err != nil {
  8043. return err
  8044. }
  8045. defer googleapi.CloseBody(res)
  8046. if err := googleapi.CheckResponse(res); err != nil {
  8047. return err
  8048. }
  8049. return nil
  8050. // {
  8051. // "description": "Adds a volume to a bookshelf.",
  8052. // "httpMethod": "POST",
  8053. // "id": "books.mylibrary.bookshelves.addVolume",
  8054. // "parameterOrder": [
  8055. // "shelf",
  8056. // "volumeId"
  8057. // ],
  8058. // "parameters": {
  8059. // "reason": {
  8060. // "description": "The reason for which the book is added to the library.",
  8061. // "enum": [
  8062. // "IOS_PREX",
  8063. // "IOS_SEARCH",
  8064. // "ONBOARDING"
  8065. // ],
  8066. // "enumDescriptions": [
  8067. // "Volumes added from the PREX flow on iOS.",
  8068. // "Volumes added from the Search flow on iOS.",
  8069. // "Volumes added from the Onboarding flow."
  8070. // ],
  8071. // "location": "query",
  8072. // "type": "string"
  8073. // },
  8074. // "shelf": {
  8075. // "description": "ID of bookshelf to which to add a volume.",
  8076. // "location": "path",
  8077. // "required": true,
  8078. // "type": "string"
  8079. // },
  8080. // "source": {
  8081. // "description": "String to identify the originator of this request.",
  8082. // "location": "query",
  8083. // "type": "string"
  8084. // },
  8085. // "volumeId": {
  8086. // "description": "ID of volume to add.",
  8087. // "location": "query",
  8088. // "required": true,
  8089. // "type": "string"
  8090. // }
  8091. // },
  8092. // "path": "mylibrary/bookshelves/{shelf}/addVolume",
  8093. // "scopes": [
  8094. // "https://www.googleapis.com/auth/books"
  8095. // ]
  8096. // }
  8097. }
  8098. // method id "books.mylibrary.bookshelves.clearVolumes":
  8099. type MylibraryBookshelvesClearVolumesCall struct {
  8100. s *Service
  8101. shelf string
  8102. urlParams_ gensupport.URLParams
  8103. ctx_ context.Context
  8104. header_ http.Header
  8105. }
  8106. // ClearVolumes: Clears all volumes from a bookshelf.
  8107. func (r *MylibraryBookshelvesService) ClearVolumes(shelf string) *MylibraryBookshelvesClearVolumesCall {
  8108. c := &MylibraryBookshelvesClearVolumesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8109. c.shelf = shelf
  8110. return c
  8111. }
  8112. // Source sets the optional parameter "source": String to identify the
  8113. // originator of this request.
  8114. func (c *MylibraryBookshelvesClearVolumesCall) Source(source string) *MylibraryBookshelvesClearVolumesCall {
  8115. c.urlParams_.Set("source", source)
  8116. return c
  8117. }
  8118. // Fields allows partial responses to be retrieved. See
  8119. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8120. // for more information.
  8121. func (c *MylibraryBookshelvesClearVolumesCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesClearVolumesCall {
  8122. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8123. return c
  8124. }
  8125. // Context sets the context to be used in this call's Do method. Any
  8126. // pending HTTP request will be aborted if the provided context is
  8127. // canceled.
  8128. func (c *MylibraryBookshelvesClearVolumesCall) Context(ctx context.Context) *MylibraryBookshelvesClearVolumesCall {
  8129. c.ctx_ = ctx
  8130. return c
  8131. }
  8132. // Header returns an http.Header that can be modified by the caller to
  8133. // add HTTP headers to the request.
  8134. func (c *MylibraryBookshelvesClearVolumesCall) Header() http.Header {
  8135. if c.header_ == nil {
  8136. c.header_ = make(http.Header)
  8137. }
  8138. return c.header_
  8139. }
  8140. func (c *MylibraryBookshelvesClearVolumesCall) doRequest(alt string) (*http.Response, error) {
  8141. reqHeaders := make(http.Header)
  8142. for k, v := range c.header_ {
  8143. reqHeaders[k] = v
  8144. }
  8145. reqHeaders.Set("User-Agent", c.s.userAgent())
  8146. var body io.Reader = nil
  8147. c.urlParams_.Set("alt", alt)
  8148. c.urlParams_.Set("prettyPrint", "false")
  8149. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/clearVolumes")
  8150. urls += "?" + c.urlParams_.Encode()
  8151. req, err := http.NewRequest("POST", urls, body)
  8152. if err != nil {
  8153. return nil, err
  8154. }
  8155. req.Header = reqHeaders
  8156. googleapi.Expand(req.URL, map[string]string{
  8157. "shelf": c.shelf,
  8158. })
  8159. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8160. }
  8161. // Do executes the "books.mylibrary.bookshelves.clearVolumes" call.
  8162. func (c *MylibraryBookshelvesClearVolumesCall) Do(opts ...googleapi.CallOption) error {
  8163. gensupport.SetOptions(c.urlParams_, opts...)
  8164. res, err := c.doRequest("json")
  8165. if err != nil {
  8166. return err
  8167. }
  8168. defer googleapi.CloseBody(res)
  8169. if err := googleapi.CheckResponse(res); err != nil {
  8170. return err
  8171. }
  8172. return nil
  8173. // {
  8174. // "description": "Clears all volumes from a bookshelf.",
  8175. // "httpMethod": "POST",
  8176. // "id": "books.mylibrary.bookshelves.clearVolumes",
  8177. // "parameterOrder": [
  8178. // "shelf"
  8179. // ],
  8180. // "parameters": {
  8181. // "shelf": {
  8182. // "description": "ID of bookshelf from which to remove a volume.",
  8183. // "location": "path",
  8184. // "required": true,
  8185. // "type": "string"
  8186. // },
  8187. // "source": {
  8188. // "description": "String to identify the originator of this request.",
  8189. // "location": "query",
  8190. // "type": "string"
  8191. // }
  8192. // },
  8193. // "path": "mylibrary/bookshelves/{shelf}/clearVolumes",
  8194. // "scopes": [
  8195. // "https://www.googleapis.com/auth/books"
  8196. // ]
  8197. // }
  8198. }
  8199. // method id "books.mylibrary.bookshelves.get":
  8200. type MylibraryBookshelvesGetCall struct {
  8201. s *Service
  8202. shelf string
  8203. urlParams_ gensupport.URLParams
  8204. ifNoneMatch_ string
  8205. ctx_ context.Context
  8206. header_ http.Header
  8207. }
  8208. // Get: Retrieves metadata for a specific bookshelf belonging to the
  8209. // authenticated user.
  8210. func (r *MylibraryBookshelvesService) Get(shelf string) *MylibraryBookshelvesGetCall {
  8211. c := &MylibraryBookshelvesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8212. c.shelf = shelf
  8213. return c
  8214. }
  8215. // Source sets the optional parameter "source": String to identify the
  8216. // originator of this request.
  8217. func (c *MylibraryBookshelvesGetCall) Source(source string) *MylibraryBookshelvesGetCall {
  8218. c.urlParams_.Set("source", source)
  8219. return c
  8220. }
  8221. // Fields allows partial responses to be retrieved. See
  8222. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8223. // for more information.
  8224. func (c *MylibraryBookshelvesGetCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesGetCall {
  8225. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8226. return c
  8227. }
  8228. // IfNoneMatch sets the optional parameter which makes the operation
  8229. // fail if the object's ETag matches the given value. This is useful for
  8230. // getting updates only after the object has changed since the last
  8231. // request. Use googleapi.IsNotModified to check whether the response
  8232. // error from Do is the result of In-None-Match.
  8233. func (c *MylibraryBookshelvesGetCall) IfNoneMatch(entityTag string) *MylibraryBookshelvesGetCall {
  8234. c.ifNoneMatch_ = entityTag
  8235. return c
  8236. }
  8237. // Context sets the context to be used in this call's Do method. Any
  8238. // pending HTTP request will be aborted if the provided context is
  8239. // canceled.
  8240. func (c *MylibraryBookshelvesGetCall) Context(ctx context.Context) *MylibraryBookshelvesGetCall {
  8241. c.ctx_ = ctx
  8242. return c
  8243. }
  8244. // Header returns an http.Header that can be modified by the caller to
  8245. // add HTTP headers to the request.
  8246. func (c *MylibraryBookshelvesGetCall) Header() http.Header {
  8247. if c.header_ == nil {
  8248. c.header_ = make(http.Header)
  8249. }
  8250. return c.header_
  8251. }
  8252. func (c *MylibraryBookshelvesGetCall) doRequest(alt string) (*http.Response, error) {
  8253. reqHeaders := make(http.Header)
  8254. for k, v := range c.header_ {
  8255. reqHeaders[k] = v
  8256. }
  8257. reqHeaders.Set("User-Agent", c.s.userAgent())
  8258. if c.ifNoneMatch_ != "" {
  8259. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8260. }
  8261. var body io.Reader = nil
  8262. c.urlParams_.Set("alt", alt)
  8263. c.urlParams_.Set("prettyPrint", "false")
  8264. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}")
  8265. urls += "?" + c.urlParams_.Encode()
  8266. req, err := http.NewRequest("GET", urls, body)
  8267. if err != nil {
  8268. return nil, err
  8269. }
  8270. req.Header = reqHeaders
  8271. googleapi.Expand(req.URL, map[string]string{
  8272. "shelf": c.shelf,
  8273. })
  8274. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8275. }
  8276. // Do executes the "books.mylibrary.bookshelves.get" call.
  8277. // Exactly one of *Bookshelf or error will be non-nil. Any non-2xx
  8278. // status code is an error. Response headers are in either
  8279. // *Bookshelf.ServerResponse.Header or (if a response was returned at
  8280. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8281. // to check whether the returned error was because
  8282. // http.StatusNotModified was returned.
  8283. func (c *MylibraryBookshelvesGetCall) Do(opts ...googleapi.CallOption) (*Bookshelf, error) {
  8284. gensupport.SetOptions(c.urlParams_, opts...)
  8285. res, err := c.doRequest("json")
  8286. if res != nil && res.StatusCode == http.StatusNotModified {
  8287. if res.Body != nil {
  8288. res.Body.Close()
  8289. }
  8290. return nil, &googleapi.Error{
  8291. Code: res.StatusCode,
  8292. Header: res.Header,
  8293. }
  8294. }
  8295. if err != nil {
  8296. return nil, err
  8297. }
  8298. defer googleapi.CloseBody(res)
  8299. if err := googleapi.CheckResponse(res); err != nil {
  8300. return nil, err
  8301. }
  8302. ret := &Bookshelf{
  8303. ServerResponse: googleapi.ServerResponse{
  8304. Header: res.Header,
  8305. HTTPStatusCode: res.StatusCode,
  8306. },
  8307. }
  8308. target := &ret
  8309. if err := gensupport.DecodeResponse(target, res); err != nil {
  8310. return nil, err
  8311. }
  8312. return ret, nil
  8313. // {
  8314. // "description": "Retrieves metadata for a specific bookshelf belonging to the authenticated user.",
  8315. // "httpMethod": "GET",
  8316. // "id": "books.mylibrary.bookshelves.get",
  8317. // "parameterOrder": [
  8318. // "shelf"
  8319. // ],
  8320. // "parameters": {
  8321. // "shelf": {
  8322. // "description": "ID of bookshelf to retrieve.",
  8323. // "location": "path",
  8324. // "required": true,
  8325. // "type": "string"
  8326. // },
  8327. // "source": {
  8328. // "description": "String to identify the originator of this request.",
  8329. // "location": "query",
  8330. // "type": "string"
  8331. // }
  8332. // },
  8333. // "path": "mylibrary/bookshelves/{shelf}",
  8334. // "response": {
  8335. // "$ref": "Bookshelf"
  8336. // },
  8337. // "scopes": [
  8338. // "https://www.googleapis.com/auth/books"
  8339. // ]
  8340. // }
  8341. }
  8342. // method id "books.mylibrary.bookshelves.list":
  8343. type MylibraryBookshelvesListCall struct {
  8344. s *Service
  8345. urlParams_ gensupport.URLParams
  8346. ifNoneMatch_ string
  8347. ctx_ context.Context
  8348. header_ http.Header
  8349. }
  8350. // List: Retrieves a list of bookshelves belonging to the authenticated
  8351. // user.
  8352. func (r *MylibraryBookshelvesService) List() *MylibraryBookshelvesListCall {
  8353. c := &MylibraryBookshelvesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8354. return c
  8355. }
  8356. // Source sets the optional parameter "source": String to identify the
  8357. // originator of this request.
  8358. func (c *MylibraryBookshelvesListCall) Source(source string) *MylibraryBookshelvesListCall {
  8359. c.urlParams_.Set("source", source)
  8360. return c
  8361. }
  8362. // Fields allows partial responses to be retrieved. See
  8363. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8364. // for more information.
  8365. func (c *MylibraryBookshelvesListCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesListCall {
  8366. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8367. return c
  8368. }
  8369. // IfNoneMatch sets the optional parameter which makes the operation
  8370. // fail if the object's ETag matches the given value. This is useful for
  8371. // getting updates only after the object has changed since the last
  8372. // request. Use googleapi.IsNotModified to check whether the response
  8373. // error from Do is the result of In-None-Match.
  8374. func (c *MylibraryBookshelvesListCall) IfNoneMatch(entityTag string) *MylibraryBookshelvesListCall {
  8375. c.ifNoneMatch_ = entityTag
  8376. return c
  8377. }
  8378. // Context sets the context to be used in this call's Do method. Any
  8379. // pending HTTP request will be aborted if the provided context is
  8380. // canceled.
  8381. func (c *MylibraryBookshelvesListCall) Context(ctx context.Context) *MylibraryBookshelvesListCall {
  8382. c.ctx_ = ctx
  8383. return c
  8384. }
  8385. // Header returns an http.Header that can be modified by the caller to
  8386. // add HTTP headers to the request.
  8387. func (c *MylibraryBookshelvesListCall) Header() http.Header {
  8388. if c.header_ == nil {
  8389. c.header_ = make(http.Header)
  8390. }
  8391. return c.header_
  8392. }
  8393. func (c *MylibraryBookshelvesListCall) doRequest(alt string) (*http.Response, error) {
  8394. reqHeaders := make(http.Header)
  8395. for k, v := range c.header_ {
  8396. reqHeaders[k] = v
  8397. }
  8398. reqHeaders.Set("User-Agent", c.s.userAgent())
  8399. if c.ifNoneMatch_ != "" {
  8400. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8401. }
  8402. var body io.Reader = nil
  8403. c.urlParams_.Set("alt", alt)
  8404. c.urlParams_.Set("prettyPrint", "false")
  8405. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves")
  8406. urls += "?" + c.urlParams_.Encode()
  8407. req, err := http.NewRequest("GET", urls, body)
  8408. if err != nil {
  8409. return nil, err
  8410. }
  8411. req.Header = reqHeaders
  8412. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8413. }
  8414. // Do executes the "books.mylibrary.bookshelves.list" call.
  8415. // Exactly one of *Bookshelves or error will be non-nil. Any non-2xx
  8416. // status code is an error. Response headers are in either
  8417. // *Bookshelves.ServerResponse.Header or (if a response was returned at
  8418. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8419. // to check whether the returned error was because
  8420. // http.StatusNotModified was returned.
  8421. func (c *MylibraryBookshelvesListCall) Do(opts ...googleapi.CallOption) (*Bookshelves, error) {
  8422. gensupport.SetOptions(c.urlParams_, opts...)
  8423. res, err := c.doRequest("json")
  8424. if res != nil && res.StatusCode == http.StatusNotModified {
  8425. if res.Body != nil {
  8426. res.Body.Close()
  8427. }
  8428. return nil, &googleapi.Error{
  8429. Code: res.StatusCode,
  8430. Header: res.Header,
  8431. }
  8432. }
  8433. if err != nil {
  8434. return nil, err
  8435. }
  8436. defer googleapi.CloseBody(res)
  8437. if err := googleapi.CheckResponse(res); err != nil {
  8438. return nil, err
  8439. }
  8440. ret := &Bookshelves{
  8441. ServerResponse: googleapi.ServerResponse{
  8442. Header: res.Header,
  8443. HTTPStatusCode: res.StatusCode,
  8444. },
  8445. }
  8446. target := &ret
  8447. if err := gensupport.DecodeResponse(target, res); err != nil {
  8448. return nil, err
  8449. }
  8450. return ret, nil
  8451. // {
  8452. // "description": "Retrieves a list of bookshelves belonging to the authenticated user.",
  8453. // "httpMethod": "GET",
  8454. // "id": "books.mylibrary.bookshelves.list",
  8455. // "parameters": {
  8456. // "source": {
  8457. // "description": "String to identify the originator of this request.",
  8458. // "location": "query",
  8459. // "type": "string"
  8460. // }
  8461. // },
  8462. // "path": "mylibrary/bookshelves",
  8463. // "response": {
  8464. // "$ref": "Bookshelves"
  8465. // },
  8466. // "scopes": [
  8467. // "https://www.googleapis.com/auth/books"
  8468. // ]
  8469. // }
  8470. }
  8471. // method id "books.mylibrary.bookshelves.moveVolume":
  8472. type MylibraryBookshelvesMoveVolumeCall struct {
  8473. s *Service
  8474. shelf string
  8475. urlParams_ gensupport.URLParams
  8476. ctx_ context.Context
  8477. header_ http.Header
  8478. }
  8479. // MoveVolume: Moves a volume within a bookshelf.
  8480. func (r *MylibraryBookshelvesService) MoveVolume(shelf string, volumeId string, volumePosition int64) *MylibraryBookshelvesMoveVolumeCall {
  8481. c := &MylibraryBookshelvesMoveVolumeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8482. c.shelf = shelf
  8483. c.urlParams_.Set("volumeId", volumeId)
  8484. c.urlParams_.Set("volumePosition", fmt.Sprint(volumePosition))
  8485. return c
  8486. }
  8487. // Source sets the optional parameter "source": String to identify the
  8488. // originator of this request.
  8489. func (c *MylibraryBookshelvesMoveVolumeCall) Source(source string) *MylibraryBookshelvesMoveVolumeCall {
  8490. c.urlParams_.Set("source", source)
  8491. return c
  8492. }
  8493. // Fields allows partial responses to be retrieved. See
  8494. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8495. // for more information.
  8496. func (c *MylibraryBookshelvesMoveVolumeCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesMoveVolumeCall {
  8497. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8498. return c
  8499. }
  8500. // Context sets the context to be used in this call's Do method. Any
  8501. // pending HTTP request will be aborted if the provided context is
  8502. // canceled.
  8503. func (c *MylibraryBookshelvesMoveVolumeCall) Context(ctx context.Context) *MylibraryBookshelvesMoveVolumeCall {
  8504. c.ctx_ = ctx
  8505. return c
  8506. }
  8507. // Header returns an http.Header that can be modified by the caller to
  8508. // add HTTP headers to the request.
  8509. func (c *MylibraryBookshelvesMoveVolumeCall) Header() http.Header {
  8510. if c.header_ == nil {
  8511. c.header_ = make(http.Header)
  8512. }
  8513. return c.header_
  8514. }
  8515. func (c *MylibraryBookshelvesMoveVolumeCall) doRequest(alt string) (*http.Response, error) {
  8516. reqHeaders := make(http.Header)
  8517. for k, v := range c.header_ {
  8518. reqHeaders[k] = v
  8519. }
  8520. reqHeaders.Set("User-Agent", c.s.userAgent())
  8521. var body io.Reader = nil
  8522. c.urlParams_.Set("alt", alt)
  8523. c.urlParams_.Set("prettyPrint", "false")
  8524. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/moveVolume")
  8525. urls += "?" + c.urlParams_.Encode()
  8526. req, err := http.NewRequest("POST", urls, body)
  8527. if err != nil {
  8528. return nil, err
  8529. }
  8530. req.Header = reqHeaders
  8531. googleapi.Expand(req.URL, map[string]string{
  8532. "shelf": c.shelf,
  8533. })
  8534. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8535. }
  8536. // Do executes the "books.mylibrary.bookshelves.moveVolume" call.
  8537. func (c *MylibraryBookshelvesMoveVolumeCall) Do(opts ...googleapi.CallOption) error {
  8538. gensupport.SetOptions(c.urlParams_, opts...)
  8539. res, err := c.doRequest("json")
  8540. if err != nil {
  8541. return err
  8542. }
  8543. defer googleapi.CloseBody(res)
  8544. if err := googleapi.CheckResponse(res); err != nil {
  8545. return err
  8546. }
  8547. return nil
  8548. // {
  8549. // "description": "Moves a volume within a bookshelf.",
  8550. // "httpMethod": "POST",
  8551. // "id": "books.mylibrary.bookshelves.moveVolume",
  8552. // "parameterOrder": [
  8553. // "shelf",
  8554. // "volumeId",
  8555. // "volumePosition"
  8556. // ],
  8557. // "parameters": {
  8558. // "shelf": {
  8559. // "description": "ID of bookshelf with the volume.",
  8560. // "location": "path",
  8561. // "required": true,
  8562. // "type": "string"
  8563. // },
  8564. // "source": {
  8565. // "description": "String to identify the originator of this request.",
  8566. // "location": "query",
  8567. // "type": "string"
  8568. // },
  8569. // "volumeId": {
  8570. // "description": "ID of volume to move.",
  8571. // "location": "query",
  8572. // "required": true,
  8573. // "type": "string"
  8574. // },
  8575. // "volumePosition": {
  8576. // "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.)",
  8577. // "format": "int32",
  8578. // "location": "query",
  8579. // "required": true,
  8580. // "type": "integer"
  8581. // }
  8582. // },
  8583. // "path": "mylibrary/bookshelves/{shelf}/moveVolume",
  8584. // "scopes": [
  8585. // "https://www.googleapis.com/auth/books"
  8586. // ]
  8587. // }
  8588. }
  8589. // method id "books.mylibrary.bookshelves.removeVolume":
  8590. type MylibraryBookshelvesRemoveVolumeCall struct {
  8591. s *Service
  8592. shelf string
  8593. urlParams_ gensupport.URLParams
  8594. ctx_ context.Context
  8595. header_ http.Header
  8596. }
  8597. // RemoveVolume: Removes a volume from a bookshelf.
  8598. func (r *MylibraryBookshelvesService) RemoveVolume(shelf string, volumeId string) *MylibraryBookshelvesRemoveVolumeCall {
  8599. c := &MylibraryBookshelvesRemoveVolumeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8600. c.shelf = shelf
  8601. c.urlParams_.Set("volumeId", volumeId)
  8602. return c
  8603. }
  8604. // Reason sets the optional parameter "reason": The reason for which the
  8605. // book is removed from the library.
  8606. //
  8607. // Possible values:
  8608. // "ONBOARDING" - Samples removed from the Onboarding flow.
  8609. func (c *MylibraryBookshelvesRemoveVolumeCall) Reason(reason string) *MylibraryBookshelvesRemoveVolumeCall {
  8610. c.urlParams_.Set("reason", reason)
  8611. return c
  8612. }
  8613. // Source sets the optional parameter "source": String to identify the
  8614. // originator of this request.
  8615. func (c *MylibraryBookshelvesRemoveVolumeCall) Source(source string) *MylibraryBookshelvesRemoveVolumeCall {
  8616. c.urlParams_.Set("source", source)
  8617. return c
  8618. }
  8619. // Fields allows partial responses to be retrieved. See
  8620. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8621. // for more information.
  8622. func (c *MylibraryBookshelvesRemoveVolumeCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesRemoveVolumeCall {
  8623. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8624. return c
  8625. }
  8626. // Context sets the context to be used in this call's Do method. Any
  8627. // pending HTTP request will be aborted if the provided context is
  8628. // canceled.
  8629. func (c *MylibraryBookshelvesRemoveVolumeCall) Context(ctx context.Context) *MylibraryBookshelvesRemoveVolumeCall {
  8630. c.ctx_ = ctx
  8631. return c
  8632. }
  8633. // Header returns an http.Header that can be modified by the caller to
  8634. // add HTTP headers to the request.
  8635. func (c *MylibraryBookshelvesRemoveVolumeCall) Header() http.Header {
  8636. if c.header_ == nil {
  8637. c.header_ = make(http.Header)
  8638. }
  8639. return c.header_
  8640. }
  8641. func (c *MylibraryBookshelvesRemoveVolumeCall) doRequest(alt string) (*http.Response, error) {
  8642. reqHeaders := make(http.Header)
  8643. for k, v := range c.header_ {
  8644. reqHeaders[k] = v
  8645. }
  8646. reqHeaders.Set("User-Agent", c.s.userAgent())
  8647. var body io.Reader = nil
  8648. c.urlParams_.Set("alt", alt)
  8649. c.urlParams_.Set("prettyPrint", "false")
  8650. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/removeVolume")
  8651. urls += "?" + c.urlParams_.Encode()
  8652. req, err := http.NewRequest("POST", urls, body)
  8653. if err != nil {
  8654. return nil, err
  8655. }
  8656. req.Header = reqHeaders
  8657. googleapi.Expand(req.URL, map[string]string{
  8658. "shelf": c.shelf,
  8659. })
  8660. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8661. }
  8662. // Do executes the "books.mylibrary.bookshelves.removeVolume" call.
  8663. func (c *MylibraryBookshelvesRemoveVolumeCall) Do(opts ...googleapi.CallOption) error {
  8664. gensupport.SetOptions(c.urlParams_, opts...)
  8665. res, err := c.doRequest("json")
  8666. if err != nil {
  8667. return err
  8668. }
  8669. defer googleapi.CloseBody(res)
  8670. if err := googleapi.CheckResponse(res); err != nil {
  8671. return err
  8672. }
  8673. return nil
  8674. // {
  8675. // "description": "Removes a volume from a bookshelf.",
  8676. // "httpMethod": "POST",
  8677. // "id": "books.mylibrary.bookshelves.removeVolume",
  8678. // "parameterOrder": [
  8679. // "shelf",
  8680. // "volumeId"
  8681. // ],
  8682. // "parameters": {
  8683. // "reason": {
  8684. // "description": "The reason for which the book is removed from the library.",
  8685. // "enum": [
  8686. // "ONBOARDING"
  8687. // ],
  8688. // "enumDescriptions": [
  8689. // "Samples removed from the Onboarding flow."
  8690. // ],
  8691. // "location": "query",
  8692. // "type": "string"
  8693. // },
  8694. // "shelf": {
  8695. // "description": "ID of bookshelf from which to remove a volume.",
  8696. // "location": "path",
  8697. // "required": true,
  8698. // "type": "string"
  8699. // },
  8700. // "source": {
  8701. // "description": "String to identify the originator of this request.",
  8702. // "location": "query",
  8703. // "type": "string"
  8704. // },
  8705. // "volumeId": {
  8706. // "description": "ID of volume to remove.",
  8707. // "location": "query",
  8708. // "required": true,
  8709. // "type": "string"
  8710. // }
  8711. // },
  8712. // "path": "mylibrary/bookshelves/{shelf}/removeVolume",
  8713. // "scopes": [
  8714. // "https://www.googleapis.com/auth/books"
  8715. // ]
  8716. // }
  8717. }
  8718. // method id "books.mylibrary.bookshelves.volumes.list":
  8719. type MylibraryBookshelvesVolumesListCall struct {
  8720. s *Service
  8721. shelf string
  8722. urlParams_ gensupport.URLParams
  8723. ifNoneMatch_ string
  8724. ctx_ context.Context
  8725. header_ http.Header
  8726. }
  8727. // List: Gets volume information for volumes on a bookshelf.
  8728. func (r *MylibraryBookshelvesVolumesService) List(shelf string) *MylibraryBookshelvesVolumesListCall {
  8729. c := &MylibraryBookshelvesVolumesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8730. c.shelf = shelf
  8731. return c
  8732. }
  8733. // Country sets the optional parameter "country": ISO-3166-1 code to
  8734. // override the IP-based location.
  8735. func (c *MylibraryBookshelvesVolumesListCall) Country(country string) *MylibraryBookshelvesVolumesListCall {
  8736. c.urlParams_.Set("country", country)
  8737. return c
  8738. }
  8739. // MaxResults sets the optional parameter "maxResults": Maximum number
  8740. // of results to return
  8741. func (c *MylibraryBookshelvesVolumesListCall) MaxResults(maxResults int64) *MylibraryBookshelvesVolumesListCall {
  8742. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  8743. return c
  8744. }
  8745. // Projection sets the optional parameter "projection": Restrict
  8746. // information returned to a set of selected fields.
  8747. //
  8748. // Possible values:
  8749. // "full" - Includes all volume data.
  8750. // "lite" - Includes a subset of fields in volumeInfo and accessInfo.
  8751. func (c *MylibraryBookshelvesVolumesListCall) Projection(projection string) *MylibraryBookshelvesVolumesListCall {
  8752. c.urlParams_.Set("projection", projection)
  8753. return c
  8754. }
  8755. // Q sets the optional parameter "q": Full-text search query string in
  8756. // this bookshelf.
  8757. func (c *MylibraryBookshelvesVolumesListCall) Q(q string) *MylibraryBookshelvesVolumesListCall {
  8758. c.urlParams_.Set("q", q)
  8759. return c
  8760. }
  8761. // ShowPreorders sets the optional parameter "showPreorders": Set to
  8762. // true to show pre-ordered books. Defaults to false.
  8763. func (c *MylibraryBookshelvesVolumesListCall) ShowPreorders(showPreorders bool) *MylibraryBookshelvesVolumesListCall {
  8764. c.urlParams_.Set("showPreorders", fmt.Sprint(showPreorders))
  8765. return c
  8766. }
  8767. // Source sets the optional parameter "source": String to identify the
  8768. // originator of this request.
  8769. func (c *MylibraryBookshelvesVolumesListCall) Source(source string) *MylibraryBookshelvesVolumesListCall {
  8770. c.urlParams_.Set("source", source)
  8771. return c
  8772. }
  8773. // StartIndex sets the optional parameter "startIndex": Index of the
  8774. // first element to return (starts at 0)
  8775. func (c *MylibraryBookshelvesVolumesListCall) StartIndex(startIndex int64) *MylibraryBookshelvesVolumesListCall {
  8776. c.urlParams_.Set("startIndex", fmt.Sprint(startIndex))
  8777. return c
  8778. }
  8779. // Fields allows partial responses to be retrieved. See
  8780. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8781. // for more information.
  8782. func (c *MylibraryBookshelvesVolumesListCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesVolumesListCall {
  8783. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8784. return c
  8785. }
  8786. // IfNoneMatch sets the optional parameter which makes the operation
  8787. // fail if the object's ETag matches the given value. This is useful for
  8788. // getting updates only after the object has changed since the last
  8789. // request. Use googleapi.IsNotModified to check whether the response
  8790. // error from Do is the result of In-None-Match.
  8791. func (c *MylibraryBookshelvesVolumesListCall) IfNoneMatch(entityTag string) *MylibraryBookshelvesVolumesListCall {
  8792. c.ifNoneMatch_ = entityTag
  8793. return c
  8794. }
  8795. // Context sets the context to be used in this call's Do method. Any
  8796. // pending HTTP request will be aborted if the provided context is
  8797. // canceled.
  8798. func (c *MylibraryBookshelvesVolumesListCall) Context(ctx context.Context) *MylibraryBookshelvesVolumesListCall {
  8799. c.ctx_ = ctx
  8800. return c
  8801. }
  8802. // Header returns an http.Header that can be modified by the caller to
  8803. // add HTTP headers to the request.
  8804. func (c *MylibraryBookshelvesVolumesListCall) Header() http.Header {
  8805. if c.header_ == nil {
  8806. c.header_ = make(http.Header)
  8807. }
  8808. return c.header_
  8809. }
  8810. func (c *MylibraryBookshelvesVolumesListCall) doRequest(alt string) (*http.Response, error) {
  8811. reqHeaders := make(http.Header)
  8812. for k, v := range c.header_ {
  8813. reqHeaders[k] = v
  8814. }
  8815. reqHeaders.Set("User-Agent", c.s.userAgent())
  8816. if c.ifNoneMatch_ != "" {
  8817. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8818. }
  8819. var body io.Reader = nil
  8820. c.urlParams_.Set("alt", alt)
  8821. c.urlParams_.Set("prettyPrint", "false")
  8822. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/volumes")
  8823. urls += "?" + c.urlParams_.Encode()
  8824. req, err := http.NewRequest("GET", urls, body)
  8825. if err != nil {
  8826. return nil, err
  8827. }
  8828. req.Header = reqHeaders
  8829. googleapi.Expand(req.URL, map[string]string{
  8830. "shelf": c.shelf,
  8831. })
  8832. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8833. }
  8834. // Do executes the "books.mylibrary.bookshelves.volumes.list" call.
  8835. // Exactly one of *Volumes or error will be non-nil. Any non-2xx status
  8836. // code is an error. Response headers are in either
  8837. // *Volumes.ServerResponse.Header or (if a response was returned at all)
  8838. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8839. // check whether the returned error was because http.StatusNotModified
  8840. // was returned.
  8841. func (c *MylibraryBookshelvesVolumesListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) {
  8842. gensupport.SetOptions(c.urlParams_, opts...)
  8843. res, err := c.doRequest("json")
  8844. if res != nil && res.StatusCode == http.StatusNotModified {
  8845. if res.Body != nil {
  8846. res.Body.Close()
  8847. }
  8848. return nil, &googleapi.Error{
  8849. Code: res.StatusCode,
  8850. Header: res.Header,
  8851. }
  8852. }
  8853. if err != nil {
  8854. return nil, err
  8855. }
  8856. defer googleapi.CloseBody(res)
  8857. if err := googleapi.CheckResponse(res); err != nil {
  8858. return nil, err
  8859. }
  8860. ret := &Volumes{
  8861. ServerResponse: googleapi.ServerResponse{
  8862. Header: res.Header,
  8863. HTTPStatusCode: res.StatusCode,
  8864. },
  8865. }
  8866. target := &ret
  8867. if err := gensupport.DecodeResponse(target, res); err != nil {
  8868. return nil, err
  8869. }
  8870. return ret, nil
  8871. // {
  8872. // "description": "Gets volume information for volumes on a bookshelf.",
  8873. // "httpMethod": "GET",
  8874. // "id": "books.mylibrary.bookshelves.volumes.list",
  8875. // "parameterOrder": [
  8876. // "shelf"
  8877. // ],
  8878. // "parameters": {
  8879. // "country": {
  8880. // "description": "ISO-3166-1 code to override the IP-based location.",
  8881. // "location": "query",
  8882. // "type": "string"
  8883. // },
  8884. // "maxResults": {
  8885. // "description": "Maximum number of results to return",
  8886. // "format": "uint32",
  8887. // "location": "query",
  8888. // "minimum": "0",
  8889. // "type": "integer"
  8890. // },
  8891. // "projection": {
  8892. // "description": "Restrict information returned to a set of selected fields.",
  8893. // "enum": [
  8894. // "full",
  8895. // "lite"
  8896. // ],
  8897. // "enumDescriptions": [
  8898. // "Includes all volume data.",
  8899. // "Includes a subset of fields in volumeInfo and accessInfo."
  8900. // ],
  8901. // "location": "query",
  8902. // "type": "string"
  8903. // },
  8904. // "q": {
  8905. // "description": "Full-text search query string in this bookshelf.",
  8906. // "location": "query",
  8907. // "type": "string"
  8908. // },
  8909. // "shelf": {
  8910. // "description": "The bookshelf ID or name retrieve volumes for.",
  8911. // "location": "path",
  8912. // "required": true,
  8913. // "type": "string"
  8914. // },
  8915. // "showPreorders": {
  8916. // "description": "Set to true to show pre-ordered books. Defaults to false.",
  8917. // "location": "query",
  8918. // "type": "boolean"
  8919. // },
  8920. // "source": {
  8921. // "description": "String to identify the originator of this request.",
  8922. // "location": "query",
  8923. // "type": "string"
  8924. // },
  8925. // "startIndex": {
  8926. // "description": "Index of the first element to return (starts at 0)",
  8927. // "format": "uint32",
  8928. // "location": "query",
  8929. // "minimum": "0",
  8930. // "type": "integer"
  8931. // }
  8932. // },
  8933. // "path": "mylibrary/bookshelves/{shelf}/volumes",
  8934. // "response": {
  8935. // "$ref": "Volumes"
  8936. // },
  8937. // "scopes": [
  8938. // "https://www.googleapis.com/auth/books"
  8939. // ]
  8940. // }
  8941. }
  8942. // method id "books.mylibrary.readingpositions.get":
  8943. type MylibraryReadingpositionsGetCall struct {
  8944. s *Service
  8945. volumeId string
  8946. urlParams_ gensupport.URLParams
  8947. ifNoneMatch_ string
  8948. ctx_ context.Context
  8949. header_ http.Header
  8950. }
  8951. // Get: Retrieves my reading position information for a volume.
  8952. func (r *MylibraryReadingpositionsService) Get(volumeId string) *MylibraryReadingpositionsGetCall {
  8953. c := &MylibraryReadingpositionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8954. c.volumeId = volumeId
  8955. return c
  8956. }
  8957. // ContentVersion sets the optional parameter "contentVersion": Volume
  8958. // content version for which this reading position is requested.
  8959. func (c *MylibraryReadingpositionsGetCall) ContentVersion(contentVersion string) *MylibraryReadingpositionsGetCall {
  8960. c.urlParams_.Set("contentVersion", contentVersion)
  8961. return c
  8962. }
  8963. // Source sets the optional parameter "source": String to identify the
  8964. // originator of this request.
  8965. func (c *MylibraryReadingpositionsGetCall) Source(source string) *MylibraryReadingpositionsGetCall {
  8966. c.urlParams_.Set("source", source)
  8967. return c
  8968. }
  8969. // Fields allows partial responses to be retrieved. See
  8970. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8971. // for more information.
  8972. func (c *MylibraryReadingpositionsGetCall) Fields(s ...googleapi.Field) *MylibraryReadingpositionsGetCall {
  8973. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8974. return c
  8975. }
  8976. // IfNoneMatch sets the optional parameter which makes the operation
  8977. // fail if the object's ETag matches the given value. This is useful for
  8978. // getting updates only after the object has changed since the last
  8979. // request. Use googleapi.IsNotModified to check whether the response
  8980. // error from Do is the result of In-None-Match.
  8981. func (c *MylibraryReadingpositionsGetCall) IfNoneMatch(entityTag string) *MylibraryReadingpositionsGetCall {
  8982. c.ifNoneMatch_ = entityTag
  8983. return c
  8984. }
  8985. // Context sets the context to be used in this call's Do method. Any
  8986. // pending HTTP request will be aborted if the provided context is
  8987. // canceled.
  8988. func (c *MylibraryReadingpositionsGetCall) Context(ctx context.Context) *MylibraryReadingpositionsGetCall {
  8989. c.ctx_ = ctx
  8990. return c
  8991. }
  8992. // Header returns an http.Header that can be modified by the caller to
  8993. // add HTTP headers to the request.
  8994. func (c *MylibraryReadingpositionsGetCall) Header() http.Header {
  8995. if c.header_ == nil {
  8996. c.header_ = make(http.Header)
  8997. }
  8998. return c.header_
  8999. }
  9000. func (c *MylibraryReadingpositionsGetCall) doRequest(alt string) (*http.Response, error) {
  9001. reqHeaders := make(http.Header)
  9002. for k, v := range c.header_ {
  9003. reqHeaders[k] = v
  9004. }
  9005. reqHeaders.Set("User-Agent", c.s.userAgent())
  9006. if c.ifNoneMatch_ != "" {
  9007. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9008. }
  9009. var body io.Reader = nil
  9010. c.urlParams_.Set("alt", alt)
  9011. c.urlParams_.Set("prettyPrint", "false")
  9012. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/readingpositions/{volumeId}")
  9013. urls += "?" + c.urlParams_.Encode()
  9014. req, err := http.NewRequest("GET", urls, body)
  9015. if err != nil {
  9016. return nil, err
  9017. }
  9018. req.Header = reqHeaders
  9019. googleapi.Expand(req.URL, map[string]string{
  9020. "volumeId": c.volumeId,
  9021. })
  9022. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9023. }
  9024. // Do executes the "books.mylibrary.readingpositions.get" call.
  9025. // Exactly one of *ReadingPosition or error will be non-nil. Any non-2xx
  9026. // status code is an error. Response headers are in either
  9027. // *ReadingPosition.ServerResponse.Header or (if a response was returned
  9028. // at all) in error.(*googleapi.Error).Header. Use
  9029. // googleapi.IsNotModified to check whether the returned error was
  9030. // because http.StatusNotModified was returned.
  9031. func (c *MylibraryReadingpositionsGetCall) Do(opts ...googleapi.CallOption) (*ReadingPosition, error) {
  9032. gensupport.SetOptions(c.urlParams_, opts...)
  9033. res, err := c.doRequest("json")
  9034. if res != nil && res.StatusCode == http.StatusNotModified {
  9035. if res.Body != nil {
  9036. res.Body.Close()
  9037. }
  9038. return nil, &googleapi.Error{
  9039. Code: res.StatusCode,
  9040. Header: res.Header,
  9041. }
  9042. }
  9043. if err != nil {
  9044. return nil, err
  9045. }
  9046. defer googleapi.CloseBody(res)
  9047. if err := googleapi.CheckResponse(res); err != nil {
  9048. return nil, err
  9049. }
  9050. ret := &ReadingPosition{
  9051. ServerResponse: googleapi.ServerResponse{
  9052. Header: res.Header,
  9053. HTTPStatusCode: res.StatusCode,
  9054. },
  9055. }
  9056. target := &ret
  9057. if err := gensupport.DecodeResponse(target, res); err != nil {
  9058. return nil, err
  9059. }
  9060. return ret, nil
  9061. // {
  9062. // "description": "Retrieves my reading position information for a volume.",
  9063. // "httpMethod": "GET",
  9064. // "id": "books.mylibrary.readingpositions.get",
  9065. // "parameterOrder": [
  9066. // "volumeId"
  9067. // ],
  9068. // "parameters": {
  9069. // "contentVersion": {
  9070. // "description": "Volume content version for which this reading position is requested.",
  9071. // "location": "query",
  9072. // "type": "string"
  9073. // },
  9074. // "source": {
  9075. // "description": "String to identify the originator of this request.",
  9076. // "location": "query",
  9077. // "type": "string"
  9078. // },
  9079. // "volumeId": {
  9080. // "description": "ID of volume for which to retrieve a reading position.",
  9081. // "location": "path",
  9082. // "required": true,
  9083. // "type": "string"
  9084. // }
  9085. // },
  9086. // "path": "mylibrary/readingpositions/{volumeId}",
  9087. // "response": {
  9088. // "$ref": "ReadingPosition"
  9089. // },
  9090. // "scopes": [
  9091. // "https://www.googleapis.com/auth/books"
  9092. // ]
  9093. // }
  9094. }
  9095. // method id "books.mylibrary.readingpositions.setPosition":
  9096. type MylibraryReadingpositionsSetPositionCall struct {
  9097. s *Service
  9098. volumeId string
  9099. urlParams_ gensupport.URLParams
  9100. ctx_ context.Context
  9101. header_ http.Header
  9102. }
  9103. // SetPosition: Sets my reading position information for a volume.
  9104. func (r *MylibraryReadingpositionsService) SetPosition(volumeId string, timestamp string, position string) *MylibraryReadingpositionsSetPositionCall {
  9105. c := &MylibraryReadingpositionsSetPositionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9106. c.volumeId = volumeId
  9107. c.urlParams_.Set("timestamp", timestamp)
  9108. c.urlParams_.Set("position", position)
  9109. return c
  9110. }
  9111. // Action sets the optional parameter "action": Action that caused this
  9112. // reading position to be set.
  9113. //
  9114. // Possible values:
  9115. // "bookmark" - User chose bookmark within volume.
  9116. // "chapter" - User selected chapter from list.
  9117. // "next-page" - Next page event.
  9118. // "prev-page" - Previous page event.
  9119. // "scroll" - User navigated to page.
  9120. // "search" - User chose search results within volume.
  9121. func (c *MylibraryReadingpositionsSetPositionCall) Action(action string) *MylibraryReadingpositionsSetPositionCall {
  9122. c.urlParams_.Set("action", action)
  9123. return c
  9124. }
  9125. // ContentVersion sets the optional parameter "contentVersion": Volume
  9126. // content version for which this reading position applies.
  9127. func (c *MylibraryReadingpositionsSetPositionCall) ContentVersion(contentVersion string) *MylibraryReadingpositionsSetPositionCall {
  9128. c.urlParams_.Set("contentVersion", contentVersion)
  9129. return c
  9130. }
  9131. // DeviceCookie sets the optional parameter "deviceCookie": Random
  9132. // persistent device cookie optional on set position.
  9133. func (c *MylibraryReadingpositionsSetPositionCall) DeviceCookie(deviceCookie string) *MylibraryReadingpositionsSetPositionCall {
  9134. c.urlParams_.Set("deviceCookie", deviceCookie)
  9135. return c
  9136. }
  9137. // Source sets the optional parameter "source": String to identify the
  9138. // originator of this request.
  9139. func (c *MylibraryReadingpositionsSetPositionCall) Source(source string) *MylibraryReadingpositionsSetPositionCall {
  9140. c.urlParams_.Set("source", source)
  9141. return c
  9142. }
  9143. // Fields allows partial responses to be retrieved. See
  9144. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9145. // for more information.
  9146. func (c *MylibraryReadingpositionsSetPositionCall) Fields(s ...googleapi.Field) *MylibraryReadingpositionsSetPositionCall {
  9147. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9148. return c
  9149. }
  9150. // Context sets the context to be used in this call's Do method. Any
  9151. // pending HTTP request will be aborted if the provided context is
  9152. // canceled.
  9153. func (c *MylibraryReadingpositionsSetPositionCall) Context(ctx context.Context) *MylibraryReadingpositionsSetPositionCall {
  9154. c.ctx_ = ctx
  9155. return c
  9156. }
  9157. // Header returns an http.Header that can be modified by the caller to
  9158. // add HTTP headers to the request.
  9159. func (c *MylibraryReadingpositionsSetPositionCall) Header() http.Header {
  9160. if c.header_ == nil {
  9161. c.header_ = make(http.Header)
  9162. }
  9163. return c.header_
  9164. }
  9165. func (c *MylibraryReadingpositionsSetPositionCall) doRequest(alt string) (*http.Response, error) {
  9166. reqHeaders := make(http.Header)
  9167. for k, v := range c.header_ {
  9168. reqHeaders[k] = v
  9169. }
  9170. reqHeaders.Set("User-Agent", c.s.userAgent())
  9171. var body io.Reader = nil
  9172. c.urlParams_.Set("alt", alt)
  9173. c.urlParams_.Set("prettyPrint", "false")
  9174. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/readingpositions/{volumeId}/setPosition")
  9175. urls += "?" + c.urlParams_.Encode()
  9176. req, err := http.NewRequest("POST", urls, body)
  9177. if err != nil {
  9178. return nil, err
  9179. }
  9180. req.Header = reqHeaders
  9181. googleapi.Expand(req.URL, map[string]string{
  9182. "volumeId": c.volumeId,
  9183. })
  9184. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9185. }
  9186. // Do executes the "books.mylibrary.readingpositions.setPosition" call.
  9187. func (c *MylibraryReadingpositionsSetPositionCall) Do(opts ...googleapi.CallOption) error {
  9188. gensupport.SetOptions(c.urlParams_, opts...)
  9189. res, err := c.doRequest("json")
  9190. if err != nil {
  9191. return err
  9192. }
  9193. defer googleapi.CloseBody(res)
  9194. if err := googleapi.CheckResponse(res); err != nil {
  9195. return err
  9196. }
  9197. return nil
  9198. // {
  9199. // "description": "Sets my reading position information for a volume.",
  9200. // "httpMethod": "POST",
  9201. // "id": "books.mylibrary.readingpositions.setPosition",
  9202. // "parameterOrder": [
  9203. // "volumeId",
  9204. // "timestamp",
  9205. // "position"
  9206. // ],
  9207. // "parameters": {
  9208. // "action": {
  9209. // "description": "Action that caused this reading position to be set.",
  9210. // "enum": [
  9211. // "bookmark",
  9212. // "chapter",
  9213. // "next-page",
  9214. // "prev-page",
  9215. // "scroll",
  9216. // "search"
  9217. // ],
  9218. // "enumDescriptions": [
  9219. // "User chose bookmark within volume.",
  9220. // "User selected chapter from list.",
  9221. // "Next page event.",
  9222. // "Previous page event.",
  9223. // "User navigated to page.",
  9224. // "User chose search results within volume."
  9225. // ],
  9226. // "location": "query",
  9227. // "type": "string"
  9228. // },
  9229. // "contentVersion": {
  9230. // "description": "Volume content version for which this reading position applies.",
  9231. // "location": "query",
  9232. // "type": "string"
  9233. // },
  9234. // "deviceCookie": {
  9235. // "description": "Random persistent device cookie optional on set position.",
  9236. // "location": "query",
  9237. // "type": "string"
  9238. // },
  9239. // "position": {
  9240. // "description": "Position string for the new volume reading position.",
  9241. // "location": "query",
  9242. // "required": true,
  9243. // "type": "string"
  9244. // },
  9245. // "source": {
  9246. // "description": "String to identify the originator of this request.",
  9247. // "location": "query",
  9248. // "type": "string"
  9249. // },
  9250. // "timestamp": {
  9251. // "description": "RFC 3339 UTC format timestamp associated with this reading position.",
  9252. // "location": "query",
  9253. // "required": true,
  9254. // "type": "string"
  9255. // },
  9256. // "volumeId": {
  9257. // "description": "ID of volume for which to update the reading position.",
  9258. // "location": "path",
  9259. // "required": true,
  9260. // "type": "string"
  9261. // }
  9262. // },
  9263. // "path": "mylibrary/readingpositions/{volumeId}/setPosition",
  9264. // "scopes": [
  9265. // "https://www.googleapis.com/auth/books"
  9266. // ]
  9267. // }
  9268. }
  9269. // method id "books.notification.get":
  9270. type NotificationGetCall struct {
  9271. s *Service
  9272. urlParams_ gensupport.URLParams
  9273. ifNoneMatch_ string
  9274. ctx_ context.Context
  9275. header_ http.Header
  9276. }
  9277. // Get: Returns notification details for a given notification id.
  9278. func (r *NotificationService) Get(notificationId string) *NotificationGetCall {
  9279. c := &NotificationGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9280. c.urlParams_.Set("notification_id", notificationId)
  9281. return c
  9282. }
  9283. // Locale sets the optional parameter "locale": ISO-639-1 language and
  9284. // ISO-3166-1 country code. Ex: 'en_US'. Used for generating
  9285. // notification title and body.
  9286. func (c *NotificationGetCall) Locale(locale string) *NotificationGetCall {
  9287. c.urlParams_.Set("locale", locale)
  9288. return c
  9289. }
  9290. // Source sets the optional parameter "source": String to identify the
  9291. // originator of this request.
  9292. func (c *NotificationGetCall) Source(source string) *NotificationGetCall {
  9293. c.urlParams_.Set("source", source)
  9294. return c
  9295. }
  9296. // Fields allows partial responses to be retrieved. See
  9297. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9298. // for more information.
  9299. func (c *NotificationGetCall) Fields(s ...googleapi.Field) *NotificationGetCall {
  9300. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9301. return c
  9302. }
  9303. // IfNoneMatch sets the optional parameter which makes the operation
  9304. // fail if the object's ETag matches the given value. This is useful for
  9305. // getting updates only after the object has changed since the last
  9306. // request. Use googleapi.IsNotModified to check whether the response
  9307. // error from Do is the result of In-None-Match.
  9308. func (c *NotificationGetCall) IfNoneMatch(entityTag string) *NotificationGetCall {
  9309. c.ifNoneMatch_ = entityTag
  9310. return c
  9311. }
  9312. // Context sets the context to be used in this call's Do method. Any
  9313. // pending HTTP request will be aborted if the provided context is
  9314. // canceled.
  9315. func (c *NotificationGetCall) Context(ctx context.Context) *NotificationGetCall {
  9316. c.ctx_ = ctx
  9317. return c
  9318. }
  9319. // Header returns an http.Header that can be modified by the caller to
  9320. // add HTTP headers to the request.
  9321. func (c *NotificationGetCall) Header() http.Header {
  9322. if c.header_ == nil {
  9323. c.header_ = make(http.Header)
  9324. }
  9325. return c.header_
  9326. }
  9327. func (c *NotificationGetCall) doRequest(alt string) (*http.Response, error) {
  9328. reqHeaders := make(http.Header)
  9329. for k, v := range c.header_ {
  9330. reqHeaders[k] = v
  9331. }
  9332. reqHeaders.Set("User-Agent", c.s.userAgent())
  9333. if c.ifNoneMatch_ != "" {
  9334. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9335. }
  9336. var body io.Reader = nil
  9337. c.urlParams_.Set("alt", alt)
  9338. c.urlParams_.Set("prettyPrint", "false")
  9339. urls := googleapi.ResolveRelative(c.s.BasePath, "notification/get")
  9340. urls += "?" + c.urlParams_.Encode()
  9341. req, err := http.NewRequest("GET", urls, body)
  9342. if err != nil {
  9343. return nil, err
  9344. }
  9345. req.Header = reqHeaders
  9346. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9347. }
  9348. // Do executes the "books.notification.get" call.
  9349. // Exactly one of *Notification or error will be non-nil. Any non-2xx
  9350. // status code is an error. Response headers are in either
  9351. // *Notification.ServerResponse.Header or (if a response was returned at
  9352. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9353. // to check whether the returned error was because
  9354. // http.StatusNotModified was returned.
  9355. func (c *NotificationGetCall) Do(opts ...googleapi.CallOption) (*Notification, error) {
  9356. gensupport.SetOptions(c.urlParams_, opts...)
  9357. res, err := c.doRequest("json")
  9358. if res != nil && res.StatusCode == http.StatusNotModified {
  9359. if res.Body != nil {
  9360. res.Body.Close()
  9361. }
  9362. return nil, &googleapi.Error{
  9363. Code: res.StatusCode,
  9364. Header: res.Header,
  9365. }
  9366. }
  9367. if err != nil {
  9368. return nil, err
  9369. }
  9370. defer googleapi.CloseBody(res)
  9371. if err := googleapi.CheckResponse(res); err != nil {
  9372. return nil, err
  9373. }
  9374. ret := &Notification{
  9375. ServerResponse: googleapi.ServerResponse{
  9376. Header: res.Header,
  9377. HTTPStatusCode: res.StatusCode,
  9378. },
  9379. }
  9380. target := &ret
  9381. if err := gensupport.DecodeResponse(target, res); err != nil {
  9382. return nil, err
  9383. }
  9384. return ret, nil
  9385. // {
  9386. // "description": "Returns notification details for a given notification id.",
  9387. // "httpMethod": "GET",
  9388. // "id": "books.notification.get",
  9389. // "parameterOrder": [
  9390. // "notification_id"
  9391. // ],
  9392. // "parameters": {
  9393. // "locale": {
  9394. // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating notification title and body.",
  9395. // "location": "query",
  9396. // "type": "string"
  9397. // },
  9398. // "notification_id": {
  9399. // "description": "String to identify the notification.",
  9400. // "location": "query",
  9401. // "required": true,
  9402. // "type": "string"
  9403. // },
  9404. // "source": {
  9405. // "description": "String to identify the originator of this request.",
  9406. // "location": "query",
  9407. // "type": "string"
  9408. // }
  9409. // },
  9410. // "path": "notification/get",
  9411. // "response": {
  9412. // "$ref": "Notification"
  9413. // },
  9414. // "scopes": [
  9415. // "https://www.googleapis.com/auth/books"
  9416. // ]
  9417. // }
  9418. }
  9419. // method id "books.onboarding.listCategories":
  9420. type OnboardingListCategoriesCall struct {
  9421. s *Service
  9422. urlParams_ gensupport.URLParams
  9423. ifNoneMatch_ string
  9424. ctx_ context.Context
  9425. header_ http.Header
  9426. }
  9427. // ListCategories: List categories for onboarding experience.
  9428. func (r *OnboardingService) ListCategories() *OnboardingListCategoriesCall {
  9429. c := &OnboardingListCategoriesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9430. return c
  9431. }
  9432. // Locale sets the optional parameter "locale": ISO-639-1 language and
  9433. // ISO-3166-1 country code. Default is en-US if unset.
  9434. func (c *OnboardingListCategoriesCall) Locale(locale string) *OnboardingListCategoriesCall {
  9435. c.urlParams_.Set("locale", locale)
  9436. return c
  9437. }
  9438. // Fields allows partial responses to be retrieved. See
  9439. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9440. // for more information.
  9441. func (c *OnboardingListCategoriesCall) Fields(s ...googleapi.Field) *OnboardingListCategoriesCall {
  9442. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9443. return c
  9444. }
  9445. // IfNoneMatch sets the optional parameter which makes the operation
  9446. // fail if the object's ETag matches the given value. This is useful for
  9447. // getting updates only after the object has changed since the last
  9448. // request. Use googleapi.IsNotModified to check whether the response
  9449. // error from Do is the result of In-None-Match.
  9450. func (c *OnboardingListCategoriesCall) IfNoneMatch(entityTag string) *OnboardingListCategoriesCall {
  9451. c.ifNoneMatch_ = entityTag
  9452. return c
  9453. }
  9454. // Context sets the context to be used in this call's Do method. Any
  9455. // pending HTTP request will be aborted if the provided context is
  9456. // canceled.
  9457. func (c *OnboardingListCategoriesCall) Context(ctx context.Context) *OnboardingListCategoriesCall {
  9458. c.ctx_ = ctx
  9459. return c
  9460. }
  9461. // Header returns an http.Header that can be modified by the caller to
  9462. // add HTTP headers to the request.
  9463. func (c *OnboardingListCategoriesCall) Header() http.Header {
  9464. if c.header_ == nil {
  9465. c.header_ = make(http.Header)
  9466. }
  9467. return c.header_
  9468. }
  9469. func (c *OnboardingListCategoriesCall) doRequest(alt string) (*http.Response, error) {
  9470. reqHeaders := make(http.Header)
  9471. for k, v := range c.header_ {
  9472. reqHeaders[k] = v
  9473. }
  9474. reqHeaders.Set("User-Agent", c.s.userAgent())
  9475. if c.ifNoneMatch_ != "" {
  9476. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9477. }
  9478. var body io.Reader = nil
  9479. c.urlParams_.Set("alt", alt)
  9480. c.urlParams_.Set("prettyPrint", "false")
  9481. urls := googleapi.ResolveRelative(c.s.BasePath, "onboarding/listCategories")
  9482. urls += "?" + c.urlParams_.Encode()
  9483. req, err := http.NewRequest("GET", urls, body)
  9484. if err != nil {
  9485. return nil, err
  9486. }
  9487. req.Header = reqHeaders
  9488. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9489. }
  9490. // Do executes the "books.onboarding.listCategories" call.
  9491. // Exactly one of *Category or error will be non-nil. Any non-2xx status
  9492. // code is an error. Response headers are in either
  9493. // *Category.ServerResponse.Header or (if a response was returned at
  9494. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9495. // to check whether the returned error was because
  9496. // http.StatusNotModified was returned.
  9497. func (c *OnboardingListCategoriesCall) Do(opts ...googleapi.CallOption) (*Category, error) {
  9498. gensupport.SetOptions(c.urlParams_, opts...)
  9499. res, err := c.doRequest("json")
  9500. if res != nil && res.StatusCode == http.StatusNotModified {
  9501. if res.Body != nil {
  9502. res.Body.Close()
  9503. }
  9504. return nil, &googleapi.Error{
  9505. Code: res.StatusCode,
  9506. Header: res.Header,
  9507. }
  9508. }
  9509. if err != nil {
  9510. return nil, err
  9511. }
  9512. defer googleapi.CloseBody(res)
  9513. if err := googleapi.CheckResponse(res); err != nil {
  9514. return nil, err
  9515. }
  9516. ret := &Category{
  9517. ServerResponse: googleapi.ServerResponse{
  9518. Header: res.Header,
  9519. HTTPStatusCode: res.StatusCode,
  9520. },
  9521. }
  9522. target := &ret
  9523. if err := gensupport.DecodeResponse(target, res); err != nil {
  9524. return nil, err
  9525. }
  9526. return ret, nil
  9527. // {
  9528. // "description": "List categories for onboarding experience.",
  9529. // "httpMethod": "GET",
  9530. // "id": "books.onboarding.listCategories",
  9531. // "parameters": {
  9532. // "locale": {
  9533. // "description": "ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset.",
  9534. // "location": "query",
  9535. // "type": "string"
  9536. // }
  9537. // },
  9538. // "path": "onboarding/listCategories",
  9539. // "response": {
  9540. // "$ref": "Category"
  9541. // },
  9542. // "scopes": [
  9543. // "https://www.googleapis.com/auth/books"
  9544. // ]
  9545. // }
  9546. }
  9547. // method id "books.onboarding.listCategoryVolumes":
  9548. type OnboardingListCategoryVolumesCall struct {
  9549. s *Service
  9550. urlParams_ gensupport.URLParams
  9551. ifNoneMatch_ string
  9552. ctx_ context.Context
  9553. header_ http.Header
  9554. }
  9555. // ListCategoryVolumes: List available volumes under categories for
  9556. // onboarding experience.
  9557. func (r *OnboardingService) ListCategoryVolumes() *OnboardingListCategoryVolumesCall {
  9558. c := &OnboardingListCategoryVolumesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9559. return c
  9560. }
  9561. // CategoryId sets the optional parameter "categoryId": List of category
  9562. // ids requested.
  9563. func (c *OnboardingListCategoryVolumesCall) CategoryId(categoryId ...string) *OnboardingListCategoryVolumesCall {
  9564. c.urlParams_.SetMulti("categoryId", append([]string{}, categoryId...))
  9565. return c
  9566. }
  9567. // Locale sets the optional parameter "locale": ISO-639-1 language and
  9568. // ISO-3166-1 country code. Default is en-US if unset.
  9569. func (c *OnboardingListCategoryVolumesCall) Locale(locale string) *OnboardingListCategoryVolumesCall {
  9570. c.urlParams_.Set("locale", locale)
  9571. return c
  9572. }
  9573. // MaxAllowedMaturityRating sets the optional parameter
  9574. // "maxAllowedMaturityRating": The maximum allowed maturity rating of
  9575. // returned volumes. Books with a higher maturity rating are filtered
  9576. // out.
  9577. //
  9578. // Possible values:
  9579. // "mature" - Show books which are rated mature or lower.
  9580. // "not-mature" - Show books which are rated not mature.
  9581. func (c *OnboardingListCategoryVolumesCall) MaxAllowedMaturityRating(maxAllowedMaturityRating string) *OnboardingListCategoryVolumesCall {
  9582. c.urlParams_.Set("maxAllowedMaturityRating", maxAllowedMaturityRating)
  9583. return c
  9584. }
  9585. // PageSize sets the optional parameter "pageSize": Number of maximum
  9586. // results per page to be included in the response.
  9587. func (c *OnboardingListCategoryVolumesCall) PageSize(pageSize int64) *OnboardingListCategoryVolumesCall {
  9588. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9589. return c
  9590. }
  9591. // PageToken sets the optional parameter "pageToken": The value of the
  9592. // nextToken from the previous page.
  9593. func (c *OnboardingListCategoryVolumesCall) PageToken(pageToken string) *OnboardingListCategoryVolumesCall {
  9594. c.urlParams_.Set("pageToken", pageToken)
  9595. return c
  9596. }
  9597. // Fields allows partial responses to be retrieved. See
  9598. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9599. // for more information.
  9600. func (c *OnboardingListCategoryVolumesCall) Fields(s ...googleapi.Field) *OnboardingListCategoryVolumesCall {
  9601. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9602. return c
  9603. }
  9604. // IfNoneMatch sets the optional parameter which makes the operation
  9605. // fail if the object's ETag matches the given value. This is useful for
  9606. // getting updates only after the object has changed since the last
  9607. // request. Use googleapi.IsNotModified to check whether the response
  9608. // error from Do is the result of In-None-Match.
  9609. func (c *OnboardingListCategoryVolumesCall) IfNoneMatch(entityTag string) *OnboardingListCategoryVolumesCall {
  9610. c.ifNoneMatch_ = entityTag
  9611. return c
  9612. }
  9613. // Context sets the context to be used in this call's Do method. Any
  9614. // pending HTTP request will be aborted if the provided context is
  9615. // canceled.
  9616. func (c *OnboardingListCategoryVolumesCall) Context(ctx context.Context) *OnboardingListCategoryVolumesCall {
  9617. c.ctx_ = ctx
  9618. return c
  9619. }
  9620. // Header returns an http.Header that can be modified by the caller to
  9621. // add HTTP headers to the request.
  9622. func (c *OnboardingListCategoryVolumesCall) Header() http.Header {
  9623. if c.header_ == nil {
  9624. c.header_ = make(http.Header)
  9625. }
  9626. return c.header_
  9627. }
  9628. func (c *OnboardingListCategoryVolumesCall) doRequest(alt string) (*http.Response, error) {
  9629. reqHeaders := make(http.Header)
  9630. for k, v := range c.header_ {
  9631. reqHeaders[k] = v
  9632. }
  9633. reqHeaders.Set("User-Agent", c.s.userAgent())
  9634. if c.ifNoneMatch_ != "" {
  9635. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9636. }
  9637. var body io.Reader = nil
  9638. c.urlParams_.Set("alt", alt)
  9639. c.urlParams_.Set("prettyPrint", "false")
  9640. urls := googleapi.ResolveRelative(c.s.BasePath, "onboarding/listCategoryVolumes")
  9641. urls += "?" + c.urlParams_.Encode()
  9642. req, err := http.NewRequest("GET", urls, body)
  9643. if err != nil {
  9644. return nil, err
  9645. }
  9646. req.Header = reqHeaders
  9647. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9648. }
  9649. // Do executes the "books.onboarding.listCategoryVolumes" call.
  9650. // Exactly one of *Volume2 or error will be non-nil. Any non-2xx status
  9651. // code is an error. Response headers are in either
  9652. // *Volume2.ServerResponse.Header or (if a response was returned at all)
  9653. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9654. // check whether the returned error was because http.StatusNotModified
  9655. // was returned.
  9656. func (c *OnboardingListCategoryVolumesCall) Do(opts ...googleapi.CallOption) (*Volume2, error) {
  9657. gensupport.SetOptions(c.urlParams_, opts...)
  9658. res, err := c.doRequest("json")
  9659. if res != nil && res.StatusCode == http.StatusNotModified {
  9660. if res.Body != nil {
  9661. res.Body.Close()
  9662. }
  9663. return nil, &googleapi.Error{
  9664. Code: res.StatusCode,
  9665. Header: res.Header,
  9666. }
  9667. }
  9668. if err != nil {
  9669. return nil, err
  9670. }
  9671. defer googleapi.CloseBody(res)
  9672. if err := googleapi.CheckResponse(res); err != nil {
  9673. return nil, err
  9674. }
  9675. ret := &Volume2{
  9676. ServerResponse: googleapi.ServerResponse{
  9677. Header: res.Header,
  9678. HTTPStatusCode: res.StatusCode,
  9679. },
  9680. }
  9681. target := &ret
  9682. if err := gensupport.DecodeResponse(target, res); err != nil {
  9683. return nil, err
  9684. }
  9685. return ret, nil
  9686. // {
  9687. // "description": "List available volumes under categories for onboarding experience.",
  9688. // "httpMethod": "GET",
  9689. // "id": "books.onboarding.listCategoryVolumes",
  9690. // "parameters": {
  9691. // "categoryId": {
  9692. // "description": "List of category ids requested.",
  9693. // "location": "query",
  9694. // "repeated": true,
  9695. // "type": "string"
  9696. // },
  9697. // "locale": {
  9698. // "description": "ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset.",
  9699. // "location": "query",
  9700. // "type": "string"
  9701. // },
  9702. // "maxAllowedMaturityRating": {
  9703. // "description": "The maximum allowed maturity rating of returned volumes. Books with a higher maturity rating are filtered out.",
  9704. // "enum": [
  9705. // "mature",
  9706. // "not-mature"
  9707. // ],
  9708. // "enumDescriptions": [
  9709. // "Show books which are rated mature or lower.",
  9710. // "Show books which are rated not mature."
  9711. // ],
  9712. // "location": "query",
  9713. // "type": "string"
  9714. // },
  9715. // "pageSize": {
  9716. // "description": "Number of maximum results per page to be included in the response.",
  9717. // "format": "uint32",
  9718. // "location": "query",
  9719. // "type": "integer"
  9720. // },
  9721. // "pageToken": {
  9722. // "description": "The value of the nextToken from the previous page.",
  9723. // "location": "query",
  9724. // "type": "string"
  9725. // }
  9726. // },
  9727. // "path": "onboarding/listCategoryVolumes",
  9728. // "response": {
  9729. // "$ref": "Volume2"
  9730. // },
  9731. // "scopes": [
  9732. // "https://www.googleapis.com/auth/books"
  9733. // ]
  9734. // }
  9735. }
  9736. // Pages invokes f for each page of results.
  9737. // A non-nil error returned from f will halt the iteration.
  9738. // The provided context supersedes any context provided to the Context method.
  9739. func (c *OnboardingListCategoryVolumesCall) Pages(ctx context.Context, f func(*Volume2) error) error {
  9740. c.ctx_ = ctx
  9741. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  9742. for {
  9743. x, err := c.Do()
  9744. if err != nil {
  9745. return err
  9746. }
  9747. if err := f(x); err != nil {
  9748. return err
  9749. }
  9750. if x.NextPageToken == "" {
  9751. return nil
  9752. }
  9753. c.PageToken(x.NextPageToken)
  9754. }
  9755. }
  9756. // method id "books.personalizedstream.get":
  9757. type PersonalizedstreamGetCall struct {
  9758. s *Service
  9759. urlParams_ gensupport.URLParams
  9760. ifNoneMatch_ string
  9761. ctx_ context.Context
  9762. header_ http.Header
  9763. }
  9764. // Get: Returns a stream of personalized book clusters
  9765. func (r *PersonalizedstreamService) Get() *PersonalizedstreamGetCall {
  9766. c := &PersonalizedstreamGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9767. return c
  9768. }
  9769. // Locale sets the optional parameter "locale": ISO-639-1 language and
  9770. // ISO-3166-1 country code. Ex: 'en_US'. Used for generating
  9771. // recommendations.
  9772. func (c *PersonalizedstreamGetCall) Locale(locale string) *PersonalizedstreamGetCall {
  9773. c.urlParams_.Set("locale", locale)
  9774. return c
  9775. }
  9776. // MaxAllowedMaturityRating sets the optional parameter
  9777. // "maxAllowedMaturityRating": The maximum allowed maturity rating of
  9778. // returned recommendations. Books with a higher maturity rating are
  9779. // filtered out.
  9780. //
  9781. // Possible values:
  9782. // "mature" - Show books which are rated mature or lower.
  9783. // "not-mature" - Show books which are rated not mature.
  9784. func (c *PersonalizedstreamGetCall) MaxAllowedMaturityRating(maxAllowedMaturityRating string) *PersonalizedstreamGetCall {
  9785. c.urlParams_.Set("maxAllowedMaturityRating", maxAllowedMaturityRating)
  9786. return c
  9787. }
  9788. // Source sets the optional parameter "source": String to identify the
  9789. // originator of this request.
  9790. func (c *PersonalizedstreamGetCall) Source(source string) *PersonalizedstreamGetCall {
  9791. c.urlParams_.Set("source", source)
  9792. return c
  9793. }
  9794. // Fields allows partial responses to be retrieved. See
  9795. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9796. // for more information.
  9797. func (c *PersonalizedstreamGetCall) Fields(s ...googleapi.Field) *PersonalizedstreamGetCall {
  9798. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9799. return c
  9800. }
  9801. // IfNoneMatch sets the optional parameter which makes the operation
  9802. // fail if the object's ETag matches the given value. This is useful for
  9803. // getting updates only after the object has changed since the last
  9804. // request. Use googleapi.IsNotModified to check whether the response
  9805. // error from Do is the result of In-None-Match.
  9806. func (c *PersonalizedstreamGetCall) IfNoneMatch(entityTag string) *PersonalizedstreamGetCall {
  9807. c.ifNoneMatch_ = entityTag
  9808. return c
  9809. }
  9810. // Context sets the context to be used in this call's Do method. Any
  9811. // pending HTTP request will be aborted if the provided context is
  9812. // canceled.
  9813. func (c *PersonalizedstreamGetCall) Context(ctx context.Context) *PersonalizedstreamGetCall {
  9814. c.ctx_ = ctx
  9815. return c
  9816. }
  9817. // Header returns an http.Header that can be modified by the caller to
  9818. // add HTTP headers to the request.
  9819. func (c *PersonalizedstreamGetCall) Header() http.Header {
  9820. if c.header_ == nil {
  9821. c.header_ = make(http.Header)
  9822. }
  9823. return c.header_
  9824. }
  9825. func (c *PersonalizedstreamGetCall) doRequest(alt string) (*http.Response, error) {
  9826. reqHeaders := make(http.Header)
  9827. for k, v := range c.header_ {
  9828. reqHeaders[k] = v
  9829. }
  9830. reqHeaders.Set("User-Agent", c.s.userAgent())
  9831. if c.ifNoneMatch_ != "" {
  9832. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9833. }
  9834. var body io.Reader = nil
  9835. c.urlParams_.Set("alt", alt)
  9836. c.urlParams_.Set("prettyPrint", "false")
  9837. urls := googleapi.ResolveRelative(c.s.BasePath, "personalizedstream/get")
  9838. urls += "?" + c.urlParams_.Encode()
  9839. req, err := http.NewRequest("GET", urls, body)
  9840. if err != nil {
  9841. return nil, err
  9842. }
  9843. req.Header = reqHeaders
  9844. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9845. }
  9846. // Do executes the "books.personalizedstream.get" call.
  9847. // Exactly one of *Discoveryclusters or error will be non-nil. Any
  9848. // non-2xx status code is an error. Response headers are in either
  9849. // *Discoveryclusters.ServerResponse.Header or (if a response was
  9850. // returned at all) in error.(*googleapi.Error).Header. Use
  9851. // googleapi.IsNotModified to check whether the returned error was
  9852. // because http.StatusNotModified was returned.
  9853. func (c *PersonalizedstreamGetCall) Do(opts ...googleapi.CallOption) (*Discoveryclusters, error) {
  9854. gensupport.SetOptions(c.urlParams_, opts...)
  9855. res, err := c.doRequest("json")
  9856. if res != nil && res.StatusCode == http.StatusNotModified {
  9857. if res.Body != nil {
  9858. res.Body.Close()
  9859. }
  9860. return nil, &googleapi.Error{
  9861. Code: res.StatusCode,
  9862. Header: res.Header,
  9863. }
  9864. }
  9865. if err != nil {
  9866. return nil, err
  9867. }
  9868. defer googleapi.CloseBody(res)
  9869. if err := googleapi.CheckResponse(res); err != nil {
  9870. return nil, err
  9871. }
  9872. ret := &Discoveryclusters{
  9873. ServerResponse: googleapi.ServerResponse{
  9874. Header: res.Header,
  9875. HTTPStatusCode: res.StatusCode,
  9876. },
  9877. }
  9878. target := &ret
  9879. if err := gensupport.DecodeResponse(target, res); err != nil {
  9880. return nil, err
  9881. }
  9882. return ret, nil
  9883. // {
  9884. // "description": "Returns a stream of personalized book clusters",
  9885. // "httpMethod": "GET",
  9886. // "id": "books.personalizedstream.get",
  9887. // "parameters": {
  9888. // "locale": {
  9889. // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
  9890. // "location": "query",
  9891. // "type": "string"
  9892. // },
  9893. // "maxAllowedMaturityRating": {
  9894. // "description": "The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.",
  9895. // "enum": [
  9896. // "mature",
  9897. // "not-mature"
  9898. // ],
  9899. // "enumDescriptions": [
  9900. // "Show books which are rated mature or lower.",
  9901. // "Show books which are rated not mature."
  9902. // ],
  9903. // "location": "query",
  9904. // "type": "string"
  9905. // },
  9906. // "source": {
  9907. // "description": "String to identify the originator of this request.",
  9908. // "location": "query",
  9909. // "type": "string"
  9910. // }
  9911. // },
  9912. // "path": "personalizedstream/get",
  9913. // "response": {
  9914. // "$ref": "Discoveryclusters"
  9915. // },
  9916. // "scopes": [
  9917. // "https://www.googleapis.com/auth/books"
  9918. // ]
  9919. // }
  9920. }
  9921. // method id "books.promooffer.accept":
  9922. type PromoofferAcceptCall struct {
  9923. s *Service
  9924. urlParams_ gensupport.URLParams
  9925. ctx_ context.Context
  9926. header_ http.Header
  9927. }
  9928. // Accept:
  9929. func (r *PromoofferService) Accept() *PromoofferAcceptCall {
  9930. c := &PromoofferAcceptCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9931. return c
  9932. }
  9933. // AndroidId sets the optional parameter "androidId": device android_id
  9934. func (c *PromoofferAcceptCall) AndroidId(androidId string) *PromoofferAcceptCall {
  9935. c.urlParams_.Set("androidId", androidId)
  9936. return c
  9937. }
  9938. // Device sets the optional parameter "device": device device
  9939. func (c *PromoofferAcceptCall) Device(device string) *PromoofferAcceptCall {
  9940. c.urlParams_.Set("device", device)
  9941. return c
  9942. }
  9943. // Manufacturer sets the optional parameter "manufacturer": device
  9944. // manufacturer
  9945. func (c *PromoofferAcceptCall) Manufacturer(manufacturer string) *PromoofferAcceptCall {
  9946. c.urlParams_.Set("manufacturer", manufacturer)
  9947. return c
  9948. }
  9949. // Model sets the optional parameter "model": device model
  9950. func (c *PromoofferAcceptCall) Model(model string) *PromoofferAcceptCall {
  9951. c.urlParams_.Set("model", model)
  9952. return c
  9953. }
  9954. // OfferId sets the optional parameter "offerId":
  9955. func (c *PromoofferAcceptCall) OfferId(offerId string) *PromoofferAcceptCall {
  9956. c.urlParams_.Set("offerId", offerId)
  9957. return c
  9958. }
  9959. // Product sets the optional parameter "product": device product
  9960. func (c *PromoofferAcceptCall) Product(product string) *PromoofferAcceptCall {
  9961. c.urlParams_.Set("product", product)
  9962. return c
  9963. }
  9964. // Serial sets the optional parameter "serial": device serial
  9965. func (c *PromoofferAcceptCall) Serial(serial string) *PromoofferAcceptCall {
  9966. c.urlParams_.Set("serial", serial)
  9967. return c
  9968. }
  9969. // VolumeId sets the optional parameter "volumeId": Volume id to
  9970. // exercise the offer
  9971. func (c *PromoofferAcceptCall) VolumeId(volumeId string) *PromoofferAcceptCall {
  9972. c.urlParams_.Set("volumeId", volumeId)
  9973. return c
  9974. }
  9975. // Fields allows partial responses to be retrieved. See
  9976. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9977. // for more information.
  9978. func (c *PromoofferAcceptCall) Fields(s ...googleapi.Field) *PromoofferAcceptCall {
  9979. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9980. return c
  9981. }
  9982. // Context sets the context to be used in this call's Do method. Any
  9983. // pending HTTP request will be aborted if the provided context is
  9984. // canceled.
  9985. func (c *PromoofferAcceptCall) Context(ctx context.Context) *PromoofferAcceptCall {
  9986. c.ctx_ = ctx
  9987. return c
  9988. }
  9989. // Header returns an http.Header that can be modified by the caller to
  9990. // add HTTP headers to the request.
  9991. func (c *PromoofferAcceptCall) Header() http.Header {
  9992. if c.header_ == nil {
  9993. c.header_ = make(http.Header)
  9994. }
  9995. return c.header_
  9996. }
  9997. func (c *PromoofferAcceptCall) doRequest(alt string) (*http.Response, error) {
  9998. reqHeaders := make(http.Header)
  9999. for k, v := range c.header_ {
  10000. reqHeaders[k] = v
  10001. }
  10002. reqHeaders.Set("User-Agent", c.s.userAgent())
  10003. var body io.Reader = nil
  10004. c.urlParams_.Set("alt", alt)
  10005. c.urlParams_.Set("prettyPrint", "false")
  10006. urls := googleapi.ResolveRelative(c.s.BasePath, "promooffer/accept")
  10007. urls += "?" + c.urlParams_.Encode()
  10008. req, err := http.NewRequest("POST", urls, body)
  10009. if err != nil {
  10010. return nil, err
  10011. }
  10012. req.Header = reqHeaders
  10013. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10014. }
  10015. // Do executes the "books.promooffer.accept" call.
  10016. func (c *PromoofferAcceptCall) Do(opts ...googleapi.CallOption) error {
  10017. gensupport.SetOptions(c.urlParams_, opts...)
  10018. res, err := c.doRequest("json")
  10019. if err != nil {
  10020. return err
  10021. }
  10022. defer googleapi.CloseBody(res)
  10023. if err := googleapi.CheckResponse(res); err != nil {
  10024. return err
  10025. }
  10026. return nil
  10027. // {
  10028. // "description": "",
  10029. // "httpMethod": "POST",
  10030. // "id": "books.promooffer.accept",
  10031. // "parameters": {
  10032. // "androidId": {
  10033. // "description": "device android_id",
  10034. // "location": "query",
  10035. // "type": "string"
  10036. // },
  10037. // "device": {
  10038. // "description": "device device",
  10039. // "location": "query",
  10040. // "type": "string"
  10041. // },
  10042. // "manufacturer": {
  10043. // "description": "device manufacturer",
  10044. // "location": "query",
  10045. // "type": "string"
  10046. // },
  10047. // "model": {
  10048. // "description": "device model",
  10049. // "location": "query",
  10050. // "type": "string"
  10051. // },
  10052. // "offerId": {
  10053. // "location": "query",
  10054. // "type": "string"
  10055. // },
  10056. // "product": {
  10057. // "description": "device product",
  10058. // "location": "query",
  10059. // "type": "string"
  10060. // },
  10061. // "serial": {
  10062. // "description": "device serial",
  10063. // "location": "query",
  10064. // "type": "string"
  10065. // },
  10066. // "volumeId": {
  10067. // "description": "Volume id to exercise the offer",
  10068. // "location": "query",
  10069. // "type": "string"
  10070. // }
  10071. // },
  10072. // "path": "promooffer/accept",
  10073. // "scopes": [
  10074. // "https://www.googleapis.com/auth/books"
  10075. // ]
  10076. // }
  10077. }
  10078. // method id "books.promooffer.dismiss":
  10079. type PromoofferDismissCall struct {
  10080. s *Service
  10081. urlParams_ gensupport.URLParams
  10082. ctx_ context.Context
  10083. header_ http.Header
  10084. }
  10085. // Dismiss:
  10086. func (r *PromoofferService) Dismiss() *PromoofferDismissCall {
  10087. c := &PromoofferDismissCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10088. return c
  10089. }
  10090. // AndroidId sets the optional parameter "androidId": device android_id
  10091. func (c *PromoofferDismissCall) AndroidId(androidId string) *PromoofferDismissCall {
  10092. c.urlParams_.Set("androidId", androidId)
  10093. return c
  10094. }
  10095. // Device sets the optional parameter "device": device device
  10096. func (c *PromoofferDismissCall) Device(device string) *PromoofferDismissCall {
  10097. c.urlParams_.Set("device", device)
  10098. return c
  10099. }
  10100. // Manufacturer sets the optional parameter "manufacturer": device
  10101. // manufacturer
  10102. func (c *PromoofferDismissCall) Manufacturer(manufacturer string) *PromoofferDismissCall {
  10103. c.urlParams_.Set("manufacturer", manufacturer)
  10104. return c
  10105. }
  10106. // Model sets the optional parameter "model": device model
  10107. func (c *PromoofferDismissCall) Model(model string) *PromoofferDismissCall {
  10108. c.urlParams_.Set("model", model)
  10109. return c
  10110. }
  10111. // OfferId sets the optional parameter "offerId": Offer to dimiss
  10112. func (c *PromoofferDismissCall) OfferId(offerId string) *PromoofferDismissCall {
  10113. c.urlParams_.Set("offerId", offerId)
  10114. return c
  10115. }
  10116. // Product sets the optional parameter "product": device product
  10117. func (c *PromoofferDismissCall) Product(product string) *PromoofferDismissCall {
  10118. c.urlParams_.Set("product", product)
  10119. return c
  10120. }
  10121. // Serial sets the optional parameter "serial": device serial
  10122. func (c *PromoofferDismissCall) Serial(serial string) *PromoofferDismissCall {
  10123. c.urlParams_.Set("serial", serial)
  10124. return c
  10125. }
  10126. // Fields allows partial responses to be retrieved. See
  10127. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10128. // for more information.
  10129. func (c *PromoofferDismissCall) Fields(s ...googleapi.Field) *PromoofferDismissCall {
  10130. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10131. return c
  10132. }
  10133. // Context sets the context to be used in this call's Do method. Any
  10134. // pending HTTP request will be aborted if the provided context is
  10135. // canceled.
  10136. func (c *PromoofferDismissCall) Context(ctx context.Context) *PromoofferDismissCall {
  10137. c.ctx_ = ctx
  10138. return c
  10139. }
  10140. // Header returns an http.Header that can be modified by the caller to
  10141. // add HTTP headers to the request.
  10142. func (c *PromoofferDismissCall) Header() http.Header {
  10143. if c.header_ == nil {
  10144. c.header_ = make(http.Header)
  10145. }
  10146. return c.header_
  10147. }
  10148. func (c *PromoofferDismissCall) doRequest(alt string) (*http.Response, error) {
  10149. reqHeaders := make(http.Header)
  10150. for k, v := range c.header_ {
  10151. reqHeaders[k] = v
  10152. }
  10153. reqHeaders.Set("User-Agent", c.s.userAgent())
  10154. var body io.Reader = nil
  10155. c.urlParams_.Set("alt", alt)
  10156. c.urlParams_.Set("prettyPrint", "false")
  10157. urls := googleapi.ResolveRelative(c.s.BasePath, "promooffer/dismiss")
  10158. urls += "?" + c.urlParams_.Encode()
  10159. req, err := http.NewRequest("POST", urls, body)
  10160. if err != nil {
  10161. return nil, err
  10162. }
  10163. req.Header = reqHeaders
  10164. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10165. }
  10166. // Do executes the "books.promooffer.dismiss" call.
  10167. func (c *PromoofferDismissCall) Do(opts ...googleapi.CallOption) error {
  10168. gensupport.SetOptions(c.urlParams_, opts...)
  10169. res, err := c.doRequest("json")
  10170. if err != nil {
  10171. return err
  10172. }
  10173. defer googleapi.CloseBody(res)
  10174. if err := googleapi.CheckResponse(res); err != nil {
  10175. return err
  10176. }
  10177. return nil
  10178. // {
  10179. // "description": "",
  10180. // "httpMethod": "POST",
  10181. // "id": "books.promooffer.dismiss",
  10182. // "parameters": {
  10183. // "androidId": {
  10184. // "description": "device android_id",
  10185. // "location": "query",
  10186. // "type": "string"
  10187. // },
  10188. // "device": {
  10189. // "description": "device device",
  10190. // "location": "query",
  10191. // "type": "string"
  10192. // },
  10193. // "manufacturer": {
  10194. // "description": "device manufacturer",
  10195. // "location": "query",
  10196. // "type": "string"
  10197. // },
  10198. // "model": {
  10199. // "description": "device model",
  10200. // "location": "query",
  10201. // "type": "string"
  10202. // },
  10203. // "offerId": {
  10204. // "description": "Offer to dimiss",
  10205. // "location": "query",
  10206. // "type": "string"
  10207. // },
  10208. // "product": {
  10209. // "description": "device product",
  10210. // "location": "query",
  10211. // "type": "string"
  10212. // },
  10213. // "serial": {
  10214. // "description": "device serial",
  10215. // "location": "query",
  10216. // "type": "string"
  10217. // }
  10218. // },
  10219. // "path": "promooffer/dismiss",
  10220. // "scopes": [
  10221. // "https://www.googleapis.com/auth/books"
  10222. // ]
  10223. // }
  10224. }
  10225. // method id "books.promooffer.get":
  10226. type PromoofferGetCall struct {
  10227. s *Service
  10228. urlParams_ gensupport.URLParams
  10229. ifNoneMatch_ string
  10230. ctx_ context.Context
  10231. header_ http.Header
  10232. }
  10233. // Get: Returns a list of promo offers available to the user
  10234. func (r *PromoofferService) Get() *PromoofferGetCall {
  10235. c := &PromoofferGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10236. return c
  10237. }
  10238. // AndroidId sets the optional parameter "androidId": device android_id
  10239. func (c *PromoofferGetCall) AndroidId(androidId string) *PromoofferGetCall {
  10240. c.urlParams_.Set("androidId", androidId)
  10241. return c
  10242. }
  10243. // Device sets the optional parameter "device": device device
  10244. func (c *PromoofferGetCall) Device(device string) *PromoofferGetCall {
  10245. c.urlParams_.Set("device", device)
  10246. return c
  10247. }
  10248. // Manufacturer sets the optional parameter "manufacturer": device
  10249. // manufacturer
  10250. func (c *PromoofferGetCall) Manufacturer(manufacturer string) *PromoofferGetCall {
  10251. c.urlParams_.Set("manufacturer", manufacturer)
  10252. return c
  10253. }
  10254. // Model sets the optional parameter "model": device model
  10255. func (c *PromoofferGetCall) Model(model string) *PromoofferGetCall {
  10256. c.urlParams_.Set("model", model)
  10257. return c
  10258. }
  10259. // Product sets the optional parameter "product": device product
  10260. func (c *PromoofferGetCall) Product(product string) *PromoofferGetCall {
  10261. c.urlParams_.Set("product", product)
  10262. return c
  10263. }
  10264. // Serial sets the optional parameter "serial": device serial
  10265. func (c *PromoofferGetCall) Serial(serial string) *PromoofferGetCall {
  10266. c.urlParams_.Set("serial", serial)
  10267. return c
  10268. }
  10269. // Fields allows partial responses to be retrieved. See
  10270. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10271. // for more information.
  10272. func (c *PromoofferGetCall) Fields(s ...googleapi.Field) *PromoofferGetCall {
  10273. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10274. return c
  10275. }
  10276. // IfNoneMatch sets the optional parameter which makes the operation
  10277. // fail if the object's ETag matches the given value. This is useful for
  10278. // getting updates only after the object has changed since the last
  10279. // request. Use googleapi.IsNotModified to check whether the response
  10280. // error from Do is the result of In-None-Match.
  10281. func (c *PromoofferGetCall) IfNoneMatch(entityTag string) *PromoofferGetCall {
  10282. c.ifNoneMatch_ = entityTag
  10283. return c
  10284. }
  10285. // Context sets the context to be used in this call's Do method. Any
  10286. // pending HTTP request will be aborted if the provided context is
  10287. // canceled.
  10288. func (c *PromoofferGetCall) Context(ctx context.Context) *PromoofferGetCall {
  10289. c.ctx_ = ctx
  10290. return c
  10291. }
  10292. // Header returns an http.Header that can be modified by the caller to
  10293. // add HTTP headers to the request.
  10294. func (c *PromoofferGetCall) Header() http.Header {
  10295. if c.header_ == nil {
  10296. c.header_ = make(http.Header)
  10297. }
  10298. return c.header_
  10299. }
  10300. func (c *PromoofferGetCall) doRequest(alt string) (*http.Response, error) {
  10301. reqHeaders := make(http.Header)
  10302. for k, v := range c.header_ {
  10303. reqHeaders[k] = v
  10304. }
  10305. reqHeaders.Set("User-Agent", c.s.userAgent())
  10306. if c.ifNoneMatch_ != "" {
  10307. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10308. }
  10309. var body io.Reader = nil
  10310. c.urlParams_.Set("alt", alt)
  10311. c.urlParams_.Set("prettyPrint", "false")
  10312. urls := googleapi.ResolveRelative(c.s.BasePath, "promooffer/get")
  10313. urls += "?" + c.urlParams_.Encode()
  10314. req, err := http.NewRequest("GET", urls, body)
  10315. if err != nil {
  10316. return nil, err
  10317. }
  10318. req.Header = reqHeaders
  10319. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10320. }
  10321. // Do executes the "books.promooffer.get" call.
  10322. // Exactly one of *Offers or error will be non-nil. Any non-2xx status
  10323. // code is an error. Response headers are in either
  10324. // *Offers.ServerResponse.Header or (if a response was returned at all)
  10325. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  10326. // check whether the returned error was because http.StatusNotModified
  10327. // was returned.
  10328. func (c *PromoofferGetCall) Do(opts ...googleapi.CallOption) (*Offers, error) {
  10329. gensupport.SetOptions(c.urlParams_, opts...)
  10330. res, err := c.doRequest("json")
  10331. if res != nil && res.StatusCode == http.StatusNotModified {
  10332. if res.Body != nil {
  10333. res.Body.Close()
  10334. }
  10335. return nil, &googleapi.Error{
  10336. Code: res.StatusCode,
  10337. Header: res.Header,
  10338. }
  10339. }
  10340. if err != nil {
  10341. return nil, err
  10342. }
  10343. defer googleapi.CloseBody(res)
  10344. if err := googleapi.CheckResponse(res); err != nil {
  10345. return nil, err
  10346. }
  10347. ret := &Offers{
  10348. ServerResponse: googleapi.ServerResponse{
  10349. Header: res.Header,
  10350. HTTPStatusCode: res.StatusCode,
  10351. },
  10352. }
  10353. target := &ret
  10354. if err := gensupport.DecodeResponse(target, res); err != nil {
  10355. return nil, err
  10356. }
  10357. return ret, nil
  10358. // {
  10359. // "description": "Returns a list of promo offers available to the user",
  10360. // "httpMethod": "GET",
  10361. // "id": "books.promooffer.get",
  10362. // "parameters": {
  10363. // "androidId": {
  10364. // "description": "device android_id",
  10365. // "location": "query",
  10366. // "type": "string"
  10367. // },
  10368. // "device": {
  10369. // "description": "device device",
  10370. // "location": "query",
  10371. // "type": "string"
  10372. // },
  10373. // "manufacturer": {
  10374. // "description": "device manufacturer",
  10375. // "location": "query",
  10376. // "type": "string"
  10377. // },
  10378. // "model": {
  10379. // "description": "device model",
  10380. // "location": "query",
  10381. // "type": "string"
  10382. // },
  10383. // "product": {
  10384. // "description": "device product",
  10385. // "location": "query",
  10386. // "type": "string"
  10387. // },
  10388. // "serial": {
  10389. // "description": "device serial",
  10390. // "location": "query",
  10391. // "type": "string"
  10392. // }
  10393. // },
  10394. // "path": "promooffer/get",
  10395. // "response": {
  10396. // "$ref": "Offers"
  10397. // },
  10398. // "scopes": [
  10399. // "https://www.googleapis.com/auth/books"
  10400. // ]
  10401. // }
  10402. }
  10403. // method id "books.series.get":
  10404. type SeriesGetCall struct {
  10405. s *Service
  10406. urlParams_ gensupport.URLParams
  10407. ifNoneMatch_ string
  10408. ctx_ context.Context
  10409. header_ http.Header
  10410. }
  10411. // Get: Returns Series metadata for the given series ids.
  10412. func (r *SeriesService) Get(seriesId []string) *SeriesGetCall {
  10413. c := &SeriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10414. c.urlParams_.SetMulti("series_id", append([]string{}, seriesId...))
  10415. return c
  10416. }
  10417. // Fields allows partial responses to be retrieved. See
  10418. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10419. // for more information.
  10420. func (c *SeriesGetCall) Fields(s ...googleapi.Field) *SeriesGetCall {
  10421. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10422. return c
  10423. }
  10424. // IfNoneMatch sets the optional parameter which makes the operation
  10425. // fail if the object's ETag matches the given value. This is useful for
  10426. // getting updates only after the object has changed since the last
  10427. // request. Use googleapi.IsNotModified to check whether the response
  10428. // error from Do is the result of In-None-Match.
  10429. func (c *SeriesGetCall) IfNoneMatch(entityTag string) *SeriesGetCall {
  10430. c.ifNoneMatch_ = entityTag
  10431. return c
  10432. }
  10433. // Context sets the context to be used in this call's Do method. Any
  10434. // pending HTTP request will be aborted if the provided context is
  10435. // canceled.
  10436. func (c *SeriesGetCall) Context(ctx context.Context) *SeriesGetCall {
  10437. c.ctx_ = ctx
  10438. return c
  10439. }
  10440. // Header returns an http.Header that can be modified by the caller to
  10441. // add HTTP headers to the request.
  10442. func (c *SeriesGetCall) Header() http.Header {
  10443. if c.header_ == nil {
  10444. c.header_ = make(http.Header)
  10445. }
  10446. return c.header_
  10447. }
  10448. func (c *SeriesGetCall) doRequest(alt string) (*http.Response, error) {
  10449. reqHeaders := make(http.Header)
  10450. for k, v := range c.header_ {
  10451. reqHeaders[k] = v
  10452. }
  10453. reqHeaders.Set("User-Agent", c.s.userAgent())
  10454. if c.ifNoneMatch_ != "" {
  10455. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10456. }
  10457. var body io.Reader = nil
  10458. c.urlParams_.Set("alt", alt)
  10459. c.urlParams_.Set("prettyPrint", "false")
  10460. urls := googleapi.ResolveRelative(c.s.BasePath, "series/get")
  10461. urls += "?" + c.urlParams_.Encode()
  10462. req, err := http.NewRequest("GET", urls, body)
  10463. if err != nil {
  10464. return nil, err
  10465. }
  10466. req.Header = reqHeaders
  10467. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10468. }
  10469. // Do executes the "books.series.get" call.
  10470. // Exactly one of *Series or error will be non-nil. Any non-2xx status
  10471. // code is an error. Response headers are in either
  10472. // *Series.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.
  10476. func (c *SeriesGetCall) Do(opts ...googleapi.CallOption) (*Series, 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 := &Series{
  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": "Returns Series metadata for the given series ids.",
  10508. // "httpMethod": "GET",
  10509. // "id": "books.series.get",
  10510. // "parameterOrder": [
  10511. // "series_id"
  10512. // ],
  10513. // "parameters": {
  10514. // "series_id": {
  10515. // "description": "String that identifies the series",
  10516. // "location": "query",
  10517. // "repeated": true,
  10518. // "required": true,
  10519. // "type": "string"
  10520. // }
  10521. // },
  10522. // "path": "series/get",
  10523. // "response": {
  10524. // "$ref": "Series"
  10525. // },
  10526. // "scopes": [
  10527. // "https://www.googleapis.com/auth/books"
  10528. // ]
  10529. // }
  10530. }
  10531. // method id "books.series.membership.get":
  10532. type SeriesMembershipGetCall struct {
  10533. s *Service
  10534. urlParams_ gensupport.URLParams
  10535. ifNoneMatch_ string
  10536. ctx_ context.Context
  10537. header_ http.Header
  10538. }
  10539. // Get: Returns Series membership data given the series id.
  10540. func (r *SeriesMembershipService) Get(seriesId string) *SeriesMembershipGetCall {
  10541. c := &SeriesMembershipGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10542. c.urlParams_.Set("series_id", seriesId)
  10543. return c
  10544. }
  10545. // PageSize sets the optional parameter "page_size": Number of maximum
  10546. // results per page to be included in the response.
  10547. func (c *SeriesMembershipGetCall) PageSize(pageSize int64) *SeriesMembershipGetCall {
  10548. c.urlParams_.Set("page_size", fmt.Sprint(pageSize))
  10549. return c
  10550. }
  10551. // PageToken sets the optional parameter "page_token": The value of the
  10552. // nextToken from the previous page.
  10553. func (c *SeriesMembershipGetCall) PageToken(pageToken string) *SeriesMembershipGetCall {
  10554. c.urlParams_.Set("page_token", pageToken)
  10555. return c
  10556. }
  10557. // Fields allows partial responses to be retrieved. See
  10558. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10559. // for more information.
  10560. func (c *SeriesMembershipGetCall) Fields(s ...googleapi.Field) *SeriesMembershipGetCall {
  10561. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10562. return c
  10563. }
  10564. // IfNoneMatch sets the optional parameter which makes the operation
  10565. // fail if the object's ETag matches the given value. This is useful for
  10566. // getting updates only after the object has changed since the last
  10567. // request. Use googleapi.IsNotModified to check whether the response
  10568. // error from Do is the result of In-None-Match.
  10569. func (c *SeriesMembershipGetCall) IfNoneMatch(entityTag string) *SeriesMembershipGetCall {
  10570. c.ifNoneMatch_ = entityTag
  10571. return c
  10572. }
  10573. // Context sets the context to be used in this call's Do method. Any
  10574. // pending HTTP request will be aborted if the provided context is
  10575. // canceled.
  10576. func (c *SeriesMembershipGetCall) Context(ctx context.Context) *SeriesMembershipGetCall {
  10577. c.ctx_ = ctx
  10578. return c
  10579. }
  10580. // Header returns an http.Header that can be modified by the caller to
  10581. // add HTTP headers to the request.
  10582. func (c *SeriesMembershipGetCall) Header() http.Header {
  10583. if c.header_ == nil {
  10584. c.header_ = make(http.Header)
  10585. }
  10586. return c.header_
  10587. }
  10588. func (c *SeriesMembershipGetCall) doRequest(alt string) (*http.Response, error) {
  10589. reqHeaders := make(http.Header)
  10590. for k, v := range c.header_ {
  10591. reqHeaders[k] = v
  10592. }
  10593. reqHeaders.Set("User-Agent", c.s.userAgent())
  10594. if c.ifNoneMatch_ != "" {
  10595. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10596. }
  10597. var body io.Reader = nil
  10598. c.urlParams_.Set("alt", alt)
  10599. c.urlParams_.Set("prettyPrint", "false")
  10600. urls := googleapi.ResolveRelative(c.s.BasePath, "series/membership/get")
  10601. urls += "?" + c.urlParams_.Encode()
  10602. req, err := http.NewRequest("GET", urls, body)
  10603. if err != nil {
  10604. return nil, err
  10605. }
  10606. req.Header = reqHeaders
  10607. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10608. }
  10609. // Do executes the "books.series.membership.get" call.
  10610. // Exactly one of *Seriesmembership or error will be non-nil. Any
  10611. // non-2xx status code is an error. Response headers are in either
  10612. // *Seriesmembership.ServerResponse.Header or (if a response was
  10613. // returned at all) in error.(*googleapi.Error).Header. Use
  10614. // googleapi.IsNotModified to check whether the returned error was
  10615. // because http.StatusNotModified was returned.
  10616. func (c *SeriesMembershipGetCall) Do(opts ...googleapi.CallOption) (*Seriesmembership, error) {
  10617. gensupport.SetOptions(c.urlParams_, opts...)
  10618. res, err := c.doRequest("json")
  10619. if res != nil && res.StatusCode == http.StatusNotModified {
  10620. if res.Body != nil {
  10621. res.Body.Close()
  10622. }
  10623. return nil, &googleapi.Error{
  10624. Code: res.StatusCode,
  10625. Header: res.Header,
  10626. }
  10627. }
  10628. if err != nil {
  10629. return nil, err
  10630. }
  10631. defer googleapi.CloseBody(res)
  10632. if err := googleapi.CheckResponse(res); err != nil {
  10633. return nil, err
  10634. }
  10635. ret := &Seriesmembership{
  10636. ServerResponse: googleapi.ServerResponse{
  10637. Header: res.Header,
  10638. HTTPStatusCode: res.StatusCode,
  10639. },
  10640. }
  10641. target := &ret
  10642. if err := gensupport.DecodeResponse(target, res); err != nil {
  10643. return nil, err
  10644. }
  10645. return ret, nil
  10646. // {
  10647. // "description": "Returns Series membership data given the series id.",
  10648. // "httpMethod": "GET",
  10649. // "id": "books.series.membership.get",
  10650. // "parameterOrder": [
  10651. // "series_id"
  10652. // ],
  10653. // "parameters": {
  10654. // "page_size": {
  10655. // "description": "Number of maximum results per page to be included in the response.",
  10656. // "format": "uint32",
  10657. // "location": "query",
  10658. // "type": "integer"
  10659. // },
  10660. // "page_token": {
  10661. // "description": "The value of the nextToken from the previous page.",
  10662. // "location": "query",
  10663. // "type": "string"
  10664. // },
  10665. // "series_id": {
  10666. // "description": "String that identifies the series",
  10667. // "location": "query",
  10668. // "required": true,
  10669. // "type": "string"
  10670. // }
  10671. // },
  10672. // "path": "series/membership/get",
  10673. // "response": {
  10674. // "$ref": "Seriesmembership"
  10675. // },
  10676. // "scopes": [
  10677. // "https://www.googleapis.com/auth/books"
  10678. // ]
  10679. // }
  10680. }
  10681. // method id "books.volumes.get":
  10682. type VolumesGetCall struct {
  10683. s *Service
  10684. volumeId string
  10685. urlParams_ gensupport.URLParams
  10686. ifNoneMatch_ string
  10687. ctx_ context.Context
  10688. header_ http.Header
  10689. }
  10690. // Get: Gets volume information for a single volume.
  10691. func (r *VolumesService) Get(volumeId string) *VolumesGetCall {
  10692. c := &VolumesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10693. c.volumeId = volumeId
  10694. return c
  10695. }
  10696. // Country sets the optional parameter "country": ISO-3166-1 code to
  10697. // override the IP-based location.
  10698. func (c *VolumesGetCall) Country(country string) *VolumesGetCall {
  10699. c.urlParams_.Set("country", country)
  10700. return c
  10701. }
  10702. // IncludeNonComicsSeries sets the optional parameter
  10703. // "includeNonComicsSeries": Set to true to include non-comics series.
  10704. // Defaults to false.
  10705. func (c *VolumesGetCall) IncludeNonComicsSeries(includeNonComicsSeries bool) *VolumesGetCall {
  10706. c.urlParams_.Set("includeNonComicsSeries", fmt.Sprint(includeNonComicsSeries))
  10707. return c
  10708. }
  10709. // Partner sets the optional parameter "partner": Brand results for
  10710. // partner ID.
  10711. func (c *VolumesGetCall) Partner(partner string) *VolumesGetCall {
  10712. c.urlParams_.Set("partner", partner)
  10713. return c
  10714. }
  10715. // Projection sets the optional parameter "projection": Restrict
  10716. // information returned to a set of selected fields.
  10717. //
  10718. // Possible values:
  10719. // "full" - Includes all volume data.
  10720. // "lite" - Includes a subset of fields in volumeInfo and accessInfo.
  10721. func (c *VolumesGetCall) Projection(projection string) *VolumesGetCall {
  10722. c.urlParams_.Set("projection", projection)
  10723. return c
  10724. }
  10725. // Source sets the optional parameter "source": String to identify the
  10726. // originator of this request.
  10727. func (c *VolumesGetCall) Source(source string) *VolumesGetCall {
  10728. c.urlParams_.Set("source", source)
  10729. return c
  10730. }
  10731. // UserLibraryConsistentRead sets the optional parameter
  10732. // "user_library_consistent_read":
  10733. func (c *VolumesGetCall) UserLibraryConsistentRead(userLibraryConsistentRead bool) *VolumesGetCall {
  10734. c.urlParams_.Set("user_library_consistent_read", fmt.Sprint(userLibraryConsistentRead))
  10735. return c
  10736. }
  10737. // Fields allows partial responses to be retrieved. See
  10738. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10739. // for more information.
  10740. func (c *VolumesGetCall) Fields(s ...googleapi.Field) *VolumesGetCall {
  10741. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10742. return c
  10743. }
  10744. // IfNoneMatch sets the optional parameter which makes the operation
  10745. // fail if the object's ETag matches the given value. This is useful for
  10746. // getting updates only after the object has changed since the last
  10747. // request. Use googleapi.IsNotModified to check whether the response
  10748. // error from Do is the result of In-None-Match.
  10749. func (c *VolumesGetCall) IfNoneMatch(entityTag string) *VolumesGetCall {
  10750. c.ifNoneMatch_ = entityTag
  10751. return c
  10752. }
  10753. // Context sets the context to be used in this call's Do method. Any
  10754. // pending HTTP request will be aborted if the provided context is
  10755. // canceled.
  10756. func (c *VolumesGetCall) Context(ctx context.Context) *VolumesGetCall {
  10757. c.ctx_ = ctx
  10758. return c
  10759. }
  10760. // Header returns an http.Header that can be modified by the caller to
  10761. // add HTTP headers to the request.
  10762. func (c *VolumesGetCall) Header() http.Header {
  10763. if c.header_ == nil {
  10764. c.header_ = make(http.Header)
  10765. }
  10766. return c.header_
  10767. }
  10768. func (c *VolumesGetCall) doRequest(alt string) (*http.Response, error) {
  10769. reqHeaders := make(http.Header)
  10770. for k, v := range c.header_ {
  10771. reqHeaders[k] = v
  10772. }
  10773. reqHeaders.Set("User-Agent", c.s.userAgent())
  10774. if c.ifNoneMatch_ != "" {
  10775. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10776. }
  10777. var body io.Reader = nil
  10778. c.urlParams_.Set("alt", alt)
  10779. c.urlParams_.Set("prettyPrint", "false")
  10780. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}")
  10781. urls += "?" + c.urlParams_.Encode()
  10782. req, err := http.NewRequest("GET", urls, body)
  10783. if err != nil {
  10784. return nil, err
  10785. }
  10786. req.Header = reqHeaders
  10787. googleapi.Expand(req.URL, map[string]string{
  10788. "volumeId": c.volumeId,
  10789. })
  10790. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10791. }
  10792. // Do executes the "books.volumes.get" call.
  10793. // Exactly one of *Volume or error will be non-nil. Any non-2xx status
  10794. // code is an error. Response headers are in either
  10795. // *Volume.ServerResponse.Header or (if a response was returned at all)
  10796. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  10797. // check whether the returned error was because http.StatusNotModified
  10798. // was returned.
  10799. func (c *VolumesGetCall) Do(opts ...googleapi.CallOption) (*Volume, error) {
  10800. gensupport.SetOptions(c.urlParams_, opts...)
  10801. res, err := c.doRequest("json")
  10802. if res != nil && res.StatusCode == http.StatusNotModified {
  10803. if res.Body != nil {
  10804. res.Body.Close()
  10805. }
  10806. return nil, &googleapi.Error{
  10807. Code: res.StatusCode,
  10808. Header: res.Header,
  10809. }
  10810. }
  10811. if err != nil {
  10812. return nil, err
  10813. }
  10814. defer googleapi.CloseBody(res)
  10815. if err := googleapi.CheckResponse(res); err != nil {
  10816. return nil, err
  10817. }
  10818. ret := &Volume{
  10819. ServerResponse: googleapi.ServerResponse{
  10820. Header: res.Header,
  10821. HTTPStatusCode: res.StatusCode,
  10822. },
  10823. }
  10824. target := &ret
  10825. if err := gensupport.DecodeResponse(target, res); err != nil {
  10826. return nil, err
  10827. }
  10828. return ret, nil
  10829. // {
  10830. // "description": "Gets volume information for a single volume.",
  10831. // "httpMethod": "GET",
  10832. // "id": "books.volumes.get",
  10833. // "parameterOrder": [
  10834. // "volumeId"
  10835. // ],
  10836. // "parameters": {
  10837. // "country": {
  10838. // "description": "ISO-3166-1 code to override the IP-based location.",
  10839. // "location": "query",
  10840. // "type": "string"
  10841. // },
  10842. // "includeNonComicsSeries": {
  10843. // "description": "Set to true to include non-comics series. Defaults to false.",
  10844. // "location": "query",
  10845. // "type": "boolean"
  10846. // },
  10847. // "partner": {
  10848. // "description": "Brand results for partner ID.",
  10849. // "location": "query",
  10850. // "type": "string"
  10851. // },
  10852. // "projection": {
  10853. // "description": "Restrict information returned to a set of selected fields.",
  10854. // "enum": [
  10855. // "full",
  10856. // "lite"
  10857. // ],
  10858. // "enumDescriptions": [
  10859. // "Includes all volume data.",
  10860. // "Includes a subset of fields in volumeInfo and accessInfo."
  10861. // ],
  10862. // "location": "query",
  10863. // "type": "string"
  10864. // },
  10865. // "source": {
  10866. // "description": "String to identify the originator of this request.",
  10867. // "location": "query",
  10868. // "type": "string"
  10869. // },
  10870. // "user_library_consistent_read": {
  10871. // "location": "query",
  10872. // "type": "boolean"
  10873. // },
  10874. // "volumeId": {
  10875. // "description": "ID of volume to retrieve.",
  10876. // "location": "path",
  10877. // "required": true,
  10878. // "type": "string"
  10879. // }
  10880. // },
  10881. // "path": "volumes/{volumeId}",
  10882. // "response": {
  10883. // "$ref": "Volume"
  10884. // },
  10885. // "scopes": [
  10886. // "https://www.googleapis.com/auth/books"
  10887. // ]
  10888. // }
  10889. }
  10890. // method id "books.volumes.list":
  10891. type VolumesListCall struct {
  10892. s *Service
  10893. urlParams_ gensupport.URLParams
  10894. ifNoneMatch_ string
  10895. ctx_ context.Context
  10896. header_ http.Header
  10897. }
  10898. // List: Performs a book search.
  10899. func (r *VolumesService) List(q string) *VolumesListCall {
  10900. c := &VolumesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10901. c.urlParams_.Set("q", q)
  10902. return c
  10903. }
  10904. // Download sets the optional parameter "download": Restrict to volumes
  10905. // by download availability.
  10906. //
  10907. // Possible values:
  10908. // "epub" - All volumes with epub.
  10909. func (c *VolumesListCall) Download(download string) *VolumesListCall {
  10910. c.urlParams_.Set("download", download)
  10911. return c
  10912. }
  10913. // Filter sets the optional parameter "filter": Filter search results.
  10914. //
  10915. // Possible values:
  10916. // "ebooks" - All Google eBooks.
  10917. // "free-ebooks" - Google eBook with full volume text viewability.
  10918. // "full" - Public can view entire volume text.
  10919. // "paid-ebooks" - Google eBook with a price.
  10920. // "partial" - Public able to see parts of text.
  10921. func (c *VolumesListCall) Filter(filter string) *VolumesListCall {
  10922. c.urlParams_.Set("filter", filter)
  10923. return c
  10924. }
  10925. // LangRestrict sets the optional parameter "langRestrict": Restrict
  10926. // results to books with this language code.
  10927. func (c *VolumesListCall) LangRestrict(langRestrict string) *VolumesListCall {
  10928. c.urlParams_.Set("langRestrict", langRestrict)
  10929. return c
  10930. }
  10931. // LibraryRestrict sets the optional parameter "libraryRestrict":
  10932. // Restrict search to this user's library.
  10933. //
  10934. // Possible values:
  10935. // "my-library" - Restrict to the user's library, any shelf.
  10936. // "no-restrict" - Do not restrict based on user's library.
  10937. func (c *VolumesListCall) LibraryRestrict(libraryRestrict string) *VolumesListCall {
  10938. c.urlParams_.Set("libraryRestrict", libraryRestrict)
  10939. return c
  10940. }
  10941. // MaxAllowedMaturityRating sets the optional parameter
  10942. // "maxAllowedMaturityRating": The maximum allowed maturity rating of
  10943. // returned recommendations. Books with a higher maturity rating are
  10944. // filtered out.
  10945. //
  10946. // Possible values:
  10947. // "mature" - Show books which are rated mature or lower.
  10948. // "not-mature" - Show books which are rated not mature.
  10949. func (c *VolumesListCall) MaxAllowedMaturityRating(maxAllowedMaturityRating string) *VolumesListCall {
  10950. c.urlParams_.Set("maxAllowedMaturityRating", maxAllowedMaturityRating)
  10951. return c
  10952. }
  10953. // MaxResults sets the optional parameter "maxResults": Maximum number
  10954. // of results to return.
  10955. func (c *VolumesListCall) MaxResults(maxResults int64) *VolumesListCall {
  10956. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  10957. return c
  10958. }
  10959. // OrderBy sets the optional parameter "orderBy": Sort search results.
  10960. //
  10961. // Possible values:
  10962. // "newest" - Most recently published.
  10963. // "relevance" - Relevance to search terms.
  10964. func (c *VolumesListCall) OrderBy(orderBy string) *VolumesListCall {
  10965. c.urlParams_.Set("orderBy", orderBy)
  10966. return c
  10967. }
  10968. // Partner sets the optional parameter "partner": Restrict and brand
  10969. // results for partner ID.
  10970. func (c *VolumesListCall) Partner(partner string) *VolumesListCall {
  10971. c.urlParams_.Set("partner", partner)
  10972. return c
  10973. }
  10974. // PrintType sets the optional parameter "printType": Restrict to books
  10975. // or magazines.
  10976. //
  10977. // Possible values:
  10978. // "all" - All volume content types.
  10979. // "books" - Just books.
  10980. // "magazines" - Just magazines.
  10981. func (c *VolumesListCall) PrintType(printType string) *VolumesListCall {
  10982. c.urlParams_.Set("printType", printType)
  10983. return c
  10984. }
  10985. // Projection sets the optional parameter "projection": Restrict
  10986. // information returned to a set of selected fields.
  10987. //
  10988. // Possible values:
  10989. // "full" - Includes all volume data.
  10990. // "lite" - Includes a subset of fields in volumeInfo and accessInfo.
  10991. func (c *VolumesListCall) Projection(projection string) *VolumesListCall {
  10992. c.urlParams_.Set("projection", projection)
  10993. return c
  10994. }
  10995. // ShowPreorders sets the optional parameter "showPreorders": Set to
  10996. // true to show books available for preorder. Defaults to false.
  10997. func (c *VolumesListCall) ShowPreorders(showPreorders bool) *VolumesListCall {
  10998. c.urlParams_.Set("showPreorders", fmt.Sprint(showPreorders))
  10999. return c
  11000. }
  11001. // Source sets the optional parameter "source": String to identify the
  11002. // originator of this request.
  11003. func (c *VolumesListCall) Source(source string) *VolumesListCall {
  11004. c.urlParams_.Set("source", source)
  11005. return c
  11006. }
  11007. // StartIndex sets the optional parameter "startIndex": Index of the
  11008. // first result to return (starts at 0)
  11009. func (c *VolumesListCall) StartIndex(startIndex int64) *VolumesListCall {
  11010. c.urlParams_.Set("startIndex", fmt.Sprint(startIndex))
  11011. return c
  11012. }
  11013. // Fields allows partial responses to be retrieved. See
  11014. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11015. // for more information.
  11016. func (c *VolumesListCall) Fields(s ...googleapi.Field) *VolumesListCall {
  11017. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11018. return c
  11019. }
  11020. // IfNoneMatch sets the optional parameter which makes the operation
  11021. // fail if the object's ETag matches the given value. This is useful for
  11022. // getting updates only after the object has changed since the last
  11023. // request. Use googleapi.IsNotModified to check whether the response
  11024. // error from Do is the result of In-None-Match.
  11025. func (c *VolumesListCall) IfNoneMatch(entityTag string) *VolumesListCall {
  11026. c.ifNoneMatch_ = entityTag
  11027. return c
  11028. }
  11029. // Context sets the context to be used in this call's Do method. Any
  11030. // pending HTTP request will be aborted if the provided context is
  11031. // canceled.
  11032. func (c *VolumesListCall) Context(ctx context.Context) *VolumesListCall {
  11033. c.ctx_ = ctx
  11034. return c
  11035. }
  11036. // Header returns an http.Header that can be modified by the caller to
  11037. // add HTTP headers to the request.
  11038. func (c *VolumesListCall) Header() http.Header {
  11039. if c.header_ == nil {
  11040. c.header_ = make(http.Header)
  11041. }
  11042. return c.header_
  11043. }
  11044. func (c *VolumesListCall) doRequest(alt string) (*http.Response, error) {
  11045. reqHeaders := make(http.Header)
  11046. for k, v := range c.header_ {
  11047. reqHeaders[k] = v
  11048. }
  11049. reqHeaders.Set("User-Agent", c.s.userAgent())
  11050. if c.ifNoneMatch_ != "" {
  11051. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11052. }
  11053. var body io.Reader = nil
  11054. c.urlParams_.Set("alt", alt)
  11055. c.urlParams_.Set("prettyPrint", "false")
  11056. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes")
  11057. urls += "?" + c.urlParams_.Encode()
  11058. req, err := http.NewRequest("GET", urls, body)
  11059. if err != nil {
  11060. return nil, err
  11061. }
  11062. req.Header = reqHeaders
  11063. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11064. }
  11065. // Do executes the "books.volumes.list" call.
  11066. // Exactly one of *Volumes or error will be non-nil. Any non-2xx status
  11067. // code is an error. Response headers are in either
  11068. // *Volumes.ServerResponse.Header or (if a response was returned at all)
  11069. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  11070. // check whether the returned error was because http.StatusNotModified
  11071. // was returned.
  11072. func (c *VolumesListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) {
  11073. gensupport.SetOptions(c.urlParams_, opts...)
  11074. res, err := c.doRequest("json")
  11075. if res != nil && res.StatusCode == http.StatusNotModified {
  11076. if res.Body != nil {
  11077. res.Body.Close()
  11078. }
  11079. return nil, &googleapi.Error{
  11080. Code: res.StatusCode,
  11081. Header: res.Header,
  11082. }
  11083. }
  11084. if err != nil {
  11085. return nil, err
  11086. }
  11087. defer googleapi.CloseBody(res)
  11088. if err := googleapi.CheckResponse(res); err != nil {
  11089. return nil, err
  11090. }
  11091. ret := &Volumes{
  11092. ServerResponse: googleapi.ServerResponse{
  11093. Header: res.Header,
  11094. HTTPStatusCode: res.StatusCode,
  11095. },
  11096. }
  11097. target := &ret
  11098. if err := gensupport.DecodeResponse(target, res); err != nil {
  11099. return nil, err
  11100. }
  11101. return ret, nil
  11102. // {
  11103. // "description": "Performs a book search.",
  11104. // "httpMethod": "GET",
  11105. // "id": "books.volumes.list",
  11106. // "parameterOrder": [
  11107. // "q"
  11108. // ],
  11109. // "parameters": {
  11110. // "download": {
  11111. // "description": "Restrict to volumes by download availability.",
  11112. // "enum": [
  11113. // "epub"
  11114. // ],
  11115. // "enumDescriptions": [
  11116. // "All volumes with epub."
  11117. // ],
  11118. // "location": "query",
  11119. // "type": "string"
  11120. // },
  11121. // "filter": {
  11122. // "description": "Filter search results.",
  11123. // "enum": [
  11124. // "ebooks",
  11125. // "free-ebooks",
  11126. // "full",
  11127. // "paid-ebooks",
  11128. // "partial"
  11129. // ],
  11130. // "enumDescriptions": [
  11131. // "All Google eBooks.",
  11132. // "Google eBook with full volume text viewability.",
  11133. // "Public can view entire volume text.",
  11134. // "Google eBook with a price.",
  11135. // "Public able to see parts of text."
  11136. // ],
  11137. // "location": "query",
  11138. // "type": "string"
  11139. // },
  11140. // "langRestrict": {
  11141. // "description": "Restrict results to books with this language code.",
  11142. // "location": "query",
  11143. // "type": "string"
  11144. // },
  11145. // "libraryRestrict": {
  11146. // "description": "Restrict search to this user's library.",
  11147. // "enum": [
  11148. // "my-library",
  11149. // "no-restrict"
  11150. // ],
  11151. // "enumDescriptions": [
  11152. // "Restrict to the user's library, any shelf.",
  11153. // "Do not restrict based on user's library."
  11154. // ],
  11155. // "location": "query",
  11156. // "type": "string"
  11157. // },
  11158. // "maxAllowedMaturityRating": {
  11159. // "description": "The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.",
  11160. // "enum": [
  11161. // "mature",
  11162. // "not-mature"
  11163. // ],
  11164. // "enumDescriptions": [
  11165. // "Show books which are rated mature or lower.",
  11166. // "Show books which are rated not mature."
  11167. // ],
  11168. // "location": "query",
  11169. // "type": "string"
  11170. // },
  11171. // "maxResults": {
  11172. // "description": "Maximum number of results to return.",
  11173. // "format": "uint32",
  11174. // "location": "query",
  11175. // "maximum": "40",
  11176. // "minimum": "0",
  11177. // "type": "integer"
  11178. // },
  11179. // "orderBy": {
  11180. // "description": "Sort search results.",
  11181. // "enum": [
  11182. // "newest",
  11183. // "relevance"
  11184. // ],
  11185. // "enumDescriptions": [
  11186. // "Most recently published.",
  11187. // "Relevance to search terms."
  11188. // ],
  11189. // "location": "query",
  11190. // "type": "string"
  11191. // },
  11192. // "partner": {
  11193. // "description": "Restrict and brand results for partner ID.",
  11194. // "location": "query",
  11195. // "type": "string"
  11196. // },
  11197. // "printType": {
  11198. // "description": "Restrict to books or magazines.",
  11199. // "enum": [
  11200. // "all",
  11201. // "books",
  11202. // "magazines"
  11203. // ],
  11204. // "enumDescriptions": [
  11205. // "All volume content types.",
  11206. // "Just books.",
  11207. // "Just magazines."
  11208. // ],
  11209. // "location": "query",
  11210. // "type": "string"
  11211. // },
  11212. // "projection": {
  11213. // "description": "Restrict information returned to a set of selected fields.",
  11214. // "enum": [
  11215. // "full",
  11216. // "lite"
  11217. // ],
  11218. // "enumDescriptions": [
  11219. // "Includes all volume data.",
  11220. // "Includes a subset of fields in volumeInfo and accessInfo."
  11221. // ],
  11222. // "location": "query",
  11223. // "type": "string"
  11224. // },
  11225. // "q": {
  11226. // "description": "Full-text search query string.",
  11227. // "location": "query",
  11228. // "required": true,
  11229. // "type": "string"
  11230. // },
  11231. // "showPreorders": {
  11232. // "description": "Set to true to show books available for preorder. Defaults to false.",
  11233. // "location": "query",
  11234. // "type": "boolean"
  11235. // },
  11236. // "source": {
  11237. // "description": "String to identify the originator of this request.",
  11238. // "location": "query",
  11239. // "type": "string"
  11240. // },
  11241. // "startIndex": {
  11242. // "description": "Index of the first result to return (starts at 0)",
  11243. // "format": "uint32",
  11244. // "location": "query",
  11245. // "minimum": "0",
  11246. // "type": "integer"
  11247. // }
  11248. // },
  11249. // "path": "volumes",
  11250. // "response": {
  11251. // "$ref": "Volumes"
  11252. // },
  11253. // "scopes": [
  11254. // "https://www.googleapis.com/auth/books"
  11255. // ]
  11256. // }
  11257. }
  11258. // method id "books.volumes.associated.list":
  11259. type VolumesAssociatedListCall struct {
  11260. s *Service
  11261. volumeId string
  11262. urlParams_ gensupport.URLParams
  11263. ifNoneMatch_ string
  11264. ctx_ context.Context
  11265. header_ http.Header
  11266. }
  11267. // List: Return a list of associated books.
  11268. func (r *VolumesAssociatedService) List(volumeId string) *VolumesAssociatedListCall {
  11269. c := &VolumesAssociatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11270. c.volumeId = volumeId
  11271. return c
  11272. }
  11273. // Association sets the optional parameter "association": Association
  11274. // type.
  11275. //
  11276. // Possible values:
  11277. // "end-of-sample" - Recommendations for display end-of-sample.
  11278. // "end-of-volume" - Recommendations for display end-of-volume.
  11279. // "related-for-play" - Related volumes for Play Store.
  11280. func (c *VolumesAssociatedListCall) Association(association string) *VolumesAssociatedListCall {
  11281. c.urlParams_.Set("association", association)
  11282. return c
  11283. }
  11284. // Locale sets the optional parameter "locale": ISO-639-1 language and
  11285. // ISO-3166-1 country code. Ex: 'en_US'. Used for generating
  11286. // recommendations.
  11287. func (c *VolumesAssociatedListCall) Locale(locale string) *VolumesAssociatedListCall {
  11288. c.urlParams_.Set("locale", locale)
  11289. return c
  11290. }
  11291. // MaxAllowedMaturityRating sets the optional parameter
  11292. // "maxAllowedMaturityRating": The maximum allowed maturity rating of
  11293. // returned recommendations. Books with a higher maturity rating are
  11294. // filtered out.
  11295. //
  11296. // Possible values:
  11297. // "mature" - Show books which are rated mature or lower.
  11298. // "not-mature" - Show books which are rated not mature.
  11299. func (c *VolumesAssociatedListCall) MaxAllowedMaturityRating(maxAllowedMaturityRating string) *VolumesAssociatedListCall {
  11300. c.urlParams_.Set("maxAllowedMaturityRating", maxAllowedMaturityRating)
  11301. return c
  11302. }
  11303. // Source sets the optional parameter "source": String to identify the
  11304. // originator of this request.
  11305. func (c *VolumesAssociatedListCall) Source(source string) *VolumesAssociatedListCall {
  11306. c.urlParams_.Set("source", source)
  11307. return c
  11308. }
  11309. // Fields allows partial responses to be retrieved. See
  11310. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11311. // for more information.
  11312. func (c *VolumesAssociatedListCall) Fields(s ...googleapi.Field) *VolumesAssociatedListCall {
  11313. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11314. return c
  11315. }
  11316. // IfNoneMatch sets the optional parameter which makes the operation
  11317. // fail if the object's ETag matches the given value. This is useful for
  11318. // getting updates only after the object has changed since the last
  11319. // request. Use googleapi.IsNotModified to check whether the response
  11320. // error from Do is the result of In-None-Match.
  11321. func (c *VolumesAssociatedListCall) IfNoneMatch(entityTag string) *VolumesAssociatedListCall {
  11322. c.ifNoneMatch_ = entityTag
  11323. return c
  11324. }
  11325. // Context sets the context to be used in this call's Do method. Any
  11326. // pending HTTP request will be aborted if the provided context is
  11327. // canceled.
  11328. func (c *VolumesAssociatedListCall) Context(ctx context.Context) *VolumesAssociatedListCall {
  11329. c.ctx_ = ctx
  11330. return c
  11331. }
  11332. // Header returns an http.Header that can be modified by the caller to
  11333. // add HTTP headers to the request.
  11334. func (c *VolumesAssociatedListCall) Header() http.Header {
  11335. if c.header_ == nil {
  11336. c.header_ = make(http.Header)
  11337. }
  11338. return c.header_
  11339. }
  11340. func (c *VolumesAssociatedListCall) doRequest(alt string) (*http.Response, error) {
  11341. reqHeaders := make(http.Header)
  11342. for k, v := range c.header_ {
  11343. reqHeaders[k] = v
  11344. }
  11345. reqHeaders.Set("User-Agent", c.s.userAgent())
  11346. if c.ifNoneMatch_ != "" {
  11347. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11348. }
  11349. var body io.Reader = nil
  11350. c.urlParams_.Set("alt", alt)
  11351. c.urlParams_.Set("prettyPrint", "false")
  11352. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/associated")
  11353. urls += "?" + c.urlParams_.Encode()
  11354. req, err := http.NewRequest("GET", urls, body)
  11355. if err != nil {
  11356. return nil, err
  11357. }
  11358. req.Header = reqHeaders
  11359. googleapi.Expand(req.URL, map[string]string{
  11360. "volumeId": c.volumeId,
  11361. })
  11362. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11363. }
  11364. // Do executes the "books.volumes.associated.list" call.
  11365. // Exactly one of *Volumes or error will be non-nil. Any non-2xx status
  11366. // code is an error. Response headers are in either
  11367. // *Volumes.ServerResponse.Header or (if a response was returned at all)
  11368. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  11369. // check whether the returned error was because http.StatusNotModified
  11370. // was returned.
  11371. func (c *VolumesAssociatedListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) {
  11372. gensupport.SetOptions(c.urlParams_, opts...)
  11373. res, err := c.doRequest("json")
  11374. if res != nil && res.StatusCode == http.StatusNotModified {
  11375. if res.Body != nil {
  11376. res.Body.Close()
  11377. }
  11378. return nil, &googleapi.Error{
  11379. Code: res.StatusCode,
  11380. Header: res.Header,
  11381. }
  11382. }
  11383. if err != nil {
  11384. return nil, err
  11385. }
  11386. defer googleapi.CloseBody(res)
  11387. if err := googleapi.CheckResponse(res); err != nil {
  11388. return nil, err
  11389. }
  11390. ret := &Volumes{
  11391. ServerResponse: googleapi.ServerResponse{
  11392. Header: res.Header,
  11393. HTTPStatusCode: res.StatusCode,
  11394. },
  11395. }
  11396. target := &ret
  11397. if err := gensupport.DecodeResponse(target, res); err != nil {
  11398. return nil, err
  11399. }
  11400. return ret, nil
  11401. // {
  11402. // "description": "Return a list of associated books.",
  11403. // "httpMethod": "GET",
  11404. // "id": "books.volumes.associated.list",
  11405. // "parameterOrder": [
  11406. // "volumeId"
  11407. // ],
  11408. // "parameters": {
  11409. // "association": {
  11410. // "description": "Association type.",
  11411. // "enum": [
  11412. // "end-of-sample",
  11413. // "end-of-volume",
  11414. // "related-for-play"
  11415. // ],
  11416. // "enumDescriptions": [
  11417. // "Recommendations for display end-of-sample.",
  11418. // "Recommendations for display end-of-volume.",
  11419. // "Related volumes for Play Store."
  11420. // ],
  11421. // "location": "query",
  11422. // "type": "string"
  11423. // },
  11424. // "locale": {
  11425. // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
  11426. // "location": "query",
  11427. // "type": "string"
  11428. // },
  11429. // "maxAllowedMaturityRating": {
  11430. // "description": "The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.",
  11431. // "enum": [
  11432. // "mature",
  11433. // "not-mature"
  11434. // ],
  11435. // "enumDescriptions": [
  11436. // "Show books which are rated mature or lower.",
  11437. // "Show books which are rated not mature."
  11438. // ],
  11439. // "location": "query",
  11440. // "type": "string"
  11441. // },
  11442. // "source": {
  11443. // "description": "String to identify the originator of this request.",
  11444. // "location": "query",
  11445. // "type": "string"
  11446. // },
  11447. // "volumeId": {
  11448. // "description": "ID of the source volume.",
  11449. // "location": "path",
  11450. // "required": true,
  11451. // "type": "string"
  11452. // }
  11453. // },
  11454. // "path": "volumes/{volumeId}/associated",
  11455. // "response": {
  11456. // "$ref": "Volumes"
  11457. // },
  11458. // "scopes": [
  11459. // "https://www.googleapis.com/auth/books"
  11460. // ]
  11461. // }
  11462. }
  11463. // method id "books.volumes.mybooks.list":
  11464. type VolumesMybooksListCall struct {
  11465. s *Service
  11466. urlParams_ gensupport.URLParams
  11467. ifNoneMatch_ string
  11468. ctx_ context.Context
  11469. header_ http.Header
  11470. }
  11471. // List: Return a list of books in My Library.
  11472. func (r *VolumesMybooksService) List() *VolumesMybooksListCall {
  11473. c := &VolumesMybooksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11474. return c
  11475. }
  11476. // AcquireMethod sets the optional parameter "acquireMethod": How the
  11477. // book was acquired
  11478. //
  11479. // Possible values:
  11480. // "FAMILY_SHARED" - Books acquired via Family Sharing
  11481. // "PREORDERED" - Preordered books (not yet available)
  11482. // "PREVIOUSLY_RENTED" - User-rented books past their expiration time
  11483. // "PUBLIC_DOMAIN" - Public domain books
  11484. // "PURCHASED" - Purchased books
  11485. // "RENTED" - User-rented books
  11486. // "SAMPLE" - Sample books
  11487. // "UPLOADED" - User uploaded books
  11488. func (c *VolumesMybooksListCall) AcquireMethod(acquireMethod ...string) *VolumesMybooksListCall {
  11489. c.urlParams_.SetMulti("acquireMethod", append([]string{}, acquireMethod...))
  11490. return c
  11491. }
  11492. // Country sets the optional parameter "country": ISO-3166-1 code to
  11493. // override the IP-based location.
  11494. func (c *VolumesMybooksListCall) Country(country string) *VolumesMybooksListCall {
  11495. c.urlParams_.Set("country", country)
  11496. return c
  11497. }
  11498. // Locale sets the optional parameter "locale": ISO-639-1 language and
  11499. // ISO-3166-1 country code. Ex:'en_US'. Used for generating
  11500. // recommendations.
  11501. func (c *VolumesMybooksListCall) Locale(locale string) *VolumesMybooksListCall {
  11502. c.urlParams_.Set("locale", locale)
  11503. return c
  11504. }
  11505. // MaxResults sets the optional parameter "maxResults": Maximum number
  11506. // of results to return.
  11507. func (c *VolumesMybooksListCall) MaxResults(maxResults int64) *VolumesMybooksListCall {
  11508. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  11509. return c
  11510. }
  11511. // ProcessingState sets the optional parameter "processingState": The
  11512. // processing state of the user uploaded volumes to be returned.
  11513. // Applicable only if the UPLOADED is specified in the acquireMethod.
  11514. //
  11515. // Possible values:
  11516. // "COMPLETED_FAILED" - The volume processing hase failed.
  11517. // "COMPLETED_SUCCESS" - The volume processing was completed.
  11518. // "RUNNING" - The volume processing is not completed.
  11519. func (c *VolumesMybooksListCall) ProcessingState(processingState ...string) *VolumesMybooksListCall {
  11520. c.urlParams_.SetMulti("processingState", append([]string{}, processingState...))
  11521. return c
  11522. }
  11523. // Source sets the optional parameter "source": String to identify the
  11524. // originator of this request.
  11525. func (c *VolumesMybooksListCall) Source(source string) *VolumesMybooksListCall {
  11526. c.urlParams_.Set("source", source)
  11527. return c
  11528. }
  11529. // StartIndex sets the optional parameter "startIndex": Index of the
  11530. // first result to return (starts at 0)
  11531. func (c *VolumesMybooksListCall) StartIndex(startIndex int64) *VolumesMybooksListCall {
  11532. c.urlParams_.Set("startIndex", fmt.Sprint(startIndex))
  11533. return c
  11534. }
  11535. // Fields allows partial responses to be retrieved. See
  11536. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11537. // for more information.
  11538. func (c *VolumesMybooksListCall) Fields(s ...googleapi.Field) *VolumesMybooksListCall {
  11539. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11540. return c
  11541. }
  11542. // IfNoneMatch sets the optional parameter which makes the operation
  11543. // fail if the object's ETag matches the given value. This is useful for
  11544. // getting updates only after the object has changed since the last
  11545. // request. Use googleapi.IsNotModified to check whether the response
  11546. // error from Do is the result of In-None-Match.
  11547. func (c *VolumesMybooksListCall) IfNoneMatch(entityTag string) *VolumesMybooksListCall {
  11548. c.ifNoneMatch_ = entityTag
  11549. return c
  11550. }
  11551. // Context sets the context to be used in this call's Do method. Any
  11552. // pending HTTP request will be aborted if the provided context is
  11553. // canceled.
  11554. func (c *VolumesMybooksListCall) Context(ctx context.Context) *VolumesMybooksListCall {
  11555. c.ctx_ = ctx
  11556. return c
  11557. }
  11558. // Header returns an http.Header that can be modified by the caller to
  11559. // add HTTP headers to the request.
  11560. func (c *VolumesMybooksListCall) Header() http.Header {
  11561. if c.header_ == nil {
  11562. c.header_ = make(http.Header)
  11563. }
  11564. return c.header_
  11565. }
  11566. func (c *VolumesMybooksListCall) doRequest(alt string) (*http.Response, error) {
  11567. reqHeaders := make(http.Header)
  11568. for k, v := range c.header_ {
  11569. reqHeaders[k] = v
  11570. }
  11571. reqHeaders.Set("User-Agent", c.s.userAgent())
  11572. if c.ifNoneMatch_ != "" {
  11573. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11574. }
  11575. var body io.Reader = nil
  11576. c.urlParams_.Set("alt", alt)
  11577. c.urlParams_.Set("prettyPrint", "false")
  11578. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/mybooks")
  11579. urls += "?" + c.urlParams_.Encode()
  11580. req, err := http.NewRequest("GET", urls, body)
  11581. if err != nil {
  11582. return nil, err
  11583. }
  11584. req.Header = reqHeaders
  11585. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11586. }
  11587. // Do executes the "books.volumes.mybooks.list" call.
  11588. // Exactly one of *Volumes or error will be non-nil. Any non-2xx status
  11589. // code is an error. Response headers are in either
  11590. // *Volumes.ServerResponse.Header or (if a response was returned at all)
  11591. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  11592. // check whether the returned error was because http.StatusNotModified
  11593. // was returned.
  11594. func (c *VolumesMybooksListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) {
  11595. gensupport.SetOptions(c.urlParams_, opts...)
  11596. res, err := c.doRequest("json")
  11597. if res != nil && res.StatusCode == http.StatusNotModified {
  11598. if res.Body != nil {
  11599. res.Body.Close()
  11600. }
  11601. return nil, &googleapi.Error{
  11602. Code: res.StatusCode,
  11603. Header: res.Header,
  11604. }
  11605. }
  11606. if err != nil {
  11607. return nil, err
  11608. }
  11609. defer googleapi.CloseBody(res)
  11610. if err := googleapi.CheckResponse(res); err != nil {
  11611. return nil, err
  11612. }
  11613. ret := &Volumes{
  11614. ServerResponse: googleapi.ServerResponse{
  11615. Header: res.Header,
  11616. HTTPStatusCode: res.StatusCode,
  11617. },
  11618. }
  11619. target := &ret
  11620. if err := gensupport.DecodeResponse(target, res); err != nil {
  11621. return nil, err
  11622. }
  11623. return ret, nil
  11624. // {
  11625. // "description": "Return a list of books in My Library.",
  11626. // "httpMethod": "GET",
  11627. // "id": "books.volumes.mybooks.list",
  11628. // "parameters": {
  11629. // "acquireMethod": {
  11630. // "description": "How the book was acquired",
  11631. // "enum": [
  11632. // "FAMILY_SHARED",
  11633. // "PREORDERED",
  11634. // "PREVIOUSLY_RENTED",
  11635. // "PUBLIC_DOMAIN",
  11636. // "PURCHASED",
  11637. // "RENTED",
  11638. // "SAMPLE",
  11639. // "UPLOADED"
  11640. // ],
  11641. // "enumDescriptions": [
  11642. // "Books acquired via Family Sharing",
  11643. // "Preordered books (not yet available)",
  11644. // "User-rented books past their expiration time",
  11645. // "Public domain books",
  11646. // "Purchased books",
  11647. // "User-rented books",
  11648. // "Sample books",
  11649. // "User uploaded books"
  11650. // ],
  11651. // "location": "query",
  11652. // "repeated": true,
  11653. // "type": "string"
  11654. // },
  11655. // "country": {
  11656. // "description": "ISO-3166-1 code to override the IP-based location.",
  11657. // "location": "query",
  11658. // "type": "string"
  11659. // },
  11660. // "locale": {
  11661. // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex:'en_US'. Used for generating recommendations.",
  11662. // "location": "query",
  11663. // "type": "string"
  11664. // },
  11665. // "maxResults": {
  11666. // "description": "Maximum number of results to return.",
  11667. // "format": "uint32",
  11668. // "location": "query",
  11669. // "maximum": "100",
  11670. // "minimum": "0",
  11671. // "type": "integer"
  11672. // },
  11673. // "processingState": {
  11674. // "description": "The processing state of the user uploaded volumes to be returned. Applicable only if the UPLOADED is specified in the acquireMethod.",
  11675. // "enum": [
  11676. // "COMPLETED_FAILED",
  11677. // "COMPLETED_SUCCESS",
  11678. // "RUNNING"
  11679. // ],
  11680. // "enumDescriptions": [
  11681. // "The volume processing hase failed.",
  11682. // "The volume processing was completed.",
  11683. // "The volume processing is not completed."
  11684. // ],
  11685. // "location": "query",
  11686. // "repeated": true,
  11687. // "type": "string"
  11688. // },
  11689. // "source": {
  11690. // "description": "String to identify the originator of this request.",
  11691. // "location": "query",
  11692. // "type": "string"
  11693. // },
  11694. // "startIndex": {
  11695. // "description": "Index of the first result to return (starts at 0)",
  11696. // "format": "uint32",
  11697. // "location": "query",
  11698. // "minimum": "0",
  11699. // "type": "integer"
  11700. // }
  11701. // },
  11702. // "path": "volumes/mybooks",
  11703. // "response": {
  11704. // "$ref": "Volumes"
  11705. // },
  11706. // "scopes": [
  11707. // "https://www.googleapis.com/auth/books"
  11708. // ]
  11709. // }
  11710. }
  11711. // method id "books.volumes.recommended.list":
  11712. type VolumesRecommendedListCall struct {
  11713. s *Service
  11714. urlParams_ gensupport.URLParams
  11715. ifNoneMatch_ string
  11716. ctx_ context.Context
  11717. header_ http.Header
  11718. }
  11719. // List: Return a list of recommended books for the current user.
  11720. func (r *VolumesRecommendedService) List() *VolumesRecommendedListCall {
  11721. c := &VolumesRecommendedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11722. return c
  11723. }
  11724. // Locale sets the optional parameter "locale": ISO-639-1 language and
  11725. // ISO-3166-1 country code. Ex: 'en_US'. Used for generating
  11726. // recommendations.
  11727. func (c *VolumesRecommendedListCall) Locale(locale string) *VolumesRecommendedListCall {
  11728. c.urlParams_.Set("locale", locale)
  11729. return c
  11730. }
  11731. // MaxAllowedMaturityRating sets the optional parameter
  11732. // "maxAllowedMaturityRating": The maximum allowed maturity rating of
  11733. // returned recommendations. Books with a higher maturity rating are
  11734. // filtered out.
  11735. //
  11736. // Possible values:
  11737. // "mature" - Show books which are rated mature or lower.
  11738. // "not-mature" - Show books which are rated not mature.
  11739. func (c *VolumesRecommendedListCall) MaxAllowedMaturityRating(maxAllowedMaturityRating string) *VolumesRecommendedListCall {
  11740. c.urlParams_.Set("maxAllowedMaturityRating", maxAllowedMaturityRating)
  11741. return c
  11742. }
  11743. // Source sets the optional parameter "source": String to identify the
  11744. // originator of this request.
  11745. func (c *VolumesRecommendedListCall) Source(source string) *VolumesRecommendedListCall {
  11746. c.urlParams_.Set("source", source)
  11747. return c
  11748. }
  11749. // Fields allows partial responses to be retrieved. See
  11750. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11751. // for more information.
  11752. func (c *VolumesRecommendedListCall) Fields(s ...googleapi.Field) *VolumesRecommendedListCall {
  11753. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11754. return c
  11755. }
  11756. // IfNoneMatch sets the optional parameter which makes the operation
  11757. // fail if the object's ETag matches the given value. This is useful for
  11758. // getting updates only after the object has changed since the last
  11759. // request. Use googleapi.IsNotModified to check whether the response
  11760. // error from Do is the result of In-None-Match.
  11761. func (c *VolumesRecommendedListCall) IfNoneMatch(entityTag string) *VolumesRecommendedListCall {
  11762. c.ifNoneMatch_ = entityTag
  11763. return c
  11764. }
  11765. // Context sets the context to be used in this call's Do method. Any
  11766. // pending HTTP request will be aborted if the provided context is
  11767. // canceled.
  11768. func (c *VolumesRecommendedListCall) Context(ctx context.Context) *VolumesRecommendedListCall {
  11769. c.ctx_ = ctx
  11770. return c
  11771. }
  11772. // Header returns an http.Header that can be modified by the caller to
  11773. // add HTTP headers to the request.
  11774. func (c *VolumesRecommendedListCall) Header() http.Header {
  11775. if c.header_ == nil {
  11776. c.header_ = make(http.Header)
  11777. }
  11778. return c.header_
  11779. }
  11780. func (c *VolumesRecommendedListCall) doRequest(alt string) (*http.Response, error) {
  11781. reqHeaders := make(http.Header)
  11782. for k, v := range c.header_ {
  11783. reqHeaders[k] = v
  11784. }
  11785. reqHeaders.Set("User-Agent", c.s.userAgent())
  11786. if c.ifNoneMatch_ != "" {
  11787. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11788. }
  11789. var body io.Reader = nil
  11790. c.urlParams_.Set("alt", alt)
  11791. c.urlParams_.Set("prettyPrint", "false")
  11792. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/recommended")
  11793. urls += "?" + c.urlParams_.Encode()
  11794. req, err := http.NewRequest("GET", urls, body)
  11795. if err != nil {
  11796. return nil, err
  11797. }
  11798. req.Header = reqHeaders
  11799. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11800. }
  11801. // Do executes the "books.volumes.recommended.list" call.
  11802. // Exactly one of *Volumes or error will be non-nil. Any non-2xx status
  11803. // code is an error. Response headers are in either
  11804. // *Volumes.ServerResponse.Header or (if a response was returned at all)
  11805. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  11806. // check whether the returned error was because http.StatusNotModified
  11807. // was returned.
  11808. func (c *VolumesRecommendedListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) {
  11809. gensupport.SetOptions(c.urlParams_, opts...)
  11810. res, err := c.doRequest("json")
  11811. if res != nil && res.StatusCode == http.StatusNotModified {
  11812. if res.Body != nil {
  11813. res.Body.Close()
  11814. }
  11815. return nil, &googleapi.Error{
  11816. Code: res.StatusCode,
  11817. Header: res.Header,
  11818. }
  11819. }
  11820. if err != nil {
  11821. return nil, err
  11822. }
  11823. defer googleapi.CloseBody(res)
  11824. if err := googleapi.CheckResponse(res); err != nil {
  11825. return nil, err
  11826. }
  11827. ret := &Volumes{
  11828. ServerResponse: googleapi.ServerResponse{
  11829. Header: res.Header,
  11830. HTTPStatusCode: res.StatusCode,
  11831. },
  11832. }
  11833. target := &ret
  11834. if err := gensupport.DecodeResponse(target, res); err != nil {
  11835. return nil, err
  11836. }
  11837. return ret, nil
  11838. // {
  11839. // "description": "Return a list of recommended books for the current user.",
  11840. // "httpMethod": "GET",
  11841. // "id": "books.volumes.recommended.list",
  11842. // "parameters": {
  11843. // "locale": {
  11844. // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
  11845. // "location": "query",
  11846. // "type": "string"
  11847. // },
  11848. // "maxAllowedMaturityRating": {
  11849. // "description": "The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.",
  11850. // "enum": [
  11851. // "mature",
  11852. // "not-mature"
  11853. // ],
  11854. // "enumDescriptions": [
  11855. // "Show books which are rated mature or lower.",
  11856. // "Show books which are rated not mature."
  11857. // ],
  11858. // "location": "query",
  11859. // "type": "string"
  11860. // },
  11861. // "source": {
  11862. // "description": "String to identify the originator of this request.",
  11863. // "location": "query",
  11864. // "type": "string"
  11865. // }
  11866. // },
  11867. // "path": "volumes/recommended",
  11868. // "response": {
  11869. // "$ref": "Volumes"
  11870. // },
  11871. // "scopes": [
  11872. // "https://www.googleapis.com/auth/books"
  11873. // ]
  11874. // }
  11875. }
  11876. // method id "books.volumes.recommended.rate":
  11877. type VolumesRecommendedRateCall struct {
  11878. s *Service
  11879. urlParams_ gensupport.URLParams
  11880. ctx_ context.Context
  11881. header_ http.Header
  11882. }
  11883. // Rate: Rate a recommended book for the current user.
  11884. func (r *VolumesRecommendedService) Rate(rating string, volumeId string) *VolumesRecommendedRateCall {
  11885. c := &VolumesRecommendedRateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11886. c.urlParams_.Set("rating", rating)
  11887. c.urlParams_.Set("volumeId", volumeId)
  11888. return c
  11889. }
  11890. // Locale sets the optional parameter "locale": ISO-639-1 language and
  11891. // ISO-3166-1 country code. Ex: 'en_US'. Used for generating
  11892. // recommendations.
  11893. func (c *VolumesRecommendedRateCall) Locale(locale string) *VolumesRecommendedRateCall {
  11894. c.urlParams_.Set("locale", locale)
  11895. return c
  11896. }
  11897. // Source sets the optional parameter "source": String to identify the
  11898. // originator of this request.
  11899. func (c *VolumesRecommendedRateCall) Source(source string) *VolumesRecommendedRateCall {
  11900. c.urlParams_.Set("source", source)
  11901. return c
  11902. }
  11903. // Fields allows partial responses to be retrieved. See
  11904. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11905. // for more information.
  11906. func (c *VolumesRecommendedRateCall) Fields(s ...googleapi.Field) *VolumesRecommendedRateCall {
  11907. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11908. return c
  11909. }
  11910. // Context sets the context to be used in this call's Do method. Any
  11911. // pending HTTP request will be aborted if the provided context is
  11912. // canceled.
  11913. func (c *VolumesRecommendedRateCall) Context(ctx context.Context) *VolumesRecommendedRateCall {
  11914. c.ctx_ = ctx
  11915. return c
  11916. }
  11917. // Header returns an http.Header that can be modified by the caller to
  11918. // add HTTP headers to the request.
  11919. func (c *VolumesRecommendedRateCall) Header() http.Header {
  11920. if c.header_ == nil {
  11921. c.header_ = make(http.Header)
  11922. }
  11923. return c.header_
  11924. }
  11925. func (c *VolumesRecommendedRateCall) doRequest(alt string) (*http.Response, error) {
  11926. reqHeaders := make(http.Header)
  11927. for k, v := range c.header_ {
  11928. reqHeaders[k] = v
  11929. }
  11930. reqHeaders.Set("User-Agent", c.s.userAgent())
  11931. var body io.Reader = nil
  11932. c.urlParams_.Set("alt", alt)
  11933. c.urlParams_.Set("prettyPrint", "false")
  11934. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/recommended/rate")
  11935. urls += "?" + c.urlParams_.Encode()
  11936. req, err := http.NewRequest("POST", urls, body)
  11937. if err != nil {
  11938. return nil, err
  11939. }
  11940. req.Header = reqHeaders
  11941. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11942. }
  11943. // Do executes the "books.volumes.recommended.rate" call.
  11944. // Exactly one of *BooksVolumesRecommendedRateResponse or error will be
  11945. // non-nil. Any non-2xx status code is an error. Response headers are in
  11946. // either *BooksVolumesRecommendedRateResponse.ServerResponse.Header or
  11947. // (if a response was returned at all) in
  11948. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  11949. // whether the returned error was because http.StatusNotModified was
  11950. // returned.
  11951. func (c *VolumesRecommendedRateCall) Do(opts ...googleapi.CallOption) (*BooksVolumesRecommendedRateResponse, error) {
  11952. gensupport.SetOptions(c.urlParams_, opts...)
  11953. res, err := c.doRequest("json")
  11954. if res != nil && res.StatusCode == http.StatusNotModified {
  11955. if res.Body != nil {
  11956. res.Body.Close()
  11957. }
  11958. return nil, &googleapi.Error{
  11959. Code: res.StatusCode,
  11960. Header: res.Header,
  11961. }
  11962. }
  11963. if err != nil {
  11964. return nil, err
  11965. }
  11966. defer googleapi.CloseBody(res)
  11967. if err := googleapi.CheckResponse(res); err != nil {
  11968. return nil, err
  11969. }
  11970. ret := &BooksVolumesRecommendedRateResponse{
  11971. ServerResponse: googleapi.ServerResponse{
  11972. Header: res.Header,
  11973. HTTPStatusCode: res.StatusCode,
  11974. },
  11975. }
  11976. target := &ret
  11977. if err := gensupport.DecodeResponse(target, res); err != nil {
  11978. return nil, err
  11979. }
  11980. return ret, nil
  11981. // {
  11982. // "description": "Rate a recommended book for the current user.",
  11983. // "httpMethod": "POST",
  11984. // "id": "books.volumes.recommended.rate",
  11985. // "parameterOrder": [
  11986. // "rating",
  11987. // "volumeId"
  11988. // ],
  11989. // "parameters": {
  11990. // "locale": {
  11991. // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
  11992. // "location": "query",
  11993. // "type": "string"
  11994. // },
  11995. // "rating": {
  11996. // "description": "Rating to be given to the volume.",
  11997. // "enum": [
  11998. // "HAVE_IT",
  11999. // "NOT_INTERESTED"
  12000. // ],
  12001. // "enumDescriptions": [
  12002. // "Rating indicating a dismissal due to ownership.",
  12003. // "Rating indicating a negative dismissal of a volume."
  12004. // ],
  12005. // "location": "query",
  12006. // "required": true,
  12007. // "type": "string"
  12008. // },
  12009. // "source": {
  12010. // "description": "String to identify the originator of this request.",
  12011. // "location": "query",
  12012. // "type": "string"
  12013. // },
  12014. // "volumeId": {
  12015. // "description": "ID of the source volume.",
  12016. // "location": "query",
  12017. // "required": true,
  12018. // "type": "string"
  12019. // }
  12020. // },
  12021. // "path": "volumes/recommended/rate",
  12022. // "response": {
  12023. // "$ref": "BooksVolumesRecommendedRateResponse"
  12024. // },
  12025. // "scopes": [
  12026. // "https://www.googleapis.com/auth/books"
  12027. // ]
  12028. // }
  12029. }
  12030. // method id "books.volumes.useruploaded.list":
  12031. type VolumesUseruploadedListCall struct {
  12032. s *Service
  12033. urlParams_ gensupport.URLParams
  12034. ifNoneMatch_ string
  12035. ctx_ context.Context
  12036. header_ http.Header
  12037. }
  12038. // List: Return a list of books uploaded by the current user.
  12039. func (r *VolumesUseruploadedService) List() *VolumesUseruploadedListCall {
  12040. c := &VolumesUseruploadedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12041. return c
  12042. }
  12043. // Locale sets the optional parameter "locale": ISO-639-1 language and
  12044. // ISO-3166-1 country code. Ex: 'en_US'. Used for generating
  12045. // recommendations.
  12046. func (c *VolumesUseruploadedListCall) Locale(locale string) *VolumesUseruploadedListCall {
  12047. c.urlParams_.Set("locale", locale)
  12048. return c
  12049. }
  12050. // MaxResults sets the optional parameter "maxResults": Maximum number
  12051. // of results to return.
  12052. func (c *VolumesUseruploadedListCall) MaxResults(maxResults int64) *VolumesUseruploadedListCall {
  12053. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  12054. return c
  12055. }
  12056. // ProcessingState sets the optional parameter "processingState": The
  12057. // processing state of the user uploaded volumes to be returned.
  12058. //
  12059. // Possible values:
  12060. // "COMPLETED_FAILED" - The volume processing hase failed.
  12061. // "COMPLETED_SUCCESS" - The volume processing was completed.
  12062. // "RUNNING" - The volume processing is not completed.
  12063. func (c *VolumesUseruploadedListCall) ProcessingState(processingState ...string) *VolumesUseruploadedListCall {
  12064. c.urlParams_.SetMulti("processingState", append([]string{}, processingState...))
  12065. return c
  12066. }
  12067. // Source sets the optional parameter "source": String to identify the
  12068. // originator of this request.
  12069. func (c *VolumesUseruploadedListCall) Source(source string) *VolumesUseruploadedListCall {
  12070. c.urlParams_.Set("source", source)
  12071. return c
  12072. }
  12073. // StartIndex sets the optional parameter "startIndex": Index of the
  12074. // first result to return (starts at 0)
  12075. func (c *VolumesUseruploadedListCall) StartIndex(startIndex int64) *VolumesUseruploadedListCall {
  12076. c.urlParams_.Set("startIndex", fmt.Sprint(startIndex))
  12077. return c
  12078. }
  12079. // VolumeId sets the optional parameter "volumeId": The ids of the
  12080. // volumes to be returned. If not specified all that match the
  12081. // processingState are returned.
  12082. func (c *VolumesUseruploadedListCall) VolumeId(volumeId ...string) *VolumesUseruploadedListCall {
  12083. c.urlParams_.SetMulti("volumeId", append([]string{}, volumeId...))
  12084. return c
  12085. }
  12086. // Fields allows partial responses to be retrieved. See
  12087. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12088. // for more information.
  12089. func (c *VolumesUseruploadedListCall) Fields(s ...googleapi.Field) *VolumesUseruploadedListCall {
  12090. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12091. return c
  12092. }
  12093. // IfNoneMatch sets the optional parameter which makes the operation
  12094. // fail if the object's ETag matches the given value. This is useful for
  12095. // getting updates only after the object has changed since the last
  12096. // request. Use googleapi.IsNotModified to check whether the response
  12097. // error from Do is the result of In-None-Match.
  12098. func (c *VolumesUseruploadedListCall) IfNoneMatch(entityTag string) *VolumesUseruploadedListCall {
  12099. c.ifNoneMatch_ = entityTag
  12100. return c
  12101. }
  12102. // Context sets the context to be used in this call's Do method. Any
  12103. // pending HTTP request will be aborted if the provided context is
  12104. // canceled.
  12105. func (c *VolumesUseruploadedListCall) Context(ctx context.Context) *VolumesUseruploadedListCall {
  12106. c.ctx_ = ctx
  12107. return c
  12108. }
  12109. // Header returns an http.Header that can be modified by the caller to
  12110. // add HTTP headers to the request.
  12111. func (c *VolumesUseruploadedListCall) Header() http.Header {
  12112. if c.header_ == nil {
  12113. c.header_ = make(http.Header)
  12114. }
  12115. return c.header_
  12116. }
  12117. func (c *VolumesUseruploadedListCall) doRequest(alt string) (*http.Response, error) {
  12118. reqHeaders := make(http.Header)
  12119. for k, v := range c.header_ {
  12120. reqHeaders[k] = v
  12121. }
  12122. reqHeaders.Set("User-Agent", c.s.userAgent())
  12123. if c.ifNoneMatch_ != "" {
  12124. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  12125. }
  12126. var body io.Reader = nil
  12127. c.urlParams_.Set("alt", alt)
  12128. c.urlParams_.Set("prettyPrint", "false")
  12129. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/useruploaded")
  12130. urls += "?" + c.urlParams_.Encode()
  12131. req, err := http.NewRequest("GET", urls, body)
  12132. if err != nil {
  12133. return nil, err
  12134. }
  12135. req.Header = reqHeaders
  12136. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12137. }
  12138. // Do executes the "books.volumes.useruploaded.list" call.
  12139. // Exactly one of *Volumes or error will be non-nil. Any non-2xx status
  12140. // code is an error. Response headers are in either
  12141. // *Volumes.ServerResponse.Header or (if a response was returned at all)
  12142. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  12143. // check whether the returned error was because http.StatusNotModified
  12144. // was returned.
  12145. func (c *VolumesUseruploadedListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) {
  12146. gensupport.SetOptions(c.urlParams_, opts...)
  12147. res, err := c.doRequest("json")
  12148. if res != nil && res.StatusCode == http.StatusNotModified {
  12149. if res.Body != nil {
  12150. res.Body.Close()
  12151. }
  12152. return nil, &googleapi.Error{
  12153. Code: res.StatusCode,
  12154. Header: res.Header,
  12155. }
  12156. }
  12157. if err != nil {
  12158. return nil, err
  12159. }
  12160. defer googleapi.CloseBody(res)
  12161. if err := googleapi.CheckResponse(res); err != nil {
  12162. return nil, err
  12163. }
  12164. ret := &Volumes{
  12165. ServerResponse: googleapi.ServerResponse{
  12166. Header: res.Header,
  12167. HTTPStatusCode: res.StatusCode,
  12168. },
  12169. }
  12170. target := &ret
  12171. if err := gensupport.DecodeResponse(target, res); err != nil {
  12172. return nil, err
  12173. }
  12174. return ret, nil
  12175. // {
  12176. // "description": "Return a list of books uploaded by the current user.",
  12177. // "httpMethod": "GET",
  12178. // "id": "books.volumes.useruploaded.list",
  12179. // "parameters": {
  12180. // "locale": {
  12181. // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
  12182. // "location": "query",
  12183. // "type": "string"
  12184. // },
  12185. // "maxResults": {
  12186. // "description": "Maximum number of results to return.",
  12187. // "format": "uint32",
  12188. // "location": "query",
  12189. // "maximum": "40",
  12190. // "minimum": "0",
  12191. // "type": "integer"
  12192. // },
  12193. // "processingState": {
  12194. // "description": "The processing state of the user uploaded volumes to be returned.",
  12195. // "enum": [
  12196. // "COMPLETED_FAILED",
  12197. // "COMPLETED_SUCCESS",
  12198. // "RUNNING"
  12199. // ],
  12200. // "enumDescriptions": [
  12201. // "The volume processing hase failed.",
  12202. // "The volume processing was completed.",
  12203. // "The volume processing is not completed."
  12204. // ],
  12205. // "location": "query",
  12206. // "repeated": true,
  12207. // "type": "string"
  12208. // },
  12209. // "source": {
  12210. // "description": "String to identify the originator of this request.",
  12211. // "location": "query",
  12212. // "type": "string"
  12213. // },
  12214. // "startIndex": {
  12215. // "description": "Index of the first result to return (starts at 0)",
  12216. // "format": "uint32",
  12217. // "location": "query",
  12218. // "minimum": "0",
  12219. // "type": "integer"
  12220. // },
  12221. // "volumeId": {
  12222. // "description": "The ids of the volumes to be returned. If not specified all that match the processingState are returned.",
  12223. // "location": "query",
  12224. // "repeated": true,
  12225. // "type": "string"
  12226. // }
  12227. // },
  12228. // "path": "volumes/useruploaded",
  12229. // "response": {
  12230. // "$ref": "Volumes"
  12231. // },
  12232. // "scopes": [
  12233. // "https://www.googleapis.com/auth/books"
  12234. // ]
  12235. // }
  12236. }