on develop help sign in
Regenerating gogol-books from latest service definition
commitc52b3e025f9204866d94b7d93d52424b13b48fc8 authorBrendan Hay <brendan.g.hay@gmail.com> dateTue 25 Oct 2016, 11:37 (10 years ago) parent7cfc209
8 files changed+335−46
gen/model/books/v1/books-api.json+50−4 gogol-books/gen/Network/Google/Books.hs+20−1 gogol-books/gen/Network/Google/Books/Types.hs+19 gogol-books/gen/Network/Google/Books/Types/Product.hs+161−8 gogol-books/gen/Network/Google/Books/Types/Sum.hs+37−2 gogol-books/gen/Network/Google/Resource/Books/Volumes/List.hs+46−29 gogol-books/gen/Network/Google/Resource/Books/Volumes/Mybooks/List.hs+1−1 gogol-books/gogol-books.cabal+1−1
gen/model/books/v1/books-api.json+50−4
@@ -1,13 +1,13 @@
11{
22 "kind": "discovery#restDescription",
3− "etag": "\"jQLIOHBVnDZie4rQHGH1WJF-INE/EKgCMl0lR3W1RkwoySiKYH3FM7c\"",
3+ "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/qBcgfnv8LaBwEppyThW1YG_JvBU\"",
44 "discoveryVersion": "v1",
55 "id": "books:v1",
66 "name": "books",
77 "version": "v1",
8− "revision": "20160411",
8+ "revision": "20161005",
99 "title": "Books API",
10− "description": "Lets you search for books and manage your Google Books library.",
10+ "description": "Searches for books and manages your Google Books library.",
1111 "ownerDomain": "google.com",
1212 "ownerName": "Google",
1313 "icons": {
@@ -1374,6 +1374,7 @@
13741374 },
13751375 "series": {
13761376 "type": "array",
1377+ "description": "Series info list. The client always expects this element in the JSON output, hence declared here as OutputAlways.",
13771378 "items": {
13781379 "type": "object",
13791380 "properties": {
@@ -1448,6 +1449,14 @@
14481449 "type": "string"
14491450 }
14501451 }
1452+ },
1453+ "moreFromSeries": {
1454+ "type": "object",
1455+ "properties": {
1456+ "opted_state": {
1457+ "type": "string"
1458+ }
1459+ }
14511460 }
14521461 }
14531462 }
@@ -1635,6 +1644,10 @@
16351644 "description": "The finsky offer type (e.g., PURCHASE=0 RENTAL=3)",
16361645 "format": "int32"
16371646 },
1647+ "giftable": {
1648+ "type": "boolean",
1649+ "description": "Indicates whether the offer is giftable."
1650+ },
16381651 "listPrice": {
16391652 "type": "object",
16401653 "description": "Offer list (=undiscounted) price in Micros.",
@@ -1972,6 +1985,24 @@
19721985 "description": "Total number of pages as per publisher metadata.",
19731986 "format": "int32"
19741987 },
1988+ "panelizationSummary": {
1989+ "type": "object",
1990+ "description": "A top-level summary of the panelization info in this volume.",
1991+ "properties": {
1992+ "containsEpubBubbles": {
1993+ "type": "boolean"
1994+ },
1995+ "containsImageBubbles": {
1996+ "type": "boolean"
1997+ },
1998+ "epubBubbleVersion": {
1999+ "type": "string"
2000+ },
2001+ "imageBubbleVersion": {
2002+ "type": "string"
2003+ }
2004+ }
2005+ },
19752006 "previewLink": {
19762007 "type": "string",
19772008 "description": "URL to preview this volume on the Google Books site."
@@ -4154,6 +4185,19 @@
41544185 ],
41554186 "location": "query"
41564187 },
4188+ "maxAllowedMaturityRating": {
4189+ "type": "string",
4190+ "description": "The maximum allowed maturity rating of returned recommendations. Books with a higher maturity rating are filtered out.",
4191+ "enum": [
4192+ "mature",
4193+ "not-mature"
4194+ ],
4195+ "enumDescriptions": [
4196+ "Show books which are rated mature or lower.",
4197+ "Show books which are rated not mature."
4198+ ],
4199+ "location": "query"
4200+ },
41574201 "maxResults": {
41584202 "type": "integer",
41594203 "description": "Maximum number of results to return.",
@@ -4319,8 +4363,9 @@
43194363 "parameters": {
43204364 "acquireMethod": {
43214365 "type": "string",
4322− "description": "How the book was aquired",
4366+ "description": "How the book was acquired",
43234367 "enum": [
4368+ "FAMILY_SHARED",
43244369 "PREORDERED",
43254370 "PREVIOUSLY_RENTED",
43264371 "PUBLIC_DOMAIN",
@@ -4330,6 +4375,7 @@
43304375 "UPLOADED"
43314376 ],
43324377 "enumDescriptions": [
4378+ "Books acquired via Family Sharing",
43334379 "Preordered books (not yet available)",
43344380 "User-rented books past their expiration time",
43354381 "Public domain books",
gogol-books/gen/Network/Google/Books.hs+20−1
@@ -13,7 +13,7 @@
1313-- Stability : auto-generated
1414-- Portability : non-portable (GHC extensions)
1515--
16−-- Lets you search for books and manage your Google Books library.
16+-- Searches for books and manages your Google Books library.
1717--
1818-- /See:/ <https://developers.google.com/books/docs/v1/getting_started Books API Reference>
1919module Network.Google.Books
@@ -374,6 +374,14 @@ module Network.Google.Books
374374 , vaiViewOrderURL
375375 , vaiPublicDomain
376376
377+ -- ** VolumeVolumeInfoPanelizationSummary
378+ , VolumeVolumeInfoPanelizationSummary
379+ , volumeVolumeInfoPanelizationSummary
380+ , vvipsEpubBubbleVersion
381+ , vvipsContainsImageBubbles
382+ , vvipsContainsEpubBubbles
383+ , vvipsImageBubbleVersion
384+
377385 -- ** MyLibraryBookshelvesRemoveVolumeReason
378386 , MyLibraryBookshelvesRemoveVolumeReason (..)
379387
@@ -668,6 +676,7 @@ module Network.Google.Books
668676 , UserSettingsNotification
669677 , userSettingsNotification
670678 , usnMoreFromAuthors
679+ , usnMoreFromSeries
671680
672681 -- ** DictlayerDataDictWordsItemSensesItemSynonymsItem
673682 , DictlayerDataDictWordsItemSensesItemSynonymsItem
@@ -892,6 +901,7 @@ module Network.Google.Books
892901 , vsioiRentalDuration
893902 , vsioiListPrice
894903 , vsioiRetailPrice
904+ , vsioiGiftable
895905
896906 -- ** DictlayerDataDict
897907 , DictlayerDataDict
@@ -1002,6 +1012,7 @@ module Network.Google.Books
10021012 , VolumeVolumeInfo
10031013 , volumeVolumeInfo
10041014 , vviImageLinks
1015+ , vviPanelizationSummary
10051016 , vviAverageRating
10061017 , vviRatingsCount
10071018 , vviCanonicalVolumeLink
@@ -1056,6 +1067,11 @@ module Network.Google.Books
10561067 , vuifsIsSharingAllowed
10571068 , vuifsIsSharingDisabledByFop
10581069
1070+ -- ** UserSettingsNotificationMoreFromSeries
1071+ , UserSettingsNotificationMoreFromSeries
1072+ , userSettingsNotificationMoreFromSeries
1073+ , usnmfsOptedState
1074+
10591075 -- ** VolumeVolumeInfoIndustryIdentifiersItem
10601076 , VolumeVolumeInfoIndustryIdentifiersItem
10611077 , volumeVolumeInfoIndustryIdentifiersItem
@@ -1070,6 +1086,9 @@ module Network.Google.Books
10701086 , barEndPosition
10711087 , barStartPosition
10721088
1089+ -- ** VolumesListMaxAllowedMaturityRating
1090+ , VolumesListMaxAllowedMaturityRating (..)
1091+
10731092 -- ** Layersummaries
10741093 , Layersummaries
10751094 , layersummaries
gogol-books/gen/Network/Google/Books/Types.hs+19
@@ -221,6 +221,14 @@ module Network.Google.Books.Types
221221 , vaiViewOrderURL
222222 , vaiPublicDomain
223223
224+ -- * VolumeVolumeInfoPanelizationSummary
225+ , VolumeVolumeInfoPanelizationSummary
226+ , volumeVolumeInfoPanelizationSummary
227+ , vvipsEpubBubbleVersion
228+ , vvipsContainsImageBubbles
229+ , vvipsContainsEpubBubbles
230+ , vvipsImageBubbleVersion
231+
224232 -- * MyLibraryBookshelvesRemoveVolumeReason
225233 , MyLibraryBookshelvesRemoveVolumeReason (..)
226234
@@ -515,6 +523,7 @@ module Network.Google.Books.Types
515523 , UserSettingsNotification
516524 , userSettingsNotification
517525 , usnMoreFromAuthors
526+ , usnMoreFromSeries
518527
519528 -- * DictlayerDataDictWordsItemSensesItemSynonymsItem
520529 , DictlayerDataDictWordsItemSensesItemSynonymsItem
@@ -739,6 +748,7 @@ module Network.Google.Books.Types
739748 , vsioiRentalDuration
740749 , vsioiListPrice
741750 , vsioiRetailPrice
751+ , vsioiGiftable
742752
743753 -- * DictlayerDataDict
744754 , DictlayerDataDict
@@ -849,6 +859,7 @@ module Network.Google.Books.Types
849859 , VolumeVolumeInfo
850860 , volumeVolumeInfo
851861 , vviImageLinks
862+ , vviPanelizationSummary
852863 , vviAverageRating
853864 , vviRatingsCount
854865 , vviCanonicalVolumeLink
@@ -903,6 +914,11 @@ module Network.Google.Books.Types
903914 , vuifsIsSharingAllowed
904915 , vuifsIsSharingDisabledByFop
905916
917+ -- * UserSettingsNotificationMoreFromSeries
918+ , UserSettingsNotificationMoreFromSeries
919+ , userSettingsNotificationMoreFromSeries
920+ , usnmfsOptedState
921+
906922 -- * VolumeVolumeInfoIndustryIdentifiersItem
907923 , VolumeVolumeInfoIndustryIdentifiersItem
908924 , volumeVolumeInfoIndustryIdentifiersItem
@@ -917,6 +933,9 @@ module Network.Google.Books.Types
917933 , barEndPosition
918934 , barStartPosition
919935
936+ -- * VolumesListMaxAllowedMaturityRating
937+ , VolumesListMaxAllowedMaturityRating (..)
938+
920939 -- * Layersummaries
921940 , Layersummaries
922941 , layersummaries
gogol-books/gen/Network/Google/Books/Types/Product.hs+161−8
@@ -1850,6 +1850,82 @@ instance ToJSON VolumeAccessInfo where
18501850 ("viewOrderUrl" .=) <$> _vaiViewOrderURL,
18511851 ("publicDomain" .=) <$> _vaiPublicDomain])
18521852
1853+-- | A top-level summary of the panelization info in this volume.
1854+--
1855+-- /See:/ 'volumeVolumeInfoPanelizationSummary' smart constructor.
1856+data VolumeVolumeInfoPanelizationSummary = VolumeVolumeInfoPanelizationSummary'
1857+ { _vvipsEpubBubbleVersion :: !(Maybe Text)
1858+ , _vvipsContainsImageBubbles :: !(Maybe Bool)
1859+ , _vvipsContainsEpubBubbles :: !(Maybe Bool)
1860+ , _vvipsImageBubbleVersion :: !(Maybe Text)
1861+ } deriving (Eq,Show,Data,Typeable,Generic)
1862+
1863+-- | Creates a value of 'VolumeVolumeInfoPanelizationSummary' with the minimum fields required to make a request.
1864+--
1865+-- Use one of the following lenses to modify other fields as desired:
1866+--
1867+-- * 'vvipsEpubBubbleVersion'
1868+--
1869+-- * 'vvipsContainsImageBubbles'
1870+--
1871+-- * 'vvipsContainsEpubBubbles'
1872+--
1873+-- * 'vvipsImageBubbleVersion'
1874+volumeVolumeInfoPanelizationSummary
1875+ :: VolumeVolumeInfoPanelizationSummary
1876+volumeVolumeInfoPanelizationSummary =
1877+ VolumeVolumeInfoPanelizationSummary'
1878+ { _vvipsEpubBubbleVersion = Nothing
1879+ , _vvipsContainsImageBubbles = Nothing
1880+ , _vvipsContainsEpubBubbles = Nothing
1881+ , _vvipsImageBubbleVersion = Nothing
1882+ }
1883+
1884+vvipsEpubBubbleVersion :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Text)
1885+vvipsEpubBubbleVersion
1886+ = lens _vvipsEpubBubbleVersion
1887+ (\ s a -> s{_vvipsEpubBubbleVersion = a})
1888+
1889+vvipsContainsImageBubbles :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Bool)
1890+vvipsContainsImageBubbles
1891+ = lens _vvipsContainsImageBubbles
1892+ (\ s a -> s{_vvipsContainsImageBubbles = a})
1893+
1894+vvipsContainsEpubBubbles :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Bool)
1895+vvipsContainsEpubBubbles
1896+ = lens _vvipsContainsEpubBubbles
1897+ (\ s a -> s{_vvipsContainsEpubBubbles = a})
1898+
1899+vvipsImageBubbleVersion :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Text)
1900+vvipsImageBubbleVersion
1901+ = lens _vvipsImageBubbleVersion
1902+ (\ s a -> s{_vvipsImageBubbleVersion = a})
1903+
1904+instance FromJSON VolumeVolumeInfoPanelizationSummary
1905+ where
1906+ parseJSON
1907+ = withObject "VolumeVolumeInfoPanelizationSummary"
1908+ (\ o ->
1909+ VolumeVolumeInfoPanelizationSummary' <$>
1910+ (o .:? "epubBubbleVersion") <*>
1911+ (o .:? "containsImageBubbles")
1912+ <*> (o .:? "containsEpubBubbles")
1913+ <*> (o .:? "imageBubbleVersion"))
1914+
1915+instance ToJSON VolumeVolumeInfoPanelizationSummary
1916+ where
1917+ toJSON VolumeVolumeInfoPanelizationSummary'{..}
1918+ = object
1919+ (catMaybes
1920+ [("epubBubbleVersion" .=) <$>
1921+ _vvipsEpubBubbleVersion,
1922+ ("containsImageBubbles" .=) <$>
1923+ _vvipsContainsImageBubbles,
1924+ ("containsEpubBubbles" .=) <$>
1925+ _vvipsContainsEpubBubbles,
1926+ ("imageBubbleVersion" .=) <$>
1927+ _vvipsImageBubbleVersion])
1928+
18531929-- | A list of image links for all the sizes that are available. (In LITE
18541930-- projection.)
18551931--
@@ -3224,6 +3300,8 @@ series =
32243300sKind :: Lens' Series Text
32253301sKind = lens _sKind (\ s a -> s{_sKind = a})
32263302
3303+-- | Series info list. The client always expects this element in the JSON
3304+-- output, hence declared here as OutputAlways.
32273305sSeries :: Lens' Series [SeriesSeriesItem]
32283306sSeries
32293307 = lens _sSeries (\ s a -> s{_sSeries = a}) . _Default
@@ -4130,8 +4208,9 @@ instance ToJSON Seriesmembership where
41304208
41314209--
41324210-- /See:/ 'userSettingsNotification' smart constructor.
4133−newtype UserSettingsNotification = UserSettingsNotification'
4134− { _usnMoreFromAuthors :: Maybe UserSettingsNotificationMoreFromAuthors
4211+data UserSettingsNotification = UserSettingsNotification'
4212+ { _usnMoreFromAuthors :: !(Maybe UserSettingsNotificationMoreFromAuthors)
4213+ , _usnMoreFromSeries :: !(Maybe UserSettingsNotificationMoreFromSeries)
41354214 } deriving (Eq,Show,Data,Typeable,Generic)
41364215
41374216-- | Creates a value of 'UserSettingsNotification' with the minimum fields required to make a request.
@@ -4139,11 +4218,14 @@ newtype UserSettingsNotification = UserSettingsNotification'
41394218-- Use one of the following lenses to modify other fields as desired:
41404219--
41414220-- * 'usnMoreFromAuthors'
4221+--
4222+-- * 'usnMoreFromSeries'
41424223userSettingsNotification
41434224 :: UserSettingsNotification
41444225userSettingsNotification =
41454226 UserSettingsNotification'
41464227 { _usnMoreFromAuthors = Nothing
4228+ , _usnMoreFromSeries = Nothing
41474229 }
41484230
41494231usnMoreFromAuthors :: Lens' UserSettingsNotification (Maybe UserSettingsNotificationMoreFromAuthors)
@@ -4151,18 +4233,25 @@ usnMoreFromAuthors
41514233 = lens _usnMoreFromAuthors
41524234 (\ s a -> s{_usnMoreFromAuthors = a})
41534235
4236+usnMoreFromSeries :: Lens' UserSettingsNotification (Maybe UserSettingsNotificationMoreFromSeries)
4237+usnMoreFromSeries
4238+ = lens _usnMoreFromSeries
4239+ (\ s a -> s{_usnMoreFromSeries = a})
4240+
41544241instance FromJSON UserSettingsNotification where
41554242 parseJSON
41564243 = withObject "UserSettingsNotification"
41574244 (\ o ->
41584245 UserSettingsNotification' <$>
4159− (o .:? "moreFromAuthors"))
4246+ (o .:? "moreFromAuthors") <*>
4247+ (o .:? "moreFromSeries"))
41604248
41614249instance ToJSON UserSettingsNotification where
41624250 toJSON UserSettingsNotification'{..}
41634251 = object
41644252 (catMaybes
4165− [("moreFromAuthors" .=) <$> _usnMoreFromAuthors])
4253+ [("moreFromAuthors" .=) <$> _usnMoreFromAuthors,
4254+ ("moreFromSeries" .=) <$> _usnMoreFromSeries])
41664255
41674256--
41684257-- /See:/ 'dictlayerDataDictWordsItemSensesItemSynonymsItem' smart constructor.
@@ -5959,6 +6048,7 @@ data VolumeSaleInfoOffersItem = VolumeSaleInfoOffersItem'
59596048 , _vsioiRentalDuration :: !(Maybe VolumeSaleInfoOffersItemRentalDuration)
59606049 , _vsioiListPrice :: !(Maybe VolumeSaleInfoOffersItemListPrice)
59616050 , _vsioiRetailPrice :: !(Maybe VolumeSaleInfoOffersItemRetailPrice)
6051+ , _vsioiGiftable :: !(Maybe Bool)
59626052 } deriving (Eq,Show,Data,Typeable,Generic)
59636053
59646054-- | Creates a value of 'VolumeSaleInfoOffersItem' with the minimum fields required to make a request.
@@ -5972,6 +6062,8 @@ data VolumeSaleInfoOffersItem = VolumeSaleInfoOffersItem'
59726062-- * 'vsioiListPrice'
59736063--
59746064-- * 'vsioiRetailPrice'
6065+--
6066+-- * 'vsioiGiftable'
59756067volumeSaleInfoOffersItem
59766068 :: VolumeSaleInfoOffersItem
59776069volumeSaleInfoOffersItem =
@@ -5980,6 +6072,7 @@ volumeSaleInfoOffersItem =
59806072 , _vsioiRentalDuration = Nothing
59816073 , _vsioiListPrice = Nothing
59826074 , _vsioiRetailPrice = Nothing
6075+ , _vsioiGiftable = Nothing
59836076 }
59846077
59856078-- | The finsky offer type (e.g., PURCHASE=0 RENTAL=3)
@@ -6007,6 +6100,12 @@ vsioiRetailPrice
60076100 = lens _vsioiRetailPrice
60086101 (\ s a -> s{_vsioiRetailPrice = a})
60096102
6103+-- | Indicates whether the offer is giftable.
6104+vsioiGiftable :: Lens' VolumeSaleInfoOffersItem (Maybe Bool)
6105+vsioiGiftable
6106+ = lens _vsioiGiftable
6107+ (\ s a -> s{_vsioiGiftable = a})
6108+
60106109instance FromJSON VolumeSaleInfoOffersItem where
60116110 parseJSON
60126111 = withObject "VolumeSaleInfoOffersItem"
@@ -6015,7 +6114,8 @@ instance FromJSON VolumeSaleInfoOffersItem where
60156114 (o .:? "finskyOfferType") <*>
60166115 (o .:? "rentalDuration")
60176116 <*> (o .:? "listPrice")
6018− <*> (o .:? "retailPrice"))
6117+ <*> (o .:? "retailPrice")
6118+ <*> (o .:? "giftable"))
60196119
60206120instance ToJSON VolumeSaleInfoOffersItem where
60216121 toJSON VolumeSaleInfoOffersItem'{..}
@@ -6024,7 +6124,8 @@ instance ToJSON VolumeSaleInfoOffersItem where
60246124 [("finskyOfferType" .=) <$> _vsioiFinskyOfferType,
60256125 ("rentalDuration" .=) <$> _vsioiRentalDuration,
60266126 ("listPrice" .=) <$> _vsioiListPrice,
6027− ("retailPrice" .=) <$> _vsioiRetailPrice])
6127+ ("retailPrice" .=) <$> _vsioiRetailPrice,
6128+ ("giftable" .=) <$> _vsioiGiftable])
60286129
60296130--
60306131-- /See:/ 'dictlayerDataDict' smart constructor.
@@ -6870,6 +6971,7 @@ instance ToJSON GeolayerDataGeoViewportHi where
68706971-- /See:/ 'volumeVolumeInfo' smart constructor.
68716972data VolumeVolumeInfo = VolumeVolumeInfo'
68726973 { _vviImageLinks :: !(Maybe VolumeVolumeInfoImageLinks)
6974+ , _vviPanelizationSummary :: !(Maybe VolumeVolumeInfoPanelizationSummary)
68736975 , _vviAverageRating :: !(Maybe (Textual Double))
68746976 , _vviRatingsCount :: !(Maybe (Textual Int32))
68756977 , _vviCanonicalVolumeLink :: !(Maybe Text)
@@ -6903,6 +7005,8 @@ data VolumeVolumeInfo = VolumeVolumeInfo'
69037005--
69047006-- * 'vviImageLinks'
69057007--
7008+-- * 'vviPanelizationSummary'
7009+--
69067010-- * 'vviAverageRating'
69077011--
69087012-- * 'vviRatingsCount'
@@ -6957,6 +7061,7 @@ volumeVolumeInfo
69577061volumeVolumeInfo =
69587062 VolumeVolumeInfo'
69597063 { _vviImageLinks = Nothing
7064+ , _vviPanelizationSummary = Nothing
69607065 , _vviAverageRating = Nothing
69617066 , _vviRatingsCount = Nothing
69627067 , _vviCanonicalVolumeLink = Nothing
@@ -6991,6 +7096,12 @@ vviImageLinks
69917096 = lens _vviImageLinks
69927097 (\ s a -> s{_vviImageLinks = a})
69937098
7099+-- | A top-level summary of the panelization info in this volume.
7100+vviPanelizationSummary :: Lens' VolumeVolumeInfo (Maybe VolumeVolumeInfoPanelizationSummary)
7101+vviPanelizationSummary
7102+ = lens _vviPanelizationSummary
7103+ (\ s a -> s{_vviPanelizationSummary = a})
7104+
69947105-- | The mean review rating for this volume. (min = 1.0, max = 5.0)
69957106vviAverageRating :: Lens' VolumeVolumeInfo (Maybe Double)
69967107vviAverageRating
@@ -7154,8 +7265,10 @@ instance FromJSON VolumeVolumeInfo where
71547265 = withObject "VolumeVolumeInfo"
71557266 (\ o ->
71567267 VolumeVolumeInfo' <$>
7157− (o .:? "imageLinks") <*> (o .:? "averageRating") <*>
7158− (o .:? "ratingsCount")
7268+ (o .:? "imageLinks") <*>
7269+ (o .:? "panelizationSummary")
7270+ <*> (o .:? "averageRating")
7271+ <*> (o .:? "ratingsCount")
71597272 <*> (o .:? "canonicalVolumeLink")
71607273 <*> (o .:? "readingModes")
71617274 <*> (o .:? "industryIdentifiers" .!= mempty)
@@ -7185,6 +7298,8 @@ instance ToJSON VolumeVolumeInfo where
71857298 = object
71867299 (catMaybes
71877300 [("imageLinks" .=) <$> _vviImageLinks,
7301+ ("panelizationSummary" .=) <$>
7302+ _vviPanelizationSummary,
71887303 ("averageRating" .=) <$> _vviAverageRating,
71897304 ("ratingsCount" .=) <$> _vviRatingsCount,
71907305 ("canonicalVolumeLink" .=) <$>
@@ -7455,6 +7570,44 @@ instance ToJSON VolumeUserInfoFamilySharing where
74557570 ("isSharingDisabledByFop" .=) <$>
74567571 _vuifsIsSharingDisabledByFop])
74577572
7573+--
7574+-- /See:/ 'userSettingsNotificationMoreFromSeries' smart constructor.
7575+newtype UserSettingsNotificationMoreFromSeries = UserSettingsNotificationMoreFromSeries'
7576+ { _usnmfsOptedState :: Maybe Text
7577+ } deriving (Eq,Show,Data,Typeable,Generic)
7578+
7579+-- | Creates a value of 'UserSettingsNotificationMoreFromSeries' with the minimum fields required to make a request.
7580+--
7581+-- Use one of the following lenses to modify other fields as desired:
7582+--
7583+-- * 'usnmfsOptedState'
7584+userSettingsNotificationMoreFromSeries
7585+ :: UserSettingsNotificationMoreFromSeries
7586+userSettingsNotificationMoreFromSeries =
7587+ UserSettingsNotificationMoreFromSeries'
7588+ { _usnmfsOptedState = Nothing
7589+ }
7590+
7591+usnmfsOptedState :: Lens' UserSettingsNotificationMoreFromSeries (Maybe Text)
7592+usnmfsOptedState
7593+ = lens _usnmfsOptedState
7594+ (\ s a -> s{_usnmfsOptedState = a})
7595+
7596+instance FromJSON
7597+ UserSettingsNotificationMoreFromSeries where
7598+ parseJSON
7599+ = withObject "UserSettingsNotificationMoreFromSeries"
7600+ (\ o ->
7601+ UserSettingsNotificationMoreFromSeries' <$>
7602+ (o .:? "opted_state"))
7603+
7604+instance ToJSON
7605+ UserSettingsNotificationMoreFromSeries where
7606+ toJSON UserSettingsNotificationMoreFromSeries'{..}
7607+ = object
7608+ (catMaybes
7609+ [("opted_state" .=) <$> _usnmfsOptedState])
7610+
74587611--
74597612-- /See:/ 'volumeVolumeInfoIndustryIdentifiersItem' smart constructor.
74607613data VolumeVolumeInfoIndustryIdentifiersItem = VolumeVolumeInfoIndustryIdentifiersItem'
gogol-books/gen/Network/Google/Books/Types/Sum.hs+37−2
@@ -500,9 +500,12 @@ instance FromJSON MyLibraryBookshelvesAddVolumeReason where
500500instance ToJSON MyLibraryBookshelvesAddVolumeReason where
501501 toJSON = toJSONText
502502
503−-- | How the book was aquired
503+-- | How the book was acquired
504504data VolumesMybooksListAcquireMethod
505− = PreOrdered
505+ = FamilyShared
506+ -- ^ @FAMILY_SHARED@
507+ -- Books acquired via Family Sharing
508+ | PreOrdered
506509 -- ^ @PREORDERED@
507510 -- Preordered books (not yet available)
508511 | PreviouslyRented
@@ -529,6 +532,7 @@ instance Hashable VolumesMybooksListAcquireMethod
529532
530533instance FromHttpApiData VolumesMybooksListAcquireMethod where
531534 parseQueryParam = \case
535+ "FAMILY_SHARED" -> Right FamilyShared
532536 "PREORDERED" -> Right PreOrdered
533537 "PREVIOUSLY_RENTED" -> Right PreviouslyRented
534538 "PUBLIC_DOMAIN" -> Right PublicDomain
@@ -540,6 +544,7 @@ instance FromHttpApiData VolumesMybooksListAcquireMethod where
540544
541545instance ToHttpApiData VolumesMybooksListAcquireMethod where
542546 toQueryParam = \case
547+ FamilyShared -> "FAMILY_SHARED"
543548 PreOrdered -> "PREORDERED"
544549 PreviouslyRented -> "PREVIOUSLY_RENTED"
545550 PublicDomain -> "PUBLIC_DOMAIN"
@@ -736,3 +741,33 @@ instance FromJSON MyLibraryReadingPositionsSetPositionAction where
736741
737742instance ToJSON MyLibraryReadingPositionsSetPositionAction where
738743 toJSON = toJSONText
744+
745+-- | The maximum allowed maturity rating of returned recommendations. Books
746+-- with a higher maturity rating are filtered out.
747+data VolumesListMaxAllowedMaturityRating
748+ = VLMAMRMature
749+ -- ^ @mature@
750+ -- Show books which are rated mature or lower.
751+ | VLMAMRNotMature
752+ -- ^ @not-mature@
753+ -- Show books which are rated not mature.
754+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
755+
756+instance Hashable VolumesListMaxAllowedMaturityRating
757+
758+instance FromHttpApiData VolumesListMaxAllowedMaturityRating where
759+ parseQueryParam = \case
760+ "mature" -> Right VLMAMRMature
761+ "not-mature" -> Right VLMAMRNotMature
762+ x -> Left ("Unable to parse VolumesListMaxAllowedMaturityRating from: " <> x)
763+
764+instance ToHttpApiData VolumesListMaxAllowedMaturityRating where
765+ toQueryParam = \case
766+ VLMAMRMature -> "mature"
767+ VLMAMRNotMature -> "not-mature"
768+
769+instance FromJSON VolumesListMaxAllowedMaturityRating where
770+ parseJSON = parseJSONText "VolumesListMaxAllowedMaturityRating"
771+
772+instance ToJSON VolumesListMaxAllowedMaturityRating where
773+ toJSON = toJSONText
gogol-books/gen/Network/Google/Resource/Books/Volumes/List.hs+46−29
@@ -34,6 +34,7 @@ module Network.Google.Resource.Books.Volumes.List
3434
3535 -- * Request Lenses
3636 , vlOrderBy
37+ , vlMaxAllowedMaturityRating
3738 , vlLibraryRestrict
3839 , vlPartner
3940 , vlQ
@@ -59,40 +60,44 @@ type VolumesListResource =
5960 "volumes" :>
6061 QueryParam "q" Text :>
6162 QueryParam "orderBy" VolumesListOrderBy :>
62− QueryParam "libraryRestrict"
63− VolumesListLibraryRestrict
63+ QueryParam "maxAllowedMaturityRating"
64+ VolumesListMaxAllowedMaturityRating
6465 :>
65− QueryParam "partner" Text :>
66− QueryParam "download" VolumesListDownload :>
67− QueryParam "source" Text :>
68− QueryParam "projection" VolumesListProjection :>
69− QueryParam "filter" VolumesListFilter :>
70− QueryParam "langRestrict" Text :>
71− QueryParam "startIndex" (Textual Word32) :>
72− QueryParam "maxResults" (Textual Word32) :>
73− QueryParam "showPreorders" Bool :>
74− QueryParam "printType" VolumesListPrintType
75− :>
76− QueryParam "alt" AltJSON :>
77− Get '[JSON] Volumes
66+ QueryParam "libraryRestrict"
67+ VolumesListLibraryRestrict
68+ :>
69+ QueryParam "partner" Text :>
70+ QueryParam "download" VolumesListDownload :>
71+ QueryParam "source" Text :>
72+ QueryParam "projection" VolumesListProjection :>
73+ QueryParam "filter" VolumesListFilter :>
74+ QueryParam "langRestrict" Text :>
75+ QueryParam "startIndex" (Textual Word32) :>
76+ QueryParam "maxResults" (Textual Word32) :>
77+ QueryParam "showPreorders" Bool :>
78+ QueryParam "printType" VolumesListPrintType
79+ :>
80+ QueryParam "alt" AltJSON :>
81+ Get '[JSON] Volumes
7882
7983-- | Performs a book search.
8084--
8185-- /See:/ 'volumesList' smart constructor.
8286data VolumesList = VolumesList'
83− { _vlOrderBy :: !(Maybe VolumesListOrderBy)
84− , _vlLibraryRestrict :: !(Maybe VolumesListLibraryRestrict)
85− , _vlPartner :: !(Maybe Text)
86− , _vlQ :: !Text
87− , _vlDownload :: !(Maybe VolumesListDownload)
88− , _vlSource :: !(Maybe Text)
89− , _vlProjection :: !(Maybe VolumesListProjection)
90− , _vlFilter :: !(Maybe VolumesListFilter)
91− , _vlLangRestrict :: !(Maybe Text)
92− , _vlStartIndex :: !(Maybe (Textual Word32))
93− , _vlMaxResults :: !(Maybe (Textual Word32))
94− , _vlShowPreOrders :: !(Maybe Bool)
95− , _vlPrintType :: !(Maybe VolumesListPrintType)
87+ { _vlOrderBy :: !(Maybe VolumesListOrderBy)
88+ , _vlMaxAllowedMaturityRating :: !(Maybe VolumesListMaxAllowedMaturityRating)
89+ , _vlLibraryRestrict :: !(Maybe VolumesListLibraryRestrict)
90+ , _vlPartner :: !(Maybe Text)
91+ , _vlQ :: !Text
92+ , _vlDownload :: !(Maybe VolumesListDownload)
93+ , _vlSource :: !(Maybe Text)
94+ , _vlProjection :: !(Maybe VolumesListProjection)
95+ , _vlFilter :: !(Maybe VolumesListFilter)
96+ , _vlLangRestrict :: !(Maybe Text)
97+ , _vlStartIndex :: !(Maybe (Textual Word32))
98+ , _vlMaxResults :: !(Maybe (Textual Word32))
99+ , _vlShowPreOrders :: !(Maybe Bool)
100+ , _vlPrintType :: !(Maybe VolumesListPrintType)
96101 } deriving (Eq,Show,Data,Typeable,Generic)
97102
98103-- | Creates a value of 'VolumesList' with the minimum fields required to make a request.
@@ -101,6 +106,8 @@ data VolumesList = VolumesList'
101106--
102107-- * 'vlOrderBy'
103108--
109+-- * 'vlMaxAllowedMaturityRating'
110+--
104111-- * 'vlLibraryRestrict'
105112--
106113-- * 'vlPartner'
@@ -130,6 +137,7 @@ volumesList
130137volumesList pVlQ_ =
131138 VolumesList'
132139 { _vlOrderBy = Nothing
140+ , _vlMaxAllowedMaturityRating = Nothing
133141 , _vlLibraryRestrict = Nothing
134142 , _vlPartner = Nothing
135143 , _vlQ = pVlQ_
@@ -149,6 +157,13 @@ vlOrderBy :: Lens' VolumesList (Maybe VolumesListOrderBy)
149157vlOrderBy
150158 = lens _vlOrderBy (\ s a -> s{_vlOrderBy = a})
151159
160+-- | The maximum allowed maturity rating of returned recommendations. Books
161+-- with a higher maturity rating are filtered out.
162+vlMaxAllowedMaturityRating :: Lens' VolumesList (Maybe VolumesListMaxAllowedMaturityRating)
163+vlMaxAllowedMaturityRating
164+ = lens _vlMaxAllowedMaturityRating
165+ (\ s a -> s{_vlMaxAllowedMaturityRating = a})
166+
152167-- | Restrict search to this user\'s library.
153168vlLibraryRestrict :: Lens' VolumesList (Maybe VolumesListLibraryRestrict)
154169vlLibraryRestrict
@@ -216,7 +231,9 @@ instance GoogleRequest VolumesList where
216231 type Scopes VolumesList =
217232 '["https://www.googleapis.com/auth/books"]
218233 requestClient VolumesList'{..}
219− = go (Just _vlQ) _vlOrderBy _vlLibraryRestrict
234+ = go (Just _vlQ) _vlOrderBy
235+ _vlMaxAllowedMaturityRating
236+ _vlLibraryRestrict
220237 _vlPartner
221238 _vlDownload
222239 _vlSource
gogol-books/gen/Network/Google/Resource/Books/Volumes/Mybooks/List.hs+1−1
@@ -117,7 +117,7 @@ vmlProcessingState
117117 . _Default
118118 . _Coerce
119119
120−-- | How the book was aquired
120+-- | How the book was acquired
121121vmlAcquireMethod :: Lens' VolumesMybooksList [VolumesMybooksListAcquireMethod]
122122vmlAcquireMethod
123123 = lens _vmlAcquireMethod
gogol-books/gogol-books.cabal+1−1
@@ -14,7 +14,7 @@ cabal-version: >= 1.10
1414extra-source-files: README.md
1515
1616description:
17− Lets you search for books and manage your Google Books library.
17+ Searches for books and manages your Google Books library.
1818 .
1919 /Warning:/ This is an experimental prototype/preview release which is still
2020 under exploratory development and not intended for public use, caveat emptor!