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.
 
 
 

13544 lines
465 KiB

  1. // Package books provides access to the Books API.
  2. //
  3. // See https://developers.google.com/books/docs/v1/getting_started
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/books/v1"
  8. // ...
  9. // booksService, err := books.New(oauthHttpClient)
  10. package books // import "google.golang.org/api/books/v1"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "books:v1"
  41. const apiName = "books"
  42. const apiVersion = "v1"
  43. const basePath = "https://www.googleapis.com/books/v1/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // Manage your books
  47. BooksScope = "https://www.googleapis.com/auth/books"
  48. )
  49. func New(client *http.Client) (*Service, error) {
  50. if client == nil {
  51. return nil, errors.New("client is nil")
  52. }
  53. s := &Service{client: client, BasePath: basePath}
  54. s.Bookshelves = NewBookshelvesService(s)
  55. s.Cloudloading = NewCloudloadingService(s)
  56. s.Dictionary = NewDictionaryService(s)
  57. s.Familysharing = NewFamilysharingService(s)
  58. s.Layers = NewLayersService(s)
  59. s.Myconfig = NewMyconfigService(s)
  60. s.Mylibrary = NewMylibraryService(s)
  61. s.Notification = NewNotificationService(s)
  62. s.Onboarding = NewOnboardingService(s)
  63. s.Personalizedstream = NewPersonalizedstreamService(s)
  64. s.Promooffer = NewPromoofferService(s)
  65. s.Series = NewSeriesService(s)
  66. s.Volumes = NewVolumesService(s)
  67. return s, nil
  68. }
  69. type Service struct {
  70. client *http.Client
  71. BasePath string // API endpoint base URL
  72. UserAgent string // optional additional User-Agent fragment
  73. Bookshelves *BookshelvesService
  74. Cloudloading *CloudloadingService
  75. Dictionary *DictionaryService
  76. Familysharing *FamilysharingService
  77. Layers *LayersService
  78. Myconfig *MyconfigService
  79. Mylibrary *MylibraryService
  80. Notification *NotificationService
  81. Onboarding *OnboardingService
  82. Personalizedstream *PersonalizedstreamService
  83. Promooffer *PromoofferService
  84. Series *SeriesService
  85. Volumes *VolumesService
  86. }
  87. func (s *Service) userAgent() string {
  88. if s.UserAgent == "" {
  89. return googleapi.UserAgent
  90. }
  91. return googleapi.UserAgent + " " + s.UserAgent
  92. }
  93. func NewBookshelvesService(s *Service) *BookshelvesService {
  94. rs := &BookshelvesService{s: s}
  95. rs.Volumes = NewBookshelvesVolumesService(s)
  96. return rs
  97. }
  98. type BookshelvesService struct {
  99. s *Service
  100. Volumes *BookshelvesVolumesService
  101. }
  102. func NewBookshelvesVolumesService(s *Service) *BookshelvesVolumesService {
  103. rs := &BookshelvesVolumesService{s: s}
  104. return rs
  105. }
  106. type BookshelvesVolumesService struct {
  107. s *Service
  108. }
  109. func NewCloudloadingService(s *Service) *CloudloadingService {
  110. rs := &CloudloadingService{s: s}
  111. return rs
  112. }
  113. type CloudloadingService struct {
  114. s *Service
  115. }
  116. func NewDictionaryService(s *Service) *DictionaryService {
  117. rs := &DictionaryService{s: s}
  118. return rs
  119. }
  120. type DictionaryService struct {
  121. s *Service
  122. }
  123. func NewFamilysharingService(s *Service) *FamilysharingService {
  124. rs := &FamilysharingService{s: s}
  125. return rs
  126. }
  127. type FamilysharingService struct {
  128. s *Service
  129. }
  130. func NewLayersService(s *Service) *LayersService {
  131. rs := &LayersService{s: s}
  132. rs.AnnotationData = NewLayersAnnotationDataService(s)
  133. rs.VolumeAnnotations = NewLayersVolumeAnnotationsService(s)
  134. return rs
  135. }
  136. type LayersService struct {
  137. s *Service
  138. AnnotationData *LayersAnnotationDataService
  139. VolumeAnnotations *LayersVolumeAnnotationsService
  140. }
  141. func NewLayersAnnotationDataService(s *Service) *LayersAnnotationDataService {
  142. rs := &LayersAnnotationDataService{s: s}
  143. return rs
  144. }
  145. type LayersAnnotationDataService struct {
  146. s *Service
  147. }
  148. func NewLayersVolumeAnnotationsService(s *Service) *LayersVolumeAnnotationsService {
  149. rs := &LayersVolumeAnnotationsService{s: s}
  150. return rs
  151. }
  152. type LayersVolumeAnnotationsService struct {
  153. s *Service
  154. }
  155. func NewMyconfigService(s *Service) *MyconfigService {
  156. rs := &MyconfigService{s: s}
  157. return rs
  158. }
  159. type MyconfigService struct {
  160. s *Service
  161. }
  162. func NewMylibraryService(s *Service) *MylibraryService {
  163. rs := &MylibraryService{s: s}
  164. rs.Annotations = NewMylibraryAnnotationsService(s)
  165. rs.Bookshelves = NewMylibraryBookshelvesService(s)
  166. rs.Readingpositions = NewMylibraryReadingpositionsService(s)
  167. return rs
  168. }
  169. type MylibraryService struct {
  170. s *Service
  171. Annotations *MylibraryAnnotationsService
  172. Bookshelves *MylibraryBookshelvesService
  173. Readingpositions *MylibraryReadingpositionsService
  174. }
  175. func NewMylibraryAnnotationsService(s *Service) *MylibraryAnnotationsService {
  176. rs := &MylibraryAnnotationsService{s: s}
  177. return rs
  178. }
  179. type MylibraryAnnotationsService struct {
  180. s *Service
  181. }
  182. func NewMylibraryBookshelvesService(s *Service) *MylibraryBookshelvesService {
  183. rs := &MylibraryBookshelvesService{s: s}
  184. rs.Volumes = NewMylibraryBookshelvesVolumesService(s)
  185. return rs
  186. }
  187. type MylibraryBookshelvesService struct {
  188. s *Service
  189. Volumes *MylibraryBookshelvesVolumesService
  190. }
  191. func NewMylibraryBookshelvesVolumesService(s *Service) *MylibraryBookshelvesVolumesService {
  192. rs := &MylibraryBookshelvesVolumesService{s: s}
  193. return rs
  194. }
  195. type MylibraryBookshelvesVolumesService struct {
  196. s *Service
  197. }
  198. func NewMylibraryReadingpositionsService(s *Service) *MylibraryReadingpositionsService {
  199. rs := &MylibraryReadingpositionsService{s: s}
  200. return rs
  201. }
  202. type MylibraryReadingpositionsService struct {
  203. s *Service
  204. }
  205. func NewNotificationService(s *Service) *NotificationService {
  206. rs := &NotificationService{s: s}
  207. return rs
  208. }
  209. type NotificationService struct {
  210. s *Service
  211. }
  212. func NewOnboardingService(s *Service) *OnboardingService {
  213. rs := &OnboardingService{s: s}
  214. return rs
  215. }
  216. type OnboardingService struct {
  217. s *Service
  218. }
  219. func NewPersonalizedstreamService(s *Service) *PersonalizedstreamService {
  220. rs := &PersonalizedstreamService{s: s}
  221. return rs
  222. }
  223. type PersonalizedstreamService struct {
  224. s *Service
  225. }
  226. func NewPromoofferService(s *Service) *PromoofferService {
  227. rs := &PromoofferService{s: s}
  228. return rs
  229. }
  230. type PromoofferService struct {
  231. s *Service
  232. }
  233. func NewSeriesService(s *Service) *SeriesService {
  234. rs := &SeriesService{s: s}
  235. rs.Membership = NewSeriesMembershipService(s)
  236. return rs
  237. }
  238. type SeriesService struct {
  239. s *Service
  240. Membership *SeriesMembershipService
  241. }
  242. func NewSeriesMembershipService(s *Service) *SeriesMembershipService {
  243. rs := &SeriesMembershipService{s: s}
  244. return rs
  245. }
  246. type SeriesMembershipService struct {
  247. s *Service
  248. }
  249. func NewVolumesService(s *Service) *VolumesService {
  250. rs := &VolumesService{s: s}
  251. rs.Associated = NewVolumesAssociatedService(s)
  252. rs.Mybooks = NewVolumesMybooksService(s)
  253. rs.Recommended = NewVolumesRecommendedService(s)
  254. rs.Useruploaded = NewVolumesUseruploadedService(s)
  255. return rs
  256. }
  257. type VolumesService struct {
  258. s *Service
  259. Associated *VolumesAssociatedService
  260. Mybooks *VolumesMybooksService
  261. Recommended *VolumesRecommendedService
  262. Useruploaded *VolumesUseruploadedService
  263. }
  264. func NewVolumesAssociatedService(s *Service) *VolumesAssociatedService {
  265. rs := &VolumesAssociatedService{s: s}
  266. return rs
  267. }
  268. type VolumesAssociatedService struct {
  269. s *Service
  270. }
  271. func NewVolumesMybooksService(s *Service) *VolumesMybooksService {
  272. rs := &VolumesMybooksService{s: s}
  273. return rs
  274. }
  275. type VolumesMybooksService struct {
  276. s *Service
  277. }
  278. func NewVolumesRecommendedService(s *Service) *VolumesRecommendedService {
  279. rs := &VolumesRecommendedService{s: s}
  280. return rs
  281. }
  282. type VolumesRecommendedService struct {
  283. s *Service
  284. }
  285. func NewVolumesUseruploadedService(s *Service) *VolumesUseruploadedService {
  286. rs := &VolumesUseruploadedService{s: s}
  287. return rs
  288. }
  289. type VolumesUseruploadedService struct {
  290. s *Service
  291. }
  292. type Annotation struct {
  293. // AfterSelectedText: Anchor text after excerpt. For requests, if the
  294. // user bookmarked a screen that has no flowing text on it, then this
  295. // field should be empty.
  296. AfterSelectedText string `json:"afterSelectedText,omitempty"`
  297. // BeforeSelectedText: Anchor text before excerpt. For requests, if the
  298. // user bookmarked a screen that has no flowing text on it, then this
  299. // field should be empty.
  300. BeforeSelectedText string `json:"beforeSelectedText,omitempty"`
  301. // ClientVersionRanges: Selection ranges sent from the client.
  302. ClientVersionRanges *AnnotationClientVersionRanges `json:"clientVersionRanges,omitempty"`
  303. // Created: Timestamp for the created time of this annotation.
  304. Created string `json:"created,omitempty"`
  305. // CurrentVersionRanges: Selection ranges for the most recent content
  306. // version.
  307. CurrentVersionRanges *AnnotationCurrentVersionRanges `json:"currentVersionRanges,omitempty"`
  308. // Data: User-created data for this annotation.
  309. Data string `json:"data,omitempty"`
  310. // Deleted: Indicates that this annotation is deleted.
  311. Deleted bool `json:"deleted,omitempty"`
  312. // HighlightStyle: The highlight style for this annotation.
  313. HighlightStyle string `json:"highlightStyle,omitempty"`
  314. // Id: Id of this annotation, in the form of a GUID.
  315. Id string `json:"id,omitempty"`
  316. // Kind: Resource type.
  317. Kind string `json:"kind,omitempty"`
  318. // LayerId: The layer this annotation is for.
  319. LayerId string `json:"layerId,omitempty"`
  320. LayerSummary *AnnotationLayerSummary `json:"layerSummary,omitempty"`
  321. // PageIds: Pages that this annotation spans.
  322. PageIds []string `json:"pageIds,omitempty"`
  323. // SelectedText: Excerpt from the volume.
  324. SelectedText string `json:"selectedText,omitempty"`
  325. // SelfLink: URL to this resource.
  326. SelfLink string `json:"selfLink,omitempty"`
  327. // Updated: Timestamp for the last time this annotation was modified.
  328. Updated string `json:"updated,omitempty"`
  329. // VolumeId: The volume that this annotation belongs to.
  330. VolumeId string `json:"volumeId,omitempty"`
  331. // ServerResponse contains the HTTP response code and headers from the
  332. // server.
  333. googleapi.ServerResponse `json:"-"`
  334. // ForceSendFields is a list of field names (e.g. "AfterSelectedText")
  335. // to unconditionally include in API requests. By default, fields with
  336. // empty values are omitted from API requests. However, any non-pointer,
  337. // non-interface field appearing in ForceSendFields will be sent to the
  338. // server regardless of whether the field is empty or not. This may be
  339. // used to include empty fields in Patch requests.
  340. ForceSendFields []string `json:"-"`
  341. // NullFields is a list of field names (e.g. "AfterSelectedText") to
  342. // include in API requests with the JSON null value. By default, fields
  343. // with empty values are omitted from API requests. However, any field
  344. // with an empty value appearing in NullFields will be sent to the
  345. // server as null. It is an error if a field in this list has a
  346. // non-empty value. This may be used to include null fields in Patch
  347. // requests.
  348. NullFields []string `json:"-"`
  349. }
  350. func (s *Annotation) MarshalJSON() ([]byte, error) {
  351. type NoMethod Annotation
  352. raw := NoMethod(*s)
  353. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  354. }
  355. // AnnotationClientVersionRanges: Selection ranges sent from the client.
  356. type AnnotationClientVersionRanges struct {
  357. // CfiRange: Range in CFI format for this annotation sent by client.
  358. CfiRange *BooksAnnotationsRange `json:"cfiRange,omitempty"`
  359. // ContentVersion: Content version the client sent in.
  360. ContentVersion string `json:"contentVersion,omitempty"`
  361. // GbImageRange: Range in GB image format for this annotation sent by
  362. // client.
  363. GbImageRange *BooksAnnotationsRange `json:"gbImageRange,omitempty"`
  364. // GbTextRange: Range in GB text format for this annotation sent by
  365. // client.
  366. GbTextRange *BooksAnnotationsRange `json:"gbTextRange,omitempty"`
  367. // ImageCfiRange: Range in image CFI format for this annotation sent by
  368. // client.
  369. ImageCfiRange *BooksAnnotationsRange `json:"imageCfiRange,omitempty"`
  370. // ForceSendFields is a list of field names (e.g. "CfiRange") to
  371. // unconditionally include in API requests. By default, fields with
  372. // empty values are omitted from API requests. However, any non-pointer,
  373. // non-interface field appearing in ForceSendFields will be sent to the
  374. // server regardless of whether the field is empty or not. This may be
  375. // used to include empty fields in Patch requests.
  376. ForceSendFields []string `json:"-"`
  377. // NullFields is a list of field names (e.g. "CfiRange") to include in
  378. // API requests with the JSON null value. By default, fields with empty
  379. // values are omitted from API requests. However, any field with an
  380. // empty value appearing in NullFields will be sent to the server as
  381. // null. It is an error if a field in this list has a non-empty value.
  382. // This may be used to include null fields in Patch requests.
  383. NullFields []string `json:"-"`
  384. }
  385. func (s *AnnotationClientVersionRanges) MarshalJSON() ([]byte, error) {
  386. type NoMethod AnnotationClientVersionRanges
  387. raw := NoMethod(*s)
  388. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  389. }
  390. // AnnotationCurrentVersionRanges: Selection ranges for the most recent
  391. // content version.
  392. type AnnotationCurrentVersionRanges struct {
  393. // CfiRange: Range in CFI format for this annotation for version above.
  394. CfiRange *BooksAnnotationsRange `json:"cfiRange,omitempty"`
  395. // ContentVersion: Content version applicable to ranges below.
  396. ContentVersion string `json:"contentVersion,omitempty"`
  397. // GbImageRange: Range in GB image format for this annotation for
  398. // version above.
  399. GbImageRange *BooksAnnotationsRange `json:"gbImageRange,omitempty"`
  400. // GbTextRange: Range in GB text format for this annotation for version
  401. // above.
  402. GbTextRange *BooksAnnotationsRange `json:"gbTextRange,omitempty"`
  403. // ImageCfiRange: Range in image CFI format for this annotation for
  404. // version above.
  405. ImageCfiRange *BooksAnnotationsRange `json:"imageCfiRange,omitempty"`
  406. // ForceSendFields is a list of field names (e.g. "CfiRange") to
  407. // unconditionally include in API requests. By default, fields with
  408. // empty values are omitted from API requests. However, any non-pointer,
  409. // non-interface field appearing in ForceSendFields will be sent to the
  410. // server regardless of whether the field is empty or not. This may be
  411. // used to include empty fields in Patch requests.
  412. ForceSendFields []string `json:"-"`
  413. // NullFields is a list of field names (e.g. "CfiRange") to include in
  414. // API requests with the JSON null value. By default, fields with empty
  415. // values are omitted from API requests. However, any field with an
  416. // empty value appearing in NullFields will be sent to the server as
  417. // null. It is an error if a field in this list has a non-empty value.
  418. // This may be used to include null fields in Patch requests.
  419. NullFields []string `json:"-"`
  420. }
  421. func (s *AnnotationCurrentVersionRanges) MarshalJSON() ([]byte, error) {
  422. type NoMethod AnnotationCurrentVersionRanges
  423. raw := NoMethod(*s)
  424. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  425. }
  426. type AnnotationLayerSummary struct {
  427. // AllowedCharacterCount: Maximum allowed characters on this layer,
  428. // especially for the "copy" layer.
  429. AllowedCharacterCount int64 `json:"allowedCharacterCount,omitempty"`
  430. // LimitType: Type of limitation on this layer. "limited" or "unlimited"
  431. // for the "copy" layer.
  432. LimitType string `json:"limitType,omitempty"`
  433. // RemainingCharacterCount: Remaining allowed characters on this layer,
  434. // especially for the "copy" layer.
  435. RemainingCharacterCount int64 `json:"remainingCharacterCount,omitempty"`
  436. // ForceSendFields is a list of field names (e.g.
  437. // "AllowedCharacterCount") to unconditionally include in API requests.
  438. // By default, fields with empty values are omitted from API requests.
  439. // However, any non-pointer, non-interface field appearing in
  440. // ForceSendFields will be sent to the server regardless of whether the
  441. // field is empty or not. This may be used to include empty fields in
  442. // Patch requests.
  443. ForceSendFields []string `json:"-"`
  444. // NullFields is a list of field names (e.g. "AllowedCharacterCount") to
  445. // include in API requests with the JSON null value. By default, fields
  446. // with empty values are omitted from API requests. However, any field
  447. // with an empty value appearing in NullFields will be sent to the
  448. // server as null. It is an error if a field in this list has a
  449. // non-empty value. This may be used to include null fields in Patch
  450. // requests.
  451. NullFields []string `json:"-"`
  452. }
  453. func (s *AnnotationLayerSummary) MarshalJSON() ([]byte, error) {
  454. type NoMethod AnnotationLayerSummary
  455. raw := NoMethod(*s)
  456. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  457. }
  458. type Annotationdata struct {
  459. // AnnotationType: The type of annotation this data is for.
  460. AnnotationType string `json:"annotationType,omitempty"`
  461. Data interface{} `json:"data,omitempty"`
  462. // EncodedData: Base64 encoded data for this annotation data.
  463. EncodedData string `json:"encoded_data,omitempty"`
  464. // Id: Unique id for this annotation data.
  465. Id string `json:"id,omitempty"`
  466. // Kind: Resource Type
  467. Kind string `json:"kind,omitempty"`
  468. // LayerId: The Layer id for this data. *
  469. LayerId string `json:"layerId,omitempty"`
  470. // SelfLink: URL for this resource. *
  471. SelfLink string `json:"selfLink,omitempty"`
  472. // Updated: Timestamp for the last time this data was updated. (RFC 3339
  473. // UTC date-time format).
  474. Updated string `json:"updated,omitempty"`
  475. // VolumeId: The volume id for this data. *
  476. VolumeId string `json:"volumeId,omitempty"`
  477. // ServerResponse contains the HTTP response code and headers from the
  478. // server.
  479. googleapi.ServerResponse `json:"-"`
  480. // ForceSendFields is a list of field names (e.g. "AnnotationType") to
  481. // unconditionally include in API requests. By default, fields with
  482. // empty values are omitted from API requests. However, any non-pointer,
  483. // non-interface field appearing in ForceSendFields will be sent to the
  484. // server regardless of whether the field is empty or not. This may be
  485. // used to include empty fields in Patch requests.
  486. ForceSendFields []string `json:"-"`
  487. // NullFields is a list of field names (e.g. "AnnotationType") to
  488. // include in API requests with the JSON null value. By default, fields
  489. // with empty values are omitted from API requests. However, any field
  490. // with an empty value appearing in NullFields will be sent to the
  491. // server as null. It is an error if a field in this list has a
  492. // non-empty value. This may be used to include null fields in Patch
  493. // requests.
  494. NullFields []string `json:"-"`
  495. }
  496. func (s *Annotationdata) MarshalJSON() ([]byte, error) {
  497. type NoMethod Annotationdata
  498. raw := NoMethod(*s)
  499. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  500. }
  501. type Annotations struct {
  502. // Items: A list of annotations.
  503. Items []*Annotation `json:"items,omitempty"`
  504. // Kind: Resource type.
  505. Kind string `json:"kind,omitempty"`
  506. // NextPageToken: Token to pass in for pagination for the next page.
  507. // This will not be present if this request does not have more results.
  508. NextPageToken string `json:"nextPageToken,omitempty"`
  509. // TotalItems: Total number of annotations found. This may be greater
  510. // than the number of notes returned in this response if results have
  511. // been paginated.
  512. TotalItems int64 `json:"totalItems,omitempty"`
  513. // ServerResponse contains the HTTP response code and headers from the
  514. // server.
  515. googleapi.ServerResponse `json:"-"`
  516. // ForceSendFields is a list of field names (e.g. "Items") to
  517. // unconditionally include in API requests. By default, fields with
  518. // empty values are omitted from API requests. However, any non-pointer,
  519. // non-interface field appearing in ForceSendFields will be sent to the
  520. // server regardless of whether the field is empty or not. This may be
  521. // used to include empty fields in Patch requests.
  522. ForceSendFields []string `json:"-"`
  523. // NullFields is a list of field names (e.g. "Items") to include in API
  524. // requests with the JSON null value. By default, fields with empty
  525. // values are omitted from API requests. However, any field with an
  526. // empty value appearing in NullFields will be sent to the server as
  527. // null. It is an error if a field in this list has a non-empty value.
  528. // This may be used to include null fields in Patch requests.
  529. NullFields []string `json:"-"`
  530. }
  531. func (s *Annotations) MarshalJSON() ([]byte, error) {
  532. type NoMethod Annotations
  533. raw := NoMethod(*s)
  534. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  535. }
  536. type AnnotationsSummary struct {
  537. Kind string `json:"kind,omitempty"`
  538. Layers []*AnnotationsSummaryLayers `json:"layers,omitempty"`
  539. // ServerResponse contains the HTTP response code and headers from the
  540. // server.
  541. googleapi.ServerResponse `json:"-"`
  542. // ForceSendFields is a list of field names (e.g. "Kind") to
  543. // unconditionally include in API requests. By default, fields with
  544. // empty values are omitted from API requests. However, any non-pointer,
  545. // non-interface field appearing in ForceSendFields will be sent to the
  546. // server regardless of whether the field is empty or not. This may be
  547. // used to include empty fields in Patch requests.
  548. ForceSendFields []string `json:"-"`
  549. // NullFields is a list of field names (e.g. "Kind") to include in API
  550. // requests with the JSON null value. By default, fields with empty
  551. // values are omitted from API requests. However, any field with an
  552. // empty value appearing in NullFields will be sent to the server as
  553. // null. It is an error if a field in this list has a non-empty value.
  554. // This may be used to include null fields in Patch requests.
  555. NullFields []string `json:"-"`
  556. }
  557. func (s *AnnotationsSummary) MarshalJSON() ([]byte, error) {
  558. type NoMethod AnnotationsSummary
  559. raw := NoMethod(*s)
  560. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  561. }
  562. type AnnotationsSummaryLayers struct {
  563. AllowedCharacterCount int64 `json:"allowedCharacterCount,omitempty"`
  564. LayerId string `json:"layerId,omitempty"`
  565. LimitType string `json:"limitType,omitempty"`
  566. RemainingCharacterCount int64 `json:"remainingCharacterCount,omitempty"`
  567. Updated string `json:"updated,omitempty"`
  568. // ForceSendFields is a list of field names (e.g.
  569. // "AllowedCharacterCount") to unconditionally include in API requests.
  570. // By default, fields with empty values are omitted from API requests.
  571. // However, any non-pointer, non-interface field appearing in
  572. // ForceSendFields will be sent to the server regardless of whether the
  573. // field is empty or not. This may be used to include empty fields in
  574. // Patch requests.
  575. ForceSendFields []string `json:"-"`
  576. // NullFields is a list of field names (e.g. "AllowedCharacterCount") to
  577. // include in API requests with the JSON null value. By default, fields
  578. // with empty values are omitted from API requests. However, any field
  579. // with an empty value appearing in NullFields will be sent to the
  580. // server as null. It is an error if a field in this list has a
  581. // non-empty value. This may be used to include null fields in Patch
  582. // requests.
  583. NullFields []string `json:"-"`
  584. }
  585. func (s *AnnotationsSummaryLayers) MarshalJSON() ([]byte, error) {
  586. type NoMethod AnnotationsSummaryLayers
  587. raw := NoMethod(*s)
  588. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  589. }
  590. type Annotationsdata struct {
  591. // Items: A list of Annotation Data.
  592. Items []*Annotationdata `json:"items,omitempty"`
  593. // Kind: Resource type
  594. Kind string `json:"kind,omitempty"`
  595. // NextPageToken: Token to pass in for pagination for the next page.
  596. // This will not be present if this request does not have more results.
  597. NextPageToken string `json:"nextPageToken,omitempty"`
  598. // TotalItems: The total number of volume annotations found.
  599. TotalItems int64 `json:"totalItems,omitempty"`
  600. // ServerResponse contains the HTTP response code and headers from the
  601. // server.
  602. googleapi.ServerResponse `json:"-"`
  603. // ForceSendFields is a list of field names (e.g. "Items") to
  604. // unconditionally include in API requests. By default, fields with
  605. // empty values are omitted from API requests. However, any non-pointer,
  606. // non-interface field appearing in ForceSendFields will be sent to the
  607. // server regardless of whether the field is empty or not. This may be
  608. // used to include empty fields in Patch requests.
  609. ForceSendFields []string `json:"-"`
  610. // NullFields is a list of field names (e.g. "Items") to include in API
  611. // requests with the JSON null value. By default, fields with empty
  612. // values are omitted from API requests. However, any field with an
  613. // empty value appearing in NullFields will be sent to the server as
  614. // null. It is an error if a field in this list has a non-empty value.
  615. // This may be used to include null fields in Patch requests.
  616. NullFields []string `json:"-"`
  617. }
  618. func (s *Annotationsdata) MarshalJSON() ([]byte, error) {
  619. type NoMethod Annotationsdata
  620. raw := NoMethod(*s)
  621. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  622. }
  623. type BooksAnnotationsRange struct {
  624. // EndOffset: The offset from the ending position.
  625. EndOffset string `json:"endOffset,omitempty"`
  626. // EndPosition: The ending position for the range.
  627. EndPosition string `json:"endPosition,omitempty"`
  628. // StartOffset: The offset from the starting position.
  629. StartOffset string `json:"startOffset,omitempty"`
  630. // StartPosition: The starting position for the range.
  631. StartPosition string `json:"startPosition,omitempty"`
  632. // ForceSendFields is a list of field names (e.g. "EndOffset") to
  633. // unconditionally include in API requests. By default, fields with
  634. // empty values are omitted from API requests. However, any non-pointer,
  635. // non-interface field appearing in ForceSendFields will be sent to the
  636. // server regardless of whether the field is empty or not. This may be
  637. // used to include empty fields in Patch requests.
  638. ForceSendFields []string `json:"-"`
  639. // NullFields is a list of field names (e.g. "EndOffset") to include in
  640. // API requests with the JSON null value. By default, fields with empty
  641. // values are omitted from API requests. However, any field with an
  642. // empty value appearing in NullFields will be sent to the server as
  643. // null. It is an error if a field in this list has a non-empty value.
  644. // This may be used to include null fields in Patch requests.
  645. NullFields []string `json:"-"`
  646. }
  647. func (s *BooksAnnotationsRange) MarshalJSON() ([]byte, error) {
  648. type NoMethod BooksAnnotationsRange
  649. raw := NoMethod(*s)
  650. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  651. }
  652. type BooksCloudloadingResource struct {
  653. Author string `json:"author,omitempty"`
  654. ProcessingState string `json:"processingState,omitempty"`
  655. Title string `json:"title,omitempty"`
  656. VolumeId string `json:"volumeId,omitempty"`
  657. // ServerResponse contains the HTTP response code and headers from the
  658. // server.
  659. googleapi.ServerResponse `json:"-"`
  660. // ForceSendFields is a list of field names (e.g. "Author") to
  661. // unconditionally include in API requests. By default, fields with
  662. // empty values are omitted from API requests. However, any non-pointer,
  663. // non-interface field appearing in ForceSendFields will be sent to the
  664. // server regardless of whether the field is empty or not. This may be
  665. // used to include empty fields in Patch requests.
  666. ForceSendFields []string `json:"-"`
  667. // NullFields is a list of field names (e.g. "Author") to include in API
  668. // requests with the JSON null value. By default, fields with empty
  669. // values are omitted from API requests. However, any field with an
  670. // empty value appearing in NullFields will be sent to the server as
  671. // null. It is an error if a field in this list has a non-empty value.
  672. // This may be used to include null fields in Patch requests.
  673. NullFields []string `json:"-"`
  674. }
  675. func (s *BooksCloudloadingResource) MarshalJSON() ([]byte, error) {
  676. type NoMethod BooksCloudloadingResource
  677. raw := NoMethod(*s)
  678. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  679. }
  680. type BooksVolumesRecommendedRateResponse struct {
  681. ConsistencyToken string `json:"consistency_token,omitempty"`
  682. // ServerResponse contains the HTTP response code and headers from the
  683. // server.
  684. googleapi.ServerResponse `json:"-"`
  685. // ForceSendFields is a list of field names (e.g. "ConsistencyToken") to
  686. // unconditionally include in API requests. By default, fields with
  687. // empty values are omitted from API requests. However, any non-pointer,
  688. // non-interface field appearing in ForceSendFields will be sent to the
  689. // server regardless of whether the field is empty or not. This may be
  690. // used to include empty fields in Patch requests.
  691. ForceSendFields []string `json:"-"`
  692. // NullFields is a list of field names (e.g. "ConsistencyToken") to
  693. // include in API requests with the JSON null value. By default, fields
  694. // with empty values are omitted from API requests. However, any field
  695. // with an empty value appearing in NullFields will be sent to the
  696. // server as null. It is an error if a field in this list has a
  697. // non-empty value. This may be used to include null fields in Patch
  698. // requests.
  699. NullFields []string `json:"-"`
  700. }
  701. func (s *BooksVolumesRecommendedRateResponse) MarshalJSON() ([]byte, error) {
  702. type NoMethod BooksVolumesRecommendedRateResponse
  703. raw := NoMethod(*s)
  704. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  705. }
  706. type Bookshelf struct {
  707. // Access: Whether this bookshelf is PUBLIC or PRIVATE.
  708. Access string `json:"access,omitempty"`
  709. // Created: Created time for this bookshelf (formatted UTC timestamp
  710. // with millisecond resolution).
  711. Created string `json:"created,omitempty"`
  712. // Description: Description of this bookshelf.
  713. Description string `json:"description,omitempty"`
  714. // Id: Id of this bookshelf, only unique by user.
  715. Id int64 `json:"id,omitempty"`
  716. // Kind: Resource type for bookshelf metadata.
  717. Kind string `json:"kind,omitempty"`
  718. // SelfLink: URL to this resource.
  719. SelfLink string `json:"selfLink,omitempty"`
  720. // Title: Title of this bookshelf.
  721. Title string `json:"title,omitempty"`
  722. // Updated: Last modified time of this bookshelf (formatted UTC
  723. // timestamp with millisecond resolution).
  724. Updated string `json:"updated,omitempty"`
  725. // VolumeCount: Number of volumes in this bookshelf.
  726. VolumeCount int64 `json:"volumeCount,omitempty"`
  727. // VolumesLastUpdated: Last time a volume was added or removed from this
  728. // bookshelf (formatted UTC timestamp with millisecond resolution).
  729. VolumesLastUpdated string `json:"volumesLastUpdated,omitempty"`
  730. // ServerResponse contains the HTTP response code and headers from the
  731. // server.
  732. googleapi.ServerResponse `json:"-"`
  733. // ForceSendFields is a list of field names (e.g. "Access") to
  734. // unconditionally include in API requests. By default, fields with
  735. // empty values are omitted from API requests. However, any non-pointer,
  736. // non-interface field appearing in ForceSendFields will be sent to the
  737. // server regardless of whether the field is empty or not. This may be
  738. // used to include empty fields in Patch requests.
  739. ForceSendFields []string `json:"-"`
  740. // NullFields is a list of field names (e.g. "Access") to include in API
  741. // requests with the JSON null value. By default, fields with empty
  742. // values are omitted from API requests. However, any field with an
  743. // empty value appearing in NullFields will be sent to the server as
  744. // null. It is an error if a field in this list has a non-empty value.
  745. // This may be used to include null fields in Patch requests.
  746. NullFields []string `json:"-"`
  747. }
  748. func (s *Bookshelf) MarshalJSON() ([]byte, error) {
  749. type NoMethod Bookshelf
  750. raw := NoMethod(*s)
  751. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  752. }
  753. type Bookshelves struct {
  754. // Items: A list of bookshelves.
  755. Items []*Bookshelf `json:"items,omitempty"`
  756. // Kind: Resource type.
  757. Kind string `json:"kind,omitempty"`
  758. // ServerResponse contains the HTTP response code and headers from the
  759. // server.
  760. googleapi.ServerResponse `json:"-"`
  761. // ForceSendFields is a list of field names (e.g. "Items") to
  762. // unconditionally include in API requests. By default, fields with
  763. // empty values are omitted from API requests. However, any non-pointer,
  764. // non-interface field appearing in ForceSendFields will be sent to the
  765. // server regardless of whether the field is empty or not. This may be
  766. // used to include empty fields in Patch requests.
  767. ForceSendFields []string `json:"-"`
  768. // NullFields is a list of field names (e.g. "Items") to include in API
  769. // requests with the JSON null value. By default, fields with empty
  770. // values are omitted from API requests. However, any field with an
  771. // empty value appearing in NullFields will be sent to the server as
  772. // null. It is an error if a field in this list has a non-empty value.
  773. // This may be used to include null fields in Patch requests.
  774. NullFields []string `json:"-"`
  775. }
  776. func (s *Bookshelves) MarshalJSON() ([]byte, error) {
  777. type NoMethod Bookshelves
  778. raw := NoMethod(*s)
  779. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  780. }
  781. type Category struct {
  782. // Items: A list of onboarding categories.
  783. Items []*CategoryItems `json:"items,omitempty"`
  784. // Kind: Resource type.
  785. Kind string `json:"kind,omitempty"`
  786. // ServerResponse contains the HTTP response code and headers from the
  787. // server.
  788. googleapi.ServerResponse `json:"-"`
  789. // ForceSendFields is a list of field names (e.g. "Items") to
  790. // unconditionally include in API requests. By default, fields with
  791. // empty values are omitted from API requests. However, any non-pointer,
  792. // non-interface field appearing in ForceSendFields will be sent to the
  793. // server regardless of whether the field is empty or not. This may be
  794. // used to include empty fields in Patch requests.
  795. ForceSendFields []string `json:"-"`
  796. // NullFields is a list of field names (e.g. "Items") to include in API
  797. // requests with the JSON null value. By default, fields with empty
  798. // values are omitted from API requests. However, any field with an
  799. // empty value appearing in NullFields will be sent to the server as
  800. // null. It is an error if a field in this list has a non-empty value.
  801. // This may be used to include null fields in Patch requests.
  802. NullFields []string `json:"-"`
  803. }
  804. func (s *Category) MarshalJSON() ([]byte, error) {
  805. type NoMethod Category
  806. raw := NoMethod(*s)
  807. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  808. }
  809. type CategoryItems struct {
  810. BadgeUrl string `json:"badgeUrl,omitempty"`
  811. CategoryId string `json:"categoryId,omitempty"`
  812. Name string `json:"name,omitempty"`
  813. // ForceSendFields is a list of field names (e.g. "BadgeUrl") to
  814. // unconditionally include in API requests. By default, fields with
  815. // empty values are omitted from API requests. However, any non-pointer,
  816. // non-interface field appearing in ForceSendFields will be sent to the
  817. // server regardless of whether the field is empty or not. This may be
  818. // used to include empty fields in Patch requests.
  819. ForceSendFields []string `json:"-"`
  820. // NullFields is a list of field names (e.g. "BadgeUrl") to include in
  821. // API requests with the JSON null value. By default, fields with empty
  822. // values are omitted from API requests. However, any field with an
  823. // empty value appearing in NullFields will be sent to the server as
  824. // null. It is an error if a field in this list has a non-empty value.
  825. // This may be used to include null fields in Patch requests.
  826. NullFields []string `json:"-"`
  827. }
  828. func (s *CategoryItems) MarshalJSON() ([]byte, error) {
  829. type NoMethod CategoryItems
  830. raw := NoMethod(*s)
  831. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  832. }
  833. type ConcurrentAccessRestriction struct {
  834. // DeviceAllowed: Whether access is granted for this (user, device,
  835. // volume).
  836. DeviceAllowed bool `json:"deviceAllowed,omitempty"`
  837. // Kind: Resource type.
  838. Kind string `json:"kind,omitempty"`
  839. // MaxConcurrentDevices: The maximum number of concurrent access
  840. // licenses for this volume.
  841. MaxConcurrentDevices int64 `json:"maxConcurrentDevices,omitempty"`
  842. // Message: Error/warning message.
  843. Message string `json:"message,omitempty"`
  844. // Nonce: Client nonce for verification. Download access and
  845. // client-validation only.
  846. Nonce string `json:"nonce,omitempty"`
  847. // ReasonCode: Error/warning reason code.
  848. ReasonCode string `json:"reasonCode,omitempty"`
  849. // Restricted: Whether this volume has any concurrent access
  850. // restrictions.
  851. Restricted bool `json:"restricted,omitempty"`
  852. // Signature: Response signature.
  853. Signature string `json:"signature,omitempty"`
  854. // Source: Client app identifier for verification. Download access and
  855. // client-validation only.
  856. Source string `json:"source,omitempty"`
  857. // TimeWindowSeconds: Time in seconds for license auto-expiration.
  858. TimeWindowSeconds int64 `json:"timeWindowSeconds,omitempty"`
  859. // VolumeId: Identifies the volume for which this entry applies.
  860. VolumeId string `json:"volumeId,omitempty"`
  861. // ForceSendFields is a list of field names (e.g. "DeviceAllowed") to
  862. // unconditionally include in API requests. By default, fields with
  863. // empty values are omitted from API requests. However, any non-pointer,
  864. // non-interface field appearing in ForceSendFields will be sent to the
  865. // server regardless of whether the field is empty or not. This may be
  866. // used to include empty fields in Patch requests.
  867. ForceSendFields []string `json:"-"`
  868. // NullFields is a list of field names (e.g. "DeviceAllowed") to include
  869. // in API requests with the JSON null value. By default, fields with
  870. // empty values are omitted from API requests. However, any field with
  871. // an empty value appearing in NullFields will be sent to the server as
  872. // null. It is an error if a field in this list has a non-empty value.
  873. // This may be used to include null fields in Patch requests.
  874. NullFields []string `json:"-"`
  875. }
  876. func (s *ConcurrentAccessRestriction) MarshalJSON() ([]byte, error) {
  877. type NoMethod ConcurrentAccessRestriction
  878. raw := NoMethod(*s)
  879. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  880. }
  881. type Dictlayerdata struct {
  882. Common *DictlayerdataCommon `json:"common,omitempty"`
  883. Dict *DictlayerdataDict `json:"dict,omitempty"`
  884. Kind string `json:"kind,omitempty"`
  885. // ForceSendFields is a list of field names (e.g. "Common") to
  886. // unconditionally include in API requests. By default, fields with
  887. // empty values are omitted from API requests. However, any non-pointer,
  888. // non-interface field appearing in ForceSendFields will be sent to the
  889. // server regardless of whether the field is empty or not. This may be
  890. // used to include empty fields in Patch requests.
  891. ForceSendFields []string `json:"-"`
  892. // NullFields is a list of field names (e.g. "Common") to include in API
  893. // requests with the JSON null value. By default, fields with empty
  894. // values are omitted from API requests. However, any field with an
  895. // empty value appearing in NullFields will be sent to the server as
  896. // null. It is an error if a field in this list has a non-empty value.
  897. // This may be used to include null fields in Patch requests.
  898. NullFields []string `json:"-"`
  899. }
  900. func (s *Dictlayerdata) MarshalJSON() ([]byte, error) {
  901. type NoMethod Dictlayerdata
  902. raw := NoMethod(*s)
  903. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  904. }
  905. type DictlayerdataCommon struct {
  906. // Title: The display title and localized canonical name to use when
  907. // searching for this entity on Google search.
  908. Title string `json:"title,omitempty"`
  909. // ForceSendFields is a list of field names (e.g. "Title") to
  910. // unconditionally include in API requests. By default, fields with
  911. // empty values are omitted from API requests. However, any non-pointer,
  912. // non-interface field appearing in ForceSendFields will be sent to the
  913. // server regardless of whether the field is empty or not. This may be
  914. // used to include empty fields in Patch requests.
  915. ForceSendFields []string `json:"-"`
  916. // NullFields is a list of field names (e.g. "Title") to include in API
  917. // requests with the JSON null value. By default, fields with empty
  918. // values are omitted from API requests. However, any field with an
  919. // empty value appearing in NullFields will be sent to the server as
  920. // null. It is an error if a field in this list has a non-empty value.
  921. // This may be used to include null fields in Patch requests.
  922. NullFields []string `json:"-"`
  923. }
  924. func (s *DictlayerdataCommon) MarshalJSON() ([]byte, error) {
  925. type NoMethod DictlayerdataCommon
  926. raw := NoMethod(*s)
  927. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  928. }
  929. type DictlayerdataDict struct {
  930. // Source: The source, url and attribution for this dictionary data.
  931. Source *DictlayerdataDictSource `json:"source,omitempty"`
  932. Words []*DictlayerdataDictWords `json:"words,omitempty"`
  933. // ForceSendFields is a list of field names (e.g. "Source") to
  934. // unconditionally include in API requests. By default, fields with
  935. // empty values are omitted from API requests. However, any non-pointer,
  936. // non-interface field appearing in ForceSendFields will be sent to the
  937. // server regardless of whether the field is empty or not. This may be
  938. // used to include empty fields in Patch requests.
  939. ForceSendFields []string `json:"-"`
  940. // NullFields is a list of field names (e.g. "Source") to include in API
  941. // requests with the JSON null value. By default, fields with empty
  942. // values are omitted from API requests. However, any field with an
  943. // empty value appearing in NullFields will be sent to the server as
  944. // null. It is an error if a field in this list has a non-empty value.
  945. // This may be used to include null fields in Patch requests.
  946. NullFields []string `json:"-"`
  947. }
  948. func (s *DictlayerdataDict) MarshalJSON() ([]byte, error) {
  949. type NoMethod DictlayerdataDict
  950. raw := NoMethod(*s)
  951. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  952. }
  953. // DictlayerdataDictSource: The source, url and attribution for this
  954. // dictionary data.
  955. type DictlayerdataDictSource struct {
  956. Attribution string `json:"attribution,omitempty"`
  957. Url string `json:"url,omitempty"`
  958. // ForceSendFields is a list of field names (e.g. "Attribution") to
  959. // unconditionally include in API requests. By default, fields with
  960. // empty values are omitted from API requests. However, any non-pointer,
  961. // non-interface field appearing in ForceSendFields will be sent to the
  962. // server regardless of whether the field is empty or not. This may be
  963. // used to include empty fields in Patch requests.
  964. ForceSendFields []string `json:"-"`
  965. // NullFields is a list of field names (e.g. "Attribution") to include
  966. // in API requests with the JSON null value. By default, fields with
  967. // empty values are omitted from API requests. However, any field with
  968. // an empty value appearing in NullFields will be sent to the server as
  969. // null. It is an error if a field in this list has a non-empty value.
  970. // This may be used to include null fields in Patch requests.
  971. NullFields []string `json:"-"`
  972. }
  973. func (s *DictlayerdataDictSource) MarshalJSON() ([]byte, error) {
  974. type NoMethod DictlayerdataDictSource
  975. raw := NoMethod(*s)
  976. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  977. }
  978. type DictlayerdataDictWords struct {
  979. Derivatives []*DictlayerdataDictWordsDerivatives `json:"derivatives,omitempty"`
  980. Examples []*DictlayerdataDictWordsExamples `json:"examples,omitempty"`
  981. Senses []*DictlayerdataDictWordsSenses `json:"senses,omitempty"`
  982. // Source: The words with different meanings but not related words, e.g.
  983. // "go" (game) and "go" (verb).
  984. Source *DictlayerdataDictWordsSource `json:"source,omitempty"`
  985. // ForceSendFields is a list of field names (e.g. "Derivatives") to
  986. // unconditionally include in API requests. By default, fields with
  987. // empty values are omitted from API requests. However, any non-pointer,
  988. // non-interface field appearing in ForceSendFields will be sent to the
  989. // server regardless of whether the field is empty or not. This may be
  990. // used to include empty fields in Patch requests.
  991. ForceSendFields []string `json:"-"`
  992. // NullFields is a list of field names (e.g. "Derivatives") to include
  993. // in API requests with the JSON null value. By default, fields with
  994. // empty values are omitted from API requests. However, any field with
  995. // an empty value appearing in NullFields will be sent to the server as
  996. // null. It is an error if a field in this list has a non-empty value.
  997. // This may be used to include null fields in Patch requests.
  998. NullFields []string `json:"-"`
  999. }
  1000. func (s *DictlayerdataDictWords) MarshalJSON() ([]byte, error) {
  1001. type NoMethod DictlayerdataDictWords
  1002. raw := NoMethod(*s)
  1003. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1004. }
  1005. type DictlayerdataDictWordsDerivatives struct {
  1006. Source *DictlayerdataDictWordsDerivativesSource `json:"source,omitempty"`
  1007. Text string `json:"text,omitempty"`
  1008. // ForceSendFields is a list of field names (e.g. "Source") to
  1009. // unconditionally include in API requests. By default, fields with
  1010. // empty values are omitted from API requests. However, any non-pointer,
  1011. // non-interface field appearing in ForceSendFields will be sent to the
  1012. // server regardless of whether the field is empty or not. This may be
  1013. // used to include empty fields in Patch requests.
  1014. ForceSendFields []string `json:"-"`
  1015. // NullFields is a list of field names (e.g. "Source") to include in API
  1016. // requests with the JSON null value. By default, fields with empty
  1017. // values are omitted from API requests. However, any field with an
  1018. // empty value appearing in NullFields will be sent to the server as
  1019. // null. It is an error if a field in this list has a non-empty value.
  1020. // This may be used to include null fields in Patch requests.
  1021. NullFields []string `json:"-"`
  1022. }
  1023. func (s *DictlayerdataDictWordsDerivatives) MarshalJSON() ([]byte, error) {
  1024. type NoMethod DictlayerdataDictWordsDerivatives
  1025. raw := NoMethod(*s)
  1026. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1027. }
  1028. type DictlayerdataDictWordsDerivativesSource struct {
  1029. Attribution string `json:"attribution,omitempty"`
  1030. Url string `json:"url,omitempty"`
  1031. // ForceSendFields is a list of field names (e.g. "Attribution") to
  1032. // unconditionally include in API requests. By default, fields with
  1033. // empty values are omitted from API requests. However, any non-pointer,
  1034. // non-interface field appearing in ForceSendFields will be sent to the
  1035. // server regardless of whether the field is empty or not. This may be
  1036. // used to include empty fields in Patch requests.
  1037. ForceSendFields []string `json:"-"`
  1038. // NullFields is a list of field names (e.g. "Attribution") to include
  1039. // in API requests with the JSON null value. By default, fields with
  1040. // empty values are omitted from API requests. However, any field with
  1041. // an empty value appearing in NullFields will be sent to the server as
  1042. // null. It is an error if a field in this list has a non-empty value.
  1043. // This may be used to include null fields in Patch requests.
  1044. NullFields []string `json:"-"`
  1045. }
  1046. func (s *DictlayerdataDictWordsDerivativesSource) MarshalJSON() ([]byte, error) {
  1047. type NoMethod DictlayerdataDictWordsDerivativesSource
  1048. raw := NoMethod(*s)
  1049. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1050. }
  1051. type DictlayerdataDictWordsExamples struct {
  1052. Source *DictlayerdataDictWordsExamplesSource `json:"source,omitempty"`
  1053. Text string `json:"text,omitempty"`
  1054. // ForceSendFields is a list of field names (e.g. "Source") to
  1055. // unconditionally include in API requests. By default, fields with
  1056. // empty values are omitted from API requests. However, any non-pointer,
  1057. // non-interface field appearing in ForceSendFields will be sent to the
  1058. // server regardless of whether the field is empty or not. This may be
  1059. // used to include empty fields in Patch requests.
  1060. ForceSendFields []string `json:"-"`
  1061. // NullFields is a list of field names (e.g. "Source") to include in API
  1062. // requests with the JSON null value. By default, fields with empty
  1063. // values are omitted from API requests. However, any field with an
  1064. // empty value appearing in NullFields will be sent to the server as
  1065. // null. It is an error if a field in this list has a non-empty value.
  1066. // This may be used to include null fields in Patch requests.
  1067. NullFields []string `json:"-"`
  1068. }
  1069. func (s *DictlayerdataDictWordsExamples) MarshalJSON() ([]byte, error) {
  1070. type NoMethod DictlayerdataDictWordsExamples
  1071. raw := NoMethod(*s)
  1072. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1073. }
  1074. type DictlayerdataDictWordsExamplesSource struct {
  1075. Attribution string `json:"attribution,omitempty"`
  1076. Url string `json:"url,omitempty"`
  1077. // ForceSendFields is a list of field names (e.g. "Attribution") to
  1078. // unconditionally include in API requests. By default, fields with
  1079. // empty values are omitted from API requests. However, any non-pointer,
  1080. // non-interface field appearing in ForceSendFields will be sent to the
  1081. // server regardless of whether the field is empty or not. This may be
  1082. // used to include empty fields in Patch requests.
  1083. ForceSendFields []string `json:"-"`
  1084. // NullFields is a list of field names (e.g. "Attribution") to include
  1085. // in API requests with the JSON null value. By default, fields with
  1086. // empty values are omitted from API requests. However, any field with
  1087. // an empty value appearing in NullFields will be sent to the server as
  1088. // null. It is an error if a field in this list has a non-empty value.
  1089. // This may be used to include null fields in Patch requests.
  1090. NullFields []string `json:"-"`
  1091. }
  1092. func (s *DictlayerdataDictWordsExamplesSource) MarshalJSON() ([]byte, error) {
  1093. type NoMethod DictlayerdataDictWordsExamplesSource
  1094. raw := NoMethod(*s)
  1095. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1096. }
  1097. type DictlayerdataDictWordsSenses struct {
  1098. Conjugations []*DictlayerdataDictWordsSensesConjugations `json:"conjugations,omitempty"`
  1099. Definitions []*DictlayerdataDictWordsSensesDefinitions `json:"definitions,omitempty"`
  1100. PartOfSpeech string `json:"partOfSpeech,omitempty"`
  1101. Pronunciation string `json:"pronunciation,omitempty"`
  1102. PronunciationUrl string `json:"pronunciationUrl,omitempty"`
  1103. Source *DictlayerdataDictWordsSensesSource `json:"source,omitempty"`
  1104. Syllabification string `json:"syllabification,omitempty"`
  1105. Synonyms []*DictlayerdataDictWordsSensesSynonyms `json:"synonyms,omitempty"`
  1106. // ForceSendFields is a list of field names (e.g. "Conjugations") to
  1107. // unconditionally include in API requests. By default, fields with
  1108. // empty values are omitted from API requests. However, any non-pointer,
  1109. // non-interface field appearing in ForceSendFields will be sent to the
  1110. // server regardless of whether the field is empty or not. This may be
  1111. // used to include empty fields in Patch requests.
  1112. ForceSendFields []string `json:"-"`
  1113. // NullFields is a list of field names (e.g. "Conjugations") to include
  1114. // in API requests with the JSON null value. By default, fields with
  1115. // empty values are omitted from API requests. However, any field with
  1116. // an empty value appearing in NullFields will be sent to the server as
  1117. // null. It is an error if a field in this list has a non-empty value.
  1118. // This may be used to include null fields in Patch requests.
  1119. NullFields []string `json:"-"`
  1120. }
  1121. func (s *DictlayerdataDictWordsSenses) MarshalJSON() ([]byte, error) {
  1122. type NoMethod DictlayerdataDictWordsSenses
  1123. raw := NoMethod(*s)
  1124. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1125. }
  1126. type DictlayerdataDictWordsSensesConjugations struct {
  1127. Type string `json:"type,omitempty"`
  1128. Value string `json:"value,omitempty"`
  1129. // ForceSendFields is a list of field names (e.g. "Type") to
  1130. // unconditionally include in API requests. By default, fields with
  1131. // empty values are omitted from API requests. However, any non-pointer,
  1132. // non-interface field appearing in ForceSendFields will be sent to the
  1133. // server regardless of whether the field is empty or not. This may be
  1134. // used to include empty fields in Patch requests.
  1135. ForceSendFields []string `json:"-"`
  1136. // NullFields is a list of field names (e.g. "Type") to include in API
  1137. // requests with the JSON null value. By default, fields with empty
  1138. // values are omitted from API requests. However, any field with an
  1139. // empty value appearing in NullFields will be sent to the server as
  1140. // null. It is an error if a field in this list has a non-empty value.
  1141. // This may be used to include null fields in Patch requests.
  1142. NullFields []string `json:"-"`
  1143. }
  1144. func (s *DictlayerdataDictWordsSensesConjugations) MarshalJSON() ([]byte, error) {
  1145. type NoMethod DictlayerdataDictWordsSensesConjugations
  1146. raw := NoMethod(*s)
  1147. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1148. }
  1149. type DictlayerdataDictWordsSensesDefinitions struct {
  1150. Definition string `json:"definition,omitempty"`
  1151. Examples []*DictlayerdataDictWordsSensesDefinitionsExamples `json:"examples,omitempty"`
  1152. // ForceSendFields is a list of field names (e.g. "Definition") to
  1153. // unconditionally include in API requests. By default, fields with
  1154. // empty values are omitted from API requests. However, any non-pointer,
  1155. // non-interface field appearing in ForceSendFields will be sent to the
  1156. // server regardless of whether the field is empty or not. This may be
  1157. // used to include empty fields in Patch requests.
  1158. ForceSendFields []string `json:"-"`
  1159. // NullFields is a list of field names (e.g. "Definition") to include in
  1160. // API requests with the JSON null value. By default, fields with empty
  1161. // values are omitted from API requests. However, any field with an
  1162. // empty value appearing in NullFields will be sent to the server as
  1163. // null. It is an error if a field in this list has a non-empty value.
  1164. // This may be used to include null fields in Patch requests.
  1165. NullFields []string `json:"-"`
  1166. }
  1167. func (s *DictlayerdataDictWordsSensesDefinitions) MarshalJSON() ([]byte, error) {
  1168. type NoMethod DictlayerdataDictWordsSensesDefinitions
  1169. raw := NoMethod(*s)
  1170. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1171. }
  1172. type DictlayerdataDictWordsSensesDefinitionsExamples struct {
  1173. Source *DictlayerdataDictWordsSensesDefinitionsExamplesSource `json:"source,omitempty"`
  1174. Text string `json:"text,omitempty"`
  1175. // ForceSendFields is a list of field names (e.g. "Source") to
  1176. // unconditionally include in API requests. By default, fields with
  1177. // empty values are omitted from API requests. However, any non-pointer,
  1178. // non-interface field appearing in ForceSendFields will be sent to the
  1179. // server regardless of whether the field is empty or not. This may be
  1180. // used to include empty fields in Patch requests.
  1181. ForceSendFields []string `json:"-"`
  1182. // NullFields is a list of field names (e.g. "Source") to include in API
  1183. // requests with the JSON null value. By default, fields with empty
  1184. // values are omitted from API requests. However, any field with an
  1185. // empty value appearing in NullFields will be sent to the server as
  1186. // null. It is an error if a field in this list has a non-empty value.
  1187. // This may be used to include null fields in Patch requests.
  1188. NullFields []string `json:"-"`
  1189. }
  1190. func (s *DictlayerdataDictWordsSensesDefinitionsExamples) MarshalJSON() ([]byte, error) {
  1191. type NoMethod DictlayerdataDictWordsSensesDefinitionsExamples
  1192. raw := NoMethod(*s)
  1193. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1194. }
  1195. type DictlayerdataDictWordsSensesDefinitionsExamplesSource struct {
  1196. Attribution string `json:"attribution,omitempty"`
  1197. Url string `json:"url,omitempty"`
  1198. // ForceSendFields is a list of field names (e.g. "Attribution") to
  1199. // unconditionally include in API requests. By default, fields with
  1200. // empty values are omitted from API requests. However, any non-pointer,
  1201. // non-interface field appearing in ForceSendFields will be sent to the
  1202. // server regardless of whether the field is empty or not. This may be
  1203. // used to include empty fields in Patch requests.
  1204. ForceSendFields []string `json:"-"`
  1205. // NullFields is a list of field names (e.g. "Attribution") to include
  1206. // in API requests with the JSON null value. By default, fields with
  1207. // empty values are omitted from API requests. However, any field with
  1208. // an empty value appearing in NullFields will be sent to the server as
  1209. // null. It is an error if a field in this list has a non-empty value.
  1210. // This may be used to include null fields in Patch requests.
  1211. NullFields []string `json:"-"`
  1212. }
  1213. func (s *DictlayerdataDictWordsSensesDefinitionsExamplesSource) MarshalJSON() ([]byte, error) {
  1214. type NoMethod DictlayerdataDictWordsSensesDefinitionsExamplesSource
  1215. raw := NoMethod(*s)
  1216. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1217. }
  1218. type DictlayerdataDictWordsSensesSource struct {
  1219. Attribution string `json:"attribution,omitempty"`
  1220. Url string `json:"url,omitempty"`
  1221. // ForceSendFields is a list of field names (e.g. "Attribution") to
  1222. // unconditionally include in API requests. By default, fields with
  1223. // empty values are omitted from API requests. However, any non-pointer,
  1224. // non-interface field appearing in ForceSendFields will be sent to the
  1225. // server regardless of whether the field is empty or not. This may be
  1226. // used to include empty fields in Patch requests.
  1227. ForceSendFields []string `json:"-"`
  1228. // NullFields is a list of field names (e.g. "Attribution") to include
  1229. // in API requests with the JSON null value. By default, fields with
  1230. // empty values are omitted from API requests. However, any field with
  1231. // an empty value appearing in NullFields will be sent to the server as
  1232. // null. It is an error if a field in this list has a non-empty value.
  1233. // This may be used to include null fields in Patch requests.
  1234. NullFields []string `json:"-"`
  1235. }
  1236. func (s *DictlayerdataDictWordsSensesSource) MarshalJSON() ([]byte, error) {
  1237. type NoMethod DictlayerdataDictWordsSensesSource
  1238. raw := NoMethod(*s)
  1239. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1240. }
  1241. type DictlayerdataDictWordsSensesSynonyms struct {
  1242. Source *DictlayerdataDictWordsSensesSynonymsSource `json:"source,omitempty"`
  1243. Text string `json:"text,omitempty"`
  1244. // ForceSendFields is a list of field names (e.g. "Source") to
  1245. // unconditionally include in API requests. By default, fields with
  1246. // empty values are omitted from API requests. However, any non-pointer,
  1247. // non-interface field appearing in ForceSendFields will be sent to the
  1248. // server regardless of whether the field is empty or not. This may be
  1249. // used to include empty fields in Patch requests.
  1250. ForceSendFields []string `json:"-"`
  1251. // NullFields is a list of field names (e.g. "Source") to include in API
  1252. // requests with the JSON null value. By default, fields with empty
  1253. // values are omitted from API requests. However, any field with an
  1254. // empty value appearing in NullFields will be sent to the server as
  1255. // null. It is an error if a field in this list has a non-empty value.
  1256. // This may be used to include null fields in Patch requests.
  1257. NullFields []string `json:"-"`
  1258. }
  1259. func (s *DictlayerdataDictWordsSensesSynonyms) MarshalJSON() ([]byte, error) {
  1260. type NoMethod DictlayerdataDictWordsSensesSynonyms
  1261. raw := NoMethod(*s)
  1262. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1263. }
  1264. type DictlayerdataDictWordsSensesSynonymsSource struct {
  1265. Attribution string `json:"attribution,omitempty"`
  1266. Url string `json:"url,omitempty"`
  1267. // ForceSendFields is a list of field names (e.g. "Attribution") to
  1268. // unconditionally include in API requests. By default, fields with
  1269. // empty values are omitted from API requests. However, any non-pointer,
  1270. // non-interface field appearing in ForceSendFields will be sent to the
  1271. // server regardless of whether the field is empty or not. This may be
  1272. // used to include empty fields in Patch requests.
  1273. ForceSendFields []string `json:"-"`
  1274. // NullFields is a list of field names (e.g. "Attribution") to include
  1275. // in API requests with the JSON null value. By default, fields with
  1276. // empty values are omitted from API requests. However, any field with
  1277. // an empty value appearing in NullFields will be sent to the server as
  1278. // null. It is an error if a field in this list has a non-empty value.
  1279. // This may be used to include null fields in Patch requests.
  1280. NullFields []string `json:"-"`
  1281. }
  1282. func (s *DictlayerdataDictWordsSensesSynonymsSource) MarshalJSON() ([]byte, error) {
  1283. type NoMethod DictlayerdataDictWordsSensesSynonymsSource
  1284. raw := NoMethod(*s)
  1285. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1286. }
  1287. // DictlayerdataDictWordsSource: The words with different meanings but
  1288. // not related words, e.g. "go" (game) and "go" (verb).
  1289. type DictlayerdataDictWordsSource struct {
  1290. Attribution string `json:"attribution,omitempty"`
  1291. Url string `json:"url,omitempty"`
  1292. // ForceSendFields is a list of field names (e.g. "Attribution") to
  1293. // unconditionally include in API requests. By default, fields with
  1294. // empty values are omitted from API requests. However, any non-pointer,
  1295. // non-interface field appearing in ForceSendFields will be sent to the
  1296. // server regardless of whether the field is empty or not. This may be
  1297. // used to include empty fields in Patch requests.
  1298. ForceSendFields []string `json:"-"`
  1299. // NullFields is a list of field names (e.g. "Attribution") to include
  1300. // in API requests with the JSON null value. By default, fields with
  1301. // empty values are omitted from API requests. However, any field with
  1302. // an empty value appearing in NullFields will be sent to the server as
  1303. // null. It is an error if a field in this list has a non-empty value.
  1304. // This may be used to include null fields in Patch requests.
  1305. NullFields []string `json:"-"`
  1306. }
  1307. func (s *DictlayerdataDictWordsSource) MarshalJSON() ([]byte, error) {
  1308. type NoMethod DictlayerdataDictWordsSource
  1309. raw := NoMethod(*s)
  1310. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1311. }
  1312. type Discoveryclusters struct {
  1313. Clusters []*DiscoveryclustersClusters `json:"clusters,omitempty"`
  1314. // Kind: Resorce type.
  1315. Kind string `json:"kind,omitempty"`
  1316. TotalClusters int64 `json:"totalClusters,omitempty"`
  1317. // ServerResponse contains the HTTP response code and headers from the
  1318. // server.
  1319. googleapi.ServerResponse `json:"-"`
  1320. // ForceSendFields is a list of field names (e.g. "Clusters") to
  1321. // unconditionally include in API requests. By default, fields with
  1322. // empty values are omitted from API requests. However, any non-pointer,
  1323. // non-interface field appearing in ForceSendFields will be sent to the
  1324. // server regardless of whether the field is empty or not. This may be
  1325. // used to include empty fields in Patch requests.
  1326. ForceSendFields []string `json:"-"`
  1327. // NullFields is a list of field names (e.g. "Clusters") to include in
  1328. // API requests with the JSON null value. By default, fields with empty
  1329. // values are omitted from API requests. However, any field with an
  1330. // empty value appearing in NullFields will be sent to the server as
  1331. // null. It is an error if a field in this list has a non-empty value.
  1332. // This may be used to include null fields in Patch requests.
  1333. NullFields []string `json:"-"`
  1334. }
  1335. func (s *Discoveryclusters) MarshalJSON() ([]byte, error) {
  1336. type NoMethod Discoveryclusters
  1337. raw := NoMethod(*s)
  1338. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1339. }
  1340. type DiscoveryclustersClusters struct {
  1341. BannerWithContentContainer *DiscoveryclustersClustersBannerWithContentContainer `json:"banner_with_content_container,omitempty"`
  1342. SubTitle string `json:"subTitle,omitempty"`
  1343. Title string `json:"title,omitempty"`
  1344. TotalVolumes int64 `json:"totalVolumes,omitempty"`
  1345. Uid string `json:"uid,omitempty"`
  1346. Volumes []*Volume `json:"volumes,omitempty"`
  1347. // ForceSendFields is a list of field names (e.g.
  1348. // "BannerWithContentContainer") to unconditionally include in API
  1349. // requests. By default, fields with empty values are omitted from API
  1350. // requests. However, any non-pointer, non-interface field appearing in
  1351. // ForceSendFields will be sent to the server regardless of whether the
  1352. // field is empty or not. This may be used to include empty fields in
  1353. // Patch requests.
  1354. ForceSendFields []string `json:"-"`
  1355. // NullFields is a list of field names (e.g.
  1356. // "BannerWithContentContainer") to include in API requests with the
  1357. // JSON null value. By default, fields with empty values are omitted
  1358. // from API requests. However, any field with an empty value appearing
  1359. // in NullFields will be sent to the server as null. It is an error if a
  1360. // field in this list has a non-empty value. This may be used to include
  1361. // null fields in Patch requests.
  1362. NullFields []string `json:"-"`
  1363. }
  1364. func (s *DiscoveryclustersClusters) MarshalJSON() ([]byte, error) {
  1365. type NoMethod DiscoveryclustersClusters
  1366. raw := NoMethod(*s)
  1367. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1368. }
  1369. type DiscoveryclustersClustersBannerWithContentContainer struct {
  1370. FillColorArgb string `json:"fillColorArgb,omitempty"`
  1371. ImageUrl string `json:"imageUrl,omitempty"`
  1372. MaskColorArgb string `json:"maskColorArgb,omitempty"`
  1373. MoreButtonText string `json:"moreButtonText,omitempty"`
  1374. MoreButtonUrl string `json:"moreButtonUrl,omitempty"`
  1375. TextColorArgb string `json:"textColorArgb,omitempty"`
  1376. // ForceSendFields is a list of field names (e.g. "FillColorArgb") to
  1377. // unconditionally include in API requests. By default, fields with
  1378. // empty values are omitted from API requests. However, any non-pointer,
  1379. // non-interface field appearing in ForceSendFields will be sent to the
  1380. // server regardless of whether the field is empty or not. This may be
  1381. // used to include empty fields in Patch requests.
  1382. ForceSendFields []string `json:"-"`
  1383. // NullFields is a list of field names (e.g. "FillColorArgb") to include
  1384. // in API requests with the JSON null value. By default, fields with
  1385. // empty values are omitted from API requests. However, any field with
  1386. // an empty value appearing in NullFields will be sent to the server as
  1387. // null. It is an error if a field in this list has a non-empty value.
  1388. // This may be used to include null fields in Patch requests.
  1389. NullFields []string `json:"-"`
  1390. }
  1391. func (s *DiscoveryclustersClustersBannerWithContentContainer) MarshalJSON() ([]byte, error) {
  1392. type NoMethod DiscoveryclustersClustersBannerWithContentContainer
  1393. raw := NoMethod(*s)
  1394. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1395. }
  1396. type DownloadAccessRestriction struct {
  1397. // DeviceAllowed: If restricted, whether access is granted for this
  1398. // (user, device, volume).
  1399. DeviceAllowed bool `json:"deviceAllowed,omitempty"`
  1400. // DownloadsAcquired: If restricted, the number of content download
  1401. // licenses already acquired (including the requesting client, if
  1402. // licensed).
  1403. DownloadsAcquired int64 `json:"downloadsAcquired,omitempty"`
  1404. // JustAcquired: If deviceAllowed, whether access was just acquired with
  1405. // this request.
  1406. JustAcquired bool `json:"justAcquired,omitempty"`
  1407. // Kind: Resource type.
  1408. Kind string `json:"kind,omitempty"`
  1409. // MaxDownloadDevices: If restricted, the maximum number of content
  1410. // download licenses for this volume.
  1411. MaxDownloadDevices int64 `json:"maxDownloadDevices,omitempty"`
  1412. // Message: Error/warning message.
  1413. Message string `json:"message,omitempty"`
  1414. // Nonce: Client nonce for verification. Download access and
  1415. // client-validation only.
  1416. Nonce string `json:"nonce,omitempty"`
  1417. // ReasonCode: Error/warning reason code. Additional codes may be added
  1418. // in the future. 0 OK 100 ACCESS_DENIED_PUBLISHER_LIMIT 101
  1419. // ACCESS_DENIED_LIMIT 200 WARNING_USED_LAST_ACCESS
  1420. ReasonCode string `json:"reasonCode,omitempty"`
  1421. // Restricted: Whether this volume has any download access restrictions.
  1422. Restricted bool `json:"restricted,omitempty"`
  1423. // Signature: Response signature.
  1424. Signature string `json:"signature,omitempty"`
  1425. // Source: Client app identifier for verification. Download access and
  1426. // client-validation only.
  1427. Source string `json:"source,omitempty"`
  1428. // VolumeId: Identifies the volume for which this entry applies.
  1429. VolumeId string `json:"volumeId,omitempty"`
  1430. // ForceSendFields is a list of field names (e.g. "DeviceAllowed") to
  1431. // unconditionally include in API requests. By default, fields with
  1432. // empty values are omitted from API requests. However, any non-pointer,
  1433. // non-interface field appearing in ForceSendFields will be sent to the
  1434. // server regardless of whether the field is empty or not. This may be
  1435. // used to include empty fields in Patch requests.
  1436. ForceSendFields []string `json:"-"`
  1437. // NullFields is a list of field names (e.g. "DeviceAllowed") to include
  1438. // in API requests with the JSON null value. By default, fields with
  1439. // empty values are omitted from API requests. However, any field with
  1440. // an empty value appearing in NullFields will be sent to the server as
  1441. // null. It is an error if a field in this list has a non-empty value.
  1442. // This may be used to include null fields in Patch requests.
  1443. NullFields []string `json:"-"`
  1444. }
  1445. func (s *DownloadAccessRestriction) MarshalJSON() ([]byte, error) {
  1446. type NoMethod DownloadAccessRestriction
  1447. raw := NoMethod(*s)
  1448. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1449. }
  1450. type DownloadAccesses struct {
  1451. // DownloadAccessList: A list of download access responses.
  1452. DownloadAccessList []*DownloadAccessRestriction `json:"downloadAccessList,omitempty"`
  1453. // Kind: Resource type.
  1454. Kind string `json:"kind,omitempty"`
  1455. // ServerResponse contains the HTTP response code and headers from the
  1456. // server.
  1457. googleapi.ServerResponse `json:"-"`
  1458. // ForceSendFields is a list of field names (e.g. "DownloadAccessList")
  1459. // to unconditionally include in API requests. By default, fields with
  1460. // empty values are omitted from API requests. However, any non-pointer,
  1461. // non-interface field appearing in ForceSendFields will be sent to the
  1462. // server regardless of whether the field is empty or not. This may be
  1463. // used to include empty fields in Patch requests.
  1464. ForceSendFields []string `json:"-"`
  1465. // NullFields is a list of field names (e.g. "DownloadAccessList") to
  1466. // include in API requests with the JSON null value. By default, fields
  1467. // with empty values are omitted from API requests. However, any field
  1468. // with an empty value appearing in NullFields will be sent to the
  1469. // server as null. It is an error if a field in this list has a
  1470. // non-empty value. This may be used to include null fields in Patch
  1471. // requests.
  1472. NullFields []string `json:"-"`
  1473. }
  1474. func (s *DownloadAccesses) MarshalJSON() ([]byte, error) {
  1475. type NoMethod DownloadAccesses
  1476. raw := NoMethod(*s)
  1477. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1478. }
  1479. type FamilyInfo struct {
  1480. // Kind: Resource type.
  1481. Kind string `json:"kind,omitempty"`
  1482. // Membership: Family membership info of the user that made the request.
  1483. Membership *FamilyInfoMembership `json:"membership,omitempty"`
  1484. // ServerResponse contains the HTTP response code and headers from the
  1485. // server.
  1486. googleapi.ServerResponse `json:"-"`
  1487. // ForceSendFields is a list of field names (e.g. "Kind") to
  1488. // unconditionally include in API requests. By default, fields with
  1489. // empty values are omitted from API requests. However, any non-pointer,
  1490. // non-interface field appearing in ForceSendFields will be sent to the
  1491. // server regardless of whether the field is empty or not. This may be
  1492. // used to include empty fields in Patch requests.
  1493. ForceSendFields []string `json:"-"`
  1494. // NullFields is a list of field names (e.g. "Kind") to include in API
  1495. // requests with the JSON null value. By default, fields with empty
  1496. // values are omitted from API requests. However, any field with an
  1497. // empty value appearing in NullFields will be sent to the server as
  1498. // null. It is an error if a field in this list has a non-empty value.
  1499. // This may be used to include null fields in Patch requests.
  1500. NullFields []string `json:"-"`
  1501. }
  1502. func (s *FamilyInfo) MarshalJSON() ([]byte, error) {
  1503. type NoMethod FamilyInfo
  1504. raw := NoMethod(*s)
  1505. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1506. }
  1507. // FamilyInfoMembership: Family membership info of the user that made
  1508. // the request.
  1509. type FamilyInfoMembership struct {
  1510. // AcquirePermission: Restrictions on user buying and acquiring content.
  1511. AcquirePermission string `json:"acquirePermission,omitempty"`
  1512. // AgeGroup: The age group of the user.
  1513. AgeGroup string `json:"ageGroup,omitempty"`
  1514. // AllowedMaturityRating: The maximum allowed maturity rating for the
  1515. // user.
  1516. AllowedMaturityRating string `json:"allowedMaturityRating,omitempty"`
  1517. IsInFamily bool `json:"isInFamily,omitempty"`
  1518. // Role: The role of the user in the family.
  1519. Role string `json:"role,omitempty"`
  1520. // ForceSendFields is a list of field names (e.g. "AcquirePermission")
  1521. // to unconditionally include in API requests. By default, fields with
  1522. // empty values are omitted from API requests. However, any non-pointer,
  1523. // non-interface field appearing in ForceSendFields will be sent to the
  1524. // server regardless of whether the field is empty or not. This may be
  1525. // used to include empty fields in Patch requests.
  1526. ForceSendFields []string `json:"-"`
  1527. // NullFields is a list of field names (e.g. "AcquirePermission") to
  1528. // include in API requests with the JSON null value. By default, fields
  1529. // with empty values are omitted from API requests. However, any field
  1530. // with an empty value appearing in NullFields will be sent to the
  1531. // server as null. It is an error if a field in this list has a
  1532. // non-empty value. This may be used to include null fields in Patch
  1533. // requests.
  1534. NullFields []string `json:"-"`
  1535. }
  1536. func (s *FamilyInfoMembership) MarshalJSON() ([]byte, error) {
  1537. type NoMethod FamilyInfoMembership
  1538. raw := NoMethod(*s)
  1539. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1540. }
  1541. type Geolayerdata struct {
  1542. Common *GeolayerdataCommon `json:"common,omitempty"`
  1543. Geo *GeolayerdataGeo `json:"geo,omitempty"`
  1544. Kind string `json:"kind,omitempty"`
  1545. // ForceSendFields is a list of field names (e.g. "Common") to
  1546. // unconditionally include in API requests. By default, fields with
  1547. // empty values are omitted from API requests. However, any non-pointer,
  1548. // non-interface field appearing in ForceSendFields will be sent to the
  1549. // server regardless of whether the field is empty or not. This may be
  1550. // used to include empty fields in Patch requests.
  1551. ForceSendFields []string `json:"-"`
  1552. // NullFields is a list of field names (e.g. "Common") to include in API
  1553. // requests with the JSON null value. By default, fields with empty
  1554. // values are omitted from API requests. However, any field with an
  1555. // empty value appearing in NullFields will be sent to the server as
  1556. // null. It is an error if a field in this list has a non-empty value.
  1557. // This may be used to include null fields in Patch requests.
  1558. NullFields []string `json:"-"`
  1559. }
  1560. func (s *Geolayerdata) MarshalJSON() ([]byte, error) {
  1561. type NoMethod Geolayerdata
  1562. raw := NoMethod(*s)
  1563. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1564. }
  1565. type GeolayerdataCommon struct {
  1566. // Lang: The language of the information url and description.
  1567. Lang string `json:"lang,omitempty"`
  1568. // PreviewImageUrl: The URL for the preview image information.
  1569. PreviewImageUrl string `json:"previewImageUrl,omitempty"`
  1570. // Snippet: The description for this location.
  1571. Snippet string `json:"snippet,omitempty"`
  1572. // SnippetUrl: The URL for information for this location. Ex: wikipedia
  1573. // link.
  1574. SnippetUrl string `json:"snippetUrl,omitempty"`
  1575. // Title: The display title and localized canonical name to use when
  1576. // searching for this entity on Google search.
  1577. Title string `json:"title,omitempty"`
  1578. // ForceSendFields is a list of field names (e.g. "Lang") to
  1579. // unconditionally include in API requests. By default, fields with
  1580. // empty values are omitted from API requests. However, any non-pointer,
  1581. // non-interface field appearing in ForceSendFields will be sent to the
  1582. // server regardless of whether the field is empty or not. This may be
  1583. // used to include empty fields in Patch requests.
  1584. ForceSendFields []string `json:"-"`
  1585. // NullFields is a list of field names (e.g. "Lang") to include in API
  1586. // requests with the JSON null value. By default, fields with empty
  1587. // values are omitted from API requests. However, any field with an
  1588. // empty value appearing in NullFields will be sent to the server as
  1589. // null. It is an error if a field in this list has a non-empty value.
  1590. // This may be used to include null fields in Patch requests.
  1591. NullFields []string `json:"-"`
  1592. }
  1593. func (s *GeolayerdataCommon) MarshalJSON() ([]byte, error) {
  1594. type NoMethod GeolayerdataCommon
  1595. raw := NoMethod(*s)
  1596. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1597. }
  1598. type GeolayerdataGeo struct {
  1599. // Boundary: The boundary of the location as a set of loops containing
  1600. // pairs of latitude, longitude coordinates.
  1601. Boundary [][]*GeolayerdataGeoBoundaryItem `json:"boundary,omitempty"`
  1602. // CachePolicy: The cache policy active for this data. EX: UNRESTRICTED,
  1603. // RESTRICTED, NEVER
  1604. CachePolicy string `json:"cachePolicy,omitempty"`
  1605. // CountryCode: The country code of the location.
  1606. CountryCode string `json:"countryCode,omitempty"`
  1607. // Latitude: The latitude of the location.
  1608. Latitude float64 `json:"latitude,omitempty"`
  1609. // Longitude: The longitude of the location.
  1610. Longitude float64 `json:"longitude,omitempty"`
  1611. // MapType: The type of map that should be used for this location. EX:
  1612. // HYBRID, ROADMAP, SATELLITE, TERRAIN
  1613. MapType string `json:"mapType,omitempty"`
  1614. // Viewport: The viewport for showing this location. This is a latitude,
  1615. // longitude rectangle.
  1616. Viewport *GeolayerdataGeoViewport `json:"viewport,omitempty"`
  1617. // Zoom: The Zoom level to use for the map. Zoom levels between 0 (the
  1618. // lowest zoom level, in which the entire world can be seen on one map)
  1619. // to 21+ (down to individual buildings). See:
  1620. // https://developers.google.com/maps/documentation/staticmaps/#Zoomlevels
  1621. Zoom int64 `json:"zoom,omitempty"`
  1622. // ForceSendFields is a list of field names (e.g. "Boundary") to
  1623. // unconditionally include in API requests. By default, fields with
  1624. // empty values are omitted from API requests. However, any non-pointer,
  1625. // non-interface field appearing in ForceSendFields will be sent to the
  1626. // server regardless of whether the field is empty or not. This may be
  1627. // used to include empty fields in Patch requests.
  1628. ForceSendFields []string `json:"-"`
  1629. // NullFields is a list of field names (e.g. "Boundary") to include in
  1630. // API requests with the JSON null value. By default, fields with empty
  1631. // values are omitted from API requests. However, any field with an
  1632. // empty value appearing in NullFields will be sent to the server as
  1633. // null. It is an error if a field in this list has a non-empty value.
  1634. // This may be used to include null fields in Patch requests.
  1635. NullFields []string `json:"-"`
  1636. }
  1637. func (s *GeolayerdataGeo) MarshalJSON() ([]byte, error) {
  1638. type NoMethod GeolayerdataGeo
  1639. raw := NoMethod(*s)
  1640. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1641. }
  1642. func (s *GeolayerdataGeo) UnmarshalJSON(data []byte) error {
  1643. type NoMethod GeolayerdataGeo
  1644. var s1 struct {
  1645. Latitude gensupport.JSONFloat64 `json:"latitude"`
  1646. Longitude gensupport.JSONFloat64 `json:"longitude"`
  1647. *NoMethod
  1648. }
  1649. s1.NoMethod = (*NoMethod)(s)
  1650. if err := json.Unmarshal(data, &s1); err != nil {
  1651. return err
  1652. }
  1653. s.Latitude = float64(s1.Latitude)
  1654. s.Longitude = float64(s1.Longitude)
  1655. return nil
  1656. }
  1657. type GeolayerdataGeoBoundaryItem struct {
  1658. Latitude int64 `json:"latitude,omitempty"`
  1659. Longitude int64 `json:"longitude,omitempty"`
  1660. // ForceSendFields is a list of field names (e.g. "Latitude") to
  1661. // unconditionally include in API requests. By default, fields with
  1662. // empty values are omitted from API requests. However, any non-pointer,
  1663. // non-interface field appearing in ForceSendFields will be sent to the
  1664. // server regardless of whether the field is empty or not. This may be
  1665. // used to include empty fields in Patch requests.
  1666. ForceSendFields []string `json:"-"`
  1667. // NullFields is a list of field names (e.g. "Latitude") to include in
  1668. // API requests with the JSON null value. By default, fields with empty
  1669. // values are omitted from API requests. However, any field with an
  1670. // empty value appearing in NullFields will be sent to the server as
  1671. // null. It is an error if a field in this list has a non-empty value.
  1672. // This may be used to include null fields in Patch requests.
  1673. NullFields []string `json:"-"`
  1674. }
  1675. func (s *GeolayerdataGeoBoundaryItem) MarshalJSON() ([]byte, error) {
  1676. type NoMethod GeolayerdataGeoBoundaryItem
  1677. raw := NoMethod(*s)
  1678. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1679. }
  1680. // GeolayerdataGeoViewport: The viewport for showing this location. This
  1681. // is a latitude, longitude rectangle.
  1682. type GeolayerdataGeoViewport struct {
  1683. Hi *GeolayerdataGeoViewportHi `json:"hi,omitempty"`
  1684. Lo *GeolayerdataGeoViewportLo `json:"lo,omitempty"`
  1685. // ForceSendFields is a list of field names (e.g. "Hi") to
  1686. // unconditionally include in API requests. By default, fields with
  1687. // empty values are omitted from API requests. However, any non-pointer,
  1688. // non-interface field appearing in ForceSendFields will be sent to the
  1689. // server regardless of whether the field is empty or not. This may be
  1690. // used to include empty fields in Patch requests.
  1691. ForceSendFields []string `json:"-"`
  1692. // NullFields is a list of field names (e.g. "Hi") to include in API
  1693. // requests with the JSON null value. By default, fields with empty
  1694. // values are omitted from API requests. However, any field with an
  1695. // empty value appearing in NullFields will be sent to the server as
  1696. // null. It is an error if a field in this list has a non-empty value.
  1697. // This may be used to include null fields in Patch requests.
  1698. NullFields []string `json:"-"`
  1699. }
  1700. func (s *GeolayerdataGeoViewport) MarshalJSON() ([]byte, error) {
  1701. type NoMethod GeolayerdataGeoViewport
  1702. raw := NoMethod(*s)
  1703. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1704. }
  1705. type GeolayerdataGeoViewportHi struct {
  1706. Latitude float64 `json:"latitude,omitempty"`
  1707. Longitude float64 `json:"longitude,omitempty"`
  1708. // ForceSendFields is a list of field names (e.g. "Latitude") to
  1709. // unconditionally include in API requests. By default, fields with
  1710. // empty values are omitted from API requests. However, any non-pointer,
  1711. // non-interface field appearing in ForceSendFields will be sent to the
  1712. // server regardless of whether the field is empty or not. This may be
  1713. // used to include empty fields in Patch requests.
  1714. ForceSendFields []string `json:"-"`
  1715. // NullFields is a list of field names (e.g. "Latitude") to include in
  1716. // API requests with the JSON null value. By default, fields with empty
  1717. // values are omitted from API requests. However, any field with an
  1718. // empty value appearing in NullFields will be sent to the server as
  1719. // null. It is an error if a field in this list has a non-empty value.
  1720. // This may be used to include null fields in Patch requests.
  1721. NullFields []string `json:"-"`
  1722. }
  1723. func (s *GeolayerdataGeoViewportHi) MarshalJSON() ([]byte, error) {
  1724. type NoMethod GeolayerdataGeoViewportHi
  1725. raw := NoMethod(*s)
  1726. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1727. }
  1728. func (s *GeolayerdataGeoViewportHi) UnmarshalJSON(data []byte) error {
  1729. type NoMethod GeolayerdataGeoViewportHi
  1730. var s1 struct {
  1731. Latitude gensupport.JSONFloat64 `json:"latitude"`
  1732. Longitude gensupport.JSONFloat64 `json:"longitude"`
  1733. *NoMethod
  1734. }
  1735. s1.NoMethod = (*NoMethod)(s)
  1736. if err := json.Unmarshal(data, &s1); err != nil {
  1737. return err
  1738. }
  1739. s.Latitude = float64(s1.Latitude)
  1740. s.Longitude = float64(s1.Longitude)
  1741. return nil
  1742. }
  1743. type GeolayerdataGeoViewportLo struct {
  1744. Latitude float64 `json:"latitude,omitempty"`
  1745. Longitude float64 `json:"longitude,omitempty"`
  1746. // ForceSendFields is a list of field names (e.g. "Latitude") to
  1747. // unconditionally include in API requests. By default, fields with
  1748. // empty values are omitted from API requests. However, any non-pointer,
  1749. // non-interface field appearing in ForceSendFields will be sent to the
  1750. // server regardless of whether the field is empty or not. This may be
  1751. // used to include empty fields in Patch requests.
  1752. ForceSendFields []string `json:"-"`
  1753. // NullFields is a list of field names (e.g. "Latitude") to include in
  1754. // API requests with the JSON null value. By default, fields with empty
  1755. // values are omitted from API requests. However, any field with an
  1756. // empty value appearing in NullFields will be sent to the server as
  1757. // null. It is an error if a field in this list has a non-empty value.
  1758. // This may be used to include null fields in Patch requests.
  1759. NullFields []string `json:"-"`
  1760. }
  1761. func (s *GeolayerdataGeoViewportLo) MarshalJSON() ([]byte, error) {
  1762. type NoMethod GeolayerdataGeoViewportLo
  1763. raw := NoMethod(*s)
  1764. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1765. }
  1766. func (s *GeolayerdataGeoViewportLo) UnmarshalJSON(data []byte) error {
  1767. type NoMethod GeolayerdataGeoViewportLo
  1768. var s1 struct {
  1769. Latitude gensupport.JSONFloat64 `json:"latitude"`
  1770. Longitude gensupport.JSONFloat64 `json:"longitude"`
  1771. *NoMethod
  1772. }
  1773. s1.NoMethod = (*NoMethod)(s)
  1774. if err := json.Unmarshal(data, &s1); err != nil {
  1775. return err
  1776. }
  1777. s.Latitude = float64(s1.Latitude)
  1778. s.Longitude = float64(s1.Longitude)
  1779. return nil
  1780. }
  1781. type Layersummaries struct {
  1782. // Items: A list of layer summary items.
  1783. Items []*Layersummary `json:"items,omitempty"`
  1784. // Kind: Resource type.
  1785. Kind string `json:"kind,omitempty"`
  1786. // TotalItems: The total number of layer summaries found.
  1787. TotalItems int64 `json:"totalItems,omitempty"`
  1788. // ServerResponse contains the HTTP response code and headers from the
  1789. // server.
  1790. googleapi.ServerResponse `json:"-"`
  1791. // ForceSendFields is a list of field names (e.g. "Items") to
  1792. // unconditionally include in API requests. By default, fields with
  1793. // empty values are omitted from API requests. However, any non-pointer,
  1794. // non-interface field appearing in ForceSendFields will be sent to the
  1795. // server regardless of whether the field is empty or not. This may be
  1796. // used to include empty fields in Patch requests.
  1797. ForceSendFields []string `json:"-"`
  1798. // NullFields is a list of field names (e.g. "Items") to include in API
  1799. // requests with the JSON null value. By default, fields with empty
  1800. // values are omitted from API requests. However, any field with an
  1801. // empty value appearing in NullFields will be sent to the server as
  1802. // null. It is an error if a field in this list has a non-empty value.
  1803. // This may be used to include null fields in Patch requests.
  1804. NullFields []string `json:"-"`
  1805. }
  1806. func (s *Layersummaries) MarshalJSON() ([]byte, error) {
  1807. type NoMethod Layersummaries
  1808. raw := NoMethod(*s)
  1809. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1810. }
  1811. type Layersummary struct {
  1812. // AnnotationCount: The number of annotations for this layer.
  1813. AnnotationCount int64 `json:"annotationCount,omitempty"`
  1814. // AnnotationTypes: The list of annotation types contained for this
  1815. // layer.
  1816. AnnotationTypes []string `json:"annotationTypes,omitempty"`
  1817. // AnnotationsDataLink: Link to get data for this annotation.
  1818. AnnotationsDataLink string `json:"annotationsDataLink,omitempty"`
  1819. // AnnotationsLink: The link to get the annotations for this layer.
  1820. AnnotationsLink string `json:"annotationsLink,omitempty"`
  1821. // ContentVersion: The content version this resource is for.
  1822. ContentVersion string `json:"contentVersion,omitempty"`
  1823. // DataCount: The number of data items for this layer.
  1824. DataCount int64 `json:"dataCount,omitempty"`
  1825. // Id: Unique id of this layer summary.
  1826. Id string `json:"id,omitempty"`
  1827. // Kind: Resource Type
  1828. Kind string `json:"kind,omitempty"`
  1829. // LayerId: The layer id for this summary.
  1830. LayerId string `json:"layerId,omitempty"`
  1831. // SelfLink: URL to this resource.
  1832. SelfLink string `json:"selfLink,omitempty"`
  1833. // Updated: Timestamp for the last time an item in this layer was
  1834. // updated. (RFC 3339 UTC date-time format).
  1835. Updated string `json:"updated,omitempty"`
  1836. // VolumeAnnotationsVersion: The current version of this layer's volume
  1837. // annotations. Note that this version applies only to the data in the
  1838. // books.layers.volumeAnnotations.* responses. The actual annotation
  1839. // data is versioned separately.
  1840. VolumeAnnotationsVersion string `json:"volumeAnnotationsVersion,omitempty"`
  1841. // VolumeId: The volume id this resource is for.
  1842. VolumeId string `json:"volumeId,omitempty"`
  1843. // ServerResponse contains the HTTP response code and headers from the
  1844. // server.
  1845. googleapi.ServerResponse `json:"-"`
  1846. // ForceSendFields is a list of field names (e.g. "AnnotationCount") to
  1847. // unconditionally include in API requests. By default, fields with
  1848. // empty values are omitted from API requests. However, any non-pointer,
  1849. // non-interface field appearing in ForceSendFields will be sent to the
  1850. // server regardless of whether the field is empty or not. This may be
  1851. // used to include empty fields in Patch requests.
  1852. ForceSendFields []string `json:"-"`
  1853. // NullFields is a list of field names (e.g. "AnnotationCount") to
  1854. // include in API requests with the JSON null value. By default, fields
  1855. // with empty values are omitted from API requests. However, any field
  1856. // with an empty value appearing in NullFields will be sent to the
  1857. // server as null. It is an error if a field in this list has a
  1858. // non-empty value. This may be used to include null fields in Patch
  1859. // requests.
  1860. NullFields []string `json:"-"`
  1861. }
  1862. func (s *Layersummary) MarshalJSON() ([]byte, error) {
  1863. type NoMethod Layersummary
  1864. raw := NoMethod(*s)
  1865. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1866. }
  1867. type Metadata struct {
  1868. // Items: A list of offline dictionary metadata.
  1869. Items []*MetadataItems `json:"items,omitempty"`
  1870. // Kind: Resource type.
  1871. Kind string `json:"kind,omitempty"`
  1872. // ServerResponse contains the HTTP response code and headers from the
  1873. // server.
  1874. googleapi.ServerResponse `json:"-"`
  1875. // ForceSendFields is a list of field names (e.g. "Items") to
  1876. // unconditionally include in API requests. By default, fields with
  1877. // empty values are omitted from API requests. However, any non-pointer,
  1878. // non-interface field appearing in ForceSendFields will be sent to the
  1879. // server regardless of whether the field is empty or not. This may be
  1880. // used to include empty fields in Patch requests.
  1881. ForceSendFields []string `json:"-"`
  1882. // NullFields is a list of field names (e.g. "Items") to include in API
  1883. // requests with the JSON null value. By default, fields with empty
  1884. // values are omitted from API requests. However, any field with an
  1885. // empty value appearing in NullFields will be sent to the server as
  1886. // null. It is an error if a field in this list has a non-empty value.
  1887. // This may be used to include null fields in Patch requests.
  1888. NullFields []string `json:"-"`
  1889. }
  1890. func (s *Metadata) MarshalJSON() ([]byte, error) {
  1891. type NoMethod Metadata
  1892. raw := NoMethod(*s)
  1893. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1894. }
  1895. type MetadataItems struct {
  1896. DownloadUrl string `json:"download_url,omitempty"`
  1897. EncryptedKey string `json:"encrypted_key,omitempty"`
  1898. Language string `json:"language,omitempty"`
  1899. Size int64 `json:"size,omitempty,string"`
  1900. Version int64 `json:"version,omitempty,string"`
  1901. // ForceSendFields is a list of field names (e.g. "DownloadUrl") to
  1902. // unconditionally include in API requests. By default, fields with
  1903. // empty values are omitted from API requests. However, any non-pointer,
  1904. // non-interface field appearing in ForceSendFields will be sent to the
  1905. // server regardless of whether the field is empty or not. This may be
  1906. // used to include empty fields in Patch requests.
  1907. ForceSendFields []string `json:"-"`
  1908. // NullFields is a list of field names (e.g. "DownloadUrl") to include
  1909. // in API requests with the JSON null value. By default, fields with
  1910. // empty values are omitted from API requests. However, any field with
  1911. // an empty value appearing in NullFields will be sent to the server as
  1912. // null. It is an error if a field in this list has a non-empty value.
  1913. // This may be used to include null fields in Patch requests.
  1914. NullFields []string `json:"-"`
  1915. }
  1916. func (s *MetadataItems) MarshalJSON() ([]byte, error) {
  1917. type NoMethod MetadataItems
  1918. raw := NoMethod(*s)
  1919. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1920. }
  1921. type Notification struct {
  1922. Body string `json:"body,omitempty"`
  1923. // CrmExperimentIds: The list of crm experiment ids.
  1924. CrmExperimentIds googleapi.Int64s `json:"crmExperimentIds,omitempty"`
  1925. DocId string `json:"doc_id,omitempty"`
  1926. DocType string `json:"doc_type,omitempty"`
  1927. DontShowNotification bool `json:"dont_show_notification,omitempty"`
  1928. IconUrl string `json:"iconUrl,omitempty"`
  1929. // Kind: Resource type.
  1930. Kind string `json:"kind,omitempty"`
  1931. NotificationGroup string `json:"notificationGroup,omitempty"`
  1932. NotificationType string `json:"notification_type,omitempty"`
  1933. PcampaignId string `json:"pcampaign_id,omitempty"`
  1934. Reason string `json:"reason,omitempty"`
  1935. ShowNotificationSettingsAction bool `json:"show_notification_settings_action,omitempty"`
  1936. TargetUrl string `json:"targetUrl,omitempty"`
  1937. Title string `json:"title,omitempty"`
  1938. // ServerResponse contains the HTTP response code and headers from the
  1939. // server.
  1940. googleapi.ServerResponse `json:"-"`
  1941. // ForceSendFields is a list of field names (e.g. "Body") to
  1942. // unconditionally include in API requests. By default, fields with
  1943. // empty values are omitted from API requests. However, any non-pointer,
  1944. // non-interface field appearing in ForceSendFields will be sent to the
  1945. // server regardless of whether the field is empty or not. This may be
  1946. // used to include empty fields in Patch requests.
  1947. ForceSendFields []string `json:"-"`
  1948. // NullFields is a list of field names (e.g. "Body") to include in API
  1949. // requests with the JSON null value. By default, fields with empty
  1950. // values are omitted from API requests. However, any field with an
  1951. // empty value appearing in NullFields will be sent to the server as
  1952. // null. It is an error if a field in this list has a non-empty value.
  1953. // This may be used to include null fields in Patch requests.
  1954. NullFields []string `json:"-"`
  1955. }
  1956. func (s *Notification) MarshalJSON() ([]byte, error) {
  1957. type NoMethod Notification
  1958. raw := NoMethod(*s)
  1959. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1960. }
  1961. type Offers struct {
  1962. // Items: A list of offers.
  1963. Items []*OffersItems `json:"items,omitempty"`
  1964. // Kind: Resource type.
  1965. Kind string `json:"kind,omitempty"`
  1966. // ServerResponse contains the HTTP response code and headers from the
  1967. // server.
  1968. googleapi.ServerResponse `json:"-"`
  1969. // ForceSendFields is a list of field names (e.g. "Items") to
  1970. // unconditionally include in API requests. By default, fields with
  1971. // empty values are omitted from API requests. However, any non-pointer,
  1972. // non-interface field appearing in ForceSendFields will be sent to the
  1973. // server regardless of whether the field is empty or not. This may be
  1974. // used to include empty fields in Patch requests.
  1975. ForceSendFields []string `json:"-"`
  1976. // NullFields is a list of field names (e.g. "Items") to include in API
  1977. // requests with the JSON null value. By default, fields with empty
  1978. // values are omitted from API requests. However, any field with an
  1979. // empty value appearing in NullFields will be sent to the server as
  1980. // null. It is an error if a field in this list has a non-empty value.
  1981. // This may be used to include null fields in Patch requests.
  1982. NullFields []string `json:"-"`
  1983. }
  1984. func (s *Offers) MarshalJSON() ([]byte, error) {
  1985. type NoMethod Offers
  1986. raw := NoMethod(*s)
  1987. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1988. }
  1989. type OffersItems struct {
  1990. ArtUrl string `json:"artUrl,omitempty"`
  1991. GservicesKey string `json:"gservicesKey,omitempty"`
  1992. Id string `json:"id,omitempty"`
  1993. Items []*OffersItemsItems `json:"items,omitempty"`
  1994. // ForceSendFields is a list of field names (e.g. "ArtUrl") 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. "ArtUrl") 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 *OffersItems) MarshalJSON() ([]byte, error) {
  2010. type NoMethod OffersItems
  2011. raw := NoMethod(*s)
  2012. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2013. }
  2014. type OffersItemsItems struct {
  2015. Author string `json:"author,omitempty"`
  2016. CanonicalVolumeLink string `json:"canonicalVolumeLink,omitempty"`
  2017. CoverUrl string `json:"coverUrl,omitempty"`
  2018. Description string `json:"description,omitempty"`
  2019. Title string `json:"title,omitempty"`
  2020. VolumeId string `json:"volumeId,omitempty"`
  2021. // ForceSendFields is a list of field names (e.g. "Author") to
  2022. // unconditionally include in API requests. By default, fields with
  2023. // empty values are omitted from API requests. However, any non-pointer,
  2024. // non-interface field appearing in ForceSendFields will be sent to the
  2025. // server regardless of whether the field is empty or not. This may be
  2026. // used to include empty fields in Patch requests.
  2027. ForceSendFields []string `json:"-"`
  2028. // NullFields is a list of field names (e.g. "Author") to include in API
  2029. // requests with the JSON null value. By default, fields with empty
  2030. // values are omitted from API requests. However, any field with an
  2031. // empty value appearing in NullFields will be sent to the server as
  2032. // null. It is an error if a field in this list has a non-empty value.
  2033. // This may be used to include null fields in Patch requests.
  2034. NullFields []string `json:"-"`
  2035. }
  2036. func (s *OffersItemsItems) MarshalJSON() ([]byte, error) {
  2037. type NoMethod OffersItemsItems
  2038. raw := NoMethod(*s)
  2039. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2040. }
  2041. type ReadingPosition struct {
  2042. // EpubCfiPosition: Position in an EPUB as a CFI.
  2043. EpubCfiPosition string `json:"epubCfiPosition,omitempty"`
  2044. // GbImagePosition: Position in a volume for image-based content.
  2045. GbImagePosition string `json:"gbImagePosition,omitempty"`
  2046. // GbTextPosition: Position in a volume for text-based content.
  2047. GbTextPosition string `json:"gbTextPosition,omitempty"`
  2048. // Kind: Resource type for a reading position.
  2049. Kind string `json:"kind,omitempty"`
  2050. // PdfPosition: Position in a PDF file.
  2051. PdfPosition string `json:"pdfPosition,omitempty"`
  2052. // Updated: Timestamp when this reading position was last updated
  2053. // (formatted UTC timestamp with millisecond resolution).
  2054. Updated string `json:"updated,omitempty"`
  2055. // VolumeId: Volume id associated with this reading position.
  2056. VolumeId string `json:"volumeId,omitempty"`
  2057. // ServerResponse contains the HTTP response code and headers from the
  2058. // server.
  2059. googleapi.ServerResponse `json:"-"`
  2060. // ForceSendFields is a list of field names (e.g. "EpubCfiPosition") to
  2061. // unconditionally include in API requests. By default, fields with
  2062. // empty values are omitted from API requests. However, any non-pointer,
  2063. // non-interface field appearing in ForceSendFields will be sent to the
  2064. // server regardless of whether the field is empty or not. This may be
  2065. // used to include empty fields in Patch requests.
  2066. ForceSendFields []string `json:"-"`
  2067. // NullFields is a list of field names (e.g. "EpubCfiPosition") to
  2068. // include in API requests with the JSON null value. By default, fields
  2069. // with empty values are omitted from API requests. However, any field
  2070. // with an empty value appearing in NullFields will be sent to the
  2071. // server as null. It is an error if a field in this list has a
  2072. // non-empty value. This may be used to include null fields in Patch
  2073. // requests.
  2074. NullFields []string `json:"-"`
  2075. }
  2076. func (s *ReadingPosition) MarshalJSON() ([]byte, error) {
  2077. type NoMethod ReadingPosition
  2078. raw := NoMethod(*s)
  2079. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2080. }
  2081. type RequestAccess struct {
  2082. // ConcurrentAccess: A concurrent access response.
  2083. ConcurrentAccess *ConcurrentAccessRestriction `json:"concurrentAccess,omitempty"`
  2084. // DownloadAccess: A download access response.
  2085. DownloadAccess *DownloadAccessRestriction `json:"downloadAccess,omitempty"`
  2086. // Kind: Resource type.
  2087. Kind string `json:"kind,omitempty"`
  2088. // ServerResponse contains the HTTP response code and headers from the
  2089. // server.
  2090. googleapi.ServerResponse `json:"-"`
  2091. // ForceSendFields is a list of field names (e.g. "ConcurrentAccess") to
  2092. // unconditionally include in API requests. By default, fields with
  2093. // empty values are omitted from API requests. However, any non-pointer,
  2094. // non-interface field appearing in ForceSendFields will be sent to the
  2095. // server regardless of whether the field is empty or not. This may be
  2096. // used to include empty fields in Patch requests.
  2097. ForceSendFields []string `json:"-"`
  2098. // NullFields is a list of field names (e.g. "ConcurrentAccess") to
  2099. // include in API requests with the JSON null value. By default, fields
  2100. // with empty values are omitted from API requests. However, any field
  2101. // with an empty value appearing in NullFields will be sent to the
  2102. // server as null. It is an error if a field in this list has a
  2103. // non-empty value. This may be used to include null fields in Patch
  2104. // requests.
  2105. NullFields []string `json:"-"`
  2106. }
  2107. func (s *RequestAccess) MarshalJSON() ([]byte, error) {
  2108. type NoMethod RequestAccess
  2109. raw := NoMethod(*s)
  2110. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2111. }
  2112. type Review struct {
  2113. // Author: Author of this review.
  2114. Author *ReviewAuthor `json:"author,omitempty"`
  2115. // Content: Review text.
  2116. Content string `json:"content,omitempty"`
  2117. // Date: Date of this review.
  2118. Date string `json:"date,omitempty"`
  2119. // FullTextUrl: URL for the full review text, for reviews gathered from
  2120. // the web.
  2121. FullTextUrl string `json:"fullTextUrl,omitempty"`
  2122. // Kind: Resource type for a review.
  2123. Kind string `json:"kind,omitempty"`
  2124. // Rating: Star rating for this review. Possible values are ONE, TWO,
  2125. // THREE, FOUR, FIVE or NOT_RATED.
  2126. Rating string `json:"rating,omitempty"`
  2127. // Source: Information regarding the source of this review, when the
  2128. // review is not from a Google Books user.
  2129. Source *ReviewSource `json:"source,omitempty"`
  2130. // Title: Title for this review.
  2131. Title string `json:"title,omitempty"`
  2132. // Type: Source type for this review. Possible values are EDITORIAL,
  2133. // WEB_USER or GOOGLE_USER.
  2134. Type string `json:"type,omitempty"`
  2135. // VolumeId: Volume that this review is for.
  2136. VolumeId string `json:"volumeId,omitempty"`
  2137. // ForceSendFields is a list of field names (e.g. "Author") to
  2138. // unconditionally include in API requests. By default, fields with
  2139. // empty values are omitted from API requests. However, any non-pointer,
  2140. // non-interface field appearing in ForceSendFields will be sent to the
  2141. // server regardless of whether the field is empty or not. This may be
  2142. // used to include empty fields in Patch requests.
  2143. ForceSendFields []string `json:"-"`
  2144. // NullFields is a list of field names (e.g. "Author") to include in API
  2145. // requests with the JSON null value. By default, fields with empty
  2146. // values are omitted from API requests. However, any field with an
  2147. // empty value appearing in NullFields will be sent to the server as
  2148. // null. It is an error if a field in this list has a non-empty value.
  2149. // This may be used to include null fields in Patch requests.
  2150. NullFields []string `json:"-"`
  2151. }
  2152. func (s *Review) MarshalJSON() ([]byte, error) {
  2153. type NoMethod Review
  2154. raw := NoMethod(*s)
  2155. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2156. }
  2157. // ReviewAuthor: Author of this review.
  2158. type ReviewAuthor struct {
  2159. // DisplayName: Name of this person.
  2160. DisplayName string `json:"displayName,omitempty"`
  2161. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  2162. // unconditionally include in API requests. By default, fields with
  2163. // empty values are omitted from API requests. However, any non-pointer,
  2164. // non-interface field appearing in ForceSendFields will be sent to the
  2165. // server regardless of whether the field is empty or not. This may be
  2166. // used to include empty fields in Patch requests.
  2167. ForceSendFields []string `json:"-"`
  2168. // NullFields is a list of field names (e.g. "DisplayName") to include
  2169. // in API requests with the JSON null value. By default, fields with
  2170. // empty values are omitted from API requests. However, any field with
  2171. // an empty value appearing in NullFields will be sent to the server as
  2172. // null. It is an error if a field in this list has a non-empty value.
  2173. // This may be used to include null fields in Patch requests.
  2174. NullFields []string `json:"-"`
  2175. }
  2176. func (s *ReviewAuthor) MarshalJSON() ([]byte, error) {
  2177. type NoMethod ReviewAuthor
  2178. raw := NoMethod(*s)
  2179. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2180. }
  2181. // ReviewSource: Information regarding the source of this review, when
  2182. // the review is not from a Google Books user.
  2183. type ReviewSource struct {
  2184. // Description: Name of the source.
  2185. Description string `json:"description,omitempty"`
  2186. // ExtraDescription: Extra text about the source of the review.
  2187. ExtraDescription string `json:"extraDescription,omitempty"`
  2188. // Url: URL of the source of the review.
  2189. Url string `json:"url,omitempty"`
  2190. // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") to include
  2198. // in API requests with the JSON null value. By default, fields with
  2199. // empty values are omitted from API requests. However, any field with
  2200. // an 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 *ReviewSource) MarshalJSON() ([]byte, error) {
  2206. type NoMethod ReviewSource
  2207. raw := NoMethod(*s)
  2208. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2209. }
  2210. type Series struct {
  2211. // Kind: Resource type.
  2212. Kind string `json:"kind,omitempty"`
  2213. Series []*SeriesSeries `json:"series,omitempty"`
  2214. // ServerResponse contains the HTTP response code and headers from the
  2215. // server.
  2216. googleapi.ServerResponse `json:"-"`
  2217. // ForceSendFields is a list of field names (e.g. "Kind") to
  2218. // unconditionally include in API requests. By default, fields with
  2219. // empty values are omitted from API requests. However, any non-pointer,
  2220. // non-interface field appearing in ForceSendFields will be sent to the
  2221. // server regardless of whether the field is empty or not. This may be
  2222. // used to include empty fields in Patch requests.
  2223. ForceSendFields []string `json:"-"`
  2224. // NullFields is a list of field names (e.g. "Kind") to include in API
  2225. // requests with the JSON null value. By default, fields with empty
  2226. // values are omitted from API requests. However, any field with an
  2227. // empty value appearing in NullFields will be sent to the server as
  2228. // null. It is an error if a field in this list has a non-empty value.
  2229. // This may be used to include null fields in Patch requests.
  2230. NullFields []string `json:"-"`
  2231. }
  2232. func (s *Series) MarshalJSON() ([]byte, error) {
  2233. type NoMethod Series
  2234. raw := NoMethod(*s)
  2235. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2236. }
  2237. type SeriesSeries struct {
  2238. BannerImageUrl string `json:"bannerImageUrl,omitempty"`
  2239. ImageUrl string `json:"imageUrl,omitempty"`
  2240. SeriesId string `json:"seriesId,omitempty"`
  2241. SeriesType string `json:"seriesType,omitempty"`
  2242. Title string `json:"title,omitempty"`
  2243. // ForceSendFields is a list of field names (e.g. "BannerImageUrl") 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. "BannerImageUrl") to
  2251. // include in API requests with the JSON null value. By default, fields
  2252. // with empty values are omitted from API requests. However, any field
  2253. // with an empty value appearing in NullFields will be sent to the
  2254. // server as null. It is an error if a field in this list has a
  2255. // non-empty value. This may be used to include null fields in Patch
  2256. // requests.
  2257. NullFields []string `json:"-"`
  2258. }
  2259. func (s *SeriesSeries) MarshalJSON() ([]byte, error) {
  2260. type NoMethod SeriesSeries
  2261. raw := NoMethod(*s)
  2262. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2263. }
  2264. type Seriesmembership struct {
  2265. // Kind: Resorce type.
  2266. Kind string `json:"kind,omitempty"`
  2267. Member []*Volume `json:"member,omitempty"`
  2268. NextPageToken string `json:"nextPageToken,omitempty"`
  2269. // ServerResponse contains the HTTP response code and headers from the
  2270. // server.
  2271. googleapi.ServerResponse `json:"-"`
  2272. // ForceSendFields is a list of field names (e.g. "Kind") to
  2273. // unconditionally include in API requests. By default, fields with
  2274. // empty values are omitted from API requests. However, any non-pointer,
  2275. // non-interface field appearing in ForceSendFields will be sent to the
  2276. // server regardless of whether the field is empty or not. This may be
  2277. // used to include empty fields in Patch requests.
  2278. ForceSendFields []string `json:"-"`
  2279. // NullFields is a list of field names (e.g. "Kind") to include in API
  2280. // requests with the JSON null value. By default, fields with empty
  2281. // values are omitted from API requests. However, any field with an
  2282. // empty value appearing in NullFields will be sent to the server as
  2283. // null. It is an error if a field in this list has a non-empty value.
  2284. // This may be used to include null fields in Patch requests.
  2285. NullFields []string `json:"-"`
  2286. }
  2287. func (s *Seriesmembership) MarshalJSON() ([]byte, error) {
  2288. type NoMethod Seriesmembership
  2289. raw := NoMethod(*s)
  2290. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2291. }
  2292. type Usersettings struct {
  2293. // Kind: Resource type.
  2294. Kind string `json:"kind,omitempty"`
  2295. // NotesExport: User settings in sub-objects, each for different
  2296. // purposes.
  2297. NotesExport *UsersettingsNotesExport `json:"notesExport,omitempty"`
  2298. Notification *UsersettingsNotification `json:"notification,omitempty"`
  2299. // ServerResponse contains the HTTP response code and headers from the
  2300. // server.
  2301. googleapi.ServerResponse `json:"-"`
  2302. // ForceSendFields is a list of field names (e.g. "Kind") to
  2303. // unconditionally include in API requests. By default, fields with
  2304. // empty values are omitted from API requests. However, any non-pointer,
  2305. // non-interface field appearing in ForceSendFields will be sent to the
  2306. // server regardless of whether the field is empty or not. This may be
  2307. // used to include empty fields in Patch requests.
  2308. ForceSendFields []string `json:"-"`
  2309. // NullFields is a list of field names (e.g. "Kind") to include in API
  2310. // requests with the JSON null value. By default, fields with empty
  2311. // values are omitted from API requests. However, any field with an
  2312. // empty value appearing in NullFields will be sent to the server as
  2313. // null. It is an error if a field in this list has a non-empty value.
  2314. // This may be used to include null fields in Patch requests.
  2315. NullFields []string `json:"-"`
  2316. }
  2317. func (s *Usersettings) MarshalJSON() ([]byte, error) {
  2318. type NoMethod Usersettings
  2319. raw := NoMethod(*s)
  2320. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2321. }
  2322. // UsersettingsNotesExport: User settings in sub-objects, each for
  2323. // different purposes.
  2324. type UsersettingsNotesExport struct {
  2325. FolderName string `json:"folderName,omitempty"`
  2326. IsEnabled bool `json:"isEnabled,omitempty"`
  2327. // ForceSendFields is a list of field names (e.g. "FolderName") to
  2328. // unconditionally include in API requests. By default, fields with
  2329. // empty values are omitted from API requests. However, any non-pointer,
  2330. // non-interface field appearing in ForceSendFields will be sent to the
  2331. // server regardless of whether the field is empty or not. This may be
  2332. // used to include empty fields in Patch requests.
  2333. ForceSendFields []string `json:"-"`
  2334. // NullFields is a list of field names (e.g. "FolderName") to include in
  2335. // API requests with the JSON null value. By default, fields with empty
  2336. // values are omitted from API requests. However, any field with an
  2337. // empty value appearing in NullFields will be sent to the server as
  2338. // null. It is an error if a field in this list has a non-empty value.
  2339. // This may be used to include null fields in Patch requests.
  2340. NullFields []string `json:"-"`
  2341. }
  2342. func (s *UsersettingsNotesExport) MarshalJSON() ([]byte, error) {
  2343. type NoMethod UsersettingsNotesExport
  2344. raw := NoMethod(*s)
  2345. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2346. }
  2347. type UsersettingsNotification struct {
  2348. MatchMyInterests *UsersettingsNotificationMatchMyInterests `json:"matchMyInterests,omitempty"`
  2349. MoreFromAuthors *UsersettingsNotificationMoreFromAuthors `json:"moreFromAuthors,omitempty"`
  2350. MoreFromSeries *UsersettingsNotificationMoreFromSeries `json:"moreFromSeries,omitempty"`
  2351. PriceDrop *UsersettingsNotificationPriceDrop `json:"priceDrop,omitempty"`
  2352. RewardExpirations *UsersettingsNotificationRewardExpirations `json:"rewardExpirations,omitempty"`
  2353. // ForceSendFields is a list of field names (e.g. "MatchMyInterests") to
  2354. // unconditionally include in API requests. By default, fields with
  2355. // empty values are omitted from API requests. However, any non-pointer,
  2356. // non-interface field appearing in ForceSendFields will be sent to the
  2357. // server regardless of whether the field is empty or not. This may be
  2358. // used to include empty fields in Patch requests.
  2359. ForceSendFields []string `json:"-"`
  2360. // NullFields is a list of field names (e.g. "MatchMyInterests") to
  2361. // include in API requests with the JSON null value. By default, fields
  2362. // with empty values are omitted from API requests. However, any field
  2363. // with an empty value appearing in NullFields will be sent to the
  2364. // server as null. It is an error if a field in this list has a
  2365. // non-empty value. This may be used to include null fields in Patch
  2366. // requests.
  2367. NullFields []string `json:"-"`
  2368. }
  2369. func (s *UsersettingsNotification) MarshalJSON() ([]byte, error) {
  2370. type NoMethod UsersettingsNotification
  2371. raw := NoMethod(*s)
  2372. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2373. }
  2374. type UsersettingsNotificationMatchMyInterests struct {
  2375. OptedState string `json:"opted_state,omitempty"`
  2376. // ForceSendFields is a list of field names (e.g. "OptedState") to
  2377. // unconditionally include in API requests. By default, fields with
  2378. // empty values are omitted from API requests. However, any non-pointer,
  2379. // non-interface field appearing in ForceSendFields will be sent to the
  2380. // server regardless of whether the field is empty or not. This may be
  2381. // used to include empty fields in Patch requests.
  2382. ForceSendFields []string `json:"-"`
  2383. // NullFields is a list of field names (e.g. "OptedState") to include in
  2384. // API requests with the JSON null value. By default, fields with empty
  2385. // values are omitted from API requests. However, any field with an
  2386. // empty value appearing in NullFields will be sent to the server as
  2387. // null. It is an error if a field in this list has a non-empty value.
  2388. // This may be used to include null fields in Patch requests.
  2389. NullFields []string `json:"-"`
  2390. }
  2391. func (s *UsersettingsNotificationMatchMyInterests) MarshalJSON() ([]byte, error) {
  2392. type NoMethod UsersettingsNotificationMatchMyInterests
  2393. raw := NoMethod(*s)
  2394. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2395. }
  2396. type UsersettingsNotificationMoreFromAuthors struct {
  2397. OptedState string `json:"opted_state,omitempty"`
  2398. // ForceSendFields is a list of field names (e.g. "OptedState") to
  2399. // unconditionally include in API requests. By default, fields with
  2400. // empty values are omitted from API requests. However, any non-pointer,
  2401. // non-interface field appearing in ForceSendFields will be sent to the
  2402. // server regardless of whether the field is empty or not. This may be
  2403. // used to include empty fields in Patch requests.
  2404. ForceSendFields []string `json:"-"`
  2405. // NullFields is a list of field names (e.g. "OptedState") to include in
  2406. // API requests with the JSON null value. By default, fields with empty
  2407. // values are omitted from API requests. However, any field with an
  2408. // empty value appearing in NullFields will be sent to the server as
  2409. // null. It is an error if a field in this list has a non-empty value.
  2410. // This may be used to include null fields in Patch requests.
  2411. NullFields []string `json:"-"`
  2412. }
  2413. func (s *UsersettingsNotificationMoreFromAuthors) MarshalJSON() ([]byte, error) {
  2414. type NoMethod UsersettingsNotificationMoreFromAuthors
  2415. raw := NoMethod(*s)
  2416. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2417. }
  2418. type UsersettingsNotificationMoreFromSeries struct {
  2419. OptedState string `json:"opted_state,omitempty"`
  2420. // ForceSendFields is a list of field names (e.g. "OptedState") to
  2421. // unconditionally include in API requests. By default, fields with
  2422. // empty values are omitted from API requests. However, any non-pointer,
  2423. // non-interface field appearing in ForceSendFields will be sent to the
  2424. // server regardless of whether the field is empty or not. This may be
  2425. // used to include empty fields in Patch requests.
  2426. ForceSendFields []string `json:"-"`
  2427. // NullFields is a list of field names (e.g. "OptedState") to include in
  2428. // API requests with the JSON null value. By default, fields with empty
  2429. // values are omitted from API requests. However, any field with an
  2430. // empty value appearing in NullFields will be sent to the server as
  2431. // null. It is an error if a field in this list has a non-empty value.
  2432. // This may be used to include null fields in Patch requests.
  2433. NullFields []string `json:"-"`
  2434. }
  2435. func (s *UsersettingsNotificationMoreFromSeries) MarshalJSON() ([]byte, error) {
  2436. type NoMethod UsersettingsNotificationMoreFromSeries
  2437. raw := NoMethod(*s)
  2438. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2439. }
  2440. type UsersettingsNotificationPriceDrop struct {
  2441. OptedState string `json:"opted_state,omitempty"`
  2442. // ForceSendFields is a list of field names (e.g. "OptedState") to
  2443. // unconditionally include in API requests. By default, fields with
  2444. // empty values are omitted from API requests. However, any non-pointer,
  2445. // non-interface field appearing in ForceSendFields will be sent to the
  2446. // server regardless of whether the field is empty or not. This may be
  2447. // used to include empty fields in Patch requests.
  2448. ForceSendFields []string `json:"-"`
  2449. // NullFields is a list of field names (e.g. "OptedState") to include in
  2450. // API requests with the JSON null value. By default, fields with empty
  2451. // values are omitted from API requests. However, any field with an
  2452. // empty value appearing in NullFields will be sent to the server as
  2453. // null. It is an error if a field in this list has a non-empty value.
  2454. // This may be used to include null fields in Patch requests.
  2455. NullFields []string `json:"-"`
  2456. }
  2457. func (s *UsersettingsNotificationPriceDrop) MarshalJSON() ([]byte, error) {
  2458. type NoMethod UsersettingsNotificationPriceDrop
  2459. raw := NoMethod(*s)
  2460. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2461. }
  2462. type UsersettingsNotificationRewardExpirations struct {
  2463. OptedState string `json:"opted_state,omitempty"`
  2464. // ForceSendFields is a list of field names (e.g. "OptedState") to
  2465. // unconditionally include in API requests. By default, fields with
  2466. // empty values are omitted from API requests. However, any non-pointer,
  2467. // non-interface field appearing in ForceSendFields will be sent to the
  2468. // server regardless of whether the field is empty or not. This may be
  2469. // used to include empty fields in Patch requests.
  2470. ForceSendFields []string `json:"-"`
  2471. // NullFields is a list of field names (e.g. "OptedState") to include in
  2472. // API requests with the JSON null value. By default, fields with empty
  2473. // values are omitted from API requests. However, any field with an
  2474. // empty value appearing in NullFields will be sent to the server as
  2475. // null. It is an error if a field in this list has a non-empty value.
  2476. // This may be used to include null fields in Patch requests.
  2477. NullFields []string `json:"-"`
  2478. }
  2479. func (s *UsersettingsNotificationRewardExpirations) MarshalJSON() ([]byte, error) {
  2480. type NoMethod UsersettingsNotificationRewardExpirations
  2481. raw := NoMethod(*s)
  2482. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2483. }
  2484. type Volume struct {
  2485. // AccessInfo: Any information about a volume related to reading or
  2486. // obtaining that volume text. This information can depend on country
  2487. // (books may be public domain in one country but not in another, e.g.).
  2488. AccessInfo *VolumeAccessInfo `json:"accessInfo,omitempty"`
  2489. // Etag: Opaque identifier for a specific version of a volume resource.
  2490. // (In LITE projection)
  2491. Etag string `json:"etag,omitempty"`
  2492. // Id: Unique identifier for a volume. (In LITE projection.)
  2493. Id string `json:"id,omitempty"`
  2494. // Kind: Resource type for a volume. (In LITE projection.)
  2495. Kind string `json:"kind,omitempty"`
  2496. // LayerInfo: What layers exist in this volume and high level
  2497. // information about them.
  2498. LayerInfo *VolumeLayerInfo `json:"layerInfo,omitempty"`
  2499. // RecommendedInfo: Recommendation related information for this volume.
  2500. RecommendedInfo *VolumeRecommendedInfo `json:"recommendedInfo,omitempty"`
  2501. // SaleInfo: Any information about a volume related to the eBookstore
  2502. // and/or purchaseability. This information can depend on the country
  2503. // where the request originates from (i.e. books may not be for sale in
  2504. // certain countries).
  2505. SaleInfo *VolumeSaleInfo `json:"saleInfo,omitempty"`
  2506. // SearchInfo: Search result information related to this volume.
  2507. SearchInfo *VolumeSearchInfo `json:"searchInfo,omitempty"`
  2508. // SelfLink: URL to this resource. (In LITE projection.)
  2509. SelfLink string `json:"selfLink,omitempty"`
  2510. // UserInfo: User specific information related to this volume. (e.g.
  2511. // page this user last read or whether they purchased this book)
  2512. UserInfo *VolumeUserInfo `json:"userInfo,omitempty"`
  2513. // VolumeInfo: General volume information.
  2514. VolumeInfo *VolumeVolumeInfo `json:"volumeInfo,omitempty"`
  2515. // ServerResponse contains the HTTP response code and headers from the
  2516. // server.
  2517. googleapi.ServerResponse `json:"-"`
  2518. // ForceSendFields is a list of field names (e.g. "AccessInfo") to
  2519. // unconditionally include in API requests. By default, fields with
  2520. // empty values are omitted from API requests. However, any non-pointer,
  2521. // non-interface field appearing in ForceSendFields will be sent to the
  2522. // server regardless of whether the field is empty or not. This may be
  2523. // used to include empty fields in Patch requests.
  2524. ForceSendFields []string `json:"-"`
  2525. // NullFields is a list of field names (e.g. "AccessInfo") to include in
  2526. // API requests with the JSON null value. By default, fields with empty
  2527. // values are omitted from API requests. However, any field with an
  2528. // empty value appearing in NullFields will be sent to the server as
  2529. // null. It is an error if a field in this list has a non-empty value.
  2530. // This may be used to include null fields in Patch requests.
  2531. NullFields []string `json:"-"`
  2532. }
  2533. func (s *Volume) MarshalJSON() ([]byte, error) {
  2534. type NoMethod Volume
  2535. raw := NoMethod(*s)
  2536. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2537. }
  2538. // VolumeAccessInfo: Any information about a volume related to reading
  2539. // or 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. type VolumeAccessInfo struct {
  2542. // AccessViewStatus: Combines the access and viewability of this volume
  2543. // into a single status field for this user. Values can be
  2544. // FULL_PURCHASED, FULL_PUBLIC_DOMAIN, SAMPLE or NONE. (In LITE
  2545. // projection.)
  2546. AccessViewStatus string `json:"accessViewStatus,omitempty"`
  2547. // Country: The two-letter ISO_3166-1 country code for which this access
  2548. // information is valid. (In LITE projection.)
  2549. Country string `json:"country,omitempty"`
  2550. // DownloadAccess: Information about a volume's download license access
  2551. // restrictions.
  2552. DownloadAccess *DownloadAccessRestriction `json:"downloadAccess,omitempty"`
  2553. // DriveImportedContentLink: URL to the Google Drive viewer if this
  2554. // volume is uploaded by the user by selecting the file from Google
  2555. // Drive.
  2556. DriveImportedContentLink string `json:"driveImportedContentLink,omitempty"`
  2557. // Embeddable: Whether this volume can be embedded in a viewport using
  2558. // the Embedded Viewer API.
  2559. Embeddable bool `json:"embeddable,omitempty"`
  2560. // Epub: Information about epub content. (In LITE projection.)
  2561. Epub *VolumeAccessInfoEpub `json:"epub,omitempty"`
  2562. // ExplicitOfflineLicenseManagement: Whether this volume requires that
  2563. // the client explicitly request offline download license rather than
  2564. // have it done automatically when loading the content, if the client
  2565. // supports it.
  2566. ExplicitOfflineLicenseManagement bool `json:"explicitOfflineLicenseManagement,omitempty"`
  2567. // Pdf: Information about pdf content. (In LITE projection.)
  2568. Pdf *VolumeAccessInfoPdf `json:"pdf,omitempty"`
  2569. // PublicDomain: Whether or not this book is public domain in the
  2570. // country listed above.
  2571. PublicDomain bool `json:"publicDomain,omitempty"`
  2572. // QuoteSharingAllowed: Whether quote sharing is allowed for this
  2573. // volume.
  2574. QuoteSharingAllowed bool `json:"quoteSharingAllowed,omitempty"`
  2575. // TextToSpeechPermission: Whether text-to-speech is permitted for this
  2576. // volume. Values can be ALLOWED, ALLOWED_FOR_ACCESSIBILITY, or
  2577. // NOT_ALLOWED.
  2578. TextToSpeechPermission string `json:"textToSpeechPermission,omitempty"`
  2579. // ViewOrderUrl: For ordered but not yet processed orders, we give a URL
  2580. // that can be used to go to the appropriate Google Wallet page.
  2581. ViewOrderUrl string `json:"viewOrderUrl,omitempty"`
  2582. // Viewability: The read access of a volume. Possible values are
  2583. // PARTIAL, ALL_PAGES, NO_PAGES or UNKNOWN. This value depends on the
  2584. // country listed above. A value of PARTIAL means that the publisher has
  2585. // allowed some portion of the volume to be viewed publicly, without
  2586. // purchase. This can apply to eBooks as well as non-eBooks. Public
  2587. // domain books will always have a value of ALL_PAGES.
  2588. Viewability string `json:"viewability,omitempty"`
  2589. // WebReaderLink: URL to read this volume on the Google Books site. Link
  2590. // will not allow users to read non-viewable volumes.
  2591. WebReaderLink string `json:"webReaderLink,omitempty"`
  2592. // ForceSendFields is a list of field names (e.g. "AccessViewStatus") to
  2593. // unconditionally include in API requests. By default, fields with
  2594. // empty values are omitted from API requests. However, any non-pointer,
  2595. // non-interface field appearing in ForceSendFields will be sent to the
  2596. // server regardless of whether the field is empty or not. This may be
  2597. // used to include empty fields in Patch requests.
  2598. ForceSendFields []string `json:"-"`
  2599. // NullFields is a list of field names (e.g. "AccessViewStatus") to
  2600. // include in API requests with the JSON null value. By default, fields
  2601. // with empty values are omitted from API requests. However, any field
  2602. // with an empty value appearing in NullFields will be sent to the
  2603. // server as null. It is an error if a field in this list has a
  2604. // non-empty value. This may be used to include null fields in Patch
  2605. // requests.
  2606. NullFields []string `json:"-"`
  2607. }
  2608. func (s *VolumeAccessInfo) MarshalJSON() ([]byte, error) {
  2609. type NoMethod VolumeAccessInfo
  2610. raw := NoMethod(*s)
  2611. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2612. }
  2613. // VolumeAccessInfoEpub: Information about epub content. (In LITE
  2614. // projection.)
  2615. type VolumeAccessInfoEpub struct {
  2616. // AcsTokenLink: URL to retrieve ACS token for epub download. (In LITE
  2617. // projection.)
  2618. AcsTokenLink string `json:"acsTokenLink,omitempty"`
  2619. // DownloadLink: URL to download epub. (In LITE projection.)
  2620. DownloadLink string `json:"downloadLink,omitempty"`
  2621. // IsAvailable: Is a flowing text epub available either as public domain
  2622. // or for purchase. (In LITE projection.)
  2623. IsAvailable bool `json:"isAvailable,omitempty"`
  2624. // ForceSendFields is a list of field names (e.g. "AcsTokenLink") to
  2625. // unconditionally include in API requests. By default, fields with
  2626. // empty values are omitted from API requests. However, any non-pointer,
  2627. // non-interface field appearing in ForceSendFields will be sent to the
  2628. // server regardless of whether the field is empty or not. This may be
  2629. // used to include empty fields in Patch requests.
  2630. ForceSendFields []string `json:"-"`
  2631. // NullFields is a list of field names (e.g. "AcsTokenLink") to include
  2632. // in API requests with the JSON null value. By default, fields with
  2633. // empty values are omitted from API requests. However, any field with
  2634. // an empty value appearing in NullFields will be sent to the server as
  2635. // null. It is an error if a field in this list has a non-empty value.
  2636. // This may be used to include null fields in Patch requests.
  2637. NullFields []string `json:"-"`
  2638. }
  2639. func (s *VolumeAccessInfoEpub) MarshalJSON() ([]byte, error) {
  2640. type NoMethod VolumeAccessInfoEpub
  2641. raw := NoMethod(*s)
  2642. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2643. }
  2644. // VolumeAccessInfoPdf: Information about pdf content. (In LITE
  2645. // projection.)
  2646. type VolumeAccessInfoPdf struct {
  2647. // AcsTokenLink: URL to retrieve ACS token for pdf download. (In LITE
  2648. // projection.)
  2649. AcsTokenLink string `json:"acsTokenLink,omitempty"`
  2650. // DownloadLink: URL to download pdf. (In LITE projection.)
  2651. DownloadLink string `json:"downloadLink,omitempty"`
  2652. // IsAvailable: Is a scanned image pdf available either as public domain
  2653. // or for purchase. (In LITE projection.)
  2654. IsAvailable bool `json:"isAvailable,omitempty"`
  2655. // ForceSendFields is a list of field names (e.g. "AcsTokenLink") to
  2656. // unconditionally include in API requests. By default, fields with
  2657. // empty values are omitted from API requests. However, any non-pointer,
  2658. // non-interface field appearing in ForceSendFields will be sent to the
  2659. // server regardless of whether the field is empty or not. This may be
  2660. // used to include empty fields in Patch requests.
  2661. ForceSendFields []string `json:"-"`
  2662. // NullFields is a list of field names (e.g. "AcsTokenLink") to include
  2663. // in API requests with the JSON null value. By default, fields with
  2664. // empty values are omitted from API requests. However, any field with
  2665. // an empty value appearing in NullFields will be sent to the server as
  2666. // null. It is an error if a field in this list has a non-empty value.
  2667. // This may be used to include null fields in Patch requests.
  2668. NullFields []string `json:"-"`
  2669. }
  2670. func (s *VolumeAccessInfoPdf) MarshalJSON() ([]byte, error) {
  2671. type NoMethod VolumeAccessInfoPdf
  2672. raw := NoMethod(*s)
  2673. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2674. }
  2675. // VolumeLayerInfo: What layers exist in this volume and high level
  2676. // information about them.
  2677. type VolumeLayerInfo struct {
  2678. // Layers: A layer should appear here if and only if the layer exists
  2679. // for this book.
  2680. Layers []*VolumeLayerInfoLayers `json:"layers,omitempty"`
  2681. // ForceSendFields is a list of field names (e.g. "Layers") to
  2682. // unconditionally include in API requests. By default, fields with
  2683. // empty values are omitted from API requests. However, any non-pointer,
  2684. // non-interface field appearing in ForceSendFields will be sent to the
  2685. // server regardless of whether the field is empty or not. This may be
  2686. // used to include empty fields in Patch requests.
  2687. ForceSendFields []string `json:"-"`
  2688. // NullFields is a list of field names (e.g. "Layers") to include in API
  2689. // requests with the JSON null value. By default, fields with empty
  2690. // values are omitted from API requests. However, any field with an
  2691. // empty value appearing in NullFields will be sent to the server as
  2692. // null. It is an error if a field in this list has a non-empty value.
  2693. // This may be used to include null fields in Patch requests.
  2694. NullFields []string `json:"-"`
  2695. }
  2696. func (s *VolumeLayerInfo) MarshalJSON() ([]byte, error) {
  2697. type NoMethod VolumeLayerInfo
  2698. raw := NoMethod(*s)
  2699. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2700. }
  2701. type VolumeLayerInfoLayers struct {
  2702. // LayerId: The layer id of this layer (e.g. "geo").
  2703. LayerId string `json:"layerId,omitempty"`
  2704. // VolumeAnnotationsVersion: The current version of this layer's volume
  2705. // annotations. Note that this version applies only to the data in the
  2706. // books.layers.volumeAnnotations.* responses. The actual annotation
  2707. // data is versioned separately.
  2708. VolumeAnnotationsVersion string `json:"volumeAnnotationsVersion,omitempty"`
  2709. // ForceSendFields is a list of field names (e.g. "LayerId") to
  2710. // unconditionally include in API requests. By default, fields with
  2711. // empty values are omitted from API requests. However, any non-pointer,
  2712. // non-interface field appearing in ForceSendFields will be sent to the
  2713. // server regardless of whether the field is empty or not. This may be
  2714. // used to include empty fields in Patch requests.
  2715. ForceSendFields []string `json:"-"`
  2716. // NullFields is a list of field names (e.g. "LayerId") to include in
  2717. // API requests with the JSON null value. By default, fields with empty
  2718. // values are omitted from API requests. However, any field with an
  2719. // empty value appearing in NullFields will be sent to the server as
  2720. // null. It is an error if a field in this list has a non-empty value.
  2721. // This may be used to include null fields in Patch requests.
  2722. NullFields []string `json:"-"`
  2723. }
  2724. func (s *VolumeLayerInfoLayers) MarshalJSON() ([]byte, error) {
  2725. type NoMethod VolumeLayerInfoLayers
  2726. raw := NoMethod(*s)
  2727. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2728. }
  2729. // VolumeRecommendedInfo: Recommendation related information for this
  2730. // volume.
  2731. type VolumeRecommendedInfo struct {
  2732. // Explanation: A text explaining why this volume is recommended.
  2733. Explanation string `json:"explanation,omitempty"`
  2734. // ForceSendFields is a list of field names (e.g. "Explanation") 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. "Explanation") to include
  2742. // in API requests with the JSON null value. By default, fields with
  2743. // empty values are omitted from API requests. However, any field with
  2744. // an 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 *VolumeRecommendedInfo) MarshalJSON() ([]byte, error) {
  2750. type NoMethod VolumeRecommendedInfo
  2751. raw := NoMethod(*s)
  2752. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2753. }
  2754. // VolumeSaleInfo: Any information about a volume related to the
  2755. // eBookstore and/or purchaseability. This information can depend on the
  2756. // country where the request originates from (i.e. books may not be for
  2757. // sale in certain countries).
  2758. type VolumeSaleInfo struct {
  2759. // BuyLink: URL to purchase this volume on the Google Books site. (In
  2760. // LITE projection)
  2761. BuyLink string `json:"buyLink,omitempty"`
  2762. // Country: The two-letter ISO_3166-1 country code for which this sale
  2763. // information is valid. (In LITE projection.)
  2764. Country string `json:"country,omitempty"`
  2765. // IsEbook: Whether or not this volume is an eBook (can be added to the
  2766. // My eBooks shelf).
  2767. IsEbook bool `json:"isEbook,omitempty"`
  2768. // ListPrice: Suggested retail price. (In LITE projection.)
  2769. ListPrice *VolumeSaleInfoListPrice `json:"listPrice,omitempty"`
  2770. // Offers: Offers available for this volume (sales and rentals).
  2771. Offers []*VolumeSaleInfoOffers `json:"offers,omitempty"`
  2772. // OnSaleDate: The date on which this book is available for sale.
  2773. OnSaleDate string `json:"onSaleDate,omitempty"`
  2774. // RetailPrice: The actual selling price of the book. This is the same
  2775. // as the suggested retail or list price unless there are offers or
  2776. // discounts on this volume. (In LITE projection.)
  2777. RetailPrice *VolumeSaleInfoRetailPrice `json:"retailPrice,omitempty"`
  2778. // Saleability: Whether or not this book is available for sale or
  2779. // offered for free in the Google eBookstore for the country listed
  2780. // above. Possible values are FOR_SALE, FOR_RENTAL_ONLY,
  2781. // FOR_SALE_AND_RENTAL, FREE, NOT_FOR_SALE, or FOR_PREORDER.
  2782. Saleability string `json:"saleability,omitempty"`
  2783. // ForceSendFields is a list of field names (e.g. "BuyLink") to
  2784. // unconditionally include in API requests. By default, fields with
  2785. // empty values are omitted from API requests. However, any non-pointer,
  2786. // non-interface field appearing in ForceSendFields will be sent to the
  2787. // server regardless of whether the field is empty or not. This may be
  2788. // used to include empty fields in Patch requests.
  2789. ForceSendFields []string `json:"-"`
  2790. // NullFields is a list of field names (e.g. "BuyLink") to include in
  2791. // API requests with the JSON null value. By default, fields with empty
  2792. // values are omitted from API requests. However, any field with an
  2793. // empty value appearing in NullFields will be sent to the server as
  2794. // null. It is an error if a field in this list has a non-empty value.
  2795. // This may be used to include null fields in Patch requests.
  2796. NullFields []string `json:"-"`
  2797. }
  2798. func (s *VolumeSaleInfo) MarshalJSON() ([]byte, error) {
  2799. type NoMethod VolumeSaleInfo
  2800. raw := NoMethod(*s)
  2801. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2802. }
  2803. // VolumeSaleInfoListPrice: Suggested retail price. (In LITE
  2804. // projection.)
  2805. type VolumeSaleInfoListPrice struct {
  2806. // Amount: Amount in the currency listed below. (In LITE projection.)
  2807. Amount float64 `json:"amount,omitempty"`
  2808. // CurrencyCode: An ISO 4217, three-letter currency code. (In LITE
  2809. // projection.)
  2810. CurrencyCode string `json:"currencyCode,omitempty"`
  2811. // ForceSendFields is a list of field names (e.g. "Amount") to
  2812. // unconditionally include in API requests. By default, fields with
  2813. // empty values are omitted from API requests. However, any non-pointer,
  2814. // non-interface field appearing in ForceSendFields will be sent to the
  2815. // server regardless of whether the field is empty or not. This may be
  2816. // used to include empty fields in Patch requests.
  2817. ForceSendFields []string `json:"-"`
  2818. // NullFields is a list of field names (e.g. "Amount") to include in API
  2819. // requests with the JSON null value. By default, fields with empty
  2820. // values are omitted from API requests. However, any field with an
  2821. // empty value appearing in NullFields will be sent to the server as
  2822. // null. It is an error if a field in this list has a non-empty value.
  2823. // This may be used to include null fields in Patch requests.
  2824. NullFields []string `json:"-"`
  2825. }
  2826. func (s *VolumeSaleInfoListPrice) MarshalJSON() ([]byte, error) {
  2827. type NoMethod VolumeSaleInfoListPrice
  2828. raw := NoMethod(*s)
  2829. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2830. }
  2831. func (s *VolumeSaleInfoListPrice) UnmarshalJSON(data []byte) error {
  2832. type NoMethod VolumeSaleInfoListPrice
  2833. var s1 struct {
  2834. Amount gensupport.JSONFloat64 `json:"amount"`
  2835. *NoMethod
  2836. }
  2837. s1.NoMethod = (*NoMethod)(s)
  2838. if err := json.Unmarshal(data, &s1); err != nil {
  2839. return err
  2840. }
  2841. s.Amount = float64(s1.Amount)
  2842. return nil
  2843. }
  2844. type VolumeSaleInfoOffers struct {
  2845. // FinskyOfferType: The finsky offer type (e.g., PURCHASE=0 RENTAL=3)
  2846. FinskyOfferType int64 `json:"finskyOfferType,omitempty"`
  2847. // Giftable: Indicates whether the offer is giftable.
  2848. Giftable bool `json:"giftable,omitempty"`
  2849. // ListPrice: Offer list (=undiscounted) price in Micros.
  2850. ListPrice *VolumeSaleInfoOffersListPrice `json:"listPrice,omitempty"`
  2851. // RentalDuration: The rental duration (for rental offers only).
  2852. RentalDuration *VolumeSaleInfoOffersRentalDuration `json:"rentalDuration,omitempty"`
  2853. // RetailPrice: Offer retail (=discounted) price in Micros
  2854. RetailPrice *VolumeSaleInfoOffersRetailPrice `json:"retailPrice,omitempty"`
  2855. // ForceSendFields is a list of field names (e.g. "FinskyOfferType") to
  2856. // unconditionally include in API requests. By default, fields with
  2857. // empty values are omitted from API requests. However, any non-pointer,
  2858. // non-interface field appearing in ForceSendFields will be sent to the
  2859. // server regardless of whether the field is empty or not. This may be
  2860. // used to include empty fields in Patch requests.
  2861. ForceSendFields []string `json:"-"`
  2862. // NullFields is a list of field names (e.g. "FinskyOfferType") to
  2863. // include in API requests with the JSON null value. By default, fields
  2864. // with empty values are omitted from API requests. However, any field
  2865. // with an empty value appearing in NullFields will be sent to the
  2866. // server as null. It is an error if a field in this list has a
  2867. // non-empty value. This may be used to include null fields in Patch
  2868. // requests.
  2869. NullFields []string `json:"-"`
  2870. }
  2871. func (s *VolumeSaleInfoOffers) MarshalJSON() ([]byte, error) {
  2872. type NoMethod VolumeSaleInfoOffers
  2873. raw := NoMethod(*s)
  2874. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2875. }
  2876. // VolumeSaleInfoOffersListPrice: Offer list (=undiscounted) price in
  2877. // Micros.
  2878. type VolumeSaleInfoOffersListPrice struct {
  2879. AmountInMicros float64 `json:"amountInMicros,omitempty"`
  2880. CurrencyCode string `json:"currencyCode,omitempty"`
  2881. // ForceSendFields is a list of field names (e.g. "AmountInMicros") to
  2882. // unconditionally include in API requests. By default, fields with
  2883. // empty values are omitted from API requests. However, any non-pointer,
  2884. // non-interface field appearing in ForceSendFields will be sent to the
  2885. // server regardless of whether the field is empty or not. This may be
  2886. // used to include empty fields in Patch requests.
  2887. ForceSendFields []string `json:"-"`
  2888. // NullFields is a list of field names (e.g. "AmountInMicros") to
  2889. // include in API requests with the JSON null value. By default, fields
  2890. // with empty values are omitted from API requests. However, any field
  2891. // with an empty value appearing in NullFields will be sent to the
  2892. // server as null. It is an error if a field in this list has a
  2893. // non-empty value. This may be used to include null fields in Patch
  2894. // requests.
  2895. NullFields []string `json:"-"`
  2896. }
  2897. func (s *VolumeSaleInfoOffersListPrice) MarshalJSON() ([]byte, error) {
  2898. type NoMethod VolumeSaleInfoOffersListPrice
  2899. raw := NoMethod(*s)
  2900. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2901. }
  2902. func (s *VolumeSaleInfoOffersListPrice) UnmarshalJSON(data []byte) error {
  2903. type NoMethod VolumeSaleInfoOffersListPrice
  2904. var s1 struct {
  2905. AmountInMicros gensupport.JSONFloat64 `json:"amountInMicros"`
  2906. *NoMethod
  2907. }
  2908. s1.NoMethod = (*NoMethod)(s)
  2909. if err := json.Unmarshal(data, &s1); err != nil {
  2910. return err
  2911. }
  2912. s.AmountInMicros = float64(s1.AmountInMicros)
  2913. return nil
  2914. }
  2915. // VolumeSaleInfoOffersRentalDuration: The rental duration (for rental
  2916. // offers only).
  2917. type VolumeSaleInfoOffersRentalDuration struct {
  2918. Count float64 `json:"count,omitempty"`
  2919. Unit string `json:"unit,omitempty"`
  2920. // ForceSendFields is a list of field names (e.g. "Count") to
  2921. // unconditionally include in API requests. By default, fields with
  2922. // empty values are omitted from API requests. However, any non-pointer,
  2923. // non-interface field appearing in ForceSendFields will be sent to the
  2924. // server regardless of whether the field is empty or not. This may be
  2925. // used to include empty fields in Patch requests.
  2926. ForceSendFields []string `json:"-"`
  2927. // NullFields is a list of field names (e.g. "Count") to include in API
  2928. // requests with the JSON null value. By default, fields with empty
  2929. // values are omitted from API requests. However, any field with an
  2930. // empty value appearing in NullFields will be sent to the server as
  2931. // null. It is an error if a field in this list has a non-empty value.
  2932. // This may be used to include null fields in Patch requests.
  2933. NullFields []string `json:"-"`
  2934. }
  2935. func (s *VolumeSaleInfoOffersRentalDuration) MarshalJSON() ([]byte, error) {
  2936. type NoMethod VolumeSaleInfoOffersRentalDuration
  2937. raw := NoMethod(*s)
  2938. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2939. }
  2940. func (s *VolumeSaleInfoOffersRentalDuration) UnmarshalJSON(data []byte) error {
  2941. type NoMethod VolumeSaleInfoOffersRentalDuration
  2942. var s1 struct {
  2943. Count gensupport.JSONFloat64 `json:"count"`
  2944. *NoMethod
  2945. }
  2946. s1.NoMethod = (*NoMethod)(s)
  2947. if err := json.Unmarshal(data, &s1); err != nil {
  2948. return err
  2949. }
  2950. s.Count = float64(s1.Count)
  2951. return nil
  2952. }
  2953. // VolumeSaleInfoOffersRetailPrice: Offer retail (=discounted) price in
  2954. // Micros
  2955. type VolumeSaleInfoOffersRetailPrice struct {
  2956. AmountInMicros float64 `json:"amountInMicros,omitempty"`
  2957. CurrencyCode string `json:"currencyCode,omitempty"`
  2958. // ForceSendFields is a list of field names (e.g. "AmountInMicros") to
  2959. // unconditionally include in API requests. By default, fields with
  2960. // empty values are omitted from API requests. However, any non-pointer,
  2961. // non-interface field appearing in ForceSendFields will be sent to the
  2962. // server regardless of whether the field is empty or not. This may be
  2963. // used to include empty fields in Patch requests.
  2964. ForceSendFields []string `json:"-"`
  2965. // NullFields is a list of field names (e.g. "AmountInMicros") to
  2966. // include in API requests with the JSON null value. By default, fields
  2967. // with empty values are omitted from API requests. However, any field
  2968. // with an empty value appearing in NullFields will be sent to the
  2969. // server as null. It is an error if a field in this list has a
  2970. // non-empty value. This may be used to include null fields in Patch
  2971. // requests.
  2972. NullFields []string `json:"-"`
  2973. }
  2974. func (s *VolumeSaleInfoOffersRetailPrice) MarshalJSON() ([]byte, error) {
  2975. type NoMethod VolumeSaleInfoOffersRetailPrice
  2976. raw := NoMethod(*s)
  2977. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2978. }
  2979. func (s *VolumeSaleInfoOffersRetailPrice) UnmarshalJSON(data []byte) error {
  2980. type NoMethod VolumeSaleInfoOffersRetailPrice
  2981. var s1 struct {
  2982. AmountInMicros gensupport.JSONFloat64 `json:"amountInMicros"`
  2983. *NoMethod
  2984. }
  2985. s1.NoMethod = (*NoMethod)(s)
  2986. if err := json.Unmarshal(data, &s1); err != nil {
  2987. return err
  2988. }
  2989. s.AmountInMicros = float64(s1.AmountInMicros)
  2990. return nil
  2991. }
  2992. // VolumeSaleInfoRetailPrice: The actual selling price of the book. This
  2993. // is the same as the suggested retail or list price unless there are
  2994. // offers or discounts on this volume. (In LITE projection.)
  2995. type VolumeSaleInfoRetailPrice struct {
  2996. // Amount: Amount in the currency listed below. (In LITE projection.)
  2997. Amount float64 `json:"amount,omitempty"`
  2998. // CurrencyCode: An ISO 4217, three-letter currency code. (In LITE
  2999. // projection.)
  3000. CurrencyCode string `json:"currencyCode,omitempty"`
  3001. // ForceSendFields is a list of field names (e.g. "Amount") to
  3002. // unconditionally include in API requests. By default, fields with
  3003. // empty values are omitted from API requests. However, any non-pointer,
  3004. // non-interface field appearing in ForceSendFields will be sent to the
  3005. // server regardless of whether the field is empty or not. This may be
  3006. // used to include empty fields in Patch requests.
  3007. ForceSendFields []string `json:"-"`
  3008. // NullFields is a list of field names (e.g. "Amount") to include in API
  3009. // requests with the JSON null value. By default, fields with empty
  3010. // values are omitted from API requests. However, any field with an
  3011. // empty value appearing in NullFields will be sent to the server as
  3012. // null. It is an error if a field in this list has a non-empty value.
  3013. // This may be used to include null fields in Patch requests.
  3014. NullFields []string `json:"-"`
  3015. }
  3016. func (s *VolumeSaleInfoRetailPrice) MarshalJSON() ([]byte, error) {
  3017. type NoMethod VolumeSaleInfoRetailPrice
  3018. raw := NoMethod(*s)
  3019. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3020. }
  3021. func (s *VolumeSaleInfoRetailPrice) UnmarshalJSON(data []byte) error {
  3022. type NoMethod VolumeSaleInfoRetailPrice
  3023. var s1 struct {
  3024. Amount gensupport.JSONFloat64 `json:"amount"`
  3025. *NoMethod
  3026. }
  3027. s1.NoMethod = (*NoMethod)(s)
  3028. if err := json.Unmarshal(data, &s1); err != nil {
  3029. return err
  3030. }
  3031. s.Amount = float64(s1.Amount)
  3032. return nil
  3033. }
  3034. // VolumeSearchInfo: Search result information related to this volume.
  3035. type VolumeSearchInfo struct {
  3036. // TextSnippet: A text snippet containing the search query.
  3037. TextSnippet string `json:"textSnippet,omitempty"`
  3038. // ForceSendFields is a list of field names (e.g. "TextSnippet") to
  3039. // unconditionally include in API requests. By default, fields with
  3040. // empty values are omitted from API requests. However, any non-pointer,
  3041. // non-interface field appearing in ForceSendFields will be sent to the
  3042. // server regardless of whether the field is empty or not. This may be
  3043. // used to include empty fields in Patch requests.
  3044. ForceSendFields []string `json:"-"`
  3045. // NullFields is a list of field names (e.g. "TextSnippet") to include
  3046. // in API requests with the JSON null value. By default, fields with
  3047. // empty values are omitted from API requests. However, any field with
  3048. // an empty value appearing in NullFields will be sent to the server as
  3049. // null. It is an error if a field in this list has a non-empty value.
  3050. // This may be used to include null fields in Patch requests.
  3051. NullFields []string `json:"-"`
  3052. }
  3053. func (s *VolumeSearchInfo) MarshalJSON() ([]byte, error) {
  3054. type NoMethod VolumeSearchInfo
  3055. raw := NoMethod(*s)
  3056. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3057. }
  3058. // VolumeUserInfo: User specific information related to this volume.
  3059. // (e.g. page this user last read or whether they purchased this book)
  3060. type VolumeUserInfo struct {
  3061. // AcquiredTime: Timestamp when this volume was acquired by the user.
  3062. // (RFC 3339 UTC date-time format) Acquiring includes purchase, user
  3063. // upload, receiving family sharing, etc.
  3064. AcquiredTime string `json:"acquiredTime,omitempty"`
  3065. // AcquisitionType: How this volume was acquired.
  3066. AcquisitionType int64 `json:"acquisitionType,omitempty"`
  3067. // Copy: Copy/Paste accounting information.
  3068. Copy *VolumeUserInfoCopy `json:"copy,omitempty"`
  3069. // EntitlementType: Whether this volume is purchased, sample, pd
  3070. // download etc.
  3071. EntitlementType int64 `json:"entitlementType,omitempty"`
  3072. // FamilySharing: Information on the ability to share with the family.
  3073. FamilySharing *VolumeUserInfoFamilySharing `json:"familySharing,omitempty"`
  3074. // IsFamilySharedFromUser: Whether or not the user shared this volume
  3075. // with the family.
  3076. IsFamilySharedFromUser bool `json:"isFamilySharedFromUser,omitempty"`
  3077. // IsFamilySharedToUser: Whether or not the user received this volume
  3078. // through family sharing.
  3079. IsFamilySharedToUser bool `json:"isFamilySharedToUser,omitempty"`
  3080. // IsFamilySharingAllowed: Deprecated: Replaced by familySharing.
  3081. IsFamilySharingAllowed bool `json:"isFamilySharingAllowed,omitempty"`
  3082. // IsFamilySharingDisabledByFop: Deprecated: Replaced by familySharing.
  3083. IsFamilySharingDisabledByFop bool `json:"isFamilySharingDisabledByFop,omitempty"`
  3084. // IsInMyBooks: Whether or not this volume is currently in "my books."
  3085. IsInMyBooks bool `json:"isInMyBooks,omitempty"`
  3086. // IsPreordered: Whether or not this volume was pre-ordered by the
  3087. // authenticated user making the request. (In LITE projection.)
  3088. IsPreordered bool `json:"isPreordered,omitempty"`
  3089. // IsPurchased: Whether or not this volume was purchased by the
  3090. // authenticated user making the request. (In LITE projection.)
  3091. IsPurchased bool `json:"isPurchased,omitempty"`
  3092. // IsUploaded: Whether or not this volume was user uploaded.
  3093. IsUploaded bool `json:"isUploaded,omitempty"`
  3094. // ReadingPosition: The user's current reading position in the volume,
  3095. // if one is available. (In LITE projection.)
  3096. ReadingPosition *ReadingPosition `json:"readingPosition,omitempty"`
  3097. // RentalPeriod: Period during this book is/was a valid rental.
  3098. RentalPeriod *VolumeUserInfoRentalPeriod `json:"rentalPeriod,omitempty"`
  3099. // RentalState: Whether this book is an active or an expired rental.
  3100. RentalState string `json:"rentalState,omitempty"`
  3101. // Review: This user's review of this volume, if one exists.
  3102. Review *Review `json:"review,omitempty"`
  3103. // Updated: Timestamp when this volume was last modified by a user
  3104. // action, such as a reading position update, volume purchase or writing
  3105. // a review. (RFC 3339 UTC date-time format).
  3106. Updated string `json:"updated,omitempty"`
  3107. UserUploadedVolumeInfo *VolumeUserInfoUserUploadedVolumeInfo `json:"userUploadedVolumeInfo,omitempty"`
  3108. // ForceSendFields is a list of field names (e.g. "AcquiredTime") to
  3109. // unconditionally include in API requests. By default, fields with
  3110. // empty values are omitted from API requests. However, any non-pointer,
  3111. // non-interface field appearing in ForceSendFields will be sent to the
  3112. // server regardless of whether the field is empty or not. This may be
  3113. // used to include empty fields in Patch requests.
  3114. ForceSendFields []string `json:"-"`
  3115. // NullFields is a list of field names (e.g. "AcquiredTime") to include
  3116. // in API requests with the JSON null value. By default, fields with
  3117. // empty values are omitted from API requests. However, any field with
  3118. // an empty value appearing in NullFields will be sent to the server as
  3119. // null. It is an error if a field in this list has a non-empty value.
  3120. // This may be used to include null fields in Patch requests.
  3121. NullFields []string `json:"-"`
  3122. }
  3123. func (s *VolumeUserInfo) MarshalJSON() ([]byte, error) {
  3124. type NoMethod VolumeUserInfo
  3125. raw := NoMethod(*s)
  3126. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3127. }
  3128. // VolumeUserInfoCopy: Copy/Paste accounting information.
  3129. type VolumeUserInfoCopy struct {
  3130. AllowedCharacterCount int64 `json:"allowedCharacterCount,omitempty"`
  3131. LimitType string `json:"limitType,omitempty"`
  3132. RemainingCharacterCount int64 `json:"remainingCharacterCount,omitempty"`
  3133. Updated string `json:"updated,omitempty"`
  3134. // ForceSendFields is a list of field names (e.g.
  3135. // "AllowedCharacterCount") to unconditionally include in API requests.
  3136. // By default, fields with empty values are omitted from API requests.
  3137. // However, any non-pointer, non-interface field appearing in
  3138. // ForceSendFields will be sent to the server regardless of whether the
  3139. // field is empty or not. This may be used to include empty fields in
  3140. // Patch requests.
  3141. ForceSendFields []string `json:"-"`
  3142. // NullFields is a list of field names (e.g. "AllowedCharacterCount") to
  3143. // include in API requests with the JSON null value. By default, fields
  3144. // with empty values are omitted from API requests. However, any field
  3145. // with an empty value appearing in NullFields will be sent to the
  3146. // server as null. It is an error if a field in this list has a
  3147. // non-empty value. This may be used to include null fields in Patch
  3148. // requests.
  3149. NullFields []string `json:"-"`
  3150. }
  3151. func (s *VolumeUserInfoCopy) MarshalJSON() ([]byte, error) {
  3152. type NoMethod VolumeUserInfoCopy
  3153. raw := NoMethod(*s)
  3154. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3155. }
  3156. // VolumeUserInfoFamilySharing: Information on the ability to share with
  3157. // the family.
  3158. type VolumeUserInfoFamilySharing struct {
  3159. // FamilyRole: The role of the user in the family.
  3160. FamilyRole string `json:"familyRole,omitempty"`
  3161. // IsSharingAllowed: Whether or not this volume can be shared with the
  3162. // family by the user. This includes sharing eligibility of both the
  3163. // volume and the user. If the value is true, the user can initiate a
  3164. // family sharing action.
  3165. IsSharingAllowed bool `json:"isSharingAllowed,omitempty"`
  3166. // IsSharingDisabledByFop: Whether or not sharing this volume is
  3167. // temporarily disabled due to issues with the Family Wallet.
  3168. IsSharingDisabledByFop bool `json:"isSharingDisabledByFop,omitempty"`
  3169. // ForceSendFields is a list of field names (e.g. "FamilyRole") to
  3170. // unconditionally include in API requests. By default, fields with
  3171. // empty values are omitted from API requests. However, any non-pointer,
  3172. // non-interface field appearing in ForceSendFields will be sent to the
  3173. // server regardless of whether the field is empty or not. This may be
  3174. // used to include empty fields in Patch requests.
  3175. ForceSendFields []string `json:"-"`
  3176. // NullFields is a list of field names (e.g. "FamilyRole") to include in
  3177. // API requests with the JSON null value. By default, fields with empty
  3178. // values are omitted from API requests. However, any field with an
  3179. // empty value appearing in NullFields will be sent to the server as
  3180. // null. It is an error if a field in this list has a non-empty value.
  3181. // This may be used to include null fields in Patch requests.
  3182. NullFields []string `json:"-"`
  3183. }
  3184. func (s *VolumeUserInfoFamilySharing) MarshalJSON() ([]byte, error) {
  3185. type NoMethod VolumeUserInfoFamilySharing
  3186. raw := NoMethod(*s)
  3187. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3188. }
  3189. // VolumeUserInfoRentalPeriod: Period during this book is/was a valid
  3190. // rental.
  3191. type VolumeUserInfoRentalPeriod struct {
  3192. EndUtcSec int64 `json:"endUtcSec,omitempty,string"`
  3193. StartUtcSec int64 `json:"startUtcSec,omitempty,string"`
  3194. // ForceSendFields is a list of field names (e.g. "EndUtcSec") to
  3195. // unconditionally include in API requests. By default, fields with
  3196. // empty values are omitted from API requests. However, any non-pointer,
  3197. // non-interface field appearing in ForceSendFields will be sent to the
  3198. // server regardless of whether the field is empty or not. This may be
  3199. // used to include empty fields in Patch requests.
  3200. ForceSendFields []string `json:"-"`
  3201. // NullFields is a list of field names (e.g. "EndUtcSec") to include in
  3202. // API requests with the JSON null value. By default, fields with empty
  3203. // values are omitted from API requests. However, any field with an
  3204. // empty value appearing in NullFields will be sent to the server as
  3205. // null. It is an error if a field in this list has a non-empty value.
  3206. // This may be used to include null fields in Patch requests.
  3207. NullFields []string `json:"-"`
  3208. }
  3209. func (s *VolumeUserInfoRentalPeriod) MarshalJSON() ([]byte, error) {
  3210. type NoMethod VolumeUserInfoRentalPeriod
  3211. raw := NoMethod(*s)
  3212. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3213. }
  3214. type VolumeUserInfoUserUploadedVolumeInfo struct {
  3215. ProcessingState string `json:"processingState,omitempty"`
  3216. // ForceSendFields is a list of field names (e.g. "ProcessingState") to
  3217. // unconditionally include in API requests. By default, fields with
  3218. // empty values are omitted from API requests. However, any non-pointer,
  3219. // non-interface field appearing in ForceSendFields will be sent to the
  3220. // server regardless of whether the field is empty or not. This may be
  3221. // used to include empty fields in Patch requests.
  3222. ForceSendFields []string `json:"-"`
  3223. // NullFields is a list of field names (e.g. "ProcessingState") to
  3224. // include in API requests with the JSON null value. By default, fields
  3225. // with empty values are omitted from API requests. However, any field
  3226. // with an empty value appearing in NullFields will be sent to the
  3227. // server as null. It is an error if a field in this list has a
  3228. // non-empty value. This may be used to include null fields in Patch
  3229. // requests.
  3230. NullFields []string `json:"-"`
  3231. }
  3232. func (s *VolumeUserInfoUserUploadedVolumeInfo) MarshalJSON() ([]byte, error) {
  3233. type NoMethod VolumeUserInfoUserUploadedVolumeInfo
  3234. raw := NoMethod(*s)
  3235. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3236. }
  3237. // VolumeVolumeInfo: General volume information.
  3238. type VolumeVolumeInfo struct {
  3239. // AllowAnonLogging: Whether anonymous logging should be allowed.
  3240. AllowAnonLogging bool `json:"allowAnonLogging,omitempty"`
  3241. // Authors: The names of the authors and/or editors for this volume. (In
  3242. // LITE projection)
  3243. Authors []string `json:"authors,omitempty"`
  3244. // AverageRating: The mean review rating for this volume. (min = 1.0,
  3245. // max = 5.0)
  3246. AverageRating float64 `json:"averageRating,omitempty"`
  3247. // CanonicalVolumeLink: Canonical URL for a volume. (In LITE
  3248. // projection.)
  3249. CanonicalVolumeLink string `json:"canonicalVolumeLink,omitempty"`
  3250. // Categories: A list of subject categories, such as "Fiction",
  3251. // "Suspense", etc.
  3252. Categories []string `json:"categories,omitempty"`
  3253. // ContentVersion: An identifier for the version of the volume content
  3254. // (text & images). (In LITE projection)
  3255. ContentVersion string `json:"contentVersion,omitempty"`
  3256. // Description: A synopsis of the volume. The text of the description is
  3257. // formatted in HTML and includes simple formatting elements, such as b,
  3258. // i, and br tags. (In LITE projection.)
  3259. Description string `json:"description,omitempty"`
  3260. // Dimensions: Physical dimensions of this volume.
  3261. Dimensions *VolumeVolumeInfoDimensions `json:"dimensions,omitempty"`
  3262. // ImageLinks: A list of image links for all the sizes that are
  3263. // available. (In LITE projection.)
  3264. ImageLinks *VolumeVolumeInfoImageLinks `json:"imageLinks,omitempty"`
  3265. // IndustryIdentifiers: Industry standard identifiers for this volume.
  3266. IndustryIdentifiers []*VolumeVolumeInfoIndustryIdentifiers `json:"industryIdentifiers,omitempty"`
  3267. // InfoLink: URL to view information about this volume on the Google
  3268. // Books site. (In LITE projection)
  3269. InfoLink string `json:"infoLink,omitempty"`
  3270. // Language: Best language for this volume (based on content). It is the
  3271. // two-letter ISO 639-1 code such as 'fr', 'en', etc.
  3272. Language string `json:"language,omitempty"`
  3273. // MainCategory: The main category to which this volume belongs. It will
  3274. // be the category from the categories list returned below that has the
  3275. // highest weight.
  3276. MainCategory string `json:"mainCategory,omitempty"`
  3277. MaturityRating string `json:"maturityRating,omitempty"`
  3278. // PageCount: Total number of pages as per publisher metadata.
  3279. PageCount int64 `json:"pageCount,omitempty"`
  3280. // PanelizationSummary: A top-level summary of the panelization info in
  3281. // this volume.
  3282. PanelizationSummary *VolumeVolumeInfoPanelizationSummary `json:"panelizationSummary,omitempty"`
  3283. // PreviewLink: URL to preview this volume on the Google Books site.
  3284. PreviewLink string `json:"previewLink,omitempty"`
  3285. // PrintType: Type of publication of this volume. Possible values are
  3286. // BOOK or MAGAZINE.
  3287. PrintType string `json:"printType,omitempty"`
  3288. // PrintedPageCount: Total number of printed pages in generated pdf
  3289. // representation.
  3290. PrintedPageCount int64 `json:"printedPageCount,omitempty"`
  3291. // PublishedDate: Date of publication. (In LITE projection.)
  3292. PublishedDate string `json:"publishedDate,omitempty"`
  3293. // Publisher: Publisher of this volume. (In LITE projection.)
  3294. Publisher string `json:"publisher,omitempty"`
  3295. // RatingsCount: The number of review ratings for this volume.
  3296. RatingsCount int64 `json:"ratingsCount,omitempty"`
  3297. // ReadingModes: The reading modes available for this volume.
  3298. ReadingModes interface{} `json:"readingModes,omitempty"`
  3299. // SamplePageCount: Total number of sample pages as per publisher
  3300. // metadata.
  3301. SamplePageCount int64 `json:"samplePageCount,omitempty"`
  3302. SeriesInfo *Volumeseriesinfo `json:"seriesInfo,omitempty"`
  3303. // Subtitle: Volume subtitle. (In LITE projection.)
  3304. Subtitle string `json:"subtitle,omitempty"`
  3305. // Title: Volume title. (In LITE projection.)
  3306. Title string `json:"title,omitempty"`
  3307. // ForceSendFields is a list of field names (e.g. "AllowAnonLogging") to
  3308. // unconditionally include in API requests. By default, fields with
  3309. // empty values are omitted from API requests. However, any non-pointer,
  3310. // non-interface field appearing in ForceSendFields will be sent to the
  3311. // server regardless of whether the field is empty or not. This may be
  3312. // used to include empty fields in Patch requests.
  3313. ForceSendFields []string `json:"-"`
  3314. // NullFields is a list of field names (e.g. "AllowAnonLogging") to
  3315. // include in API requests with the JSON null value. By default, fields
  3316. // with empty values are omitted from API requests. However, any field
  3317. // with an empty value appearing in NullFields will be sent to the
  3318. // server as null. It is an error if a field in this list has a
  3319. // non-empty value. This may be used to include null fields in Patch
  3320. // requests.
  3321. NullFields []string `json:"-"`
  3322. }
  3323. func (s *VolumeVolumeInfo) MarshalJSON() ([]byte, error) {
  3324. type NoMethod VolumeVolumeInfo
  3325. raw := NoMethod(*s)
  3326. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3327. }
  3328. func (s *VolumeVolumeInfo) UnmarshalJSON(data []byte) error {
  3329. type NoMethod VolumeVolumeInfo
  3330. var s1 struct {
  3331. AverageRating gensupport.JSONFloat64 `json:"averageRating"`
  3332. *NoMethod
  3333. }
  3334. s1.NoMethod = (*NoMethod)(s)
  3335. if err := json.Unmarshal(data, &s1); err != nil {
  3336. return err
  3337. }
  3338. s.AverageRating = float64(s1.AverageRating)
  3339. return nil
  3340. }
  3341. // VolumeVolumeInfoDimensions: Physical dimensions of this volume.
  3342. type VolumeVolumeInfoDimensions struct {
  3343. // Height: Height or length of this volume (in cm).
  3344. Height string `json:"height,omitempty"`
  3345. // Thickness: Thickness of this volume (in cm).
  3346. Thickness string `json:"thickness,omitempty"`
  3347. // Width: Width of this volume (in cm).
  3348. Width string `json:"width,omitempty"`
  3349. // ForceSendFields is a list of field names (e.g. "Height") to
  3350. // unconditionally include in API requests. By default, fields with
  3351. // empty values are omitted from API requests. However, any non-pointer,
  3352. // non-interface field appearing in ForceSendFields will be sent to the
  3353. // server regardless of whether the field is empty or not. This may be
  3354. // used to include empty fields in Patch requests.
  3355. ForceSendFields []string `json:"-"`
  3356. // NullFields is a list of field names (e.g. "Height") to include in API
  3357. // requests with the JSON null value. By default, fields with empty
  3358. // values are omitted from API requests. However, any field with an
  3359. // empty value appearing in NullFields will be sent to the server as
  3360. // null. It is an error if a field in this list has a non-empty value.
  3361. // This may be used to include null fields in Patch requests.
  3362. NullFields []string `json:"-"`
  3363. }
  3364. func (s *VolumeVolumeInfoDimensions) MarshalJSON() ([]byte, error) {
  3365. type NoMethod VolumeVolumeInfoDimensions
  3366. raw := NoMethod(*s)
  3367. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3368. }
  3369. // VolumeVolumeInfoImageLinks: A list of image links for all the sizes
  3370. // that are available. (In LITE projection.)
  3371. type VolumeVolumeInfoImageLinks struct {
  3372. // ExtraLarge: Image link for extra large size (width of ~1280 pixels).
  3373. // (In LITE projection)
  3374. ExtraLarge string `json:"extraLarge,omitempty"`
  3375. // Large: Image link for large size (width of ~800 pixels). (In LITE
  3376. // projection)
  3377. Large string `json:"large,omitempty"`
  3378. // Medium: Image link for medium size (width of ~575 pixels). (In LITE
  3379. // projection)
  3380. Medium string `json:"medium,omitempty"`
  3381. // Small: Image link for small size (width of ~300 pixels). (In LITE
  3382. // projection)
  3383. Small string `json:"small,omitempty"`
  3384. // SmallThumbnail: Image link for small thumbnail size (width of ~80
  3385. // pixels). (In LITE projection)
  3386. SmallThumbnail string `json:"smallThumbnail,omitempty"`
  3387. // Thumbnail: Image link for thumbnail size (width of ~128 pixels). (In
  3388. // LITE projection)
  3389. Thumbnail string `json:"thumbnail,omitempty"`
  3390. // ForceSendFields is a list of field names (e.g. "ExtraLarge") to
  3391. // unconditionally include in API requests. By default, fields with
  3392. // empty values are omitted from API requests. However, any non-pointer,
  3393. // non-interface field appearing in ForceSendFields will be sent to the
  3394. // server regardless of whether the field is empty or not. This may be
  3395. // used to include empty fields in Patch requests.
  3396. ForceSendFields []string `json:"-"`
  3397. // NullFields is a list of field names (e.g. "ExtraLarge") to include in
  3398. // API requests with the JSON null value. By default, fields with empty
  3399. // values are omitted from API requests. However, any field with an
  3400. // empty value appearing in NullFields will be sent to the server as
  3401. // null. It is an error if a field in this list has a non-empty value.
  3402. // This may be used to include null fields in Patch requests.
  3403. NullFields []string `json:"-"`
  3404. }
  3405. func (s *VolumeVolumeInfoImageLinks) MarshalJSON() ([]byte, error) {
  3406. type NoMethod VolumeVolumeInfoImageLinks
  3407. raw := NoMethod(*s)
  3408. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3409. }
  3410. type VolumeVolumeInfoIndustryIdentifiers struct {
  3411. // Identifier: Industry specific volume identifier.
  3412. Identifier string `json:"identifier,omitempty"`
  3413. // Type: Identifier type. Possible values are ISBN_10, ISBN_13, ISSN and
  3414. // OTHER.
  3415. Type string `json:"type,omitempty"`
  3416. // ForceSendFields is a list of field names (e.g. "Identifier") to
  3417. // unconditionally include in API requests. By default, fields with
  3418. // empty values are omitted from API requests. However, any non-pointer,
  3419. // non-interface field appearing in ForceSendFields will be sent to the
  3420. // server regardless of whether the field is empty or not. This may be
  3421. // used to include empty fields in Patch requests.
  3422. ForceSendFields []string `json:"-"`
  3423. // NullFields is a list of field names (e.g. "Identifier") to include in
  3424. // API requests with the JSON null value. By default, fields with empty
  3425. // values are omitted from API requests. However, any field with an
  3426. // empty value appearing in NullFields will be sent to the server as
  3427. // null. It is an error if a field in this list has a non-empty value.
  3428. // This may be used to include null fields in Patch requests.
  3429. NullFields []string `json:"-"`
  3430. }
  3431. func (s *VolumeVolumeInfoIndustryIdentifiers) MarshalJSON() ([]byte, error) {
  3432. type NoMethod VolumeVolumeInfoIndustryIdentifiers
  3433. raw := NoMethod(*s)
  3434. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3435. }
  3436. // VolumeVolumeInfoPanelizationSummary: A top-level summary of the
  3437. // panelization info in this volume.
  3438. type VolumeVolumeInfoPanelizationSummary struct {
  3439. ContainsEpubBubbles bool `json:"containsEpubBubbles,omitempty"`
  3440. ContainsImageBubbles bool `json:"containsImageBubbles,omitempty"`
  3441. EpubBubbleVersion string `json:"epubBubbleVersion,omitempty"`
  3442. ImageBubbleVersion string `json:"imageBubbleVersion,omitempty"`
  3443. // ForceSendFields is a list of field names (e.g. "ContainsEpubBubbles")
  3444. // to unconditionally include in API requests. By default, fields with
  3445. // empty values are omitted from API requests. However, any non-pointer,
  3446. // non-interface field appearing in ForceSendFields will be sent to the
  3447. // server regardless of whether the field is empty or not. This may be
  3448. // used to include empty fields in Patch requests.
  3449. ForceSendFields []string `json:"-"`
  3450. // NullFields is a list of field names (e.g. "ContainsEpubBubbles") to
  3451. // include in API requests with the JSON null value. By default, fields
  3452. // with empty values are omitted from API requests. However, any field
  3453. // with an empty value appearing in NullFields will be sent to the
  3454. // server as null. It is an error if a field in this list has a
  3455. // non-empty value. This may be used to include null fields in Patch
  3456. // requests.
  3457. NullFields []string `json:"-"`
  3458. }
  3459. func (s *VolumeVolumeInfoPanelizationSummary) MarshalJSON() ([]byte, error) {
  3460. type NoMethod VolumeVolumeInfoPanelizationSummary
  3461. raw := NoMethod(*s)
  3462. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3463. }
  3464. type Volume2 struct {
  3465. // Items: A list of volumes.
  3466. Items []*Volume `json:"items,omitempty"`
  3467. // Kind: Resource type.
  3468. Kind string `json:"kind,omitempty"`
  3469. NextPageToken string `json:"nextPageToken,omitempty"`
  3470. // ServerResponse contains the HTTP response code and headers from the
  3471. // server.
  3472. googleapi.ServerResponse `json:"-"`
  3473. // ForceSendFields is a list of field names (e.g. "Items") to
  3474. // unconditionally include in API requests. By default, fields with
  3475. // empty values are omitted from API requests. However, any non-pointer,
  3476. // non-interface field appearing in ForceSendFields will be sent to the
  3477. // server regardless of whether the field is empty or not. This may be
  3478. // used to include empty fields in Patch requests.
  3479. ForceSendFields []string `json:"-"`
  3480. // NullFields is a list of field names (e.g. "Items") to include in API
  3481. // requests with the JSON null value. By default, fields with empty
  3482. // values are omitted from API requests. However, any field with an
  3483. // empty value appearing in NullFields will be sent to the server as
  3484. // null. It is an error if a field in this list has a non-empty value.
  3485. // This may be used to include null fields in Patch requests.
  3486. NullFields []string `json:"-"`
  3487. }
  3488. func (s *Volume2) MarshalJSON() ([]byte, error) {
  3489. type NoMethod Volume2
  3490. raw := NoMethod(*s)
  3491. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3492. }
  3493. type Volumeannotation struct {
  3494. // AnnotationDataId: The annotation data id for this volume annotation.
  3495. AnnotationDataId string `json:"annotationDataId,omitempty"`
  3496. // AnnotationDataLink: Link to get data for this annotation.
  3497. AnnotationDataLink string `json:"annotationDataLink,omitempty"`
  3498. // AnnotationType: The type of annotation this is.
  3499. AnnotationType string `json:"annotationType,omitempty"`
  3500. // ContentRanges: The content ranges to identify the selected text.
  3501. ContentRanges *VolumeannotationContentRanges `json:"contentRanges,omitempty"`
  3502. // Data: Data for this annotation.
  3503. Data string `json:"data,omitempty"`
  3504. // Deleted: Indicates that this annotation is deleted.
  3505. Deleted bool `json:"deleted,omitempty"`
  3506. // Id: Unique id of this volume annotation.
  3507. Id string `json:"id,omitempty"`
  3508. // Kind: Resource Type
  3509. Kind string `json:"kind,omitempty"`
  3510. // LayerId: The Layer this annotation is for.
  3511. LayerId string `json:"layerId,omitempty"`
  3512. // PageIds: Pages the annotation spans.
  3513. PageIds []string `json:"pageIds,omitempty"`
  3514. // SelectedText: Excerpt from the volume.
  3515. SelectedText string `json:"selectedText,omitempty"`
  3516. // SelfLink: URL to this resource.
  3517. SelfLink string `json:"selfLink,omitempty"`
  3518. // Updated: Timestamp for the last time this anntoation was updated.
  3519. // (RFC 3339 UTC date-time format).
  3520. Updated string `json:"updated,omitempty"`
  3521. // VolumeId: The Volume this annotation is for.
  3522. VolumeId string `json:"volumeId,omitempty"`
  3523. // ServerResponse contains the HTTP response code and headers from the
  3524. // server.
  3525. googleapi.ServerResponse `json:"-"`
  3526. // ForceSendFields is a list of field names (e.g. "AnnotationDataId") to
  3527. // unconditionally include in API requests. By default, fields with
  3528. // empty values are omitted from API requests. However, any non-pointer,
  3529. // non-interface field appearing in ForceSendFields will be sent to the
  3530. // server regardless of whether the field is empty or not. This may be
  3531. // used to include empty fields in Patch requests.
  3532. ForceSendFields []string `json:"-"`
  3533. // NullFields is a list of field names (e.g. "AnnotationDataId") to
  3534. // include in API requests with the JSON null value. By default, fields
  3535. // with empty values are omitted from API requests. However, any field
  3536. // with an empty value appearing in NullFields will be sent to the
  3537. // server as null. It is an error if a field in this list has a
  3538. // non-empty value. This may be used to include null fields in Patch
  3539. // requests.
  3540. NullFields []string `json:"-"`
  3541. }
  3542. func (s *Volumeannotation) MarshalJSON() ([]byte, error) {
  3543. type NoMethod Volumeannotation
  3544. raw := NoMethod(*s)
  3545. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3546. }
  3547. // VolumeannotationContentRanges: The content ranges to identify the
  3548. // selected text.
  3549. type VolumeannotationContentRanges struct {
  3550. // CfiRange: Range in CFI format for this annotation for version above.
  3551. CfiRange *BooksAnnotationsRange `json:"cfiRange,omitempty"`
  3552. // ContentVersion: Content version applicable to ranges below.
  3553. ContentVersion string `json:"contentVersion,omitempty"`
  3554. // GbImageRange: Range in GB image format for this annotation for
  3555. // version above.
  3556. GbImageRange *BooksAnnotationsRange `json:"gbImageRange,omitempty"`
  3557. // GbTextRange: Range in GB text format for this annotation for version
  3558. // above.
  3559. GbTextRange *BooksAnnotationsRange `json:"gbTextRange,omitempty"`
  3560. // ForceSendFields is a list of field names (e.g. "CfiRange") to
  3561. // unconditionally include in API requests. By default, fields with
  3562. // empty values are omitted from API requests. However, any non-pointer,
  3563. // non-interface field appearing in ForceSendFields will be sent to the
  3564. // server regardless of whether the field is empty or not. This may be
  3565. // used to include empty fields in Patch requests.
  3566. ForceSendFields []string `json:"-"`
  3567. // NullFields is a list of field names (e.g. "CfiRange") to include in
  3568. // API requests with the JSON null value. By default, fields with empty
  3569. // values are omitted from API requests. However, any field with an
  3570. // empty value appearing in NullFields will be sent to the server as
  3571. // null. It is an error if a field in this list has a non-empty value.
  3572. // This may be used to include null fields in Patch requests.
  3573. NullFields []string `json:"-"`
  3574. }
  3575. func (s *VolumeannotationContentRanges) MarshalJSON() ([]byte, error) {
  3576. type NoMethod VolumeannotationContentRanges
  3577. raw := NoMethod(*s)
  3578. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3579. }
  3580. type Volumeannotations struct {
  3581. // Items: A list of volume annotations.
  3582. Items []*Volumeannotation `json:"items,omitempty"`
  3583. // Kind: Resource type
  3584. Kind string `json:"kind,omitempty"`
  3585. // NextPageToken: Token to pass in for pagination for the next page.
  3586. // This will not be present if this request does not have more results.
  3587. NextPageToken string `json:"nextPageToken,omitempty"`
  3588. // TotalItems: The total number of volume annotations found.
  3589. TotalItems int64 `json:"totalItems,omitempty"`
  3590. // Version: The version string for all of the volume annotations in this
  3591. // layer (not just the ones in this response). Note: the version string
  3592. // doesn't apply to the annotation data, just the information in this
  3593. // response (e.g. the location of annotations in the book).
  3594. Version string `json:"version,omitempty"`
  3595. // ServerResponse contains the HTTP response code and headers from the
  3596. // server.
  3597. googleapi.ServerResponse `json:"-"`
  3598. // ForceSendFields is a list of field names (e.g. "Items") to
  3599. // unconditionally include in API requests. By default, fields with
  3600. // empty values are omitted from API requests. However, any non-pointer,
  3601. // non-interface field appearing in ForceSendFields will be sent to the
  3602. // server regardless of whether the field is empty or not. This may be
  3603. // used to include empty fields in Patch requests.
  3604. ForceSendFields []string `json:"-"`
  3605. // NullFields is a list of field names (e.g. "Items") to include in API
  3606. // requests with the JSON null value. By default, fields with empty
  3607. // values are omitted from API requests. However, any field with an
  3608. // empty value appearing in NullFields will be sent to the server as
  3609. // null. It is an error if a field in this list has a non-empty value.
  3610. // This may be used to include null fields in Patch requests.
  3611. NullFields []string `json:"-"`
  3612. }
  3613. func (s *Volumeannotations) MarshalJSON() ([]byte, error) {
  3614. type NoMethod Volumeannotations
  3615. raw := NoMethod(*s)
  3616. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3617. }
  3618. type Volumes struct {
  3619. // Items: A list of volumes.
  3620. Items []*Volume `json:"items,omitempty"`
  3621. // Kind: Resource type.
  3622. Kind string `json:"kind,omitempty"`
  3623. // TotalItems: Total number of volumes found. This might be greater than
  3624. // the number of volumes returned in this response if results have been
  3625. // paginated.
  3626. TotalItems int64 `json:"totalItems,omitempty"`
  3627. // ServerResponse contains the HTTP response code and headers from the
  3628. // server.
  3629. googleapi.ServerResponse `json:"-"`
  3630. // ForceSendFields is a list of field names (e.g. "Items") to
  3631. // unconditionally include in API requests. By default, fields with
  3632. // empty values are omitted from API requests. However, any non-pointer,
  3633. // non-interface field appearing in ForceSendFields will be sent to the
  3634. // server regardless of whether the field is empty or not. This may be
  3635. // used to include empty fields in Patch requests.
  3636. ForceSendFields []string `json:"-"`
  3637. // NullFields is a list of field names (e.g. "Items") to include in API
  3638. // requests with the JSON null value. By default, fields with empty
  3639. // values are omitted from API requests. However, any field with an
  3640. // empty value appearing in NullFields will be sent to the server as
  3641. // null. It is an error if a field in this list has a non-empty value.
  3642. // This may be used to include null fields in Patch requests.
  3643. NullFields []string `json:"-"`
  3644. }
  3645. func (s *Volumes) MarshalJSON() ([]byte, error) {
  3646. type NoMethod Volumes
  3647. raw := NoMethod(*s)
  3648. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3649. }
  3650. type Volumeseriesinfo struct {
  3651. // BookDisplayNumber: The display number string. This should be used
  3652. // only for display purposes and the actual sequence should be inferred
  3653. // from the below orderNumber.
  3654. BookDisplayNumber string `json:"bookDisplayNumber,omitempty"`
  3655. // Kind: Resource type.
  3656. Kind string `json:"kind,omitempty"`
  3657. // ShortSeriesBookTitle: Short book title in the context of the series.
  3658. ShortSeriesBookTitle string `json:"shortSeriesBookTitle,omitempty"`
  3659. VolumeSeries []*VolumeseriesinfoVolumeSeries `json:"volumeSeries,omitempty"`
  3660. // ForceSendFields is a list of field names (e.g. "BookDisplayNumber")
  3661. // to unconditionally include in API requests. By default, fields with
  3662. // empty values are omitted from API requests. However, any non-pointer,
  3663. // non-interface field appearing in ForceSendFields will be sent to the
  3664. // server regardless of whether the field is empty or not. This may be
  3665. // used to include empty fields in Patch requests.
  3666. ForceSendFields []string `json:"-"`
  3667. // NullFields is a list of field names (e.g. "BookDisplayNumber") to
  3668. // include in API requests with the JSON null value. By default, fields
  3669. // with empty values are omitted from API requests. However, any field
  3670. // with an empty value appearing in NullFields will be sent to the
  3671. // server as null. It is an error if a field in this list has a
  3672. // non-empty value. This may be used to include null fields in Patch
  3673. // requests.
  3674. NullFields []string `json:"-"`
  3675. }
  3676. func (s *Volumeseriesinfo) MarshalJSON() ([]byte, error) {
  3677. type NoMethod Volumeseriesinfo
  3678. raw := NoMethod(*s)
  3679. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3680. }
  3681. type VolumeseriesinfoVolumeSeries struct {
  3682. // Issue: List of issues. Applicable only for Collection Edition and
  3683. // Omnibus.
  3684. Issue []*VolumeseriesinfoVolumeSeriesIssue `json:"issue,omitempty"`
  3685. // OrderNumber: The book order number in the series.
  3686. OrderNumber int64 `json:"orderNumber,omitempty"`
  3687. // SeriesBookType: The book type in the context of series. Examples -
  3688. // Single Issue, Collection Edition, etc.
  3689. SeriesBookType string `json:"seriesBookType,omitempty"`
  3690. // SeriesId: The series id.
  3691. SeriesId string `json:"seriesId,omitempty"`
  3692. // ForceSendFields is a list of field names (e.g. "Issue") to
  3693. // unconditionally include in API requests. By default, fields with
  3694. // empty values are omitted from API requests. However, any non-pointer,
  3695. // non-interface field appearing in ForceSendFields will be sent to the
  3696. // server regardless of whether the field is empty or not. This may be
  3697. // used to include empty fields in Patch requests.
  3698. ForceSendFields []string `json:"-"`
  3699. // NullFields is a list of field names (e.g. "Issue") to include in API
  3700. // requests with the JSON null value. By default, fields with empty
  3701. // values are omitted from API requests. However, any field with an
  3702. // empty value appearing in NullFields will be sent to the server as
  3703. // null. It is an error if a field in this list has a non-empty value.
  3704. // This may be used to include null fields in Patch requests.
  3705. NullFields []string `json:"-"`
  3706. }
  3707. func (s *VolumeseriesinfoVolumeSeries) MarshalJSON() ([]byte, error) {
  3708. type NoMethod VolumeseriesinfoVolumeSeries
  3709. raw := NoMethod(*s)
  3710. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3711. }
  3712. type VolumeseriesinfoVolumeSeriesIssue struct {
  3713. IssueDisplayNumber string `json:"issueDisplayNumber,omitempty"`
  3714. IssueOrderNumber int64 `json:"issueOrderNumber,omitempty"`
  3715. // ForceSendFields is a list of field names (e.g. "IssueDisplayNumber")
  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. "IssueDisplayNumber") 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 *VolumeseriesinfoVolumeSeriesIssue) MarshalJSON() ([]byte, error) {
  3732. type NoMethod VolumeseriesinfoVolumeSeriesIssue
  3733. raw := NoMethod(*s)
  3734. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3735. }
  3736. // method id "books.bookshelves.get":
  3737. type BookshelvesGetCall struct {
  3738. s *Service
  3739. userId string
  3740. shelf string
  3741. urlParams_ gensupport.URLParams
  3742. ifNoneMatch_ string
  3743. ctx_ context.Context
  3744. header_ http.Header
  3745. }
  3746. // Get: Retrieves metadata for a specific bookshelf for the specified
  3747. // user.
  3748. func (r *BookshelvesService) Get(userId string, shelf string) *BookshelvesGetCall {
  3749. c := &BookshelvesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3750. c.userId = userId
  3751. c.shelf = shelf
  3752. return c
  3753. }
  3754. // Source sets the optional parameter "source": String to identify the
  3755. // originator of this request.
  3756. func (c *BookshelvesGetCall) Source(source string) *BookshelvesGetCall {
  3757. c.urlParams_.Set("source", source)
  3758. return c
  3759. }
  3760. // Fields allows partial responses to be retrieved. See
  3761. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3762. // for more information.
  3763. func (c *BookshelvesGetCall) Fields(s ...googleapi.Field) *BookshelvesGetCall {
  3764. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3765. return c
  3766. }
  3767. // IfNoneMatch sets the optional parameter which makes the operation
  3768. // fail if the object's ETag matches the given value. This is useful for
  3769. // getting updates only after the object has changed since the last
  3770. // request. Use googleapi.IsNotModified to check whether the response
  3771. // error from Do is the result of In-None-Match.
  3772. func (c *BookshelvesGetCall) IfNoneMatch(entityTag string) *BookshelvesGetCall {
  3773. c.ifNoneMatch_ = entityTag
  3774. return c
  3775. }
  3776. // Context sets the context to be used in this call's Do method. Any
  3777. // pending HTTP request will be aborted if the provided context is
  3778. // canceled.
  3779. func (c *BookshelvesGetCall) Context(ctx context.Context) *BookshelvesGetCall {
  3780. c.ctx_ = ctx
  3781. return c
  3782. }
  3783. // Header returns an http.Header that can be modified by the caller to
  3784. // add HTTP headers to the request.
  3785. func (c *BookshelvesGetCall) Header() http.Header {
  3786. if c.header_ == nil {
  3787. c.header_ = make(http.Header)
  3788. }
  3789. return c.header_
  3790. }
  3791. func (c *BookshelvesGetCall) doRequest(alt string) (*http.Response, error) {
  3792. reqHeaders := make(http.Header)
  3793. for k, v := range c.header_ {
  3794. reqHeaders[k] = v
  3795. }
  3796. reqHeaders.Set("User-Agent", c.s.userAgent())
  3797. if c.ifNoneMatch_ != "" {
  3798. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3799. }
  3800. var body io.Reader = nil
  3801. c.urlParams_.Set("alt", alt)
  3802. urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}/bookshelves/{shelf}")
  3803. urls += "?" + c.urlParams_.Encode()
  3804. req, _ := http.NewRequest("GET", urls, body)
  3805. req.Header = reqHeaders
  3806. googleapi.Expand(req.URL, map[string]string{
  3807. "userId": c.userId,
  3808. "shelf": c.shelf,
  3809. })
  3810. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3811. }
  3812. // Do executes the "books.bookshelves.get" call.
  3813. // Exactly one of *Bookshelf or error will be non-nil. Any non-2xx
  3814. // status code is an error. Response headers are in either
  3815. // *Bookshelf.ServerResponse.Header or (if a response was returned at
  3816. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3817. // to check whether the returned error was because
  3818. // http.StatusNotModified was returned.
  3819. func (c *BookshelvesGetCall) Do(opts ...googleapi.CallOption) (*Bookshelf, error) {
  3820. gensupport.SetOptions(c.urlParams_, opts...)
  3821. res, err := c.doRequest("json")
  3822. if res != nil && res.StatusCode == http.StatusNotModified {
  3823. if res.Body != nil {
  3824. res.Body.Close()
  3825. }
  3826. return nil, &googleapi.Error{
  3827. Code: res.StatusCode,
  3828. Header: res.Header,
  3829. }
  3830. }
  3831. if err != nil {
  3832. return nil, err
  3833. }
  3834. defer googleapi.CloseBody(res)
  3835. if err := googleapi.CheckResponse(res); err != nil {
  3836. return nil, err
  3837. }
  3838. ret := &Bookshelf{
  3839. ServerResponse: googleapi.ServerResponse{
  3840. Header: res.Header,
  3841. HTTPStatusCode: res.StatusCode,
  3842. },
  3843. }
  3844. target := &ret
  3845. if err := gensupport.DecodeResponse(target, res); err != nil {
  3846. return nil, err
  3847. }
  3848. return ret, nil
  3849. // {
  3850. // "description": "Retrieves metadata for a specific bookshelf for the specified user.",
  3851. // "httpMethod": "GET",
  3852. // "id": "books.bookshelves.get",
  3853. // "parameterOrder": [
  3854. // "userId",
  3855. // "shelf"
  3856. // ],
  3857. // "parameters": {
  3858. // "shelf": {
  3859. // "description": "ID of bookshelf to retrieve.",
  3860. // "location": "path",
  3861. // "required": true,
  3862. // "type": "string"
  3863. // },
  3864. // "source": {
  3865. // "description": "String to identify the originator of this request.",
  3866. // "location": "query",
  3867. // "type": "string"
  3868. // },
  3869. // "userId": {
  3870. // "description": "ID of user for whom to retrieve bookshelves.",
  3871. // "location": "path",
  3872. // "required": true,
  3873. // "type": "string"
  3874. // }
  3875. // },
  3876. // "path": "users/{userId}/bookshelves/{shelf}",
  3877. // "response": {
  3878. // "$ref": "Bookshelf"
  3879. // },
  3880. // "scopes": [
  3881. // "https://www.googleapis.com/auth/books"
  3882. // ]
  3883. // }
  3884. }
  3885. // method id "books.bookshelves.list":
  3886. type BookshelvesListCall struct {
  3887. s *Service
  3888. userId string
  3889. urlParams_ gensupport.URLParams
  3890. ifNoneMatch_ string
  3891. ctx_ context.Context
  3892. header_ http.Header
  3893. }
  3894. // List: Retrieves a list of public bookshelves for the specified user.
  3895. func (r *BookshelvesService) List(userId string) *BookshelvesListCall {
  3896. c := &BookshelvesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3897. c.userId = userId
  3898. return c
  3899. }
  3900. // Source sets the optional parameter "source": String to identify the
  3901. // originator of this request.
  3902. func (c *BookshelvesListCall) Source(source string) *BookshelvesListCall {
  3903. c.urlParams_.Set("source", source)
  3904. return c
  3905. }
  3906. // Fields allows partial responses to be retrieved. See
  3907. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3908. // for more information.
  3909. func (c *BookshelvesListCall) Fields(s ...googleapi.Field) *BookshelvesListCall {
  3910. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3911. return c
  3912. }
  3913. // IfNoneMatch sets the optional parameter which makes the operation
  3914. // fail if the object's ETag matches the given value. This is useful for
  3915. // getting updates only after the object has changed since the last
  3916. // request. Use googleapi.IsNotModified to check whether the response
  3917. // error from Do is the result of In-None-Match.
  3918. func (c *BookshelvesListCall) IfNoneMatch(entityTag string) *BookshelvesListCall {
  3919. c.ifNoneMatch_ = entityTag
  3920. return c
  3921. }
  3922. // Context sets the context to be used in this call's Do method. Any
  3923. // pending HTTP request will be aborted if the provided context is
  3924. // canceled.
  3925. func (c *BookshelvesListCall) Context(ctx context.Context) *BookshelvesListCall {
  3926. c.ctx_ = ctx
  3927. return c
  3928. }
  3929. // Header returns an http.Header that can be modified by the caller to
  3930. // add HTTP headers to the request.
  3931. func (c *BookshelvesListCall) Header() http.Header {
  3932. if c.header_ == nil {
  3933. c.header_ = make(http.Header)
  3934. }
  3935. return c.header_
  3936. }
  3937. func (c *BookshelvesListCall) doRequest(alt string) (*http.Response, error) {
  3938. reqHeaders := make(http.Header)
  3939. for k, v := range c.header_ {
  3940. reqHeaders[k] = v
  3941. }
  3942. reqHeaders.Set("User-Agent", c.s.userAgent())
  3943. if c.ifNoneMatch_ != "" {
  3944. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3945. }
  3946. var body io.Reader = nil
  3947. c.urlParams_.Set("alt", alt)
  3948. urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}/bookshelves")
  3949. urls += "?" + c.urlParams_.Encode()
  3950. req, _ := http.NewRequest("GET", urls, body)
  3951. req.Header = reqHeaders
  3952. googleapi.Expand(req.URL, map[string]string{
  3953. "userId": c.userId,
  3954. })
  3955. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3956. }
  3957. // Do executes the "books.bookshelves.list" call.
  3958. // Exactly one of *Bookshelves or error will be non-nil. Any non-2xx
  3959. // status code is an error. Response headers are in either
  3960. // *Bookshelves.ServerResponse.Header or (if a response was returned at
  3961. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3962. // to check whether the returned error was because
  3963. // http.StatusNotModified was returned.
  3964. func (c *BookshelvesListCall) Do(opts ...googleapi.CallOption) (*Bookshelves, error) {
  3965. gensupport.SetOptions(c.urlParams_, opts...)
  3966. res, err := c.doRequest("json")
  3967. if res != nil && res.StatusCode == http.StatusNotModified {
  3968. if res.Body != nil {
  3969. res.Body.Close()
  3970. }
  3971. return nil, &googleapi.Error{
  3972. Code: res.StatusCode,
  3973. Header: res.Header,
  3974. }
  3975. }
  3976. if err != nil {
  3977. return nil, err
  3978. }
  3979. defer googleapi.CloseBody(res)
  3980. if err := googleapi.CheckResponse(res); err != nil {
  3981. return nil, err
  3982. }
  3983. ret := &Bookshelves{
  3984. ServerResponse: googleapi.ServerResponse{
  3985. Header: res.Header,
  3986. HTTPStatusCode: res.StatusCode,
  3987. },
  3988. }
  3989. target := &ret
  3990. if err := gensupport.DecodeResponse(target, res); err != nil {
  3991. return nil, err
  3992. }
  3993. return ret, nil
  3994. // {
  3995. // "description": "Retrieves a list of public bookshelves for the specified user.",
  3996. // "httpMethod": "GET",
  3997. // "id": "books.bookshelves.list",
  3998. // "parameterOrder": [
  3999. // "userId"
  4000. // ],
  4001. // "parameters": {
  4002. // "source": {
  4003. // "description": "String to identify the originator of this request.",
  4004. // "location": "query",
  4005. // "type": "string"
  4006. // },
  4007. // "userId": {
  4008. // "description": "ID of user for whom to retrieve bookshelves.",
  4009. // "location": "path",
  4010. // "required": true,
  4011. // "type": "string"
  4012. // }
  4013. // },
  4014. // "path": "users/{userId}/bookshelves",
  4015. // "response": {
  4016. // "$ref": "Bookshelves"
  4017. // },
  4018. // "scopes": [
  4019. // "https://www.googleapis.com/auth/books"
  4020. // ]
  4021. // }
  4022. }
  4023. // method id "books.bookshelves.volumes.list":
  4024. type BookshelvesVolumesListCall struct {
  4025. s *Service
  4026. userId string
  4027. shelf string
  4028. urlParams_ gensupport.URLParams
  4029. ifNoneMatch_ string
  4030. ctx_ context.Context
  4031. header_ http.Header
  4032. }
  4033. // List: Retrieves volumes in a specific bookshelf for the specified
  4034. // user.
  4035. func (r *BookshelvesVolumesService) List(userId string, shelf string) *BookshelvesVolumesListCall {
  4036. c := &BookshelvesVolumesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4037. c.userId = userId
  4038. c.shelf = shelf
  4039. return c
  4040. }
  4041. // MaxResults sets the optional parameter "maxResults": Maximum number
  4042. // of results to return
  4043. func (c *BookshelvesVolumesListCall) MaxResults(maxResults int64) *BookshelvesVolumesListCall {
  4044. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4045. return c
  4046. }
  4047. // ShowPreorders sets the optional parameter "showPreorders": Set to
  4048. // true to show pre-ordered books. Defaults to false.
  4049. func (c *BookshelvesVolumesListCall) ShowPreorders(showPreorders bool) *BookshelvesVolumesListCall {
  4050. c.urlParams_.Set("showPreorders", fmt.Sprint(showPreorders))
  4051. return c
  4052. }
  4053. // Source sets the optional parameter "source": String to identify the
  4054. // originator of this request.
  4055. func (c *BookshelvesVolumesListCall) Source(source string) *BookshelvesVolumesListCall {
  4056. c.urlParams_.Set("source", source)
  4057. return c
  4058. }
  4059. // StartIndex sets the optional parameter "startIndex": Index of the
  4060. // first element to return (starts at 0)
  4061. func (c *BookshelvesVolumesListCall) StartIndex(startIndex int64) *BookshelvesVolumesListCall {
  4062. c.urlParams_.Set("startIndex", fmt.Sprint(startIndex))
  4063. return c
  4064. }
  4065. // Fields allows partial responses to be retrieved. See
  4066. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4067. // for more information.
  4068. func (c *BookshelvesVolumesListCall) Fields(s ...googleapi.Field) *BookshelvesVolumesListCall {
  4069. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4070. return c
  4071. }
  4072. // IfNoneMatch sets the optional parameter which makes the operation
  4073. // fail if the object's ETag matches the given value. This is useful for
  4074. // getting updates only after the object has changed since the last
  4075. // request. Use googleapi.IsNotModified to check whether the response
  4076. // error from Do is the result of In-None-Match.
  4077. func (c *BookshelvesVolumesListCall) IfNoneMatch(entityTag string) *BookshelvesVolumesListCall {
  4078. c.ifNoneMatch_ = entityTag
  4079. return c
  4080. }
  4081. // Context sets the context to be used in this call's Do method. Any
  4082. // pending HTTP request will be aborted if the provided context is
  4083. // canceled.
  4084. func (c *BookshelvesVolumesListCall) Context(ctx context.Context) *BookshelvesVolumesListCall {
  4085. c.ctx_ = ctx
  4086. return c
  4087. }
  4088. // Header returns an http.Header that can be modified by the caller to
  4089. // add HTTP headers to the request.
  4090. func (c *BookshelvesVolumesListCall) Header() http.Header {
  4091. if c.header_ == nil {
  4092. c.header_ = make(http.Header)
  4093. }
  4094. return c.header_
  4095. }
  4096. func (c *BookshelvesVolumesListCall) doRequest(alt string) (*http.Response, error) {
  4097. reqHeaders := make(http.Header)
  4098. for k, v := range c.header_ {
  4099. reqHeaders[k] = v
  4100. }
  4101. reqHeaders.Set("User-Agent", c.s.userAgent())
  4102. if c.ifNoneMatch_ != "" {
  4103. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4104. }
  4105. var body io.Reader = nil
  4106. c.urlParams_.Set("alt", alt)
  4107. urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}/bookshelves/{shelf}/volumes")
  4108. urls += "?" + c.urlParams_.Encode()
  4109. req, _ := http.NewRequest("GET", urls, body)
  4110. req.Header = reqHeaders
  4111. googleapi.Expand(req.URL, map[string]string{
  4112. "userId": c.userId,
  4113. "shelf": c.shelf,
  4114. })
  4115. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4116. }
  4117. // Do executes the "books.bookshelves.volumes.list" call.
  4118. // Exactly one of *Volumes or error will be non-nil. Any non-2xx status
  4119. // code is an error. Response headers are in either
  4120. // *Volumes.ServerResponse.Header or (if a response was returned at all)
  4121. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4122. // check whether the returned error was because http.StatusNotModified
  4123. // was returned.
  4124. func (c *BookshelvesVolumesListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) {
  4125. gensupport.SetOptions(c.urlParams_, opts...)
  4126. res, err := c.doRequest("json")
  4127. if res != nil && res.StatusCode == http.StatusNotModified {
  4128. if res.Body != nil {
  4129. res.Body.Close()
  4130. }
  4131. return nil, &googleapi.Error{
  4132. Code: res.StatusCode,
  4133. Header: res.Header,
  4134. }
  4135. }
  4136. if err != nil {
  4137. return nil, err
  4138. }
  4139. defer googleapi.CloseBody(res)
  4140. if err := googleapi.CheckResponse(res); err != nil {
  4141. return nil, err
  4142. }
  4143. ret := &Volumes{
  4144. ServerResponse: googleapi.ServerResponse{
  4145. Header: res.Header,
  4146. HTTPStatusCode: res.StatusCode,
  4147. },
  4148. }
  4149. target := &ret
  4150. if err := gensupport.DecodeResponse(target, res); err != nil {
  4151. return nil, err
  4152. }
  4153. return ret, nil
  4154. // {
  4155. // "description": "Retrieves volumes in a specific bookshelf for the specified user.",
  4156. // "httpMethod": "GET",
  4157. // "id": "books.bookshelves.volumes.list",
  4158. // "parameterOrder": [
  4159. // "userId",
  4160. // "shelf"
  4161. // ],
  4162. // "parameters": {
  4163. // "maxResults": {
  4164. // "description": "Maximum number of results to return",
  4165. // "format": "uint32",
  4166. // "location": "query",
  4167. // "minimum": "0",
  4168. // "type": "integer"
  4169. // },
  4170. // "shelf": {
  4171. // "description": "ID of bookshelf to retrieve volumes.",
  4172. // "location": "path",
  4173. // "required": true,
  4174. // "type": "string"
  4175. // },
  4176. // "showPreorders": {
  4177. // "description": "Set to true to show pre-ordered books. Defaults to false.",
  4178. // "location": "query",
  4179. // "type": "boolean"
  4180. // },
  4181. // "source": {
  4182. // "description": "String to identify the originator of this request.",
  4183. // "location": "query",
  4184. // "type": "string"
  4185. // },
  4186. // "startIndex": {
  4187. // "description": "Index of the first element to return (starts at 0)",
  4188. // "format": "uint32",
  4189. // "location": "query",
  4190. // "minimum": "0",
  4191. // "type": "integer"
  4192. // },
  4193. // "userId": {
  4194. // "description": "ID of user for whom to retrieve bookshelf volumes.",
  4195. // "location": "path",
  4196. // "required": true,
  4197. // "type": "string"
  4198. // }
  4199. // },
  4200. // "path": "users/{userId}/bookshelves/{shelf}/volumes",
  4201. // "response": {
  4202. // "$ref": "Volumes"
  4203. // },
  4204. // "scopes": [
  4205. // "https://www.googleapis.com/auth/books"
  4206. // ]
  4207. // }
  4208. }
  4209. // method id "books.cloudloading.addBook":
  4210. type CloudloadingAddBookCall struct {
  4211. s *Service
  4212. urlParams_ gensupport.URLParams
  4213. ctx_ context.Context
  4214. header_ http.Header
  4215. }
  4216. // AddBook:
  4217. func (r *CloudloadingService) AddBook() *CloudloadingAddBookCall {
  4218. c := &CloudloadingAddBookCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4219. return c
  4220. }
  4221. // DriveDocumentId sets the optional parameter "drive_document_id": A
  4222. // drive document id. The upload_client_token must not be set.
  4223. func (c *CloudloadingAddBookCall) DriveDocumentId(driveDocumentId string) *CloudloadingAddBookCall {
  4224. c.urlParams_.Set("drive_document_id", driveDocumentId)
  4225. return c
  4226. }
  4227. // MimeType sets the optional parameter "mime_type": The document MIME
  4228. // type. It can be set only if the drive_document_id is set.
  4229. func (c *CloudloadingAddBookCall) MimeType(mimeType string) *CloudloadingAddBookCall {
  4230. c.urlParams_.Set("mime_type", mimeType)
  4231. return c
  4232. }
  4233. // Name sets the optional parameter "name": The document name. It can be
  4234. // set only if the drive_document_id is set.
  4235. func (c *CloudloadingAddBookCall) Name(name string) *CloudloadingAddBookCall {
  4236. c.urlParams_.Set("name", name)
  4237. return c
  4238. }
  4239. // UploadClientToken sets the optional parameter "upload_client_token":
  4240. func (c *CloudloadingAddBookCall) UploadClientToken(uploadClientToken string) *CloudloadingAddBookCall {
  4241. c.urlParams_.Set("upload_client_token", uploadClientToken)
  4242. return c
  4243. }
  4244. // Fields allows partial responses to be retrieved. See
  4245. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4246. // for more information.
  4247. func (c *CloudloadingAddBookCall) Fields(s ...googleapi.Field) *CloudloadingAddBookCall {
  4248. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4249. return c
  4250. }
  4251. // Context sets the context to be used in this call's Do method. Any
  4252. // pending HTTP request will be aborted if the provided context is
  4253. // canceled.
  4254. func (c *CloudloadingAddBookCall) Context(ctx context.Context) *CloudloadingAddBookCall {
  4255. c.ctx_ = ctx
  4256. return c
  4257. }
  4258. // Header returns an http.Header that can be modified by the caller to
  4259. // add HTTP headers to the request.
  4260. func (c *CloudloadingAddBookCall) Header() http.Header {
  4261. if c.header_ == nil {
  4262. c.header_ = make(http.Header)
  4263. }
  4264. return c.header_
  4265. }
  4266. func (c *CloudloadingAddBookCall) doRequest(alt string) (*http.Response, error) {
  4267. reqHeaders := make(http.Header)
  4268. for k, v := range c.header_ {
  4269. reqHeaders[k] = v
  4270. }
  4271. reqHeaders.Set("User-Agent", c.s.userAgent())
  4272. var body io.Reader = nil
  4273. c.urlParams_.Set("alt", alt)
  4274. urls := googleapi.ResolveRelative(c.s.BasePath, "cloudloading/addBook")
  4275. urls += "?" + c.urlParams_.Encode()
  4276. req, _ := http.NewRequest("POST", urls, body)
  4277. req.Header = reqHeaders
  4278. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4279. }
  4280. // Do executes the "books.cloudloading.addBook" call.
  4281. // Exactly one of *BooksCloudloadingResource or error will be non-nil.
  4282. // Any non-2xx status code is an error. Response headers are in either
  4283. // *BooksCloudloadingResource.ServerResponse.Header or (if a response
  4284. // was returned at all) in error.(*googleapi.Error).Header. Use
  4285. // googleapi.IsNotModified to check whether the returned error was
  4286. // because http.StatusNotModified was returned.
  4287. func (c *CloudloadingAddBookCall) Do(opts ...googleapi.CallOption) (*BooksCloudloadingResource, error) {
  4288. gensupport.SetOptions(c.urlParams_, opts...)
  4289. res, err := c.doRequest("json")
  4290. if res != nil && res.StatusCode == http.StatusNotModified {
  4291. if res.Body != nil {
  4292. res.Body.Close()
  4293. }
  4294. return nil, &googleapi.Error{
  4295. Code: res.StatusCode,
  4296. Header: res.Header,
  4297. }
  4298. }
  4299. if err != nil {
  4300. return nil, err
  4301. }
  4302. defer googleapi.CloseBody(res)
  4303. if err := googleapi.CheckResponse(res); err != nil {
  4304. return nil, err
  4305. }
  4306. ret := &BooksCloudloadingResource{
  4307. ServerResponse: googleapi.ServerResponse{
  4308. Header: res.Header,
  4309. HTTPStatusCode: res.StatusCode,
  4310. },
  4311. }
  4312. target := &ret
  4313. if err := gensupport.DecodeResponse(target, res); err != nil {
  4314. return nil, err
  4315. }
  4316. return ret, nil
  4317. // {
  4318. // "description": "",
  4319. // "httpMethod": "POST",
  4320. // "id": "books.cloudloading.addBook",
  4321. // "parameters": {
  4322. // "drive_document_id": {
  4323. // "description": "A drive document id. The upload_client_token must not be set.",
  4324. // "location": "query",
  4325. // "type": "string"
  4326. // },
  4327. // "mime_type": {
  4328. // "description": "The document MIME type. It can be set only if the drive_document_id is set.",
  4329. // "location": "query",
  4330. // "type": "string"
  4331. // },
  4332. // "name": {
  4333. // "description": "The document name. It can be set only if the drive_document_id is set.",
  4334. // "location": "query",
  4335. // "type": "string"
  4336. // },
  4337. // "upload_client_token": {
  4338. // "location": "query",
  4339. // "type": "string"
  4340. // }
  4341. // },
  4342. // "path": "cloudloading/addBook",
  4343. // "response": {
  4344. // "$ref": "BooksCloudloadingResource"
  4345. // },
  4346. // "scopes": [
  4347. // "https://www.googleapis.com/auth/books"
  4348. // ]
  4349. // }
  4350. }
  4351. // method id "books.cloudloading.deleteBook":
  4352. type CloudloadingDeleteBookCall struct {
  4353. s *Service
  4354. urlParams_ gensupport.URLParams
  4355. ctx_ context.Context
  4356. header_ http.Header
  4357. }
  4358. // DeleteBook: Remove the book and its contents
  4359. func (r *CloudloadingService) DeleteBook(volumeId string) *CloudloadingDeleteBookCall {
  4360. c := &CloudloadingDeleteBookCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4361. c.urlParams_.Set("volumeId", volumeId)
  4362. return c
  4363. }
  4364. // Fields allows partial responses to be retrieved. See
  4365. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4366. // for more information.
  4367. func (c *CloudloadingDeleteBookCall) Fields(s ...googleapi.Field) *CloudloadingDeleteBookCall {
  4368. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4369. return c
  4370. }
  4371. // Context sets the context to be used in this call's Do method. Any
  4372. // pending HTTP request will be aborted if the provided context is
  4373. // canceled.
  4374. func (c *CloudloadingDeleteBookCall) Context(ctx context.Context) *CloudloadingDeleteBookCall {
  4375. c.ctx_ = ctx
  4376. return c
  4377. }
  4378. // Header returns an http.Header that can be modified by the caller to
  4379. // add HTTP headers to the request.
  4380. func (c *CloudloadingDeleteBookCall) Header() http.Header {
  4381. if c.header_ == nil {
  4382. c.header_ = make(http.Header)
  4383. }
  4384. return c.header_
  4385. }
  4386. func (c *CloudloadingDeleteBookCall) doRequest(alt string) (*http.Response, error) {
  4387. reqHeaders := make(http.Header)
  4388. for k, v := range c.header_ {
  4389. reqHeaders[k] = v
  4390. }
  4391. reqHeaders.Set("User-Agent", c.s.userAgent())
  4392. var body io.Reader = nil
  4393. c.urlParams_.Set("alt", alt)
  4394. urls := googleapi.ResolveRelative(c.s.BasePath, "cloudloading/deleteBook")
  4395. urls += "?" + c.urlParams_.Encode()
  4396. req, _ := http.NewRequest("POST", urls, body)
  4397. req.Header = reqHeaders
  4398. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4399. }
  4400. // Do executes the "books.cloudloading.deleteBook" call.
  4401. func (c *CloudloadingDeleteBookCall) Do(opts ...googleapi.CallOption) error {
  4402. gensupport.SetOptions(c.urlParams_, opts...)
  4403. res, err := c.doRequest("json")
  4404. if err != nil {
  4405. return err
  4406. }
  4407. defer googleapi.CloseBody(res)
  4408. if err := googleapi.CheckResponse(res); err != nil {
  4409. return err
  4410. }
  4411. return nil
  4412. // {
  4413. // "description": "Remove the book and its contents",
  4414. // "httpMethod": "POST",
  4415. // "id": "books.cloudloading.deleteBook",
  4416. // "parameterOrder": [
  4417. // "volumeId"
  4418. // ],
  4419. // "parameters": {
  4420. // "volumeId": {
  4421. // "description": "The id of the book to be removed.",
  4422. // "location": "query",
  4423. // "required": true,
  4424. // "type": "string"
  4425. // }
  4426. // },
  4427. // "path": "cloudloading/deleteBook",
  4428. // "scopes": [
  4429. // "https://www.googleapis.com/auth/books"
  4430. // ]
  4431. // }
  4432. }
  4433. // method id "books.cloudloading.updateBook":
  4434. type CloudloadingUpdateBookCall struct {
  4435. s *Service
  4436. bookscloudloadingresource *BooksCloudloadingResource
  4437. urlParams_ gensupport.URLParams
  4438. ctx_ context.Context
  4439. header_ http.Header
  4440. }
  4441. // UpdateBook:
  4442. func (r *CloudloadingService) UpdateBook(bookscloudloadingresource *BooksCloudloadingResource) *CloudloadingUpdateBookCall {
  4443. c := &CloudloadingUpdateBookCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4444. c.bookscloudloadingresource = bookscloudloadingresource
  4445. return c
  4446. }
  4447. // Fields allows partial responses to be retrieved. See
  4448. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4449. // for more information.
  4450. func (c *CloudloadingUpdateBookCall) Fields(s ...googleapi.Field) *CloudloadingUpdateBookCall {
  4451. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4452. return c
  4453. }
  4454. // Context sets the context to be used in this call's Do method. Any
  4455. // pending HTTP request will be aborted if the provided context is
  4456. // canceled.
  4457. func (c *CloudloadingUpdateBookCall) Context(ctx context.Context) *CloudloadingUpdateBookCall {
  4458. c.ctx_ = ctx
  4459. return c
  4460. }
  4461. // Header returns an http.Header that can be modified by the caller to
  4462. // add HTTP headers to the request.
  4463. func (c *CloudloadingUpdateBookCall) Header() http.Header {
  4464. if c.header_ == nil {
  4465. c.header_ = make(http.Header)
  4466. }
  4467. return c.header_
  4468. }
  4469. func (c *CloudloadingUpdateBookCall) doRequest(alt string) (*http.Response, error) {
  4470. reqHeaders := make(http.Header)
  4471. for k, v := range c.header_ {
  4472. reqHeaders[k] = v
  4473. }
  4474. reqHeaders.Set("User-Agent", c.s.userAgent())
  4475. var body io.Reader = nil
  4476. body, err := googleapi.WithoutDataWrapper.JSONReader(c.bookscloudloadingresource)
  4477. if err != nil {
  4478. return nil, err
  4479. }
  4480. reqHeaders.Set("Content-Type", "application/json")
  4481. c.urlParams_.Set("alt", alt)
  4482. urls := googleapi.ResolveRelative(c.s.BasePath, "cloudloading/updateBook")
  4483. urls += "?" + c.urlParams_.Encode()
  4484. req, _ := http.NewRequest("POST", urls, body)
  4485. req.Header = reqHeaders
  4486. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4487. }
  4488. // Do executes the "books.cloudloading.updateBook" call.
  4489. // Exactly one of *BooksCloudloadingResource or error will be non-nil.
  4490. // Any non-2xx status code is an error. Response headers are in either
  4491. // *BooksCloudloadingResource.ServerResponse.Header or (if a response
  4492. // was returned at all) in error.(*googleapi.Error).Header. Use
  4493. // googleapi.IsNotModified to check whether the returned error was
  4494. // because http.StatusNotModified was returned.
  4495. func (c *CloudloadingUpdateBookCall) Do(opts ...googleapi.CallOption) (*BooksCloudloadingResource, error) {
  4496. gensupport.SetOptions(c.urlParams_, opts...)
  4497. res, err := c.doRequest("json")
  4498. if res != nil && res.StatusCode == http.StatusNotModified {
  4499. if res.Body != nil {
  4500. res.Body.Close()
  4501. }
  4502. return nil, &googleapi.Error{
  4503. Code: res.StatusCode,
  4504. Header: res.Header,
  4505. }
  4506. }
  4507. if err != nil {
  4508. return nil, err
  4509. }
  4510. defer googleapi.CloseBody(res)
  4511. if err := googleapi.CheckResponse(res); err != nil {
  4512. return nil, err
  4513. }
  4514. ret := &BooksCloudloadingResource{
  4515. ServerResponse: googleapi.ServerResponse{
  4516. Header: res.Header,
  4517. HTTPStatusCode: res.StatusCode,
  4518. },
  4519. }
  4520. target := &ret
  4521. if err := gensupport.DecodeResponse(target, res); err != nil {
  4522. return nil, err
  4523. }
  4524. return ret, nil
  4525. // {
  4526. // "description": "",
  4527. // "httpMethod": "POST",
  4528. // "id": "books.cloudloading.updateBook",
  4529. // "path": "cloudloading/updateBook",
  4530. // "request": {
  4531. // "$ref": "BooksCloudloadingResource"
  4532. // },
  4533. // "response": {
  4534. // "$ref": "BooksCloudloadingResource"
  4535. // },
  4536. // "scopes": [
  4537. // "https://www.googleapis.com/auth/books"
  4538. // ]
  4539. // }
  4540. }
  4541. // method id "books.dictionary.listOfflineMetadata":
  4542. type DictionaryListOfflineMetadataCall struct {
  4543. s *Service
  4544. urlParams_ gensupport.URLParams
  4545. ifNoneMatch_ string
  4546. ctx_ context.Context
  4547. header_ http.Header
  4548. }
  4549. // ListOfflineMetadata: Returns a list of offline dictionary metadata
  4550. // available
  4551. func (r *DictionaryService) ListOfflineMetadata(cpksver string) *DictionaryListOfflineMetadataCall {
  4552. c := &DictionaryListOfflineMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4553. c.urlParams_.Set("cpksver", cpksver)
  4554. return c
  4555. }
  4556. // Fields allows partial responses to be retrieved. See
  4557. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4558. // for more information.
  4559. func (c *DictionaryListOfflineMetadataCall) Fields(s ...googleapi.Field) *DictionaryListOfflineMetadataCall {
  4560. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4561. return c
  4562. }
  4563. // IfNoneMatch sets the optional parameter which makes the operation
  4564. // fail if the object's ETag matches the given value. This is useful for
  4565. // getting updates only after the object has changed since the last
  4566. // request. Use googleapi.IsNotModified to check whether the response
  4567. // error from Do is the result of In-None-Match.
  4568. func (c *DictionaryListOfflineMetadataCall) IfNoneMatch(entityTag string) *DictionaryListOfflineMetadataCall {
  4569. c.ifNoneMatch_ = entityTag
  4570. return c
  4571. }
  4572. // Context sets the context to be used in this call's Do method. Any
  4573. // pending HTTP request will be aborted if the provided context is
  4574. // canceled.
  4575. func (c *DictionaryListOfflineMetadataCall) Context(ctx context.Context) *DictionaryListOfflineMetadataCall {
  4576. c.ctx_ = ctx
  4577. return c
  4578. }
  4579. // Header returns an http.Header that can be modified by the caller to
  4580. // add HTTP headers to the request.
  4581. func (c *DictionaryListOfflineMetadataCall) Header() http.Header {
  4582. if c.header_ == nil {
  4583. c.header_ = make(http.Header)
  4584. }
  4585. return c.header_
  4586. }
  4587. func (c *DictionaryListOfflineMetadataCall) doRequest(alt string) (*http.Response, error) {
  4588. reqHeaders := make(http.Header)
  4589. for k, v := range c.header_ {
  4590. reqHeaders[k] = v
  4591. }
  4592. reqHeaders.Set("User-Agent", c.s.userAgent())
  4593. if c.ifNoneMatch_ != "" {
  4594. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4595. }
  4596. var body io.Reader = nil
  4597. c.urlParams_.Set("alt", alt)
  4598. urls := googleapi.ResolveRelative(c.s.BasePath, "dictionary/listOfflineMetadata")
  4599. urls += "?" + c.urlParams_.Encode()
  4600. req, _ := http.NewRequest("GET", urls, body)
  4601. req.Header = reqHeaders
  4602. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4603. }
  4604. // Do executes the "books.dictionary.listOfflineMetadata" call.
  4605. // Exactly one of *Metadata or error will be non-nil. Any non-2xx status
  4606. // code is an error. Response headers are in either
  4607. // *Metadata.ServerResponse.Header or (if a response was returned at
  4608. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4609. // to check whether the returned error was because
  4610. // http.StatusNotModified was returned.
  4611. func (c *DictionaryListOfflineMetadataCall) Do(opts ...googleapi.CallOption) (*Metadata, error) {
  4612. gensupport.SetOptions(c.urlParams_, opts...)
  4613. res, err := c.doRequest("json")
  4614. if res != nil && res.StatusCode == http.StatusNotModified {
  4615. if res.Body != nil {
  4616. res.Body.Close()
  4617. }
  4618. return nil, &googleapi.Error{
  4619. Code: res.StatusCode,
  4620. Header: res.Header,
  4621. }
  4622. }
  4623. if err != nil {
  4624. return nil, err
  4625. }
  4626. defer googleapi.CloseBody(res)
  4627. if err := googleapi.CheckResponse(res); err != nil {
  4628. return nil, err
  4629. }
  4630. ret := &Metadata{
  4631. ServerResponse: googleapi.ServerResponse{
  4632. Header: res.Header,
  4633. HTTPStatusCode: res.StatusCode,
  4634. },
  4635. }
  4636. target := &ret
  4637. if err := gensupport.DecodeResponse(target, res); err != nil {
  4638. return nil, err
  4639. }
  4640. return ret, nil
  4641. // {
  4642. // "description": "Returns a list of offline dictionary metadata available",
  4643. // "httpMethod": "GET",
  4644. // "id": "books.dictionary.listOfflineMetadata",
  4645. // "parameterOrder": [
  4646. // "cpksver"
  4647. // ],
  4648. // "parameters": {
  4649. // "cpksver": {
  4650. // "description": "The device/version ID from which to request the data.",
  4651. // "location": "query",
  4652. // "required": true,
  4653. // "type": "string"
  4654. // }
  4655. // },
  4656. // "path": "dictionary/listOfflineMetadata",
  4657. // "response": {
  4658. // "$ref": "Metadata"
  4659. // },
  4660. // "scopes": [
  4661. // "https://www.googleapis.com/auth/books"
  4662. // ]
  4663. // }
  4664. }
  4665. // method id "books.familysharing.getFamilyInfo":
  4666. type FamilysharingGetFamilyInfoCall struct {
  4667. s *Service
  4668. urlParams_ gensupport.URLParams
  4669. ifNoneMatch_ string
  4670. ctx_ context.Context
  4671. header_ http.Header
  4672. }
  4673. // GetFamilyInfo: Gets information regarding the family that the user is
  4674. // part of.
  4675. func (r *FamilysharingService) GetFamilyInfo() *FamilysharingGetFamilyInfoCall {
  4676. c := &FamilysharingGetFamilyInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4677. return c
  4678. }
  4679. // Source sets the optional parameter "source": String to identify the
  4680. // originator of this request.
  4681. func (c *FamilysharingGetFamilyInfoCall) Source(source string) *FamilysharingGetFamilyInfoCall {
  4682. c.urlParams_.Set("source", source)
  4683. return c
  4684. }
  4685. // Fields allows partial responses to be retrieved. See
  4686. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4687. // for more information.
  4688. func (c *FamilysharingGetFamilyInfoCall) Fields(s ...googleapi.Field) *FamilysharingGetFamilyInfoCall {
  4689. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4690. return c
  4691. }
  4692. // IfNoneMatch sets the optional parameter which makes the operation
  4693. // fail if the object's ETag matches the given value. This is useful for
  4694. // getting updates only after the object has changed since the last
  4695. // request. Use googleapi.IsNotModified to check whether the response
  4696. // error from Do is the result of In-None-Match.
  4697. func (c *FamilysharingGetFamilyInfoCall) IfNoneMatch(entityTag string) *FamilysharingGetFamilyInfoCall {
  4698. c.ifNoneMatch_ = entityTag
  4699. return c
  4700. }
  4701. // Context sets the context to be used in this call's Do method. Any
  4702. // pending HTTP request will be aborted if the provided context is
  4703. // canceled.
  4704. func (c *FamilysharingGetFamilyInfoCall) Context(ctx context.Context) *FamilysharingGetFamilyInfoCall {
  4705. c.ctx_ = ctx
  4706. return c
  4707. }
  4708. // Header returns an http.Header that can be modified by the caller to
  4709. // add HTTP headers to the request.
  4710. func (c *FamilysharingGetFamilyInfoCall) Header() http.Header {
  4711. if c.header_ == nil {
  4712. c.header_ = make(http.Header)
  4713. }
  4714. return c.header_
  4715. }
  4716. func (c *FamilysharingGetFamilyInfoCall) doRequest(alt string) (*http.Response, error) {
  4717. reqHeaders := make(http.Header)
  4718. for k, v := range c.header_ {
  4719. reqHeaders[k] = v
  4720. }
  4721. reqHeaders.Set("User-Agent", c.s.userAgent())
  4722. if c.ifNoneMatch_ != "" {
  4723. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4724. }
  4725. var body io.Reader = nil
  4726. c.urlParams_.Set("alt", alt)
  4727. urls := googleapi.ResolveRelative(c.s.BasePath, "familysharing/getFamilyInfo")
  4728. urls += "?" + c.urlParams_.Encode()
  4729. req, _ := http.NewRequest("GET", urls, body)
  4730. req.Header = reqHeaders
  4731. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4732. }
  4733. // Do executes the "books.familysharing.getFamilyInfo" call.
  4734. // Exactly one of *FamilyInfo or error will be non-nil. Any non-2xx
  4735. // status code is an error. Response headers are in either
  4736. // *FamilyInfo.ServerResponse.Header or (if a response was returned at
  4737. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4738. // to check whether the returned error was because
  4739. // http.StatusNotModified was returned.
  4740. func (c *FamilysharingGetFamilyInfoCall) Do(opts ...googleapi.CallOption) (*FamilyInfo, error) {
  4741. gensupport.SetOptions(c.urlParams_, opts...)
  4742. res, err := c.doRequest("json")
  4743. if res != nil && res.StatusCode == http.StatusNotModified {
  4744. if res.Body != nil {
  4745. res.Body.Close()
  4746. }
  4747. return nil, &googleapi.Error{
  4748. Code: res.StatusCode,
  4749. Header: res.Header,
  4750. }
  4751. }
  4752. if err != nil {
  4753. return nil, err
  4754. }
  4755. defer googleapi.CloseBody(res)
  4756. if err := googleapi.CheckResponse(res); err != nil {
  4757. return nil, err
  4758. }
  4759. ret := &FamilyInfo{
  4760. ServerResponse: googleapi.ServerResponse{
  4761. Header: res.Header,
  4762. HTTPStatusCode: res.StatusCode,
  4763. },
  4764. }
  4765. target := &ret
  4766. if err := gensupport.DecodeResponse(target, res); err != nil {
  4767. return nil, err
  4768. }
  4769. return ret, nil
  4770. // {
  4771. // "description": "Gets information regarding the family that the user is part of.",
  4772. // "httpMethod": "GET",
  4773. // "id": "books.familysharing.getFamilyInfo",
  4774. // "parameters": {
  4775. // "source": {
  4776. // "description": "String to identify the originator of this request.",
  4777. // "location": "query",
  4778. // "type": "string"
  4779. // }
  4780. // },
  4781. // "path": "familysharing/getFamilyInfo",
  4782. // "response": {
  4783. // "$ref": "FamilyInfo"
  4784. // },
  4785. // "scopes": [
  4786. // "https://www.googleapis.com/auth/books"
  4787. // ]
  4788. // }
  4789. }
  4790. // method id "books.familysharing.share":
  4791. type FamilysharingShareCall struct {
  4792. s *Service
  4793. urlParams_ gensupport.URLParams
  4794. ctx_ context.Context
  4795. header_ http.Header
  4796. }
  4797. // Share: Initiates sharing of the content with the user's family. Empty
  4798. // response indicates success.
  4799. func (r *FamilysharingService) Share() *FamilysharingShareCall {
  4800. c := &FamilysharingShareCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4801. return c
  4802. }
  4803. // DocId sets the optional parameter "docId": The docid to share.
  4804. func (c *FamilysharingShareCall) DocId(docId string) *FamilysharingShareCall {
  4805. c.urlParams_.Set("docId", docId)
  4806. return c
  4807. }
  4808. // Source sets the optional parameter "source": String to identify the
  4809. // originator of this request.
  4810. func (c *FamilysharingShareCall) Source(source string) *FamilysharingShareCall {
  4811. c.urlParams_.Set("source", source)
  4812. return c
  4813. }
  4814. // VolumeId sets the optional parameter "volumeId": The volume to share.
  4815. func (c *FamilysharingShareCall) VolumeId(volumeId string) *FamilysharingShareCall {
  4816. c.urlParams_.Set("volumeId", volumeId)
  4817. return c
  4818. }
  4819. // Fields allows partial responses to be retrieved. See
  4820. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4821. // for more information.
  4822. func (c *FamilysharingShareCall) Fields(s ...googleapi.Field) *FamilysharingShareCall {
  4823. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4824. return c
  4825. }
  4826. // Context sets the context to be used in this call's Do method. Any
  4827. // pending HTTP request will be aborted if the provided context is
  4828. // canceled.
  4829. func (c *FamilysharingShareCall) Context(ctx context.Context) *FamilysharingShareCall {
  4830. c.ctx_ = ctx
  4831. return c
  4832. }
  4833. // Header returns an http.Header that can be modified by the caller to
  4834. // add HTTP headers to the request.
  4835. func (c *FamilysharingShareCall) Header() http.Header {
  4836. if c.header_ == nil {
  4837. c.header_ = make(http.Header)
  4838. }
  4839. return c.header_
  4840. }
  4841. func (c *FamilysharingShareCall) doRequest(alt string) (*http.Response, error) {
  4842. reqHeaders := make(http.Header)
  4843. for k, v := range c.header_ {
  4844. reqHeaders[k] = v
  4845. }
  4846. reqHeaders.Set("User-Agent", c.s.userAgent())
  4847. var body io.Reader = nil
  4848. c.urlParams_.Set("alt", alt)
  4849. urls := googleapi.ResolveRelative(c.s.BasePath, "familysharing/share")
  4850. urls += "?" + c.urlParams_.Encode()
  4851. req, _ := http.NewRequest("POST", urls, body)
  4852. req.Header = reqHeaders
  4853. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4854. }
  4855. // Do executes the "books.familysharing.share" call.
  4856. func (c *FamilysharingShareCall) Do(opts ...googleapi.CallOption) error {
  4857. gensupport.SetOptions(c.urlParams_, opts...)
  4858. res, err := c.doRequest("json")
  4859. if err != nil {
  4860. return err
  4861. }
  4862. defer googleapi.CloseBody(res)
  4863. if err := googleapi.CheckResponse(res); err != nil {
  4864. return err
  4865. }
  4866. return nil
  4867. // {
  4868. // "description": "Initiates sharing of the content with the user's family. Empty response indicates success.",
  4869. // "httpMethod": "POST",
  4870. // "id": "books.familysharing.share",
  4871. // "parameters": {
  4872. // "docId": {
  4873. // "description": "The docid to share.",
  4874. // "location": "query",
  4875. // "type": "string"
  4876. // },
  4877. // "source": {
  4878. // "description": "String to identify the originator of this request.",
  4879. // "location": "query",
  4880. // "type": "string"
  4881. // },
  4882. // "volumeId": {
  4883. // "description": "The volume to share.",
  4884. // "location": "query",
  4885. // "type": "string"
  4886. // }
  4887. // },
  4888. // "path": "familysharing/share",
  4889. // "scopes": [
  4890. // "https://www.googleapis.com/auth/books"
  4891. // ]
  4892. // }
  4893. }
  4894. // method id "books.familysharing.unshare":
  4895. type FamilysharingUnshareCall struct {
  4896. s *Service
  4897. urlParams_ gensupport.URLParams
  4898. ctx_ context.Context
  4899. header_ http.Header
  4900. }
  4901. // Unshare: Initiates revoking content that has already been shared with
  4902. // the user's family. Empty response indicates success.
  4903. func (r *FamilysharingService) Unshare() *FamilysharingUnshareCall {
  4904. c := &FamilysharingUnshareCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4905. return c
  4906. }
  4907. // DocId sets the optional parameter "docId": The docid to unshare.
  4908. func (c *FamilysharingUnshareCall) DocId(docId string) *FamilysharingUnshareCall {
  4909. c.urlParams_.Set("docId", docId)
  4910. return c
  4911. }
  4912. // Source sets the optional parameter "source": String to identify the
  4913. // originator of this request.
  4914. func (c *FamilysharingUnshareCall) Source(source string) *FamilysharingUnshareCall {
  4915. c.urlParams_.Set("source", source)
  4916. return c
  4917. }
  4918. // VolumeId sets the optional parameter "volumeId": The volume to
  4919. // unshare.
  4920. func (c *FamilysharingUnshareCall) VolumeId(volumeId string) *FamilysharingUnshareCall {
  4921. c.urlParams_.Set("volumeId", volumeId)
  4922. return c
  4923. }
  4924. // Fields allows partial responses to be retrieved. See
  4925. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4926. // for more information.
  4927. func (c *FamilysharingUnshareCall) Fields(s ...googleapi.Field) *FamilysharingUnshareCall {
  4928. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4929. return c
  4930. }
  4931. // Context sets the context to be used in this call's Do method. Any
  4932. // pending HTTP request will be aborted if the provided context is
  4933. // canceled.
  4934. func (c *FamilysharingUnshareCall) Context(ctx context.Context) *FamilysharingUnshareCall {
  4935. c.ctx_ = ctx
  4936. return c
  4937. }
  4938. // Header returns an http.Header that can be modified by the caller to
  4939. // add HTTP headers to the request.
  4940. func (c *FamilysharingUnshareCall) Header() http.Header {
  4941. if c.header_ == nil {
  4942. c.header_ = make(http.Header)
  4943. }
  4944. return c.header_
  4945. }
  4946. func (c *FamilysharingUnshareCall) doRequest(alt string) (*http.Response, error) {
  4947. reqHeaders := make(http.Header)
  4948. for k, v := range c.header_ {
  4949. reqHeaders[k] = v
  4950. }
  4951. reqHeaders.Set("User-Agent", c.s.userAgent())
  4952. var body io.Reader = nil
  4953. c.urlParams_.Set("alt", alt)
  4954. urls := googleapi.ResolveRelative(c.s.BasePath, "familysharing/unshare")
  4955. urls += "?" + c.urlParams_.Encode()
  4956. req, _ := http.NewRequest("POST", urls, body)
  4957. req.Header = reqHeaders
  4958. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4959. }
  4960. // Do executes the "books.familysharing.unshare" call.
  4961. func (c *FamilysharingUnshareCall) Do(opts ...googleapi.CallOption) error {
  4962. gensupport.SetOptions(c.urlParams_, opts...)
  4963. res, err := c.doRequest("json")
  4964. if err != nil {
  4965. return err
  4966. }
  4967. defer googleapi.CloseBody(res)
  4968. if err := googleapi.CheckResponse(res); err != nil {
  4969. return err
  4970. }
  4971. return nil
  4972. // {
  4973. // "description": "Initiates revoking content that has already been shared with the user's family. Empty response indicates success.",
  4974. // "httpMethod": "POST",
  4975. // "id": "books.familysharing.unshare",
  4976. // "parameters": {
  4977. // "docId": {
  4978. // "description": "The docid to unshare.",
  4979. // "location": "query",
  4980. // "type": "string"
  4981. // },
  4982. // "source": {
  4983. // "description": "String to identify the originator of this request.",
  4984. // "location": "query",
  4985. // "type": "string"
  4986. // },
  4987. // "volumeId": {
  4988. // "description": "The volume to unshare.",
  4989. // "location": "query",
  4990. // "type": "string"
  4991. // }
  4992. // },
  4993. // "path": "familysharing/unshare",
  4994. // "scopes": [
  4995. // "https://www.googleapis.com/auth/books"
  4996. // ]
  4997. // }
  4998. }
  4999. // method id "books.layers.get":
  5000. type LayersGetCall struct {
  5001. s *Service
  5002. volumeId string
  5003. summaryId string
  5004. urlParams_ gensupport.URLParams
  5005. ifNoneMatch_ string
  5006. ctx_ context.Context
  5007. header_ http.Header
  5008. }
  5009. // Get: Gets the layer summary for a volume.
  5010. func (r *LayersService) Get(volumeId string, summaryId string) *LayersGetCall {
  5011. c := &LayersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5012. c.volumeId = volumeId
  5013. c.summaryId = summaryId
  5014. return c
  5015. }
  5016. // ContentVersion sets the optional parameter "contentVersion": The
  5017. // content version for the requested volume.
  5018. func (c *LayersGetCall) ContentVersion(contentVersion string) *LayersGetCall {
  5019. c.urlParams_.Set("contentVersion", contentVersion)
  5020. return c
  5021. }
  5022. // Source sets the optional parameter "source": String to identify the
  5023. // originator of this request.
  5024. func (c *LayersGetCall) Source(source string) *LayersGetCall {
  5025. c.urlParams_.Set("source", source)
  5026. return c
  5027. }
  5028. // Fields allows partial responses to be retrieved. See
  5029. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5030. // for more information.
  5031. func (c *LayersGetCall) Fields(s ...googleapi.Field) *LayersGetCall {
  5032. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5033. return c
  5034. }
  5035. // IfNoneMatch sets the optional parameter which makes the operation
  5036. // fail if the object's ETag matches the given value. This is useful for
  5037. // getting updates only after the object has changed since the last
  5038. // request. Use googleapi.IsNotModified to check whether the response
  5039. // error from Do is the result of In-None-Match.
  5040. func (c *LayersGetCall) IfNoneMatch(entityTag string) *LayersGetCall {
  5041. c.ifNoneMatch_ = entityTag
  5042. return c
  5043. }
  5044. // Context sets the context to be used in this call's Do method. Any
  5045. // pending HTTP request will be aborted if the provided context is
  5046. // canceled.
  5047. func (c *LayersGetCall) Context(ctx context.Context) *LayersGetCall {
  5048. c.ctx_ = ctx
  5049. return c
  5050. }
  5051. // Header returns an http.Header that can be modified by the caller to
  5052. // add HTTP headers to the request.
  5053. func (c *LayersGetCall) Header() http.Header {
  5054. if c.header_ == nil {
  5055. c.header_ = make(http.Header)
  5056. }
  5057. return c.header_
  5058. }
  5059. func (c *LayersGetCall) doRequest(alt string) (*http.Response, error) {
  5060. reqHeaders := make(http.Header)
  5061. for k, v := range c.header_ {
  5062. reqHeaders[k] = v
  5063. }
  5064. reqHeaders.Set("User-Agent", c.s.userAgent())
  5065. if c.ifNoneMatch_ != "" {
  5066. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5067. }
  5068. var body io.Reader = nil
  5069. c.urlParams_.Set("alt", alt)
  5070. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layersummary/{summaryId}")
  5071. urls += "?" + c.urlParams_.Encode()
  5072. req, _ := http.NewRequest("GET", urls, body)
  5073. req.Header = reqHeaders
  5074. googleapi.Expand(req.URL, map[string]string{
  5075. "volumeId": c.volumeId,
  5076. "summaryId": c.summaryId,
  5077. })
  5078. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5079. }
  5080. // Do executes the "books.layers.get" call.
  5081. // Exactly one of *Layersummary or error will be non-nil. Any non-2xx
  5082. // status code is an error. Response headers are in either
  5083. // *Layersummary.ServerResponse.Header or (if a response was returned at
  5084. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5085. // to check whether the returned error was because
  5086. // http.StatusNotModified was returned.
  5087. func (c *LayersGetCall) Do(opts ...googleapi.CallOption) (*Layersummary, error) {
  5088. gensupport.SetOptions(c.urlParams_, opts...)
  5089. res, err := c.doRequest("json")
  5090. if res != nil && res.StatusCode == http.StatusNotModified {
  5091. if res.Body != nil {
  5092. res.Body.Close()
  5093. }
  5094. return nil, &googleapi.Error{
  5095. Code: res.StatusCode,
  5096. Header: res.Header,
  5097. }
  5098. }
  5099. if err != nil {
  5100. return nil, err
  5101. }
  5102. defer googleapi.CloseBody(res)
  5103. if err := googleapi.CheckResponse(res); err != nil {
  5104. return nil, err
  5105. }
  5106. ret := &Layersummary{
  5107. ServerResponse: googleapi.ServerResponse{
  5108. Header: res.Header,
  5109. HTTPStatusCode: res.StatusCode,
  5110. },
  5111. }
  5112. target := &ret
  5113. if err := gensupport.DecodeResponse(target, res); err != nil {
  5114. return nil, err
  5115. }
  5116. return ret, nil
  5117. // {
  5118. // "description": "Gets the layer summary for a volume.",
  5119. // "httpMethod": "GET",
  5120. // "id": "books.layers.get",
  5121. // "parameterOrder": [
  5122. // "volumeId",
  5123. // "summaryId"
  5124. // ],
  5125. // "parameters": {
  5126. // "contentVersion": {
  5127. // "description": "The content version for the requested volume.",
  5128. // "location": "query",
  5129. // "type": "string"
  5130. // },
  5131. // "source": {
  5132. // "description": "String to identify the originator of this request.",
  5133. // "location": "query",
  5134. // "type": "string"
  5135. // },
  5136. // "summaryId": {
  5137. // "description": "The ID for the layer to get the summary for.",
  5138. // "location": "path",
  5139. // "required": true,
  5140. // "type": "string"
  5141. // },
  5142. // "volumeId": {
  5143. // "description": "The volume to retrieve layers for.",
  5144. // "location": "path",
  5145. // "required": true,
  5146. // "type": "string"
  5147. // }
  5148. // },
  5149. // "path": "volumes/{volumeId}/layersummary/{summaryId}",
  5150. // "response": {
  5151. // "$ref": "Layersummary"
  5152. // },
  5153. // "scopes": [
  5154. // "https://www.googleapis.com/auth/books"
  5155. // ]
  5156. // }
  5157. }
  5158. // method id "books.layers.list":
  5159. type LayersListCall struct {
  5160. s *Service
  5161. volumeId string
  5162. urlParams_ gensupport.URLParams
  5163. ifNoneMatch_ string
  5164. ctx_ context.Context
  5165. header_ http.Header
  5166. }
  5167. // List: List the layer summaries for a volume.
  5168. func (r *LayersService) List(volumeId string) *LayersListCall {
  5169. c := &LayersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5170. c.volumeId = volumeId
  5171. return c
  5172. }
  5173. // ContentVersion sets the optional parameter "contentVersion": The
  5174. // content version for the requested volume.
  5175. func (c *LayersListCall) ContentVersion(contentVersion string) *LayersListCall {
  5176. c.urlParams_.Set("contentVersion", contentVersion)
  5177. return c
  5178. }
  5179. // MaxResults sets the optional parameter "maxResults": Maximum number
  5180. // of results to return
  5181. func (c *LayersListCall) MaxResults(maxResults int64) *LayersListCall {
  5182. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5183. return c
  5184. }
  5185. // PageToken sets the optional parameter "pageToken": The value of the
  5186. // nextToken from the previous page.
  5187. func (c *LayersListCall) PageToken(pageToken string) *LayersListCall {
  5188. c.urlParams_.Set("pageToken", pageToken)
  5189. return c
  5190. }
  5191. // Source sets the optional parameter "source": String to identify the
  5192. // originator of this request.
  5193. func (c *LayersListCall) Source(source string) *LayersListCall {
  5194. c.urlParams_.Set("source", source)
  5195. return c
  5196. }
  5197. // Fields allows partial responses to be retrieved. See
  5198. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5199. // for more information.
  5200. func (c *LayersListCall) Fields(s ...googleapi.Field) *LayersListCall {
  5201. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5202. return c
  5203. }
  5204. // IfNoneMatch sets the optional parameter which makes the operation
  5205. // fail if the object's ETag matches the given value. This is useful for
  5206. // getting updates only after the object has changed since the last
  5207. // request. Use googleapi.IsNotModified to check whether the response
  5208. // error from Do is the result of In-None-Match.
  5209. func (c *LayersListCall) IfNoneMatch(entityTag string) *LayersListCall {
  5210. c.ifNoneMatch_ = entityTag
  5211. return c
  5212. }
  5213. // Context sets the context to be used in this call's Do method. Any
  5214. // pending HTTP request will be aborted if the provided context is
  5215. // canceled.
  5216. func (c *LayersListCall) Context(ctx context.Context) *LayersListCall {
  5217. c.ctx_ = ctx
  5218. return c
  5219. }
  5220. // Header returns an http.Header that can be modified by the caller to
  5221. // add HTTP headers to the request.
  5222. func (c *LayersListCall) Header() http.Header {
  5223. if c.header_ == nil {
  5224. c.header_ = make(http.Header)
  5225. }
  5226. return c.header_
  5227. }
  5228. func (c *LayersListCall) doRequest(alt string) (*http.Response, error) {
  5229. reqHeaders := make(http.Header)
  5230. for k, v := range c.header_ {
  5231. reqHeaders[k] = v
  5232. }
  5233. reqHeaders.Set("User-Agent", c.s.userAgent())
  5234. if c.ifNoneMatch_ != "" {
  5235. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5236. }
  5237. var body io.Reader = nil
  5238. c.urlParams_.Set("alt", alt)
  5239. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layersummary")
  5240. urls += "?" + c.urlParams_.Encode()
  5241. req, _ := http.NewRequest("GET", urls, body)
  5242. req.Header = reqHeaders
  5243. googleapi.Expand(req.URL, map[string]string{
  5244. "volumeId": c.volumeId,
  5245. })
  5246. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5247. }
  5248. // Do executes the "books.layers.list" call.
  5249. // Exactly one of *Layersummaries or error will be non-nil. Any non-2xx
  5250. // status code is an error. Response headers are in either
  5251. // *Layersummaries.ServerResponse.Header or (if a response was returned
  5252. // at all) in error.(*googleapi.Error).Header. Use
  5253. // googleapi.IsNotModified to check whether the returned error was
  5254. // because http.StatusNotModified was returned.
  5255. func (c *LayersListCall) Do(opts ...googleapi.CallOption) (*Layersummaries, error) {
  5256. gensupport.SetOptions(c.urlParams_, opts...)
  5257. res, err := c.doRequest("json")
  5258. if res != nil && res.StatusCode == http.StatusNotModified {
  5259. if res.Body != nil {
  5260. res.Body.Close()
  5261. }
  5262. return nil, &googleapi.Error{
  5263. Code: res.StatusCode,
  5264. Header: res.Header,
  5265. }
  5266. }
  5267. if err != nil {
  5268. return nil, err
  5269. }
  5270. defer googleapi.CloseBody(res)
  5271. if err := googleapi.CheckResponse(res); err != nil {
  5272. return nil, err
  5273. }
  5274. ret := &Layersummaries{
  5275. ServerResponse: googleapi.ServerResponse{
  5276. Header: res.Header,
  5277. HTTPStatusCode: res.StatusCode,
  5278. },
  5279. }
  5280. target := &ret
  5281. if err := gensupport.DecodeResponse(target, res); err != nil {
  5282. return nil, err
  5283. }
  5284. return ret, nil
  5285. // {
  5286. // "description": "List the layer summaries for a volume.",
  5287. // "httpMethod": "GET",
  5288. // "id": "books.layers.list",
  5289. // "parameterOrder": [
  5290. // "volumeId"
  5291. // ],
  5292. // "parameters": {
  5293. // "contentVersion": {
  5294. // "description": "The content version for the requested volume.",
  5295. // "location": "query",
  5296. // "type": "string"
  5297. // },
  5298. // "maxResults": {
  5299. // "description": "Maximum number of results to return",
  5300. // "format": "uint32",
  5301. // "location": "query",
  5302. // "maximum": "200",
  5303. // "minimum": "0",
  5304. // "type": "integer"
  5305. // },
  5306. // "pageToken": {
  5307. // "description": "The value of the nextToken from the previous page.",
  5308. // "location": "query",
  5309. // "type": "string"
  5310. // },
  5311. // "source": {
  5312. // "description": "String to identify the originator of this request.",
  5313. // "location": "query",
  5314. // "type": "string"
  5315. // },
  5316. // "volumeId": {
  5317. // "description": "The volume to retrieve layers for.",
  5318. // "location": "path",
  5319. // "required": true,
  5320. // "type": "string"
  5321. // }
  5322. // },
  5323. // "path": "volumes/{volumeId}/layersummary",
  5324. // "response": {
  5325. // "$ref": "Layersummaries"
  5326. // },
  5327. // "scopes": [
  5328. // "https://www.googleapis.com/auth/books"
  5329. // ]
  5330. // }
  5331. }
  5332. // method id "books.layers.annotationData.get":
  5333. type LayersAnnotationDataGetCall struct {
  5334. s *Service
  5335. volumeId string
  5336. layerId string
  5337. annotationDataId string
  5338. urlParams_ gensupport.URLParams
  5339. ifNoneMatch_ string
  5340. ctx_ context.Context
  5341. header_ http.Header
  5342. }
  5343. // Get: Gets the annotation data.
  5344. func (r *LayersAnnotationDataService) Get(volumeId string, layerId string, annotationDataId string, contentVersion string) *LayersAnnotationDataGetCall {
  5345. c := &LayersAnnotationDataGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5346. c.volumeId = volumeId
  5347. c.layerId = layerId
  5348. c.annotationDataId = annotationDataId
  5349. c.urlParams_.Set("contentVersion", contentVersion)
  5350. return c
  5351. }
  5352. // AllowWebDefinitions sets the optional parameter
  5353. // "allowWebDefinitions": For the dictionary layer. Whether or not to
  5354. // allow web definitions.
  5355. func (c *LayersAnnotationDataGetCall) AllowWebDefinitions(allowWebDefinitions bool) *LayersAnnotationDataGetCall {
  5356. c.urlParams_.Set("allowWebDefinitions", fmt.Sprint(allowWebDefinitions))
  5357. return c
  5358. }
  5359. // H sets the optional parameter "h": The requested pixel height for any
  5360. // images. If height is provided width must also be provided.
  5361. func (c *LayersAnnotationDataGetCall) H(h int64) *LayersAnnotationDataGetCall {
  5362. c.urlParams_.Set("h", fmt.Sprint(h))
  5363. return c
  5364. }
  5365. // Locale sets the optional parameter "locale": The locale information
  5366. // for the data. ISO-639-1 language and ISO-3166-1 country code. Ex:
  5367. // 'en_US'.
  5368. func (c *LayersAnnotationDataGetCall) Locale(locale string) *LayersAnnotationDataGetCall {
  5369. c.urlParams_.Set("locale", locale)
  5370. return c
  5371. }
  5372. // Scale sets the optional parameter "scale": The requested scale for
  5373. // the image.
  5374. func (c *LayersAnnotationDataGetCall) Scale(scale int64) *LayersAnnotationDataGetCall {
  5375. c.urlParams_.Set("scale", fmt.Sprint(scale))
  5376. return c
  5377. }
  5378. // Source sets the optional parameter "source": String to identify the
  5379. // originator of this request.
  5380. func (c *LayersAnnotationDataGetCall) Source(source string) *LayersAnnotationDataGetCall {
  5381. c.urlParams_.Set("source", source)
  5382. return c
  5383. }
  5384. // W sets the optional parameter "w": The requested pixel width for any
  5385. // images. If width is provided height must also be provided.
  5386. func (c *LayersAnnotationDataGetCall) W(w int64) *LayersAnnotationDataGetCall {
  5387. c.urlParams_.Set("w", fmt.Sprint(w))
  5388. return c
  5389. }
  5390. // Fields allows partial responses to be retrieved. See
  5391. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5392. // for more information.
  5393. func (c *LayersAnnotationDataGetCall) Fields(s ...googleapi.Field) *LayersAnnotationDataGetCall {
  5394. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5395. return c
  5396. }
  5397. // IfNoneMatch sets the optional parameter which makes the operation
  5398. // fail if the object's ETag matches the given value. This is useful for
  5399. // getting updates only after the object has changed since the last
  5400. // request. Use googleapi.IsNotModified to check whether the response
  5401. // error from Do is the result of In-None-Match.
  5402. func (c *LayersAnnotationDataGetCall) IfNoneMatch(entityTag string) *LayersAnnotationDataGetCall {
  5403. c.ifNoneMatch_ = entityTag
  5404. return c
  5405. }
  5406. // Context sets the context to be used in this call's Do method. Any
  5407. // pending HTTP request will be aborted if the provided context is
  5408. // canceled.
  5409. func (c *LayersAnnotationDataGetCall) Context(ctx context.Context) *LayersAnnotationDataGetCall {
  5410. c.ctx_ = ctx
  5411. return c
  5412. }
  5413. // Header returns an http.Header that can be modified by the caller to
  5414. // add HTTP headers to the request.
  5415. func (c *LayersAnnotationDataGetCall) Header() http.Header {
  5416. if c.header_ == nil {
  5417. c.header_ = make(http.Header)
  5418. }
  5419. return c.header_
  5420. }
  5421. func (c *LayersAnnotationDataGetCall) doRequest(alt string) (*http.Response, error) {
  5422. reqHeaders := make(http.Header)
  5423. for k, v := range c.header_ {
  5424. reqHeaders[k] = v
  5425. }
  5426. reqHeaders.Set("User-Agent", c.s.userAgent())
  5427. if c.ifNoneMatch_ != "" {
  5428. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5429. }
  5430. var body io.Reader = nil
  5431. c.urlParams_.Set("alt", alt)
  5432. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layers/{layerId}/data/{annotationDataId}")
  5433. urls += "?" + c.urlParams_.Encode()
  5434. req, _ := http.NewRequest("GET", urls, body)
  5435. req.Header = reqHeaders
  5436. googleapi.Expand(req.URL, map[string]string{
  5437. "volumeId": c.volumeId,
  5438. "layerId": c.layerId,
  5439. "annotationDataId": c.annotationDataId,
  5440. })
  5441. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5442. }
  5443. // Do executes the "books.layers.annotationData.get" call.
  5444. // Exactly one of *Annotationdata or error will be non-nil. Any non-2xx
  5445. // status code is an error. Response headers are in either
  5446. // *Annotationdata.ServerResponse.Header or (if a response was returned
  5447. // at all) in error.(*googleapi.Error).Header. Use
  5448. // googleapi.IsNotModified to check whether the returned error was
  5449. // because http.StatusNotModified was returned.
  5450. func (c *LayersAnnotationDataGetCall) Do(opts ...googleapi.CallOption) (*Annotationdata, error) {
  5451. gensupport.SetOptions(c.urlParams_, opts...)
  5452. res, err := c.doRequest("json")
  5453. if res != nil && res.StatusCode == http.StatusNotModified {
  5454. if res.Body != nil {
  5455. res.Body.Close()
  5456. }
  5457. return nil, &googleapi.Error{
  5458. Code: res.StatusCode,
  5459. Header: res.Header,
  5460. }
  5461. }
  5462. if err != nil {
  5463. return nil, err
  5464. }
  5465. defer googleapi.CloseBody(res)
  5466. if err := googleapi.CheckResponse(res); err != nil {
  5467. return nil, err
  5468. }
  5469. ret := &Annotationdata{
  5470. ServerResponse: googleapi.ServerResponse{
  5471. Header: res.Header,
  5472. HTTPStatusCode: res.StatusCode,
  5473. },
  5474. }
  5475. target := &ret
  5476. if err := gensupport.DecodeResponse(target, res); err != nil {
  5477. return nil, err
  5478. }
  5479. return ret, nil
  5480. // {
  5481. // "description": "Gets the annotation data.",
  5482. // "httpMethod": "GET",
  5483. // "id": "books.layers.annotationData.get",
  5484. // "parameterOrder": [
  5485. // "volumeId",
  5486. // "layerId",
  5487. // "annotationDataId",
  5488. // "contentVersion"
  5489. // ],
  5490. // "parameters": {
  5491. // "allowWebDefinitions": {
  5492. // "description": "For the dictionary layer. Whether or not to allow web definitions.",
  5493. // "location": "query",
  5494. // "type": "boolean"
  5495. // },
  5496. // "annotationDataId": {
  5497. // "description": "The ID of the annotation data to retrieve.",
  5498. // "location": "path",
  5499. // "required": true,
  5500. // "type": "string"
  5501. // },
  5502. // "contentVersion": {
  5503. // "description": "The content version for the volume you are trying to retrieve.",
  5504. // "location": "query",
  5505. // "required": true,
  5506. // "type": "string"
  5507. // },
  5508. // "h": {
  5509. // "description": "The requested pixel height for any images. If height is provided width must also be provided.",
  5510. // "format": "int32",
  5511. // "location": "query",
  5512. // "type": "integer"
  5513. // },
  5514. // "layerId": {
  5515. // "description": "The ID for the layer to get the annotations.",
  5516. // "location": "path",
  5517. // "required": true,
  5518. // "type": "string"
  5519. // },
  5520. // "locale": {
  5521. // "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.",
  5522. // "location": "query",
  5523. // "type": "string"
  5524. // },
  5525. // "scale": {
  5526. // "description": "The requested scale for the image.",
  5527. // "format": "int32",
  5528. // "location": "query",
  5529. // "minimum": "0",
  5530. // "type": "integer"
  5531. // },
  5532. // "source": {
  5533. // "description": "String to identify the originator of this request.",
  5534. // "location": "query",
  5535. // "type": "string"
  5536. // },
  5537. // "volumeId": {
  5538. // "description": "The volume to retrieve annotations for.",
  5539. // "location": "path",
  5540. // "required": true,
  5541. // "type": "string"
  5542. // },
  5543. // "w": {
  5544. // "description": "The requested pixel width for any images. If width is provided height must also be provided.",
  5545. // "format": "int32",
  5546. // "location": "query",
  5547. // "type": "integer"
  5548. // }
  5549. // },
  5550. // "path": "volumes/{volumeId}/layers/{layerId}/data/{annotationDataId}",
  5551. // "response": {
  5552. // "$ref": "Annotationdata"
  5553. // },
  5554. // "scopes": [
  5555. // "https://www.googleapis.com/auth/books"
  5556. // ]
  5557. // }
  5558. }
  5559. // method id "books.layers.annotationData.list":
  5560. type LayersAnnotationDataListCall struct {
  5561. s *Service
  5562. volumeId string
  5563. layerId string
  5564. urlParams_ gensupport.URLParams
  5565. ifNoneMatch_ string
  5566. ctx_ context.Context
  5567. header_ http.Header
  5568. }
  5569. // List: Gets the annotation data for a volume and layer.
  5570. func (r *LayersAnnotationDataService) List(volumeId string, layerId string, contentVersion string) *LayersAnnotationDataListCall {
  5571. c := &LayersAnnotationDataListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5572. c.volumeId = volumeId
  5573. c.layerId = layerId
  5574. c.urlParams_.Set("contentVersion", contentVersion)
  5575. return c
  5576. }
  5577. // AnnotationDataId sets the optional parameter "annotationDataId": The
  5578. // list of Annotation Data Ids to retrieve. Pagination is ignored if
  5579. // this is set.
  5580. func (c *LayersAnnotationDataListCall) AnnotationDataId(annotationDataId ...string) *LayersAnnotationDataListCall {
  5581. c.urlParams_.SetMulti("annotationDataId", append([]string{}, annotationDataId...))
  5582. return c
  5583. }
  5584. // H sets the optional parameter "h": The requested pixel height for any
  5585. // images. If height is provided width must also be provided.
  5586. func (c *LayersAnnotationDataListCall) H(h int64) *LayersAnnotationDataListCall {
  5587. c.urlParams_.Set("h", fmt.Sprint(h))
  5588. return c
  5589. }
  5590. // Locale sets the optional parameter "locale": The locale information
  5591. // for the data. ISO-639-1 language and ISO-3166-1 country code. Ex:
  5592. // 'en_US'.
  5593. func (c *LayersAnnotationDataListCall) Locale(locale string) *LayersAnnotationDataListCall {
  5594. c.urlParams_.Set("locale", locale)
  5595. return c
  5596. }
  5597. // MaxResults sets the optional parameter "maxResults": Maximum number
  5598. // of results to return
  5599. func (c *LayersAnnotationDataListCall) MaxResults(maxResults int64) *LayersAnnotationDataListCall {
  5600. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5601. return c
  5602. }
  5603. // PageToken sets the optional parameter "pageToken": The value of the
  5604. // nextToken from the previous page.
  5605. func (c *LayersAnnotationDataListCall) PageToken(pageToken string) *LayersAnnotationDataListCall {
  5606. c.urlParams_.Set("pageToken", pageToken)
  5607. return c
  5608. }
  5609. // Scale sets the optional parameter "scale": The requested scale for
  5610. // the image.
  5611. func (c *LayersAnnotationDataListCall) Scale(scale int64) *LayersAnnotationDataListCall {
  5612. c.urlParams_.Set("scale", fmt.Sprint(scale))
  5613. return c
  5614. }
  5615. // Source sets the optional parameter "source": String to identify the
  5616. // originator of this request.
  5617. func (c *LayersAnnotationDataListCall) Source(source string) *LayersAnnotationDataListCall {
  5618. c.urlParams_.Set("source", source)
  5619. return c
  5620. }
  5621. // UpdatedMax sets the optional parameter "updatedMax": RFC 3339
  5622. // timestamp to restrict to items updated prior to this timestamp
  5623. // (exclusive).
  5624. func (c *LayersAnnotationDataListCall) UpdatedMax(updatedMax string) *LayersAnnotationDataListCall {
  5625. c.urlParams_.Set("updatedMax", updatedMax)
  5626. return c
  5627. }
  5628. // UpdatedMin sets the optional parameter "updatedMin": RFC 3339
  5629. // timestamp to restrict to items updated since this timestamp
  5630. // (inclusive).
  5631. func (c *LayersAnnotationDataListCall) UpdatedMin(updatedMin string) *LayersAnnotationDataListCall {
  5632. c.urlParams_.Set("updatedMin", updatedMin)
  5633. return c
  5634. }
  5635. // W sets the optional parameter "w": The requested pixel width for any
  5636. // images. If width is provided height must also be provided.
  5637. func (c *LayersAnnotationDataListCall) W(w int64) *LayersAnnotationDataListCall {
  5638. c.urlParams_.Set("w", fmt.Sprint(w))
  5639. return c
  5640. }
  5641. // Fields allows partial responses to be retrieved. See
  5642. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5643. // for more information.
  5644. func (c *LayersAnnotationDataListCall) Fields(s ...googleapi.Field) *LayersAnnotationDataListCall {
  5645. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5646. return c
  5647. }
  5648. // IfNoneMatch sets the optional parameter which makes the operation
  5649. // fail if the object's ETag matches the given value. This is useful for
  5650. // getting updates only after the object has changed since the last
  5651. // request. Use googleapi.IsNotModified to check whether the response
  5652. // error from Do is the result of In-None-Match.
  5653. func (c *LayersAnnotationDataListCall) IfNoneMatch(entityTag string) *LayersAnnotationDataListCall {
  5654. c.ifNoneMatch_ = entityTag
  5655. return c
  5656. }
  5657. // Context sets the context to be used in this call's Do method. Any
  5658. // pending HTTP request will be aborted if the provided context is
  5659. // canceled.
  5660. func (c *LayersAnnotationDataListCall) Context(ctx context.Context) *LayersAnnotationDataListCall {
  5661. c.ctx_ = ctx
  5662. return c
  5663. }
  5664. // Header returns an http.Header that can be modified by the caller to
  5665. // add HTTP headers to the request.
  5666. func (c *LayersAnnotationDataListCall) Header() http.Header {
  5667. if c.header_ == nil {
  5668. c.header_ = make(http.Header)
  5669. }
  5670. return c.header_
  5671. }
  5672. func (c *LayersAnnotationDataListCall) doRequest(alt string) (*http.Response, error) {
  5673. reqHeaders := make(http.Header)
  5674. for k, v := range c.header_ {
  5675. reqHeaders[k] = v
  5676. }
  5677. reqHeaders.Set("User-Agent", c.s.userAgent())
  5678. if c.ifNoneMatch_ != "" {
  5679. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5680. }
  5681. var body io.Reader = nil
  5682. c.urlParams_.Set("alt", alt)
  5683. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layers/{layerId}/data")
  5684. urls += "?" + c.urlParams_.Encode()
  5685. req, _ := http.NewRequest("GET", urls, body)
  5686. req.Header = reqHeaders
  5687. googleapi.Expand(req.URL, map[string]string{
  5688. "volumeId": c.volumeId,
  5689. "layerId": c.layerId,
  5690. })
  5691. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5692. }
  5693. // Do executes the "books.layers.annotationData.list" call.
  5694. // Exactly one of *Annotationsdata or error will be non-nil. Any non-2xx
  5695. // status code is an error. Response headers are in either
  5696. // *Annotationsdata.ServerResponse.Header or (if a response was returned
  5697. // at all) in error.(*googleapi.Error).Header. Use
  5698. // googleapi.IsNotModified to check whether the returned error was
  5699. // because http.StatusNotModified was returned.
  5700. func (c *LayersAnnotationDataListCall) Do(opts ...googleapi.CallOption) (*Annotationsdata, error) {
  5701. gensupport.SetOptions(c.urlParams_, opts...)
  5702. res, err := c.doRequest("json")
  5703. if res != nil && res.StatusCode == http.StatusNotModified {
  5704. if res.Body != nil {
  5705. res.Body.Close()
  5706. }
  5707. return nil, &googleapi.Error{
  5708. Code: res.StatusCode,
  5709. Header: res.Header,
  5710. }
  5711. }
  5712. if err != nil {
  5713. return nil, err
  5714. }
  5715. defer googleapi.CloseBody(res)
  5716. if err := googleapi.CheckResponse(res); err != nil {
  5717. return nil, err
  5718. }
  5719. ret := &Annotationsdata{
  5720. ServerResponse: googleapi.ServerResponse{
  5721. Header: res.Header,
  5722. HTTPStatusCode: res.StatusCode,
  5723. },
  5724. }
  5725. target := &ret
  5726. if err := gensupport.DecodeResponse(target, res); err != nil {
  5727. return nil, err
  5728. }
  5729. return ret, nil
  5730. // {
  5731. // "description": "Gets the annotation data for a volume and layer.",
  5732. // "httpMethod": "GET",
  5733. // "id": "books.layers.annotationData.list",
  5734. // "parameterOrder": [
  5735. // "volumeId",
  5736. // "layerId",
  5737. // "contentVersion"
  5738. // ],
  5739. // "parameters": {
  5740. // "annotationDataId": {
  5741. // "description": "The list of Annotation Data Ids to retrieve. Pagination is ignored if this is set.",
  5742. // "location": "query",
  5743. // "repeated": true,
  5744. // "type": "string"
  5745. // },
  5746. // "contentVersion": {
  5747. // "description": "The content version for the requested volume.",
  5748. // "location": "query",
  5749. // "required": true,
  5750. // "type": "string"
  5751. // },
  5752. // "h": {
  5753. // "description": "The requested pixel height for any images. If height is provided width must also be provided.",
  5754. // "format": "int32",
  5755. // "location": "query",
  5756. // "type": "integer"
  5757. // },
  5758. // "layerId": {
  5759. // "description": "The ID for the layer to get the annotation data.",
  5760. // "location": "path",
  5761. // "required": true,
  5762. // "type": "string"
  5763. // },
  5764. // "locale": {
  5765. // "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.",
  5766. // "location": "query",
  5767. // "type": "string"
  5768. // },
  5769. // "maxResults": {
  5770. // "description": "Maximum number of results to return",
  5771. // "format": "uint32",
  5772. // "location": "query",
  5773. // "maximum": "200",
  5774. // "minimum": "0",
  5775. // "type": "integer"
  5776. // },
  5777. // "pageToken": {
  5778. // "description": "The value of the nextToken from the previous page.",
  5779. // "location": "query",
  5780. // "type": "string"
  5781. // },
  5782. // "scale": {
  5783. // "description": "The requested scale for the image.",
  5784. // "format": "int32",
  5785. // "location": "query",
  5786. // "minimum": "0",
  5787. // "type": "integer"
  5788. // },
  5789. // "source": {
  5790. // "description": "String to identify the originator of this request.",
  5791. // "location": "query",
  5792. // "type": "string"
  5793. // },
  5794. // "updatedMax": {
  5795. // "description": "RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).",
  5796. // "location": "query",
  5797. // "type": "string"
  5798. // },
  5799. // "updatedMin": {
  5800. // "description": "RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).",
  5801. // "location": "query",
  5802. // "type": "string"
  5803. // },
  5804. // "volumeId": {
  5805. // "description": "The volume to retrieve annotation data for.",
  5806. // "location": "path",
  5807. // "required": true,
  5808. // "type": "string"
  5809. // },
  5810. // "w": {
  5811. // "description": "The requested pixel width for any images. If width is provided height must also be provided.",
  5812. // "format": "int32",
  5813. // "location": "query",
  5814. // "type": "integer"
  5815. // }
  5816. // },
  5817. // "path": "volumes/{volumeId}/layers/{layerId}/data",
  5818. // "response": {
  5819. // "$ref": "Annotationsdata"
  5820. // },
  5821. // "scopes": [
  5822. // "https://www.googleapis.com/auth/books"
  5823. // ]
  5824. // }
  5825. }
  5826. // Pages invokes f for each page of results.
  5827. // A non-nil error returned from f will halt the iteration.
  5828. // The provided context supersedes any context provided to the Context method.
  5829. func (c *LayersAnnotationDataListCall) Pages(ctx context.Context, f func(*Annotationsdata) error) error {
  5830. c.ctx_ = ctx
  5831. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5832. for {
  5833. x, err := c.Do()
  5834. if err != nil {
  5835. return err
  5836. }
  5837. if err := f(x); err != nil {
  5838. return err
  5839. }
  5840. if x.NextPageToken == "" {
  5841. return nil
  5842. }
  5843. c.PageToken(x.NextPageToken)
  5844. }
  5845. }
  5846. // method id "books.layers.volumeAnnotations.get":
  5847. type LayersVolumeAnnotationsGetCall struct {
  5848. s *Service
  5849. volumeId string
  5850. layerId string
  5851. annotationId string
  5852. urlParams_ gensupport.URLParams
  5853. ifNoneMatch_ string
  5854. ctx_ context.Context
  5855. header_ http.Header
  5856. }
  5857. // Get: Gets the volume annotation.
  5858. func (r *LayersVolumeAnnotationsService) Get(volumeId string, layerId string, annotationId string) *LayersVolumeAnnotationsGetCall {
  5859. c := &LayersVolumeAnnotationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5860. c.volumeId = volumeId
  5861. c.layerId = layerId
  5862. c.annotationId = annotationId
  5863. return c
  5864. }
  5865. // Locale sets the optional parameter "locale": The locale information
  5866. // for the data. ISO-639-1 language and ISO-3166-1 country code. Ex:
  5867. // 'en_US'.
  5868. func (c *LayersVolumeAnnotationsGetCall) Locale(locale string) *LayersVolumeAnnotationsGetCall {
  5869. c.urlParams_.Set("locale", locale)
  5870. return c
  5871. }
  5872. // Source sets the optional parameter "source": String to identify the
  5873. // originator of this request.
  5874. func (c *LayersVolumeAnnotationsGetCall) Source(source string) *LayersVolumeAnnotationsGetCall {
  5875. c.urlParams_.Set("source", source)
  5876. return c
  5877. }
  5878. // Fields allows partial responses to be retrieved. See
  5879. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5880. // for more information.
  5881. func (c *LayersVolumeAnnotationsGetCall) Fields(s ...googleapi.Field) *LayersVolumeAnnotationsGetCall {
  5882. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5883. return c
  5884. }
  5885. // IfNoneMatch sets the optional parameter which makes the operation
  5886. // fail if the object's ETag matches the given value. This is useful for
  5887. // getting updates only after the object has changed since the last
  5888. // request. Use googleapi.IsNotModified to check whether the response
  5889. // error from Do is the result of In-None-Match.
  5890. func (c *LayersVolumeAnnotationsGetCall) IfNoneMatch(entityTag string) *LayersVolumeAnnotationsGetCall {
  5891. c.ifNoneMatch_ = entityTag
  5892. return c
  5893. }
  5894. // Context sets the context to be used in this call's Do method. Any
  5895. // pending HTTP request will be aborted if the provided context is
  5896. // canceled.
  5897. func (c *LayersVolumeAnnotationsGetCall) Context(ctx context.Context) *LayersVolumeAnnotationsGetCall {
  5898. c.ctx_ = ctx
  5899. return c
  5900. }
  5901. // Header returns an http.Header that can be modified by the caller to
  5902. // add HTTP headers to the request.
  5903. func (c *LayersVolumeAnnotationsGetCall) Header() http.Header {
  5904. if c.header_ == nil {
  5905. c.header_ = make(http.Header)
  5906. }
  5907. return c.header_
  5908. }
  5909. func (c *LayersVolumeAnnotationsGetCall) doRequest(alt string) (*http.Response, error) {
  5910. reqHeaders := make(http.Header)
  5911. for k, v := range c.header_ {
  5912. reqHeaders[k] = v
  5913. }
  5914. reqHeaders.Set("User-Agent", c.s.userAgent())
  5915. if c.ifNoneMatch_ != "" {
  5916. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5917. }
  5918. var body io.Reader = nil
  5919. c.urlParams_.Set("alt", alt)
  5920. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layers/{layerId}/annotations/{annotationId}")
  5921. urls += "?" + c.urlParams_.Encode()
  5922. req, _ := http.NewRequest("GET", urls, body)
  5923. req.Header = reqHeaders
  5924. googleapi.Expand(req.URL, map[string]string{
  5925. "volumeId": c.volumeId,
  5926. "layerId": c.layerId,
  5927. "annotationId": c.annotationId,
  5928. })
  5929. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5930. }
  5931. // Do executes the "books.layers.volumeAnnotations.get" call.
  5932. // Exactly one of *Volumeannotation or error will be non-nil. Any
  5933. // non-2xx status code is an error. Response headers are in either
  5934. // *Volumeannotation.ServerResponse.Header or (if a response was
  5935. // returned at all) in error.(*googleapi.Error).Header. Use
  5936. // googleapi.IsNotModified to check whether the returned error was
  5937. // because http.StatusNotModified was returned.
  5938. func (c *LayersVolumeAnnotationsGetCall) Do(opts ...googleapi.CallOption) (*Volumeannotation, error) {
  5939. gensupport.SetOptions(c.urlParams_, opts...)
  5940. res, err := c.doRequest("json")
  5941. if res != nil && res.StatusCode == http.StatusNotModified {
  5942. if res.Body != nil {
  5943. res.Body.Close()
  5944. }
  5945. return nil, &googleapi.Error{
  5946. Code: res.StatusCode,
  5947. Header: res.Header,
  5948. }
  5949. }
  5950. if err != nil {
  5951. return nil, err
  5952. }
  5953. defer googleapi.CloseBody(res)
  5954. if err := googleapi.CheckResponse(res); err != nil {
  5955. return nil, err
  5956. }
  5957. ret := &Volumeannotation{
  5958. ServerResponse: googleapi.ServerResponse{
  5959. Header: res.Header,
  5960. HTTPStatusCode: res.StatusCode,
  5961. },
  5962. }
  5963. target := &ret
  5964. if err := gensupport.DecodeResponse(target, res); err != nil {
  5965. return nil, err
  5966. }
  5967. return ret, nil
  5968. // {
  5969. // "description": "Gets the volume annotation.",
  5970. // "httpMethod": "GET",
  5971. // "id": "books.layers.volumeAnnotations.get",
  5972. // "parameterOrder": [
  5973. // "volumeId",
  5974. // "layerId",
  5975. // "annotationId"
  5976. // ],
  5977. // "parameters": {
  5978. // "annotationId": {
  5979. // "description": "The ID of the volume annotation to retrieve.",
  5980. // "location": "path",
  5981. // "required": true,
  5982. // "type": "string"
  5983. // },
  5984. // "layerId": {
  5985. // "description": "The ID for the layer to get the annotations.",
  5986. // "location": "path",
  5987. // "required": true,
  5988. // "type": "string"
  5989. // },
  5990. // "locale": {
  5991. // "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.",
  5992. // "location": "query",
  5993. // "type": "string"
  5994. // },
  5995. // "source": {
  5996. // "description": "String to identify the originator of this request.",
  5997. // "location": "query",
  5998. // "type": "string"
  5999. // },
  6000. // "volumeId": {
  6001. // "description": "The volume to retrieve annotations for.",
  6002. // "location": "path",
  6003. // "required": true,
  6004. // "type": "string"
  6005. // }
  6006. // },
  6007. // "path": "volumes/{volumeId}/layers/{layerId}/annotations/{annotationId}",
  6008. // "response": {
  6009. // "$ref": "Volumeannotation"
  6010. // },
  6011. // "scopes": [
  6012. // "https://www.googleapis.com/auth/books"
  6013. // ]
  6014. // }
  6015. }
  6016. // method id "books.layers.volumeAnnotations.list":
  6017. type LayersVolumeAnnotationsListCall struct {
  6018. s *Service
  6019. volumeId string
  6020. layerId string
  6021. urlParams_ gensupport.URLParams
  6022. ifNoneMatch_ string
  6023. ctx_ context.Context
  6024. header_ http.Header
  6025. }
  6026. // List: Gets the volume annotations for a volume and layer.
  6027. func (r *LayersVolumeAnnotationsService) List(volumeId string, layerId string, contentVersion string) *LayersVolumeAnnotationsListCall {
  6028. c := &LayersVolumeAnnotationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6029. c.volumeId = volumeId
  6030. c.layerId = layerId
  6031. c.urlParams_.Set("contentVersion", contentVersion)
  6032. return c
  6033. }
  6034. // EndOffset sets the optional parameter "endOffset": The end offset to
  6035. // end retrieving data from.
  6036. func (c *LayersVolumeAnnotationsListCall) EndOffset(endOffset string) *LayersVolumeAnnotationsListCall {
  6037. c.urlParams_.Set("endOffset", endOffset)
  6038. return c
  6039. }
  6040. // EndPosition sets the optional parameter "endPosition": The end
  6041. // position to end retrieving data from.
  6042. func (c *LayersVolumeAnnotationsListCall) EndPosition(endPosition string) *LayersVolumeAnnotationsListCall {
  6043. c.urlParams_.Set("endPosition", endPosition)
  6044. return c
  6045. }
  6046. // Locale sets the optional parameter "locale": The locale information
  6047. // for the data. ISO-639-1 language and ISO-3166-1 country code. Ex:
  6048. // 'en_US'.
  6049. func (c *LayersVolumeAnnotationsListCall) Locale(locale string) *LayersVolumeAnnotationsListCall {
  6050. c.urlParams_.Set("locale", locale)
  6051. return c
  6052. }
  6053. // MaxResults sets the optional parameter "maxResults": Maximum number
  6054. // of results to return
  6055. func (c *LayersVolumeAnnotationsListCall) MaxResults(maxResults int64) *LayersVolumeAnnotationsListCall {
  6056. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  6057. return c
  6058. }
  6059. // PageToken sets the optional parameter "pageToken": The value of the
  6060. // nextToken from the previous page.
  6061. func (c *LayersVolumeAnnotationsListCall) PageToken(pageToken string) *LayersVolumeAnnotationsListCall {
  6062. c.urlParams_.Set("pageToken", pageToken)
  6063. return c
  6064. }
  6065. // ShowDeleted sets the optional parameter "showDeleted": Set to true to
  6066. // return deleted annotations. updatedMin must be in the request to use
  6067. // this. Defaults to false.
  6068. func (c *LayersVolumeAnnotationsListCall) ShowDeleted(showDeleted bool) *LayersVolumeAnnotationsListCall {
  6069. c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
  6070. return c
  6071. }
  6072. // Source sets the optional parameter "source": String to identify the
  6073. // originator of this request.
  6074. func (c *LayersVolumeAnnotationsListCall) Source(source string) *LayersVolumeAnnotationsListCall {
  6075. c.urlParams_.Set("source", source)
  6076. return c
  6077. }
  6078. // StartOffset sets the optional parameter "startOffset": The start
  6079. // offset to start retrieving data from.
  6080. func (c *LayersVolumeAnnotationsListCall) StartOffset(startOffset string) *LayersVolumeAnnotationsListCall {
  6081. c.urlParams_.Set("startOffset", startOffset)
  6082. return c
  6083. }
  6084. // StartPosition sets the optional parameter "startPosition": The start
  6085. // position to start retrieving data from.
  6086. func (c *LayersVolumeAnnotationsListCall) StartPosition(startPosition string) *LayersVolumeAnnotationsListCall {
  6087. c.urlParams_.Set("startPosition", startPosition)
  6088. return c
  6089. }
  6090. // UpdatedMax sets the optional parameter "updatedMax": RFC 3339
  6091. // timestamp to restrict to items updated prior to this timestamp
  6092. // (exclusive).
  6093. func (c *LayersVolumeAnnotationsListCall) UpdatedMax(updatedMax string) *LayersVolumeAnnotationsListCall {
  6094. c.urlParams_.Set("updatedMax", updatedMax)
  6095. return c
  6096. }
  6097. // UpdatedMin sets the optional parameter "updatedMin": RFC 3339
  6098. // timestamp to restrict to items updated since this timestamp
  6099. // (inclusive).
  6100. func (c *LayersVolumeAnnotationsListCall) UpdatedMin(updatedMin string) *LayersVolumeAnnotationsListCall {
  6101. c.urlParams_.Set("updatedMin", updatedMin)
  6102. return c
  6103. }
  6104. // VolumeAnnotationsVersion sets the optional parameter
  6105. // "volumeAnnotationsVersion": The version of the volume annotations
  6106. // that you are requesting.
  6107. func (c *LayersVolumeAnnotationsListCall) VolumeAnnotationsVersion(volumeAnnotationsVersion string) *LayersVolumeAnnotationsListCall {
  6108. c.urlParams_.Set("volumeAnnotationsVersion", volumeAnnotationsVersion)
  6109. return c
  6110. }
  6111. // Fields allows partial responses to be retrieved. See
  6112. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6113. // for more information.
  6114. func (c *LayersVolumeAnnotationsListCall) Fields(s ...googleapi.Field) *LayersVolumeAnnotationsListCall {
  6115. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6116. return c
  6117. }
  6118. // IfNoneMatch sets the optional parameter which makes the operation
  6119. // fail if the object's ETag matches the given value. This is useful for
  6120. // getting updates only after the object has changed since the last
  6121. // request. Use googleapi.IsNotModified to check whether the response
  6122. // error from Do is the result of In-None-Match.
  6123. func (c *LayersVolumeAnnotationsListCall) IfNoneMatch(entityTag string) *LayersVolumeAnnotationsListCall {
  6124. c.ifNoneMatch_ = entityTag
  6125. return c
  6126. }
  6127. // Context sets the context to be used in this call's Do method. Any
  6128. // pending HTTP request will be aborted if the provided context is
  6129. // canceled.
  6130. func (c *LayersVolumeAnnotationsListCall) Context(ctx context.Context) *LayersVolumeAnnotationsListCall {
  6131. c.ctx_ = ctx
  6132. return c
  6133. }
  6134. // Header returns an http.Header that can be modified by the caller to
  6135. // add HTTP headers to the request.
  6136. func (c *LayersVolumeAnnotationsListCall) Header() http.Header {
  6137. if c.header_ == nil {
  6138. c.header_ = make(http.Header)
  6139. }
  6140. return c.header_
  6141. }
  6142. func (c *LayersVolumeAnnotationsListCall) doRequest(alt string) (*http.Response, error) {
  6143. reqHeaders := make(http.Header)
  6144. for k, v := range c.header_ {
  6145. reqHeaders[k] = v
  6146. }
  6147. reqHeaders.Set("User-Agent", c.s.userAgent())
  6148. if c.ifNoneMatch_ != "" {
  6149. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6150. }
  6151. var body io.Reader = nil
  6152. c.urlParams_.Set("alt", alt)
  6153. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layers/{layerId}")
  6154. urls += "?" + c.urlParams_.Encode()
  6155. req, _ := http.NewRequest("GET", urls, body)
  6156. req.Header = reqHeaders
  6157. googleapi.Expand(req.URL, map[string]string{
  6158. "volumeId": c.volumeId,
  6159. "layerId": c.layerId,
  6160. })
  6161. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6162. }
  6163. // Do executes the "books.layers.volumeAnnotations.list" call.
  6164. // Exactly one of *Volumeannotations or error will be non-nil. Any
  6165. // non-2xx status code is an error. Response headers are in either
  6166. // *Volumeannotations.ServerResponse.Header or (if a response was
  6167. // returned at all) in error.(*googleapi.Error).Header. Use
  6168. // googleapi.IsNotModified to check whether the returned error was
  6169. // because http.StatusNotModified was returned.
  6170. func (c *LayersVolumeAnnotationsListCall) Do(opts ...googleapi.CallOption) (*Volumeannotations, error) {
  6171. gensupport.SetOptions(c.urlParams_, opts...)
  6172. res, err := c.doRequest("json")
  6173. if res != nil && res.StatusCode == http.StatusNotModified {
  6174. if res.Body != nil {
  6175. res.Body.Close()
  6176. }
  6177. return nil, &googleapi.Error{
  6178. Code: res.StatusCode,
  6179. Header: res.Header,
  6180. }
  6181. }
  6182. if err != nil {
  6183. return nil, err
  6184. }
  6185. defer googleapi.CloseBody(res)
  6186. if err := googleapi.CheckResponse(res); err != nil {
  6187. return nil, err
  6188. }
  6189. ret := &Volumeannotations{
  6190. ServerResponse: googleapi.ServerResponse{
  6191. Header: res.Header,
  6192. HTTPStatusCode: res.StatusCode,
  6193. },
  6194. }
  6195. target := &ret
  6196. if err := gensupport.DecodeResponse(target, res); err != nil {
  6197. return nil, err
  6198. }
  6199. return ret, nil
  6200. // {
  6201. // "description": "Gets the volume annotations for a volume and layer.",
  6202. // "httpMethod": "GET",
  6203. // "id": "books.layers.volumeAnnotations.list",
  6204. // "parameterOrder": [
  6205. // "volumeId",
  6206. // "layerId",
  6207. // "contentVersion"
  6208. // ],
  6209. // "parameters": {
  6210. // "contentVersion": {
  6211. // "description": "The content version for the requested volume.",
  6212. // "location": "query",
  6213. // "required": true,
  6214. // "type": "string"
  6215. // },
  6216. // "endOffset": {
  6217. // "description": "The end offset to end retrieving data from.",
  6218. // "location": "query",
  6219. // "type": "string"
  6220. // },
  6221. // "endPosition": {
  6222. // "description": "The end position to end retrieving data from.",
  6223. // "location": "query",
  6224. // "type": "string"
  6225. // },
  6226. // "layerId": {
  6227. // "description": "The ID for the layer to get the annotations.",
  6228. // "location": "path",
  6229. // "required": true,
  6230. // "type": "string"
  6231. // },
  6232. // "locale": {
  6233. // "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.",
  6234. // "location": "query",
  6235. // "type": "string"
  6236. // },
  6237. // "maxResults": {
  6238. // "description": "Maximum number of results to return",
  6239. // "format": "uint32",
  6240. // "location": "query",
  6241. // "maximum": "200",
  6242. // "minimum": "0",
  6243. // "type": "integer"
  6244. // },
  6245. // "pageToken": {
  6246. // "description": "The value of the nextToken from the previous page.",
  6247. // "location": "query",
  6248. // "type": "string"
  6249. // },
  6250. // "showDeleted": {
  6251. // "description": "Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false.",
  6252. // "location": "query",
  6253. // "type": "boolean"
  6254. // },
  6255. // "source": {
  6256. // "description": "String to identify the originator of this request.",
  6257. // "location": "query",
  6258. // "type": "string"
  6259. // },
  6260. // "startOffset": {
  6261. // "description": "The start offset to start retrieving data from.",
  6262. // "location": "query",
  6263. // "type": "string"
  6264. // },
  6265. // "startPosition": {
  6266. // "description": "The start position to start retrieving data from.",
  6267. // "location": "query",
  6268. // "type": "string"
  6269. // },
  6270. // "updatedMax": {
  6271. // "description": "RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).",
  6272. // "location": "query",
  6273. // "type": "string"
  6274. // },
  6275. // "updatedMin": {
  6276. // "description": "RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).",
  6277. // "location": "query",
  6278. // "type": "string"
  6279. // },
  6280. // "volumeAnnotationsVersion": {
  6281. // "description": "The version of the volume annotations that you are requesting.",
  6282. // "location": "query",
  6283. // "type": "string"
  6284. // },
  6285. // "volumeId": {
  6286. // "description": "The volume to retrieve annotations for.",
  6287. // "location": "path",
  6288. // "required": true,
  6289. // "type": "string"
  6290. // }
  6291. // },
  6292. // "path": "volumes/{volumeId}/layers/{layerId}",
  6293. // "response": {
  6294. // "$ref": "Volumeannotations"
  6295. // },
  6296. // "scopes": [
  6297. // "https://www.googleapis.com/auth/books"
  6298. // ]
  6299. // }
  6300. }
  6301. // Pages invokes f for each page of results.
  6302. // A non-nil error returned from f will halt the iteration.
  6303. // The provided context supersedes any context provided to the Context method.
  6304. func (c *LayersVolumeAnnotationsListCall) Pages(ctx context.Context, f func(*Volumeannotations) error) error {
  6305. c.ctx_ = ctx
  6306. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6307. for {
  6308. x, err := c.Do()
  6309. if err != nil {
  6310. return err
  6311. }
  6312. if err := f(x); err != nil {
  6313. return err
  6314. }
  6315. if x.NextPageToken == "" {
  6316. return nil
  6317. }
  6318. c.PageToken(x.NextPageToken)
  6319. }
  6320. }
  6321. // method id "books.myconfig.getUserSettings":
  6322. type MyconfigGetUserSettingsCall struct {
  6323. s *Service
  6324. urlParams_ gensupport.URLParams
  6325. ifNoneMatch_ string
  6326. ctx_ context.Context
  6327. header_ http.Header
  6328. }
  6329. // GetUserSettings: Gets the current settings for the user.
  6330. func (r *MyconfigService) GetUserSettings() *MyconfigGetUserSettingsCall {
  6331. c := &MyconfigGetUserSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6332. return c
  6333. }
  6334. // Fields allows partial responses to be retrieved. See
  6335. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6336. // for more information.
  6337. func (c *MyconfigGetUserSettingsCall) Fields(s ...googleapi.Field) *MyconfigGetUserSettingsCall {
  6338. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6339. return c
  6340. }
  6341. // IfNoneMatch sets the optional parameter which makes the operation
  6342. // fail if the object's ETag matches the given value. This is useful for
  6343. // getting updates only after the object has changed since the last
  6344. // request. Use googleapi.IsNotModified to check whether the response
  6345. // error from Do is the result of In-None-Match.
  6346. func (c *MyconfigGetUserSettingsCall) IfNoneMatch(entityTag string) *MyconfigGetUserSettingsCall {
  6347. c.ifNoneMatch_ = entityTag
  6348. return c
  6349. }
  6350. // Context sets the context to be used in this call's Do method. Any
  6351. // pending HTTP request will be aborted if the provided context is
  6352. // canceled.
  6353. func (c *MyconfigGetUserSettingsCall) Context(ctx context.Context) *MyconfigGetUserSettingsCall {
  6354. c.ctx_ = ctx
  6355. return c
  6356. }
  6357. // Header returns an http.Header that can be modified by the caller to
  6358. // add HTTP headers to the request.
  6359. func (c *MyconfigGetUserSettingsCall) Header() http.Header {
  6360. if c.header_ == nil {
  6361. c.header_ = make(http.Header)
  6362. }
  6363. return c.header_
  6364. }
  6365. func (c *MyconfigGetUserSettingsCall) doRequest(alt string) (*http.Response, error) {
  6366. reqHeaders := make(http.Header)
  6367. for k, v := range c.header_ {
  6368. reqHeaders[k] = v
  6369. }
  6370. reqHeaders.Set("User-Agent", c.s.userAgent())
  6371. if c.ifNoneMatch_ != "" {
  6372. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6373. }
  6374. var body io.Reader = nil
  6375. c.urlParams_.Set("alt", alt)
  6376. urls := googleapi.ResolveRelative(c.s.BasePath, "myconfig/getUserSettings")
  6377. urls += "?" + c.urlParams_.Encode()
  6378. req, _ := http.NewRequest("GET", urls, body)
  6379. req.Header = reqHeaders
  6380. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6381. }
  6382. // Do executes the "books.myconfig.getUserSettings" call.
  6383. // Exactly one of *Usersettings or error will be non-nil. Any non-2xx
  6384. // status code is an error. Response headers are in either
  6385. // *Usersettings.ServerResponse.Header or (if a response was returned at
  6386. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6387. // to check whether the returned error was because
  6388. // http.StatusNotModified was returned.
  6389. func (c *MyconfigGetUserSettingsCall) Do(opts ...googleapi.CallOption) (*Usersettings, error) {
  6390. gensupport.SetOptions(c.urlParams_, opts...)
  6391. res, err := c.doRequest("json")
  6392. if res != nil && res.StatusCode == http.StatusNotModified {
  6393. if res.Body != nil {
  6394. res.Body.Close()
  6395. }
  6396. return nil, &googleapi.Error{
  6397. Code: res.StatusCode,
  6398. Header: res.Header,
  6399. }
  6400. }
  6401. if err != nil {
  6402. return nil, err
  6403. }
  6404. defer googleapi.CloseBody(res)
  6405. if err := googleapi.CheckResponse(res); err != nil {
  6406. return nil, err
  6407. }
  6408. ret := &Usersettings{
  6409. ServerResponse: googleapi.ServerResponse{
  6410. Header: res.Header,
  6411. HTTPStatusCode: res.StatusCode,
  6412. },
  6413. }
  6414. target := &ret
  6415. if err := gensupport.DecodeResponse(target, res); err != nil {
  6416. return nil, err
  6417. }
  6418. return ret, nil
  6419. // {
  6420. // "description": "Gets the current settings for the user.",
  6421. // "httpMethod": "GET",
  6422. // "id": "books.myconfig.getUserSettings",
  6423. // "path": "myconfig/getUserSettings",
  6424. // "response": {
  6425. // "$ref": "Usersettings"
  6426. // },
  6427. // "scopes": [
  6428. // "https://www.googleapis.com/auth/books"
  6429. // ]
  6430. // }
  6431. }
  6432. // method id "books.myconfig.releaseDownloadAccess":
  6433. type MyconfigReleaseDownloadAccessCall struct {
  6434. s *Service
  6435. urlParams_ gensupport.URLParams
  6436. ctx_ context.Context
  6437. header_ http.Header
  6438. }
  6439. // ReleaseDownloadAccess: Release downloaded content access restriction.
  6440. func (r *MyconfigService) ReleaseDownloadAccess(volumeIds []string, cpksver string) *MyconfigReleaseDownloadAccessCall {
  6441. c := &MyconfigReleaseDownloadAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6442. c.urlParams_.SetMulti("volumeIds", append([]string{}, volumeIds...))
  6443. c.urlParams_.Set("cpksver", cpksver)
  6444. return c
  6445. }
  6446. // Locale sets the optional parameter "locale": ISO-639-1, ISO-3166-1
  6447. // codes for message localization, i.e. en_US.
  6448. func (c *MyconfigReleaseDownloadAccessCall) Locale(locale string) *MyconfigReleaseDownloadAccessCall {
  6449. c.urlParams_.Set("locale", locale)
  6450. return c
  6451. }
  6452. // Source sets the optional parameter "source": String to identify the
  6453. // originator of this request.
  6454. func (c *MyconfigReleaseDownloadAccessCall) Source(source string) *MyconfigReleaseDownloadAccessCall {
  6455. c.urlParams_.Set("source", source)
  6456. return c
  6457. }
  6458. // Fields allows partial responses to be retrieved. See
  6459. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6460. // for more information.
  6461. func (c *MyconfigReleaseDownloadAccessCall) Fields(s ...googleapi.Field) *MyconfigReleaseDownloadAccessCall {
  6462. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6463. return c
  6464. }
  6465. // Context sets the context to be used in this call's Do method. Any
  6466. // pending HTTP request will be aborted if the provided context is
  6467. // canceled.
  6468. func (c *MyconfigReleaseDownloadAccessCall) Context(ctx context.Context) *MyconfigReleaseDownloadAccessCall {
  6469. c.ctx_ = ctx
  6470. return c
  6471. }
  6472. // Header returns an http.Header that can be modified by the caller to
  6473. // add HTTP headers to the request.
  6474. func (c *MyconfigReleaseDownloadAccessCall) Header() http.Header {
  6475. if c.header_ == nil {
  6476. c.header_ = make(http.Header)
  6477. }
  6478. return c.header_
  6479. }
  6480. func (c *MyconfigReleaseDownloadAccessCall) doRequest(alt string) (*http.Response, error) {
  6481. reqHeaders := make(http.Header)
  6482. for k, v := range c.header_ {
  6483. reqHeaders[k] = v
  6484. }
  6485. reqHeaders.Set("User-Agent", c.s.userAgent())
  6486. var body io.Reader = nil
  6487. c.urlParams_.Set("alt", alt)
  6488. urls := googleapi.ResolveRelative(c.s.BasePath, "myconfig/releaseDownloadAccess")
  6489. urls += "?" + c.urlParams_.Encode()
  6490. req, _ := http.NewRequest("POST", urls, body)
  6491. req.Header = reqHeaders
  6492. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6493. }
  6494. // Do executes the "books.myconfig.releaseDownloadAccess" call.
  6495. // Exactly one of *DownloadAccesses or error will be non-nil. Any
  6496. // non-2xx status code is an error. Response headers are in either
  6497. // *DownloadAccesses.ServerResponse.Header or (if a response was
  6498. // returned at all) in error.(*googleapi.Error).Header. Use
  6499. // googleapi.IsNotModified to check whether the returned error was
  6500. // because http.StatusNotModified was returned.
  6501. func (c *MyconfigReleaseDownloadAccessCall) Do(opts ...googleapi.CallOption) (*DownloadAccesses, error) {
  6502. gensupport.SetOptions(c.urlParams_, opts...)
  6503. res, err := c.doRequest("json")
  6504. if res != nil && res.StatusCode == http.StatusNotModified {
  6505. if res.Body != nil {
  6506. res.Body.Close()
  6507. }
  6508. return nil, &googleapi.Error{
  6509. Code: res.StatusCode,
  6510. Header: res.Header,
  6511. }
  6512. }
  6513. if err != nil {
  6514. return nil, err
  6515. }
  6516. defer googleapi.CloseBody(res)
  6517. if err := googleapi.CheckResponse(res); err != nil {
  6518. return nil, err
  6519. }
  6520. ret := &DownloadAccesses{
  6521. ServerResponse: googleapi.ServerResponse{
  6522. Header: res.Header,
  6523. HTTPStatusCode: res.StatusCode,
  6524. },
  6525. }
  6526. target := &ret
  6527. if err := gensupport.DecodeResponse(target, res); err != nil {
  6528. return nil, err
  6529. }
  6530. return ret, nil
  6531. // {
  6532. // "description": "Release downloaded content access restriction.",
  6533. // "httpMethod": "POST",
  6534. // "id": "books.myconfig.releaseDownloadAccess",
  6535. // "parameterOrder": [
  6536. // "volumeIds",
  6537. // "cpksver"
  6538. // ],
  6539. // "parameters": {
  6540. // "cpksver": {
  6541. // "description": "The device/version ID from which to release the restriction.",
  6542. // "location": "query",
  6543. // "required": true,
  6544. // "type": "string"
  6545. // },
  6546. // "locale": {
  6547. // "description": "ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.",
  6548. // "location": "query",
  6549. // "type": "string"
  6550. // },
  6551. // "source": {
  6552. // "description": "String to identify the originator of this request.",
  6553. // "location": "query",
  6554. // "type": "string"
  6555. // },
  6556. // "volumeIds": {
  6557. // "description": "The volume(s) to release restrictions for.",
  6558. // "location": "query",
  6559. // "repeated": true,
  6560. // "required": true,
  6561. // "type": "string"
  6562. // }
  6563. // },
  6564. // "path": "myconfig/releaseDownloadAccess",
  6565. // "response": {
  6566. // "$ref": "DownloadAccesses"
  6567. // },
  6568. // "scopes": [
  6569. // "https://www.googleapis.com/auth/books"
  6570. // ]
  6571. // }
  6572. }
  6573. // method id "books.myconfig.requestAccess":
  6574. type MyconfigRequestAccessCall struct {
  6575. s *Service
  6576. urlParams_ gensupport.URLParams
  6577. ctx_ context.Context
  6578. header_ http.Header
  6579. }
  6580. // RequestAccess: Request concurrent and download access restrictions.
  6581. func (r *MyconfigService) RequestAccess(source string, volumeId string, nonce string, cpksver string) *MyconfigRequestAccessCall {
  6582. c := &MyconfigRequestAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6583. c.urlParams_.Set("source", source)
  6584. c.urlParams_.Set("volumeId", volumeId)
  6585. c.urlParams_.Set("nonce", nonce)
  6586. c.urlParams_.Set("cpksver", cpksver)
  6587. return c
  6588. }
  6589. // LicenseTypes sets the optional parameter "licenseTypes": The type of
  6590. // access license to request. If not specified, the default is BOTH.
  6591. //
  6592. // Possible values:
  6593. // "BOTH" - Both concurrent and download licenses.
  6594. // "CONCURRENT" - Concurrent access license.
  6595. // "DOWNLOAD" - Offline download access license.
  6596. func (c *MyconfigRequestAccessCall) LicenseTypes(licenseTypes string) *MyconfigRequestAccessCall {
  6597. c.urlParams_.Set("licenseTypes", licenseTypes)
  6598. return c
  6599. }
  6600. // Locale sets the optional parameter "locale": ISO-639-1, ISO-3166-1
  6601. // codes for message localization, i.e. en_US.
  6602. func (c *MyconfigRequestAccessCall) Locale(locale string) *MyconfigRequestAccessCall {
  6603. c.urlParams_.Set("locale", locale)
  6604. return c
  6605. }
  6606. // Fields allows partial responses to be retrieved. See
  6607. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6608. // for more information.
  6609. func (c *MyconfigRequestAccessCall) Fields(s ...googleapi.Field) *MyconfigRequestAccessCall {
  6610. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6611. return c
  6612. }
  6613. // Context sets the context to be used in this call's Do method. Any
  6614. // pending HTTP request will be aborted if the provided context is
  6615. // canceled.
  6616. func (c *MyconfigRequestAccessCall) Context(ctx context.Context) *MyconfigRequestAccessCall {
  6617. c.ctx_ = ctx
  6618. return c
  6619. }
  6620. // Header returns an http.Header that can be modified by the caller to
  6621. // add HTTP headers to the request.
  6622. func (c *MyconfigRequestAccessCall) Header() http.Header {
  6623. if c.header_ == nil {
  6624. c.header_ = make(http.Header)
  6625. }
  6626. return c.header_
  6627. }
  6628. func (c *MyconfigRequestAccessCall) doRequest(alt string) (*http.Response, error) {
  6629. reqHeaders := make(http.Header)
  6630. for k, v := range c.header_ {
  6631. reqHeaders[k] = v
  6632. }
  6633. reqHeaders.Set("User-Agent", c.s.userAgent())
  6634. var body io.Reader = nil
  6635. c.urlParams_.Set("alt", alt)
  6636. urls := googleapi.ResolveRelative(c.s.BasePath, "myconfig/requestAccess")
  6637. urls += "?" + c.urlParams_.Encode()
  6638. req, _ := http.NewRequest("POST", urls, body)
  6639. req.Header = reqHeaders
  6640. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6641. }
  6642. // Do executes the "books.myconfig.requestAccess" call.
  6643. // Exactly one of *RequestAccess or error will be non-nil. Any non-2xx
  6644. // status code is an error. Response headers are in either
  6645. // *RequestAccess.ServerResponse.Header or (if a response was returned
  6646. // at all) in error.(*googleapi.Error).Header. Use
  6647. // googleapi.IsNotModified to check whether the returned error was
  6648. // because http.StatusNotModified was returned.
  6649. func (c *MyconfigRequestAccessCall) Do(opts ...googleapi.CallOption) (*RequestAccess, error) {
  6650. gensupport.SetOptions(c.urlParams_, opts...)
  6651. res, err := c.doRequest("json")
  6652. if res != nil && res.StatusCode == http.StatusNotModified {
  6653. if res.Body != nil {
  6654. res.Body.Close()
  6655. }
  6656. return nil, &googleapi.Error{
  6657. Code: res.StatusCode,
  6658. Header: res.Header,
  6659. }
  6660. }
  6661. if err != nil {
  6662. return nil, err
  6663. }
  6664. defer googleapi.CloseBody(res)
  6665. if err := googleapi.CheckResponse(res); err != nil {
  6666. return nil, err
  6667. }
  6668. ret := &RequestAccess{
  6669. ServerResponse: googleapi.ServerResponse{
  6670. Header: res.Header,
  6671. HTTPStatusCode: res.StatusCode,
  6672. },
  6673. }
  6674. target := &ret
  6675. if err := gensupport.DecodeResponse(target, res); err != nil {
  6676. return nil, err
  6677. }
  6678. return ret, nil
  6679. // {
  6680. // "description": "Request concurrent and download access restrictions.",
  6681. // "httpMethod": "POST",
  6682. // "id": "books.myconfig.requestAccess",
  6683. // "parameterOrder": [
  6684. // "source",
  6685. // "volumeId",
  6686. // "nonce",
  6687. // "cpksver"
  6688. // ],
  6689. // "parameters": {
  6690. // "cpksver": {
  6691. // "description": "The device/version ID from which to request the restrictions.",
  6692. // "location": "query",
  6693. // "required": true,
  6694. // "type": "string"
  6695. // },
  6696. // "licenseTypes": {
  6697. // "description": "The type of access license to request. If not specified, the default is BOTH.",
  6698. // "enum": [
  6699. // "BOTH",
  6700. // "CONCURRENT",
  6701. // "DOWNLOAD"
  6702. // ],
  6703. // "enumDescriptions": [
  6704. // "Both concurrent and download licenses.",
  6705. // "Concurrent access license.",
  6706. // "Offline download access license."
  6707. // ],
  6708. // "location": "query",
  6709. // "type": "string"
  6710. // },
  6711. // "locale": {
  6712. // "description": "ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.",
  6713. // "location": "query",
  6714. // "type": "string"
  6715. // },
  6716. // "nonce": {
  6717. // "description": "The client nonce value.",
  6718. // "location": "query",
  6719. // "required": true,
  6720. // "type": "string"
  6721. // },
  6722. // "source": {
  6723. // "description": "String to identify the originator of this request.",
  6724. // "location": "query",
  6725. // "required": true,
  6726. // "type": "string"
  6727. // },
  6728. // "volumeId": {
  6729. // "description": "The volume to request concurrent/download restrictions for.",
  6730. // "location": "query",
  6731. // "required": true,
  6732. // "type": "string"
  6733. // }
  6734. // },
  6735. // "path": "myconfig/requestAccess",
  6736. // "response": {
  6737. // "$ref": "RequestAccess"
  6738. // },
  6739. // "scopes": [
  6740. // "https://www.googleapis.com/auth/books"
  6741. // ]
  6742. // }
  6743. }
  6744. // method id "books.myconfig.syncVolumeLicenses":
  6745. type MyconfigSyncVolumeLicensesCall struct {
  6746. s *Service
  6747. urlParams_ gensupport.URLParams
  6748. ctx_ context.Context
  6749. header_ http.Header
  6750. }
  6751. // SyncVolumeLicenses: Request downloaded content access for specified
  6752. // volumes on the My eBooks shelf.
  6753. func (r *MyconfigService) SyncVolumeLicenses(source string, nonce string, cpksver string) *MyconfigSyncVolumeLicensesCall {
  6754. c := &MyconfigSyncVolumeLicensesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6755. c.urlParams_.Set("source", source)
  6756. c.urlParams_.Set("nonce", nonce)
  6757. c.urlParams_.Set("cpksver", cpksver)
  6758. return c
  6759. }
  6760. // Features sets the optional parameter "features": List of features
  6761. // supported by the client, i.e., 'RENTALS'
  6762. //
  6763. // Possible values:
  6764. // "RENTALS" - Client supports rentals.
  6765. func (c *MyconfigSyncVolumeLicensesCall) Features(features ...string) *MyconfigSyncVolumeLicensesCall {
  6766. c.urlParams_.SetMulti("features", append([]string{}, features...))
  6767. return c
  6768. }
  6769. // IncludeNonComicsSeries sets the optional parameter
  6770. // "includeNonComicsSeries": Set to true to include non-comics series.
  6771. // Defaults to false.
  6772. func (c *MyconfigSyncVolumeLicensesCall) IncludeNonComicsSeries(includeNonComicsSeries bool) *MyconfigSyncVolumeLicensesCall {
  6773. c.urlParams_.Set("includeNonComicsSeries", fmt.Sprint(includeNonComicsSeries))
  6774. return c
  6775. }
  6776. // Locale sets the optional parameter "locale": ISO-639-1, ISO-3166-1
  6777. // codes for message localization, i.e. en_US.
  6778. func (c *MyconfigSyncVolumeLicensesCall) Locale(locale string) *MyconfigSyncVolumeLicensesCall {
  6779. c.urlParams_.Set("locale", locale)
  6780. return c
  6781. }
  6782. // ShowPreorders sets the optional parameter "showPreorders": Set to
  6783. // true to show pre-ordered books. Defaults to false.
  6784. func (c *MyconfigSyncVolumeLicensesCall) ShowPreorders(showPreorders bool) *MyconfigSyncVolumeLicensesCall {
  6785. c.urlParams_.Set("showPreorders", fmt.Sprint(showPreorders))
  6786. return c
  6787. }
  6788. // VolumeIds sets the optional parameter "volumeIds": The volume(s) to
  6789. // request download restrictions for.
  6790. func (c *MyconfigSyncVolumeLicensesCall) VolumeIds(volumeIds ...string) *MyconfigSyncVolumeLicensesCall {
  6791. c.urlParams_.SetMulti("volumeIds", append([]string{}, volumeIds...))
  6792. return c
  6793. }
  6794. // Fields allows partial responses to be retrieved. See
  6795. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6796. // for more information.
  6797. func (c *MyconfigSyncVolumeLicensesCall) Fields(s ...googleapi.Field) *MyconfigSyncVolumeLicensesCall {
  6798. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6799. return c
  6800. }
  6801. // Context sets the context to be used in this call's Do method. Any
  6802. // pending HTTP request will be aborted if the provided context is
  6803. // canceled.
  6804. func (c *MyconfigSyncVolumeLicensesCall) Context(ctx context.Context) *MyconfigSyncVolumeLicensesCall {
  6805. c.ctx_ = ctx
  6806. return c
  6807. }
  6808. // Header returns an http.Header that can be modified by the caller to
  6809. // add HTTP headers to the request.
  6810. func (c *MyconfigSyncVolumeLicensesCall) Header() http.Header {
  6811. if c.header_ == nil {
  6812. c.header_ = make(http.Header)
  6813. }
  6814. return c.header_
  6815. }
  6816. func (c *MyconfigSyncVolumeLicensesCall) doRequest(alt string) (*http.Response, error) {
  6817. reqHeaders := make(http.Header)
  6818. for k, v := range c.header_ {
  6819. reqHeaders[k] = v
  6820. }
  6821. reqHeaders.Set("User-Agent", c.s.userAgent())
  6822. var body io.Reader = nil
  6823. c.urlParams_.Set("alt", alt)
  6824. urls := googleapi.ResolveRelative(c.s.BasePath, "myconfig/syncVolumeLicenses")
  6825. urls += "?" + c.urlParams_.Encode()
  6826. req, _ := http.NewRequest("POST", urls, body)
  6827. req.Header = reqHeaders
  6828. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6829. }
  6830. // Do executes the "books.myconfig.syncVolumeLicenses" call.
  6831. // Exactly one of *Volumes or error will be non-nil. Any non-2xx status
  6832. // code is an error. Response headers are in either
  6833. // *Volumes.ServerResponse.Header or (if a response was returned at all)
  6834. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6835. // check whether the returned error was because http.StatusNotModified
  6836. // was returned.
  6837. func (c *MyconfigSyncVolumeLicensesCall) Do(opts ...googleapi.CallOption) (*Volumes, error) {
  6838. gensupport.SetOptions(c.urlParams_, opts...)
  6839. res, err := c.doRequest("json")
  6840. if res != nil && res.StatusCode == http.StatusNotModified {
  6841. if res.Body != nil {
  6842. res.Body.Close()
  6843. }
  6844. return nil, &googleapi.Error{
  6845. Code: res.StatusCode,
  6846. Header: res.Header,
  6847. }
  6848. }
  6849. if err != nil {
  6850. return nil, err
  6851. }
  6852. defer googleapi.CloseBody(res)
  6853. if err := googleapi.CheckResponse(res); err != nil {
  6854. return nil, err
  6855. }
  6856. ret := &Volumes{
  6857. ServerResponse: googleapi.ServerResponse{
  6858. Header: res.Header,
  6859. HTTPStatusCode: res.StatusCode,
  6860. },
  6861. }
  6862. target := &ret
  6863. if err := gensupport.DecodeResponse(target, res); err != nil {
  6864. return nil, err
  6865. }
  6866. return ret, nil
  6867. // {
  6868. // "description": "Request downloaded content access for specified volumes on the My eBooks shelf.",
  6869. // "httpMethod": "POST",
  6870. // "id": "books.myconfig.syncVolumeLicenses",
  6871. // "parameterOrder": [
  6872. // "source",
  6873. // "nonce",
  6874. // "cpksver"
  6875. // ],
  6876. // "parameters": {
  6877. // "cpksver": {
  6878. // "description": "The device/version ID from which to release the restriction.",
  6879. // "location": "query",
  6880. // "required": true,
  6881. // "type": "string"
  6882. // },
  6883. // "features": {
  6884. // "description": "List of features supported by the client, i.e., 'RENTALS'",
  6885. // "enum": [
  6886. // "RENTALS"
  6887. // ],
  6888. // "enumDescriptions": [
  6889. // "Client supports rentals."
  6890. // ],
  6891. // "location": "query",
  6892. // "repeated": true,
  6893. // "type": "string"
  6894. // },
  6895. // "includeNonComicsSeries": {
  6896. // "description": "Set to true to include non-comics series. Defaults to false.",
  6897. // "location": "query",
  6898. // "type": "boolean"
  6899. // },
  6900. // "locale": {
  6901. // "description": "ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.",
  6902. // "location": "query",
  6903. // "type": "string"
  6904. // },
  6905. // "nonce": {
  6906. // "description": "The client nonce value.",
  6907. // "location": "query",
  6908. // "required": true,
  6909. // "type": "string"
  6910. // },
  6911. // "showPreorders": {
  6912. // "description": "Set to true to show pre-ordered books. Defaults to false.",
  6913. // "location": "query",
  6914. // "type": "boolean"
  6915. // },
  6916. // "source": {
  6917. // "description": "String to identify the originator of this request.",
  6918. // "location": "query",
  6919. // "required": true,
  6920. // "type": "string"
  6921. // },
  6922. // "volumeIds": {
  6923. // "description": "The volume(s) to request download restrictions for.",
  6924. // "location": "query",
  6925. // "repeated": true,
  6926. // "type": "string"
  6927. // }
  6928. // },
  6929. // "path": "myconfig/syncVolumeLicenses",
  6930. // "response": {
  6931. // "$ref": "Volumes"
  6932. // },
  6933. // "scopes": [
  6934. // "https://www.googleapis.com/auth/books"
  6935. // ]
  6936. // }
  6937. }
  6938. // method id "books.myconfig.updateUserSettings":
  6939. type MyconfigUpdateUserSettingsCall struct {
  6940. s *Service
  6941. usersettings *Usersettings
  6942. urlParams_ gensupport.URLParams
  6943. ctx_ context.Context
  6944. header_ http.Header
  6945. }
  6946. // UpdateUserSettings: Sets the settings for the user. If a sub-object
  6947. // is specified, it will overwrite the existing sub-object stored in the
  6948. // server. Unspecified sub-objects will retain the existing value.
  6949. func (r *MyconfigService) UpdateUserSettings(usersettings *Usersettings) *MyconfigUpdateUserSettingsCall {
  6950. c := &MyconfigUpdateUserSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6951. c.usersettings = usersettings
  6952. return c
  6953. }
  6954. // Fields allows partial responses to be retrieved. See
  6955. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6956. // for more information.
  6957. func (c *MyconfigUpdateUserSettingsCall) Fields(s ...googleapi.Field) *MyconfigUpdateUserSettingsCall {
  6958. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6959. return c
  6960. }
  6961. // Context sets the context to be used in this call's Do method. Any
  6962. // pending HTTP request will be aborted if the provided context is
  6963. // canceled.
  6964. func (c *MyconfigUpdateUserSettingsCall) Context(ctx context.Context) *MyconfigUpdateUserSettingsCall {
  6965. c.ctx_ = ctx
  6966. return c
  6967. }
  6968. // Header returns an http.Header that can be modified by the caller to
  6969. // add HTTP headers to the request.
  6970. func (c *MyconfigUpdateUserSettingsCall) Header() http.Header {
  6971. if c.header_ == nil {
  6972. c.header_ = make(http.Header)
  6973. }
  6974. return c.header_
  6975. }
  6976. func (c *MyconfigUpdateUserSettingsCall) doRequest(alt string) (*http.Response, error) {
  6977. reqHeaders := make(http.Header)
  6978. for k, v := range c.header_ {
  6979. reqHeaders[k] = v
  6980. }
  6981. reqHeaders.Set("User-Agent", c.s.userAgent())
  6982. var body io.Reader = nil
  6983. body, err := googleapi.WithoutDataWrapper.JSONReader(c.usersettings)
  6984. if err != nil {
  6985. return nil, err
  6986. }
  6987. reqHeaders.Set("Content-Type", "application/json")
  6988. c.urlParams_.Set("alt", alt)
  6989. urls := googleapi.ResolveRelative(c.s.BasePath, "myconfig/updateUserSettings")
  6990. urls += "?" + c.urlParams_.Encode()
  6991. req, _ := http.NewRequest("POST", urls, body)
  6992. req.Header = reqHeaders
  6993. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6994. }
  6995. // Do executes the "books.myconfig.updateUserSettings" call.
  6996. // Exactly one of *Usersettings or error will be non-nil. Any non-2xx
  6997. // status code is an error. Response headers are in either
  6998. // *Usersettings.ServerResponse.Header or (if a response was returned at
  6999. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7000. // to check whether the returned error was because
  7001. // http.StatusNotModified was returned.
  7002. func (c *MyconfigUpdateUserSettingsCall) Do(opts ...googleapi.CallOption) (*Usersettings, error) {
  7003. gensupport.SetOptions(c.urlParams_, opts...)
  7004. res, err := c.doRequest("json")
  7005. if res != nil && res.StatusCode == http.StatusNotModified {
  7006. if res.Body != nil {
  7007. res.Body.Close()
  7008. }
  7009. return nil, &googleapi.Error{
  7010. Code: res.StatusCode,
  7011. Header: res.Header,
  7012. }
  7013. }
  7014. if err != nil {
  7015. return nil, err
  7016. }
  7017. defer googleapi.CloseBody(res)
  7018. if err := googleapi.CheckResponse(res); err != nil {
  7019. return nil, err
  7020. }
  7021. ret := &Usersettings{
  7022. ServerResponse: googleapi.ServerResponse{
  7023. Header: res.Header,
  7024. HTTPStatusCode: res.StatusCode,
  7025. },
  7026. }
  7027. target := &ret
  7028. if err := gensupport.DecodeResponse(target, res); err != nil {
  7029. return nil, err
  7030. }
  7031. return ret, nil
  7032. // {
  7033. // "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.",
  7034. // "httpMethod": "POST",
  7035. // "id": "books.myconfig.updateUserSettings",
  7036. // "path": "myconfig/updateUserSettings",
  7037. // "request": {
  7038. // "$ref": "Usersettings"
  7039. // },
  7040. // "response": {
  7041. // "$ref": "Usersettings"
  7042. // },
  7043. // "scopes": [
  7044. // "https://www.googleapis.com/auth/books"
  7045. // ]
  7046. // }
  7047. }
  7048. // method id "books.mylibrary.annotations.delete":
  7049. type MylibraryAnnotationsDeleteCall struct {
  7050. s *Service
  7051. annotationId string
  7052. urlParams_ gensupport.URLParams
  7053. ctx_ context.Context
  7054. header_ http.Header
  7055. }
  7056. // Delete: Deletes an annotation.
  7057. func (r *MylibraryAnnotationsService) Delete(annotationId string) *MylibraryAnnotationsDeleteCall {
  7058. c := &MylibraryAnnotationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7059. c.annotationId = annotationId
  7060. return c
  7061. }
  7062. // Source sets the optional parameter "source": String to identify the
  7063. // originator of this request.
  7064. func (c *MylibraryAnnotationsDeleteCall) Source(source string) *MylibraryAnnotationsDeleteCall {
  7065. c.urlParams_.Set("source", source)
  7066. return c
  7067. }
  7068. // Fields allows partial responses to be retrieved. See
  7069. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7070. // for more information.
  7071. func (c *MylibraryAnnotationsDeleteCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsDeleteCall {
  7072. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7073. return c
  7074. }
  7075. // Context sets the context to be used in this call's Do method. Any
  7076. // pending HTTP request will be aborted if the provided context is
  7077. // canceled.
  7078. func (c *MylibraryAnnotationsDeleteCall) Context(ctx context.Context) *MylibraryAnnotationsDeleteCall {
  7079. c.ctx_ = ctx
  7080. return c
  7081. }
  7082. // Header returns an http.Header that can be modified by the caller to
  7083. // add HTTP headers to the request.
  7084. func (c *MylibraryAnnotationsDeleteCall) Header() http.Header {
  7085. if c.header_ == nil {
  7086. c.header_ = make(http.Header)
  7087. }
  7088. return c.header_
  7089. }
  7090. func (c *MylibraryAnnotationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7091. reqHeaders := make(http.Header)
  7092. for k, v := range c.header_ {
  7093. reqHeaders[k] = v
  7094. }
  7095. reqHeaders.Set("User-Agent", c.s.userAgent())
  7096. var body io.Reader = nil
  7097. c.urlParams_.Set("alt", alt)
  7098. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations/{annotationId}")
  7099. urls += "?" + c.urlParams_.Encode()
  7100. req, _ := http.NewRequest("DELETE", urls, body)
  7101. req.Header = reqHeaders
  7102. googleapi.Expand(req.URL, map[string]string{
  7103. "annotationId": c.annotationId,
  7104. })
  7105. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7106. }
  7107. // Do executes the "books.mylibrary.annotations.delete" call.
  7108. func (c *MylibraryAnnotationsDeleteCall) Do(opts ...googleapi.CallOption) error {
  7109. gensupport.SetOptions(c.urlParams_, opts...)
  7110. res, err := c.doRequest("json")
  7111. if err != nil {
  7112. return err
  7113. }
  7114. defer googleapi.CloseBody(res)
  7115. if err := googleapi.CheckResponse(res); err != nil {
  7116. return err
  7117. }
  7118. return nil
  7119. // {
  7120. // "description": "Deletes an annotation.",
  7121. // "httpMethod": "DELETE",
  7122. // "id": "books.mylibrary.annotations.delete",
  7123. // "parameterOrder": [
  7124. // "annotationId"
  7125. // ],
  7126. // "parameters": {
  7127. // "annotationId": {
  7128. // "description": "The ID for the annotation to delete.",
  7129. // "location": "path",
  7130. // "required": true,
  7131. // "type": "string"
  7132. // },
  7133. // "source": {
  7134. // "description": "String to identify the originator of this request.",
  7135. // "location": "query",
  7136. // "type": "string"
  7137. // }
  7138. // },
  7139. // "path": "mylibrary/annotations/{annotationId}",
  7140. // "scopes": [
  7141. // "https://www.googleapis.com/auth/books"
  7142. // ]
  7143. // }
  7144. }
  7145. // method id "books.mylibrary.annotations.insert":
  7146. type MylibraryAnnotationsInsertCall struct {
  7147. s *Service
  7148. annotation *Annotation
  7149. urlParams_ gensupport.URLParams
  7150. ctx_ context.Context
  7151. header_ http.Header
  7152. }
  7153. // Insert: Inserts a new annotation.
  7154. func (r *MylibraryAnnotationsService) Insert(annotation *Annotation) *MylibraryAnnotationsInsertCall {
  7155. c := &MylibraryAnnotationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7156. c.annotation = annotation
  7157. return c
  7158. }
  7159. // AnnotationId sets the optional parameter "annotationId": The ID for
  7160. // the annotation to insert.
  7161. func (c *MylibraryAnnotationsInsertCall) AnnotationId(annotationId string) *MylibraryAnnotationsInsertCall {
  7162. c.urlParams_.Set("annotationId", annotationId)
  7163. return c
  7164. }
  7165. // Country sets the optional parameter "country": ISO-3166-1 code to
  7166. // override the IP-based location.
  7167. func (c *MylibraryAnnotationsInsertCall) Country(country string) *MylibraryAnnotationsInsertCall {
  7168. c.urlParams_.Set("country", country)
  7169. return c
  7170. }
  7171. // ShowOnlySummaryInResponse sets the optional parameter
  7172. // "showOnlySummaryInResponse": Requests that only the summary of the
  7173. // specified layer be provided in the response.
  7174. func (c *MylibraryAnnotationsInsertCall) ShowOnlySummaryInResponse(showOnlySummaryInResponse bool) *MylibraryAnnotationsInsertCall {
  7175. c.urlParams_.Set("showOnlySummaryInResponse", fmt.Sprint(showOnlySummaryInResponse))
  7176. return c
  7177. }
  7178. // Source sets the optional parameter "source": String to identify the
  7179. // originator of this request.
  7180. func (c *MylibraryAnnotationsInsertCall) Source(source string) *MylibraryAnnotationsInsertCall {
  7181. c.urlParams_.Set("source", source)
  7182. return c
  7183. }
  7184. // Fields allows partial responses to be retrieved. See
  7185. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7186. // for more information.
  7187. func (c *MylibraryAnnotationsInsertCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsInsertCall {
  7188. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7189. return c
  7190. }
  7191. // Context sets the context to be used in this call's Do method. Any
  7192. // pending HTTP request will be aborted if the provided context is
  7193. // canceled.
  7194. func (c *MylibraryAnnotationsInsertCall) Context(ctx context.Context) *MylibraryAnnotationsInsertCall {
  7195. c.ctx_ = ctx
  7196. return c
  7197. }
  7198. // Header returns an http.Header that can be modified by the caller to
  7199. // add HTTP headers to the request.
  7200. func (c *MylibraryAnnotationsInsertCall) Header() http.Header {
  7201. if c.header_ == nil {
  7202. c.header_ = make(http.Header)
  7203. }
  7204. return c.header_
  7205. }
  7206. func (c *MylibraryAnnotationsInsertCall) doRequest(alt string) (*http.Response, error) {
  7207. reqHeaders := make(http.Header)
  7208. for k, v := range c.header_ {
  7209. reqHeaders[k] = v
  7210. }
  7211. reqHeaders.Set("User-Agent", c.s.userAgent())
  7212. var body io.Reader = nil
  7213. body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
  7214. if err != nil {
  7215. return nil, err
  7216. }
  7217. reqHeaders.Set("Content-Type", "application/json")
  7218. c.urlParams_.Set("alt", alt)
  7219. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations")
  7220. urls += "?" + c.urlParams_.Encode()
  7221. req, _ := http.NewRequest("POST", urls, body)
  7222. req.Header = reqHeaders
  7223. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7224. }
  7225. // Do executes the "books.mylibrary.annotations.insert" call.
  7226. // Exactly one of *Annotation or error will be non-nil. Any non-2xx
  7227. // status code is an error. Response headers are in either
  7228. // *Annotation.ServerResponse.Header or (if a response was returned at
  7229. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7230. // to check whether the returned error was because
  7231. // http.StatusNotModified was returned.
  7232. func (c *MylibraryAnnotationsInsertCall) Do(opts ...googleapi.CallOption) (*Annotation, error) {
  7233. gensupport.SetOptions(c.urlParams_, opts...)
  7234. res, err := c.doRequest("json")
  7235. if res != nil && res.StatusCode == http.StatusNotModified {
  7236. if res.Body != nil {
  7237. res.Body.Close()
  7238. }
  7239. return nil, &googleapi.Error{
  7240. Code: res.StatusCode,
  7241. Header: res.Header,
  7242. }
  7243. }
  7244. if err != nil {
  7245. return nil, err
  7246. }
  7247. defer googleapi.CloseBody(res)
  7248. if err := googleapi.CheckResponse(res); err != nil {
  7249. return nil, err
  7250. }
  7251. ret := &Annotation{
  7252. ServerResponse: googleapi.ServerResponse{
  7253. Header: res.Header,
  7254. HTTPStatusCode: res.StatusCode,
  7255. },
  7256. }
  7257. target := &ret
  7258. if err := gensupport.DecodeResponse(target, res); err != nil {
  7259. return nil, err
  7260. }
  7261. return ret, nil
  7262. // {
  7263. // "description": "Inserts a new annotation.",
  7264. // "httpMethod": "POST",
  7265. // "id": "books.mylibrary.annotations.insert",
  7266. // "parameters": {
  7267. // "annotationId": {
  7268. // "description": "The ID for the annotation to insert.",
  7269. // "location": "query",
  7270. // "type": "string"
  7271. // },
  7272. // "country": {
  7273. // "description": "ISO-3166-1 code to override the IP-based location.",
  7274. // "location": "query",
  7275. // "type": "string"
  7276. // },
  7277. // "showOnlySummaryInResponse": {
  7278. // "description": "Requests that only the summary of the specified layer be provided in the response.",
  7279. // "location": "query",
  7280. // "type": "boolean"
  7281. // },
  7282. // "source": {
  7283. // "description": "String to identify the originator of this request.",
  7284. // "location": "query",
  7285. // "type": "string"
  7286. // }
  7287. // },
  7288. // "path": "mylibrary/annotations",
  7289. // "request": {
  7290. // "$ref": "Annotation"
  7291. // },
  7292. // "response": {
  7293. // "$ref": "Annotation"
  7294. // },
  7295. // "scopes": [
  7296. // "https://www.googleapis.com/auth/books"
  7297. // ]
  7298. // }
  7299. }
  7300. // method id "books.mylibrary.annotations.list":
  7301. type MylibraryAnnotationsListCall struct {
  7302. s *Service
  7303. urlParams_ gensupport.URLParams
  7304. ifNoneMatch_ string
  7305. ctx_ context.Context
  7306. header_ http.Header
  7307. }
  7308. // List: Retrieves a list of annotations, possibly filtered.
  7309. func (r *MylibraryAnnotationsService) List() *MylibraryAnnotationsListCall {
  7310. c := &MylibraryAnnotationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7311. return c
  7312. }
  7313. // ContentVersion sets the optional parameter "contentVersion": The
  7314. // content version for the requested volume.
  7315. func (c *MylibraryAnnotationsListCall) ContentVersion(contentVersion string) *MylibraryAnnotationsListCall {
  7316. c.urlParams_.Set("contentVersion", contentVersion)
  7317. return c
  7318. }
  7319. // LayerId sets the optional parameter "layerId": The layer ID to limit
  7320. // annotation by.
  7321. func (c *MylibraryAnnotationsListCall) LayerId(layerId string) *MylibraryAnnotationsListCall {
  7322. c.urlParams_.Set("layerId", layerId)
  7323. return c
  7324. }
  7325. // LayerIds sets the optional parameter "layerIds": The layer ID(s) to
  7326. // limit annotation by.
  7327. func (c *MylibraryAnnotationsListCall) LayerIds(layerIds ...string) *MylibraryAnnotationsListCall {
  7328. c.urlParams_.SetMulti("layerIds", append([]string{}, layerIds...))
  7329. return c
  7330. }
  7331. // MaxResults sets the optional parameter "maxResults": Maximum number
  7332. // of results to return
  7333. func (c *MylibraryAnnotationsListCall) MaxResults(maxResults int64) *MylibraryAnnotationsListCall {
  7334. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7335. return c
  7336. }
  7337. // PageToken sets the optional parameter "pageToken": The value of the
  7338. // nextToken from the previous page.
  7339. func (c *MylibraryAnnotationsListCall) PageToken(pageToken string) *MylibraryAnnotationsListCall {
  7340. c.urlParams_.Set("pageToken", pageToken)
  7341. return c
  7342. }
  7343. // ShowDeleted sets the optional parameter "showDeleted": Set to true to
  7344. // return deleted annotations. updatedMin must be in the request to use
  7345. // this. Defaults to false.
  7346. func (c *MylibraryAnnotationsListCall) ShowDeleted(showDeleted bool) *MylibraryAnnotationsListCall {
  7347. c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
  7348. return c
  7349. }
  7350. // Source sets the optional parameter "source": String to identify the
  7351. // originator of this request.
  7352. func (c *MylibraryAnnotationsListCall) Source(source string) *MylibraryAnnotationsListCall {
  7353. c.urlParams_.Set("source", source)
  7354. return c
  7355. }
  7356. // UpdatedMax sets the optional parameter "updatedMax": RFC 3339
  7357. // timestamp to restrict to items updated prior to this timestamp
  7358. // (exclusive).
  7359. func (c *MylibraryAnnotationsListCall) UpdatedMax(updatedMax string) *MylibraryAnnotationsListCall {
  7360. c.urlParams_.Set("updatedMax", updatedMax)
  7361. return c
  7362. }
  7363. // UpdatedMin sets the optional parameter "updatedMin": RFC 3339
  7364. // timestamp to restrict to items updated since this timestamp
  7365. // (inclusive).
  7366. func (c *MylibraryAnnotationsListCall) UpdatedMin(updatedMin string) *MylibraryAnnotationsListCall {
  7367. c.urlParams_.Set("updatedMin", updatedMin)
  7368. return c
  7369. }
  7370. // VolumeId sets the optional parameter "volumeId": The volume to
  7371. // restrict annotations to.
  7372. func (c *MylibraryAnnotationsListCall) VolumeId(volumeId string) *MylibraryAnnotationsListCall {
  7373. c.urlParams_.Set("volumeId", volumeId)
  7374. return c
  7375. }
  7376. // Fields allows partial responses to be retrieved. See
  7377. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7378. // for more information.
  7379. func (c *MylibraryAnnotationsListCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsListCall {
  7380. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7381. return c
  7382. }
  7383. // IfNoneMatch sets the optional parameter which makes the operation
  7384. // fail if the object's ETag matches the given value. This is useful for
  7385. // getting updates only after the object has changed since the last
  7386. // request. Use googleapi.IsNotModified to check whether the response
  7387. // error from Do is the result of In-None-Match.
  7388. func (c *MylibraryAnnotationsListCall) IfNoneMatch(entityTag string) *MylibraryAnnotationsListCall {
  7389. c.ifNoneMatch_ = entityTag
  7390. return c
  7391. }
  7392. // Context sets the context to be used in this call's Do method. Any
  7393. // pending HTTP request will be aborted if the provided context is
  7394. // canceled.
  7395. func (c *MylibraryAnnotationsListCall) Context(ctx context.Context) *MylibraryAnnotationsListCall {
  7396. c.ctx_ = ctx
  7397. return c
  7398. }
  7399. // Header returns an http.Header that can be modified by the caller to
  7400. // add HTTP headers to the request.
  7401. func (c *MylibraryAnnotationsListCall) Header() http.Header {
  7402. if c.header_ == nil {
  7403. c.header_ = make(http.Header)
  7404. }
  7405. return c.header_
  7406. }
  7407. func (c *MylibraryAnnotationsListCall) doRequest(alt string) (*http.Response, error) {
  7408. reqHeaders := make(http.Header)
  7409. for k, v := range c.header_ {
  7410. reqHeaders[k] = v
  7411. }
  7412. reqHeaders.Set("User-Agent", c.s.userAgent())
  7413. if c.ifNoneMatch_ != "" {
  7414. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7415. }
  7416. var body io.Reader = nil
  7417. c.urlParams_.Set("alt", alt)
  7418. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations")
  7419. urls += "?" + c.urlParams_.Encode()
  7420. req, _ := http.NewRequest("GET", urls, body)
  7421. req.Header = reqHeaders
  7422. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7423. }
  7424. // Do executes the "books.mylibrary.annotations.list" call.
  7425. // Exactly one of *Annotations or error will be non-nil. Any non-2xx
  7426. // status code is an error. Response headers are in either
  7427. // *Annotations.ServerResponse.Header or (if a response was returned at
  7428. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7429. // to check whether the returned error was because
  7430. // http.StatusNotModified was returned.
  7431. func (c *MylibraryAnnotationsListCall) Do(opts ...googleapi.CallOption) (*Annotations, error) {
  7432. gensupport.SetOptions(c.urlParams_, opts...)
  7433. res, err := c.doRequest("json")
  7434. if res != nil && res.StatusCode == http.StatusNotModified {
  7435. if res.Body != nil {
  7436. res.Body.Close()
  7437. }
  7438. return nil, &googleapi.Error{
  7439. Code: res.StatusCode,
  7440. Header: res.Header,
  7441. }
  7442. }
  7443. if err != nil {
  7444. return nil, err
  7445. }
  7446. defer googleapi.CloseBody(res)
  7447. if err := googleapi.CheckResponse(res); err != nil {
  7448. return nil, err
  7449. }
  7450. ret := &Annotations{
  7451. ServerResponse: googleapi.ServerResponse{
  7452. Header: res.Header,
  7453. HTTPStatusCode: res.StatusCode,
  7454. },
  7455. }
  7456. target := &ret
  7457. if err := gensupport.DecodeResponse(target, res); err != nil {
  7458. return nil, err
  7459. }
  7460. return ret, nil
  7461. // {
  7462. // "description": "Retrieves a list of annotations, possibly filtered.",
  7463. // "httpMethod": "GET",
  7464. // "id": "books.mylibrary.annotations.list",
  7465. // "parameters": {
  7466. // "contentVersion": {
  7467. // "description": "The content version for the requested volume.",
  7468. // "location": "query",
  7469. // "type": "string"
  7470. // },
  7471. // "layerId": {
  7472. // "description": "The layer ID to limit annotation by.",
  7473. // "location": "query",
  7474. // "type": "string"
  7475. // },
  7476. // "layerIds": {
  7477. // "description": "The layer ID(s) to limit annotation by.",
  7478. // "location": "query",
  7479. // "repeated": true,
  7480. // "type": "string"
  7481. // },
  7482. // "maxResults": {
  7483. // "description": "Maximum number of results to return",
  7484. // "format": "uint32",
  7485. // "location": "query",
  7486. // "maximum": "40",
  7487. // "minimum": "0",
  7488. // "type": "integer"
  7489. // },
  7490. // "pageToken": {
  7491. // "description": "The value of the nextToken from the previous page.",
  7492. // "location": "query",
  7493. // "type": "string"
  7494. // },
  7495. // "showDeleted": {
  7496. // "description": "Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false.",
  7497. // "location": "query",
  7498. // "type": "boolean"
  7499. // },
  7500. // "source": {
  7501. // "description": "String to identify the originator of this request.",
  7502. // "location": "query",
  7503. // "type": "string"
  7504. // },
  7505. // "updatedMax": {
  7506. // "description": "RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).",
  7507. // "location": "query",
  7508. // "type": "string"
  7509. // },
  7510. // "updatedMin": {
  7511. // "description": "RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).",
  7512. // "location": "query",
  7513. // "type": "string"
  7514. // },
  7515. // "volumeId": {
  7516. // "description": "The volume to restrict annotations to.",
  7517. // "location": "query",
  7518. // "type": "string"
  7519. // }
  7520. // },
  7521. // "path": "mylibrary/annotations",
  7522. // "response": {
  7523. // "$ref": "Annotations"
  7524. // },
  7525. // "scopes": [
  7526. // "https://www.googleapis.com/auth/books"
  7527. // ]
  7528. // }
  7529. }
  7530. // Pages invokes f for each page of results.
  7531. // A non-nil error returned from f will halt the iteration.
  7532. // The provided context supersedes any context provided to the Context method.
  7533. func (c *MylibraryAnnotationsListCall) Pages(ctx context.Context, f func(*Annotations) error) error {
  7534. c.ctx_ = ctx
  7535. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7536. for {
  7537. x, err := c.Do()
  7538. if err != nil {
  7539. return err
  7540. }
  7541. if err := f(x); err != nil {
  7542. return err
  7543. }
  7544. if x.NextPageToken == "" {
  7545. return nil
  7546. }
  7547. c.PageToken(x.NextPageToken)
  7548. }
  7549. }
  7550. // method id "books.mylibrary.annotations.summary":
  7551. type MylibraryAnnotationsSummaryCall struct {
  7552. s *Service
  7553. urlParams_ gensupport.URLParams
  7554. ctx_ context.Context
  7555. header_ http.Header
  7556. }
  7557. // Summary: Gets the summary of specified layers.
  7558. func (r *MylibraryAnnotationsService) Summary(layerIds []string, volumeId string) *MylibraryAnnotationsSummaryCall {
  7559. c := &MylibraryAnnotationsSummaryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7560. c.urlParams_.SetMulti("layerIds", append([]string{}, layerIds...))
  7561. c.urlParams_.Set("volumeId", volumeId)
  7562. return c
  7563. }
  7564. // Fields allows partial responses to be retrieved. See
  7565. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7566. // for more information.
  7567. func (c *MylibraryAnnotationsSummaryCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsSummaryCall {
  7568. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7569. return c
  7570. }
  7571. // Context sets the context to be used in this call's Do method. Any
  7572. // pending HTTP request will be aborted if the provided context is
  7573. // canceled.
  7574. func (c *MylibraryAnnotationsSummaryCall) Context(ctx context.Context) *MylibraryAnnotationsSummaryCall {
  7575. c.ctx_ = ctx
  7576. return c
  7577. }
  7578. // Header returns an http.Header that can be modified by the caller to
  7579. // add HTTP headers to the request.
  7580. func (c *MylibraryAnnotationsSummaryCall) Header() http.Header {
  7581. if c.header_ == nil {
  7582. c.header_ = make(http.Header)
  7583. }
  7584. return c.header_
  7585. }
  7586. func (c *MylibraryAnnotationsSummaryCall) doRequest(alt string) (*http.Response, error) {
  7587. reqHeaders := make(http.Header)
  7588. for k, v := range c.header_ {
  7589. reqHeaders[k] = v
  7590. }
  7591. reqHeaders.Set("User-Agent", c.s.userAgent())
  7592. var body io.Reader = nil
  7593. c.urlParams_.Set("alt", alt)
  7594. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations/summary")
  7595. urls += "?" + c.urlParams_.Encode()
  7596. req, _ := http.NewRequest("POST", urls, body)
  7597. req.Header = reqHeaders
  7598. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7599. }
  7600. // Do executes the "books.mylibrary.annotations.summary" call.
  7601. // Exactly one of *AnnotationsSummary or error will be non-nil. Any
  7602. // non-2xx status code is an error. Response headers are in either
  7603. // *AnnotationsSummary.ServerResponse.Header or (if a response was
  7604. // returned at all) in error.(*googleapi.Error).Header. Use
  7605. // googleapi.IsNotModified to check whether the returned error was
  7606. // because http.StatusNotModified was returned.
  7607. func (c *MylibraryAnnotationsSummaryCall) Do(opts ...googleapi.CallOption) (*AnnotationsSummary, error) {
  7608. gensupport.SetOptions(c.urlParams_, opts...)
  7609. res, err := c.doRequest("json")
  7610. if res != nil && res.StatusCode == http.StatusNotModified {
  7611. if res.Body != nil {
  7612. res.Body.Close()
  7613. }
  7614. return nil, &googleapi.Error{
  7615. Code: res.StatusCode,
  7616. Header: res.Header,
  7617. }
  7618. }
  7619. if err != nil {
  7620. return nil, err
  7621. }
  7622. defer googleapi.CloseBody(res)
  7623. if err := googleapi.CheckResponse(res); err != nil {
  7624. return nil, err
  7625. }
  7626. ret := &AnnotationsSummary{
  7627. ServerResponse: googleapi.ServerResponse{
  7628. Header: res.Header,
  7629. HTTPStatusCode: res.StatusCode,
  7630. },
  7631. }
  7632. target := &ret
  7633. if err := gensupport.DecodeResponse(target, res); err != nil {
  7634. return nil, err
  7635. }
  7636. return ret, nil
  7637. // {
  7638. // "description": "Gets the summary of specified layers.",
  7639. // "httpMethod": "POST",
  7640. // "id": "books.mylibrary.annotations.summary",
  7641. // "parameterOrder": [
  7642. // "layerIds",
  7643. // "volumeId"
  7644. // ],
  7645. // "parameters": {
  7646. // "layerIds": {
  7647. // "description": "Array of layer IDs to get the summary for.",
  7648. // "location": "query",
  7649. // "repeated": true,
  7650. // "required": true,
  7651. // "type": "string"
  7652. // },
  7653. // "volumeId": {
  7654. // "description": "Volume id to get the summary for.",
  7655. // "location": "query",
  7656. // "required": true,
  7657. // "type": "string"
  7658. // }
  7659. // },
  7660. // "path": "mylibrary/annotations/summary",
  7661. // "response": {
  7662. // "$ref": "AnnotationsSummary"
  7663. // },
  7664. // "scopes": [
  7665. // "https://www.googleapis.com/auth/books"
  7666. // ]
  7667. // }
  7668. }
  7669. // method id "books.mylibrary.annotations.update":
  7670. type MylibraryAnnotationsUpdateCall struct {
  7671. s *Service
  7672. annotationId string
  7673. annotation *Annotation
  7674. urlParams_ gensupport.URLParams
  7675. ctx_ context.Context
  7676. header_ http.Header
  7677. }
  7678. // Update: Updates an existing annotation.
  7679. func (r *MylibraryAnnotationsService) Update(annotationId string, annotation *Annotation) *MylibraryAnnotationsUpdateCall {
  7680. c := &MylibraryAnnotationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7681. c.annotationId = annotationId
  7682. c.annotation = annotation
  7683. return c
  7684. }
  7685. // Source sets the optional parameter "source": String to identify the
  7686. // originator of this request.
  7687. func (c *MylibraryAnnotationsUpdateCall) Source(source string) *MylibraryAnnotationsUpdateCall {
  7688. c.urlParams_.Set("source", source)
  7689. return c
  7690. }
  7691. // Fields allows partial responses to be retrieved. See
  7692. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7693. // for more information.
  7694. func (c *MylibraryAnnotationsUpdateCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsUpdateCall {
  7695. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7696. return c
  7697. }
  7698. // Context sets the context to be used in this call's Do method. Any
  7699. // pending HTTP request will be aborted if the provided context is
  7700. // canceled.
  7701. func (c *MylibraryAnnotationsUpdateCall) Context(ctx context.Context) *MylibraryAnnotationsUpdateCall {
  7702. c.ctx_ = ctx
  7703. return c
  7704. }
  7705. // Header returns an http.Header that can be modified by the caller to
  7706. // add HTTP headers to the request.
  7707. func (c *MylibraryAnnotationsUpdateCall) Header() http.Header {
  7708. if c.header_ == nil {
  7709. c.header_ = make(http.Header)
  7710. }
  7711. return c.header_
  7712. }
  7713. func (c *MylibraryAnnotationsUpdateCall) doRequest(alt string) (*http.Response, error) {
  7714. reqHeaders := make(http.Header)
  7715. for k, v := range c.header_ {
  7716. reqHeaders[k] = v
  7717. }
  7718. reqHeaders.Set("User-Agent", c.s.userAgent())
  7719. var body io.Reader = nil
  7720. body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
  7721. if err != nil {
  7722. return nil, err
  7723. }
  7724. reqHeaders.Set("Content-Type", "application/json")
  7725. c.urlParams_.Set("alt", alt)
  7726. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations/{annotationId}")
  7727. urls += "?" + c.urlParams_.Encode()
  7728. req, _ := http.NewRequest("PUT", urls, body)
  7729. req.Header = reqHeaders
  7730. googleapi.Expand(req.URL, map[string]string{
  7731. "annotationId": c.annotationId,
  7732. })
  7733. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7734. }
  7735. // Do executes the "books.mylibrary.annotations.update" call.
  7736. // Exactly one of *Annotation or error will be non-nil. Any non-2xx
  7737. // status code is an error. Response headers are in either
  7738. // *Annotation.ServerResponse.Header or (if a response was returned at
  7739. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7740. // to check whether the returned error was because
  7741. // http.StatusNotModified was returned.
  7742. func (c *MylibraryAnnotationsUpdateCall) Do(opts ...googleapi.CallOption) (*Annotation, error) {
  7743. gensupport.SetOptions(c.urlParams_, opts...)
  7744. res, err := c.doRequest("json")
  7745. if res != nil && res.StatusCode == http.StatusNotModified {
  7746. if res.Body != nil {
  7747. res.Body.Close()
  7748. }
  7749. return nil, &googleapi.Error{
  7750. Code: res.StatusCode,
  7751. Header: res.Header,
  7752. }
  7753. }
  7754. if err != nil {
  7755. return nil, err
  7756. }
  7757. defer googleapi.CloseBody(res)
  7758. if err := googleapi.CheckResponse(res); err != nil {
  7759. return nil, err
  7760. }
  7761. ret := &Annotation{
  7762. ServerResponse: googleapi.ServerResponse{
  7763. Header: res.Header,
  7764. HTTPStatusCode: res.StatusCode,
  7765. },
  7766. }
  7767. target := &ret
  7768. if err := gensupport.DecodeResponse(target, res); err != nil {
  7769. return nil, err
  7770. }
  7771. return ret, nil
  7772. // {
  7773. // "description": "Updates an existing annotation.",
  7774. // "httpMethod": "PUT",
  7775. // "id": "books.mylibrary.annotations.update",
  7776. // "parameterOrder": [
  7777. // "annotationId"
  7778. // ],
  7779. // "parameters": {
  7780. // "annotationId": {
  7781. // "description": "The ID for the annotation to update.",
  7782. // "location": "path",
  7783. // "required": true,
  7784. // "type": "string"
  7785. // },
  7786. // "source": {
  7787. // "description": "String to identify the originator of this request.",
  7788. // "location": "query",
  7789. // "type": "string"
  7790. // }
  7791. // },
  7792. // "path": "mylibrary/annotations/{annotationId}",
  7793. // "request": {
  7794. // "$ref": "Annotation"
  7795. // },
  7796. // "response": {
  7797. // "$ref": "Annotation"
  7798. // },
  7799. // "scopes": [
  7800. // "https://www.googleapis.com/auth/books"
  7801. // ]
  7802. // }
  7803. }
  7804. // method id "books.mylibrary.bookshelves.addVolume":
  7805. type MylibraryBookshelvesAddVolumeCall struct {
  7806. s *Service
  7807. shelf string
  7808. urlParams_ gensupport.URLParams
  7809. ctx_ context.Context
  7810. header_ http.Header
  7811. }
  7812. // AddVolume: Adds a volume to a bookshelf.
  7813. func (r *MylibraryBookshelvesService) AddVolume(shelf string, volumeId string) *MylibraryBookshelvesAddVolumeCall {
  7814. c := &MylibraryBookshelvesAddVolumeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7815. c.shelf = shelf
  7816. c.urlParams_.Set("volumeId", volumeId)
  7817. return c
  7818. }
  7819. // Reason sets the optional parameter "reason": The reason for which the
  7820. // book is added to the library.
  7821. //
  7822. // Possible values:
  7823. // "IOS_PREX" - Volumes added from the PREX flow on iOS.
  7824. // "IOS_SEARCH" - Volumes added from the Search flow on iOS.
  7825. // "ONBOARDING" - Volumes added from the Onboarding flow.
  7826. func (c *MylibraryBookshelvesAddVolumeCall) Reason(reason string) *MylibraryBookshelvesAddVolumeCall {
  7827. c.urlParams_.Set("reason", reason)
  7828. return c
  7829. }
  7830. // Source sets the optional parameter "source": String to identify the
  7831. // originator of this request.
  7832. func (c *MylibraryBookshelvesAddVolumeCall) Source(source string) *MylibraryBookshelvesAddVolumeCall {
  7833. c.urlParams_.Set("source", source)
  7834. return c
  7835. }
  7836. // Fields allows partial responses to be retrieved. See
  7837. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7838. // for more information.
  7839. func (c *MylibraryBookshelvesAddVolumeCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesAddVolumeCall {
  7840. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7841. return c
  7842. }
  7843. // Context sets the context to be used in this call's Do method. Any
  7844. // pending HTTP request will be aborted if the provided context is
  7845. // canceled.
  7846. func (c *MylibraryBookshelvesAddVolumeCall) Context(ctx context.Context) *MylibraryBookshelvesAddVolumeCall {
  7847. c.ctx_ = ctx
  7848. return c
  7849. }
  7850. // Header returns an http.Header that can be modified by the caller to
  7851. // add HTTP headers to the request.
  7852. func (c *MylibraryBookshelvesAddVolumeCall) Header() http.Header {
  7853. if c.header_ == nil {
  7854. c.header_ = make(http.Header)
  7855. }
  7856. return c.header_
  7857. }
  7858. func (c *MylibraryBookshelvesAddVolumeCall) doRequest(alt string) (*http.Response, error) {
  7859. reqHeaders := make(http.Header)
  7860. for k, v := range c.header_ {
  7861. reqHeaders[k] = v
  7862. }
  7863. reqHeaders.Set("User-Agent", c.s.userAgent())
  7864. var body io.Reader = nil
  7865. c.urlParams_.Set("alt", alt)
  7866. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/addVolume")
  7867. urls += "?" + c.urlParams_.Encode()
  7868. req, _ := http.NewRequest("POST", urls, body)
  7869. req.Header = reqHeaders
  7870. googleapi.Expand(req.URL, map[string]string{
  7871. "shelf": c.shelf,
  7872. })
  7873. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7874. }
  7875. // Do executes the "books.mylibrary.bookshelves.addVolume" call.
  7876. func (c *MylibraryBookshelvesAddVolumeCall) Do(opts ...googleapi.CallOption) error {
  7877. gensupport.SetOptions(c.urlParams_, opts...)
  7878. res, err := c.doRequest("json")
  7879. if err != nil {
  7880. return err
  7881. }
  7882. defer googleapi.CloseBody(res)
  7883. if err := googleapi.CheckResponse(res); err != nil {
  7884. return err
  7885. }
  7886. return nil
  7887. // {
  7888. // "description": "Adds a volume to a bookshelf.",
  7889. // "httpMethod": "POST",
  7890. // "id": "books.mylibrary.bookshelves.addVolume",
  7891. // "parameterOrder": [
  7892. // "shelf",
  7893. // "volumeId"
  7894. // ],
  7895. // "parameters": {
  7896. // "reason": {
  7897. // "description": "The reason for which the book is added to the library.",
  7898. // "enum": [
  7899. // "IOS_PREX",
  7900. // "IOS_SEARCH",
  7901. // "ONBOARDING"
  7902. // ],
  7903. // "enumDescriptions": [
  7904. // "Volumes added from the PREX flow on iOS.",
  7905. // "Volumes added from the Search flow on iOS.",
  7906. // "Volumes added from the Onboarding flow."
  7907. // ],
  7908. // "location": "query",
  7909. // "type": "string"
  7910. // },
  7911. // "shelf": {
  7912. // "description": "ID of bookshelf to which to add a volume.",
  7913. // "location": "path",
  7914. // "required": true,
  7915. // "type": "string"
  7916. // },
  7917. // "source": {
  7918. // "description": "String to identify the originator of this request.",
  7919. // "location": "query",
  7920. // "type": "string"
  7921. // },
  7922. // "volumeId": {
  7923. // "description": "ID of volume to add.",
  7924. // "location": "query",
  7925. // "required": true,
  7926. // "type": "string"
  7927. // }
  7928. // },
  7929. // "path": "mylibrary/bookshelves/{shelf}/addVolume",
  7930. // "scopes": [
  7931. // "https://www.googleapis.com/auth/books"
  7932. // ]
  7933. // }
  7934. }
  7935. // method id "books.mylibrary.bookshelves.clearVolumes":
  7936. type MylibraryBookshelvesClearVolumesCall struct {
  7937. s *Service
  7938. shelf string
  7939. urlParams_ gensupport.URLParams
  7940. ctx_ context.Context
  7941. header_ http.Header
  7942. }
  7943. // ClearVolumes: Clears all volumes from a bookshelf.
  7944. func (r *MylibraryBookshelvesService) ClearVolumes(shelf string) *MylibraryBookshelvesClearVolumesCall {
  7945. c := &MylibraryBookshelvesClearVolumesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7946. c.shelf = shelf
  7947. return c
  7948. }
  7949. // Source sets the optional parameter "source": String to identify the
  7950. // originator of this request.
  7951. func (c *MylibraryBookshelvesClearVolumesCall) Source(source string) *MylibraryBookshelvesClearVolumesCall {
  7952. c.urlParams_.Set("source", source)
  7953. return c
  7954. }
  7955. // Fields allows partial responses to be retrieved. See
  7956. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7957. // for more information.
  7958. func (c *MylibraryBookshelvesClearVolumesCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesClearVolumesCall {
  7959. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7960. return c
  7961. }
  7962. // Context sets the context to be used in this call's Do method. Any
  7963. // pending HTTP request will be aborted if the provided context is
  7964. // canceled.
  7965. func (c *MylibraryBookshelvesClearVolumesCall) Context(ctx context.Context) *MylibraryBookshelvesClearVolumesCall {
  7966. c.ctx_ = ctx
  7967. return c
  7968. }
  7969. // Header returns an http.Header that can be modified by the caller to
  7970. // add HTTP headers to the request.
  7971. func (c *MylibraryBookshelvesClearVolumesCall) Header() http.Header {
  7972. if c.header_ == nil {
  7973. c.header_ = make(http.Header)
  7974. }
  7975. return c.header_
  7976. }
  7977. func (c *MylibraryBookshelvesClearVolumesCall) doRequest(alt string) (*http.Response, error) {
  7978. reqHeaders := make(http.Header)
  7979. for k, v := range c.header_ {
  7980. reqHeaders[k] = v
  7981. }
  7982. reqHeaders.Set("User-Agent", c.s.userAgent())
  7983. var body io.Reader = nil
  7984. c.urlParams_.Set("alt", alt)
  7985. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/clearVolumes")
  7986. urls += "?" + c.urlParams_.Encode()
  7987. req, _ := http.NewRequest("POST", urls, body)
  7988. req.Header = reqHeaders
  7989. googleapi.Expand(req.URL, map[string]string{
  7990. "shelf": c.shelf,
  7991. })
  7992. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7993. }
  7994. // Do executes the "books.mylibrary.bookshelves.clearVolumes" call.
  7995. func (c *MylibraryBookshelvesClearVolumesCall) Do(opts ...googleapi.CallOption) error {
  7996. gensupport.SetOptions(c.urlParams_, opts...)
  7997. res, err := c.doRequest("json")
  7998. if err != nil {
  7999. return err
  8000. }
  8001. defer googleapi.CloseBody(res)
  8002. if err := googleapi.CheckResponse(res); err != nil {
  8003. return err
  8004. }
  8005. return nil
  8006. // {
  8007. // "description": "Clears all volumes from a bookshelf.",
  8008. // "httpMethod": "POST",
  8009. // "id": "books.mylibrary.bookshelves.clearVolumes",
  8010. // "parameterOrder": [
  8011. // "shelf"
  8012. // ],
  8013. // "parameters": {
  8014. // "shelf": {
  8015. // "description": "ID of bookshelf from which to remove a volume.",
  8016. // "location": "path",
  8017. // "required": true,
  8018. // "type": "string"
  8019. // },
  8020. // "source": {
  8021. // "description": "String to identify the originator of this request.",
  8022. // "location": "query",
  8023. // "type": "string"
  8024. // }
  8025. // },
  8026. // "path": "mylibrary/bookshelves/{shelf}/clearVolumes",
  8027. // "scopes": [
  8028. // "https://www.googleapis.com/auth/books"
  8029. // ]
  8030. // }
  8031. }
  8032. // method id "books.mylibrary.bookshelves.get":
  8033. type MylibraryBookshelvesGetCall struct {
  8034. s *Service
  8035. shelf string
  8036. urlParams_ gensupport.URLParams
  8037. ifNoneMatch_ string
  8038. ctx_ context.Context
  8039. header_ http.Header
  8040. }
  8041. // Get: Retrieves metadata for a specific bookshelf belonging to the
  8042. // authenticated user.
  8043. func (r *MylibraryBookshelvesService) Get(shelf string) *MylibraryBookshelvesGetCall {
  8044. c := &MylibraryBookshelvesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8045. c.shelf = shelf
  8046. return c
  8047. }
  8048. // Source sets the optional parameter "source": String to identify the
  8049. // originator of this request.
  8050. func (c *MylibraryBookshelvesGetCall) Source(source string) *MylibraryBookshelvesGetCall {
  8051. c.urlParams_.Set("source", source)
  8052. return c
  8053. }
  8054. // Fields allows partial responses to be retrieved. See
  8055. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8056. // for more information.
  8057. func (c *MylibraryBookshelvesGetCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesGetCall {
  8058. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8059. return c
  8060. }
  8061. // IfNoneMatch sets the optional parameter which makes the operation
  8062. // fail if the object's ETag matches the given value. This is useful for
  8063. // getting updates only after the object has changed since the last
  8064. // request. Use googleapi.IsNotModified to check whether the response
  8065. // error from Do is the result of In-None-Match.
  8066. func (c *MylibraryBookshelvesGetCall) IfNoneMatch(entityTag string) *MylibraryBookshelvesGetCall {
  8067. c.ifNoneMatch_ = entityTag
  8068. return c
  8069. }
  8070. // Context sets the context to be used in this call's Do method. Any
  8071. // pending HTTP request will be aborted if the provided context is
  8072. // canceled.
  8073. func (c *MylibraryBookshelvesGetCall) Context(ctx context.Context) *MylibraryBookshelvesGetCall {
  8074. c.ctx_ = ctx
  8075. return c
  8076. }
  8077. // Header returns an http.Header that can be modified by the caller to
  8078. // add HTTP headers to the request.
  8079. func (c *MylibraryBookshelvesGetCall) Header() http.Header {
  8080. if c.header_ == nil {
  8081. c.header_ = make(http.Header)
  8082. }
  8083. return c.header_
  8084. }
  8085. func (c *MylibraryBookshelvesGetCall) doRequest(alt string) (*http.Response, error) {
  8086. reqHeaders := make(http.Header)
  8087. for k, v := range c.header_ {
  8088. reqHeaders[k] = v
  8089. }
  8090. reqHeaders.Set("User-Agent", c.s.userAgent())
  8091. if c.ifNoneMatch_ != "" {
  8092. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8093. }
  8094. var body io.Reader = nil
  8095. c.urlParams_.Set("alt", alt)
  8096. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}")
  8097. urls += "?" + c.urlParams_.Encode()
  8098. req, _ := http.NewRequest("GET", urls, body)
  8099. req.Header = reqHeaders
  8100. googleapi.Expand(req.URL, map[string]string{
  8101. "shelf": c.shelf,
  8102. })
  8103. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8104. }
  8105. // Do executes the "books.mylibrary.bookshelves.get" call.
  8106. // Exactly one of *Bookshelf or error will be non-nil. Any non-2xx
  8107. // status code is an error. Response headers are in either
  8108. // *Bookshelf.ServerResponse.Header or (if a response was returned at
  8109. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8110. // to check whether the returned error was because
  8111. // http.StatusNotModified was returned.
  8112. func (c *MylibraryBookshelvesGetCall) Do(opts ...googleapi.CallOption) (*Bookshelf, error) {
  8113. gensupport.SetOptions(c.urlParams_, opts...)
  8114. res, err := c.doRequest("json")
  8115. if res != nil && res.StatusCode == http.StatusNotModified {
  8116. if res.Body != nil {
  8117. res.Body.Close()
  8118. }
  8119. return nil, &googleapi.Error{
  8120. Code: res.StatusCode,
  8121. Header: res.Header,
  8122. }
  8123. }
  8124. if err != nil {
  8125. return nil, err
  8126. }
  8127. defer googleapi.CloseBody(res)
  8128. if err := googleapi.CheckResponse(res); err != nil {
  8129. return nil, err
  8130. }
  8131. ret := &Bookshelf{
  8132. ServerResponse: googleapi.ServerResponse{
  8133. Header: res.Header,
  8134. HTTPStatusCode: res.StatusCode,
  8135. },
  8136. }
  8137. target := &ret
  8138. if err := gensupport.DecodeResponse(target, res); err != nil {
  8139. return nil, err
  8140. }
  8141. return ret, nil
  8142. // {
  8143. // "description": "Retrieves metadata for a specific bookshelf belonging to the authenticated user.",
  8144. // "httpMethod": "GET",
  8145. // "id": "books.mylibrary.bookshelves.get",
  8146. // "parameterOrder": [
  8147. // "shelf"
  8148. // ],
  8149. // "parameters": {
  8150. // "shelf": {
  8151. // "description": "ID of bookshelf to retrieve.",
  8152. // "location": "path",
  8153. // "required": true,
  8154. // "type": "string"
  8155. // },
  8156. // "source": {
  8157. // "description": "String to identify the originator of this request.",
  8158. // "location": "query",
  8159. // "type": "string"
  8160. // }
  8161. // },
  8162. // "path": "mylibrary/bookshelves/{shelf}",
  8163. // "response": {
  8164. // "$ref": "Bookshelf"
  8165. // },
  8166. // "scopes": [
  8167. // "https://www.googleapis.com/auth/books"
  8168. // ]
  8169. // }
  8170. }
  8171. // method id "books.mylibrary.bookshelves.list":
  8172. type MylibraryBookshelvesListCall struct {
  8173. s *Service
  8174. urlParams_ gensupport.URLParams
  8175. ifNoneMatch_ string
  8176. ctx_ context.Context
  8177. header_ http.Header
  8178. }
  8179. // List: Retrieves a list of bookshelves belonging to the authenticated
  8180. // user.
  8181. func (r *MylibraryBookshelvesService) List() *MylibraryBookshelvesListCall {
  8182. c := &MylibraryBookshelvesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8183. return c
  8184. }
  8185. // Source sets the optional parameter "source": String to identify the
  8186. // originator of this request.
  8187. func (c *MylibraryBookshelvesListCall) Source(source string) *MylibraryBookshelvesListCall {
  8188. c.urlParams_.Set("source", source)
  8189. return c
  8190. }
  8191. // Fields allows partial responses to be retrieved. See
  8192. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8193. // for more information.
  8194. func (c *MylibraryBookshelvesListCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesListCall {
  8195. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8196. return c
  8197. }
  8198. // IfNoneMatch sets the optional parameter which makes the operation
  8199. // fail if the object's ETag matches the given value. This is useful for
  8200. // getting updates only after the object has changed since the last
  8201. // request. Use googleapi.IsNotModified to check whether the response
  8202. // error from Do is the result of In-None-Match.
  8203. func (c *MylibraryBookshelvesListCall) IfNoneMatch(entityTag string) *MylibraryBookshelvesListCall {
  8204. c.ifNoneMatch_ = entityTag
  8205. return c
  8206. }
  8207. // Context sets the context to be used in this call's Do method. Any
  8208. // pending HTTP request will be aborted if the provided context is
  8209. // canceled.
  8210. func (c *MylibraryBookshelvesListCall) Context(ctx context.Context) *MylibraryBookshelvesListCall {
  8211. c.ctx_ = ctx
  8212. return c
  8213. }
  8214. // Header returns an http.Header that can be modified by the caller to
  8215. // add HTTP headers to the request.
  8216. func (c *MylibraryBookshelvesListCall) Header() http.Header {
  8217. if c.header_ == nil {
  8218. c.header_ = make(http.Header)
  8219. }
  8220. return c.header_
  8221. }
  8222. func (c *MylibraryBookshelvesListCall) doRequest(alt string) (*http.Response, error) {
  8223. reqHeaders := make(http.Header)
  8224. for k, v := range c.header_ {
  8225. reqHeaders[k] = v
  8226. }
  8227. reqHeaders.Set("User-Agent", c.s.userAgent())
  8228. if c.ifNoneMatch_ != "" {
  8229. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8230. }
  8231. var body io.Reader = nil
  8232. c.urlParams_.Set("alt", alt)
  8233. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves")
  8234. urls += "?" + c.urlParams_.Encode()
  8235. req, _ := http.NewRequest("GET", urls, body)
  8236. req.Header = reqHeaders
  8237. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8238. }
  8239. // Do executes the "books.mylibrary.bookshelves.list" call.
  8240. // Exactly one of *Bookshelves or error will be non-nil. Any non-2xx
  8241. // status code is an error. Response headers are in either
  8242. // *Bookshelves.ServerResponse.Header or (if a response was returned at
  8243. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8244. // to check whether the returned error was because
  8245. // http.StatusNotModified was returned.
  8246. func (c *MylibraryBookshelvesListCall) Do(opts ...googleapi.CallOption) (*Bookshelves, error) {
  8247. gensupport.SetOptions(c.urlParams_, opts...)
  8248. res, err := c.doRequest("json")
  8249. if res != nil && res.StatusCode == http.StatusNotModified {
  8250. if res.Body != nil {
  8251. res.Body.Close()
  8252. }
  8253. return nil, &googleapi.Error{
  8254. Code: res.StatusCode,
  8255. Header: res.Header,
  8256. }
  8257. }
  8258. if err != nil {
  8259. return nil, err
  8260. }
  8261. defer googleapi.CloseBody(res)
  8262. if err := googleapi.CheckResponse(res); err != nil {
  8263. return nil, err
  8264. }
  8265. ret := &Bookshelves{
  8266. ServerResponse: googleapi.ServerResponse{
  8267. Header: res.Header,
  8268. HTTPStatusCode: res.StatusCode,
  8269. },
  8270. }
  8271. target := &ret
  8272. if err := gensupport.DecodeResponse(target, res); err != nil {
  8273. return nil, err
  8274. }
  8275. return ret, nil
  8276. // {
  8277. // "description": "Retrieves a list of bookshelves belonging to the authenticated user.",
  8278. // "httpMethod": "GET",
  8279. // "id": "books.mylibrary.bookshelves.list",
  8280. // "parameters": {
  8281. // "source": {
  8282. // "description": "String to identify the originator of this request.",
  8283. // "location": "query",
  8284. // "type": "string"
  8285. // }
  8286. // },
  8287. // "path": "mylibrary/bookshelves",
  8288. // "response": {
  8289. // "$ref": "Bookshelves"
  8290. // },
  8291. // "scopes": [
  8292. // "https://www.googleapis.com/auth/books"
  8293. // ]
  8294. // }
  8295. }
  8296. // method id "books.mylibrary.bookshelves.moveVolume":
  8297. type MylibraryBookshelvesMoveVolumeCall struct {
  8298. s *Service
  8299. shelf string
  8300. urlParams_ gensupport.URLParams
  8301. ctx_ context.Context
  8302. header_ http.Header
  8303. }
  8304. // MoveVolume: Moves a volume within a bookshelf.
  8305. func (r *MylibraryBookshelvesService) MoveVolume(shelf string, volumeId string, volumePosition int64) *MylibraryBookshelvesMoveVolumeCall {
  8306. c := &MylibraryBookshelvesMoveVolumeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8307. c.shelf = shelf
  8308. c.urlParams_.Set("volumeId", volumeId)
  8309. c.urlParams_.Set("volumePosition", fmt.Sprint(volumePosition))
  8310. return c
  8311. }
  8312. // Source sets the optional parameter "source": String to identify the
  8313. // originator of this request.
  8314. func (c *MylibraryBookshelvesMoveVolumeCall) Source(source string) *MylibraryBookshelvesMoveVolumeCall {
  8315. c.urlParams_.Set("source", source)
  8316. return c
  8317. }
  8318. // Fields allows partial responses to be retrieved. See
  8319. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8320. // for more information.
  8321. func (c *MylibraryBookshelvesMoveVolumeCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesMoveVolumeCall {
  8322. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8323. return c
  8324. }
  8325. // Context sets the context to be used in this call's Do method. Any
  8326. // pending HTTP request will be aborted if the provided context is
  8327. // canceled.
  8328. func (c *MylibraryBookshelvesMoveVolumeCall) Context(ctx context.Context) *MylibraryBookshelvesMoveVolumeCall {
  8329. c.ctx_ = ctx
  8330. return c
  8331. }
  8332. // Header returns an http.Header that can be modified by the caller to
  8333. // add HTTP headers to the request.
  8334. func (c *MylibraryBookshelvesMoveVolumeCall) Header() http.Header {
  8335. if c.header_ == nil {
  8336. c.header_ = make(http.Header)
  8337. }
  8338. return c.header_
  8339. }
  8340. func (c *MylibraryBookshelvesMoveVolumeCall) doRequest(alt string) (*http.Response, error) {
  8341. reqHeaders := make(http.Header)
  8342. for k, v := range c.header_ {
  8343. reqHeaders[k] = v
  8344. }
  8345. reqHeaders.Set("User-Agent", c.s.userAgent())
  8346. var body io.Reader = nil
  8347. c.urlParams_.Set("alt", alt)
  8348. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/moveVolume")
  8349. urls += "?" + c.urlParams_.Encode()
  8350. req, _ := http.NewRequest("POST", urls, body)
  8351. req.Header = reqHeaders
  8352. googleapi.Expand(req.URL, map[string]string{
  8353. "shelf": c.shelf,
  8354. })
  8355. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8356. }
  8357. // Do executes the "books.mylibrary.bookshelves.moveVolume" call.
  8358. func (c *MylibraryBookshelvesMoveVolumeCall) Do(opts ...googleapi.CallOption) error {
  8359. gensupport.SetOptions(c.urlParams_, opts...)
  8360. res, err := c.doRequest("json")
  8361. if err != nil {
  8362. return err
  8363. }
  8364. defer googleapi.CloseBody(res)
  8365. if err := googleapi.CheckResponse(res); err != nil {
  8366. return err
  8367. }
  8368. return nil
  8369. // {
  8370. // "description": "Moves a volume within a bookshelf.",
  8371. // "httpMethod": "POST",
  8372. // "id": "books.mylibrary.bookshelves.moveVolume",
  8373. // "parameterOrder": [
  8374. // "shelf",
  8375. // "volumeId",
  8376. // "volumePosition"
  8377. // ],
  8378. // "parameters": {
  8379. // "shelf": {
  8380. // "description": "ID of bookshelf with the volume.",
  8381. // "location": "path",
  8382. // "required": true,
  8383. // "type": "string"
  8384. // },
  8385. // "source": {
  8386. // "description": "String to identify the originator of this request.",
  8387. // "location": "query",
  8388. // "type": "string"
  8389. // },
  8390. // "volumeId": {
  8391. // "description": "ID of volume to move.",
  8392. // "location": "query",
  8393. // "required": true,
  8394. // "type": "string"
  8395. // },
  8396. // "volumePosition": {
  8397. // "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.)",
  8398. // "format": "int32",
  8399. // "location": "query",
  8400. // "required": true,
  8401. // "type": "integer"
  8402. // }
  8403. // },
  8404. // "path": "mylibrary/bookshelves/{shelf}/moveVolume",
  8405. // "scopes": [
  8406. // "https://www.googleapis.com/auth/books"
  8407. // ]
  8408. // }
  8409. }
  8410. // method id "books.mylibrary.bookshelves.removeVolume":
  8411. type MylibraryBookshelvesRemoveVolumeCall struct {
  8412. s *Service
  8413. shelf string
  8414. urlParams_ gensupport.URLParams
  8415. ctx_ context.Context
  8416. header_ http.Header
  8417. }
  8418. // RemoveVolume: Removes a volume from a bookshelf.
  8419. func (r *MylibraryBookshelvesService) RemoveVolume(shelf string, volumeId string) *MylibraryBookshelvesRemoveVolumeCall {
  8420. c := &MylibraryBookshelvesRemoveVolumeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8421. c.shelf = shelf
  8422. c.urlParams_.Set("volumeId", volumeId)
  8423. return c
  8424. }
  8425. // Reason sets the optional parameter "reason": The reason for which the
  8426. // book is removed from the library.
  8427. //
  8428. // Possible values:
  8429. // "ONBOARDING" - Samples removed from the Onboarding flow.
  8430. func (c *MylibraryBookshelvesRemoveVolumeCall) Reason(reason string) *MylibraryBookshelvesRemoveVolumeCall {
  8431. c.urlParams_.Set("reason", reason)
  8432. return c
  8433. }
  8434. // Source sets the optional parameter "source": String to identify the
  8435. // originator of this request.
  8436. func (c *MylibraryBookshelvesRemoveVolumeCall) Source(source string) *MylibraryBookshelvesRemoveVolumeCall {
  8437. c.urlParams_.Set("source", source)
  8438. return c
  8439. }
  8440. // Fields allows partial responses to be retrieved. See
  8441. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8442. // for more information.
  8443. func (c *MylibraryBookshelvesRemoveVolumeCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesRemoveVolumeCall {
  8444. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8445. return c
  8446. }
  8447. // Context sets the context to be used in this call's Do method. Any
  8448. // pending HTTP request will be aborted if the provided context is
  8449. // canceled.
  8450. func (c *MylibraryBookshelvesRemoveVolumeCall) Context(ctx context.Context) *MylibraryBookshelvesRemoveVolumeCall {
  8451. c.ctx_ = ctx
  8452. return c
  8453. }
  8454. // Header returns an http.Header that can be modified by the caller to
  8455. // add HTTP headers to the request.
  8456. func (c *MylibraryBookshelvesRemoveVolumeCall) Header() http.Header {
  8457. if c.header_ == nil {
  8458. c.header_ = make(http.Header)
  8459. }
  8460. return c.header_
  8461. }
  8462. func (c *MylibraryBookshelvesRemoveVolumeCall) doRequest(alt string) (*http.Response, error) {
  8463. reqHeaders := make(http.Header)
  8464. for k, v := range c.header_ {
  8465. reqHeaders[k] = v
  8466. }
  8467. reqHeaders.Set("User-Agent", c.s.userAgent())
  8468. var body io.Reader = nil
  8469. c.urlParams_.Set("alt", alt)
  8470. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/removeVolume")
  8471. urls += "?" + c.urlParams_.Encode()
  8472. req, _ := http.NewRequest("POST", urls, body)
  8473. req.Header = reqHeaders
  8474. googleapi.Expand(req.URL, map[string]string{
  8475. "shelf": c.shelf,
  8476. })
  8477. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8478. }
  8479. // Do executes the "books.mylibrary.bookshelves.removeVolume" call.
  8480. func (c *MylibraryBookshelvesRemoveVolumeCall) Do(opts ...googleapi.CallOption) error {
  8481. gensupport.SetOptions(c.urlParams_, opts...)
  8482. res, err := c.doRequest("json")
  8483. if err != nil {
  8484. return err
  8485. }
  8486. defer googleapi.CloseBody(res)
  8487. if err := googleapi.CheckResponse(res); err != nil {
  8488. return err
  8489. }
  8490. return nil
  8491. // {
  8492. // "description": "Removes a volume from a bookshelf.",
  8493. // "httpMethod": "POST",
  8494. // "id": "books.mylibrary.bookshelves.removeVolume",
  8495. // "parameterOrder": [
  8496. // "shelf",
  8497. // "volumeId"
  8498. // ],
  8499. // "parameters": {
  8500. // "reason": {
  8501. // "description": "The reason for which the book is removed from the library.",
  8502. // "enum": [
  8503. // "ONBOARDING"
  8504. // ],
  8505. // "enumDescriptions": [
  8506. // "Samples removed from the Onboarding flow."
  8507. // ],
  8508. // "location": "query",
  8509. // "type": "string"
  8510. // },
  8511. // "shelf": {
  8512. // "description": "ID of bookshelf from which to remove a volume.",
  8513. // "location": "path",
  8514. // "required": true,
  8515. // "type": "string"
  8516. // },
  8517. // "source": {
  8518. // "description": "String to identify the originator of this request.",
  8519. // "location": "query",
  8520. // "type": "string"
  8521. // },
  8522. // "volumeId": {
  8523. // "description": "ID of volume to remove.",
  8524. // "location": "query",
  8525. // "required": true,
  8526. // "type": "string"
  8527. // }
  8528. // },
  8529. // "path": "mylibrary/bookshelves/{shelf}/removeVolume",
  8530. // "scopes": [
  8531. // "https://www.googleapis.com/auth/books"
  8532. // ]
  8533. // }
  8534. }
  8535. // method id "books.mylibrary.bookshelves.volumes.list":
  8536. type MylibraryBookshelvesVolumesListCall struct {
  8537. s *Service
  8538. shelf string
  8539. urlParams_ gensupport.URLParams
  8540. ifNoneMatch_ string
  8541. ctx_ context.Context
  8542. header_ http.Header
  8543. }
  8544. // List: Gets volume information for volumes on a bookshelf.
  8545. func (r *MylibraryBookshelvesVolumesService) List(shelf string) *MylibraryBookshelvesVolumesListCall {
  8546. c := &MylibraryBookshelvesVolumesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8547. c.shelf = shelf
  8548. return c
  8549. }
  8550. // Country sets the optional parameter "country": ISO-3166-1 code to
  8551. // override the IP-based location.
  8552. func (c *MylibraryBookshelvesVolumesListCall) Country(country string) *MylibraryBookshelvesVolumesListCall {
  8553. c.urlParams_.Set("country", country)
  8554. return c
  8555. }
  8556. // MaxResults sets the optional parameter "maxResults": Maximum number
  8557. // of results to return
  8558. func (c *MylibraryBookshelvesVolumesListCall) MaxResults(maxResults int64) *MylibraryBookshelvesVolumesListCall {
  8559. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  8560. return c
  8561. }
  8562. // Projection sets the optional parameter "projection": Restrict
  8563. // information returned to a set of selected fields.
  8564. //
  8565. // Possible values:
  8566. // "full" - Includes all volume data.
  8567. // "lite" - Includes a subset of fields in volumeInfo and accessInfo.
  8568. func (c *MylibraryBookshelvesVolumesListCall) Projection(projection string) *MylibraryBookshelvesVolumesListCall {
  8569. c.urlParams_.Set("projection", projection)
  8570. return c
  8571. }
  8572. // Q sets the optional parameter "q": Full-text search query string in
  8573. // this bookshelf.
  8574. func (c *MylibraryBookshelvesVolumesListCall) Q(q string) *MylibraryBookshelvesVolumesListCall {
  8575. c.urlParams_.Set("q", q)
  8576. return c
  8577. }
  8578. // ShowPreorders sets the optional parameter "showPreorders": Set to
  8579. // true to show pre-ordered books. Defaults to false.
  8580. func (c *MylibraryBookshelvesVolumesListCall) ShowPreorders(showPreorders bool) *MylibraryBookshelvesVolumesListCall {
  8581. c.urlParams_.Set("showPreorders", fmt.Sprint(showPreorders))
  8582. return c
  8583. }
  8584. // Source sets the optional parameter "source": String to identify the
  8585. // originator of this request.
  8586. func (c *MylibraryBookshelvesVolumesListCall) Source(source string) *MylibraryBookshelvesVolumesListCall {
  8587. c.urlParams_.Set("source", source)
  8588. return c
  8589. }
  8590. // StartIndex sets the optional parameter "startIndex": Index of the
  8591. // first element to return (starts at 0)
  8592. func (c *MylibraryBookshelvesVolumesListCall) StartIndex(startIndex int64) *MylibraryBookshelvesVolumesListCall {
  8593. c.urlParams_.Set("startIndex", fmt.Sprint(startIndex))
  8594. return c
  8595. }
  8596. // Fields allows partial responses to be retrieved. See
  8597. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8598. // for more information.
  8599. func (c *MylibraryBookshelvesVolumesListCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesVolumesListCall {
  8600. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8601. return c
  8602. }
  8603. // IfNoneMatch sets the optional parameter which makes the operation
  8604. // fail if the object's ETag matches the given value. This is useful for
  8605. // getting updates only after the object has changed since the last
  8606. // request. Use googleapi.IsNotModified to check whether the response
  8607. // error from Do is the result of In-None-Match.
  8608. func (c *MylibraryBookshelvesVolumesListCall) IfNoneMatch(entityTag string) *MylibraryBookshelvesVolumesListCall {
  8609. c.ifNoneMatch_ = entityTag
  8610. return c
  8611. }
  8612. // Context sets the context to be used in this call's Do method. Any
  8613. // pending HTTP request will be aborted if the provided context is
  8614. // canceled.
  8615. func (c *MylibraryBookshelvesVolumesListCall) Context(ctx context.Context) *MylibraryBookshelvesVolumesListCall {
  8616. c.ctx_ = ctx
  8617. return c
  8618. }
  8619. // Header returns an http.Header that can be modified by the caller to
  8620. // add HTTP headers to the request.
  8621. func (c *MylibraryBookshelvesVolumesListCall) Header() http.Header {
  8622. if c.header_ == nil {
  8623. c.header_ = make(http.Header)
  8624. }
  8625. return c.header_
  8626. }
  8627. func (c *MylibraryBookshelvesVolumesListCall) doRequest(alt string) (*http.Response, error) {
  8628. reqHeaders := make(http.Header)
  8629. for k, v := range c.header_ {
  8630. reqHeaders[k] = v
  8631. }
  8632. reqHeaders.Set("User-Agent", c.s.userAgent())
  8633. if c.ifNoneMatch_ != "" {
  8634. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8635. }
  8636. var body io.Reader = nil
  8637. c.urlParams_.Set("alt", alt)
  8638. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/volumes")
  8639. urls += "?" + c.urlParams_.Encode()
  8640. req, _ := http.NewRequest("GET", urls, body)
  8641. req.Header = reqHeaders
  8642. googleapi.Expand(req.URL, map[string]string{
  8643. "shelf": c.shelf,
  8644. })
  8645. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8646. }
  8647. // Do executes the "books.mylibrary.bookshelves.volumes.list" call.
  8648. // Exactly one of *Volumes or error will be non-nil. Any non-2xx status
  8649. // code is an error. Response headers are in either
  8650. // *Volumes.ServerResponse.Header or (if a response was returned at all)
  8651. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8652. // check whether the returned error was because http.StatusNotModified
  8653. // was returned.
  8654. func (c *MylibraryBookshelvesVolumesListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) {
  8655. gensupport.SetOptions(c.urlParams_, opts...)
  8656. res, err := c.doRequest("json")
  8657. if res != nil && res.StatusCode == http.StatusNotModified {
  8658. if res.Body != nil {
  8659. res.Body.Close()
  8660. }
  8661. return nil, &googleapi.Error{
  8662. Code: res.StatusCode,
  8663. Header: res.Header,
  8664. }
  8665. }
  8666. if err != nil {
  8667. return nil, err
  8668. }
  8669. defer googleapi.CloseBody(res)
  8670. if err := googleapi.CheckResponse(res); err != nil {
  8671. return nil, err
  8672. }
  8673. ret := &Volumes{
  8674. ServerResponse: googleapi.ServerResponse{
  8675. Header: res.Header,
  8676. HTTPStatusCode: res.StatusCode,
  8677. },
  8678. }
  8679. target := &ret
  8680. if err := gensupport.DecodeResponse(target, res); err != nil {
  8681. return nil, err
  8682. }
  8683. return ret, nil
  8684. // {
  8685. // "description": "Gets volume information for volumes on a bookshelf.",
  8686. // "httpMethod": "GET",
  8687. // "id": "books.mylibrary.bookshelves.volumes.list",
  8688. // "parameterOrder": [
  8689. // "shelf"
  8690. // ],
  8691. // "parameters": {
  8692. // "country": {
  8693. // "description": "ISO-3166-1 code to override the IP-based location.",
  8694. // "location": "query",
  8695. // "type": "string"
  8696. // },
  8697. // "maxResults": {
  8698. // "description": "Maximum number of results to return",
  8699. // "format": "uint32",
  8700. // "location": "query",
  8701. // "minimum": "0",
  8702. // "type": "integer"
  8703. // },
  8704. // "projection": {
  8705. // "description": "Restrict information returned to a set of selected fields.",
  8706. // "enum": [
  8707. // "full",
  8708. // "lite"
  8709. // ],
  8710. // "enumDescriptions": [
  8711. // "Includes all volume data.",
  8712. // "Includes a subset of fields in volumeInfo and accessInfo."
  8713. // ],
  8714. // "location": "query",
  8715. // "type": "string"
  8716. // },
  8717. // "q": {
  8718. // "description": "Full-text search query string in this bookshelf.",
  8719. // "location": "query",
  8720. // "type": "string"
  8721. // },
  8722. // "shelf": {
  8723. // "description": "The bookshelf ID or name retrieve volumes for.",
  8724. // "location": "path",
  8725. // "required": true,
  8726. // "type": "string"
  8727. // },
  8728. // "showPreorders": {
  8729. // "description": "Set to true to show pre-ordered books. Defaults to false.",
  8730. // "location": "query",
  8731. // "type": "boolean"
  8732. // },
  8733. // "source": {
  8734. // "description": "String to identify the originator of this request.",
  8735. // "location": "query",
  8736. // "type": "string"
  8737. // },
  8738. // "startIndex": {
  8739. // "description": "Index of the first element to return (starts at 0)",
  8740. // "format": "uint32",
  8741. // "location": "query",
  8742. // "minimum": "0",
  8743. // "type": "integer"
  8744. // }
  8745. // },
  8746. // "path": "mylibrary/bookshelves/{shelf}/volumes",
  8747. // "response": {
  8748. // "$ref": "Volumes"
  8749. // },
  8750. // "scopes": [
  8751. // "https://www.googleapis.com/auth/books"
  8752. // ]
  8753. // }
  8754. }
  8755. // method id "books.mylibrary.readingpositions.get":
  8756. type MylibraryReadingpositionsGetCall struct {
  8757. s *Service
  8758. volumeId string
  8759. urlParams_ gensupport.URLParams
  8760. ifNoneMatch_ string
  8761. ctx_ context.Context
  8762. header_ http.Header
  8763. }
  8764. // Get: Retrieves my reading position information for a volume.
  8765. func (r *MylibraryReadingpositionsService) Get(volumeId string) *MylibraryReadingpositionsGetCall {
  8766. c := &MylibraryReadingpositionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8767. c.volumeId = volumeId
  8768. return c
  8769. }
  8770. // ContentVersion sets the optional parameter "contentVersion": Volume
  8771. // content version for which this reading position is requested.
  8772. func (c *MylibraryReadingpositionsGetCall) ContentVersion(contentVersion string) *MylibraryReadingpositionsGetCall {
  8773. c.urlParams_.Set("contentVersion", contentVersion)
  8774. return c
  8775. }
  8776. // Source sets the optional parameter "source": String to identify the
  8777. // originator of this request.
  8778. func (c *MylibraryReadingpositionsGetCall) Source(source string) *MylibraryReadingpositionsGetCall {
  8779. c.urlParams_.Set("source", source)
  8780. return c
  8781. }
  8782. // Fields allows partial responses to be retrieved. See
  8783. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8784. // for more information.
  8785. func (c *MylibraryReadingpositionsGetCall) Fields(s ...googleapi.Field) *MylibraryReadingpositionsGetCall {
  8786. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8787. return c
  8788. }
  8789. // IfNoneMatch sets the optional parameter which makes the operation
  8790. // fail if the object's ETag matches the given value. This is useful for
  8791. // getting updates only after the object has changed since the last
  8792. // request. Use googleapi.IsNotModified to check whether the response
  8793. // error from Do is the result of In-None-Match.
  8794. func (c *MylibraryReadingpositionsGetCall) IfNoneMatch(entityTag string) *MylibraryReadingpositionsGetCall {
  8795. c.ifNoneMatch_ = entityTag
  8796. return c
  8797. }
  8798. // Context sets the context to be used in this call's Do method. Any
  8799. // pending HTTP request will be aborted if the provided context is
  8800. // canceled.
  8801. func (c *MylibraryReadingpositionsGetCall) Context(ctx context.Context) *MylibraryReadingpositionsGetCall {
  8802. c.ctx_ = ctx
  8803. return c
  8804. }
  8805. // Header returns an http.Header that can be modified by the caller to
  8806. // add HTTP headers to the request.
  8807. func (c *MylibraryReadingpositionsGetCall) Header() http.Header {
  8808. if c.header_ == nil {
  8809. c.header_ = make(http.Header)
  8810. }
  8811. return c.header_
  8812. }
  8813. func (c *MylibraryReadingpositionsGetCall) doRequest(alt string) (*http.Response, error) {
  8814. reqHeaders := make(http.Header)
  8815. for k, v := range c.header_ {
  8816. reqHeaders[k] = v
  8817. }
  8818. reqHeaders.Set("User-Agent", c.s.userAgent())
  8819. if c.ifNoneMatch_ != "" {
  8820. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8821. }
  8822. var body io.Reader = nil
  8823. c.urlParams_.Set("alt", alt)
  8824. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/readingpositions/{volumeId}")
  8825. urls += "?" + c.urlParams_.Encode()
  8826. req, _ := http.NewRequest("GET", urls, body)
  8827. req.Header = reqHeaders
  8828. googleapi.Expand(req.URL, map[string]string{
  8829. "volumeId": c.volumeId,
  8830. })
  8831. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8832. }
  8833. // Do executes the "books.mylibrary.readingpositions.get" call.
  8834. // Exactly one of *ReadingPosition or error will be non-nil. Any non-2xx
  8835. // status code is an error. Response headers are in either
  8836. // *ReadingPosition.ServerResponse.Header or (if a response was returned
  8837. // at all) in error.(*googleapi.Error).Header. Use
  8838. // googleapi.IsNotModified to check whether the returned error was
  8839. // because http.StatusNotModified was returned.
  8840. func (c *MylibraryReadingpositionsGetCall) Do(opts ...googleapi.CallOption) (*ReadingPosition, error) {
  8841. gensupport.SetOptions(c.urlParams_, opts...)
  8842. res, err := c.doRequest("json")
  8843. if res != nil && res.StatusCode == http.StatusNotModified {
  8844. if res.Body != nil {
  8845. res.Body.Close()
  8846. }
  8847. return nil, &googleapi.Error{
  8848. Code: res.StatusCode,
  8849. Header: res.Header,
  8850. }
  8851. }
  8852. if err != nil {
  8853. return nil, err
  8854. }
  8855. defer googleapi.CloseBody(res)
  8856. if err := googleapi.CheckResponse(res); err != nil {
  8857. return nil, err
  8858. }
  8859. ret := &ReadingPosition{
  8860. ServerResponse: googleapi.ServerResponse{
  8861. Header: res.Header,
  8862. HTTPStatusCode: res.StatusCode,
  8863. },
  8864. }
  8865. target := &ret
  8866. if err := gensupport.DecodeResponse(target, res); err != nil {
  8867. return nil, err
  8868. }
  8869. return ret, nil
  8870. // {
  8871. // "description": "Retrieves my reading position information for a volume.",
  8872. // "httpMethod": "GET",
  8873. // "id": "books.mylibrary.readingpositions.get",
  8874. // "parameterOrder": [
  8875. // "volumeId"
  8876. // ],
  8877. // "parameters": {
  8878. // "contentVersion": {
  8879. // "description": "Volume content version for which this reading position is requested.",
  8880. // "location": "query",
  8881. // "type": "string"
  8882. // },
  8883. // "source": {
  8884. // "description": "String to identify the originator of this request.",
  8885. // "location": "query",
  8886. // "type": "string"
  8887. // },
  8888. // "volumeId": {
  8889. // "description": "ID of volume for which to retrieve a reading position.",
  8890. // "location": "path",
  8891. // "required": true,
  8892. // "type": "string"
  8893. // }
  8894. // },
  8895. // "path": "mylibrary/readingpositions/{volumeId}",
  8896. // "response": {
  8897. // "$ref": "ReadingPosition"
  8898. // },
  8899. // "scopes": [
  8900. // "https://www.googleapis.com/auth/books"
  8901. // ]
  8902. // }
  8903. }
  8904. // method id "books.mylibrary.readingpositions.setPosition":
  8905. type MylibraryReadingpositionsSetPositionCall struct {
  8906. s *Service
  8907. volumeId string
  8908. urlParams_ gensupport.URLParams
  8909. ctx_ context.Context
  8910. header_ http.Header
  8911. }
  8912. // SetPosition: Sets my reading position information for a volume.
  8913. func (r *MylibraryReadingpositionsService) SetPosition(volumeId string, timestamp string, position string) *MylibraryReadingpositionsSetPositionCall {
  8914. c := &MylibraryReadingpositionsSetPositionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8915. c.volumeId = volumeId
  8916. c.urlParams_.Set("timestamp", timestamp)
  8917. c.urlParams_.Set("position", position)
  8918. return c
  8919. }
  8920. // Action sets the optional parameter "action": Action that caused this
  8921. // reading position to be set.
  8922. //
  8923. // Possible values:
  8924. // "bookmark" - User chose bookmark within volume.
  8925. // "chapter" - User selected chapter from list.
  8926. // "next-page" - Next page event.
  8927. // "prev-page" - Previous page event.
  8928. // "scroll" - User navigated to page.
  8929. // "search" - User chose search results within volume.
  8930. func (c *MylibraryReadingpositionsSetPositionCall) Action(action string) *MylibraryReadingpositionsSetPositionCall {
  8931. c.urlParams_.Set("action", action)
  8932. return c
  8933. }
  8934. // ContentVersion sets the optional parameter "contentVersion": Volume
  8935. // content version for which this reading position applies.
  8936. func (c *MylibraryReadingpositionsSetPositionCall) ContentVersion(contentVersion string) *MylibraryReadingpositionsSetPositionCall {
  8937. c.urlParams_.Set("contentVersion", contentVersion)
  8938. return c
  8939. }
  8940. // DeviceCookie sets the optional parameter "deviceCookie": Random
  8941. // persistent device cookie optional on set position.
  8942. func (c *MylibraryReadingpositionsSetPositionCall) DeviceCookie(deviceCookie string) *MylibraryReadingpositionsSetPositionCall {
  8943. c.urlParams_.Set("deviceCookie", deviceCookie)
  8944. return c
  8945. }
  8946. // Source sets the optional parameter "source": String to identify the
  8947. // originator of this request.
  8948. func (c *MylibraryReadingpositionsSetPositionCall) Source(source string) *MylibraryReadingpositionsSetPositionCall {
  8949. c.urlParams_.Set("source", source)
  8950. return c
  8951. }
  8952. // Fields allows partial responses to be retrieved. See
  8953. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8954. // for more information.
  8955. func (c *MylibraryReadingpositionsSetPositionCall) Fields(s ...googleapi.Field) *MylibraryReadingpositionsSetPositionCall {
  8956. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8957. return c
  8958. }
  8959. // Context sets the context to be used in this call's Do method. Any
  8960. // pending HTTP request will be aborted if the provided context is
  8961. // canceled.
  8962. func (c *MylibraryReadingpositionsSetPositionCall) Context(ctx context.Context) *MylibraryReadingpositionsSetPositionCall {
  8963. c.ctx_ = ctx
  8964. return c
  8965. }
  8966. // Header returns an http.Header that can be modified by the caller to
  8967. // add HTTP headers to the request.
  8968. func (c *MylibraryReadingpositionsSetPositionCall) Header() http.Header {
  8969. if c.header_ == nil {
  8970. c.header_ = make(http.Header)
  8971. }
  8972. return c.header_
  8973. }
  8974. func (c *MylibraryReadingpositionsSetPositionCall) doRequest(alt string) (*http.Response, error) {
  8975. reqHeaders := make(http.Header)
  8976. for k, v := range c.header_ {
  8977. reqHeaders[k] = v
  8978. }
  8979. reqHeaders.Set("User-Agent", c.s.userAgent())
  8980. var body io.Reader = nil
  8981. c.urlParams_.Set("alt", alt)
  8982. urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/readingpositions/{volumeId}/setPosition")
  8983. urls += "?" + c.urlParams_.Encode()
  8984. req, _ := http.NewRequest("POST", urls, body)
  8985. req.Header = reqHeaders
  8986. googleapi.Expand(req.URL, map[string]string{
  8987. "volumeId": c.volumeId,
  8988. })
  8989. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8990. }
  8991. // Do executes the "books.mylibrary.readingpositions.setPosition" call.
  8992. func (c *MylibraryReadingpositionsSetPositionCall) Do(opts ...googleapi.CallOption) error {
  8993. gensupport.SetOptions(c.urlParams_, opts...)
  8994. res, err := c.doRequest("json")
  8995. if err != nil {
  8996. return err
  8997. }
  8998. defer googleapi.CloseBody(res)
  8999. if err := googleapi.CheckResponse(res); err != nil {
  9000. return err
  9001. }
  9002. return nil
  9003. // {
  9004. // "description": "Sets my reading position information for a volume.",
  9005. // "httpMethod": "POST",
  9006. // "id": "books.mylibrary.readingpositions.setPosition",
  9007. // "parameterOrder": [
  9008. // "volumeId",
  9009. // "timestamp",
  9010. // "position"
  9011. // ],
  9012. // "parameters": {
  9013. // "action": {
  9014. // "description": "Action that caused this reading position to be set.",
  9015. // "enum": [
  9016. // "bookmark",
  9017. // "chapter",
  9018. // "next-page",
  9019. // "prev-page",
  9020. // "scroll",
  9021. // "search"
  9022. // ],
  9023. // "enumDescriptions": [
  9024. // "User chose bookmark within volume.",
  9025. // "User selected chapter from list.",
  9026. // "Next page event.",
  9027. // "Previous page event.",
  9028. // "User navigated to page.",
  9029. // "User chose search results within volume."
  9030. // ],
  9031. // "location": "query",
  9032. // "type": "string"
  9033. // },
  9034. // "contentVersion": {
  9035. // "description": "Volume content version for which this reading position applies.",
  9036. // "location": "query",
  9037. // "type": "string"
  9038. // },
  9039. // "deviceCookie": {
  9040. // "description": "Random persistent device cookie optional on set position.",
  9041. // "location": "query",
  9042. // "type": "string"
  9043. // },
  9044. // "position": {
  9045. // "description": "Position string for the new volume reading position.",
  9046. // "location": "query",
  9047. // "required": true,
  9048. // "type": "string"
  9049. // },
  9050. // "source": {
  9051. // "description": "String to identify the originator of this request.",
  9052. // "location": "query",
  9053. // "type": "string"
  9054. // },
  9055. // "timestamp": {
  9056. // "description": "RFC 3339 UTC format timestamp associated with this reading position.",
  9057. // "location": "query",
  9058. // "required": true,
  9059. // "type": "string"
  9060. // },
  9061. // "volumeId": {
  9062. // "description": "ID of volume for which to update the reading position.",
  9063. // "location": "path",
  9064. // "required": true,
  9065. // "type": "string"
  9066. // }
  9067. // },
  9068. // "path": "mylibrary/readingpositions/{volumeId}/setPosition",
  9069. // "scopes": [
  9070. // "https://www.googleapis.com/auth/books"
  9071. // ]
  9072. // }
  9073. }
  9074. // method id "books.notification.get":
  9075. type NotificationGetCall struct {
  9076. s *Service
  9077. urlParams_ gensupport.URLParams
  9078. ifNoneMatch_ string
  9079. ctx_ context.Context
  9080. header_ http.Header
  9081. }
  9082. // Get: Returns notification details for a given notification id.
  9083. func (r *NotificationService) Get(notificationId string) *NotificationGetCall {
  9084. c := &NotificationGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9085. c.urlParams_.Set("notification_id", notificationId)
  9086. return c
  9087. }
  9088. // Locale sets the optional parameter "locale": ISO-639-1 language and
  9089. // ISO-3166-1 country code. Ex: 'en_US'. Used for generating
  9090. // notification title and body.
  9091. func (c *NotificationGetCall) Locale(locale string) *NotificationGetCall {
  9092. c.urlParams_.Set("locale", locale)
  9093. return c
  9094. }
  9095. // Source sets the optional parameter "source": String to identify the
  9096. // originator of this request.
  9097. func (c *NotificationGetCall) Source(source string) *NotificationGetCall {
  9098. c.urlParams_.Set("source", source)
  9099. return c
  9100. }
  9101. // Fields allows partial responses to be retrieved. See
  9102. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9103. // for more information.
  9104. func (c *NotificationGetCall) Fields(s ...googleapi.Field) *NotificationGetCall {
  9105. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9106. return c
  9107. }
  9108. // IfNoneMatch sets the optional parameter which makes the operation
  9109. // fail if the object's ETag matches the given value. This is useful for
  9110. // getting updates only after the object has changed since the last
  9111. // request. Use googleapi.IsNotModified to check whether the response
  9112. // error from Do is the result of In-None-Match.
  9113. func (c *NotificationGetCall) IfNoneMatch(entityTag string) *NotificationGetCall {
  9114. c.ifNoneMatch_ = entityTag
  9115. return c
  9116. }
  9117. // Context sets the context to be used in this call's Do method. Any
  9118. // pending HTTP request will be aborted if the provided context is
  9119. // canceled.
  9120. func (c *NotificationGetCall) Context(ctx context.Context) *NotificationGetCall {
  9121. c.ctx_ = ctx
  9122. return c
  9123. }
  9124. // Header returns an http.Header that can be modified by the caller to
  9125. // add HTTP headers to the request.
  9126. func (c *NotificationGetCall) Header() http.Header {
  9127. if c.header_ == nil {
  9128. c.header_ = make(http.Header)
  9129. }
  9130. return c.header_
  9131. }
  9132. func (c *NotificationGetCall) doRequest(alt string) (*http.Response, error) {
  9133. reqHeaders := make(http.Header)
  9134. for k, v := range c.header_ {
  9135. reqHeaders[k] = v
  9136. }
  9137. reqHeaders.Set("User-Agent", c.s.userAgent())
  9138. if c.ifNoneMatch_ != "" {
  9139. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9140. }
  9141. var body io.Reader = nil
  9142. c.urlParams_.Set("alt", alt)
  9143. urls := googleapi.ResolveRelative(c.s.BasePath, "notification/get")
  9144. urls += "?" + c.urlParams_.Encode()
  9145. req, _ := http.NewRequest("GET", urls, body)
  9146. req.Header = reqHeaders
  9147. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9148. }
  9149. // Do executes the "books.notification.get" call.
  9150. // Exactly one of *Notification or error will be non-nil. Any non-2xx
  9151. // status code is an error. Response headers are in either
  9152. // *Notification.ServerResponse.Header or (if a response was returned at
  9153. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9154. // to check whether the returned error was because
  9155. // http.StatusNotModified was returned.
  9156. func (c *NotificationGetCall) Do(opts ...googleapi.CallOption) (*Notification, error) {
  9157. gensupport.SetOptions(c.urlParams_, opts...)
  9158. res, err := c.doRequest("json")
  9159. if res != nil && res.StatusCode == http.StatusNotModified {
  9160. if res.Body != nil {
  9161. res.Body.Close()
  9162. }
  9163. return nil, &googleapi.Error{
  9164. Code: res.StatusCode,
  9165. Header: res.Header,
  9166. }
  9167. }
  9168. if err != nil {
  9169. return nil, err
  9170. }
  9171. defer googleapi.CloseBody(res)
  9172. if err := googleapi.CheckResponse(res); err != nil {
  9173. return nil, err
  9174. }
  9175. ret := &Notification{
  9176. ServerResponse: googleapi.ServerResponse{
  9177. Header: res.Header,
  9178. HTTPStatusCode: res.StatusCode,
  9179. },
  9180. }
  9181. target := &ret
  9182. if err := gensupport.DecodeResponse(target, res); err != nil {
  9183. return nil, err
  9184. }
  9185. return ret, nil
  9186. // {
  9187. // "description": "Returns notification details for a given notification id.",
  9188. // "httpMethod": "GET",
  9189. // "id": "books.notification.get",
  9190. // "parameterOrder": [
  9191. // "notification_id"
  9192. // ],
  9193. // "parameters": {
  9194. // "locale": {
  9195. // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating notification title and body.",
  9196. // "location": "query",
  9197. // "type": "string"
  9198. // },
  9199. // "notification_id": {
  9200. // "description": "String to identify the notification.",
  9201. // "location": "query",
  9202. // "required": true,
  9203. // "type": "string"
  9204. // },
  9205. // "source": {
  9206. // "description": "String to identify the originator of this request.",
  9207. // "location": "query",
  9208. // "type": "string"
  9209. // }
  9210. // },
  9211. // "path": "notification/get",
  9212. // "response": {
  9213. // "$ref": "Notification"
  9214. // },
  9215. // "scopes": [
  9216. // "https://www.googleapis.com/auth/books"
  9217. // ]
  9218. // }
  9219. }
  9220. // method id "books.onboarding.listCategories":
  9221. type OnboardingListCategoriesCall struct {
  9222. s *Service
  9223. urlParams_ gensupport.URLParams
  9224. ifNoneMatch_ string
  9225. ctx_ context.Context
  9226. header_ http.Header
  9227. }
  9228. // ListCategories: List categories for onboarding experience.
  9229. func (r *OnboardingService) ListCategories() *OnboardingListCategoriesCall {
  9230. c := &OnboardingListCategoriesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9231. return c
  9232. }
  9233. // Locale sets the optional parameter "locale": ISO-639-1 language and
  9234. // ISO-3166-1 country code. Default is en-US if unset.
  9235. func (c *OnboardingListCategoriesCall) Locale(locale string) *OnboardingListCategoriesCall {
  9236. c.urlParams_.Set("locale", locale)
  9237. return c
  9238. }
  9239. // Fields allows partial responses to be retrieved. See
  9240. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9241. // for more information.
  9242. func (c *OnboardingListCategoriesCall) Fields(s ...googleapi.Field) *OnboardingListCategoriesCall {
  9243. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9244. return c
  9245. }
  9246. // IfNoneMatch sets the optional parameter which makes the operation
  9247. // fail if the object's ETag matches the given value. This is useful for
  9248. // getting updates only after the object has changed since the last
  9249. // request. Use googleapi.IsNotModified to check whether the response
  9250. // error from Do is the result of In-None-Match.
  9251. func (c *OnboardingListCategoriesCall) IfNoneMatch(entityTag string) *OnboardingListCategoriesCall {
  9252. c.ifNoneMatch_ = entityTag
  9253. return c
  9254. }
  9255. // Context sets the context to be used in this call's Do method. Any
  9256. // pending HTTP request will be aborted if the provided context is
  9257. // canceled.
  9258. func (c *OnboardingListCategoriesCall) Context(ctx context.Context) *OnboardingListCategoriesCall {
  9259. c.ctx_ = ctx
  9260. return c
  9261. }
  9262. // Header returns an http.Header that can be modified by the caller to
  9263. // add HTTP headers to the request.
  9264. func (c *OnboardingListCategoriesCall) Header() http.Header {
  9265. if c.header_ == nil {
  9266. c.header_ = make(http.Header)
  9267. }
  9268. return c.header_
  9269. }
  9270. func (c *OnboardingListCategoriesCall) doRequest(alt string) (*http.Response, error) {
  9271. reqHeaders := make(http.Header)
  9272. for k, v := range c.header_ {
  9273. reqHeaders[k] = v
  9274. }
  9275. reqHeaders.Set("User-Agent", c.s.userAgent())
  9276. if c.ifNoneMatch_ != "" {
  9277. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9278. }
  9279. var body io.Reader = nil
  9280. c.urlParams_.Set("alt", alt)
  9281. urls := googleapi.ResolveRelative(c.s.BasePath, "onboarding/listCategories")
  9282. urls += "?" + c.urlParams_.Encode()
  9283. req, _ := http.NewRequest("GET", urls, body)
  9284. req.Header = reqHeaders
  9285. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9286. }
  9287. // Do executes the "books.onboarding.listCategories" call.
  9288. // Exactly one of *Category or error will be non-nil. Any non-2xx status
  9289. // code is an error. Response headers are in either
  9290. // *Category.ServerResponse.Header or (if a response was returned at
  9291. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9292. // to check whether the returned error was because
  9293. // http.StatusNotModified was returned.
  9294. func (c *OnboardingListCategoriesCall) Do(opts ...googleapi.CallOption) (*Category, error) {
  9295. gensupport.SetOptions(c.urlParams_, opts...)
  9296. res, err := c.doRequest("json")
  9297. if res != nil && res.StatusCode == http.StatusNotModified {
  9298. if res.Body != nil {
  9299. res.Body.Close()
  9300. }
  9301. return nil, &googleapi.Error{
  9302. Code: res.StatusCode,
  9303. Header: res.Header,
  9304. }
  9305. }
  9306. if err != nil {
  9307. return nil, err
  9308. }
  9309. defer googleapi.CloseBody(res)
  9310. if err := googleapi.CheckResponse(res); err != nil {
  9311. return nil, err
  9312. }
  9313. ret := &Category{
  9314. ServerResponse: googleapi.ServerResponse{
  9315. Header: res.Header,
  9316. HTTPStatusCode: res.StatusCode,
  9317. },
  9318. }
  9319. target := &ret
  9320. if err := gensupport.DecodeResponse(target, res); err != nil {
  9321. return nil, err
  9322. }
  9323. return ret, nil
  9324. // {
  9325. // "description": "List categories for onboarding experience.",
  9326. // "httpMethod": "GET",
  9327. // "id": "books.onboarding.listCategories",
  9328. // "parameters": {
  9329. // "locale": {
  9330. // "description": "ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset.",
  9331. // "location": "query",
  9332. // "type": "string"
  9333. // }
  9334. // },
  9335. // "path": "onboarding/listCategories",
  9336. // "response": {
  9337. // "$ref": "Category"
  9338. // },
  9339. // "scopes": [
  9340. // "https://www.googleapis.com/auth/books"
  9341. // ]
  9342. // }
  9343. }
  9344. // method id "books.onboarding.listCategoryVolumes":
  9345. type OnboardingListCategoryVolumesCall struct {
  9346. s *Service
  9347. urlParams_ gensupport.URLParams
  9348. ifNoneMatch_ string
  9349. ctx_ context.Context
  9350. header_ http.Header
  9351. }
  9352. // ListCategoryVolumes: List available volumes under categories for
  9353. // onboarding experience.
  9354. func (r *OnboardingService) ListCategoryVolumes() *OnboardingListCategoryVolumesCall {
  9355. c := &OnboardingListCategoryVolumesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9356. return c
  9357. }
  9358. // CategoryId sets the optional parameter "categoryId": List of category
  9359. // ids requested.
  9360. func (c *OnboardingListCategoryVolumesCall) CategoryId(categoryId ...string) *OnboardingListCategoryVolumesCall {
  9361. c.urlParams_.SetMulti("categoryId", append([]string{}, categoryId...))
  9362. return c
  9363. }
  9364. // Locale sets the optional parameter "locale": ISO-639-1 language and
  9365. // ISO-3166-1 country code. Default is en-US if unset.
  9366. func (c *OnboardingListCategoryVolumesCall) Locale(locale string) *OnboardingListCategoryVolumesCall {
  9367. c.urlParams_.Set("locale", locale)
  9368. return c
  9369. }
  9370. // MaxAllowedMaturityRating sets the optional parameter
  9371. // "maxAllowedMaturityRating": The maximum allowed maturity rating of
  9372. // returned volumes. Books with a higher maturity rating are filtered
  9373. // out.
  9374. //
  9375. // Possible values:
  9376. // "mature" - Show books which are rated mature or lower.
  9377. // "not-mature" - Show books which are rated not mature.
  9378. func (c *OnboardingListCategoryVolumesCall) MaxAllowedMaturityRating(maxAllowedMaturityRating string) *OnboardingListCategoryVolumesCall {
  9379. c.urlParams_.Set("maxAllowedMaturityRating", maxAllowedMaturityRating)
  9380. return c
  9381. }
  9382. // PageSize sets the optional parameter "pageSize": Number of maximum
  9383. // results per page to be included in the response.
  9384. func (c *OnboardingListCategoryVolumesCall) PageSize(pageSize int64) *OnboardingListCategoryVolumesCall {
  9385. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9386. return c
  9387. }
  9388. // PageToken sets the optional parameter "pageToken": The value of the
  9389. // nextToken from the previous page.
  9390. func (c *OnboardingListCategoryVolumesCall) PageToken(pageToken string) *OnboardingListCategoryVolumesCall {
  9391. c.urlParams_.Set("pageToken", pageToken)
  9392. return c
  9393. }
  9394. // Fields allows partial responses to be retrieved. See
  9395. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9396. // for more information.
  9397. func (c *OnboardingListCategoryVolumesCall) Fields(s ...googleapi.Field) *OnboardingListCategoryVolumesCall {
  9398. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9399. return c
  9400. }
  9401. // IfNoneMatch sets the optional parameter which makes the operation
  9402. // fail if the object's ETag matches the given value. This is useful for
  9403. // getting updates only after the object has changed since the last
  9404. // request. Use googleapi.IsNotModified to check whether the response
  9405. // error from Do is the result of In-None-Match.
  9406. func (c *OnboardingListCategoryVolumesCall) IfNoneMatch(entityTag string) *OnboardingListCategoryVolumesCall {
  9407. c.ifNoneMatch_ = entityTag
  9408. return c
  9409. }
  9410. // Context sets the context to be used in this call's Do method. Any
  9411. // pending HTTP request will be aborted if the provided context is
  9412. // canceled.
  9413. func (c *OnboardingListCategoryVolumesCall) Context(ctx context.Context) *OnboardingListCategoryVolumesCall {
  9414. c.ctx_ = ctx
  9415. return c
  9416. }
  9417. // Header returns an http.Header that can be modified by the caller to
  9418. // add HTTP headers to the request.
  9419. func (c *OnboardingListCategoryVolumesCall) Header() http.Header {
  9420. if c.header_ == nil {
  9421. c.header_ = make(http.Header)
  9422. }
  9423. return c.header_
  9424. }
  9425. func (c *OnboardingListCategoryVolumesCall) doRequest(alt string) (*http.Response, error) {
  9426. reqHeaders := make(http.Header)
  9427. for k, v := range c.header_ {
  9428. reqHeaders[k] = v
  9429. }
  9430. reqHeaders.Set("User-Agent", c.s.userAgent())
  9431. if c.ifNoneMatch_ != "" {
  9432. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9433. }
  9434. var body io.Reader = nil
  9435. c.urlParams_.Set("alt", alt)
  9436. urls := googleapi.ResolveRelative(c.s.BasePath, "onboarding/listCategoryVolumes")
  9437. urls += "?" + c.urlParams_.Encode()
  9438. req, _ := http.NewRequest("GET", urls, body)
  9439. req.Header = reqHeaders
  9440. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9441. }
  9442. // Do executes the "books.onboarding.listCategoryVolumes" call.
  9443. // Exactly one of *Volume2 or error will be non-nil. Any non-2xx status
  9444. // code is an error. Response headers are in either
  9445. // *Volume2.ServerResponse.Header or (if a response was returned at all)
  9446. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9447. // check whether the returned error was because http.StatusNotModified
  9448. // was returned.
  9449. func (c *OnboardingListCategoryVolumesCall) Do(opts ...googleapi.CallOption) (*Volume2, error) {
  9450. gensupport.SetOptions(c.urlParams_, opts...)
  9451. res, err := c.doRequest("json")
  9452. if res != nil && res.StatusCode == http.StatusNotModified {
  9453. if res.Body != nil {
  9454. res.Body.Close()
  9455. }
  9456. return nil, &googleapi.Error{
  9457. Code: res.StatusCode,
  9458. Header: res.Header,
  9459. }
  9460. }
  9461. if err != nil {
  9462. return nil, err
  9463. }
  9464. defer googleapi.CloseBody(res)
  9465. if err := googleapi.CheckResponse(res); err != nil {
  9466. return nil, err
  9467. }
  9468. ret := &Volume2{
  9469. ServerResponse: googleapi.ServerResponse{
  9470. Header: res.Header,
  9471. HTTPStatusCode: res.StatusCode,
  9472. },
  9473. }
  9474. target := &ret
  9475. if err := gensupport.DecodeResponse(target, res); err != nil {
  9476. return nil, err
  9477. }
  9478. return ret, nil
  9479. // {
  9480. // "description": "List available volumes under categories for onboarding experience.",
  9481. // "httpMethod": "GET",
  9482. // "id": "books.onboarding.listCategoryVolumes",
  9483. // "parameters": {
  9484. // "categoryId": {
  9485. // "description": "List of category ids requested.",
  9486. // "location": "query",
  9487. // "repeated": true,
  9488. // "type": "string"
  9489. // },
  9490. // "locale": {
  9491. // "description": "ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset.",
  9492. // "location": "query",
  9493. // "type": "string"
  9494. // },
  9495. // "maxAllowedMaturityRating": {
  9496. // "description": "The maximum allowed maturity rating of returned volumes. Books with a higher maturity rating are filtered out.",
  9497. // "enum": [
  9498. // "mature",
  9499. // "not-mature"
  9500. // ],
  9501. // "enumDescriptions": [
  9502. // "Show books which are rated mature or lower.",
  9503. // "Show books which are rated not mature."
  9504. // ],
  9505. // "location": "query",
  9506. // "type": "string"
  9507. // },
  9508. // "pageSize": {
  9509. // "description": "Number of maximum results per page to be included in the response.",
  9510. // "format": "uint32",
  9511. // "location": "query",
  9512. // "type": "integer"
  9513. // },
  9514. // "pageToken": {
  9515. // "description": "The value of the nextToken from the previous page.",
  9516. // "location": "query",
  9517. // "type": "string"
  9518. // }
  9519. // },
  9520. // "path": "onboarding/listCategoryVolumes",
  9521. // "response": {
  9522. // "$ref": "Volume2"
  9523. // },
  9524. // "scopes": [
  9525. // "https://www.googleapis.com/auth/books"
  9526. // ]
  9527. // }
  9528. }
  9529. // Pages invokes f for each page of results.
  9530. // A non-nil error returned from f will halt the iteration.
  9531. // The provided context supersedes any context provided to the Context method.
  9532. func (c *OnboardingListCategoryVolumesCall) Pages(ctx context.Context, f func(*Volume2) error) error {
  9533. c.ctx_ = ctx
  9534. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  9535. for {
  9536. x, err := c.Do()
  9537. if err != nil {
  9538. return err
  9539. }
  9540. if err := f(x); err != nil {
  9541. return err
  9542. }
  9543. if x.NextPageToken == "" {
  9544. return nil
  9545. }
  9546. c.PageToken(x.NextPageToken)
  9547. }
  9548. }
  9549. // method id "books.personalizedstream.get":
  9550. type PersonalizedstreamGetCall struct {
  9551. s *Service
  9552. urlParams_ gensupport.URLParams
  9553. ifNoneMatch_ string
  9554. ctx_ context.Context
  9555. header_ http.Header
  9556. }
  9557. // Get: Returns a stream of personalized book clusters
  9558. func (r *PersonalizedstreamService) Get() *PersonalizedstreamGetCall {
  9559. c := &PersonalizedstreamGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9560. return c
  9561. }
  9562. // Locale sets the optional parameter "locale": ISO-639-1 language and
  9563. // ISO-3166-1 country code. Ex: 'en_US'. Used for generating
  9564. // recommendations.
  9565. func (c *PersonalizedstreamGetCall) Locale(locale string) *PersonalizedstreamGetCall {
  9566. c.urlParams_.Set("locale", locale)
  9567. return c
  9568. }
  9569. // MaxAllowedMaturityRating sets the optional parameter
  9570. // "maxAllowedMaturityRating": The maximum allowed maturity rating of
  9571. // returned recommendations. Books with a higher maturity rating are
  9572. // filtered out.
  9573. //
  9574. // Possible values:
  9575. // "mature" - Show books which are rated mature or lower.
  9576. // "not-mature" - Show books which are rated not mature.
  9577. func (c *PersonalizedstreamGetCall) MaxAllowedMaturityRating(maxAllowedMaturityRating string) *PersonalizedstreamGetCall {
  9578. c.urlParams_.Set("maxAllowedMaturityRating", maxAllowedMaturityRating)
  9579. return c
  9580. }
  9581. // Source sets the optional parameter "source": String to identify the
  9582. // originator of this request.
  9583. func (c *PersonalizedstreamGetCall) Source(source string) *PersonalizedstreamGetCall {
  9584. c.urlParams_.Set("source", source)
  9585. return c
  9586. }
  9587. // Fields allows partial responses to be retrieved. See
  9588. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9589. // for more information.
  9590. func (c *PersonalizedstreamGetCall) Fields(s ...googleapi.Field) *PersonalizedstreamGetCall {
  9591. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9592. return c
  9593. }
  9594. // IfNoneMatch sets the optional parameter which makes the operation
  9595. // fail if the object's ETag matches the given value. This is useful for
  9596. // getting updates only after the object has changed since the last
  9597. // request. Use googleapi.IsNotModified to check whether the response
  9598. // error from Do is the result of In-None-Match.
  9599. func (c *PersonalizedstreamGetCall) IfNoneMatch(entityTag string) *PersonalizedstreamGetCall {
  9600. c.ifNoneMatch_ = entityTag
  9601. return c
  9602. }
  9603. // Context sets the context to be used in this call's Do method. Any
  9604. // pending HTTP request will be aborted if the provided context is
  9605. // canceled.
  9606. func (c *PersonalizedstreamGetCall) Context(ctx context.Context) *PersonalizedstreamGetCall {
  9607. c.ctx_ = ctx
  9608. return c
  9609. }
  9610. // Header returns an http.Header that can be modified by the caller to
  9611. // add HTTP headers to the request.
  9612. func (c *PersonalizedstreamGetCall) Header() http.Header {
  9613. if c.header_ == nil {
  9614. c.header_ = make(http.Header)
  9615. }
  9616. return c.header_
  9617. }
  9618. func (c *PersonalizedstreamGetCall) doRequest(alt string) (*http.Response, error) {
  9619. reqHeaders := make(http.Header)
  9620. for k, v := range c.header_ {
  9621. reqHeaders[k] = v
  9622. }
  9623. reqHeaders.Set("User-Agent", c.s.userAgent())
  9624. if c.ifNoneMatch_ != "" {
  9625. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9626. }
  9627. var body io.Reader = nil
  9628. c.urlParams_.Set("alt", alt)
  9629. urls := googleapi.ResolveRelative(c.s.BasePath, "personalizedstream/get")
  9630. urls += "?" + c.urlParams_.Encode()
  9631. req, _ := http.NewRequest("GET", urls, body)
  9632. req.Header = reqHeaders
  9633. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9634. }
  9635. // Do executes the "books.personalizedstream.get" call.
  9636. // Exactly one of *Discoveryclusters or error will be non-nil. Any
  9637. // non-2xx status code is an error. Response headers are in either
  9638. // *Discoveryclusters.ServerResponse.Header or (if a response was
  9639. // returned at all) in error.(*googleapi.Error).Header. Use
  9640. // googleapi.IsNotModified to check whether the returned error was
  9641. // because http.StatusNotModified was returned.
  9642. func (c *PersonalizedstreamGetCall) Do(opts ...googleapi.CallOption) (*Discoveryclusters, error) {
  9643. gensupport.SetOptions(c.urlParams_, opts...)
  9644. res, err := c.doRequest("json")
  9645. if res != nil && res.StatusCode == http.StatusNotModified {
  9646. if res.Body != nil {
  9647. res.Body.Close()
  9648. }
  9649. return nil, &googleapi.Error{
  9650. Code: res.StatusCode,
  9651. Header: res.Header,
  9652. }
  9653. }
  9654. if err != nil {
  9655. return nil, err
  9656. }
  9657. defer googleapi.CloseBody(res)
  9658. if err := googleapi.CheckResponse(res); err != nil {
  9659. return nil, err
  9660. }
  9661. ret := &Discoveryclusters{
  9662. ServerResponse: googleapi.ServerResponse{
  9663. Header: res.Header,
  9664. HTTPStatusCode: res.StatusCode,
  9665. },
  9666. }
  9667. target := &ret
  9668. if err := gensupport.DecodeResponse(target, res); err != nil {
  9669. return nil, err
  9670. }
  9671. return ret, nil
  9672. // {
  9673. // "description": "Returns a stream of personalized book clusters",
  9674. // "httpMethod": "GET",
  9675. // "id": "books.personalizedstream.get",
  9676. // "parameters": {
  9677. // "locale": {
  9678. // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
  9679. // "location": "query",
  9680. // "type": "string"
  9681. // },
  9682. // "maxAllowedMaturityRating": {
  9683. // "description": "The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.",
  9684. // "enum": [
  9685. // "mature",
  9686. // "not-mature"
  9687. // ],
  9688. // "enumDescriptions": [
  9689. // "Show books which are rated mature or lower.",
  9690. // "Show books which are rated not mature."
  9691. // ],
  9692. // "location": "query",
  9693. // "type": "string"
  9694. // },
  9695. // "source": {
  9696. // "description": "String to identify the originator of this request.",
  9697. // "location": "query",
  9698. // "type": "string"
  9699. // }
  9700. // },
  9701. // "path": "personalizedstream/get",
  9702. // "response": {
  9703. // "$ref": "Discoveryclusters"
  9704. // },
  9705. // "scopes": [
  9706. // "https://www.googleapis.com/auth/books"
  9707. // ]
  9708. // }
  9709. }
  9710. // method id "books.promooffer.accept":
  9711. type PromoofferAcceptCall struct {
  9712. s *Service
  9713. urlParams_ gensupport.URLParams
  9714. ctx_ context.Context
  9715. header_ http.Header
  9716. }
  9717. // Accept:
  9718. func (r *PromoofferService) Accept() *PromoofferAcceptCall {
  9719. c := &PromoofferAcceptCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9720. return c
  9721. }
  9722. // AndroidId sets the optional parameter "androidId": device android_id
  9723. func (c *PromoofferAcceptCall) AndroidId(androidId string) *PromoofferAcceptCall {
  9724. c.urlParams_.Set("androidId", androidId)
  9725. return c
  9726. }
  9727. // Device sets the optional parameter "device": device device
  9728. func (c *PromoofferAcceptCall) Device(device string) *PromoofferAcceptCall {
  9729. c.urlParams_.Set("device", device)
  9730. return c
  9731. }
  9732. // Manufacturer sets the optional parameter "manufacturer": device
  9733. // manufacturer
  9734. func (c *PromoofferAcceptCall) Manufacturer(manufacturer string) *PromoofferAcceptCall {
  9735. c.urlParams_.Set("manufacturer", manufacturer)
  9736. return c
  9737. }
  9738. // Model sets the optional parameter "model": device model
  9739. func (c *PromoofferAcceptCall) Model(model string) *PromoofferAcceptCall {
  9740. c.urlParams_.Set("model", model)
  9741. return c
  9742. }
  9743. // OfferId sets the optional parameter "offerId":
  9744. func (c *PromoofferAcceptCall) OfferId(offerId string) *PromoofferAcceptCall {
  9745. c.urlParams_.Set("offerId", offerId)
  9746. return c
  9747. }
  9748. // Product sets the optional parameter "product": device product
  9749. func (c *PromoofferAcceptCall) Product(product string) *PromoofferAcceptCall {
  9750. c.urlParams_.Set("product", product)
  9751. return c
  9752. }
  9753. // Serial sets the optional parameter "serial": device serial
  9754. func (c *PromoofferAcceptCall) Serial(serial string) *PromoofferAcceptCall {
  9755. c.urlParams_.Set("serial", serial)
  9756. return c
  9757. }
  9758. // VolumeId sets the optional parameter "volumeId": Volume id to
  9759. // exercise the offer
  9760. func (c *PromoofferAcceptCall) VolumeId(volumeId string) *PromoofferAcceptCall {
  9761. c.urlParams_.Set("volumeId", volumeId)
  9762. return c
  9763. }
  9764. // Fields allows partial responses to be retrieved. See
  9765. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9766. // for more information.
  9767. func (c *PromoofferAcceptCall) Fields(s ...googleapi.Field) *PromoofferAcceptCall {
  9768. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9769. return c
  9770. }
  9771. // Context sets the context to be used in this call's Do method. Any
  9772. // pending HTTP request will be aborted if the provided context is
  9773. // canceled.
  9774. func (c *PromoofferAcceptCall) Context(ctx context.Context) *PromoofferAcceptCall {
  9775. c.ctx_ = ctx
  9776. return c
  9777. }
  9778. // Header returns an http.Header that can be modified by the caller to
  9779. // add HTTP headers to the request.
  9780. func (c *PromoofferAcceptCall) Header() http.Header {
  9781. if c.header_ == nil {
  9782. c.header_ = make(http.Header)
  9783. }
  9784. return c.header_
  9785. }
  9786. func (c *PromoofferAcceptCall) doRequest(alt string) (*http.Response, error) {
  9787. reqHeaders := make(http.Header)
  9788. for k, v := range c.header_ {
  9789. reqHeaders[k] = v
  9790. }
  9791. reqHeaders.Set("User-Agent", c.s.userAgent())
  9792. var body io.Reader = nil
  9793. c.urlParams_.Set("alt", alt)
  9794. urls := googleapi.ResolveRelative(c.s.BasePath, "promooffer/accept")
  9795. urls += "?" + c.urlParams_.Encode()
  9796. req, _ := http.NewRequest("POST", urls, body)
  9797. req.Header = reqHeaders
  9798. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9799. }
  9800. // Do executes the "books.promooffer.accept" call.
  9801. func (c *PromoofferAcceptCall) Do(opts ...googleapi.CallOption) error {
  9802. gensupport.SetOptions(c.urlParams_, opts...)
  9803. res, err := c.doRequest("json")
  9804. if err != nil {
  9805. return err
  9806. }
  9807. defer googleapi.CloseBody(res)
  9808. if err := googleapi.CheckResponse(res); err != nil {
  9809. return err
  9810. }
  9811. return nil
  9812. // {
  9813. // "description": "",
  9814. // "httpMethod": "POST",
  9815. // "id": "books.promooffer.accept",
  9816. // "parameters": {
  9817. // "androidId": {
  9818. // "description": "device android_id",
  9819. // "location": "query",
  9820. // "type": "string"
  9821. // },
  9822. // "device": {
  9823. // "description": "device device",
  9824. // "location": "query",
  9825. // "type": "string"
  9826. // },
  9827. // "manufacturer": {
  9828. // "description": "device manufacturer",
  9829. // "location": "query",
  9830. // "type": "string"
  9831. // },
  9832. // "model": {
  9833. // "description": "device model",
  9834. // "location": "query",
  9835. // "type": "string"
  9836. // },
  9837. // "offerId": {
  9838. // "location": "query",
  9839. // "type": "string"
  9840. // },
  9841. // "product": {
  9842. // "description": "device product",
  9843. // "location": "query",
  9844. // "type": "string"
  9845. // },
  9846. // "serial": {
  9847. // "description": "device serial",
  9848. // "location": "query",
  9849. // "type": "string"
  9850. // },
  9851. // "volumeId": {
  9852. // "description": "Volume id to exercise the offer",
  9853. // "location": "query",
  9854. // "type": "string"
  9855. // }
  9856. // },
  9857. // "path": "promooffer/accept",
  9858. // "scopes": [
  9859. // "https://www.googleapis.com/auth/books"
  9860. // ]
  9861. // }
  9862. }
  9863. // method id "books.promooffer.dismiss":
  9864. type PromoofferDismissCall struct {
  9865. s *Service
  9866. urlParams_ gensupport.URLParams
  9867. ctx_ context.Context
  9868. header_ http.Header
  9869. }
  9870. // Dismiss:
  9871. func (r *PromoofferService) Dismiss() *PromoofferDismissCall {
  9872. c := &PromoofferDismissCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9873. return c
  9874. }
  9875. // AndroidId sets the optional parameter "androidId": device android_id
  9876. func (c *PromoofferDismissCall) AndroidId(androidId string) *PromoofferDismissCall {
  9877. c.urlParams_.Set("androidId", androidId)
  9878. return c
  9879. }
  9880. // Device sets the optional parameter "device": device device
  9881. func (c *PromoofferDismissCall) Device(device string) *PromoofferDismissCall {
  9882. c.urlParams_.Set("device", device)
  9883. return c
  9884. }
  9885. // Manufacturer sets the optional parameter "manufacturer": device
  9886. // manufacturer
  9887. func (c *PromoofferDismissCall) Manufacturer(manufacturer string) *PromoofferDismissCall {
  9888. c.urlParams_.Set("manufacturer", manufacturer)
  9889. return c
  9890. }
  9891. // Model sets the optional parameter "model": device model
  9892. func (c *PromoofferDismissCall) Model(model string) *PromoofferDismissCall {
  9893. c.urlParams_.Set("model", model)
  9894. return c
  9895. }
  9896. // OfferId sets the optional parameter "offerId": Offer to dimiss
  9897. func (c *PromoofferDismissCall) OfferId(offerId string) *PromoofferDismissCall {
  9898. c.urlParams_.Set("offerId", offerId)
  9899. return c
  9900. }
  9901. // Product sets the optional parameter "product": device product
  9902. func (c *PromoofferDismissCall) Product(product string) *PromoofferDismissCall {
  9903. c.urlParams_.Set("product", product)
  9904. return c
  9905. }
  9906. // Serial sets the optional parameter "serial": device serial
  9907. func (c *PromoofferDismissCall) Serial(serial string) *PromoofferDismissCall {
  9908. c.urlParams_.Set("serial", serial)
  9909. return c
  9910. }
  9911. // Fields allows partial responses to be retrieved. See
  9912. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9913. // for more information.
  9914. func (c *PromoofferDismissCall) Fields(s ...googleapi.Field) *PromoofferDismissCall {
  9915. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9916. return c
  9917. }
  9918. // Context sets the context to be used in this call's Do method. Any
  9919. // pending HTTP request will be aborted if the provided context is
  9920. // canceled.
  9921. func (c *PromoofferDismissCall) Context(ctx context.Context) *PromoofferDismissCall {
  9922. c.ctx_ = ctx
  9923. return c
  9924. }
  9925. // Header returns an http.Header that can be modified by the caller to
  9926. // add HTTP headers to the request.
  9927. func (c *PromoofferDismissCall) Header() http.Header {
  9928. if c.header_ == nil {
  9929. c.header_ = make(http.Header)
  9930. }
  9931. return c.header_
  9932. }
  9933. func (c *PromoofferDismissCall) doRequest(alt string) (*http.Response, error) {
  9934. reqHeaders := make(http.Header)
  9935. for k, v := range c.header_ {
  9936. reqHeaders[k] = v
  9937. }
  9938. reqHeaders.Set("User-Agent", c.s.userAgent())
  9939. var body io.Reader = nil
  9940. c.urlParams_.Set("alt", alt)
  9941. urls := googleapi.ResolveRelative(c.s.BasePath, "promooffer/dismiss")
  9942. urls += "?" + c.urlParams_.Encode()
  9943. req, _ := http.NewRequest("POST", urls, body)
  9944. req.Header = reqHeaders
  9945. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9946. }
  9947. // Do executes the "books.promooffer.dismiss" call.
  9948. func (c *PromoofferDismissCall) Do(opts ...googleapi.CallOption) error {
  9949. gensupport.SetOptions(c.urlParams_, opts...)
  9950. res, err := c.doRequest("json")
  9951. if err != nil {
  9952. return err
  9953. }
  9954. defer googleapi.CloseBody(res)
  9955. if err := googleapi.CheckResponse(res); err != nil {
  9956. return err
  9957. }
  9958. return nil
  9959. // {
  9960. // "description": "",
  9961. // "httpMethod": "POST",
  9962. // "id": "books.promooffer.dismiss",
  9963. // "parameters": {
  9964. // "androidId": {
  9965. // "description": "device android_id",
  9966. // "location": "query",
  9967. // "type": "string"
  9968. // },
  9969. // "device": {
  9970. // "description": "device device",
  9971. // "location": "query",
  9972. // "type": "string"
  9973. // },
  9974. // "manufacturer": {
  9975. // "description": "device manufacturer",
  9976. // "location": "query",
  9977. // "type": "string"
  9978. // },
  9979. // "model": {
  9980. // "description": "device model",
  9981. // "location": "query",
  9982. // "type": "string"
  9983. // },
  9984. // "offerId": {
  9985. // "description": "Offer to dimiss",
  9986. // "location": "query",
  9987. // "type": "string"
  9988. // },
  9989. // "product": {
  9990. // "description": "device product",
  9991. // "location": "query",
  9992. // "type": "string"
  9993. // },
  9994. // "serial": {
  9995. // "description": "device serial",
  9996. // "location": "query",
  9997. // "type": "string"
  9998. // }
  9999. // },
  10000. // "path": "promooffer/dismiss",
  10001. // "scopes": [
  10002. // "https://www.googleapis.com/auth/books"
  10003. // ]
  10004. // }
  10005. }
  10006. // method id "books.promooffer.get":
  10007. type PromoofferGetCall struct {
  10008. s *Service
  10009. urlParams_ gensupport.URLParams
  10010. ifNoneMatch_ string
  10011. ctx_ context.Context
  10012. header_ http.Header
  10013. }
  10014. // Get: Returns a list of promo offers available to the user
  10015. func (r *PromoofferService) Get() *PromoofferGetCall {
  10016. c := &PromoofferGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10017. return c
  10018. }
  10019. // AndroidId sets the optional parameter "androidId": device android_id
  10020. func (c *PromoofferGetCall) AndroidId(androidId string) *PromoofferGetCall {
  10021. c.urlParams_.Set("androidId", androidId)
  10022. return c
  10023. }
  10024. // Device sets the optional parameter "device": device device
  10025. func (c *PromoofferGetCall) Device(device string) *PromoofferGetCall {
  10026. c.urlParams_.Set("device", device)
  10027. return c
  10028. }
  10029. // Manufacturer sets the optional parameter "manufacturer": device
  10030. // manufacturer
  10031. func (c *PromoofferGetCall) Manufacturer(manufacturer string) *PromoofferGetCall {
  10032. c.urlParams_.Set("manufacturer", manufacturer)
  10033. return c
  10034. }
  10035. // Model sets the optional parameter "model": device model
  10036. func (c *PromoofferGetCall) Model(model string) *PromoofferGetCall {
  10037. c.urlParams_.Set("model", model)
  10038. return c
  10039. }
  10040. // Product sets the optional parameter "product": device product
  10041. func (c *PromoofferGetCall) Product(product string) *PromoofferGetCall {
  10042. c.urlParams_.Set("product", product)
  10043. return c
  10044. }
  10045. // Serial sets the optional parameter "serial": device serial
  10046. func (c *PromoofferGetCall) Serial(serial string) *PromoofferGetCall {
  10047. c.urlParams_.Set("serial", serial)
  10048. return c
  10049. }
  10050. // Fields allows partial responses to be retrieved. See
  10051. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10052. // for more information.
  10053. func (c *PromoofferGetCall) Fields(s ...googleapi.Field) *PromoofferGetCall {
  10054. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10055. return c
  10056. }
  10057. // IfNoneMatch sets the optional parameter which makes the operation
  10058. // fail if the object's ETag matches the given value. This is useful for
  10059. // getting updates only after the object has changed since the last
  10060. // request. Use googleapi.IsNotModified to check whether the response
  10061. // error from Do is the result of In-None-Match.
  10062. func (c *PromoofferGetCall) IfNoneMatch(entityTag string) *PromoofferGetCall {
  10063. c.ifNoneMatch_ = entityTag
  10064. return c
  10065. }
  10066. // Context sets the context to be used in this call's Do method. Any
  10067. // pending HTTP request will be aborted if the provided context is
  10068. // canceled.
  10069. func (c *PromoofferGetCall) Context(ctx context.Context) *PromoofferGetCall {
  10070. c.ctx_ = ctx
  10071. return c
  10072. }
  10073. // Header returns an http.Header that can be modified by the caller to
  10074. // add HTTP headers to the request.
  10075. func (c *PromoofferGetCall) Header() http.Header {
  10076. if c.header_ == nil {
  10077. c.header_ = make(http.Header)
  10078. }
  10079. return c.header_
  10080. }
  10081. func (c *PromoofferGetCall) doRequest(alt string) (*http.Response, error) {
  10082. reqHeaders := make(http.Header)
  10083. for k, v := range c.header_ {
  10084. reqHeaders[k] = v
  10085. }
  10086. reqHeaders.Set("User-Agent", c.s.userAgent())
  10087. if c.ifNoneMatch_ != "" {
  10088. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10089. }
  10090. var body io.Reader = nil
  10091. c.urlParams_.Set("alt", alt)
  10092. urls := googleapi.ResolveRelative(c.s.BasePath, "promooffer/get")
  10093. urls += "?" + c.urlParams_.Encode()
  10094. req, _ := http.NewRequest("GET", urls, body)
  10095. req.Header = reqHeaders
  10096. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10097. }
  10098. // Do executes the "books.promooffer.get" call.
  10099. // Exactly one of *Offers or error will be non-nil. Any non-2xx status
  10100. // code is an error. Response headers are in either
  10101. // *Offers.ServerResponse.Header or (if a response was returned at all)
  10102. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  10103. // check whether the returned error was because http.StatusNotModified
  10104. // was returned.
  10105. func (c *PromoofferGetCall) Do(opts ...googleapi.CallOption) (*Offers, error) {
  10106. gensupport.SetOptions(c.urlParams_, opts...)
  10107. res, err := c.doRequest("json")
  10108. if res != nil && res.StatusCode == http.StatusNotModified {
  10109. if res.Body != nil {
  10110. res.Body.Close()
  10111. }
  10112. return nil, &googleapi.Error{
  10113. Code: res.StatusCode,
  10114. Header: res.Header,
  10115. }
  10116. }
  10117. if err != nil {
  10118. return nil, err
  10119. }
  10120. defer googleapi.CloseBody(res)
  10121. if err := googleapi.CheckResponse(res); err != nil {
  10122. return nil, err
  10123. }
  10124. ret := &Offers{
  10125. ServerResponse: googleapi.ServerResponse{
  10126. Header: res.Header,
  10127. HTTPStatusCode: res.StatusCode,
  10128. },
  10129. }
  10130. target := &ret
  10131. if err := gensupport.DecodeResponse(target, res); err != nil {
  10132. return nil, err
  10133. }
  10134. return ret, nil
  10135. // {
  10136. // "description": "Returns a list of promo offers available to the user",
  10137. // "httpMethod": "GET",
  10138. // "id": "books.promooffer.get",
  10139. // "parameters": {
  10140. // "androidId": {
  10141. // "description": "device android_id",
  10142. // "location": "query",
  10143. // "type": "string"
  10144. // },
  10145. // "device": {
  10146. // "description": "device device",
  10147. // "location": "query",
  10148. // "type": "string"
  10149. // },
  10150. // "manufacturer": {
  10151. // "description": "device manufacturer",
  10152. // "location": "query",
  10153. // "type": "string"
  10154. // },
  10155. // "model": {
  10156. // "description": "device model",
  10157. // "location": "query",
  10158. // "type": "string"
  10159. // },
  10160. // "product": {
  10161. // "description": "device product",
  10162. // "location": "query",
  10163. // "type": "string"
  10164. // },
  10165. // "serial": {
  10166. // "description": "device serial",
  10167. // "location": "query",
  10168. // "type": "string"
  10169. // }
  10170. // },
  10171. // "path": "promooffer/get",
  10172. // "response": {
  10173. // "$ref": "Offers"
  10174. // },
  10175. // "scopes": [
  10176. // "https://www.googleapis.com/auth/books"
  10177. // ]
  10178. // }
  10179. }
  10180. // method id "books.series.get":
  10181. type SeriesGetCall struct {
  10182. s *Service
  10183. urlParams_ gensupport.URLParams
  10184. ifNoneMatch_ string
  10185. ctx_ context.Context
  10186. header_ http.Header
  10187. }
  10188. // Get: Returns Series metadata for the given series ids.
  10189. func (r *SeriesService) Get(seriesId []string) *SeriesGetCall {
  10190. c := &SeriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10191. c.urlParams_.SetMulti("series_id", append([]string{}, seriesId...))
  10192. return c
  10193. }
  10194. // Fields allows partial responses to be retrieved. See
  10195. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10196. // for more information.
  10197. func (c *SeriesGetCall) Fields(s ...googleapi.Field) *SeriesGetCall {
  10198. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10199. return c
  10200. }
  10201. // IfNoneMatch sets the optional parameter which makes the operation
  10202. // fail if the object's ETag matches the given value. This is useful for
  10203. // getting updates only after the object has changed since the last
  10204. // request. Use googleapi.IsNotModified to check whether the response
  10205. // error from Do is the result of In-None-Match.
  10206. func (c *SeriesGetCall) IfNoneMatch(entityTag string) *SeriesGetCall {
  10207. c.ifNoneMatch_ = entityTag
  10208. return c
  10209. }
  10210. // Context sets the context to be used in this call's Do method. Any
  10211. // pending HTTP request will be aborted if the provided context is
  10212. // canceled.
  10213. func (c *SeriesGetCall) Context(ctx context.Context) *SeriesGetCall {
  10214. c.ctx_ = ctx
  10215. return c
  10216. }
  10217. // Header returns an http.Header that can be modified by the caller to
  10218. // add HTTP headers to the request.
  10219. func (c *SeriesGetCall) Header() http.Header {
  10220. if c.header_ == nil {
  10221. c.header_ = make(http.Header)
  10222. }
  10223. return c.header_
  10224. }
  10225. func (c *SeriesGetCall) doRequest(alt string) (*http.Response, error) {
  10226. reqHeaders := make(http.Header)
  10227. for k, v := range c.header_ {
  10228. reqHeaders[k] = v
  10229. }
  10230. reqHeaders.Set("User-Agent", c.s.userAgent())
  10231. if c.ifNoneMatch_ != "" {
  10232. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10233. }
  10234. var body io.Reader = nil
  10235. c.urlParams_.Set("alt", alt)
  10236. urls := googleapi.ResolveRelative(c.s.BasePath, "series/get")
  10237. urls += "?" + c.urlParams_.Encode()
  10238. req, _ := http.NewRequest("GET", urls, body)
  10239. req.Header = reqHeaders
  10240. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10241. }
  10242. // Do executes the "books.series.get" call.
  10243. // Exactly one of *Series or error will be non-nil. Any non-2xx status
  10244. // code is an error. Response headers are in either
  10245. // *Series.ServerResponse.Header or (if a response was returned at all)
  10246. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  10247. // check whether the returned error was because http.StatusNotModified
  10248. // was returned.
  10249. func (c *SeriesGetCall) Do(opts ...googleapi.CallOption) (*Series, error) {
  10250. gensupport.SetOptions(c.urlParams_, opts...)
  10251. res, err := c.doRequest("json")
  10252. if res != nil && res.StatusCode == http.StatusNotModified {
  10253. if res.Body != nil {
  10254. res.Body.Close()
  10255. }
  10256. return nil, &googleapi.Error{
  10257. Code: res.StatusCode,
  10258. Header: res.Header,
  10259. }
  10260. }
  10261. if err != nil {
  10262. return nil, err
  10263. }
  10264. defer googleapi.CloseBody(res)
  10265. if err := googleapi.CheckResponse(res); err != nil {
  10266. return nil, err
  10267. }
  10268. ret := &Series{
  10269. ServerResponse: googleapi.ServerResponse{
  10270. Header: res.Header,
  10271. HTTPStatusCode: res.StatusCode,
  10272. },
  10273. }
  10274. target := &ret
  10275. if err := gensupport.DecodeResponse(target, res); err != nil {
  10276. return nil, err
  10277. }
  10278. return ret, nil
  10279. // {
  10280. // "description": "Returns Series metadata for the given series ids.",
  10281. // "httpMethod": "GET",
  10282. // "id": "books.series.get",
  10283. // "parameterOrder": [
  10284. // "series_id"
  10285. // ],
  10286. // "parameters": {
  10287. // "series_id": {
  10288. // "description": "String that identifies the series",
  10289. // "location": "query",
  10290. // "repeated": true,
  10291. // "required": true,
  10292. // "type": "string"
  10293. // }
  10294. // },
  10295. // "path": "series/get",
  10296. // "response": {
  10297. // "$ref": "Series"
  10298. // },
  10299. // "scopes": [
  10300. // "https://www.googleapis.com/auth/books"
  10301. // ]
  10302. // }
  10303. }
  10304. // method id "books.series.membership.get":
  10305. type SeriesMembershipGetCall struct {
  10306. s *Service
  10307. urlParams_ gensupport.URLParams
  10308. ifNoneMatch_ string
  10309. ctx_ context.Context
  10310. header_ http.Header
  10311. }
  10312. // Get: Returns Series membership data given the series id.
  10313. func (r *SeriesMembershipService) Get(seriesId string) *SeriesMembershipGetCall {
  10314. c := &SeriesMembershipGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10315. c.urlParams_.Set("series_id", seriesId)
  10316. return c
  10317. }
  10318. // PageSize sets the optional parameter "page_size": Number of maximum
  10319. // results per page to be included in the response.
  10320. func (c *SeriesMembershipGetCall) PageSize(pageSize int64) *SeriesMembershipGetCall {
  10321. c.urlParams_.Set("page_size", fmt.Sprint(pageSize))
  10322. return c
  10323. }
  10324. // PageToken sets the optional parameter "page_token": The value of the
  10325. // nextToken from the previous page.
  10326. func (c *SeriesMembershipGetCall) PageToken(pageToken string) *SeriesMembershipGetCall {
  10327. c.urlParams_.Set("page_token", pageToken)
  10328. return c
  10329. }
  10330. // Fields allows partial responses to be retrieved. See
  10331. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10332. // for more information.
  10333. func (c *SeriesMembershipGetCall) Fields(s ...googleapi.Field) *SeriesMembershipGetCall {
  10334. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10335. return c
  10336. }
  10337. // IfNoneMatch sets the optional parameter which makes the operation
  10338. // fail if the object's ETag matches the given value. This is useful for
  10339. // getting updates only after the object has changed since the last
  10340. // request. Use googleapi.IsNotModified to check whether the response
  10341. // error from Do is the result of In-None-Match.
  10342. func (c *SeriesMembershipGetCall) IfNoneMatch(entityTag string) *SeriesMembershipGetCall {
  10343. c.ifNoneMatch_ = entityTag
  10344. return c
  10345. }
  10346. // Context sets the context to be used in this call's Do method. Any
  10347. // pending HTTP request will be aborted if the provided context is
  10348. // canceled.
  10349. func (c *SeriesMembershipGetCall) Context(ctx context.Context) *SeriesMembershipGetCall {
  10350. c.ctx_ = ctx
  10351. return c
  10352. }
  10353. // Header returns an http.Header that can be modified by the caller to
  10354. // add HTTP headers to the request.
  10355. func (c *SeriesMembershipGetCall) Header() http.Header {
  10356. if c.header_ == nil {
  10357. c.header_ = make(http.Header)
  10358. }
  10359. return c.header_
  10360. }
  10361. func (c *SeriesMembershipGetCall) doRequest(alt string) (*http.Response, error) {
  10362. reqHeaders := make(http.Header)
  10363. for k, v := range c.header_ {
  10364. reqHeaders[k] = v
  10365. }
  10366. reqHeaders.Set("User-Agent", c.s.userAgent())
  10367. if c.ifNoneMatch_ != "" {
  10368. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10369. }
  10370. var body io.Reader = nil
  10371. c.urlParams_.Set("alt", alt)
  10372. urls := googleapi.ResolveRelative(c.s.BasePath, "series/membership/get")
  10373. urls += "?" + c.urlParams_.Encode()
  10374. req, _ := http.NewRequest("GET", urls, body)
  10375. req.Header = reqHeaders
  10376. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10377. }
  10378. // Do executes the "books.series.membership.get" call.
  10379. // Exactly one of *Seriesmembership or error will be non-nil. Any
  10380. // non-2xx status code is an error. Response headers are in either
  10381. // *Seriesmembership.ServerResponse.Header or (if a response was
  10382. // returned at all) in error.(*googleapi.Error).Header. Use
  10383. // googleapi.IsNotModified to check whether the returned error was
  10384. // because http.StatusNotModified was returned.
  10385. func (c *SeriesMembershipGetCall) Do(opts ...googleapi.CallOption) (*Seriesmembership, error) {
  10386. gensupport.SetOptions(c.urlParams_, opts...)
  10387. res, err := c.doRequest("json")
  10388. if res != nil && res.StatusCode == http.StatusNotModified {
  10389. if res.Body != nil {
  10390. res.Body.Close()
  10391. }
  10392. return nil, &googleapi.Error{
  10393. Code: res.StatusCode,
  10394. Header: res.Header,
  10395. }
  10396. }
  10397. if err != nil {
  10398. return nil, err
  10399. }
  10400. defer googleapi.CloseBody(res)
  10401. if err := googleapi.CheckResponse(res); err != nil {
  10402. return nil, err
  10403. }
  10404. ret := &Seriesmembership{
  10405. ServerResponse: googleapi.ServerResponse{
  10406. Header: res.Header,
  10407. HTTPStatusCode: res.StatusCode,
  10408. },
  10409. }
  10410. target := &ret
  10411. if err := gensupport.DecodeResponse(target, res); err != nil {
  10412. return nil, err
  10413. }
  10414. return ret, nil
  10415. // {
  10416. // "description": "Returns Series membership data given the series id.",
  10417. // "httpMethod": "GET",
  10418. // "id": "books.series.membership.get",
  10419. // "parameterOrder": [
  10420. // "series_id"
  10421. // ],
  10422. // "parameters": {
  10423. // "page_size": {
  10424. // "description": "Number of maximum results per page to be included in the response.",
  10425. // "format": "uint32",
  10426. // "location": "query",
  10427. // "type": "integer"
  10428. // },
  10429. // "page_token": {
  10430. // "description": "The value of the nextToken from the previous page.",
  10431. // "location": "query",
  10432. // "type": "string"
  10433. // },
  10434. // "series_id": {
  10435. // "description": "String that identifies the series",
  10436. // "location": "query",
  10437. // "required": true,
  10438. // "type": "string"
  10439. // }
  10440. // },
  10441. // "path": "series/membership/get",
  10442. // "response": {
  10443. // "$ref": "Seriesmembership"
  10444. // },
  10445. // "scopes": [
  10446. // "https://www.googleapis.com/auth/books"
  10447. // ]
  10448. // }
  10449. }
  10450. // method id "books.volumes.get":
  10451. type VolumesGetCall struct {
  10452. s *Service
  10453. volumeId string
  10454. urlParams_ gensupport.URLParams
  10455. ifNoneMatch_ string
  10456. ctx_ context.Context
  10457. header_ http.Header
  10458. }
  10459. // Get: Gets volume information for a single volume.
  10460. func (r *VolumesService) Get(volumeId string) *VolumesGetCall {
  10461. c := &VolumesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10462. c.volumeId = volumeId
  10463. return c
  10464. }
  10465. // Country sets the optional parameter "country": ISO-3166-1 code to
  10466. // override the IP-based location.
  10467. func (c *VolumesGetCall) Country(country string) *VolumesGetCall {
  10468. c.urlParams_.Set("country", country)
  10469. return c
  10470. }
  10471. // IncludeNonComicsSeries sets the optional parameter
  10472. // "includeNonComicsSeries": Set to true to include non-comics series.
  10473. // Defaults to false.
  10474. func (c *VolumesGetCall) IncludeNonComicsSeries(includeNonComicsSeries bool) *VolumesGetCall {
  10475. c.urlParams_.Set("includeNonComicsSeries", fmt.Sprint(includeNonComicsSeries))
  10476. return c
  10477. }
  10478. // Partner sets the optional parameter "partner": Brand results for
  10479. // partner ID.
  10480. func (c *VolumesGetCall) Partner(partner string) *VolumesGetCall {
  10481. c.urlParams_.Set("partner", partner)
  10482. return c
  10483. }
  10484. // Projection sets the optional parameter "projection": Restrict
  10485. // information returned to a set of selected fields.
  10486. //
  10487. // Possible values:
  10488. // "full" - Includes all volume data.
  10489. // "lite" - Includes a subset of fields in volumeInfo and accessInfo.
  10490. func (c *VolumesGetCall) Projection(projection string) *VolumesGetCall {
  10491. c.urlParams_.Set("projection", projection)
  10492. return c
  10493. }
  10494. // Source sets the optional parameter "source": String to identify the
  10495. // originator of this request.
  10496. func (c *VolumesGetCall) Source(source string) *VolumesGetCall {
  10497. c.urlParams_.Set("source", source)
  10498. return c
  10499. }
  10500. // UserLibraryConsistentRead sets the optional parameter
  10501. // "user_library_consistent_read":
  10502. func (c *VolumesGetCall) UserLibraryConsistentRead(userLibraryConsistentRead bool) *VolumesGetCall {
  10503. c.urlParams_.Set("user_library_consistent_read", fmt.Sprint(userLibraryConsistentRead))
  10504. return c
  10505. }
  10506. // Fields allows partial responses to be retrieved. See
  10507. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10508. // for more information.
  10509. func (c *VolumesGetCall) Fields(s ...googleapi.Field) *VolumesGetCall {
  10510. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10511. return c
  10512. }
  10513. // IfNoneMatch sets the optional parameter which makes the operation
  10514. // fail if the object's ETag matches the given value. This is useful for
  10515. // getting updates only after the object has changed since the last
  10516. // request. Use googleapi.IsNotModified to check whether the response
  10517. // error from Do is the result of In-None-Match.
  10518. func (c *VolumesGetCall) IfNoneMatch(entityTag string) *VolumesGetCall {
  10519. c.ifNoneMatch_ = entityTag
  10520. return c
  10521. }
  10522. // Context sets the context to be used in this call's Do method. Any
  10523. // pending HTTP request will be aborted if the provided context is
  10524. // canceled.
  10525. func (c *VolumesGetCall) Context(ctx context.Context) *VolumesGetCall {
  10526. c.ctx_ = ctx
  10527. return c
  10528. }
  10529. // Header returns an http.Header that can be modified by the caller to
  10530. // add HTTP headers to the request.
  10531. func (c *VolumesGetCall) Header() http.Header {
  10532. if c.header_ == nil {
  10533. c.header_ = make(http.Header)
  10534. }
  10535. return c.header_
  10536. }
  10537. func (c *VolumesGetCall) doRequest(alt string) (*http.Response, error) {
  10538. reqHeaders := make(http.Header)
  10539. for k, v := range c.header_ {
  10540. reqHeaders[k] = v
  10541. }
  10542. reqHeaders.Set("User-Agent", c.s.userAgent())
  10543. if c.ifNoneMatch_ != "" {
  10544. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10545. }
  10546. var body io.Reader = nil
  10547. c.urlParams_.Set("alt", alt)
  10548. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}")
  10549. urls += "?" + c.urlParams_.Encode()
  10550. req, _ := http.NewRequest("GET", urls, body)
  10551. req.Header = reqHeaders
  10552. googleapi.Expand(req.URL, map[string]string{
  10553. "volumeId": c.volumeId,
  10554. })
  10555. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10556. }
  10557. // Do executes the "books.volumes.get" call.
  10558. // Exactly one of *Volume or error will be non-nil. Any non-2xx status
  10559. // code is an error. Response headers are in either
  10560. // *Volume.ServerResponse.Header or (if a response was returned at all)
  10561. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  10562. // check whether the returned error was because http.StatusNotModified
  10563. // was returned.
  10564. func (c *VolumesGetCall) Do(opts ...googleapi.CallOption) (*Volume, error) {
  10565. gensupport.SetOptions(c.urlParams_, opts...)
  10566. res, err := c.doRequest("json")
  10567. if res != nil && res.StatusCode == http.StatusNotModified {
  10568. if res.Body != nil {
  10569. res.Body.Close()
  10570. }
  10571. return nil, &googleapi.Error{
  10572. Code: res.StatusCode,
  10573. Header: res.Header,
  10574. }
  10575. }
  10576. if err != nil {
  10577. return nil, err
  10578. }
  10579. defer googleapi.CloseBody(res)
  10580. if err := googleapi.CheckResponse(res); err != nil {
  10581. return nil, err
  10582. }
  10583. ret := &Volume{
  10584. ServerResponse: googleapi.ServerResponse{
  10585. Header: res.Header,
  10586. HTTPStatusCode: res.StatusCode,
  10587. },
  10588. }
  10589. target := &ret
  10590. if err := gensupport.DecodeResponse(target, res); err != nil {
  10591. return nil, err
  10592. }
  10593. return ret, nil
  10594. // {
  10595. // "description": "Gets volume information for a single volume.",
  10596. // "httpMethod": "GET",
  10597. // "id": "books.volumes.get",
  10598. // "parameterOrder": [
  10599. // "volumeId"
  10600. // ],
  10601. // "parameters": {
  10602. // "country": {
  10603. // "description": "ISO-3166-1 code to override the IP-based location.",
  10604. // "location": "query",
  10605. // "type": "string"
  10606. // },
  10607. // "includeNonComicsSeries": {
  10608. // "description": "Set to true to include non-comics series. Defaults to false.",
  10609. // "location": "query",
  10610. // "type": "boolean"
  10611. // },
  10612. // "partner": {
  10613. // "description": "Brand results for partner ID.",
  10614. // "location": "query",
  10615. // "type": "string"
  10616. // },
  10617. // "projection": {
  10618. // "description": "Restrict information returned to a set of selected fields.",
  10619. // "enum": [
  10620. // "full",
  10621. // "lite"
  10622. // ],
  10623. // "enumDescriptions": [
  10624. // "Includes all volume data.",
  10625. // "Includes a subset of fields in volumeInfo and accessInfo."
  10626. // ],
  10627. // "location": "query",
  10628. // "type": "string"
  10629. // },
  10630. // "source": {
  10631. // "description": "String to identify the originator of this request.",
  10632. // "location": "query",
  10633. // "type": "string"
  10634. // },
  10635. // "user_library_consistent_read": {
  10636. // "location": "query",
  10637. // "type": "boolean"
  10638. // },
  10639. // "volumeId": {
  10640. // "description": "ID of volume to retrieve.",
  10641. // "location": "path",
  10642. // "required": true,
  10643. // "type": "string"
  10644. // }
  10645. // },
  10646. // "path": "volumes/{volumeId}",
  10647. // "response": {
  10648. // "$ref": "Volume"
  10649. // },
  10650. // "scopes": [
  10651. // "https://www.googleapis.com/auth/books"
  10652. // ]
  10653. // }
  10654. }
  10655. // method id "books.volumes.list":
  10656. type VolumesListCall struct {
  10657. s *Service
  10658. urlParams_ gensupport.URLParams
  10659. ifNoneMatch_ string
  10660. ctx_ context.Context
  10661. header_ http.Header
  10662. }
  10663. // List: Performs a book search.
  10664. func (r *VolumesService) List(q string) *VolumesListCall {
  10665. c := &VolumesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10666. c.urlParams_.Set("q", q)
  10667. return c
  10668. }
  10669. // Download sets the optional parameter "download": Restrict to volumes
  10670. // by download availability.
  10671. //
  10672. // Possible values:
  10673. // "epub" - All volumes with epub.
  10674. func (c *VolumesListCall) Download(download string) *VolumesListCall {
  10675. c.urlParams_.Set("download", download)
  10676. return c
  10677. }
  10678. // Filter sets the optional parameter "filter": Filter search results.
  10679. //
  10680. // Possible values:
  10681. // "ebooks" - All Google eBooks.
  10682. // "free-ebooks" - Google eBook with full volume text viewability.
  10683. // "full" - Public can view entire volume text.
  10684. // "paid-ebooks" - Google eBook with a price.
  10685. // "partial" - Public able to see parts of text.
  10686. func (c *VolumesListCall) Filter(filter string) *VolumesListCall {
  10687. c.urlParams_.Set("filter", filter)
  10688. return c
  10689. }
  10690. // LangRestrict sets the optional parameter "langRestrict": Restrict
  10691. // results to books with this language code.
  10692. func (c *VolumesListCall) LangRestrict(langRestrict string) *VolumesListCall {
  10693. c.urlParams_.Set("langRestrict", langRestrict)
  10694. return c
  10695. }
  10696. // LibraryRestrict sets the optional parameter "libraryRestrict":
  10697. // Restrict search to this user's library.
  10698. //
  10699. // Possible values:
  10700. // "my-library" - Restrict to the user's library, any shelf.
  10701. // "no-restrict" - Do not restrict based on user's library.
  10702. func (c *VolumesListCall) LibraryRestrict(libraryRestrict string) *VolumesListCall {
  10703. c.urlParams_.Set("libraryRestrict", libraryRestrict)
  10704. return c
  10705. }
  10706. // MaxAllowedMaturityRating sets the optional parameter
  10707. // "maxAllowedMaturityRating": The maximum allowed maturity rating of
  10708. // returned recommendations. Books with a higher maturity rating are
  10709. // filtered out.
  10710. //
  10711. // Possible values:
  10712. // "mature" - Show books which are rated mature or lower.
  10713. // "not-mature" - Show books which are rated not mature.
  10714. func (c *VolumesListCall) MaxAllowedMaturityRating(maxAllowedMaturityRating string) *VolumesListCall {
  10715. c.urlParams_.Set("maxAllowedMaturityRating", maxAllowedMaturityRating)
  10716. return c
  10717. }
  10718. // MaxResults sets the optional parameter "maxResults": Maximum number
  10719. // of results to return.
  10720. func (c *VolumesListCall) MaxResults(maxResults int64) *VolumesListCall {
  10721. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  10722. return c
  10723. }
  10724. // OrderBy sets the optional parameter "orderBy": Sort search results.
  10725. //
  10726. // Possible values:
  10727. // "newest" - Most recently published.
  10728. // "relevance" - Relevance to search terms.
  10729. func (c *VolumesListCall) OrderBy(orderBy string) *VolumesListCall {
  10730. c.urlParams_.Set("orderBy", orderBy)
  10731. return c
  10732. }
  10733. // Partner sets the optional parameter "partner": Restrict and brand
  10734. // results for partner ID.
  10735. func (c *VolumesListCall) Partner(partner string) *VolumesListCall {
  10736. c.urlParams_.Set("partner", partner)
  10737. return c
  10738. }
  10739. // PrintType sets the optional parameter "printType": Restrict to books
  10740. // or magazines.
  10741. //
  10742. // Possible values:
  10743. // "all" - All volume content types.
  10744. // "books" - Just books.
  10745. // "magazines" - Just magazines.
  10746. func (c *VolumesListCall) PrintType(printType string) *VolumesListCall {
  10747. c.urlParams_.Set("printType", printType)
  10748. return c
  10749. }
  10750. // Projection sets the optional parameter "projection": Restrict
  10751. // information returned to a set of selected fields.
  10752. //
  10753. // Possible values:
  10754. // "full" - Includes all volume data.
  10755. // "lite" - Includes a subset of fields in volumeInfo and accessInfo.
  10756. func (c *VolumesListCall) Projection(projection string) *VolumesListCall {
  10757. c.urlParams_.Set("projection", projection)
  10758. return c
  10759. }
  10760. // ShowPreorders sets the optional parameter "showPreorders": Set to
  10761. // true to show books available for preorder. Defaults to false.
  10762. func (c *VolumesListCall) ShowPreorders(showPreorders bool) *VolumesListCall {
  10763. c.urlParams_.Set("showPreorders", fmt.Sprint(showPreorders))
  10764. return c
  10765. }
  10766. // Source sets the optional parameter "source": String to identify the
  10767. // originator of this request.
  10768. func (c *VolumesListCall) Source(source string) *VolumesListCall {
  10769. c.urlParams_.Set("source", source)
  10770. return c
  10771. }
  10772. // StartIndex sets the optional parameter "startIndex": Index of the
  10773. // first result to return (starts at 0)
  10774. func (c *VolumesListCall) StartIndex(startIndex int64) *VolumesListCall {
  10775. c.urlParams_.Set("startIndex", fmt.Sprint(startIndex))
  10776. return c
  10777. }
  10778. // Fields allows partial responses to be retrieved. See
  10779. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10780. // for more information.
  10781. func (c *VolumesListCall) Fields(s ...googleapi.Field) *VolumesListCall {
  10782. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10783. return c
  10784. }
  10785. // IfNoneMatch sets the optional parameter which makes the operation
  10786. // fail if the object's ETag matches the given value. This is useful for
  10787. // getting updates only after the object has changed since the last
  10788. // request. Use googleapi.IsNotModified to check whether the response
  10789. // error from Do is the result of In-None-Match.
  10790. func (c *VolumesListCall) IfNoneMatch(entityTag string) *VolumesListCall {
  10791. c.ifNoneMatch_ = entityTag
  10792. return c
  10793. }
  10794. // Context sets the context to be used in this call's Do method. Any
  10795. // pending HTTP request will be aborted if the provided context is
  10796. // canceled.
  10797. func (c *VolumesListCall) Context(ctx context.Context) *VolumesListCall {
  10798. c.ctx_ = ctx
  10799. return c
  10800. }
  10801. // Header returns an http.Header that can be modified by the caller to
  10802. // add HTTP headers to the request.
  10803. func (c *VolumesListCall) Header() http.Header {
  10804. if c.header_ == nil {
  10805. c.header_ = make(http.Header)
  10806. }
  10807. return c.header_
  10808. }
  10809. func (c *VolumesListCall) doRequest(alt string) (*http.Response, error) {
  10810. reqHeaders := make(http.Header)
  10811. for k, v := range c.header_ {
  10812. reqHeaders[k] = v
  10813. }
  10814. reqHeaders.Set("User-Agent", c.s.userAgent())
  10815. if c.ifNoneMatch_ != "" {
  10816. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10817. }
  10818. var body io.Reader = nil
  10819. c.urlParams_.Set("alt", alt)
  10820. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes")
  10821. urls += "?" + c.urlParams_.Encode()
  10822. req, _ := http.NewRequest("GET", urls, body)
  10823. req.Header = reqHeaders
  10824. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10825. }
  10826. // Do executes the "books.volumes.list" call.
  10827. // Exactly one of *Volumes or error will be non-nil. Any non-2xx status
  10828. // code is an error. Response headers are in either
  10829. // *Volumes.ServerResponse.Header or (if a response was returned at all)
  10830. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  10831. // check whether the returned error was because http.StatusNotModified
  10832. // was returned.
  10833. func (c *VolumesListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) {
  10834. gensupport.SetOptions(c.urlParams_, opts...)
  10835. res, err := c.doRequest("json")
  10836. if res != nil && res.StatusCode == http.StatusNotModified {
  10837. if res.Body != nil {
  10838. res.Body.Close()
  10839. }
  10840. return nil, &googleapi.Error{
  10841. Code: res.StatusCode,
  10842. Header: res.Header,
  10843. }
  10844. }
  10845. if err != nil {
  10846. return nil, err
  10847. }
  10848. defer googleapi.CloseBody(res)
  10849. if err := googleapi.CheckResponse(res); err != nil {
  10850. return nil, err
  10851. }
  10852. ret := &Volumes{
  10853. ServerResponse: googleapi.ServerResponse{
  10854. Header: res.Header,
  10855. HTTPStatusCode: res.StatusCode,
  10856. },
  10857. }
  10858. target := &ret
  10859. if err := gensupport.DecodeResponse(target, res); err != nil {
  10860. return nil, err
  10861. }
  10862. return ret, nil
  10863. // {
  10864. // "description": "Performs a book search.",
  10865. // "httpMethod": "GET",
  10866. // "id": "books.volumes.list",
  10867. // "parameterOrder": [
  10868. // "q"
  10869. // ],
  10870. // "parameters": {
  10871. // "download": {
  10872. // "description": "Restrict to volumes by download availability.",
  10873. // "enum": [
  10874. // "epub"
  10875. // ],
  10876. // "enumDescriptions": [
  10877. // "All volumes with epub."
  10878. // ],
  10879. // "location": "query",
  10880. // "type": "string"
  10881. // },
  10882. // "filter": {
  10883. // "description": "Filter search results.",
  10884. // "enum": [
  10885. // "ebooks",
  10886. // "free-ebooks",
  10887. // "full",
  10888. // "paid-ebooks",
  10889. // "partial"
  10890. // ],
  10891. // "enumDescriptions": [
  10892. // "All Google eBooks.",
  10893. // "Google eBook with full volume text viewability.",
  10894. // "Public can view entire volume text.",
  10895. // "Google eBook with a price.",
  10896. // "Public able to see parts of text."
  10897. // ],
  10898. // "location": "query",
  10899. // "type": "string"
  10900. // },
  10901. // "langRestrict": {
  10902. // "description": "Restrict results to books with this language code.",
  10903. // "location": "query",
  10904. // "type": "string"
  10905. // },
  10906. // "libraryRestrict": {
  10907. // "description": "Restrict search to this user's library.",
  10908. // "enum": [
  10909. // "my-library",
  10910. // "no-restrict"
  10911. // ],
  10912. // "enumDescriptions": [
  10913. // "Restrict to the user's library, any shelf.",
  10914. // "Do not restrict based on user's library."
  10915. // ],
  10916. // "location": "query",
  10917. // "type": "string"
  10918. // },
  10919. // "maxAllowedMaturityRating": {
  10920. // "description": "The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.",
  10921. // "enum": [
  10922. // "mature",
  10923. // "not-mature"
  10924. // ],
  10925. // "enumDescriptions": [
  10926. // "Show books which are rated mature or lower.",
  10927. // "Show books which are rated not mature."
  10928. // ],
  10929. // "location": "query",
  10930. // "type": "string"
  10931. // },
  10932. // "maxResults": {
  10933. // "description": "Maximum number of results to return.",
  10934. // "format": "uint32",
  10935. // "location": "query",
  10936. // "maximum": "40",
  10937. // "minimum": "0",
  10938. // "type": "integer"
  10939. // },
  10940. // "orderBy": {
  10941. // "description": "Sort search results.",
  10942. // "enum": [
  10943. // "newest",
  10944. // "relevance"
  10945. // ],
  10946. // "enumDescriptions": [
  10947. // "Most recently published.",
  10948. // "Relevance to search terms."
  10949. // ],
  10950. // "location": "query",
  10951. // "type": "string"
  10952. // },
  10953. // "partner": {
  10954. // "description": "Restrict and brand results for partner ID.",
  10955. // "location": "query",
  10956. // "type": "string"
  10957. // },
  10958. // "printType": {
  10959. // "description": "Restrict to books or magazines.",
  10960. // "enum": [
  10961. // "all",
  10962. // "books",
  10963. // "magazines"
  10964. // ],
  10965. // "enumDescriptions": [
  10966. // "All volume content types.",
  10967. // "Just books.",
  10968. // "Just magazines."
  10969. // ],
  10970. // "location": "query",
  10971. // "type": "string"
  10972. // },
  10973. // "projection": {
  10974. // "description": "Restrict information returned to a set of selected fields.",
  10975. // "enum": [
  10976. // "full",
  10977. // "lite"
  10978. // ],
  10979. // "enumDescriptions": [
  10980. // "Includes all volume data.",
  10981. // "Includes a subset of fields in volumeInfo and accessInfo."
  10982. // ],
  10983. // "location": "query",
  10984. // "type": "string"
  10985. // },
  10986. // "q": {
  10987. // "description": "Full-text search query string.",
  10988. // "location": "query",
  10989. // "required": true,
  10990. // "type": "string"
  10991. // },
  10992. // "showPreorders": {
  10993. // "description": "Set to true to show books available for preorder. Defaults to false.",
  10994. // "location": "query",
  10995. // "type": "boolean"
  10996. // },
  10997. // "source": {
  10998. // "description": "String to identify the originator of this request.",
  10999. // "location": "query",
  11000. // "type": "string"
  11001. // },
  11002. // "startIndex": {
  11003. // "description": "Index of the first result to return (starts at 0)",
  11004. // "format": "uint32",
  11005. // "location": "query",
  11006. // "minimum": "0",
  11007. // "type": "integer"
  11008. // }
  11009. // },
  11010. // "path": "volumes",
  11011. // "response": {
  11012. // "$ref": "Volumes"
  11013. // },
  11014. // "scopes": [
  11015. // "https://www.googleapis.com/auth/books"
  11016. // ]
  11017. // }
  11018. }
  11019. // method id "books.volumes.associated.list":
  11020. type VolumesAssociatedListCall struct {
  11021. s *Service
  11022. volumeId string
  11023. urlParams_ gensupport.URLParams
  11024. ifNoneMatch_ string
  11025. ctx_ context.Context
  11026. header_ http.Header
  11027. }
  11028. // List: Return a list of associated books.
  11029. func (r *VolumesAssociatedService) List(volumeId string) *VolumesAssociatedListCall {
  11030. c := &VolumesAssociatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11031. c.volumeId = volumeId
  11032. return c
  11033. }
  11034. // Association sets the optional parameter "association": Association
  11035. // type.
  11036. //
  11037. // Possible values:
  11038. // "end-of-sample" - Recommendations for display end-of-sample.
  11039. // "end-of-volume" - Recommendations for display end-of-volume.
  11040. // "related-for-play" - Related volumes for Play Store.
  11041. func (c *VolumesAssociatedListCall) Association(association string) *VolumesAssociatedListCall {
  11042. c.urlParams_.Set("association", association)
  11043. return c
  11044. }
  11045. // Locale sets the optional parameter "locale": ISO-639-1 language and
  11046. // ISO-3166-1 country code. Ex: 'en_US'. Used for generating
  11047. // recommendations.
  11048. func (c *VolumesAssociatedListCall) Locale(locale string) *VolumesAssociatedListCall {
  11049. c.urlParams_.Set("locale", locale)
  11050. return c
  11051. }
  11052. // MaxAllowedMaturityRating sets the optional parameter
  11053. // "maxAllowedMaturityRating": The maximum allowed maturity rating of
  11054. // returned recommendations. Books with a higher maturity rating are
  11055. // filtered out.
  11056. //
  11057. // Possible values:
  11058. // "mature" - Show books which are rated mature or lower.
  11059. // "not-mature" - Show books which are rated not mature.
  11060. func (c *VolumesAssociatedListCall) MaxAllowedMaturityRating(maxAllowedMaturityRating string) *VolumesAssociatedListCall {
  11061. c.urlParams_.Set("maxAllowedMaturityRating", maxAllowedMaturityRating)
  11062. return c
  11063. }
  11064. // Source sets the optional parameter "source": String to identify the
  11065. // originator of this request.
  11066. func (c *VolumesAssociatedListCall) Source(source string) *VolumesAssociatedListCall {
  11067. c.urlParams_.Set("source", source)
  11068. return c
  11069. }
  11070. // Fields allows partial responses to be retrieved. See
  11071. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11072. // for more information.
  11073. func (c *VolumesAssociatedListCall) Fields(s ...googleapi.Field) *VolumesAssociatedListCall {
  11074. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11075. return c
  11076. }
  11077. // IfNoneMatch sets the optional parameter which makes the operation
  11078. // fail if the object's ETag matches the given value. This is useful for
  11079. // getting updates only after the object has changed since the last
  11080. // request. Use googleapi.IsNotModified to check whether the response
  11081. // error from Do is the result of In-None-Match.
  11082. func (c *VolumesAssociatedListCall) IfNoneMatch(entityTag string) *VolumesAssociatedListCall {
  11083. c.ifNoneMatch_ = entityTag
  11084. return c
  11085. }
  11086. // Context sets the context to be used in this call's Do method. Any
  11087. // pending HTTP request will be aborted if the provided context is
  11088. // canceled.
  11089. func (c *VolumesAssociatedListCall) Context(ctx context.Context) *VolumesAssociatedListCall {
  11090. c.ctx_ = ctx
  11091. return c
  11092. }
  11093. // Header returns an http.Header that can be modified by the caller to
  11094. // add HTTP headers to the request.
  11095. func (c *VolumesAssociatedListCall) Header() http.Header {
  11096. if c.header_ == nil {
  11097. c.header_ = make(http.Header)
  11098. }
  11099. return c.header_
  11100. }
  11101. func (c *VolumesAssociatedListCall) doRequest(alt string) (*http.Response, error) {
  11102. reqHeaders := make(http.Header)
  11103. for k, v := range c.header_ {
  11104. reqHeaders[k] = v
  11105. }
  11106. reqHeaders.Set("User-Agent", c.s.userAgent())
  11107. if c.ifNoneMatch_ != "" {
  11108. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11109. }
  11110. var body io.Reader = nil
  11111. c.urlParams_.Set("alt", alt)
  11112. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/associated")
  11113. urls += "?" + c.urlParams_.Encode()
  11114. req, _ := http.NewRequest("GET", urls, body)
  11115. req.Header = reqHeaders
  11116. googleapi.Expand(req.URL, map[string]string{
  11117. "volumeId": c.volumeId,
  11118. })
  11119. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11120. }
  11121. // Do executes the "books.volumes.associated.list" call.
  11122. // Exactly one of *Volumes or error will be non-nil. Any non-2xx status
  11123. // code is an error. Response headers are in either
  11124. // *Volumes.ServerResponse.Header or (if a response was returned at all)
  11125. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  11126. // check whether the returned error was because http.StatusNotModified
  11127. // was returned.
  11128. func (c *VolumesAssociatedListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) {
  11129. gensupport.SetOptions(c.urlParams_, opts...)
  11130. res, err := c.doRequest("json")
  11131. if res != nil && res.StatusCode == http.StatusNotModified {
  11132. if res.Body != nil {
  11133. res.Body.Close()
  11134. }
  11135. return nil, &googleapi.Error{
  11136. Code: res.StatusCode,
  11137. Header: res.Header,
  11138. }
  11139. }
  11140. if err != nil {
  11141. return nil, err
  11142. }
  11143. defer googleapi.CloseBody(res)
  11144. if err := googleapi.CheckResponse(res); err != nil {
  11145. return nil, err
  11146. }
  11147. ret := &Volumes{
  11148. ServerResponse: googleapi.ServerResponse{
  11149. Header: res.Header,
  11150. HTTPStatusCode: res.StatusCode,
  11151. },
  11152. }
  11153. target := &ret
  11154. if err := gensupport.DecodeResponse(target, res); err != nil {
  11155. return nil, err
  11156. }
  11157. return ret, nil
  11158. // {
  11159. // "description": "Return a list of associated books.",
  11160. // "httpMethod": "GET",
  11161. // "id": "books.volumes.associated.list",
  11162. // "parameterOrder": [
  11163. // "volumeId"
  11164. // ],
  11165. // "parameters": {
  11166. // "association": {
  11167. // "description": "Association type.",
  11168. // "enum": [
  11169. // "end-of-sample",
  11170. // "end-of-volume",
  11171. // "related-for-play"
  11172. // ],
  11173. // "enumDescriptions": [
  11174. // "Recommendations for display end-of-sample.",
  11175. // "Recommendations for display end-of-volume.",
  11176. // "Related volumes for Play Store."
  11177. // ],
  11178. // "location": "query",
  11179. // "type": "string"
  11180. // },
  11181. // "locale": {
  11182. // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
  11183. // "location": "query",
  11184. // "type": "string"
  11185. // },
  11186. // "maxAllowedMaturityRating": {
  11187. // "description": "The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.",
  11188. // "enum": [
  11189. // "mature",
  11190. // "not-mature"
  11191. // ],
  11192. // "enumDescriptions": [
  11193. // "Show books which are rated mature or lower.",
  11194. // "Show books which are rated not mature."
  11195. // ],
  11196. // "location": "query",
  11197. // "type": "string"
  11198. // },
  11199. // "source": {
  11200. // "description": "String to identify the originator of this request.",
  11201. // "location": "query",
  11202. // "type": "string"
  11203. // },
  11204. // "volumeId": {
  11205. // "description": "ID of the source volume.",
  11206. // "location": "path",
  11207. // "required": true,
  11208. // "type": "string"
  11209. // }
  11210. // },
  11211. // "path": "volumes/{volumeId}/associated",
  11212. // "response": {
  11213. // "$ref": "Volumes"
  11214. // },
  11215. // "scopes": [
  11216. // "https://www.googleapis.com/auth/books"
  11217. // ]
  11218. // }
  11219. }
  11220. // method id "books.volumes.mybooks.list":
  11221. type VolumesMybooksListCall struct {
  11222. s *Service
  11223. urlParams_ gensupport.URLParams
  11224. ifNoneMatch_ string
  11225. ctx_ context.Context
  11226. header_ http.Header
  11227. }
  11228. // List: Return a list of books in My Library.
  11229. func (r *VolumesMybooksService) List() *VolumesMybooksListCall {
  11230. c := &VolumesMybooksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11231. return c
  11232. }
  11233. // AcquireMethod sets the optional parameter "acquireMethod": How the
  11234. // book was acquired
  11235. //
  11236. // Possible values:
  11237. // "FAMILY_SHARED" - Books acquired via Family Sharing
  11238. // "PREORDERED" - Preordered books (not yet available)
  11239. // "PREVIOUSLY_RENTED" - User-rented books past their expiration time
  11240. // "PUBLIC_DOMAIN" - Public domain books
  11241. // "PURCHASED" - Purchased books
  11242. // "RENTED" - User-rented books
  11243. // "SAMPLE" - Sample books
  11244. // "UPLOADED" - User uploaded books
  11245. func (c *VolumesMybooksListCall) AcquireMethod(acquireMethod ...string) *VolumesMybooksListCall {
  11246. c.urlParams_.SetMulti("acquireMethod", append([]string{}, acquireMethod...))
  11247. return c
  11248. }
  11249. // Country sets the optional parameter "country": ISO-3166-1 code to
  11250. // override the IP-based location.
  11251. func (c *VolumesMybooksListCall) Country(country string) *VolumesMybooksListCall {
  11252. c.urlParams_.Set("country", country)
  11253. return c
  11254. }
  11255. // Locale sets the optional parameter "locale": ISO-639-1 language and
  11256. // ISO-3166-1 country code. Ex:'en_US'. Used for generating
  11257. // recommendations.
  11258. func (c *VolumesMybooksListCall) Locale(locale string) *VolumesMybooksListCall {
  11259. c.urlParams_.Set("locale", locale)
  11260. return c
  11261. }
  11262. // MaxResults sets the optional parameter "maxResults": Maximum number
  11263. // of results to return.
  11264. func (c *VolumesMybooksListCall) MaxResults(maxResults int64) *VolumesMybooksListCall {
  11265. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  11266. return c
  11267. }
  11268. // ProcessingState sets the optional parameter "processingState": The
  11269. // processing state of the user uploaded volumes to be returned.
  11270. // Applicable only if the UPLOADED is specified in the acquireMethod.
  11271. //
  11272. // Possible values:
  11273. // "COMPLETED_FAILED" - The volume processing hase failed.
  11274. // "COMPLETED_SUCCESS" - The volume processing was completed.
  11275. // "RUNNING" - The volume processing is not completed.
  11276. func (c *VolumesMybooksListCall) ProcessingState(processingState ...string) *VolumesMybooksListCall {
  11277. c.urlParams_.SetMulti("processingState", append([]string{}, processingState...))
  11278. return c
  11279. }
  11280. // Source sets the optional parameter "source": String to identify the
  11281. // originator of this request.
  11282. func (c *VolumesMybooksListCall) Source(source string) *VolumesMybooksListCall {
  11283. c.urlParams_.Set("source", source)
  11284. return c
  11285. }
  11286. // StartIndex sets the optional parameter "startIndex": Index of the
  11287. // first result to return (starts at 0)
  11288. func (c *VolumesMybooksListCall) StartIndex(startIndex int64) *VolumesMybooksListCall {
  11289. c.urlParams_.Set("startIndex", fmt.Sprint(startIndex))
  11290. return c
  11291. }
  11292. // Fields allows partial responses to be retrieved. See
  11293. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11294. // for more information.
  11295. func (c *VolumesMybooksListCall) Fields(s ...googleapi.Field) *VolumesMybooksListCall {
  11296. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11297. return c
  11298. }
  11299. // IfNoneMatch sets the optional parameter which makes the operation
  11300. // fail if the object's ETag matches the given value. This is useful for
  11301. // getting updates only after the object has changed since the last
  11302. // request. Use googleapi.IsNotModified to check whether the response
  11303. // error from Do is the result of In-None-Match.
  11304. func (c *VolumesMybooksListCall) IfNoneMatch(entityTag string) *VolumesMybooksListCall {
  11305. c.ifNoneMatch_ = entityTag
  11306. return c
  11307. }
  11308. // Context sets the context to be used in this call's Do method. Any
  11309. // pending HTTP request will be aborted if the provided context is
  11310. // canceled.
  11311. func (c *VolumesMybooksListCall) Context(ctx context.Context) *VolumesMybooksListCall {
  11312. c.ctx_ = ctx
  11313. return c
  11314. }
  11315. // Header returns an http.Header that can be modified by the caller to
  11316. // add HTTP headers to the request.
  11317. func (c *VolumesMybooksListCall) Header() http.Header {
  11318. if c.header_ == nil {
  11319. c.header_ = make(http.Header)
  11320. }
  11321. return c.header_
  11322. }
  11323. func (c *VolumesMybooksListCall) doRequest(alt string) (*http.Response, error) {
  11324. reqHeaders := make(http.Header)
  11325. for k, v := range c.header_ {
  11326. reqHeaders[k] = v
  11327. }
  11328. reqHeaders.Set("User-Agent", c.s.userAgent())
  11329. if c.ifNoneMatch_ != "" {
  11330. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11331. }
  11332. var body io.Reader = nil
  11333. c.urlParams_.Set("alt", alt)
  11334. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/mybooks")
  11335. urls += "?" + c.urlParams_.Encode()
  11336. req, _ := http.NewRequest("GET", urls, body)
  11337. req.Header = reqHeaders
  11338. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11339. }
  11340. // Do executes the "books.volumes.mybooks.list" call.
  11341. // Exactly one of *Volumes or error will be non-nil. Any non-2xx status
  11342. // code is an error. Response headers are in either
  11343. // *Volumes.ServerResponse.Header or (if a response was returned at all)
  11344. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  11345. // check whether the returned error was because http.StatusNotModified
  11346. // was returned.
  11347. func (c *VolumesMybooksListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) {
  11348. gensupport.SetOptions(c.urlParams_, opts...)
  11349. res, err := c.doRequest("json")
  11350. if res != nil && res.StatusCode == http.StatusNotModified {
  11351. if res.Body != nil {
  11352. res.Body.Close()
  11353. }
  11354. return nil, &googleapi.Error{
  11355. Code: res.StatusCode,
  11356. Header: res.Header,
  11357. }
  11358. }
  11359. if err != nil {
  11360. return nil, err
  11361. }
  11362. defer googleapi.CloseBody(res)
  11363. if err := googleapi.CheckResponse(res); err != nil {
  11364. return nil, err
  11365. }
  11366. ret := &Volumes{
  11367. ServerResponse: googleapi.ServerResponse{
  11368. Header: res.Header,
  11369. HTTPStatusCode: res.StatusCode,
  11370. },
  11371. }
  11372. target := &ret
  11373. if err := gensupport.DecodeResponse(target, res); err != nil {
  11374. return nil, err
  11375. }
  11376. return ret, nil
  11377. // {
  11378. // "description": "Return a list of books in My Library.",
  11379. // "httpMethod": "GET",
  11380. // "id": "books.volumes.mybooks.list",
  11381. // "parameters": {
  11382. // "acquireMethod": {
  11383. // "description": "How the book was acquired",
  11384. // "enum": [
  11385. // "FAMILY_SHARED",
  11386. // "PREORDERED",
  11387. // "PREVIOUSLY_RENTED",
  11388. // "PUBLIC_DOMAIN",
  11389. // "PURCHASED",
  11390. // "RENTED",
  11391. // "SAMPLE",
  11392. // "UPLOADED"
  11393. // ],
  11394. // "enumDescriptions": [
  11395. // "Books acquired via Family Sharing",
  11396. // "Preordered books (not yet available)",
  11397. // "User-rented books past their expiration time",
  11398. // "Public domain books",
  11399. // "Purchased books",
  11400. // "User-rented books",
  11401. // "Sample books",
  11402. // "User uploaded books"
  11403. // ],
  11404. // "location": "query",
  11405. // "repeated": true,
  11406. // "type": "string"
  11407. // },
  11408. // "country": {
  11409. // "description": "ISO-3166-1 code to override the IP-based location.",
  11410. // "location": "query",
  11411. // "type": "string"
  11412. // },
  11413. // "locale": {
  11414. // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex:'en_US'. Used for generating recommendations.",
  11415. // "location": "query",
  11416. // "type": "string"
  11417. // },
  11418. // "maxResults": {
  11419. // "description": "Maximum number of results to return.",
  11420. // "format": "uint32",
  11421. // "location": "query",
  11422. // "maximum": "100",
  11423. // "minimum": "0",
  11424. // "type": "integer"
  11425. // },
  11426. // "processingState": {
  11427. // "description": "The processing state of the user uploaded volumes to be returned. Applicable only if the UPLOADED is specified in the acquireMethod.",
  11428. // "enum": [
  11429. // "COMPLETED_FAILED",
  11430. // "COMPLETED_SUCCESS",
  11431. // "RUNNING"
  11432. // ],
  11433. // "enumDescriptions": [
  11434. // "The volume processing hase failed.",
  11435. // "The volume processing was completed.",
  11436. // "The volume processing is not completed."
  11437. // ],
  11438. // "location": "query",
  11439. // "repeated": true,
  11440. // "type": "string"
  11441. // },
  11442. // "source": {
  11443. // "description": "String to identify the originator of this request.",
  11444. // "location": "query",
  11445. // "type": "string"
  11446. // },
  11447. // "startIndex": {
  11448. // "description": "Index of the first result to return (starts at 0)",
  11449. // "format": "uint32",
  11450. // "location": "query",
  11451. // "minimum": "0",
  11452. // "type": "integer"
  11453. // }
  11454. // },
  11455. // "path": "volumes/mybooks",
  11456. // "response": {
  11457. // "$ref": "Volumes"
  11458. // },
  11459. // "scopes": [
  11460. // "https://www.googleapis.com/auth/books"
  11461. // ]
  11462. // }
  11463. }
  11464. // method id "books.volumes.recommended.list":
  11465. type VolumesRecommendedListCall struct {
  11466. s *Service
  11467. urlParams_ gensupport.URLParams
  11468. ifNoneMatch_ string
  11469. ctx_ context.Context
  11470. header_ http.Header
  11471. }
  11472. // List: Return a list of recommended books for the current user.
  11473. func (r *VolumesRecommendedService) List() *VolumesRecommendedListCall {
  11474. c := &VolumesRecommendedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11475. return c
  11476. }
  11477. // Locale sets the optional parameter "locale": ISO-639-1 language and
  11478. // ISO-3166-1 country code. Ex: 'en_US'. Used for generating
  11479. // recommendations.
  11480. func (c *VolumesRecommendedListCall) Locale(locale string) *VolumesRecommendedListCall {
  11481. c.urlParams_.Set("locale", locale)
  11482. return c
  11483. }
  11484. // MaxAllowedMaturityRating sets the optional parameter
  11485. // "maxAllowedMaturityRating": The maximum allowed maturity rating of
  11486. // returned recommendations. Books with a higher maturity rating are
  11487. // filtered out.
  11488. //
  11489. // Possible values:
  11490. // "mature" - Show books which are rated mature or lower.
  11491. // "not-mature" - Show books which are rated not mature.
  11492. func (c *VolumesRecommendedListCall) MaxAllowedMaturityRating(maxAllowedMaturityRating string) *VolumesRecommendedListCall {
  11493. c.urlParams_.Set("maxAllowedMaturityRating", maxAllowedMaturityRating)
  11494. return c
  11495. }
  11496. // Source sets the optional parameter "source": String to identify the
  11497. // originator of this request.
  11498. func (c *VolumesRecommendedListCall) Source(source string) *VolumesRecommendedListCall {
  11499. c.urlParams_.Set("source", source)
  11500. return c
  11501. }
  11502. // Fields allows partial responses to be retrieved. See
  11503. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11504. // for more information.
  11505. func (c *VolumesRecommendedListCall) Fields(s ...googleapi.Field) *VolumesRecommendedListCall {
  11506. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11507. return c
  11508. }
  11509. // IfNoneMatch sets the optional parameter which makes the operation
  11510. // fail if the object's ETag matches the given value. This is useful for
  11511. // getting updates only after the object has changed since the last
  11512. // request. Use googleapi.IsNotModified to check whether the response
  11513. // error from Do is the result of In-None-Match.
  11514. func (c *VolumesRecommendedListCall) IfNoneMatch(entityTag string) *VolumesRecommendedListCall {
  11515. c.ifNoneMatch_ = entityTag
  11516. return c
  11517. }
  11518. // Context sets the context to be used in this call's Do method. Any
  11519. // pending HTTP request will be aborted if the provided context is
  11520. // canceled.
  11521. func (c *VolumesRecommendedListCall) Context(ctx context.Context) *VolumesRecommendedListCall {
  11522. c.ctx_ = ctx
  11523. return c
  11524. }
  11525. // Header returns an http.Header that can be modified by the caller to
  11526. // add HTTP headers to the request.
  11527. func (c *VolumesRecommendedListCall) Header() http.Header {
  11528. if c.header_ == nil {
  11529. c.header_ = make(http.Header)
  11530. }
  11531. return c.header_
  11532. }
  11533. func (c *VolumesRecommendedListCall) doRequest(alt string) (*http.Response, error) {
  11534. reqHeaders := make(http.Header)
  11535. for k, v := range c.header_ {
  11536. reqHeaders[k] = v
  11537. }
  11538. reqHeaders.Set("User-Agent", c.s.userAgent())
  11539. if c.ifNoneMatch_ != "" {
  11540. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11541. }
  11542. var body io.Reader = nil
  11543. c.urlParams_.Set("alt", alt)
  11544. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/recommended")
  11545. urls += "?" + c.urlParams_.Encode()
  11546. req, _ := http.NewRequest("GET", urls, body)
  11547. req.Header = reqHeaders
  11548. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11549. }
  11550. // Do executes the "books.volumes.recommended.list" call.
  11551. // Exactly one of *Volumes or error will be non-nil. Any non-2xx status
  11552. // code is an error. Response headers are in either
  11553. // *Volumes.ServerResponse.Header or (if a response was returned at all)
  11554. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  11555. // check whether the returned error was because http.StatusNotModified
  11556. // was returned.
  11557. func (c *VolumesRecommendedListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) {
  11558. gensupport.SetOptions(c.urlParams_, opts...)
  11559. res, err := c.doRequest("json")
  11560. if res != nil && res.StatusCode == http.StatusNotModified {
  11561. if res.Body != nil {
  11562. res.Body.Close()
  11563. }
  11564. return nil, &googleapi.Error{
  11565. Code: res.StatusCode,
  11566. Header: res.Header,
  11567. }
  11568. }
  11569. if err != nil {
  11570. return nil, err
  11571. }
  11572. defer googleapi.CloseBody(res)
  11573. if err := googleapi.CheckResponse(res); err != nil {
  11574. return nil, err
  11575. }
  11576. ret := &Volumes{
  11577. ServerResponse: googleapi.ServerResponse{
  11578. Header: res.Header,
  11579. HTTPStatusCode: res.StatusCode,
  11580. },
  11581. }
  11582. target := &ret
  11583. if err := gensupport.DecodeResponse(target, res); err != nil {
  11584. return nil, err
  11585. }
  11586. return ret, nil
  11587. // {
  11588. // "description": "Return a list of recommended books for the current user.",
  11589. // "httpMethod": "GET",
  11590. // "id": "books.volumes.recommended.list",
  11591. // "parameters": {
  11592. // "locale": {
  11593. // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
  11594. // "location": "query",
  11595. // "type": "string"
  11596. // },
  11597. // "maxAllowedMaturityRating": {
  11598. // "description": "The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.",
  11599. // "enum": [
  11600. // "mature",
  11601. // "not-mature"
  11602. // ],
  11603. // "enumDescriptions": [
  11604. // "Show books which are rated mature or lower.",
  11605. // "Show books which are rated not mature."
  11606. // ],
  11607. // "location": "query",
  11608. // "type": "string"
  11609. // },
  11610. // "source": {
  11611. // "description": "String to identify the originator of this request.",
  11612. // "location": "query",
  11613. // "type": "string"
  11614. // }
  11615. // },
  11616. // "path": "volumes/recommended",
  11617. // "response": {
  11618. // "$ref": "Volumes"
  11619. // },
  11620. // "scopes": [
  11621. // "https://www.googleapis.com/auth/books"
  11622. // ]
  11623. // }
  11624. }
  11625. // method id "books.volumes.recommended.rate":
  11626. type VolumesRecommendedRateCall struct {
  11627. s *Service
  11628. urlParams_ gensupport.URLParams
  11629. ctx_ context.Context
  11630. header_ http.Header
  11631. }
  11632. // Rate: Rate a recommended book for the current user.
  11633. func (r *VolumesRecommendedService) Rate(rating string, volumeId string) *VolumesRecommendedRateCall {
  11634. c := &VolumesRecommendedRateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11635. c.urlParams_.Set("rating", rating)
  11636. c.urlParams_.Set("volumeId", volumeId)
  11637. return c
  11638. }
  11639. // Locale sets the optional parameter "locale": ISO-639-1 language and
  11640. // ISO-3166-1 country code. Ex: 'en_US'. Used for generating
  11641. // recommendations.
  11642. func (c *VolumesRecommendedRateCall) Locale(locale string) *VolumesRecommendedRateCall {
  11643. c.urlParams_.Set("locale", locale)
  11644. return c
  11645. }
  11646. // Source sets the optional parameter "source": String to identify the
  11647. // originator of this request.
  11648. func (c *VolumesRecommendedRateCall) Source(source string) *VolumesRecommendedRateCall {
  11649. c.urlParams_.Set("source", source)
  11650. return c
  11651. }
  11652. // Fields allows partial responses to be retrieved. See
  11653. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11654. // for more information.
  11655. func (c *VolumesRecommendedRateCall) Fields(s ...googleapi.Field) *VolumesRecommendedRateCall {
  11656. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11657. return c
  11658. }
  11659. // Context sets the context to be used in this call's Do method. Any
  11660. // pending HTTP request will be aborted if the provided context is
  11661. // canceled.
  11662. func (c *VolumesRecommendedRateCall) Context(ctx context.Context) *VolumesRecommendedRateCall {
  11663. c.ctx_ = ctx
  11664. return c
  11665. }
  11666. // Header returns an http.Header that can be modified by the caller to
  11667. // add HTTP headers to the request.
  11668. func (c *VolumesRecommendedRateCall) Header() http.Header {
  11669. if c.header_ == nil {
  11670. c.header_ = make(http.Header)
  11671. }
  11672. return c.header_
  11673. }
  11674. func (c *VolumesRecommendedRateCall) doRequest(alt string) (*http.Response, error) {
  11675. reqHeaders := make(http.Header)
  11676. for k, v := range c.header_ {
  11677. reqHeaders[k] = v
  11678. }
  11679. reqHeaders.Set("User-Agent", c.s.userAgent())
  11680. var body io.Reader = nil
  11681. c.urlParams_.Set("alt", alt)
  11682. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/recommended/rate")
  11683. urls += "?" + c.urlParams_.Encode()
  11684. req, _ := http.NewRequest("POST", urls, body)
  11685. req.Header = reqHeaders
  11686. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11687. }
  11688. // Do executes the "books.volumes.recommended.rate" call.
  11689. // Exactly one of *BooksVolumesRecommendedRateResponse or error will be
  11690. // non-nil. Any non-2xx status code is an error. Response headers are in
  11691. // either *BooksVolumesRecommendedRateResponse.ServerResponse.Header or
  11692. // (if a response was returned at all) in
  11693. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  11694. // whether the returned error was because http.StatusNotModified was
  11695. // returned.
  11696. func (c *VolumesRecommendedRateCall) Do(opts ...googleapi.CallOption) (*BooksVolumesRecommendedRateResponse, error) {
  11697. gensupport.SetOptions(c.urlParams_, opts...)
  11698. res, err := c.doRequest("json")
  11699. if res != nil && res.StatusCode == http.StatusNotModified {
  11700. if res.Body != nil {
  11701. res.Body.Close()
  11702. }
  11703. return nil, &googleapi.Error{
  11704. Code: res.StatusCode,
  11705. Header: res.Header,
  11706. }
  11707. }
  11708. if err != nil {
  11709. return nil, err
  11710. }
  11711. defer googleapi.CloseBody(res)
  11712. if err := googleapi.CheckResponse(res); err != nil {
  11713. return nil, err
  11714. }
  11715. ret := &BooksVolumesRecommendedRateResponse{
  11716. ServerResponse: googleapi.ServerResponse{
  11717. Header: res.Header,
  11718. HTTPStatusCode: res.StatusCode,
  11719. },
  11720. }
  11721. target := &ret
  11722. if err := gensupport.DecodeResponse(target, res); err != nil {
  11723. return nil, err
  11724. }
  11725. return ret, nil
  11726. // {
  11727. // "description": "Rate a recommended book for the current user.",
  11728. // "httpMethod": "POST",
  11729. // "id": "books.volumes.recommended.rate",
  11730. // "parameterOrder": [
  11731. // "rating",
  11732. // "volumeId"
  11733. // ],
  11734. // "parameters": {
  11735. // "locale": {
  11736. // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
  11737. // "location": "query",
  11738. // "type": "string"
  11739. // },
  11740. // "rating": {
  11741. // "description": "Rating to be given to the volume.",
  11742. // "enum": [
  11743. // "HAVE_IT",
  11744. // "NOT_INTERESTED"
  11745. // ],
  11746. // "enumDescriptions": [
  11747. // "Rating indicating a dismissal due to ownership.",
  11748. // "Rating indicating a negative dismissal of a volume."
  11749. // ],
  11750. // "location": "query",
  11751. // "required": true,
  11752. // "type": "string"
  11753. // },
  11754. // "source": {
  11755. // "description": "String to identify the originator of this request.",
  11756. // "location": "query",
  11757. // "type": "string"
  11758. // },
  11759. // "volumeId": {
  11760. // "description": "ID of the source volume.",
  11761. // "location": "query",
  11762. // "required": true,
  11763. // "type": "string"
  11764. // }
  11765. // },
  11766. // "path": "volumes/recommended/rate",
  11767. // "response": {
  11768. // "$ref": "BooksVolumesRecommendedRateResponse"
  11769. // },
  11770. // "scopes": [
  11771. // "https://www.googleapis.com/auth/books"
  11772. // ]
  11773. // }
  11774. }
  11775. // method id "books.volumes.useruploaded.list":
  11776. type VolumesUseruploadedListCall struct {
  11777. s *Service
  11778. urlParams_ gensupport.URLParams
  11779. ifNoneMatch_ string
  11780. ctx_ context.Context
  11781. header_ http.Header
  11782. }
  11783. // List: Return a list of books uploaded by the current user.
  11784. func (r *VolumesUseruploadedService) List() *VolumesUseruploadedListCall {
  11785. c := &VolumesUseruploadedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11786. return c
  11787. }
  11788. // Locale sets the optional parameter "locale": ISO-639-1 language and
  11789. // ISO-3166-1 country code. Ex: 'en_US'. Used for generating
  11790. // recommendations.
  11791. func (c *VolumesUseruploadedListCall) Locale(locale string) *VolumesUseruploadedListCall {
  11792. c.urlParams_.Set("locale", locale)
  11793. return c
  11794. }
  11795. // MaxResults sets the optional parameter "maxResults": Maximum number
  11796. // of results to return.
  11797. func (c *VolumesUseruploadedListCall) MaxResults(maxResults int64) *VolumesUseruploadedListCall {
  11798. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  11799. return c
  11800. }
  11801. // ProcessingState sets the optional parameter "processingState": The
  11802. // processing state of the user uploaded volumes to be returned.
  11803. //
  11804. // Possible values:
  11805. // "COMPLETED_FAILED" - The volume processing hase failed.
  11806. // "COMPLETED_SUCCESS" - The volume processing was completed.
  11807. // "RUNNING" - The volume processing is not completed.
  11808. func (c *VolumesUseruploadedListCall) ProcessingState(processingState ...string) *VolumesUseruploadedListCall {
  11809. c.urlParams_.SetMulti("processingState", append([]string{}, processingState...))
  11810. return c
  11811. }
  11812. // Source sets the optional parameter "source": String to identify the
  11813. // originator of this request.
  11814. func (c *VolumesUseruploadedListCall) Source(source string) *VolumesUseruploadedListCall {
  11815. c.urlParams_.Set("source", source)
  11816. return c
  11817. }
  11818. // StartIndex sets the optional parameter "startIndex": Index of the
  11819. // first result to return (starts at 0)
  11820. func (c *VolumesUseruploadedListCall) StartIndex(startIndex int64) *VolumesUseruploadedListCall {
  11821. c.urlParams_.Set("startIndex", fmt.Sprint(startIndex))
  11822. return c
  11823. }
  11824. // VolumeId sets the optional parameter "volumeId": The ids of the
  11825. // volumes to be returned. If not specified all that match the
  11826. // processingState are returned.
  11827. func (c *VolumesUseruploadedListCall) VolumeId(volumeId ...string) *VolumesUseruploadedListCall {
  11828. c.urlParams_.SetMulti("volumeId", append([]string{}, volumeId...))
  11829. return c
  11830. }
  11831. // Fields allows partial responses to be retrieved. See
  11832. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11833. // for more information.
  11834. func (c *VolumesUseruploadedListCall) Fields(s ...googleapi.Field) *VolumesUseruploadedListCall {
  11835. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11836. return c
  11837. }
  11838. // IfNoneMatch sets the optional parameter which makes the operation
  11839. // fail if the object's ETag matches the given value. This is useful for
  11840. // getting updates only after the object has changed since the last
  11841. // request. Use googleapi.IsNotModified to check whether the response
  11842. // error from Do is the result of In-None-Match.
  11843. func (c *VolumesUseruploadedListCall) IfNoneMatch(entityTag string) *VolumesUseruploadedListCall {
  11844. c.ifNoneMatch_ = entityTag
  11845. return c
  11846. }
  11847. // Context sets the context to be used in this call's Do method. Any
  11848. // pending HTTP request will be aborted if the provided context is
  11849. // canceled.
  11850. func (c *VolumesUseruploadedListCall) Context(ctx context.Context) *VolumesUseruploadedListCall {
  11851. c.ctx_ = ctx
  11852. return c
  11853. }
  11854. // Header returns an http.Header that can be modified by the caller to
  11855. // add HTTP headers to the request.
  11856. func (c *VolumesUseruploadedListCall) Header() http.Header {
  11857. if c.header_ == nil {
  11858. c.header_ = make(http.Header)
  11859. }
  11860. return c.header_
  11861. }
  11862. func (c *VolumesUseruploadedListCall) doRequest(alt string) (*http.Response, error) {
  11863. reqHeaders := make(http.Header)
  11864. for k, v := range c.header_ {
  11865. reqHeaders[k] = v
  11866. }
  11867. reqHeaders.Set("User-Agent", c.s.userAgent())
  11868. if c.ifNoneMatch_ != "" {
  11869. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11870. }
  11871. var body io.Reader = nil
  11872. c.urlParams_.Set("alt", alt)
  11873. urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/useruploaded")
  11874. urls += "?" + c.urlParams_.Encode()
  11875. req, _ := http.NewRequest("GET", urls, body)
  11876. req.Header = reqHeaders
  11877. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11878. }
  11879. // Do executes the "books.volumes.useruploaded.list" call.
  11880. // Exactly one of *Volumes or error will be non-nil. Any non-2xx status
  11881. // code is an error. Response headers are in either
  11882. // *Volumes.ServerResponse.Header or (if a response was returned at all)
  11883. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  11884. // check whether the returned error was because http.StatusNotModified
  11885. // was returned.
  11886. func (c *VolumesUseruploadedListCall) Do(opts ...googleapi.CallOption) (*Volumes, error) {
  11887. gensupport.SetOptions(c.urlParams_, opts...)
  11888. res, err := c.doRequest("json")
  11889. if res != nil && res.StatusCode == http.StatusNotModified {
  11890. if res.Body != nil {
  11891. res.Body.Close()
  11892. }
  11893. return nil, &googleapi.Error{
  11894. Code: res.StatusCode,
  11895. Header: res.Header,
  11896. }
  11897. }
  11898. if err != nil {
  11899. return nil, err
  11900. }
  11901. defer googleapi.CloseBody(res)
  11902. if err := googleapi.CheckResponse(res); err != nil {
  11903. return nil, err
  11904. }
  11905. ret := &Volumes{
  11906. ServerResponse: googleapi.ServerResponse{
  11907. Header: res.Header,
  11908. HTTPStatusCode: res.StatusCode,
  11909. },
  11910. }
  11911. target := &ret
  11912. if err := gensupport.DecodeResponse(target, res); err != nil {
  11913. return nil, err
  11914. }
  11915. return ret, nil
  11916. // {
  11917. // "description": "Return a list of books uploaded by the current user.",
  11918. // "httpMethod": "GET",
  11919. // "id": "books.volumes.useruploaded.list",
  11920. // "parameters": {
  11921. // "locale": {
  11922. // "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
  11923. // "location": "query",
  11924. // "type": "string"
  11925. // },
  11926. // "maxResults": {
  11927. // "description": "Maximum number of results to return.",
  11928. // "format": "uint32",
  11929. // "location": "query",
  11930. // "maximum": "40",
  11931. // "minimum": "0",
  11932. // "type": "integer"
  11933. // },
  11934. // "processingState": {
  11935. // "description": "The processing state of the user uploaded volumes to be returned.",
  11936. // "enum": [
  11937. // "COMPLETED_FAILED",
  11938. // "COMPLETED_SUCCESS",
  11939. // "RUNNING"
  11940. // ],
  11941. // "enumDescriptions": [
  11942. // "The volume processing hase failed.",
  11943. // "The volume processing was completed.",
  11944. // "The volume processing is not completed."
  11945. // ],
  11946. // "location": "query",
  11947. // "repeated": true,
  11948. // "type": "string"
  11949. // },
  11950. // "source": {
  11951. // "description": "String to identify the originator of this request.",
  11952. // "location": "query",
  11953. // "type": "string"
  11954. // },
  11955. // "startIndex": {
  11956. // "description": "Index of the first result to return (starts at 0)",
  11957. // "format": "uint32",
  11958. // "location": "query",
  11959. // "minimum": "0",
  11960. // "type": "integer"
  11961. // },
  11962. // "volumeId": {
  11963. // "description": "The ids of the volumes to be returned. If not specified all that match the processingState are returned.",
  11964. // "location": "query",
  11965. // "repeated": true,
  11966. // "type": "string"
  11967. // }
  11968. // },
  11969. // "path": "volumes/useruploaded",
  11970. // "response": {
  11971. // "$ref": "Volumes"
  11972. // },
  11973. // "scopes": [
  11974. // "https://www.googleapis.com/auth/books"
  11975. // ]
  11976. // }
  11977. }