{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Books.Types.Product where
import Network.Google.Books.Types.Sum
import Network.Google.Prelude
data UserSettings = UserSettings'
{ _usNotification :: !(Maybe UserSettingsNotification)
, _usKind :: !Text
, _usNotesExport :: !(Maybe UserSettingsNotesExport)
} deriving (Eq,Show,Data,Typeable,Generic)
userSettings
:: UserSettings
userSettings =
UserSettings'
{ _usNotification = Nothing
, _usKind = "books#usersettings"
, _usNotesExport = Nothing
}
usNotification :: Lens' UserSettings (Maybe UserSettingsNotification)
usNotification
= lens _usNotification
(\ s a -> s{_usNotification = a})
usKind :: Lens' UserSettings Text
usKind = lens _usKind (\ s a -> s{_usKind = a})
usNotesExport :: Lens' UserSettings (Maybe UserSettingsNotesExport)
usNotesExport
= lens _usNotesExport
(\ s a -> s{_usNotesExport = a})
instance FromJSON UserSettings where
parseJSON
= withObject "UserSettings"
(\ o ->
UserSettings' <$>
(o .:? "notification") <*>
(o .:? "kind" .!= "books#usersettings")
<*> (o .:? "notesExport"))
instance ToJSON UserSettings where
toJSON UserSettings'{..}
= object
(catMaybes
[("notification" .=) <$> _usNotification,
Just ("kind" .= _usKind),
("notesExport" .=) <$> _usNotesExport])
data Annotations = Annotations'
{ _aTotalItems :: !(Maybe (Textual Int32))
, _aNextPageToken :: !(Maybe Text)
, _aKind :: !Text
, _aItems :: !(Maybe [Annotation])
} deriving (Eq,Show,Data,Typeable,Generic)
annotations
:: Annotations
annotations =
Annotations'
{ _aTotalItems = Nothing
, _aNextPageToken = Nothing
, _aKind = "books#annotations"
, _aItems = Nothing
}
aTotalItems :: Lens' Annotations (Maybe Int32)
aTotalItems
= lens _aTotalItems (\ s a -> s{_aTotalItems = a}) .
mapping _Coerce
aNextPageToken :: Lens' Annotations (Maybe Text)
aNextPageToken
= lens _aNextPageToken
(\ s a -> s{_aNextPageToken = a})
aKind :: Lens' Annotations Text
aKind = lens _aKind (\ s a -> s{_aKind = a})
aItems :: Lens' Annotations [Annotation]
aItems
= lens _aItems (\ s a -> s{_aItems = a}) . _Default .
_Coerce
instance FromJSON Annotations where
parseJSON
= withObject "Annotations"
(\ o ->
Annotations' <$>
(o .:? "totalItems") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "books#annotations")
<*> (o .:? "items" .!= mempty))
instance ToJSON Annotations where
toJSON Annotations'{..}
= object
(catMaybes
[("totalItems" .=) <$> _aTotalItems,
("nextPageToken" .=) <$> _aNextPageToken,
Just ("kind" .= _aKind), ("items" .=) <$> _aItems])
data AnnotationsData = AnnotationsData'
{ _adTotalItems :: !(Maybe (Textual Int32))
, _adNextPageToken :: !(Maybe Text)
, _adKind :: !Text
, _adItems :: !(Maybe [AnnotationData])
} deriving (Eq,Show,Data,Typeable,Generic)
annotationsData
:: AnnotationsData
annotationsData =
AnnotationsData'
{ _adTotalItems = Nothing
, _adNextPageToken = Nothing
, _adKind = "books#annotationsdata"
, _adItems = Nothing
}
adTotalItems :: Lens' AnnotationsData (Maybe Int32)
adTotalItems
= lens _adTotalItems (\ s a -> s{_adTotalItems = a})
. mapping _Coerce
adNextPageToken :: Lens' AnnotationsData (Maybe Text)
adNextPageToken
= lens _adNextPageToken
(\ s a -> s{_adNextPageToken = a})
adKind :: Lens' AnnotationsData Text
adKind = lens _adKind (\ s a -> s{_adKind = a})
adItems :: Lens' AnnotationsData [AnnotationData]
adItems
= lens _adItems (\ s a -> s{_adItems = a}) . _Default
. _Coerce
instance FromJSON AnnotationsData where
parseJSON
= withObject "AnnotationsData"
(\ o ->
AnnotationsData' <$>
(o .:? "totalItems") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "books#annotationsdata")
<*> (o .:? "items" .!= mempty))
instance ToJSON AnnotationsData where
toJSON AnnotationsData'{..}
= object
(catMaybes
[("totalItems" .=) <$> _adTotalItems,
("nextPageToken" .=) <$> _adNextPageToken,
Just ("kind" .= _adKind), ("items" .=) <$> _adItems])
newtype UserSettingsNotificationMoreFromAuthors = UserSettingsNotificationMoreFromAuthors'
{ _usnmfaOptedState :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
userSettingsNotificationMoreFromAuthors
:: UserSettingsNotificationMoreFromAuthors
userSettingsNotificationMoreFromAuthors =
UserSettingsNotificationMoreFromAuthors'
{ _usnmfaOptedState = Nothing
}
usnmfaOptedState :: Lens' UserSettingsNotificationMoreFromAuthors (Maybe Text)
usnmfaOptedState
= lens _usnmfaOptedState
(\ s a -> s{_usnmfaOptedState = a})
instance FromJSON
UserSettingsNotificationMoreFromAuthors where
parseJSON
= withObject
"UserSettingsNotificationMoreFromAuthors"
(\ o ->
UserSettingsNotificationMoreFromAuthors' <$>
(o .:? "opted_state"))
instance ToJSON
UserSettingsNotificationMoreFromAuthors where
toJSON UserSettingsNotificationMoreFromAuthors'{..}
= object
(catMaybes
[("opted_state" .=) <$> _usnmfaOptedState])
data Volumeannotations = Volumeannotations'
{ _vTotalItems :: !(Maybe (Textual Int32))
, _vNextPageToken :: !(Maybe Text)
, _vKind :: !Text
, _vItems :: !(Maybe [Volumeannotation])
, _vVersion :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeannotations
:: Volumeannotations
volumeannotations =
Volumeannotations'
{ _vTotalItems = Nothing
, _vNextPageToken = Nothing
, _vKind = "books#volumeannotations"
, _vItems = Nothing
, _vVersion = Nothing
}
vTotalItems :: Lens' Volumeannotations (Maybe Int32)
vTotalItems
= lens _vTotalItems (\ s a -> s{_vTotalItems = a}) .
mapping _Coerce
vNextPageToken :: Lens' Volumeannotations (Maybe Text)
vNextPageToken
= lens _vNextPageToken
(\ s a -> s{_vNextPageToken = a})
vKind :: Lens' Volumeannotations Text
vKind = lens _vKind (\ s a -> s{_vKind = a})
vItems :: Lens' Volumeannotations [Volumeannotation]
vItems
= lens _vItems (\ s a -> s{_vItems = a}) . _Default .
_Coerce
vVersion :: Lens' Volumeannotations (Maybe Text)
vVersion = lens _vVersion (\ s a -> s{_vVersion = a})
instance FromJSON Volumeannotations where
parseJSON
= withObject "Volumeannotations"
(\ o ->
Volumeannotations' <$>
(o .:? "totalItems") <*> (o .:? "nextPageToken") <*>
(o .:? "kind" .!= "books#volumeannotations")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "version"))
instance ToJSON Volumeannotations where
toJSON Volumeannotations'{..}
= object
(catMaybes
[("totalItems" .=) <$> _vTotalItems,
("nextPageToken" .=) <$> _vNextPageToken,
Just ("kind" .= _vKind), ("items" .=) <$> _vItems,
("version" .=) <$> _vVersion])
data ReviewSource = ReviewSource'
{ _rsExtraDescription :: !(Maybe Text)
, _rsURL :: !(Maybe Text)
, _rsDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
reviewSource
:: ReviewSource
reviewSource =
ReviewSource'
{ _rsExtraDescription = Nothing
, _rsURL = Nothing
, _rsDescription = Nothing
}
rsExtraDescription :: Lens' ReviewSource (Maybe Text)
rsExtraDescription
= lens _rsExtraDescription
(\ s a -> s{_rsExtraDescription = a})
rsURL :: Lens' ReviewSource (Maybe Text)
rsURL = lens _rsURL (\ s a -> s{_rsURL = a})
rsDescription :: Lens' ReviewSource (Maybe Text)
rsDescription
= lens _rsDescription
(\ s a -> s{_rsDescription = a})
instance FromJSON ReviewSource where
parseJSON
= withObject "ReviewSource"
(\ o ->
ReviewSource' <$>
(o .:? "extraDescription") <*> (o .:? "url") <*>
(o .:? "description"))
instance ToJSON ReviewSource where
toJSON ReviewSource'{..}
= object
(catMaybes
[("extraDescription" .=) <$> _rsExtraDescription,
("url" .=) <$> _rsURL,
("description" .=) <$> _rsDescription])
data AnnotationData = AnnotationData'
{ _annEncodedData :: !(Maybe Bytes)
, _annKind :: !Text
, _annData :: !(Maybe JSONValue)
, _annSelfLink :: !(Maybe Text)
, _annAnnotationType :: !(Maybe Text)
, _annVolumeId :: !(Maybe Text)
, _annId :: !(Maybe Text)
, _annUpdated :: !(Maybe DateTime')
, _annLayerId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
annotationData
:: AnnotationData
annotationData =
AnnotationData'
{ _annEncodedData = Nothing
, _annKind = "books#annotationdata"
, _annData = Nothing
, _annSelfLink = Nothing
, _annAnnotationType = Nothing
, _annVolumeId = Nothing
, _annId = Nothing
, _annUpdated = Nothing
, _annLayerId = Nothing
}
annEncodedData :: Lens' AnnotationData (Maybe ByteString)
annEncodedData
= lens _annEncodedData
(\ s a -> s{_annEncodedData = a})
. mapping _Bytes
annKind :: Lens' AnnotationData Text
annKind = lens _annKind (\ s a -> s{_annKind = a})
annData :: Lens' AnnotationData (Maybe JSONValue)
annData = lens _annData (\ s a -> s{_annData = a})
annSelfLink :: Lens' AnnotationData (Maybe Text)
annSelfLink
= lens _annSelfLink (\ s a -> s{_annSelfLink = a})
annAnnotationType :: Lens' AnnotationData (Maybe Text)
annAnnotationType
= lens _annAnnotationType
(\ s a -> s{_annAnnotationType = a})
annVolumeId :: Lens' AnnotationData (Maybe Text)
annVolumeId
= lens _annVolumeId (\ s a -> s{_annVolumeId = a})
annId :: Lens' AnnotationData (Maybe Text)
annId = lens _annId (\ s a -> s{_annId = a})
annUpdated :: Lens' AnnotationData (Maybe UTCTime)
annUpdated
= lens _annUpdated (\ s a -> s{_annUpdated = a}) .
mapping _DateTime
annLayerId :: Lens' AnnotationData (Maybe Text)
annLayerId
= lens _annLayerId (\ s a -> s{_annLayerId = a})
instance FromJSON AnnotationData where
parseJSON
= withObject "AnnotationData"
(\ o ->
AnnotationData' <$>
(o .:? "encoded_data") <*>
(o .:? "kind" .!= "books#annotationdata")
<*> (o .:? "data")
<*> (o .:? "selfLink")
<*> (o .:? "annotationType")
<*> (o .:? "volumeId")
<*> (o .:? "id")
<*> (o .:? "updated")
<*> (o .:? "layerId"))
instance ToJSON AnnotationData where
toJSON AnnotationData'{..}
= object
(catMaybes
[("encoded_data" .=) <$> _annEncodedData,
Just ("kind" .= _annKind), ("data" .=) <$> _annData,
("selfLink" .=) <$> _annSelfLink,
("annotationType" .=) <$> _annAnnotationType,
("volumeId" .=) <$> _annVolumeId,
("id" .=) <$> _annId, ("updated" .=) <$> _annUpdated,
("layerId" .=) <$> _annLayerId])
data Volumeannotation = Volumeannotation'
{ _volSelectedText :: !(Maybe Text)
, _volAnnotationDataLink :: !(Maybe Text)
, _volPageIds :: !(Maybe [Text])
, _volKind :: !Text
, _volData :: !(Maybe Text)
, _volSelfLink :: !(Maybe Text)
, _volAnnotationType :: !(Maybe Text)
, _volAnnotationDataId :: !(Maybe Text)
, _volContentRanges :: !(Maybe VolumeannotationContentRanges)
, _volVolumeId :: !(Maybe Text)
, _volId :: !(Maybe Text)
, _volDeleted :: !(Maybe Bool)
, _volUpdated :: !(Maybe DateTime')
, _volLayerId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeannotation
:: Volumeannotation
volumeannotation =
Volumeannotation'
{ _volSelectedText = Nothing
, _volAnnotationDataLink = Nothing
, _volPageIds = Nothing
, _volKind = "books#volumeannotation"
, _volData = Nothing
, _volSelfLink = Nothing
, _volAnnotationType = Nothing
, _volAnnotationDataId = Nothing
, _volContentRanges = Nothing
, _volVolumeId = Nothing
, _volId = Nothing
, _volDeleted = Nothing
, _volUpdated = Nothing
, _volLayerId = Nothing
}
volSelectedText :: Lens' Volumeannotation (Maybe Text)
volSelectedText
= lens _volSelectedText
(\ s a -> s{_volSelectedText = a})
volAnnotationDataLink :: Lens' Volumeannotation (Maybe Text)
volAnnotationDataLink
= lens _volAnnotationDataLink
(\ s a -> s{_volAnnotationDataLink = a})
volPageIds :: Lens' Volumeannotation [Text]
volPageIds
= lens _volPageIds (\ s a -> s{_volPageIds = a}) .
_Default
. _Coerce
volKind :: Lens' Volumeannotation Text
volKind = lens _volKind (\ s a -> s{_volKind = a})
volData :: Lens' Volumeannotation (Maybe Text)
volData = lens _volData (\ s a -> s{_volData = a})
volSelfLink :: Lens' Volumeannotation (Maybe Text)
volSelfLink
= lens _volSelfLink (\ s a -> s{_volSelfLink = a})
volAnnotationType :: Lens' Volumeannotation (Maybe Text)
volAnnotationType
= lens _volAnnotationType
(\ s a -> s{_volAnnotationType = a})
volAnnotationDataId :: Lens' Volumeannotation (Maybe Text)
volAnnotationDataId
= lens _volAnnotationDataId
(\ s a -> s{_volAnnotationDataId = a})
volContentRanges :: Lens' Volumeannotation (Maybe VolumeannotationContentRanges)
volContentRanges
= lens _volContentRanges
(\ s a -> s{_volContentRanges = a})
volVolumeId :: Lens' Volumeannotation (Maybe Text)
volVolumeId
= lens _volVolumeId (\ s a -> s{_volVolumeId = a})
volId :: Lens' Volumeannotation (Maybe Text)
volId = lens _volId (\ s a -> s{_volId = a})
volDeleted :: Lens' Volumeannotation (Maybe Bool)
volDeleted
= lens _volDeleted (\ s a -> s{_volDeleted = a})
volUpdated :: Lens' Volumeannotation (Maybe UTCTime)
volUpdated
= lens _volUpdated (\ s a -> s{_volUpdated = a}) .
mapping _DateTime
volLayerId :: Lens' Volumeannotation (Maybe Text)
volLayerId
= lens _volLayerId (\ s a -> s{_volLayerId = a})
instance FromJSON Volumeannotation where
parseJSON
= withObject "Volumeannotation"
(\ o ->
Volumeannotation' <$>
(o .:? "selectedText") <*>
(o .:? "annotationDataLink")
<*> (o .:? "pageIds" .!= mempty)
<*> (o .:? "kind" .!= "books#volumeannotation")
<*> (o .:? "data")
<*> (o .:? "selfLink")
<*> (o .:? "annotationType")
<*> (o .:? "annotationDataId")
<*> (o .:? "contentRanges")
<*> (o .:? "volumeId")
<*> (o .:? "id")
<*> (o .:? "deleted")
<*> (o .:? "updated")
<*> (o .:? "layerId"))
instance ToJSON Volumeannotation where
toJSON Volumeannotation'{..}
= object
(catMaybes
[("selectedText" .=) <$> _volSelectedText,
("annotationDataLink" .=) <$> _volAnnotationDataLink,
("pageIds" .=) <$> _volPageIds,
Just ("kind" .= _volKind), ("data" .=) <$> _volData,
("selfLink" .=) <$> _volSelfLink,
("annotationType" .=) <$> _volAnnotationType,
("annotationDataId" .=) <$> _volAnnotationDataId,
("contentRanges" .=) <$> _volContentRanges,
("volumeId" .=) <$> _volVolumeId,
("id" .=) <$> _volId, ("deleted" .=) <$> _volDeleted,
("updated" .=) <$> _volUpdated,
("layerId" .=) <$> _volLayerId])
data BooksCloudLoadingResource = BooksCloudLoadingResource'
{ _bclrProcessingState :: !(Maybe Text)
, _bclrVolumeId :: !(Maybe Text)
, _bclrAuthor :: !(Maybe Text)
, _bclrTitle :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
booksCloudLoadingResource
:: BooksCloudLoadingResource
booksCloudLoadingResource =
BooksCloudLoadingResource'
{ _bclrProcessingState = Nothing
, _bclrVolumeId = Nothing
, _bclrAuthor = Nothing
, _bclrTitle = Nothing
}
bclrProcessingState :: Lens' BooksCloudLoadingResource (Maybe Text)
bclrProcessingState
= lens _bclrProcessingState
(\ s a -> s{_bclrProcessingState = a})
bclrVolumeId :: Lens' BooksCloudLoadingResource (Maybe Text)
bclrVolumeId
= lens _bclrVolumeId (\ s a -> s{_bclrVolumeId = a})
bclrAuthor :: Lens' BooksCloudLoadingResource (Maybe Text)
bclrAuthor
= lens _bclrAuthor (\ s a -> s{_bclrAuthor = a})
bclrTitle :: Lens' BooksCloudLoadingResource (Maybe Text)
bclrTitle
= lens _bclrTitle (\ s a -> s{_bclrTitle = a})
instance FromJSON BooksCloudLoadingResource where
parseJSON
= withObject "BooksCloudLoadingResource"
(\ o ->
BooksCloudLoadingResource' <$>
(o .:? "processingState") <*> (o .:? "volumeId") <*>
(o .:? "author")
<*> (o .:? "title"))
instance ToJSON BooksCloudLoadingResource where
toJSON BooksCloudLoadingResource'{..}
= object
(catMaybes
[("processingState" .=) <$> _bclrProcessingState,
("volumeId" .=) <$> _bclrVolumeId,
("author" .=) <$> _bclrAuthor,
("title" .=) <$> _bclrTitle])
data VolumeseriesInfoVolumeSeriesItemIssueItem = VolumeseriesInfoVolumeSeriesItemIssueItem'
{ _vivsiiiIssueOrderNumber :: !(Maybe (Textual Int32))
, _vivsiiiIssueDisplayNumber :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeseriesInfoVolumeSeriesItemIssueItem
:: VolumeseriesInfoVolumeSeriesItemIssueItem
volumeseriesInfoVolumeSeriesItemIssueItem =
VolumeseriesInfoVolumeSeriesItemIssueItem'
{ _vivsiiiIssueOrderNumber = Nothing
, _vivsiiiIssueDisplayNumber = Nothing
}
vivsiiiIssueOrderNumber :: Lens' VolumeseriesInfoVolumeSeriesItemIssueItem (Maybe Int32)
vivsiiiIssueOrderNumber
= lens _vivsiiiIssueOrderNumber
(\ s a -> s{_vivsiiiIssueOrderNumber = a})
. mapping _Coerce
vivsiiiIssueDisplayNumber :: Lens' VolumeseriesInfoVolumeSeriesItemIssueItem (Maybe Text)
vivsiiiIssueDisplayNumber
= lens _vivsiiiIssueDisplayNumber
(\ s a -> s{_vivsiiiIssueDisplayNumber = a})
instance FromJSON
VolumeseriesInfoVolumeSeriesItemIssueItem where
parseJSON
= withObject
"VolumeseriesInfoVolumeSeriesItemIssueItem"
(\ o ->
VolumeseriesInfoVolumeSeriesItemIssueItem' <$>
(o .:? "issueOrderNumber") <*>
(o .:? "issueDisplayNumber"))
instance ToJSON
VolumeseriesInfoVolumeSeriesItemIssueItem where
toJSON VolumeseriesInfoVolumeSeriesItemIssueItem'{..}
= object
(catMaybes
[("issueOrderNumber" .=) <$>
_vivsiiiIssueOrderNumber,
("issueDisplayNumber" .=) <$>
_vivsiiiIssueDisplayNumber])
data Annotation = Annotation'
{ _aaSelectedText :: !(Maybe Text)
, _aaLayerSummary :: !(Maybe AnnotationLayerSummary)
, _aaHighlightStyle :: !(Maybe Text)
, _aaClientVersionRanges :: !(Maybe AnnotationClientVersionRanges)
, _aaPageIds :: !(Maybe [Text])
, _aaKind :: !Text
, _aaData :: !(Maybe Text)
, _aaCreated :: !(Maybe DateTime')
, _aaAfterSelectedText :: !(Maybe Text)
, _aaSelfLink :: !(Maybe Text)
, _aaCurrentVersionRanges :: !(Maybe AnnotationCurrentVersionRanges)
, _aaVolumeId :: !(Maybe Text)
, _aaBeforeSelectedText :: !(Maybe Text)
, _aaId :: !(Maybe Text)
, _aaDeleted :: !(Maybe Bool)
, _aaUpdated :: !(Maybe DateTime')
, _aaLayerId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
annotation
:: Annotation
annotation =
Annotation'
{ _aaSelectedText = Nothing
, _aaLayerSummary = Nothing
, _aaHighlightStyle = Nothing
, _aaClientVersionRanges = Nothing
, _aaPageIds = Nothing
, _aaKind = "books#annotation"
, _aaData = Nothing
, _aaCreated = Nothing
, _aaAfterSelectedText = Nothing
, _aaSelfLink = Nothing
, _aaCurrentVersionRanges = Nothing
, _aaVolumeId = Nothing
, _aaBeforeSelectedText = Nothing
, _aaId = Nothing
, _aaDeleted = Nothing
, _aaUpdated = Nothing
, _aaLayerId = Nothing
}
aaSelectedText :: Lens' Annotation (Maybe Text)
aaSelectedText
= lens _aaSelectedText
(\ s a -> s{_aaSelectedText = a})
aaLayerSummary :: Lens' Annotation (Maybe AnnotationLayerSummary)
aaLayerSummary
= lens _aaLayerSummary
(\ s a -> s{_aaLayerSummary = a})
aaHighlightStyle :: Lens' Annotation (Maybe Text)
aaHighlightStyle
= lens _aaHighlightStyle
(\ s a -> s{_aaHighlightStyle = a})
aaClientVersionRanges :: Lens' Annotation (Maybe AnnotationClientVersionRanges)
aaClientVersionRanges
= lens _aaClientVersionRanges
(\ s a -> s{_aaClientVersionRanges = a})
aaPageIds :: Lens' Annotation [Text]
aaPageIds
= lens _aaPageIds (\ s a -> s{_aaPageIds = a}) .
_Default
. _Coerce
aaKind :: Lens' Annotation Text
aaKind = lens _aaKind (\ s a -> s{_aaKind = a})
aaData :: Lens' Annotation (Maybe Text)
aaData = lens _aaData (\ s a -> s{_aaData = a})
aaCreated :: Lens' Annotation (Maybe UTCTime)
aaCreated
= lens _aaCreated (\ s a -> s{_aaCreated = a}) .
mapping _DateTime
aaAfterSelectedText :: Lens' Annotation (Maybe Text)
aaAfterSelectedText
= lens _aaAfterSelectedText
(\ s a -> s{_aaAfterSelectedText = a})
aaSelfLink :: Lens' Annotation (Maybe Text)
aaSelfLink
= lens _aaSelfLink (\ s a -> s{_aaSelfLink = a})
aaCurrentVersionRanges :: Lens' Annotation (Maybe AnnotationCurrentVersionRanges)
aaCurrentVersionRanges
= lens _aaCurrentVersionRanges
(\ s a -> s{_aaCurrentVersionRanges = a})
aaVolumeId :: Lens' Annotation (Maybe Text)
aaVolumeId
= lens _aaVolumeId (\ s a -> s{_aaVolumeId = a})
aaBeforeSelectedText :: Lens' Annotation (Maybe Text)
aaBeforeSelectedText
= lens _aaBeforeSelectedText
(\ s a -> s{_aaBeforeSelectedText = a})
aaId :: Lens' Annotation (Maybe Text)
aaId = lens _aaId (\ s a -> s{_aaId = a})
aaDeleted :: Lens' Annotation (Maybe Bool)
aaDeleted
= lens _aaDeleted (\ s a -> s{_aaDeleted = a})
aaUpdated :: Lens' Annotation (Maybe UTCTime)
aaUpdated
= lens _aaUpdated (\ s a -> s{_aaUpdated = a}) .
mapping _DateTime
aaLayerId :: Lens' Annotation (Maybe Text)
aaLayerId
= lens _aaLayerId (\ s a -> s{_aaLayerId = a})
instance FromJSON Annotation where
parseJSON
= withObject "Annotation"
(\ o ->
Annotation' <$>
(o .:? "selectedText") <*> (o .:? "layerSummary") <*>
(o .:? "highlightStyle")
<*> (o .:? "clientVersionRanges")
<*> (o .:? "pageIds" .!= mempty)
<*> (o .:? "kind" .!= "books#annotation")
<*> (o .:? "data")
<*> (o .:? "created")
<*> (o .:? "afterSelectedText")
<*> (o .:? "selfLink")
<*> (o .:? "currentVersionRanges")
<*> (o .:? "volumeId")
<*> (o .:? "beforeSelectedText")
<*> (o .:? "id")
<*> (o .:? "deleted")
<*> (o .:? "updated")
<*> (o .:? "layerId"))
instance ToJSON Annotation where
toJSON Annotation'{..}
= object
(catMaybes
[("selectedText" .=) <$> _aaSelectedText,
("layerSummary" .=) <$> _aaLayerSummary,
("highlightStyle" .=) <$> _aaHighlightStyle,
("clientVersionRanges" .=) <$>
_aaClientVersionRanges,
("pageIds" .=) <$> _aaPageIds,
Just ("kind" .= _aaKind), ("data" .=) <$> _aaData,
("created" .=) <$> _aaCreated,
("afterSelectedText" .=) <$> _aaAfterSelectedText,
("selfLink" .=) <$> _aaSelfLink,
("currentVersionRanges" .=) <$>
_aaCurrentVersionRanges,
("volumeId" .=) <$> _aaVolumeId,
("beforeSelectedText" .=) <$> _aaBeforeSelectedText,
("id" .=) <$> _aaId, ("deleted" .=) <$> _aaDeleted,
("updated" .=) <$> _aaUpdated,
("layerId" .=) <$> _aaLayerId])
newtype ReviewAuthor = ReviewAuthor'
{ _raDisplayName :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
reviewAuthor
:: ReviewAuthor
reviewAuthor =
ReviewAuthor'
{ _raDisplayName = Nothing
}
raDisplayName :: Lens' ReviewAuthor (Maybe Text)
raDisplayName
= lens _raDisplayName
(\ s a -> s{_raDisplayName = a})
instance FromJSON ReviewAuthor where
parseJSON
= withObject "ReviewAuthor"
(\ o -> ReviewAuthor' <$> (o .:? "displayName"))
instance ToJSON ReviewAuthor where
toJSON ReviewAuthor'{..}
= object
(catMaybes [("displayName" .=) <$> _raDisplayName])
data GeolayerDataGeoViewport = GeolayerDataGeoViewport'
{ _gdgvHi :: !(Maybe GeolayerDataGeoViewportHi)
, _gdgvLo :: !(Maybe GeolayerDataGeoViewportLo)
} deriving (Eq,Show,Data,Typeable,Generic)
geolayerDataGeoViewport
:: GeolayerDataGeoViewport
geolayerDataGeoViewport =
GeolayerDataGeoViewport'
{ _gdgvHi = Nothing
, _gdgvLo = Nothing
}
gdgvHi :: Lens' GeolayerDataGeoViewport (Maybe GeolayerDataGeoViewportHi)
gdgvHi = lens _gdgvHi (\ s a -> s{_gdgvHi = a})
gdgvLo :: Lens' GeolayerDataGeoViewport (Maybe GeolayerDataGeoViewportLo)
gdgvLo = lens _gdgvLo (\ s a -> s{_gdgvLo = a})
instance FromJSON GeolayerDataGeoViewport where
parseJSON
= withObject "GeolayerDataGeoViewport"
(\ o ->
GeolayerDataGeoViewport' <$>
(o .:? "hi") <*> (o .:? "lo"))
instance ToJSON GeolayerDataGeoViewport where
toJSON GeolayerDataGeoViewport'{..}
= object
(catMaybes
[("hi" .=) <$> _gdgvHi, ("lo" .=) <$> _gdgvLo])
data VolumeUserInfo = VolumeUserInfo'
{ _vuiIsFamilySharingAllowed :: !(Maybe Bool)
, _vuiIsFamilySharedToUser :: !(Maybe Bool)
, _vuiCopy :: !(Maybe VolumeUserInfoCopy)
, _vuiUserUploadedVolumeInfo :: !(Maybe VolumeUserInfoUserUploadedVolumeInfo)
, _vuiIsPurchased :: !(Maybe Bool)
, _vuiEntitlementType :: !(Maybe (Textual Int32))
, _vuiAcquisitionType :: !(Maybe (Textual Int32))
, _vuiAcquiredTime :: !(Maybe DateTime')
, _vuiRentalState :: !(Maybe Text)
, _vuiIsPreOrdered :: !(Maybe Bool)
, _vuiReview :: !(Maybe Review)
, _vuiIsFamilySharedFromUser :: !(Maybe Bool)
, _vuiRentalPeriod :: !(Maybe VolumeUserInfoRentalPeriod)
, _vuiUpdated :: !(Maybe DateTime')
, _vuiIsUploaded :: !(Maybe Bool)
, _vuiIsInMyBooks :: !(Maybe Bool)
, _vuiReadingPosition :: !(Maybe ReadingPosition)
, _vuiFamilySharing :: !(Maybe VolumeUserInfoFamilySharing)
, _vuiIsFamilySharingDisabledByFop :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeUserInfo
:: VolumeUserInfo
volumeUserInfo =
VolumeUserInfo'
{ _vuiIsFamilySharingAllowed = Nothing
, _vuiIsFamilySharedToUser = Nothing
, _vuiCopy = Nothing
, _vuiUserUploadedVolumeInfo = Nothing
, _vuiIsPurchased = Nothing
, _vuiEntitlementType = Nothing
, _vuiAcquisitionType = Nothing
, _vuiAcquiredTime = Nothing
, _vuiRentalState = Nothing
, _vuiIsPreOrdered = Nothing
, _vuiReview = Nothing
, _vuiIsFamilySharedFromUser = Nothing
, _vuiRentalPeriod = Nothing
, _vuiUpdated = Nothing
, _vuiIsUploaded = Nothing
, _vuiIsInMyBooks = Nothing
, _vuiReadingPosition = Nothing
, _vuiFamilySharing = Nothing
, _vuiIsFamilySharingDisabledByFop = Nothing
}
vuiIsFamilySharingAllowed :: Lens' VolumeUserInfo (Maybe Bool)
vuiIsFamilySharingAllowed
= lens _vuiIsFamilySharingAllowed
(\ s a -> s{_vuiIsFamilySharingAllowed = a})
vuiIsFamilySharedToUser :: Lens' VolumeUserInfo (Maybe Bool)
vuiIsFamilySharedToUser
= lens _vuiIsFamilySharedToUser
(\ s a -> s{_vuiIsFamilySharedToUser = a})
vuiCopy :: Lens' VolumeUserInfo (Maybe VolumeUserInfoCopy)
vuiCopy = lens _vuiCopy (\ s a -> s{_vuiCopy = a})
vuiUserUploadedVolumeInfo :: Lens' VolumeUserInfo (Maybe VolumeUserInfoUserUploadedVolumeInfo)
vuiUserUploadedVolumeInfo
= lens _vuiUserUploadedVolumeInfo
(\ s a -> s{_vuiUserUploadedVolumeInfo = a})
vuiIsPurchased :: Lens' VolumeUserInfo (Maybe Bool)
vuiIsPurchased
= lens _vuiIsPurchased
(\ s a -> s{_vuiIsPurchased = a})
vuiEntitlementType :: Lens' VolumeUserInfo (Maybe Int32)
vuiEntitlementType
= lens _vuiEntitlementType
(\ s a -> s{_vuiEntitlementType = a})
. mapping _Coerce
vuiAcquisitionType :: Lens' VolumeUserInfo (Maybe Int32)
vuiAcquisitionType
= lens _vuiAcquisitionType
(\ s a -> s{_vuiAcquisitionType = a})
. mapping _Coerce
vuiAcquiredTime :: Lens' VolumeUserInfo (Maybe UTCTime)
vuiAcquiredTime
= lens _vuiAcquiredTime
(\ s a -> s{_vuiAcquiredTime = a})
. mapping _DateTime
vuiRentalState :: Lens' VolumeUserInfo (Maybe Text)
vuiRentalState
= lens _vuiRentalState
(\ s a -> s{_vuiRentalState = a})
vuiIsPreOrdered :: Lens' VolumeUserInfo (Maybe Bool)
vuiIsPreOrdered
= lens _vuiIsPreOrdered
(\ s a -> s{_vuiIsPreOrdered = a})
vuiReview :: Lens' VolumeUserInfo (Maybe Review)
vuiReview
= lens _vuiReview (\ s a -> s{_vuiReview = a})
vuiIsFamilySharedFromUser :: Lens' VolumeUserInfo (Maybe Bool)
vuiIsFamilySharedFromUser
= lens _vuiIsFamilySharedFromUser
(\ s a -> s{_vuiIsFamilySharedFromUser = a})
vuiRentalPeriod :: Lens' VolumeUserInfo (Maybe VolumeUserInfoRentalPeriod)
vuiRentalPeriod
= lens _vuiRentalPeriod
(\ s a -> s{_vuiRentalPeriod = a})
vuiUpdated :: Lens' VolumeUserInfo (Maybe UTCTime)
vuiUpdated
= lens _vuiUpdated (\ s a -> s{_vuiUpdated = a}) .
mapping _DateTime
vuiIsUploaded :: Lens' VolumeUserInfo (Maybe Bool)
vuiIsUploaded
= lens _vuiIsUploaded
(\ s a -> s{_vuiIsUploaded = a})
vuiIsInMyBooks :: Lens' VolumeUserInfo (Maybe Bool)
vuiIsInMyBooks
= lens _vuiIsInMyBooks
(\ s a -> s{_vuiIsInMyBooks = a})
vuiReadingPosition :: Lens' VolumeUserInfo (Maybe ReadingPosition)
vuiReadingPosition
= lens _vuiReadingPosition
(\ s a -> s{_vuiReadingPosition = a})
vuiFamilySharing :: Lens' VolumeUserInfo (Maybe VolumeUserInfoFamilySharing)
vuiFamilySharing
= lens _vuiFamilySharing
(\ s a -> s{_vuiFamilySharing = a})
vuiIsFamilySharingDisabledByFop :: Lens' VolumeUserInfo (Maybe Bool)
vuiIsFamilySharingDisabledByFop
= lens _vuiIsFamilySharingDisabledByFop
(\ s a -> s{_vuiIsFamilySharingDisabledByFop = a})
instance FromJSON VolumeUserInfo where
parseJSON
= withObject "VolumeUserInfo"
(\ o ->
VolumeUserInfo' <$>
(o .:? "isFamilySharingAllowed") <*>
(o .:? "isFamilySharedToUser")
<*> (o .:? "copy")
<*> (o .:? "userUploadedVolumeInfo")
<*> (o .:? "isPurchased")
<*> (o .:? "entitlementType")
<*> (o .:? "acquisitionType")
<*> (o .:? "acquiredTime")
<*> (o .:? "rentalState")
<*> (o .:? "isPreordered")
<*> (o .:? "review")
<*> (o .:? "isFamilySharedFromUser")
<*> (o .:? "rentalPeriod")
<*> (o .:? "updated")
<*> (o .:? "isUploaded")
<*> (o .:? "isInMyBooks")
<*> (o .:? "readingPosition")
<*> (o .:? "familySharing")
<*> (o .:? "isFamilySharingDisabledByFop"))
instance ToJSON VolumeUserInfo where
toJSON VolumeUserInfo'{..}
= object
(catMaybes
[("isFamilySharingAllowed" .=) <$>
_vuiIsFamilySharingAllowed,
("isFamilySharedToUser" .=) <$>
_vuiIsFamilySharedToUser,
("copy" .=) <$> _vuiCopy,
("userUploadedVolumeInfo" .=) <$>
_vuiUserUploadedVolumeInfo,
("isPurchased" .=) <$> _vuiIsPurchased,
("entitlementType" .=) <$> _vuiEntitlementType,
("acquisitionType" .=) <$> _vuiAcquisitionType,
("acquiredTime" .=) <$> _vuiAcquiredTime,
("rentalState" .=) <$> _vuiRentalState,
("isPreordered" .=) <$> _vuiIsPreOrdered,
("review" .=) <$> _vuiReview,
("isFamilySharedFromUser" .=) <$>
_vuiIsFamilySharedFromUser,
("rentalPeriod" .=) <$> _vuiRentalPeriod,
("updated" .=) <$> _vuiUpdated,
("isUploaded" .=) <$> _vuiIsUploaded,
("isInMyBooks" .=) <$> _vuiIsInMyBooks,
("readingPosition" .=) <$> _vuiReadingPosition,
("familySharing" .=) <$> _vuiFamilySharing,
("isFamilySharingDisabledByFop" .=) <$>
_vuiIsFamilySharingDisabledByFop])
data Layersummary = Layersummary'
{ _lAnnotationsDataLink :: !(Maybe Text)
, _lAnnotationsLink :: !(Maybe Text)
, _lKind :: !Text
, _lDataCount :: !(Maybe (Textual Int32))
, _lContentVersion :: !(Maybe Text)
, _lVolumeAnnotationsVersion :: !(Maybe Text)
, _lAnnotationCount :: !(Maybe (Textual Int32))
, _lAnnotationTypes :: !(Maybe [Text])
, _lSelfLink :: !(Maybe Text)
, _lVolumeId :: !(Maybe Text)
, _lId :: !(Maybe Text)
, _lUpdated :: !(Maybe DateTime')
, _lLayerId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
layersummary
:: Layersummary
layersummary =
Layersummary'
{ _lAnnotationsDataLink = Nothing
, _lAnnotationsLink = Nothing
, _lKind = "books#layersummary"
, _lDataCount = Nothing
, _lContentVersion = Nothing
, _lVolumeAnnotationsVersion = Nothing
, _lAnnotationCount = Nothing
, _lAnnotationTypes = Nothing
, _lSelfLink = Nothing
, _lVolumeId = Nothing
, _lId = Nothing
, _lUpdated = Nothing
, _lLayerId = Nothing
}
lAnnotationsDataLink :: Lens' Layersummary (Maybe Text)
lAnnotationsDataLink
= lens _lAnnotationsDataLink
(\ s a -> s{_lAnnotationsDataLink = a})
lAnnotationsLink :: Lens' Layersummary (Maybe Text)
lAnnotationsLink
= lens _lAnnotationsLink
(\ s a -> s{_lAnnotationsLink = a})
lKind :: Lens' Layersummary Text
lKind = lens _lKind (\ s a -> s{_lKind = a})
lDataCount :: Lens' Layersummary (Maybe Int32)
lDataCount
= lens _lDataCount (\ s a -> s{_lDataCount = a}) .
mapping _Coerce
lContentVersion :: Lens' Layersummary (Maybe Text)
lContentVersion
= lens _lContentVersion
(\ s a -> s{_lContentVersion = a})
lVolumeAnnotationsVersion :: Lens' Layersummary (Maybe Text)
lVolumeAnnotationsVersion
= lens _lVolumeAnnotationsVersion
(\ s a -> s{_lVolumeAnnotationsVersion = a})
lAnnotationCount :: Lens' Layersummary (Maybe Int32)
lAnnotationCount
= lens _lAnnotationCount
(\ s a -> s{_lAnnotationCount = a})
. mapping _Coerce
lAnnotationTypes :: Lens' Layersummary [Text]
lAnnotationTypes
= lens _lAnnotationTypes
(\ s a -> s{_lAnnotationTypes = a})
. _Default
. _Coerce
lSelfLink :: Lens' Layersummary (Maybe Text)
lSelfLink
= lens _lSelfLink (\ s a -> s{_lSelfLink = a})
lVolumeId :: Lens' Layersummary (Maybe Text)
lVolumeId
= lens _lVolumeId (\ s a -> s{_lVolumeId = a})
lId :: Lens' Layersummary (Maybe Text)
lId = lens _lId (\ s a -> s{_lId = a})
lUpdated :: Lens' Layersummary (Maybe UTCTime)
lUpdated
= lens _lUpdated (\ s a -> s{_lUpdated = a}) .
mapping _DateTime
lLayerId :: Lens' Layersummary (Maybe Text)
lLayerId = lens _lLayerId (\ s a -> s{_lLayerId = a})
instance FromJSON Layersummary where
parseJSON
= withObject "Layersummary"
(\ o ->
Layersummary' <$>
(o .:? "annotationsDataLink") <*>
(o .:? "annotationsLink")
<*> (o .:? "kind" .!= "books#layersummary")
<*> (o .:? "dataCount")
<*> (o .:? "contentVersion")
<*> (o .:? "volumeAnnotationsVersion")
<*> (o .:? "annotationCount")
<*> (o .:? "annotationTypes" .!= mempty)
<*> (o .:? "selfLink")
<*> (o .:? "volumeId")
<*> (o .:? "id")
<*> (o .:? "updated")
<*> (o .:? "layerId"))
instance ToJSON Layersummary where
toJSON Layersummary'{..}
= object
(catMaybes
[("annotationsDataLink" .=) <$>
_lAnnotationsDataLink,
("annotationsLink" .=) <$> _lAnnotationsLink,
Just ("kind" .= _lKind),
("dataCount" .=) <$> _lDataCount,
("contentVersion" .=) <$> _lContentVersion,
("volumeAnnotationsVersion" .=) <$>
_lVolumeAnnotationsVersion,
("annotationCount" .=) <$> _lAnnotationCount,
("annotationTypes" .=) <$> _lAnnotationTypes,
("selfLink" .=) <$> _lSelfLink,
("volumeId" .=) <$> _lVolumeId, ("id" .=) <$> _lId,
("updated" .=) <$> _lUpdated,
("layerId" .=) <$> _lLayerId])
data VolumeannotationContentRanges = VolumeannotationContentRanges'
{ _vcrGbImageRange :: !(Maybe BooksAnnotationsRange)
, _vcrContentVersion :: !(Maybe Text)
, _vcrGbTextRange :: !(Maybe BooksAnnotationsRange)
, _vcrCfiRange :: !(Maybe BooksAnnotationsRange)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeannotationContentRanges
:: VolumeannotationContentRanges
volumeannotationContentRanges =
VolumeannotationContentRanges'
{ _vcrGbImageRange = Nothing
, _vcrContentVersion = Nothing
, _vcrGbTextRange = Nothing
, _vcrCfiRange = Nothing
}
vcrGbImageRange :: Lens' VolumeannotationContentRanges (Maybe BooksAnnotationsRange)
vcrGbImageRange
= lens _vcrGbImageRange
(\ s a -> s{_vcrGbImageRange = a})
vcrContentVersion :: Lens' VolumeannotationContentRanges (Maybe Text)
vcrContentVersion
= lens _vcrContentVersion
(\ s a -> s{_vcrContentVersion = a})
vcrGbTextRange :: Lens' VolumeannotationContentRanges (Maybe BooksAnnotationsRange)
vcrGbTextRange
= lens _vcrGbTextRange
(\ s a -> s{_vcrGbTextRange = a})
vcrCfiRange :: Lens' VolumeannotationContentRanges (Maybe BooksAnnotationsRange)
vcrCfiRange
= lens _vcrCfiRange (\ s a -> s{_vcrCfiRange = a})
instance FromJSON VolumeannotationContentRanges where
parseJSON
= withObject "VolumeannotationContentRanges"
(\ o ->
VolumeannotationContentRanges' <$>
(o .:? "gbImageRange") <*> (o .:? "contentVersion")
<*> (o .:? "gbTextRange")
<*> (o .:? "cfiRange"))
instance ToJSON VolumeannotationContentRanges where
toJSON VolumeannotationContentRanges'{..}
= object
(catMaybes
[("gbImageRange" .=) <$> _vcrGbImageRange,
("contentVersion" .=) <$> _vcrContentVersion,
("gbTextRange" .=) <$> _vcrGbTextRange,
("cfiRange" .=) <$> _vcrCfiRange])
data VolumeAccessInfo = VolumeAccessInfo'
{ _vaiWebReaderLink :: !(Maybe Text)
, _vaiCountry :: !(Maybe Text)
, _vaiDriveImportedContentLink :: !(Maybe Text)
, _vaiExplicitOfflineLicenseManagement :: !(Maybe Bool)
, _vaiViewability :: !(Maybe Text)
, _vaiQuoteSharingAllowed :: !(Maybe Bool)
, _vaiEpub :: !(Maybe VolumeAccessInfoEpub)
, _vaiPdf :: !(Maybe VolumeAccessInfoPdf)
, _vaiTextToSpeechPermission :: !(Maybe Text)
, _vaiEmbeddable :: !(Maybe Bool)
, _vaiAccessViewStatus :: !(Maybe Text)
, _vaiDownloadAccess :: !(Maybe DownloadAccessRestriction)
, _vaiViewOrderURL :: !(Maybe Text)
, _vaiPublicDomain :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeAccessInfo
:: VolumeAccessInfo
volumeAccessInfo =
VolumeAccessInfo'
{ _vaiWebReaderLink = Nothing
, _vaiCountry = Nothing
, _vaiDriveImportedContentLink = Nothing
, _vaiExplicitOfflineLicenseManagement = Nothing
, _vaiViewability = Nothing
, _vaiQuoteSharingAllowed = Nothing
, _vaiEpub = Nothing
, _vaiPdf = Nothing
, _vaiTextToSpeechPermission = Nothing
, _vaiEmbeddable = Nothing
, _vaiAccessViewStatus = Nothing
, _vaiDownloadAccess = Nothing
, _vaiViewOrderURL = Nothing
, _vaiPublicDomain = Nothing
}
vaiWebReaderLink :: Lens' VolumeAccessInfo (Maybe Text)
vaiWebReaderLink
= lens _vaiWebReaderLink
(\ s a -> s{_vaiWebReaderLink = a})
vaiCountry :: Lens' VolumeAccessInfo (Maybe Text)
vaiCountry
= lens _vaiCountry (\ s a -> s{_vaiCountry = a})
vaiDriveImportedContentLink :: Lens' VolumeAccessInfo (Maybe Text)
vaiDriveImportedContentLink
= lens _vaiDriveImportedContentLink
(\ s a -> s{_vaiDriveImportedContentLink = a})
vaiExplicitOfflineLicenseManagement :: Lens' VolumeAccessInfo (Maybe Bool)
vaiExplicitOfflineLicenseManagement
= lens _vaiExplicitOfflineLicenseManagement
(\ s a ->
s{_vaiExplicitOfflineLicenseManagement = a})
vaiViewability :: Lens' VolumeAccessInfo (Maybe Text)
vaiViewability
= lens _vaiViewability
(\ s a -> s{_vaiViewability = a})
vaiQuoteSharingAllowed :: Lens' VolumeAccessInfo (Maybe Bool)
vaiQuoteSharingAllowed
= lens _vaiQuoteSharingAllowed
(\ s a -> s{_vaiQuoteSharingAllowed = a})
vaiEpub :: Lens' VolumeAccessInfo (Maybe VolumeAccessInfoEpub)
vaiEpub = lens _vaiEpub (\ s a -> s{_vaiEpub = a})
vaiPdf :: Lens' VolumeAccessInfo (Maybe VolumeAccessInfoPdf)
vaiPdf = lens _vaiPdf (\ s a -> s{_vaiPdf = a})
vaiTextToSpeechPermission :: Lens' VolumeAccessInfo (Maybe Text)
vaiTextToSpeechPermission
= lens _vaiTextToSpeechPermission
(\ s a -> s{_vaiTextToSpeechPermission = a})
vaiEmbeddable :: Lens' VolumeAccessInfo (Maybe Bool)
vaiEmbeddable
= lens _vaiEmbeddable
(\ s a -> s{_vaiEmbeddable = a})
vaiAccessViewStatus :: Lens' VolumeAccessInfo (Maybe Text)
vaiAccessViewStatus
= lens _vaiAccessViewStatus
(\ s a -> s{_vaiAccessViewStatus = a})
vaiDownloadAccess :: Lens' VolumeAccessInfo (Maybe DownloadAccessRestriction)
vaiDownloadAccess
= lens _vaiDownloadAccess
(\ s a -> s{_vaiDownloadAccess = a})
vaiViewOrderURL :: Lens' VolumeAccessInfo (Maybe Text)
vaiViewOrderURL
= lens _vaiViewOrderURL
(\ s a -> s{_vaiViewOrderURL = a})
vaiPublicDomain :: Lens' VolumeAccessInfo (Maybe Bool)
vaiPublicDomain
= lens _vaiPublicDomain
(\ s a -> s{_vaiPublicDomain = a})
instance FromJSON VolumeAccessInfo where
parseJSON
= withObject "VolumeAccessInfo"
(\ o ->
VolumeAccessInfo' <$>
(o .:? "webReaderLink") <*> (o .:? "country") <*>
(o .:? "driveImportedContentLink")
<*> (o .:? "explicitOfflineLicenseManagement")
<*> (o .:? "viewability")
<*> (o .:? "quoteSharingAllowed")
<*> (o .:? "epub")
<*> (o .:? "pdf")
<*> (o .:? "textToSpeechPermission")
<*> (o .:? "embeddable")
<*> (o .:? "accessViewStatus")
<*> (o .:? "downloadAccess")
<*> (o .:? "viewOrderUrl")
<*> (o .:? "publicDomain"))
instance ToJSON VolumeAccessInfo where
toJSON VolumeAccessInfo'{..}
= object
(catMaybes
[("webReaderLink" .=) <$> _vaiWebReaderLink,
("country" .=) <$> _vaiCountry,
("driveImportedContentLink" .=) <$>
_vaiDriveImportedContentLink,
("explicitOfflineLicenseManagement" .=) <$>
_vaiExplicitOfflineLicenseManagement,
("viewability" .=) <$> _vaiViewability,
("quoteSharingAllowed" .=) <$>
_vaiQuoteSharingAllowed,
("epub" .=) <$> _vaiEpub, ("pdf" .=) <$> _vaiPdf,
("textToSpeechPermission" .=) <$>
_vaiTextToSpeechPermission,
("embeddable" .=) <$> _vaiEmbeddable,
("accessViewStatus" .=) <$> _vaiAccessViewStatus,
("downloadAccess" .=) <$> _vaiDownloadAccess,
("viewOrderUrl" .=) <$> _vaiViewOrderURL,
("publicDomain" .=) <$> _vaiPublicDomain])
data VolumeVolumeInfoPanelizationSummary = VolumeVolumeInfoPanelizationSummary'
{ _vvipsEpubBubbleVersion :: !(Maybe Text)
, _vvipsContainsImageBubbles :: !(Maybe Bool)
, _vvipsContainsEpubBubbles :: !(Maybe Bool)
, _vvipsImageBubbleVersion :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeVolumeInfoPanelizationSummary
:: VolumeVolumeInfoPanelizationSummary
volumeVolumeInfoPanelizationSummary =
VolumeVolumeInfoPanelizationSummary'
{ _vvipsEpubBubbleVersion = Nothing
, _vvipsContainsImageBubbles = Nothing
, _vvipsContainsEpubBubbles = Nothing
, _vvipsImageBubbleVersion = Nothing
}
vvipsEpubBubbleVersion :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Text)
vvipsEpubBubbleVersion
= lens _vvipsEpubBubbleVersion
(\ s a -> s{_vvipsEpubBubbleVersion = a})
vvipsContainsImageBubbles :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Bool)
vvipsContainsImageBubbles
= lens _vvipsContainsImageBubbles
(\ s a -> s{_vvipsContainsImageBubbles = a})
vvipsContainsEpubBubbles :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Bool)
vvipsContainsEpubBubbles
= lens _vvipsContainsEpubBubbles
(\ s a -> s{_vvipsContainsEpubBubbles = a})
vvipsImageBubbleVersion :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Text)
vvipsImageBubbleVersion
= lens _vvipsImageBubbleVersion
(\ s a -> s{_vvipsImageBubbleVersion = a})
instance FromJSON VolumeVolumeInfoPanelizationSummary
where
parseJSON
= withObject "VolumeVolumeInfoPanelizationSummary"
(\ o ->
VolumeVolumeInfoPanelizationSummary' <$>
(o .:? "epubBubbleVersion") <*>
(o .:? "containsImageBubbles")
<*> (o .:? "containsEpubBubbles")
<*> (o .:? "imageBubbleVersion"))
instance ToJSON VolumeVolumeInfoPanelizationSummary
where
toJSON VolumeVolumeInfoPanelizationSummary'{..}
= object
(catMaybes
[("epubBubbleVersion" .=) <$>
_vvipsEpubBubbleVersion,
("containsImageBubbles" .=) <$>
_vvipsContainsImageBubbles,
("containsEpubBubbles" .=) <$>
_vvipsContainsEpubBubbles,
("imageBubbleVersion" .=) <$>
_vvipsImageBubbleVersion])
data VolumeVolumeInfoImageLinks = VolumeVolumeInfoImageLinks'
{ _vviilThumbnail :: !(Maybe Text)
, _vviilSmall :: !(Maybe Text)
, _vviilExtraLarge :: !(Maybe Text)
, _vviilLarge :: !(Maybe Text)
, _vviilMedium :: !(Maybe Text)
, _vviilSmallThumbnail :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeVolumeInfoImageLinks
:: VolumeVolumeInfoImageLinks
volumeVolumeInfoImageLinks =
VolumeVolumeInfoImageLinks'
{ _vviilThumbnail = Nothing
, _vviilSmall = Nothing
, _vviilExtraLarge = Nothing
, _vviilLarge = Nothing
, _vviilMedium = Nothing
, _vviilSmallThumbnail = Nothing
}
vviilThumbnail :: Lens' VolumeVolumeInfoImageLinks (Maybe Text)
vviilThumbnail
= lens _vviilThumbnail
(\ s a -> s{_vviilThumbnail = a})
vviilSmall :: Lens' VolumeVolumeInfoImageLinks (Maybe Text)
vviilSmall
= lens _vviilSmall (\ s a -> s{_vviilSmall = a})
vviilExtraLarge :: Lens' VolumeVolumeInfoImageLinks (Maybe Text)
vviilExtraLarge
= lens _vviilExtraLarge
(\ s a -> s{_vviilExtraLarge = a})
vviilLarge :: Lens' VolumeVolumeInfoImageLinks (Maybe Text)
vviilLarge
= lens _vviilLarge (\ s a -> s{_vviilLarge = a})
vviilMedium :: Lens' VolumeVolumeInfoImageLinks (Maybe Text)
vviilMedium
= lens _vviilMedium (\ s a -> s{_vviilMedium = a})
vviilSmallThumbnail :: Lens' VolumeVolumeInfoImageLinks (Maybe Text)
vviilSmallThumbnail
= lens _vviilSmallThumbnail
(\ s a -> s{_vviilSmallThumbnail = a})
instance FromJSON VolumeVolumeInfoImageLinks where
parseJSON
= withObject "VolumeVolumeInfoImageLinks"
(\ o ->
VolumeVolumeInfoImageLinks' <$>
(o .:? "thumbnail") <*> (o .:? "small") <*>
(o .:? "extraLarge")
<*> (o .:? "large")
<*> (o .:? "medium")
<*> (o .:? "smallThumbnail"))
instance ToJSON VolumeVolumeInfoImageLinks where
toJSON VolumeVolumeInfoImageLinks'{..}
= object
(catMaybes
[("thumbnail" .=) <$> _vviilThumbnail,
("small" .=) <$> _vviilSmall,
("extraLarge" .=) <$> _vviilExtraLarge,
("large" .=) <$> _vviilLarge,
("medium" .=) <$> _vviilMedium,
("smallThumbnail" .=) <$> _vviilSmallThumbnail])
newtype VolumeUserInfoUserUploadedVolumeInfo = VolumeUserInfoUserUploadedVolumeInfo'
{ _vuiuuviProcessingState :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
volumeUserInfoUserUploadedVolumeInfo
:: VolumeUserInfoUserUploadedVolumeInfo
volumeUserInfoUserUploadedVolumeInfo =
VolumeUserInfoUserUploadedVolumeInfo'
{ _vuiuuviProcessingState = Nothing
}
vuiuuviProcessingState :: Lens' VolumeUserInfoUserUploadedVolumeInfo (Maybe Text)
vuiuuviProcessingState
= lens _vuiuuviProcessingState
(\ s a -> s{_vuiuuviProcessingState = a})
instance FromJSON
VolumeUserInfoUserUploadedVolumeInfo where
parseJSON
= withObject "VolumeUserInfoUserUploadedVolumeInfo"
(\ o ->
VolumeUserInfoUserUploadedVolumeInfo' <$>
(o .:? "processingState"))
instance ToJSON VolumeUserInfoUserUploadedVolumeInfo
where
toJSON VolumeUserInfoUserUploadedVolumeInfo'{..}
= object
(catMaybes
[("processingState" .=) <$> _vuiuuviProcessingState])
data VolumeUserInfoCopy = VolumeUserInfoCopy'
{ _vuicLimitType :: !(Maybe Text)
, _vuicAllowedCharacterCount :: !(Maybe (Textual Int32))
, _vuicUpdated :: !(Maybe DateTime')
, _vuicRemainingCharacterCount :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
volumeUserInfoCopy
:: VolumeUserInfoCopy
volumeUserInfoCopy =
VolumeUserInfoCopy'
{ _vuicLimitType = Nothing
, _vuicAllowedCharacterCount = Nothing
, _vuicUpdated = Nothing
, _vuicRemainingCharacterCount = Nothing
}
vuicLimitType :: Lens' VolumeUserInfoCopy (Maybe Text)
vuicLimitType
= lens _vuicLimitType
(\ s a -> s{_vuicLimitType = a})
vuicAllowedCharacterCount :: Lens' VolumeUserInfoCopy (Maybe Int32)
vuicAllowedCharacterCount
= lens _vuicAllowedCharacterCount
(\ s a -> s{_vuicAllowedCharacterCount = a})
. mapping _Coerce
vuicUpdated :: Lens' VolumeUserInfoCopy (Maybe UTCTime)
vuicUpdated
= lens _vuicUpdated (\ s a -> s{_vuicUpdated = a}) .
mapping _DateTime
vuicRemainingCharacterCount :: Lens' VolumeUserInfoCopy (Maybe Int32)
vuicRemainingCharacterCount
= lens _vuicRemainingCharacterCount
(\ s a -> s{_vuicRemainingCharacterCount = a})
. mapping _Coerce
instance FromJSON VolumeUserInfoCopy where
parseJSON
= withObject "VolumeUserInfoCopy"
(\ o ->
VolumeUserInfoCopy' <$>
(o .:? "limitType") <*>
(o .:? "allowedCharacterCount")
<*> (o .:? "updated")
<*> (o .:? "remainingCharacterCount"))
instance ToJSON VolumeUserInfoCopy where
toJSON VolumeUserInfoCopy'{..}
= object
(catMaybes
[("limitType" .=) <$> _vuicLimitType,
("allowedCharacterCount" .=) <$>
_vuicAllowedCharacterCount,
("updated" .=) <$> _vuicUpdated,
("remainingCharacterCount" .=) <$>
_vuicRemainingCharacterCount])
newtype BooksVolumesRecommendedRateResponse = BooksVolumesRecommendedRateResponse'
{ _bvrrrConsistencyToken :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
booksVolumesRecommendedRateResponse
:: BooksVolumesRecommendedRateResponse
booksVolumesRecommendedRateResponse =
BooksVolumesRecommendedRateResponse'
{ _bvrrrConsistencyToken = Nothing
}
bvrrrConsistencyToken :: Lens' BooksVolumesRecommendedRateResponse (Maybe Text)
bvrrrConsistencyToken
= lens _bvrrrConsistencyToken
(\ s a -> s{_bvrrrConsistencyToken = a})
instance FromJSON BooksVolumesRecommendedRateResponse
where
parseJSON
= withObject "BooksVolumesRecommendedRateResponse"
(\ o ->
BooksVolumesRecommendedRateResponse' <$>
(o .:? "consistency_token"))
instance ToJSON BooksVolumesRecommendedRateResponse
where
toJSON BooksVolumesRecommendedRateResponse'{..}
= object
(catMaybes
[("consistency_token" .=) <$>
_bvrrrConsistencyToken])
newtype UserSettingsNotificationPriceDrop = UserSettingsNotificationPriceDrop'
{ _usnpdOptedState :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
userSettingsNotificationPriceDrop
:: UserSettingsNotificationPriceDrop
userSettingsNotificationPriceDrop =
UserSettingsNotificationPriceDrop'
{ _usnpdOptedState = Nothing
}
usnpdOptedState :: Lens' UserSettingsNotificationPriceDrop (Maybe Text)
usnpdOptedState
= lens _usnpdOptedState
(\ s a -> s{_usnpdOptedState = a})
instance FromJSON UserSettingsNotificationPriceDrop
where
parseJSON
= withObject "UserSettingsNotificationPriceDrop"
(\ o ->
UserSettingsNotificationPriceDrop' <$>
(o .:? "opted_state"))
instance ToJSON UserSettingsNotificationPriceDrop
where
toJSON UserSettingsNotificationPriceDrop'{..}
= object
(catMaybes [("opted_state" .=) <$> _usnpdOptedState])
data VolumeseriesInfo = VolumeseriesInfo'
{ _viBookDisplayNumber :: !(Maybe Text)
, _viKind :: !Text
, _viShortSeriesBookTitle :: !(Maybe Text)
, _viVolumeSeries :: !(Maybe [VolumeseriesInfoVolumeSeriesItem])
} deriving (Eq,Show,Data,Typeable,Generic)
volumeseriesInfo
:: VolumeseriesInfo
volumeseriesInfo =
VolumeseriesInfo'
{ _viBookDisplayNumber = Nothing
, _viKind = "books#volume_series_info"
, _viShortSeriesBookTitle = Nothing
, _viVolumeSeries = Nothing
}
viBookDisplayNumber :: Lens' VolumeseriesInfo (Maybe Text)
viBookDisplayNumber
= lens _viBookDisplayNumber
(\ s a -> s{_viBookDisplayNumber = a})
viKind :: Lens' VolumeseriesInfo Text
viKind = lens _viKind (\ s a -> s{_viKind = a})
viShortSeriesBookTitle :: Lens' VolumeseriesInfo (Maybe Text)
viShortSeriesBookTitle
= lens _viShortSeriesBookTitle
(\ s a -> s{_viShortSeriesBookTitle = a})
viVolumeSeries :: Lens' VolumeseriesInfo [VolumeseriesInfoVolumeSeriesItem]
viVolumeSeries
= lens _viVolumeSeries
(\ s a -> s{_viVolumeSeries = a})
. _Default
. _Coerce
instance FromJSON VolumeseriesInfo where
parseJSON
= withObject "VolumeseriesInfo"
(\ o ->
VolumeseriesInfo' <$>
(o .:? "bookDisplayNumber") <*>
(o .:? "kind" .!= "books#volume_series_info")
<*> (o .:? "shortSeriesBookTitle")
<*> (o .:? "volumeSeries" .!= mempty))
instance ToJSON VolumeseriesInfo where
toJSON VolumeseriesInfo'{..}
= object
(catMaybes
[("bookDisplayNumber" .=) <$> _viBookDisplayNumber,
Just ("kind" .= _viKind),
("shortSeriesBookTitle" .=) <$>
_viShortSeriesBookTitle,
("volumeSeries" .=) <$> _viVolumeSeries])
data Bookshelf = Bookshelf'
{ _bAccess :: !(Maybe Text)
, _bVolumesLastUpdated :: !(Maybe DateTime')
, _bKind :: !Text
, _bCreated :: !(Maybe DateTime')
, _bVolumeCount :: !(Maybe (Textual Int32))
, _bSelfLink :: !(Maybe Text)
, _bId :: !(Maybe (Textual Int32))
, _bUpdated :: !(Maybe DateTime')
, _bTitle :: !(Maybe Text)
, _bDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
bookshelf
:: Bookshelf
bookshelf =
Bookshelf'
{ _bAccess = Nothing
, _bVolumesLastUpdated = Nothing
, _bKind = "books#bookshelf"
, _bCreated = Nothing
, _bVolumeCount = Nothing
, _bSelfLink = Nothing
, _bId = Nothing
, _bUpdated = Nothing
, _bTitle = Nothing
, _bDescription = Nothing
}
bAccess :: Lens' Bookshelf (Maybe Text)
bAccess = lens _bAccess (\ s a -> s{_bAccess = a})
bVolumesLastUpdated :: Lens' Bookshelf (Maybe UTCTime)
bVolumesLastUpdated
= lens _bVolumesLastUpdated
(\ s a -> s{_bVolumesLastUpdated = a})
. mapping _DateTime
bKind :: Lens' Bookshelf Text
bKind = lens _bKind (\ s a -> s{_bKind = a})
bCreated :: Lens' Bookshelf (Maybe UTCTime)
bCreated
= lens _bCreated (\ s a -> s{_bCreated = a}) .
mapping _DateTime
bVolumeCount :: Lens' Bookshelf (Maybe Int32)
bVolumeCount
= lens _bVolumeCount (\ s a -> s{_bVolumeCount = a})
. mapping _Coerce
bSelfLink :: Lens' Bookshelf (Maybe Text)
bSelfLink
= lens _bSelfLink (\ s a -> s{_bSelfLink = a})
bId :: Lens' Bookshelf (Maybe Int32)
bId
= lens _bId (\ s a -> s{_bId = a}) . mapping _Coerce
bUpdated :: Lens' Bookshelf (Maybe UTCTime)
bUpdated
= lens _bUpdated (\ s a -> s{_bUpdated = a}) .
mapping _DateTime
bTitle :: Lens' Bookshelf (Maybe Text)
bTitle = lens _bTitle (\ s a -> s{_bTitle = a})
bDescription :: Lens' Bookshelf (Maybe Text)
bDescription
= lens _bDescription (\ s a -> s{_bDescription = a})
instance FromJSON Bookshelf where
parseJSON
= withObject "Bookshelf"
(\ o ->
Bookshelf' <$>
(o .:? "access") <*> (o .:? "volumesLastUpdated") <*>
(o .:? "kind" .!= "books#bookshelf")
<*> (o .:? "created")
<*> (o .:? "volumeCount")
<*> (o .:? "selfLink")
<*> (o .:? "id")
<*> (o .:? "updated")
<*> (o .:? "title")
<*> (o .:? "description"))
instance ToJSON Bookshelf where
toJSON Bookshelf'{..}
= object
(catMaybes
[("access" .=) <$> _bAccess,
("volumesLastUpdated" .=) <$> _bVolumesLastUpdated,
Just ("kind" .= _bKind),
("created" .=) <$> _bCreated,
("volumeCount" .=) <$> _bVolumeCount,
("selfLink" .=) <$> _bSelfLink, ("id" .=) <$> _bId,
("updated" .=) <$> _bUpdated,
("title" .=) <$> _bTitle,
("description" .=) <$> _bDescription])
data Notification = Notification'
{ _nDocType :: !(Maybe Text)
, _nTargetURL :: !(Maybe Text)
, _nShowNotificationSettingsAction :: !(Maybe Bool)
, _nDocId :: !(Maybe Text)
, _nKind :: !Text
, _nBody :: !(Maybe Text)
, _nCrmExperimentIds :: !(Maybe [Textual Int64])
, _nPcampaignId :: !(Maybe Text)
, _nReason :: !(Maybe Text)
, _nIsDocumentMature :: !(Maybe Bool)
, _nDontShowNotification :: !(Maybe Bool)
, _nNotificationType :: !(Maybe Text)
, _nNotificationGroup :: !(Maybe Text)
, _nIconURL :: !(Maybe Text)
, _nTitle :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
notification
:: Notification
notification =
Notification'
{ _nDocType = Nothing
, _nTargetURL = Nothing
, _nShowNotificationSettingsAction = Nothing
, _nDocId = Nothing
, _nKind = "books#notification"
, _nBody = Nothing
, _nCrmExperimentIds = Nothing
, _nPcampaignId = Nothing
, _nReason = Nothing
, _nIsDocumentMature = Nothing
, _nDontShowNotification = Nothing
, _nNotificationType = Nothing
, _nNotificationGroup = Nothing
, _nIconURL = Nothing
, _nTitle = Nothing
}
nDocType :: Lens' Notification (Maybe Text)
nDocType = lens _nDocType (\ s a -> s{_nDocType = a})
nTargetURL :: Lens' Notification (Maybe Text)
nTargetURL
= lens _nTargetURL (\ s a -> s{_nTargetURL = a})
nShowNotificationSettingsAction :: Lens' Notification (Maybe Bool)
nShowNotificationSettingsAction
= lens _nShowNotificationSettingsAction
(\ s a -> s{_nShowNotificationSettingsAction = a})
nDocId :: Lens' Notification (Maybe Text)
nDocId = lens _nDocId (\ s a -> s{_nDocId = a})
nKind :: Lens' Notification Text
nKind = lens _nKind (\ s a -> s{_nKind = a})
nBody :: Lens' Notification (Maybe Text)
nBody = lens _nBody (\ s a -> s{_nBody = a})
nCrmExperimentIds :: Lens' Notification [Int64]
nCrmExperimentIds
= lens _nCrmExperimentIds
(\ s a -> s{_nCrmExperimentIds = a})
. _Default
. _Coerce
nPcampaignId :: Lens' Notification (Maybe Text)
nPcampaignId
= lens _nPcampaignId (\ s a -> s{_nPcampaignId = a})
nReason :: Lens' Notification (Maybe Text)
nReason = lens _nReason (\ s a -> s{_nReason = a})
nIsDocumentMature :: Lens' Notification (Maybe Bool)
nIsDocumentMature
= lens _nIsDocumentMature
(\ s a -> s{_nIsDocumentMature = a})
nDontShowNotification :: Lens' Notification (Maybe Bool)
nDontShowNotification
= lens _nDontShowNotification
(\ s a -> s{_nDontShowNotification = a})
nNotificationType :: Lens' Notification (Maybe Text)
nNotificationType
= lens _nNotificationType
(\ s a -> s{_nNotificationType = a})
nNotificationGroup :: Lens' Notification (Maybe Text)
nNotificationGroup
= lens _nNotificationGroup
(\ s a -> s{_nNotificationGroup = a})
nIconURL :: Lens' Notification (Maybe Text)
nIconURL = lens _nIconURL (\ s a -> s{_nIconURL = a})
nTitle :: Lens' Notification (Maybe Text)
nTitle = lens _nTitle (\ s a -> s{_nTitle = a})
instance FromJSON Notification where
parseJSON
= withObject "Notification"
(\ o ->
Notification' <$>
(o .:? "doc_type") <*> (o .:? "targetUrl") <*>
(o .:? "show_notification_settings_action")
<*> (o .:? "doc_id")
<*> (o .:? "kind" .!= "books#notification")
<*> (o .:? "body")
<*> (o .:? "crmExperimentIds" .!= mempty)
<*> (o .:? "pcampaign_id")
<*> (o .:? "reason")
<*> (o .:? "is_document_mature")
<*> (o .:? "dont_show_notification")
<*> (o .:? "notification_type")
<*> (o .:? "notificationGroup")
<*> (o .:? "iconUrl")
<*> (o .:? "title"))
instance ToJSON Notification where
toJSON Notification'{..}
= object
(catMaybes
[("doc_type" .=) <$> _nDocType,
("targetUrl" .=) <$> _nTargetURL,
("show_notification_settings_action" .=) <$>
_nShowNotificationSettingsAction,
("doc_id" .=) <$> _nDocId, Just ("kind" .= _nKind),
("body" .=) <$> _nBody,
("crmExperimentIds" .=) <$> _nCrmExperimentIds,
("pcampaign_id" .=) <$> _nPcampaignId,
("reason" .=) <$> _nReason,
("is_document_mature" .=) <$> _nIsDocumentMature,
("dont_show_notification" .=) <$>
_nDontShowNotification,
("notification_type" .=) <$> _nNotificationType,
("notificationGroup" .=) <$> _nNotificationGroup,
("iconUrl" .=) <$> _nIconURL,
("title" .=) <$> _nTitle])
data AnnotationsSummaryLayersItem = AnnotationsSummaryLayersItem'
{ _asliLimitType :: !(Maybe Text)
, _asliAllowedCharacterCount :: !(Maybe (Textual Int32))
, _asliUpdated :: !(Maybe DateTime')
, _asliLayerId :: !(Maybe Text)
, _asliRemainingCharacterCount :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
annotationsSummaryLayersItem
:: AnnotationsSummaryLayersItem
annotationsSummaryLayersItem =
AnnotationsSummaryLayersItem'
{ _asliLimitType = Nothing
, _asliAllowedCharacterCount = Nothing
, _asliUpdated = Nothing
, _asliLayerId = Nothing
, _asliRemainingCharacterCount = Nothing
}
asliLimitType :: Lens' AnnotationsSummaryLayersItem (Maybe Text)
asliLimitType
= lens _asliLimitType
(\ s a -> s{_asliLimitType = a})
asliAllowedCharacterCount :: Lens' AnnotationsSummaryLayersItem (Maybe Int32)
asliAllowedCharacterCount
= lens _asliAllowedCharacterCount
(\ s a -> s{_asliAllowedCharacterCount = a})
. mapping _Coerce
asliUpdated :: Lens' AnnotationsSummaryLayersItem (Maybe UTCTime)
asliUpdated
= lens _asliUpdated (\ s a -> s{_asliUpdated = a}) .
mapping _DateTime
asliLayerId :: Lens' AnnotationsSummaryLayersItem (Maybe Text)
asliLayerId
= lens _asliLayerId (\ s a -> s{_asliLayerId = a})
asliRemainingCharacterCount :: Lens' AnnotationsSummaryLayersItem (Maybe Int32)
asliRemainingCharacterCount
= lens _asliRemainingCharacterCount
(\ s a -> s{_asliRemainingCharacterCount = a})
. mapping _Coerce
instance FromJSON AnnotationsSummaryLayersItem where
parseJSON
= withObject "AnnotationsSummaryLayersItem"
(\ o ->
AnnotationsSummaryLayersItem' <$>
(o .:? "limitType") <*>
(o .:? "allowedCharacterCount")
<*> (o .:? "updated")
<*> (o .:? "layerId")
<*> (o .:? "remainingCharacterCount"))
instance ToJSON AnnotationsSummaryLayersItem where
toJSON AnnotationsSummaryLayersItem'{..}
= object
(catMaybes
[("limitType" .=) <$> _asliLimitType,
("allowedCharacterCount" .=) <$>
_asliAllowedCharacterCount,
("updated" .=) <$> _asliUpdated,
("layerId" .=) <$> _asliLayerId,
("remainingCharacterCount" .=) <$>
_asliRemainingCharacterCount])
data VolumeSaleInfoOffersItemRentalDuration = VolumeSaleInfoOffersItemRentalDuration'
{ _vsioirdCount :: !(Maybe (Textual Double))
, _vsioirdUnit :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeSaleInfoOffersItemRentalDuration
:: VolumeSaleInfoOffersItemRentalDuration
volumeSaleInfoOffersItemRentalDuration =
VolumeSaleInfoOffersItemRentalDuration'
{ _vsioirdCount = Nothing
, _vsioirdUnit = Nothing
}
vsioirdCount :: Lens' VolumeSaleInfoOffersItemRentalDuration (Maybe Double)
vsioirdCount
= lens _vsioirdCount (\ s a -> s{_vsioirdCount = a})
. mapping _Coerce
vsioirdUnit :: Lens' VolumeSaleInfoOffersItemRentalDuration (Maybe Text)
vsioirdUnit
= lens _vsioirdUnit (\ s a -> s{_vsioirdUnit = a})
instance FromJSON
VolumeSaleInfoOffersItemRentalDuration where
parseJSON
= withObject "VolumeSaleInfoOffersItemRentalDuration"
(\ o ->
VolumeSaleInfoOffersItemRentalDuration' <$>
(o .:? "count") <*> (o .:? "unit"))
instance ToJSON
VolumeSaleInfoOffersItemRentalDuration where
toJSON VolumeSaleInfoOffersItemRentalDuration'{..}
= object
(catMaybes
[("count" .=) <$> _vsioirdCount,
("unit" .=) <$> _vsioirdUnit])
data DictlayerDataDictWordsItemExamplesItem = DictlayerDataDictWordsItemExamplesItem'
{ _dddwieiText :: !(Maybe Text)
, _dddwieiSource :: !(Maybe DictlayerDataDictWordsItemExamplesItemSource)
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataDictWordsItemExamplesItem
:: DictlayerDataDictWordsItemExamplesItem
dictlayerDataDictWordsItemExamplesItem =
DictlayerDataDictWordsItemExamplesItem'
{ _dddwieiText = Nothing
, _dddwieiSource = Nothing
}
dddwieiText :: Lens' DictlayerDataDictWordsItemExamplesItem (Maybe Text)
dddwieiText
= lens _dddwieiText (\ s a -> s{_dddwieiText = a})
dddwieiSource :: Lens' DictlayerDataDictWordsItemExamplesItem (Maybe DictlayerDataDictWordsItemExamplesItemSource)
dddwieiSource
= lens _dddwieiSource
(\ s a -> s{_dddwieiSource = a})
instance FromJSON
DictlayerDataDictWordsItemExamplesItem where
parseJSON
= withObject "DictlayerDataDictWordsItemExamplesItem"
(\ o ->
DictlayerDataDictWordsItemExamplesItem' <$>
(o .:? "text") <*> (o .:? "source"))
instance ToJSON
DictlayerDataDictWordsItemExamplesItem where
toJSON DictlayerDataDictWordsItemExamplesItem'{..}
= object
(catMaybes
[("text" .=) <$> _dddwieiText,
("source" .=) <$> _dddwieiSource])
data OffersItemsItem = OffersItemsItem'
{ _oiiItems :: !(Maybe [OffersItemsItemItemsItem])
, _oiiArtURL :: !(Maybe Text)
, _oiiId :: !(Maybe Text)
, _oiiGServicesKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
offersItemsItem
:: OffersItemsItem
offersItemsItem =
OffersItemsItem'
{ _oiiItems = Nothing
, _oiiArtURL = Nothing
, _oiiId = Nothing
, _oiiGServicesKey = Nothing
}
oiiItems :: Lens' OffersItemsItem [OffersItemsItemItemsItem]
oiiItems
= lens _oiiItems (\ s a -> s{_oiiItems = a}) .
_Default
. _Coerce
oiiArtURL :: Lens' OffersItemsItem (Maybe Text)
oiiArtURL
= lens _oiiArtURL (\ s a -> s{_oiiArtURL = a})
oiiId :: Lens' OffersItemsItem (Maybe Text)
oiiId = lens _oiiId (\ s a -> s{_oiiId = a})
oiiGServicesKey :: Lens' OffersItemsItem (Maybe Text)
oiiGServicesKey
= lens _oiiGServicesKey
(\ s a -> s{_oiiGServicesKey = a})
instance FromJSON OffersItemsItem where
parseJSON
= withObject "OffersItemsItem"
(\ o ->
OffersItemsItem' <$>
(o .:? "items" .!= mempty) <*> (o .:? "artUrl") <*>
(o .:? "id")
<*> (o .:? "gservicesKey"))
instance ToJSON OffersItemsItem where
toJSON OffersItemsItem'{..}
= object
(catMaybes
[("items" .=) <$> _oiiItems,
("artUrl" .=) <$> _oiiArtURL, ("id" .=) <$> _oiiId,
("gservicesKey" .=) <$> _oiiGServicesKey])
data AnnotationLayerSummary = AnnotationLayerSummary'
{ _alsLimitType :: !(Maybe Text)
, _alsAllowedCharacterCount :: !(Maybe (Textual Int32))
, _alsRemainingCharacterCount :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
annotationLayerSummary
:: AnnotationLayerSummary
annotationLayerSummary =
AnnotationLayerSummary'
{ _alsLimitType = Nothing
, _alsAllowedCharacterCount = Nothing
, _alsRemainingCharacterCount = Nothing
}
alsLimitType :: Lens' AnnotationLayerSummary (Maybe Text)
alsLimitType
= lens _alsLimitType (\ s a -> s{_alsLimitType = a})
alsAllowedCharacterCount :: Lens' AnnotationLayerSummary (Maybe Int32)
alsAllowedCharacterCount
= lens _alsAllowedCharacterCount
(\ s a -> s{_alsAllowedCharacterCount = a})
. mapping _Coerce
alsRemainingCharacterCount :: Lens' AnnotationLayerSummary (Maybe Int32)
alsRemainingCharacterCount
= lens _alsRemainingCharacterCount
(\ s a -> s{_alsRemainingCharacterCount = a})
. mapping _Coerce
instance FromJSON AnnotationLayerSummary where
parseJSON
= withObject "AnnotationLayerSummary"
(\ o ->
AnnotationLayerSummary' <$>
(o .:? "limitType") <*>
(o .:? "allowedCharacterCount")
<*> (o .:? "remainingCharacterCount"))
instance ToJSON AnnotationLayerSummary where
toJSON AnnotationLayerSummary'{..}
= object
(catMaybes
[("limitType" .=) <$> _alsLimitType,
("allowedCharacterCount" .=) <$>
_alsAllowedCharacterCount,
("remainingCharacterCount" .=) <$>
_alsRemainingCharacterCount])
newtype VolumeSearchInfo = VolumeSearchInfo'
{ _vsiTextSnippet :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
volumeSearchInfo
:: VolumeSearchInfo
volumeSearchInfo =
VolumeSearchInfo'
{ _vsiTextSnippet = Nothing
}
vsiTextSnippet :: Lens' VolumeSearchInfo (Maybe Text)
vsiTextSnippet
= lens _vsiTextSnippet
(\ s a -> s{_vsiTextSnippet = a})
instance FromJSON VolumeSearchInfo where
parseJSON
= withObject "VolumeSearchInfo"
(\ o -> VolumeSearchInfo' <$> (o .:? "textSnippet"))
instance ToJSON VolumeSearchInfo where
toJSON VolumeSearchInfo'{..}
= object
(catMaybes [("textSnippet" .=) <$> _vsiTextSnippet])
data AnnotationsSummary = AnnotationsSummary'
{ _asKind :: !Text
, _asLayers :: !(Maybe [AnnotationsSummaryLayersItem])
} deriving (Eq,Show,Data,Typeable,Generic)
annotationsSummary
:: AnnotationsSummary
annotationsSummary =
AnnotationsSummary'
{ _asKind = "books#annotationsSummary"
, _asLayers = Nothing
}
asKind :: Lens' AnnotationsSummary Text
asKind = lens _asKind (\ s a -> s{_asKind = a})
asLayers :: Lens' AnnotationsSummary [AnnotationsSummaryLayersItem]
asLayers
= lens _asLayers (\ s a -> s{_asLayers = a}) .
_Default
. _Coerce
instance FromJSON AnnotationsSummary where
parseJSON
= withObject "AnnotationsSummary"
(\ o ->
AnnotationsSummary' <$>
(o .:? "kind" .!= "books#annotationsSummary") <*>
(o .:? "layers" .!= mempty))
instance ToJSON AnnotationsSummary where
toJSON AnnotationsSummary'{..}
= object
(catMaybes
[Just ("kind" .= _asKind),
("layers" .=) <$> _asLayers])
data Category = Category'
{ _cKind :: !Text
, _cItems :: !(Maybe [CategoryItemsItem])
} deriving (Eq,Show,Data,Typeable,Generic)
category
:: Category
category =
Category'
{ _cKind = "onboarding#category"
, _cItems = Nothing
}
cKind :: Lens' Category Text
cKind = lens _cKind (\ s a -> s{_cKind = a})
cItems :: Lens' Category [CategoryItemsItem]
cItems
= lens _cItems (\ s a -> s{_cItems = a}) . _Default .
_Coerce
instance FromJSON Category where
parseJSON
= withObject "Category"
(\ o ->
Category' <$>
(o .:? "kind" .!= "onboarding#category") <*>
(o .:? "items" .!= mempty))
instance ToJSON Category where
toJSON Category'{..}
= object
(catMaybes
[Just ("kind" .= _cKind), ("items" .=) <$> _cItems])
data DiscoveryclustersClustersItemBanner_with_content_container = DiscoveryclustersClustersItemBanner_with_content_container'
{ _dcibFillColorArgb :: !(Maybe Text)
, _dcibMoreButtonURL :: !(Maybe Text)
, _dcibTextColorArgb :: !(Maybe Text)
, _dcibMoreButtonText :: !(Maybe Text)
, _dcibImageURL :: !(Maybe Text)
, _dcibMaskColorArgb :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
discoveryclustersClustersItemBanner_with_content_container
:: DiscoveryclustersClustersItemBanner_with_content_container
discoveryclustersClustersItemBanner_with_content_container =
DiscoveryclustersClustersItemBanner_with_content_container'
{ _dcibFillColorArgb = Nothing
, _dcibMoreButtonURL = Nothing
, _dcibTextColorArgb = Nothing
, _dcibMoreButtonText = Nothing
, _dcibImageURL = Nothing
, _dcibMaskColorArgb = Nothing
}
dcibFillColorArgb :: Lens' DiscoveryclustersClustersItemBanner_with_content_container (Maybe Text)
dcibFillColorArgb
= lens _dcibFillColorArgb
(\ s a -> s{_dcibFillColorArgb = a})
dcibMoreButtonURL :: Lens' DiscoveryclustersClustersItemBanner_with_content_container (Maybe Text)
dcibMoreButtonURL
= lens _dcibMoreButtonURL
(\ s a -> s{_dcibMoreButtonURL = a})
dcibTextColorArgb :: Lens' DiscoveryclustersClustersItemBanner_with_content_container (Maybe Text)
dcibTextColorArgb
= lens _dcibTextColorArgb
(\ s a -> s{_dcibTextColorArgb = a})
dcibMoreButtonText :: Lens' DiscoveryclustersClustersItemBanner_with_content_container (Maybe Text)
dcibMoreButtonText
= lens _dcibMoreButtonText
(\ s a -> s{_dcibMoreButtonText = a})
dcibImageURL :: Lens' DiscoveryclustersClustersItemBanner_with_content_container (Maybe Text)
dcibImageURL
= lens _dcibImageURL (\ s a -> s{_dcibImageURL = a})
dcibMaskColorArgb :: Lens' DiscoveryclustersClustersItemBanner_with_content_container (Maybe Text)
dcibMaskColorArgb
= lens _dcibMaskColorArgb
(\ s a -> s{_dcibMaskColorArgb = a})
instance FromJSON
DiscoveryclustersClustersItemBanner_with_content_container
where
parseJSON
= withObject
"DiscoveryclustersClustersItemBannerWithContentContainer"
(\ o ->
DiscoveryclustersClustersItemBanner_with_content_container'
<$>
(o .:? "fillColorArgb") <*> (o .:? "moreButtonUrl")
<*> (o .:? "textColorArgb")
<*> (o .:? "moreButtonText")
<*> (o .:? "imageUrl")
<*> (o .:? "maskColorArgb"))
instance ToJSON
DiscoveryclustersClustersItemBanner_with_content_container
where
toJSON
DiscoveryclustersClustersItemBanner_with_content_container'{..}
= object
(catMaybes
[("fillColorArgb" .=) <$> _dcibFillColorArgb,
("moreButtonUrl" .=) <$> _dcibMoreButtonURL,
("textColorArgb" .=) <$> _dcibTextColorArgb,
("moreButtonText" .=) <$> _dcibMoreButtonText,
("imageUrl" .=) <$> _dcibImageURL,
("maskColorArgb" .=) <$> _dcibMaskColorArgb])
data Volume = Volume'
{ _vvUserInfo :: !(Maybe VolumeUserInfo)
, _vvEtag :: !(Maybe Text)
, _vvAccessInfo :: !(Maybe VolumeAccessInfo)
, _vvKind :: !Text
, _vvSearchInfo :: !(Maybe VolumeSearchInfo)
, _vvSelfLink :: !(Maybe Text)
, _vvLayerInfo :: !(Maybe VolumeLayerInfo)
, _vvSaleInfo :: !(Maybe VolumeSaleInfo)
, _vvId :: !(Maybe Text)
, _vvRecommendedInfo :: !(Maybe VolumeRecommendedInfo)
, _vvVolumeInfo :: !(Maybe VolumeVolumeInfo)
} deriving (Eq,Show,Data,Typeable,Generic)
volume
:: Volume
volume =
Volume'
{ _vvUserInfo = Nothing
, _vvEtag = Nothing
, _vvAccessInfo = Nothing
, _vvKind = "books#volume"
, _vvSearchInfo = Nothing
, _vvSelfLink = Nothing
, _vvLayerInfo = Nothing
, _vvSaleInfo = Nothing
, _vvId = Nothing
, _vvRecommendedInfo = Nothing
, _vvVolumeInfo = Nothing
}
vvUserInfo :: Lens' Volume (Maybe VolumeUserInfo)
vvUserInfo
= lens _vvUserInfo (\ s a -> s{_vvUserInfo = a})
vvEtag :: Lens' Volume (Maybe Text)
vvEtag = lens _vvEtag (\ s a -> s{_vvEtag = a})
vvAccessInfo :: Lens' Volume (Maybe VolumeAccessInfo)
vvAccessInfo
= lens _vvAccessInfo (\ s a -> s{_vvAccessInfo = a})
vvKind :: Lens' Volume Text
vvKind = lens _vvKind (\ s a -> s{_vvKind = a})
vvSearchInfo :: Lens' Volume (Maybe VolumeSearchInfo)
vvSearchInfo
= lens _vvSearchInfo (\ s a -> s{_vvSearchInfo = a})
vvSelfLink :: Lens' Volume (Maybe Text)
vvSelfLink
= lens _vvSelfLink (\ s a -> s{_vvSelfLink = a})
vvLayerInfo :: Lens' Volume (Maybe VolumeLayerInfo)
vvLayerInfo
= lens _vvLayerInfo (\ s a -> s{_vvLayerInfo = a})
vvSaleInfo :: Lens' Volume (Maybe VolumeSaleInfo)
vvSaleInfo
= lens _vvSaleInfo (\ s a -> s{_vvSaleInfo = a})
vvId :: Lens' Volume (Maybe Text)
vvId = lens _vvId (\ s a -> s{_vvId = a})
vvRecommendedInfo :: Lens' Volume (Maybe VolumeRecommendedInfo)
vvRecommendedInfo
= lens _vvRecommendedInfo
(\ s a -> s{_vvRecommendedInfo = a})
vvVolumeInfo :: Lens' Volume (Maybe VolumeVolumeInfo)
vvVolumeInfo
= lens _vvVolumeInfo (\ s a -> s{_vvVolumeInfo = a})
instance FromJSON Volume where
parseJSON
= withObject "Volume"
(\ o ->
Volume' <$>
(o .:? "userInfo") <*> (o .:? "etag") <*>
(o .:? "accessInfo")
<*> (o .:? "kind" .!= "books#volume")
<*> (o .:? "searchInfo")
<*> (o .:? "selfLink")
<*> (o .:? "layerInfo")
<*> (o .:? "saleInfo")
<*> (o .:? "id")
<*> (o .:? "recommendedInfo")
<*> (o .:? "volumeInfo"))
instance ToJSON Volume where
toJSON Volume'{..}
= object
(catMaybes
[("userInfo" .=) <$> _vvUserInfo,
("etag" .=) <$> _vvEtag,
("accessInfo" .=) <$> _vvAccessInfo,
Just ("kind" .= _vvKind),
("searchInfo" .=) <$> _vvSearchInfo,
("selfLink" .=) <$> _vvSelfLink,
("layerInfo" .=) <$> _vvLayerInfo,
("saleInfo" .=) <$> _vvSaleInfo, ("id" .=) <$> _vvId,
("recommendedInfo" .=) <$> _vvRecommendedInfo,
("volumeInfo" .=) <$> _vvVolumeInfo])
data GeolayerDataGeoBoundaryItemItem = GeolayerDataGeoBoundaryItemItem'
{ _gdgbiiLatitude :: !(Maybe (Textual Word32))
, _gdgbiiLongitude :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
geolayerDataGeoBoundaryItemItem
:: GeolayerDataGeoBoundaryItemItem
geolayerDataGeoBoundaryItemItem =
GeolayerDataGeoBoundaryItemItem'
{ _gdgbiiLatitude = Nothing
, _gdgbiiLongitude = Nothing
}
gdgbiiLatitude :: Lens' GeolayerDataGeoBoundaryItemItem (Maybe Word32)
gdgbiiLatitude
= lens _gdgbiiLatitude
(\ s a -> s{_gdgbiiLatitude = a})
. mapping _Coerce
gdgbiiLongitude :: Lens' GeolayerDataGeoBoundaryItemItem (Maybe Word32)
gdgbiiLongitude
= lens _gdgbiiLongitude
(\ s a -> s{_gdgbiiLongitude = a})
. mapping _Coerce
instance FromJSON GeolayerDataGeoBoundaryItemItem
where
parseJSON
= withObject "GeolayerDataGeoBoundaryItemItem"
(\ o ->
GeolayerDataGeoBoundaryItemItem' <$>
(o .:? "latitude") <*> (o .:? "longitude"))
instance ToJSON GeolayerDataGeoBoundaryItemItem where
toJSON GeolayerDataGeoBoundaryItemItem'{..}
= object
(catMaybes
[("latitude" .=) <$> _gdgbiiLatitude,
("longitude" .=) <$> _gdgbiiLongitude])
data Series = Series'
{ _sKind :: !Text
, _sSeries :: !(Maybe [SeriesSeriesItem])
} deriving (Eq,Show,Data,Typeable,Generic)
series
:: Series
series =
Series'
{ _sKind = "books#series"
, _sSeries = Nothing
}
sKind :: Lens' Series Text
sKind = lens _sKind (\ s a -> s{_sKind = a})
sSeries :: Lens' Series [SeriesSeriesItem]
sSeries
= lens _sSeries (\ s a -> s{_sSeries = a}) . _Default
. _Coerce
instance FromJSON Series where
parseJSON
= withObject "Series"
(\ o ->
Series' <$>
(o .:? "kind" .!= "books#series") <*>
(o .:? "series" .!= mempty))
instance ToJSON Series where
toJSON Series'{..}
= object
(catMaybes
[Just ("kind" .= _sKind),
("series" .=) <$> _sSeries])
data OffersItemsItemItemsItem = OffersItemsItemItemsItem'
{ _oiiiiCanonicalVolumeLink :: !(Maybe Text)
, _oiiiiCoverURL :: !(Maybe Text)
, _oiiiiVolumeId :: !(Maybe Text)
, _oiiiiAuthor :: !(Maybe Text)
, _oiiiiTitle :: !(Maybe Text)
, _oiiiiDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
offersItemsItemItemsItem
:: OffersItemsItemItemsItem
offersItemsItemItemsItem =
OffersItemsItemItemsItem'
{ _oiiiiCanonicalVolumeLink = Nothing
, _oiiiiCoverURL = Nothing
, _oiiiiVolumeId = Nothing
, _oiiiiAuthor = Nothing
, _oiiiiTitle = Nothing
, _oiiiiDescription = Nothing
}
oiiiiCanonicalVolumeLink :: Lens' OffersItemsItemItemsItem (Maybe Text)
oiiiiCanonicalVolumeLink
= lens _oiiiiCanonicalVolumeLink
(\ s a -> s{_oiiiiCanonicalVolumeLink = a})
oiiiiCoverURL :: Lens' OffersItemsItemItemsItem (Maybe Text)
oiiiiCoverURL
= lens _oiiiiCoverURL
(\ s a -> s{_oiiiiCoverURL = a})
oiiiiVolumeId :: Lens' OffersItemsItemItemsItem (Maybe Text)
oiiiiVolumeId
= lens _oiiiiVolumeId
(\ s a -> s{_oiiiiVolumeId = a})
oiiiiAuthor :: Lens' OffersItemsItemItemsItem (Maybe Text)
oiiiiAuthor
= lens _oiiiiAuthor (\ s a -> s{_oiiiiAuthor = a})
oiiiiTitle :: Lens' OffersItemsItemItemsItem (Maybe Text)
oiiiiTitle
= lens _oiiiiTitle (\ s a -> s{_oiiiiTitle = a})
oiiiiDescription :: Lens' OffersItemsItemItemsItem (Maybe Text)
oiiiiDescription
= lens _oiiiiDescription
(\ s a -> s{_oiiiiDescription = a})
instance FromJSON OffersItemsItemItemsItem where
parseJSON
= withObject "OffersItemsItemItemsItem"
(\ o ->
OffersItemsItemItemsItem' <$>
(o .:? "canonicalVolumeLink") <*> (o .:? "coverUrl")
<*> (o .:? "volumeId")
<*> (o .:? "author")
<*> (o .:? "title")
<*> (o .:? "description"))
instance ToJSON OffersItemsItemItemsItem where
toJSON OffersItemsItemItemsItem'{..}
= object
(catMaybes
[("canonicalVolumeLink" .=) <$>
_oiiiiCanonicalVolumeLink,
("coverUrl" .=) <$> _oiiiiCoverURL,
("volumeId" .=) <$> _oiiiiVolumeId,
("author" .=) <$> _oiiiiAuthor,
("title" .=) <$> _oiiiiTitle,
("description" .=) <$> _oiiiiDescription])
data DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItemSource = DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItemSource'
{ _dddwisidieisURL :: !(Maybe Text)
, _dddwisidieisAttribution :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItemSource
:: DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItemSource
dictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItemSource =
DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItemSource'
{ _dddwisidieisURL = Nothing
, _dddwisidieisAttribution = Nothing
}
dddwisidieisURL :: Lens' DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItemSource (Maybe Text)
dddwisidieisURL
= lens _dddwisidieisURL
(\ s a -> s{_dddwisidieisURL = a})
dddwisidieisAttribution :: Lens' DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItemSource (Maybe Text)
dddwisidieisAttribution
= lens _dddwisidieisAttribution
(\ s a -> s{_dddwisidieisAttribution = a})
instance FromJSON
DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItemSource
where
parseJSON
= withObject
"DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItemSource"
(\ o ->
DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItemSource'
<$> (o .:? "url") <*> (o .:? "attribution"))
instance ToJSON
DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItemSource
where
toJSON
DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItemSource'{..}
= object
(catMaybes
[("url" .=) <$> _dddwisidieisURL,
("attribution" .=) <$> _dddwisidieisAttribution])
data GeolayerDataCommon = GeolayerDataCommon'
{ _gdcSnippet :: !(Maybe Text)
, _gdcSnippetURL :: !(Maybe Text)
, _gdcLang :: !(Maybe Text)
, _gdcTitle :: !(Maybe Text)
, _gdcPreviewImageURL :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
geolayerDataCommon
:: GeolayerDataCommon
geolayerDataCommon =
GeolayerDataCommon'
{ _gdcSnippet = Nothing
, _gdcSnippetURL = Nothing
, _gdcLang = Nothing
, _gdcTitle = Nothing
, _gdcPreviewImageURL = Nothing
}
gdcSnippet :: Lens' GeolayerDataCommon (Maybe Text)
gdcSnippet
= lens _gdcSnippet (\ s a -> s{_gdcSnippet = a})
gdcSnippetURL :: Lens' GeolayerDataCommon (Maybe Text)
gdcSnippetURL
= lens _gdcSnippetURL
(\ s a -> s{_gdcSnippetURL = a})
gdcLang :: Lens' GeolayerDataCommon (Maybe Text)
gdcLang = lens _gdcLang (\ s a -> s{_gdcLang = a})
gdcTitle :: Lens' GeolayerDataCommon (Maybe Text)
gdcTitle = lens _gdcTitle (\ s a -> s{_gdcTitle = a})
gdcPreviewImageURL :: Lens' GeolayerDataCommon (Maybe Text)
gdcPreviewImageURL
= lens _gdcPreviewImageURL
(\ s a -> s{_gdcPreviewImageURL = a})
instance FromJSON GeolayerDataCommon where
parseJSON
= withObject "GeolayerDataCommon"
(\ o ->
GeolayerDataCommon' <$>
(o .:? "snippet") <*> (o .:? "snippetUrl") <*>
(o .:? "lang")
<*> (o .:? "title")
<*> (o .:? "previewImageUrl"))
instance ToJSON GeolayerDataCommon where
toJSON GeolayerDataCommon'{..}
= object
(catMaybes
[("snippet" .=) <$> _gdcSnippet,
("snippetUrl" .=) <$> _gdcSnippetURL,
("lang" .=) <$> _gdcLang, ("title" .=) <$> _gdcTitle,
("previewImageUrl" .=) <$> _gdcPreviewImageURL])
data GeolayerDataGeo = GeolayerDataGeo'
{ _gdgMapType :: !(Maybe Text)
, _gdgCachePolicy :: !(Maybe Text)
, _gdgViewport :: !(Maybe GeolayerDataGeoViewport)
, _gdgBoundary :: !(Maybe [[GeolayerDataGeoBoundaryItemItem]])
, _gdgLatitude :: !(Maybe (Textual Double))
, _gdgZoom :: !(Maybe (Textual Int32))
, _gdgCountryCode :: !(Maybe Text)
, _gdgLongitude :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
geolayerDataGeo
:: GeolayerDataGeo
geolayerDataGeo =
GeolayerDataGeo'
{ _gdgMapType = Nothing
, _gdgCachePolicy = Nothing
, _gdgViewport = Nothing
, _gdgBoundary = Nothing
, _gdgLatitude = Nothing
, _gdgZoom = Nothing
, _gdgCountryCode = Nothing
, _gdgLongitude = Nothing
}
gdgMapType :: Lens' GeolayerDataGeo (Maybe Text)
gdgMapType
= lens _gdgMapType (\ s a -> s{_gdgMapType = a})
gdgCachePolicy :: Lens' GeolayerDataGeo (Maybe Text)
gdgCachePolicy
= lens _gdgCachePolicy
(\ s a -> s{_gdgCachePolicy = a})
gdgViewport :: Lens' GeolayerDataGeo (Maybe GeolayerDataGeoViewport)
gdgViewport
= lens _gdgViewport (\ s a -> s{_gdgViewport = a})
gdgBoundary :: Lens' GeolayerDataGeo [[GeolayerDataGeoBoundaryItemItem]]
gdgBoundary
= lens _gdgBoundary (\ s a -> s{_gdgBoundary = a}) .
_Default
. _Coerce
gdgLatitude :: Lens' GeolayerDataGeo (Maybe Double)
gdgLatitude
= lens _gdgLatitude (\ s a -> s{_gdgLatitude = a}) .
mapping _Coerce
gdgZoom :: Lens' GeolayerDataGeo (Maybe Int32)
gdgZoom
= lens _gdgZoom (\ s a -> s{_gdgZoom = a}) .
mapping _Coerce
gdgCountryCode :: Lens' GeolayerDataGeo (Maybe Text)
gdgCountryCode
= lens _gdgCountryCode
(\ s a -> s{_gdgCountryCode = a})
gdgLongitude :: Lens' GeolayerDataGeo (Maybe Double)
gdgLongitude
= lens _gdgLongitude (\ s a -> s{_gdgLongitude = a})
. mapping _Coerce
instance FromJSON GeolayerDataGeo where
parseJSON
= withObject "GeolayerDataGeo"
(\ o ->
GeolayerDataGeo' <$>
(o .:? "mapType") <*> (o .:? "cachePolicy") <*>
(o .:? "viewport")
<*> (o .:? "boundary" .!= mempty)
<*> (o .:? "latitude")
<*> (o .:? "zoom")
<*> (o .:? "countryCode")
<*> (o .:? "longitude"))
instance ToJSON GeolayerDataGeo where
toJSON GeolayerDataGeo'{..}
= object
(catMaybes
[("mapType" .=) <$> _gdgMapType,
("cachePolicy" .=) <$> _gdgCachePolicy,
("viewport" .=) <$> _gdgViewport,
("boundary" .=) <$> _gdgBoundary,
("latitude" .=) <$> _gdgLatitude,
("zoom" .=) <$> _gdgZoom,
("countryCode" .=) <$> _gdgCountryCode,
("longitude" .=) <$> _gdgLongitude])
data DictlayerDataDictWordsItem = DictlayerDataDictWordsItem'
{ _dddwiSenses :: !(Maybe [DictlayerDataDictWordsItemSensesItem])
, _dddwiSource :: !(Maybe DictlayerDataDictWordsItemSource)
, _dddwiDerivatives :: !(Maybe [DictlayerDataDictWordsItemDerivativesItem])
, _dddwiExamples :: !(Maybe [DictlayerDataDictWordsItemExamplesItem])
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataDictWordsItem
:: DictlayerDataDictWordsItem
dictlayerDataDictWordsItem =
DictlayerDataDictWordsItem'
{ _dddwiSenses = Nothing
, _dddwiSource = Nothing
, _dddwiDerivatives = Nothing
, _dddwiExamples = Nothing
}
dddwiSenses :: Lens' DictlayerDataDictWordsItem [DictlayerDataDictWordsItemSensesItem]
dddwiSenses
= lens _dddwiSenses (\ s a -> s{_dddwiSenses = a}) .
_Default
. _Coerce
dddwiSource :: Lens' DictlayerDataDictWordsItem (Maybe DictlayerDataDictWordsItemSource)
dddwiSource
= lens _dddwiSource (\ s a -> s{_dddwiSource = a})
dddwiDerivatives :: Lens' DictlayerDataDictWordsItem [DictlayerDataDictWordsItemDerivativesItem]
dddwiDerivatives
= lens _dddwiDerivatives
(\ s a -> s{_dddwiDerivatives = a})
. _Default
. _Coerce
dddwiExamples :: Lens' DictlayerDataDictWordsItem [DictlayerDataDictWordsItemExamplesItem]
dddwiExamples
= lens _dddwiExamples
(\ s a -> s{_dddwiExamples = a})
. _Default
. _Coerce
instance FromJSON DictlayerDataDictWordsItem where
parseJSON
= withObject "DictlayerDataDictWordsItem"
(\ o ->
DictlayerDataDictWordsItem' <$>
(o .:? "senses" .!= mempty) <*> (o .:? "source") <*>
(o .:? "derivatives" .!= mempty)
<*> (o .:? "examples" .!= mempty))
instance ToJSON DictlayerDataDictWordsItem where
toJSON DictlayerDataDictWordsItem'{..}
= object
(catMaybes
[("senses" .=) <$> _dddwiSenses,
("source" .=) <$> _dddwiSource,
("derivatives" .=) <$> _dddwiDerivatives,
("examples" .=) <$> _dddwiExamples])
data CategoryItemsItem = CategoryItemsItem'
{ _ciiName :: !(Maybe Text)
, _ciiCategoryId :: !(Maybe Text)
, _ciiBadgeURL :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
categoryItemsItem
:: CategoryItemsItem
categoryItemsItem =
CategoryItemsItem'
{ _ciiName = Nothing
, _ciiCategoryId = Nothing
, _ciiBadgeURL = Nothing
}
ciiName :: Lens' CategoryItemsItem (Maybe Text)
ciiName = lens _ciiName (\ s a -> s{_ciiName = a})
ciiCategoryId :: Lens' CategoryItemsItem (Maybe Text)
ciiCategoryId
= lens _ciiCategoryId
(\ s a -> s{_ciiCategoryId = a})
ciiBadgeURL :: Lens' CategoryItemsItem (Maybe Text)
ciiBadgeURL
= lens _ciiBadgeURL (\ s a -> s{_ciiBadgeURL = a})
instance FromJSON CategoryItemsItem where
parseJSON
= withObject "CategoryItemsItem"
(\ o ->
CategoryItemsItem' <$>
(o .:? "name") <*> (o .:? "categoryId") <*>
(o .:? "badgeUrl"))
instance ToJSON CategoryItemsItem where
toJSON CategoryItemsItem'{..}
= object
(catMaybes
[("name" .=) <$> _ciiName,
("categoryId" .=) <$> _ciiCategoryId,
("badgeUrl" .=) <$> _ciiBadgeURL])
data DictlayerDataDictWordsItemDerivativesItemSource = DictlayerDataDictWordsItemDerivativesItemSource'
{ _dddwidisURL :: !(Maybe Text)
, _dddwidisAttribution :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataDictWordsItemDerivativesItemSource
:: DictlayerDataDictWordsItemDerivativesItemSource
dictlayerDataDictWordsItemDerivativesItemSource =
DictlayerDataDictWordsItemDerivativesItemSource'
{ _dddwidisURL = Nothing
, _dddwidisAttribution = Nothing
}
dddwidisURL :: Lens' DictlayerDataDictWordsItemDerivativesItemSource (Maybe Text)
dddwidisURL
= lens _dddwidisURL (\ s a -> s{_dddwidisURL = a})
dddwidisAttribution :: Lens' DictlayerDataDictWordsItemDerivativesItemSource (Maybe Text)
dddwidisAttribution
= lens _dddwidisAttribution
(\ s a -> s{_dddwidisAttribution = a})
instance FromJSON
DictlayerDataDictWordsItemDerivativesItemSource where
parseJSON
= withObject
"DictlayerDataDictWordsItemDerivativesItemSource"
(\ o ->
DictlayerDataDictWordsItemDerivativesItemSource' <$>
(o .:? "url") <*> (o .:? "attribution"))
instance ToJSON
DictlayerDataDictWordsItemDerivativesItemSource where
toJSON
DictlayerDataDictWordsItemDerivativesItemSource'{..}
= object
(catMaybes
[("url" .=) <$> _dddwidisURL,
("attribution" .=) <$> _dddwidisAttribution])
data GeolayerData = GeolayerData'
{ _gdKind :: !Text
, _gdGeo :: !(Maybe GeolayerDataGeo)
, _gdCommon :: !(Maybe GeolayerDataCommon)
} deriving (Eq,Show,Data,Typeable,Generic)
geolayerData
:: GeolayerData
geolayerData =
GeolayerData'
{ _gdKind = "books#geolayerdata"
, _gdGeo = Nothing
, _gdCommon = Nothing
}
gdKind :: Lens' GeolayerData Text
gdKind = lens _gdKind (\ s a -> s{_gdKind = a})
gdGeo :: Lens' GeolayerData (Maybe GeolayerDataGeo)
gdGeo = lens _gdGeo (\ s a -> s{_gdGeo = a})
gdCommon :: Lens' GeolayerData (Maybe GeolayerDataCommon)
gdCommon = lens _gdCommon (\ s a -> s{_gdCommon = a})
instance FromJSON GeolayerData where
parseJSON
= withObject "GeolayerData"
(\ o ->
GeolayerData' <$>
(o .:? "kind" .!= "books#geolayerdata") <*>
(o .:? "geo")
<*> (o .:? "common"))
instance ToJSON GeolayerData where
toJSON GeolayerData'{..}
= object
(catMaybes
[Just ("kind" .= _gdKind), ("geo" .=) <$> _gdGeo,
("common" .=) <$> _gdCommon])
data DictlayerDataDictWordsItemSource = DictlayerDataDictWordsItemSource'
{ _dddwisURL :: !(Maybe Text)
, _dddwisAttribution :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataDictWordsItemSource
:: DictlayerDataDictWordsItemSource
dictlayerDataDictWordsItemSource =
DictlayerDataDictWordsItemSource'
{ _dddwisURL = Nothing
, _dddwisAttribution = Nothing
}
dddwisURL :: Lens' DictlayerDataDictWordsItemSource (Maybe Text)
dddwisURL
= lens _dddwisURL (\ s a -> s{_dddwisURL = a})
dddwisAttribution :: Lens' DictlayerDataDictWordsItemSource (Maybe Text)
dddwisAttribution
= lens _dddwisAttribution
(\ s a -> s{_dddwisAttribution = a})
instance FromJSON DictlayerDataDictWordsItemSource
where
parseJSON
= withObject "DictlayerDataDictWordsItemSource"
(\ o ->
DictlayerDataDictWordsItemSource' <$>
(o .:? "url") <*> (o .:? "attribution"))
instance ToJSON DictlayerDataDictWordsItemSource
where
toJSON DictlayerDataDictWordsItemSource'{..}
= object
(catMaybes
[("url" .=) <$> _dddwisURL,
("attribution" .=) <$> _dddwisAttribution])
data DictlayerDataDictWordsItemDerivativesItem = DictlayerDataDictWordsItemDerivativesItem'
{ _dddwidiText :: !(Maybe Text)
, _dddwidiSource :: !(Maybe DictlayerDataDictWordsItemDerivativesItemSource)
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataDictWordsItemDerivativesItem
:: DictlayerDataDictWordsItemDerivativesItem
dictlayerDataDictWordsItemDerivativesItem =
DictlayerDataDictWordsItemDerivativesItem'
{ _dddwidiText = Nothing
, _dddwidiSource = Nothing
}
dddwidiText :: Lens' DictlayerDataDictWordsItemDerivativesItem (Maybe Text)
dddwidiText
= lens _dddwidiText (\ s a -> s{_dddwidiText = a})
dddwidiSource :: Lens' DictlayerDataDictWordsItemDerivativesItem (Maybe DictlayerDataDictWordsItemDerivativesItemSource)
dddwidiSource
= lens _dddwidiSource
(\ s a -> s{_dddwidiSource = a})
instance FromJSON
DictlayerDataDictWordsItemDerivativesItem where
parseJSON
= withObject
"DictlayerDataDictWordsItemDerivativesItem"
(\ o ->
DictlayerDataDictWordsItemDerivativesItem' <$>
(o .:? "text") <*> (o .:? "source"))
instance ToJSON
DictlayerDataDictWordsItemDerivativesItem where
toJSON DictlayerDataDictWordsItemDerivativesItem'{..}
= object
(catMaybes
[("text" .=) <$> _dddwidiText,
("source" .=) <$> _dddwidiSource])
data DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItem = DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItem'
{ _dddwisidieiText :: !(Maybe Text)
, _dddwisidieiSource :: !(Maybe DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItemSource)
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItem
:: DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItem
dictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItem =
DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItem'
{ _dddwisidieiText = Nothing
, _dddwisidieiSource = Nothing
}
dddwisidieiText :: Lens' DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItem (Maybe Text)
dddwisidieiText
= lens _dddwisidieiText
(\ s a -> s{_dddwisidieiText = a})
dddwisidieiSource :: Lens' DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItem (Maybe DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItemSource)
dddwisidieiSource
= lens _dddwisidieiSource
(\ s a -> s{_dddwisidieiSource = a})
instance FromJSON
DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItem
where
parseJSON
= withObject
"DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItem"
(\ o ->
DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItem'
<$> (o .:? "text") <*> (o .:? "source"))
instance ToJSON
DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItem
where
toJSON
DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItem'{..}
= object
(catMaybes
[("text" .=) <$> _dddwisidieiText,
("source" .=) <$> _dddwisidieiSource])
newtype UserSettingsNotificationRewardExpirations = UserSettingsNotificationRewardExpirations'
{ _usnreOptedState :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
userSettingsNotificationRewardExpirations
:: UserSettingsNotificationRewardExpirations
userSettingsNotificationRewardExpirations =
UserSettingsNotificationRewardExpirations'
{ _usnreOptedState = Nothing
}
usnreOptedState :: Lens' UserSettingsNotificationRewardExpirations (Maybe Text)
usnreOptedState
= lens _usnreOptedState
(\ s a -> s{_usnreOptedState = a})
instance FromJSON
UserSettingsNotificationRewardExpirations where
parseJSON
= withObject
"UserSettingsNotificationRewardExpirations"
(\ o ->
UserSettingsNotificationRewardExpirations' <$>
(o .:? "opted_state"))
instance ToJSON
UserSettingsNotificationRewardExpirations where
toJSON UserSettingsNotificationRewardExpirations'{..}
= object
(catMaybes [("opted_state" .=) <$> _usnreOptedState])
data DictlayerData = DictlayerData'
{ _ddKind :: !Text
, _ddDict :: !(Maybe DictlayerDataDict)
, _ddCommon :: !(Maybe DictlayerDataCommon)
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerData
:: DictlayerData
dictlayerData =
DictlayerData'
{ _ddKind = "books#dictlayerdata"
, _ddDict = Nothing
, _ddCommon = Nothing
}
ddKind :: Lens' DictlayerData Text
ddKind = lens _ddKind (\ s a -> s{_ddKind = a})
ddDict :: Lens' DictlayerData (Maybe DictlayerDataDict)
ddDict = lens _ddDict (\ s a -> s{_ddDict = a})
ddCommon :: Lens' DictlayerData (Maybe DictlayerDataCommon)
ddCommon = lens _ddCommon (\ s a -> s{_ddCommon = a})
instance FromJSON DictlayerData where
parseJSON
= withObject "DictlayerData"
(\ o ->
DictlayerData' <$>
(o .:? "kind" .!= "books#dictlayerdata") <*>
(o .:? "dict")
<*> (o .:? "common"))
instance ToJSON DictlayerData where
toJSON DictlayerData'{..}
= object
(catMaybes
[Just ("kind" .= _ddKind), ("dict" .=) <$> _ddDict,
("common" .=) <$> _ddCommon])
data DictlayerDataDictWordsItemSensesItemSynonymsItemSource = DictlayerDataDictWordsItemSensesItemSynonymsItemSource'
{ _dddwisisisURL :: !(Maybe Text)
, _dddwisisisAttribution :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataDictWordsItemSensesItemSynonymsItemSource
:: DictlayerDataDictWordsItemSensesItemSynonymsItemSource
dictlayerDataDictWordsItemSensesItemSynonymsItemSource =
DictlayerDataDictWordsItemSensesItemSynonymsItemSource'
{ _dddwisisisURL = Nothing
, _dddwisisisAttribution = Nothing
}
dddwisisisURL :: Lens' DictlayerDataDictWordsItemSensesItemSynonymsItemSource (Maybe Text)
dddwisisisURL
= lens _dddwisisisURL
(\ s a -> s{_dddwisisisURL = a})
dddwisisisAttribution :: Lens' DictlayerDataDictWordsItemSensesItemSynonymsItemSource (Maybe Text)
dddwisisisAttribution
= lens _dddwisisisAttribution
(\ s a -> s{_dddwisisisAttribution = a})
instance FromJSON
DictlayerDataDictWordsItemSensesItemSynonymsItemSource
where
parseJSON
= withObject
"DictlayerDataDictWordsItemSensesItemSynonymsItemSource"
(\ o ->
DictlayerDataDictWordsItemSensesItemSynonymsItemSource'
<$> (o .:? "url") <*> (o .:? "attribution"))
instance ToJSON
DictlayerDataDictWordsItemSensesItemSynonymsItemSource
where
toJSON
DictlayerDataDictWordsItemSensesItemSynonymsItemSource'{..}
= object
(catMaybes
[("url" .=) <$> _dddwisisisURL,
("attribution" .=) <$> _dddwisisisAttribution])
data Seriesmembership = Seriesmembership'
{ _serNextPageToken :: !(Maybe Text)
, _serKind :: !Text
, _serMember :: !(Maybe [Volume])
} deriving (Eq,Show,Data,Typeable,Generic)
seriesmembership
:: Seriesmembership
seriesmembership =
Seriesmembership'
{ _serNextPageToken = Nothing
, _serKind = "books#series#membership"
, _serMember = Nothing
}
serNextPageToken :: Lens' Seriesmembership (Maybe Text)
serNextPageToken
= lens _serNextPageToken
(\ s a -> s{_serNextPageToken = a})
serKind :: Lens' Seriesmembership Text
serKind = lens _serKind (\ s a -> s{_serKind = a})
serMember :: Lens' Seriesmembership [Volume]
serMember
= lens _serMember (\ s a -> s{_serMember = a}) .
_Default
. _Coerce
instance FromJSON Seriesmembership where
parseJSON
= withObject "Seriesmembership"
(\ o ->
Seriesmembership' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "books#series#membership")
<*> (o .:? "member" .!= mempty))
instance ToJSON Seriesmembership where
toJSON Seriesmembership'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _serNextPageToken,
Just ("kind" .= _serKind),
("member" .=) <$> _serMember])
data UserSettingsNotification = UserSettingsNotification'
{ _usnRewardExpirations :: !(Maybe UserSettingsNotificationRewardExpirations)
, _usnPriceDrop :: !(Maybe UserSettingsNotificationPriceDrop)
, _usnMatchMyInterests :: !(Maybe UserSettingsNotificationMatchMyInterests)
, _usnMoreFromAuthors :: !(Maybe UserSettingsNotificationMoreFromAuthors)
, _usnMoreFromSeries :: !(Maybe UserSettingsNotificationMoreFromSeries)
} deriving (Eq,Show,Data,Typeable,Generic)
userSettingsNotification
:: UserSettingsNotification
userSettingsNotification =
UserSettingsNotification'
{ _usnRewardExpirations = Nothing
, _usnPriceDrop = Nothing
, _usnMatchMyInterests = Nothing
, _usnMoreFromAuthors = Nothing
, _usnMoreFromSeries = Nothing
}
usnRewardExpirations :: Lens' UserSettingsNotification (Maybe UserSettingsNotificationRewardExpirations)
usnRewardExpirations
= lens _usnRewardExpirations
(\ s a -> s{_usnRewardExpirations = a})
usnPriceDrop :: Lens' UserSettingsNotification (Maybe UserSettingsNotificationPriceDrop)
usnPriceDrop
= lens _usnPriceDrop (\ s a -> s{_usnPriceDrop = a})
usnMatchMyInterests :: Lens' UserSettingsNotification (Maybe UserSettingsNotificationMatchMyInterests)
usnMatchMyInterests
= lens _usnMatchMyInterests
(\ s a -> s{_usnMatchMyInterests = a})
usnMoreFromAuthors :: Lens' UserSettingsNotification (Maybe UserSettingsNotificationMoreFromAuthors)
usnMoreFromAuthors
= lens _usnMoreFromAuthors
(\ s a -> s{_usnMoreFromAuthors = a})
usnMoreFromSeries :: Lens' UserSettingsNotification (Maybe UserSettingsNotificationMoreFromSeries)
usnMoreFromSeries
= lens _usnMoreFromSeries
(\ s a -> s{_usnMoreFromSeries = a})
instance FromJSON UserSettingsNotification where
parseJSON
= withObject "UserSettingsNotification"
(\ o ->
UserSettingsNotification' <$>
(o .:? "rewardExpirations") <*> (o .:? "priceDrop")
<*> (o .:? "matchMyInterests")
<*> (o .:? "moreFromAuthors")
<*> (o .:? "moreFromSeries"))
instance ToJSON UserSettingsNotification where
toJSON UserSettingsNotification'{..}
= object
(catMaybes
[("rewardExpirations" .=) <$> _usnRewardExpirations,
("priceDrop" .=) <$> _usnPriceDrop,
("matchMyInterests" .=) <$> _usnMatchMyInterests,
("moreFromAuthors" .=) <$> _usnMoreFromAuthors,
("moreFromSeries" .=) <$> _usnMoreFromSeries])
data DictlayerDataDictWordsItemSensesItemSynonymsItem = DictlayerDataDictWordsItemSensesItemSynonymsItem'
{ _dddwisisiText :: !(Maybe Text)
, _dddwisisiSource :: !(Maybe DictlayerDataDictWordsItemSensesItemSynonymsItemSource)
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataDictWordsItemSensesItemSynonymsItem
:: DictlayerDataDictWordsItemSensesItemSynonymsItem
dictlayerDataDictWordsItemSensesItemSynonymsItem =
DictlayerDataDictWordsItemSensesItemSynonymsItem'
{ _dddwisisiText = Nothing
, _dddwisisiSource = Nothing
}
dddwisisiText :: Lens' DictlayerDataDictWordsItemSensesItemSynonymsItem (Maybe Text)
dddwisisiText
= lens _dddwisisiText
(\ s a -> s{_dddwisisiText = a})
dddwisisiSource :: Lens' DictlayerDataDictWordsItemSensesItemSynonymsItem (Maybe DictlayerDataDictWordsItemSensesItemSynonymsItemSource)
dddwisisiSource
= lens _dddwisisiSource
(\ s a -> s{_dddwisisiSource = a})
instance FromJSON
DictlayerDataDictWordsItemSensesItemSynonymsItem
where
parseJSON
= withObject
"DictlayerDataDictWordsItemSensesItemSynonymsItem"
(\ o ->
DictlayerDataDictWordsItemSensesItemSynonymsItem' <$>
(o .:? "text") <*> (o .:? "source"))
instance ToJSON
DictlayerDataDictWordsItemSensesItemSynonymsItem
where
toJSON
DictlayerDataDictWordsItemSensesItemSynonymsItem'{..}
= object
(catMaybes
[("text" .=) <$> _dddwisisiText,
("source" .=) <$> _dddwisisiSource])
data GeolayerDataGeoViewportLo = GeolayerDataGeoViewportLo'
{ _gdgvlLatitude :: !(Maybe (Textual Double))
, _gdgvlLongitude :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
geolayerDataGeoViewportLo
:: GeolayerDataGeoViewportLo
geolayerDataGeoViewportLo =
GeolayerDataGeoViewportLo'
{ _gdgvlLatitude = Nothing
, _gdgvlLongitude = Nothing
}
gdgvlLatitude :: Lens' GeolayerDataGeoViewportLo (Maybe Double)
gdgvlLatitude
= lens _gdgvlLatitude
(\ s a -> s{_gdgvlLatitude = a})
. mapping _Coerce
gdgvlLongitude :: Lens' GeolayerDataGeoViewportLo (Maybe Double)
gdgvlLongitude
= lens _gdgvlLongitude
(\ s a -> s{_gdgvlLongitude = a})
. mapping _Coerce
instance FromJSON GeolayerDataGeoViewportLo where
parseJSON
= withObject "GeolayerDataGeoViewportLo"
(\ o ->
GeolayerDataGeoViewportLo' <$>
(o .:? "latitude") <*> (o .:? "longitude"))
instance ToJSON GeolayerDataGeoViewportLo where
toJSON GeolayerDataGeoViewportLo'{..}
= object
(catMaybes
[("latitude" .=) <$> _gdgvlLatitude,
("longitude" .=) <$> _gdgvlLongitude])
data VolumeSaleInfoOffersItemListPrice = VolumeSaleInfoOffersItemListPrice'
{ _vsioilpCurrencyCode :: !(Maybe Text)
, _vsioilpAmountInMicros :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
volumeSaleInfoOffersItemListPrice
:: VolumeSaleInfoOffersItemListPrice
volumeSaleInfoOffersItemListPrice =
VolumeSaleInfoOffersItemListPrice'
{ _vsioilpCurrencyCode = Nothing
, _vsioilpAmountInMicros = Nothing
}
vsioilpCurrencyCode :: Lens' VolumeSaleInfoOffersItemListPrice (Maybe Text)
vsioilpCurrencyCode
= lens _vsioilpCurrencyCode
(\ s a -> s{_vsioilpCurrencyCode = a})
vsioilpAmountInMicros :: Lens' VolumeSaleInfoOffersItemListPrice (Maybe Double)
vsioilpAmountInMicros
= lens _vsioilpAmountInMicros
(\ s a -> s{_vsioilpAmountInMicros = a})
. mapping _Coerce
instance FromJSON VolumeSaleInfoOffersItemListPrice
where
parseJSON
= withObject "VolumeSaleInfoOffersItemListPrice"
(\ o ->
VolumeSaleInfoOffersItemListPrice' <$>
(o .:? "currencyCode") <*> (o .:? "amountInMicros"))
instance ToJSON VolumeSaleInfoOffersItemListPrice
where
toJSON VolumeSaleInfoOffersItemListPrice'{..}
= object
(catMaybes
[("currencyCode" .=) <$> _vsioilpCurrencyCode,
("amountInMicros" .=) <$> _vsioilpAmountInMicros])
data DownloadAccessRestriction = DownloadAccessRestriction'
{ _darJustAcquired :: !(Maybe Bool)
, _darSignature :: !(Maybe Text)
, _darKind :: !Text
, _darMaxDownloadDevices :: !(Maybe (Textual Int32))
, _darDownloadsAcquired :: !(Maybe (Textual Int32))
, _darReasonCode :: !(Maybe Text)
, _darVolumeId :: !(Maybe Text)
, _darRestricted :: !(Maybe Bool)
, _darSource :: !(Maybe Text)
, _darDeviceAllowed :: !(Maybe Bool)
, _darMessage :: !(Maybe Text)
, _darNonce :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
downloadAccessRestriction
:: DownloadAccessRestriction
downloadAccessRestriction =
DownloadAccessRestriction'
{ _darJustAcquired = Nothing
, _darSignature = Nothing
, _darKind = "books#downloadAccessRestriction"
, _darMaxDownloadDevices = Nothing
, _darDownloadsAcquired = Nothing
, _darReasonCode = Nothing
, _darVolumeId = Nothing
, _darRestricted = Nothing
, _darSource = Nothing
, _darDeviceAllowed = Nothing
, _darMessage = Nothing
, _darNonce = Nothing
}
darJustAcquired :: Lens' DownloadAccessRestriction (Maybe Bool)
darJustAcquired
= lens _darJustAcquired
(\ s a -> s{_darJustAcquired = a})
darSignature :: Lens' DownloadAccessRestriction (Maybe Text)
darSignature
= lens _darSignature (\ s a -> s{_darSignature = a})
darKind :: Lens' DownloadAccessRestriction Text
darKind = lens _darKind (\ s a -> s{_darKind = a})
darMaxDownloadDevices :: Lens' DownloadAccessRestriction (Maybe Int32)
darMaxDownloadDevices
= lens _darMaxDownloadDevices
(\ s a -> s{_darMaxDownloadDevices = a})
. mapping _Coerce
darDownloadsAcquired :: Lens' DownloadAccessRestriction (Maybe Int32)
darDownloadsAcquired
= lens _darDownloadsAcquired
(\ s a -> s{_darDownloadsAcquired = a})
. mapping _Coerce
darReasonCode :: Lens' DownloadAccessRestriction (Maybe Text)
darReasonCode
= lens _darReasonCode
(\ s a -> s{_darReasonCode = a})
darVolumeId :: Lens' DownloadAccessRestriction (Maybe Text)
darVolumeId
= lens _darVolumeId (\ s a -> s{_darVolumeId = a})
darRestricted :: Lens' DownloadAccessRestriction (Maybe Bool)
darRestricted
= lens _darRestricted
(\ s a -> s{_darRestricted = a})
darSource :: Lens' DownloadAccessRestriction (Maybe Text)
darSource
= lens _darSource (\ s a -> s{_darSource = a})
darDeviceAllowed :: Lens' DownloadAccessRestriction (Maybe Bool)
darDeviceAllowed
= lens _darDeviceAllowed
(\ s a -> s{_darDeviceAllowed = a})
darMessage :: Lens' DownloadAccessRestriction (Maybe Text)
darMessage
= lens _darMessage (\ s a -> s{_darMessage = a})
darNonce :: Lens' DownloadAccessRestriction (Maybe Text)
darNonce = lens _darNonce (\ s a -> s{_darNonce = a})
instance FromJSON DownloadAccessRestriction where
parseJSON
= withObject "DownloadAccessRestriction"
(\ o ->
DownloadAccessRestriction' <$>
(o .:? "justAcquired") <*> (o .:? "signature") <*>
(o .:? "kind" .!= "books#downloadAccessRestriction")
<*> (o .:? "maxDownloadDevices")
<*> (o .:? "downloadsAcquired")
<*> (o .:? "reasonCode")
<*> (o .:? "volumeId")
<*> (o .:? "restricted")
<*> (o .:? "source")
<*> (o .:? "deviceAllowed")
<*> (o .:? "message")
<*> (o .:? "nonce"))
instance ToJSON DownloadAccessRestriction where
toJSON DownloadAccessRestriction'{..}
= object
(catMaybes
[("justAcquired" .=) <$> _darJustAcquired,
("signature" .=) <$> _darSignature,
Just ("kind" .= _darKind),
("maxDownloadDevices" .=) <$> _darMaxDownloadDevices,
("downloadsAcquired" .=) <$> _darDownloadsAcquired,
("reasonCode" .=) <$> _darReasonCode,
("volumeId" .=) <$> _darVolumeId,
("restricted" .=) <$> _darRestricted,
("source" .=) <$> _darSource,
("deviceAllowed" .=) <$> _darDeviceAllowed,
("message" .=) <$> _darMessage,
("nonce" .=) <$> _darNonce])
newtype DictlayerDataCommon = DictlayerDataCommon'
{ _ddcTitle :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataCommon
:: DictlayerDataCommon
dictlayerDataCommon =
DictlayerDataCommon'
{ _ddcTitle = Nothing
}
ddcTitle :: Lens' DictlayerDataCommon (Maybe Text)
ddcTitle = lens _ddcTitle (\ s a -> s{_ddcTitle = a})
instance FromJSON DictlayerDataCommon where
parseJSON
= withObject "DictlayerDataCommon"
(\ o -> DictlayerDataCommon' <$> (o .:? "title"))
instance ToJSON DictlayerDataCommon where
toJSON DictlayerDataCommon'{..}
= object (catMaybes [("title" .=) <$> _ddcTitle])
data DiscoveryclustersClustersItem = DiscoveryclustersClustersItem'
{ _dciBannerWithContentContainer :: !(Maybe DiscoveryclustersClustersItemBanner_with_content_container)
, _dciUid :: !(Maybe Text)
, _dciTotalVolumes :: !(Maybe (Textual Int32))
, _dciSubTitle :: !(Maybe Text)
, _dciTitle :: !(Maybe Text)
, _dciVolumes :: !(Maybe [Volume])
} deriving (Eq,Show,Data,Typeable,Generic)
discoveryclustersClustersItem
:: DiscoveryclustersClustersItem
discoveryclustersClustersItem =
DiscoveryclustersClustersItem'
{ _dciBannerWithContentContainer = Nothing
, _dciUid = Nothing
, _dciTotalVolumes = Nothing
, _dciSubTitle = Nothing
, _dciTitle = Nothing
, _dciVolumes = Nothing
}
dciBannerWithContentContainer :: Lens' DiscoveryclustersClustersItem (Maybe DiscoveryclustersClustersItemBanner_with_content_container)
dciBannerWithContentContainer
= lens _dciBannerWithContentContainer
(\ s a -> s{_dciBannerWithContentContainer = a})
dciUid :: Lens' DiscoveryclustersClustersItem (Maybe Text)
dciUid = lens _dciUid (\ s a -> s{_dciUid = a})
dciTotalVolumes :: Lens' DiscoveryclustersClustersItem (Maybe Int32)
dciTotalVolumes
= lens _dciTotalVolumes
(\ s a -> s{_dciTotalVolumes = a})
. mapping _Coerce
dciSubTitle :: Lens' DiscoveryclustersClustersItem (Maybe Text)
dciSubTitle
= lens _dciSubTitle (\ s a -> s{_dciSubTitle = a})
dciTitle :: Lens' DiscoveryclustersClustersItem (Maybe Text)
dciTitle = lens _dciTitle (\ s a -> s{_dciTitle = a})
dciVolumes :: Lens' DiscoveryclustersClustersItem [Volume]
dciVolumes
= lens _dciVolumes (\ s a -> s{_dciVolumes = a}) .
_Default
. _Coerce
instance FromJSON DiscoveryclustersClustersItem where
parseJSON
= withObject "DiscoveryclustersClustersItem"
(\ o ->
DiscoveryclustersClustersItem' <$>
(o .:? "banner_with_content_container") <*>
(o .:? "uid")
<*> (o .:? "totalVolumes")
<*> (o .:? "subTitle")
<*> (o .:? "title")
<*> (o .:? "volumes" .!= mempty))
instance ToJSON DiscoveryclustersClustersItem where
toJSON DiscoveryclustersClustersItem'{..}
= object
(catMaybes
[("banner_with_content_container" .=) <$>
_dciBannerWithContentContainer,
("uid" .=) <$> _dciUid,
("totalVolumes" .=) <$> _dciTotalVolumes,
("subTitle" .=) <$> _dciSubTitle,
("title" .=) <$> _dciTitle,
("volumes" .=) <$> _dciVolumes])
data VolumeSaleInfoRetailPrice = VolumeSaleInfoRetailPrice'
{ _vsirpAmount :: !(Maybe (Textual Double))
, _vsirpCurrencyCode :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeSaleInfoRetailPrice
:: VolumeSaleInfoRetailPrice
volumeSaleInfoRetailPrice =
VolumeSaleInfoRetailPrice'
{ _vsirpAmount = Nothing
, _vsirpCurrencyCode = Nothing
}
vsirpAmount :: Lens' VolumeSaleInfoRetailPrice (Maybe Double)
vsirpAmount
= lens _vsirpAmount (\ s a -> s{_vsirpAmount = a}) .
mapping _Coerce
vsirpCurrencyCode :: Lens' VolumeSaleInfoRetailPrice (Maybe Text)
vsirpCurrencyCode
= lens _vsirpCurrencyCode
(\ s a -> s{_vsirpCurrencyCode = a})
instance FromJSON VolumeSaleInfoRetailPrice where
parseJSON
= withObject "VolumeSaleInfoRetailPrice"
(\ o ->
VolumeSaleInfoRetailPrice' <$>
(o .:? "amount") <*> (o .:? "currencyCode"))
instance ToJSON VolumeSaleInfoRetailPrice where
toJSON VolumeSaleInfoRetailPrice'{..}
= object
(catMaybes
[("amount" .=) <$> _vsirpAmount,
("currencyCode" .=) <$> _vsirpCurrencyCode])
data VolumeSaleInfoListPrice = VolumeSaleInfoListPrice'
{ _vsilpAmount :: !(Maybe (Textual Double))
, _vsilpCurrencyCode :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeSaleInfoListPrice
:: VolumeSaleInfoListPrice
volumeSaleInfoListPrice =
VolumeSaleInfoListPrice'
{ _vsilpAmount = Nothing
, _vsilpCurrencyCode = Nothing
}
vsilpAmount :: Lens' VolumeSaleInfoListPrice (Maybe Double)
vsilpAmount
= lens _vsilpAmount (\ s a -> s{_vsilpAmount = a}) .
mapping _Coerce
vsilpCurrencyCode :: Lens' VolumeSaleInfoListPrice (Maybe Text)
vsilpCurrencyCode
= lens _vsilpCurrencyCode
(\ s a -> s{_vsilpCurrencyCode = a})
instance FromJSON VolumeSaleInfoListPrice where
parseJSON
= withObject "VolumeSaleInfoListPrice"
(\ o ->
VolumeSaleInfoListPrice' <$>
(o .:? "amount") <*> (o .:? "currencyCode"))
instance ToJSON VolumeSaleInfoListPrice where
toJSON VolumeSaleInfoListPrice'{..}
= object
(catMaybes
[("amount" .=) <$> _vsilpAmount,
("currencyCode" .=) <$> _vsilpCurrencyCode])
data DictlayerDataDictWordsItemSensesItemConjugationsItem = DictlayerDataDictWordsItemSensesItemConjugationsItem'
{ _dddwisiciValue :: !(Maybe Text)
, _dddwisiciType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataDictWordsItemSensesItemConjugationsItem
:: DictlayerDataDictWordsItemSensesItemConjugationsItem
dictlayerDataDictWordsItemSensesItemConjugationsItem =
DictlayerDataDictWordsItemSensesItemConjugationsItem'
{ _dddwisiciValue = Nothing
, _dddwisiciType = Nothing
}
dddwisiciValue :: Lens' DictlayerDataDictWordsItemSensesItemConjugationsItem (Maybe Text)
dddwisiciValue
= lens _dddwisiciValue
(\ s a -> s{_dddwisiciValue = a})
dddwisiciType :: Lens' DictlayerDataDictWordsItemSensesItemConjugationsItem (Maybe Text)
dddwisiciType
= lens _dddwisiciType
(\ s a -> s{_dddwisiciType = a})
instance FromJSON
DictlayerDataDictWordsItemSensesItemConjugationsItem
where
parseJSON
= withObject
"DictlayerDataDictWordsItemSensesItemConjugationsItem"
(\ o ->
DictlayerDataDictWordsItemSensesItemConjugationsItem'
<$> (o .:? "value") <*> (o .:? "type"))
instance ToJSON
DictlayerDataDictWordsItemSensesItemConjugationsItem
where
toJSON
DictlayerDataDictWordsItemSensesItemConjugationsItem'{..}
= object
(catMaybes
[("value" .=) <$> _dddwisiciValue,
("type" .=) <$> _dddwisiciType])
data FamilyInfoMembership = FamilyInfoMembership'
{ _fimAllowedMaturityRating :: !(Maybe Text)
, _fimAcquirePermission :: !(Maybe Text)
, _fimRole :: !(Maybe Text)
, _fimAgeGroup :: !(Maybe Text)
, _fimIsInFamily :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
familyInfoMembership
:: FamilyInfoMembership
familyInfoMembership =
FamilyInfoMembership'
{ _fimAllowedMaturityRating = Nothing
, _fimAcquirePermission = Nothing
, _fimRole = Nothing
, _fimAgeGroup = Nothing
, _fimIsInFamily = Nothing
}
fimAllowedMaturityRating :: Lens' FamilyInfoMembership (Maybe Text)
fimAllowedMaturityRating
= lens _fimAllowedMaturityRating
(\ s a -> s{_fimAllowedMaturityRating = a})
fimAcquirePermission :: Lens' FamilyInfoMembership (Maybe Text)
fimAcquirePermission
= lens _fimAcquirePermission
(\ s a -> s{_fimAcquirePermission = a})
fimRole :: Lens' FamilyInfoMembership (Maybe Text)
fimRole = lens _fimRole (\ s a -> s{_fimRole = a})
fimAgeGroup :: Lens' FamilyInfoMembership (Maybe Text)
fimAgeGroup
= lens _fimAgeGroup (\ s a -> s{_fimAgeGroup = a})
fimIsInFamily :: Lens' FamilyInfoMembership (Maybe Bool)
fimIsInFamily
= lens _fimIsInFamily
(\ s a -> s{_fimIsInFamily = a})
instance FromJSON FamilyInfoMembership where
parseJSON
= withObject "FamilyInfoMembership"
(\ o ->
FamilyInfoMembership' <$>
(o .:? "allowedMaturityRating") <*>
(o .:? "acquirePermission")
<*> (o .:? "role")
<*> (o .:? "ageGroup")
<*> (o .:? "isInFamily"))
instance ToJSON FamilyInfoMembership where
toJSON FamilyInfoMembership'{..}
= object
(catMaybes
[("allowedMaturityRating" .=) <$>
_fimAllowedMaturityRating,
("acquirePermission" .=) <$> _fimAcquirePermission,
("role" .=) <$> _fimRole,
("ageGroup" .=) <$> _fimAgeGroup,
("isInFamily" .=) <$> _fimIsInFamily])
data Volume2 = Volume2'
{ _voloNextPageToken :: !(Maybe Text)
, _voloKind :: !Text
, _voloItems :: !(Maybe [Volume])
} deriving (Eq,Show,Data,Typeable,Generic)
volume2
:: Volume2
volume2 =
Volume2'
{ _voloNextPageToken = Nothing
, _voloKind = "onboarding#volume"
, _voloItems = Nothing
}
voloNextPageToken :: Lens' Volume2 (Maybe Text)
voloNextPageToken
= lens _voloNextPageToken
(\ s a -> s{_voloNextPageToken = a})
voloKind :: Lens' Volume2 Text
voloKind = lens _voloKind (\ s a -> s{_voloKind = a})
voloItems :: Lens' Volume2 [Volume]
voloItems
= lens _voloItems (\ s a -> s{_voloItems = a}) .
_Default
. _Coerce
instance FromJSON Volume2 where
parseJSON
= withObject "Volume2"
(\ o ->
Volume2' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "onboarding#volume")
<*> (o .:? "items" .!= mempty))
instance ToJSON Volume2 where
toJSON Volume2'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _voloNextPageToken,
Just ("kind" .= _voloKind),
("items" .=) <$> _voloItems])
data Review = Review'
{ _rRating :: !(Maybe Text)
, _rKind :: !Text
, _rContent :: !(Maybe Text)
, _rDate :: !(Maybe Text)
, _rVolumeId :: !(Maybe Text)
, _rAuthor :: !(Maybe ReviewAuthor)
, _rSource :: !(Maybe ReviewSource)
, _rFullTextURL :: !(Maybe Text)
, _rTitle :: !(Maybe Text)
, _rType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
review
:: Review
review =
Review'
{ _rRating = Nothing
, _rKind = "books#review"
, _rContent = Nothing
, _rDate = Nothing
, _rVolumeId = Nothing
, _rAuthor = Nothing
, _rSource = Nothing
, _rFullTextURL = Nothing
, _rTitle = Nothing
, _rType = Nothing
}
rRating :: Lens' Review (Maybe Text)
rRating = lens _rRating (\ s a -> s{_rRating = a})
rKind :: Lens' Review Text
rKind = lens _rKind (\ s a -> s{_rKind = a})
rContent :: Lens' Review (Maybe Text)
rContent = lens _rContent (\ s a -> s{_rContent = a})
rDate :: Lens' Review (Maybe Text)
rDate = lens _rDate (\ s a -> s{_rDate = a})
rVolumeId :: Lens' Review (Maybe Text)
rVolumeId
= lens _rVolumeId (\ s a -> s{_rVolumeId = a})
rAuthor :: Lens' Review (Maybe ReviewAuthor)
rAuthor = lens _rAuthor (\ s a -> s{_rAuthor = a})
rSource :: Lens' Review (Maybe ReviewSource)
rSource = lens _rSource (\ s a -> s{_rSource = a})
rFullTextURL :: Lens' Review (Maybe Text)
rFullTextURL
= lens _rFullTextURL (\ s a -> s{_rFullTextURL = a})
rTitle :: Lens' Review (Maybe Text)
rTitle = lens _rTitle (\ s a -> s{_rTitle = a})
rType :: Lens' Review (Maybe Text)
rType = lens _rType (\ s a -> s{_rType = a})
instance FromJSON Review where
parseJSON
= withObject "Review"
(\ o ->
Review' <$>
(o .:? "rating") <*>
(o .:? "kind" .!= "books#review")
<*> (o .:? "content")
<*> (o .:? "date")
<*> (o .:? "volumeId")
<*> (o .:? "author")
<*> (o .:? "source")
<*> (o .:? "fullTextUrl")
<*> (o .:? "title")
<*> (o .:? "type"))
instance ToJSON Review where
toJSON Review'{..}
= object
(catMaybes
[("rating" .=) <$> _rRating, Just ("kind" .= _rKind),
("content" .=) <$> _rContent, ("date" .=) <$> _rDate,
("volumeId" .=) <$> _rVolumeId,
("author" .=) <$> _rAuthor,
("source" .=) <$> _rSource,
("fullTextUrl" .=) <$> _rFullTextURL,
("title" .=) <$> _rTitle, ("type" .=) <$> _rType])
data VolumeUserInfoRentalPeriod = VolumeUserInfoRentalPeriod'
{ _vuirpEndUtcSec :: !(Maybe (Textual Int64))
, _vuirpStartUtcSec :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
volumeUserInfoRentalPeriod
:: VolumeUserInfoRentalPeriod
volumeUserInfoRentalPeriod =
VolumeUserInfoRentalPeriod'
{ _vuirpEndUtcSec = Nothing
, _vuirpStartUtcSec = Nothing
}
vuirpEndUtcSec :: Lens' VolumeUserInfoRentalPeriod (Maybe Int64)
vuirpEndUtcSec
= lens _vuirpEndUtcSec
(\ s a -> s{_vuirpEndUtcSec = a})
. mapping _Coerce
vuirpStartUtcSec :: Lens' VolumeUserInfoRentalPeriod (Maybe Int64)
vuirpStartUtcSec
= lens _vuirpStartUtcSec
(\ s a -> s{_vuirpStartUtcSec = a})
. mapping _Coerce
instance FromJSON VolumeUserInfoRentalPeriod where
parseJSON
= withObject "VolumeUserInfoRentalPeriod"
(\ o ->
VolumeUserInfoRentalPeriod' <$>
(o .:? "endUtcSec") <*> (o .:? "startUtcSec"))
instance ToJSON VolumeUserInfoRentalPeriod where
toJSON VolumeUserInfoRentalPeriod'{..}
= object
(catMaybes
[("endUtcSec" .=) <$> _vuirpEndUtcSec,
("startUtcSec" .=) <$> _vuirpStartUtcSec])
data VolumeSaleInfo = VolumeSaleInfo'
{ _vsiCountry :: !(Maybe Text)
, _vsiOnSaleDate :: !(Maybe DateTime')
, _vsiListPrice :: !(Maybe VolumeSaleInfoListPrice)
, _vsiRetailPrice :: !(Maybe VolumeSaleInfoRetailPrice)
, _vsiOffers :: !(Maybe [VolumeSaleInfoOffersItem])
, _vsiBuyLink :: !(Maybe Text)
, _vsiIsEbook :: !(Maybe Bool)
, _vsiSaleability :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeSaleInfo
:: VolumeSaleInfo
volumeSaleInfo =
VolumeSaleInfo'
{ _vsiCountry = Nothing
, _vsiOnSaleDate = Nothing
, _vsiListPrice = Nothing
, _vsiRetailPrice = Nothing
, _vsiOffers = Nothing
, _vsiBuyLink = Nothing
, _vsiIsEbook = Nothing
, _vsiSaleability = Nothing
}
vsiCountry :: Lens' VolumeSaleInfo (Maybe Text)
vsiCountry
= lens _vsiCountry (\ s a -> s{_vsiCountry = a})
vsiOnSaleDate :: Lens' VolumeSaleInfo (Maybe UTCTime)
vsiOnSaleDate
= lens _vsiOnSaleDate
(\ s a -> s{_vsiOnSaleDate = a})
. mapping _DateTime
vsiListPrice :: Lens' VolumeSaleInfo (Maybe VolumeSaleInfoListPrice)
vsiListPrice
= lens _vsiListPrice (\ s a -> s{_vsiListPrice = a})
vsiRetailPrice :: Lens' VolumeSaleInfo (Maybe VolumeSaleInfoRetailPrice)
vsiRetailPrice
= lens _vsiRetailPrice
(\ s a -> s{_vsiRetailPrice = a})
vsiOffers :: Lens' VolumeSaleInfo [VolumeSaleInfoOffersItem]
vsiOffers
= lens _vsiOffers (\ s a -> s{_vsiOffers = a}) .
_Default
. _Coerce
vsiBuyLink :: Lens' VolumeSaleInfo (Maybe Text)
vsiBuyLink
= lens _vsiBuyLink (\ s a -> s{_vsiBuyLink = a})
vsiIsEbook :: Lens' VolumeSaleInfo (Maybe Bool)
vsiIsEbook
= lens _vsiIsEbook (\ s a -> s{_vsiIsEbook = a})
vsiSaleability :: Lens' VolumeSaleInfo (Maybe Text)
vsiSaleability
= lens _vsiSaleability
(\ s a -> s{_vsiSaleability = a})
instance FromJSON VolumeSaleInfo where
parseJSON
= withObject "VolumeSaleInfo"
(\ o ->
VolumeSaleInfo' <$>
(o .:? "country") <*> (o .:? "onSaleDate") <*>
(o .:? "listPrice")
<*> (o .:? "retailPrice")
<*> (o .:? "offers" .!= mempty)
<*> (o .:? "buyLink")
<*> (o .:? "isEbook")
<*> (o .:? "saleability"))
instance ToJSON VolumeSaleInfo where
toJSON VolumeSaleInfo'{..}
= object
(catMaybes
[("country" .=) <$> _vsiCountry,
("onSaleDate" .=) <$> _vsiOnSaleDate,
("listPrice" .=) <$> _vsiListPrice,
("retailPrice" .=) <$> _vsiRetailPrice,
("offers" .=) <$> _vsiOffers,
("buyLink" .=) <$> _vsiBuyLink,
("isEbook" .=) <$> _vsiIsEbook,
("saleability" .=) <$> _vsiSaleability])
data SeriesSeriesItem = SeriesSeriesItem'
{ _ssiSeriesId :: !(Maybe Text)
, _ssiImageURL :: !(Maybe Text)
, _ssiBannerImageURL :: !(Maybe Text)
, _ssiTitle :: !(Maybe Text)
, _ssiSeriesType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
seriesSeriesItem
:: SeriesSeriesItem
seriesSeriesItem =
SeriesSeriesItem'
{ _ssiSeriesId = Nothing
, _ssiImageURL = Nothing
, _ssiBannerImageURL = Nothing
, _ssiTitle = Nothing
, _ssiSeriesType = Nothing
}
ssiSeriesId :: Lens' SeriesSeriesItem (Maybe Text)
ssiSeriesId
= lens _ssiSeriesId (\ s a -> s{_ssiSeriesId = a})
ssiImageURL :: Lens' SeriesSeriesItem (Maybe Text)
ssiImageURL
= lens _ssiImageURL (\ s a -> s{_ssiImageURL = a})
ssiBannerImageURL :: Lens' SeriesSeriesItem (Maybe Text)
ssiBannerImageURL
= lens _ssiBannerImageURL
(\ s a -> s{_ssiBannerImageURL = a})
ssiTitle :: Lens' SeriesSeriesItem (Maybe Text)
ssiTitle = lens _ssiTitle (\ s a -> s{_ssiTitle = a})
ssiSeriesType :: Lens' SeriesSeriesItem (Maybe Text)
ssiSeriesType
= lens _ssiSeriesType
(\ s a -> s{_ssiSeriesType = a})
instance FromJSON SeriesSeriesItem where
parseJSON
= withObject "SeriesSeriesItem"
(\ o ->
SeriesSeriesItem' <$>
(o .:? "seriesId") <*> (o .:? "imageUrl") <*>
(o .:? "bannerImageUrl")
<*> (o .:? "title")
<*> (o .:? "seriesType"))
instance ToJSON SeriesSeriesItem where
toJSON SeriesSeriesItem'{..}
= object
(catMaybes
[("seriesId" .=) <$> _ssiSeriesId,
("imageUrl" .=) <$> _ssiImageURL,
("bannerImageUrl" .=) <$> _ssiBannerImageURL,
("title" .=) <$> _ssiTitle,
("seriesType" .=) <$> _ssiSeriesType])
data Metadata = Metadata'
{ _mKind :: !Text
, _mItems :: !(Maybe [MetadataItemsItem])
} deriving (Eq,Show,Data,Typeable,Generic)
metadata
:: Metadata
metadata =
Metadata'
{ _mKind = "dictionary#metadata"
, _mItems = Nothing
}
mKind :: Lens' Metadata Text
mKind = lens _mKind (\ s a -> s{_mKind = a})
mItems :: Lens' Metadata [MetadataItemsItem]
mItems
= lens _mItems (\ s a -> s{_mItems = a}) . _Default .
_Coerce
instance FromJSON Metadata where
parseJSON
= withObject "Metadata"
(\ o ->
Metadata' <$>
(o .:? "kind" .!= "dictionary#metadata") <*>
(o .:? "items" .!= mempty))
instance ToJSON Metadata where
toJSON Metadata'{..}
= object
(catMaybes
[Just ("kind" .= _mKind), ("items" .=) <$> _mItems])
newtype VolumeLayerInfo = VolumeLayerInfo'
{ _vliLayers :: Maybe [VolumeLayerInfoLayersItem]
} deriving (Eq,Show,Data,Typeable,Generic)
volumeLayerInfo
:: VolumeLayerInfo
volumeLayerInfo =
VolumeLayerInfo'
{ _vliLayers = Nothing
}
vliLayers :: Lens' VolumeLayerInfo [VolumeLayerInfoLayersItem]
vliLayers
= lens _vliLayers (\ s a -> s{_vliLayers = a}) .
_Default
. _Coerce
instance FromJSON VolumeLayerInfo where
parseJSON
= withObject "VolumeLayerInfo"
(\ o ->
VolumeLayerInfo' <$> (o .:? "layers" .!= mempty))
instance ToJSON VolumeLayerInfo where
toJSON VolumeLayerInfo'{..}
= object (catMaybes [("layers" .=) <$> _vliLayers])
data VolumeVolumeInfoDimensions = VolumeVolumeInfoDimensions'
{ _vvidHeight :: !(Maybe Text)
, _vvidWidth :: !(Maybe Text)
, _vvidThickness :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeVolumeInfoDimensions
:: VolumeVolumeInfoDimensions
volumeVolumeInfoDimensions =
VolumeVolumeInfoDimensions'
{ _vvidHeight = Nothing
, _vvidWidth = Nothing
, _vvidThickness = Nothing
}
vvidHeight :: Lens' VolumeVolumeInfoDimensions (Maybe Text)
vvidHeight
= lens _vvidHeight (\ s a -> s{_vvidHeight = a})
vvidWidth :: Lens' VolumeVolumeInfoDimensions (Maybe Text)
vvidWidth
= lens _vvidWidth (\ s a -> s{_vvidWidth = a})
vvidThickness :: Lens' VolumeVolumeInfoDimensions (Maybe Text)
vvidThickness
= lens _vvidThickness
(\ s a -> s{_vvidThickness = a})
instance FromJSON VolumeVolumeInfoDimensions where
parseJSON
= withObject "VolumeVolumeInfoDimensions"
(\ o ->
VolumeVolumeInfoDimensions' <$>
(o .:? "height") <*> (o .:? "width") <*>
(o .:? "thickness"))
instance ToJSON VolumeVolumeInfoDimensions where
toJSON VolumeVolumeInfoDimensions'{..}
= object
(catMaybes
[("height" .=) <$> _vvidHeight,
("width" .=) <$> _vvidWidth,
("thickness" .=) <$> _vvidThickness])
data RequestAccess = RequestAccess'
{ _raConcurrentAccess :: !(Maybe ConcurrentAccessRestriction)
, _raKind :: !Text
, _raDownloadAccess :: !(Maybe DownloadAccessRestriction)
} deriving (Eq,Show,Data,Typeable,Generic)
requestAccess
:: RequestAccess
requestAccess =
RequestAccess'
{ _raConcurrentAccess = Nothing
, _raKind = "books#requestAccess"
, _raDownloadAccess = Nothing
}
raConcurrentAccess :: Lens' RequestAccess (Maybe ConcurrentAccessRestriction)
raConcurrentAccess
= lens _raConcurrentAccess
(\ s a -> s{_raConcurrentAccess = a})
raKind :: Lens' RequestAccess Text
raKind = lens _raKind (\ s a -> s{_raKind = a})
raDownloadAccess :: Lens' RequestAccess (Maybe DownloadAccessRestriction)
raDownloadAccess
= lens _raDownloadAccess
(\ s a -> s{_raDownloadAccess = a})
instance FromJSON RequestAccess where
parseJSON
= withObject "RequestAccess"
(\ o ->
RequestAccess' <$>
(o .:? "concurrentAccess") <*>
(o .:? "kind" .!= "books#requestAccess")
<*> (o .:? "downloadAccess"))
instance ToJSON RequestAccess where
toJSON RequestAccess'{..}
= object
(catMaybes
[("concurrentAccess" .=) <$> _raConcurrentAccess,
Just ("kind" .= _raKind),
("downloadAccess" .=) <$> _raDownloadAccess])
data FamilyInfo = FamilyInfo'
{ _fiMembership :: !(Maybe FamilyInfoMembership)
, _fiKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
familyInfo
:: FamilyInfo
familyInfo =
FamilyInfo'
{ _fiMembership = Nothing
, _fiKind = "books#familyInfo"
}
fiMembership :: Lens' FamilyInfo (Maybe FamilyInfoMembership)
fiMembership
= lens _fiMembership (\ s a -> s{_fiMembership = a})
fiKind :: Lens' FamilyInfo Text
fiKind = lens _fiKind (\ s a -> s{_fiKind = a})
instance FromJSON FamilyInfo where
parseJSON
= withObject "FamilyInfo"
(\ o ->
FamilyInfo' <$>
(o .:? "membership") <*>
(o .:? "kind" .!= "books#familyInfo"))
instance ToJSON FamilyInfo where
toJSON FamilyInfo'{..}
= object
(catMaybes
[("membership" .=) <$> _fiMembership,
Just ("kind" .= _fiKind)])
data AnnotationClientVersionRanges = AnnotationClientVersionRanges'
{ _acvrGbImageRange :: !(Maybe BooksAnnotationsRange)
, _acvrContentVersion :: !(Maybe Text)
, _acvrImageCfiRange :: !(Maybe BooksAnnotationsRange)
, _acvrGbTextRange :: !(Maybe BooksAnnotationsRange)
, _acvrCfiRange :: !(Maybe BooksAnnotationsRange)
} deriving (Eq,Show,Data,Typeable,Generic)
annotationClientVersionRanges
:: AnnotationClientVersionRanges
annotationClientVersionRanges =
AnnotationClientVersionRanges'
{ _acvrGbImageRange = Nothing
, _acvrContentVersion = Nothing
, _acvrImageCfiRange = Nothing
, _acvrGbTextRange = Nothing
, _acvrCfiRange = Nothing
}
acvrGbImageRange :: Lens' AnnotationClientVersionRanges (Maybe BooksAnnotationsRange)
acvrGbImageRange
= lens _acvrGbImageRange
(\ s a -> s{_acvrGbImageRange = a})
acvrContentVersion :: Lens' AnnotationClientVersionRanges (Maybe Text)
acvrContentVersion
= lens _acvrContentVersion
(\ s a -> s{_acvrContentVersion = a})
acvrImageCfiRange :: Lens' AnnotationClientVersionRanges (Maybe BooksAnnotationsRange)
acvrImageCfiRange
= lens _acvrImageCfiRange
(\ s a -> s{_acvrImageCfiRange = a})
acvrGbTextRange :: Lens' AnnotationClientVersionRanges (Maybe BooksAnnotationsRange)
acvrGbTextRange
= lens _acvrGbTextRange
(\ s a -> s{_acvrGbTextRange = a})
acvrCfiRange :: Lens' AnnotationClientVersionRanges (Maybe BooksAnnotationsRange)
acvrCfiRange
= lens _acvrCfiRange (\ s a -> s{_acvrCfiRange = a})
instance FromJSON AnnotationClientVersionRanges where
parseJSON
= withObject "AnnotationClientVersionRanges"
(\ o ->
AnnotationClientVersionRanges' <$>
(o .:? "gbImageRange") <*> (o .:? "contentVersion")
<*> (o .:? "imageCfiRange")
<*> (o .:? "gbTextRange")
<*> (o .:? "cfiRange"))
instance ToJSON AnnotationClientVersionRanges where
toJSON AnnotationClientVersionRanges'{..}
= object
(catMaybes
[("gbImageRange" .=) <$> _acvrGbImageRange,
("contentVersion" .=) <$> _acvrContentVersion,
("imageCfiRange" .=) <$> _acvrImageCfiRange,
("gbTextRange" .=) <$> _acvrGbTextRange,
("cfiRange" .=) <$> _acvrCfiRange])
data DictlayerDataDictWordsItemSensesItemDefinitionsItem = DictlayerDataDictWordsItemSensesItemDefinitionsItem'
{ _dddwisidiDefinition :: !(Maybe Text)
, _dddwisidiExamples :: !(Maybe [DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItem])
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataDictWordsItemSensesItemDefinitionsItem
:: DictlayerDataDictWordsItemSensesItemDefinitionsItem
dictlayerDataDictWordsItemSensesItemDefinitionsItem =
DictlayerDataDictWordsItemSensesItemDefinitionsItem'
{ _dddwisidiDefinition = Nothing
, _dddwisidiExamples = Nothing
}
dddwisidiDefinition :: Lens' DictlayerDataDictWordsItemSensesItemDefinitionsItem (Maybe Text)
dddwisidiDefinition
= lens _dddwisidiDefinition
(\ s a -> s{_dddwisidiDefinition = a})
dddwisidiExamples :: Lens' DictlayerDataDictWordsItemSensesItemDefinitionsItem [DictlayerDataDictWordsItemSensesItemDefinitionsItemExamplesItem]
dddwisidiExamples
= lens _dddwisidiExamples
(\ s a -> s{_dddwisidiExamples = a})
. _Default
. _Coerce
instance FromJSON
DictlayerDataDictWordsItemSensesItemDefinitionsItem
where
parseJSON
= withObject
"DictlayerDataDictWordsItemSensesItemDefinitionsItem"
(\ o ->
DictlayerDataDictWordsItemSensesItemDefinitionsItem'
<$>
(o .:? "definition") <*>
(o .:? "examples" .!= mempty))
instance ToJSON
DictlayerDataDictWordsItemSensesItemDefinitionsItem
where
toJSON
DictlayerDataDictWordsItemSensesItemDefinitionsItem'{..}
= object
(catMaybes
[("definition" .=) <$> _dddwisidiDefinition,
("examples" .=) <$> _dddwisidiExamples])
data VolumeLayerInfoLayersItem = VolumeLayerInfoLayersItem'
{ _vliliVolumeAnnotationsVersion :: !(Maybe Text)
, _vliliLayerId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeLayerInfoLayersItem
:: VolumeLayerInfoLayersItem
volumeLayerInfoLayersItem =
VolumeLayerInfoLayersItem'
{ _vliliVolumeAnnotationsVersion = Nothing
, _vliliLayerId = Nothing
}
vliliVolumeAnnotationsVersion :: Lens' VolumeLayerInfoLayersItem (Maybe Text)
vliliVolumeAnnotationsVersion
= lens _vliliVolumeAnnotationsVersion
(\ s a -> s{_vliliVolumeAnnotationsVersion = a})
vliliLayerId :: Lens' VolumeLayerInfoLayersItem (Maybe Text)
vliliLayerId
= lens _vliliLayerId (\ s a -> s{_vliliLayerId = a})
instance FromJSON VolumeLayerInfoLayersItem where
parseJSON
= withObject "VolumeLayerInfoLayersItem"
(\ o ->
VolumeLayerInfoLayersItem' <$>
(o .:? "volumeAnnotationsVersion") <*>
(o .:? "layerId"))
instance ToJSON VolumeLayerInfoLayersItem where
toJSON VolumeLayerInfoLayersItem'{..}
= object
(catMaybes
[("volumeAnnotationsVersion" .=) <$>
_vliliVolumeAnnotationsVersion,
("layerId" .=) <$> _vliliLayerId])
data AnnotationCurrentVersionRanges = AnnotationCurrentVersionRanges'
{ _aGbImageRange :: !(Maybe BooksAnnotationsRange)
, _aContentVersion :: !(Maybe Text)
, _aImageCfiRange :: !(Maybe BooksAnnotationsRange)
, _aGbTextRange :: !(Maybe BooksAnnotationsRange)
, _aCfiRange :: !(Maybe BooksAnnotationsRange)
} deriving (Eq,Show,Data,Typeable,Generic)
annotationCurrentVersionRanges
:: AnnotationCurrentVersionRanges
annotationCurrentVersionRanges =
AnnotationCurrentVersionRanges'
{ _aGbImageRange = Nothing
, _aContentVersion = Nothing
, _aImageCfiRange = Nothing
, _aGbTextRange = Nothing
, _aCfiRange = Nothing
}
aGbImageRange :: Lens' AnnotationCurrentVersionRanges (Maybe BooksAnnotationsRange)
aGbImageRange
= lens _aGbImageRange
(\ s a -> s{_aGbImageRange = a})
aContentVersion :: Lens' AnnotationCurrentVersionRanges (Maybe Text)
aContentVersion
= lens _aContentVersion
(\ s a -> s{_aContentVersion = a})
aImageCfiRange :: Lens' AnnotationCurrentVersionRanges (Maybe BooksAnnotationsRange)
aImageCfiRange
= lens _aImageCfiRange
(\ s a -> s{_aImageCfiRange = a})
aGbTextRange :: Lens' AnnotationCurrentVersionRanges (Maybe BooksAnnotationsRange)
aGbTextRange
= lens _aGbTextRange (\ s a -> s{_aGbTextRange = a})
aCfiRange :: Lens' AnnotationCurrentVersionRanges (Maybe BooksAnnotationsRange)
aCfiRange
= lens _aCfiRange (\ s a -> s{_aCfiRange = a})
instance FromJSON AnnotationCurrentVersionRanges
where
parseJSON
= withObject "AnnotationCurrentVersionRanges"
(\ o ->
AnnotationCurrentVersionRanges' <$>
(o .:? "gbImageRange") <*> (o .:? "contentVersion")
<*> (o .:? "imageCfiRange")
<*> (o .:? "gbTextRange")
<*> (o .:? "cfiRange"))
instance ToJSON AnnotationCurrentVersionRanges where
toJSON AnnotationCurrentVersionRanges'{..}
= object
(catMaybes
[("gbImageRange" .=) <$> _aGbImageRange,
("contentVersion" .=) <$> _aContentVersion,
("imageCfiRange" .=) <$> _aImageCfiRange,
("gbTextRange" .=) <$> _aGbTextRange,
("cfiRange" .=) <$> _aCfiRange])
data VolumeAccessInfoPdf = VolumeAccessInfoPdf'
{ _vaipAcsTokenLink :: !(Maybe Text)
, _vaipIsAvailable :: !(Maybe Bool)
, _vaipDownloadLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeAccessInfoPdf
:: VolumeAccessInfoPdf
volumeAccessInfoPdf =
VolumeAccessInfoPdf'
{ _vaipAcsTokenLink = Nothing
, _vaipIsAvailable = Nothing
, _vaipDownloadLink = Nothing
}
vaipAcsTokenLink :: Lens' VolumeAccessInfoPdf (Maybe Text)
vaipAcsTokenLink
= lens _vaipAcsTokenLink
(\ s a -> s{_vaipAcsTokenLink = a})
vaipIsAvailable :: Lens' VolumeAccessInfoPdf (Maybe Bool)
vaipIsAvailable
= lens _vaipIsAvailable
(\ s a -> s{_vaipIsAvailable = a})
vaipDownloadLink :: Lens' VolumeAccessInfoPdf (Maybe Text)
vaipDownloadLink
= lens _vaipDownloadLink
(\ s a -> s{_vaipDownloadLink = a})
instance FromJSON VolumeAccessInfoPdf where
parseJSON
= withObject "VolumeAccessInfoPdf"
(\ o ->
VolumeAccessInfoPdf' <$>
(o .:? "acsTokenLink") <*> (o .:? "isAvailable") <*>
(o .:? "downloadLink"))
instance ToJSON VolumeAccessInfoPdf where
toJSON VolumeAccessInfoPdf'{..}
= object
(catMaybes
[("acsTokenLink" .=) <$> _vaipAcsTokenLink,
("isAvailable" .=) <$> _vaipIsAvailable,
("downloadLink" .=) <$> _vaipDownloadLink])
data DictlayerDataDictWordsItemExamplesItemSource = DictlayerDataDictWordsItemExamplesItemSource'
{ _dddwieisURL :: !(Maybe Text)
, _dddwieisAttribution :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataDictWordsItemExamplesItemSource
:: DictlayerDataDictWordsItemExamplesItemSource
dictlayerDataDictWordsItemExamplesItemSource =
DictlayerDataDictWordsItemExamplesItemSource'
{ _dddwieisURL = Nothing
, _dddwieisAttribution = Nothing
}
dddwieisURL :: Lens' DictlayerDataDictWordsItemExamplesItemSource (Maybe Text)
dddwieisURL
= lens _dddwieisURL (\ s a -> s{_dddwieisURL = a})
dddwieisAttribution :: Lens' DictlayerDataDictWordsItemExamplesItemSource (Maybe Text)
dddwieisAttribution
= lens _dddwieisAttribution
(\ s a -> s{_dddwieisAttribution = a})
instance FromJSON
DictlayerDataDictWordsItemExamplesItemSource where
parseJSON
= withObject
"DictlayerDataDictWordsItemExamplesItemSource"
(\ o ->
DictlayerDataDictWordsItemExamplesItemSource' <$>
(o .:? "url") <*> (o .:? "attribution"))
instance ToJSON
DictlayerDataDictWordsItemExamplesItemSource where
toJSON
DictlayerDataDictWordsItemExamplesItemSource'{..}
= object
(catMaybes
[("url" .=) <$> _dddwieisURL,
("attribution" .=) <$> _dddwieisAttribution])
data VolumeAccessInfoEpub = VolumeAccessInfoEpub'
{ _vaieAcsTokenLink :: !(Maybe Text)
, _vaieIsAvailable :: !(Maybe Bool)
, _vaieDownloadLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeAccessInfoEpub
:: VolumeAccessInfoEpub
volumeAccessInfoEpub =
VolumeAccessInfoEpub'
{ _vaieAcsTokenLink = Nothing
, _vaieIsAvailable = Nothing
, _vaieDownloadLink = Nothing
}
vaieAcsTokenLink :: Lens' VolumeAccessInfoEpub (Maybe Text)
vaieAcsTokenLink
= lens _vaieAcsTokenLink
(\ s a -> s{_vaieAcsTokenLink = a})
vaieIsAvailable :: Lens' VolumeAccessInfoEpub (Maybe Bool)
vaieIsAvailable
= lens _vaieIsAvailable
(\ s a -> s{_vaieIsAvailable = a})
vaieDownloadLink :: Lens' VolumeAccessInfoEpub (Maybe Text)
vaieDownloadLink
= lens _vaieDownloadLink
(\ s a -> s{_vaieDownloadLink = a})
instance FromJSON VolumeAccessInfoEpub where
parseJSON
= withObject "VolumeAccessInfoEpub"
(\ o ->
VolumeAccessInfoEpub' <$>
(o .:? "acsTokenLink") <*> (o .:? "isAvailable") <*>
(o .:? "downloadLink"))
instance ToJSON VolumeAccessInfoEpub where
toJSON VolumeAccessInfoEpub'{..}
= object
(catMaybes
[("acsTokenLink" .=) <$> _vaieAcsTokenLink,
("isAvailable" .=) <$> _vaieIsAvailable,
("downloadLink" .=) <$> _vaieDownloadLink])
data ReadingPosition = ReadingPosition'
{ _rpEpubCfiPosition :: !(Maybe Text)
, _rpKind :: !Text
, _rpGbImagePosition :: !(Maybe Text)
, _rpPdfPosition :: !(Maybe Text)
, _rpVolumeId :: !(Maybe Text)
, _rpUpdated :: !(Maybe DateTime')
, _rpGbTextPosition :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
readingPosition
:: ReadingPosition
readingPosition =
ReadingPosition'
{ _rpEpubCfiPosition = Nothing
, _rpKind = "books#readingPosition"
, _rpGbImagePosition = Nothing
, _rpPdfPosition = Nothing
, _rpVolumeId = Nothing
, _rpUpdated = Nothing
, _rpGbTextPosition = Nothing
}
rpEpubCfiPosition :: Lens' ReadingPosition (Maybe Text)
rpEpubCfiPosition
= lens _rpEpubCfiPosition
(\ s a -> s{_rpEpubCfiPosition = a})
rpKind :: Lens' ReadingPosition Text
rpKind = lens _rpKind (\ s a -> s{_rpKind = a})
rpGbImagePosition :: Lens' ReadingPosition (Maybe Text)
rpGbImagePosition
= lens _rpGbImagePosition
(\ s a -> s{_rpGbImagePosition = a})
rpPdfPosition :: Lens' ReadingPosition (Maybe Text)
rpPdfPosition
= lens _rpPdfPosition
(\ s a -> s{_rpPdfPosition = a})
rpVolumeId :: Lens' ReadingPosition (Maybe Text)
rpVolumeId
= lens _rpVolumeId (\ s a -> s{_rpVolumeId = a})
rpUpdated :: Lens' ReadingPosition (Maybe UTCTime)
rpUpdated
= lens _rpUpdated (\ s a -> s{_rpUpdated = a}) .
mapping _DateTime
rpGbTextPosition :: Lens' ReadingPosition (Maybe Text)
rpGbTextPosition
= lens _rpGbTextPosition
(\ s a -> s{_rpGbTextPosition = a})
instance FromJSON ReadingPosition where
parseJSON
= withObject "ReadingPosition"
(\ o ->
ReadingPosition' <$>
(o .:? "epubCfiPosition") <*>
(o .:? "kind" .!= "books#readingPosition")
<*> (o .:? "gbImagePosition")
<*> (o .:? "pdfPosition")
<*> (o .:? "volumeId")
<*> (o .:? "updated")
<*> (o .:? "gbTextPosition"))
instance ToJSON ReadingPosition where
toJSON ReadingPosition'{..}
= object
(catMaybes
[("epubCfiPosition" .=) <$> _rpEpubCfiPosition,
Just ("kind" .= _rpKind),
("gbImagePosition" .=) <$> _rpGbImagePosition,
("pdfPosition" .=) <$> _rpPdfPosition,
("volumeId" .=) <$> _rpVolumeId,
("updated" .=) <$> _rpUpdated,
("gbTextPosition" .=) <$> _rpGbTextPosition])
data VolumeSaleInfoOffersItem = VolumeSaleInfoOffersItem'
{ _vsioiFinskyOfferType :: !(Maybe (Textual Int32))
, _vsioiRentalDuration :: !(Maybe VolumeSaleInfoOffersItemRentalDuration)
, _vsioiListPrice :: !(Maybe VolumeSaleInfoOffersItemListPrice)
, _vsioiRetailPrice :: !(Maybe VolumeSaleInfoOffersItemRetailPrice)
, _vsioiGiftable :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeSaleInfoOffersItem
:: VolumeSaleInfoOffersItem
volumeSaleInfoOffersItem =
VolumeSaleInfoOffersItem'
{ _vsioiFinskyOfferType = Nothing
, _vsioiRentalDuration = Nothing
, _vsioiListPrice = Nothing
, _vsioiRetailPrice = Nothing
, _vsioiGiftable = Nothing
}
vsioiFinskyOfferType :: Lens' VolumeSaleInfoOffersItem (Maybe Int32)
vsioiFinskyOfferType
= lens _vsioiFinskyOfferType
(\ s a -> s{_vsioiFinskyOfferType = a})
. mapping _Coerce
vsioiRentalDuration :: Lens' VolumeSaleInfoOffersItem (Maybe VolumeSaleInfoOffersItemRentalDuration)
vsioiRentalDuration
= lens _vsioiRentalDuration
(\ s a -> s{_vsioiRentalDuration = a})
vsioiListPrice :: Lens' VolumeSaleInfoOffersItem (Maybe VolumeSaleInfoOffersItemListPrice)
vsioiListPrice
= lens _vsioiListPrice
(\ s a -> s{_vsioiListPrice = a})
vsioiRetailPrice :: Lens' VolumeSaleInfoOffersItem (Maybe VolumeSaleInfoOffersItemRetailPrice)
vsioiRetailPrice
= lens _vsioiRetailPrice
(\ s a -> s{_vsioiRetailPrice = a})
vsioiGiftable :: Lens' VolumeSaleInfoOffersItem (Maybe Bool)
vsioiGiftable
= lens _vsioiGiftable
(\ s a -> s{_vsioiGiftable = a})
instance FromJSON VolumeSaleInfoOffersItem where
parseJSON
= withObject "VolumeSaleInfoOffersItem"
(\ o ->
VolumeSaleInfoOffersItem' <$>
(o .:? "finskyOfferType") <*>
(o .:? "rentalDuration")
<*> (o .:? "listPrice")
<*> (o .:? "retailPrice")
<*> (o .:? "giftable"))
instance ToJSON VolumeSaleInfoOffersItem where
toJSON VolumeSaleInfoOffersItem'{..}
= object
(catMaybes
[("finskyOfferType" .=) <$> _vsioiFinskyOfferType,
("rentalDuration" .=) <$> _vsioiRentalDuration,
("listPrice" .=) <$> _vsioiListPrice,
("retailPrice" .=) <$> _vsioiRetailPrice,
("giftable" .=) <$> _vsioiGiftable])
data DictlayerDataDict = DictlayerDataDict'
{ _dddSource :: !(Maybe DictlayerDataDictSource)
, _dddWords :: !(Maybe [DictlayerDataDictWordsItem])
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataDict
:: DictlayerDataDict
dictlayerDataDict =
DictlayerDataDict'
{ _dddSource = Nothing
, _dddWords = Nothing
}
dddSource :: Lens' DictlayerDataDict (Maybe DictlayerDataDictSource)
dddSource
= lens _dddSource (\ s a -> s{_dddSource = a})
dddWords :: Lens' DictlayerDataDict [DictlayerDataDictWordsItem]
dddWords
= lens _dddWords (\ s a -> s{_dddWords = a}) .
_Default
. _Coerce
instance FromJSON DictlayerDataDict where
parseJSON
= withObject "DictlayerDataDict"
(\ o ->
DictlayerDataDict' <$>
(o .:? "source") <*> (o .:? "words" .!= mempty))
instance ToJSON DictlayerDataDict where
toJSON DictlayerDataDict'{..}
= object
(catMaybes
[("source" .=) <$> _dddSource,
("words" .=) <$> _dddWords])
data DictlayerDataDictWordsItemSensesItem = DictlayerDataDictWordsItemSensesItem'
{ _dddwisiPronunciationURL :: !(Maybe Text)
, _dddwisiConjugations :: !(Maybe [DictlayerDataDictWordsItemSensesItemConjugationsItem])
, _dddwisiPronunciation :: !(Maybe Text)
, _dddwisiSynonyms :: !(Maybe [DictlayerDataDictWordsItemSensesItemSynonymsItem])
, _dddwisiSource :: !(Maybe DictlayerDataDictWordsItemSensesItemSource)
, _dddwisiPartOfSpeech :: !(Maybe Text)
, _dddwisiDefinitions :: !(Maybe [DictlayerDataDictWordsItemSensesItemDefinitionsItem])
, _dddwisiSyllabification :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataDictWordsItemSensesItem
:: DictlayerDataDictWordsItemSensesItem
dictlayerDataDictWordsItemSensesItem =
DictlayerDataDictWordsItemSensesItem'
{ _dddwisiPronunciationURL = Nothing
, _dddwisiConjugations = Nothing
, _dddwisiPronunciation = Nothing
, _dddwisiSynonyms = Nothing
, _dddwisiSource = Nothing
, _dddwisiPartOfSpeech = Nothing
, _dddwisiDefinitions = Nothing
, _dddwisiSyllabification = Nothing
}
dddwisiPronunciationURL :: Lens' DictlayerDataDictWordsItemSensesItem (Maybe Text)
dddwisiPronunciationURL
= lens _dddwisiPronunciationURL
(\ s a -> s{_dddwisiPronunciationURL = a})
dddwisiConjugations :: Lens' DictlayerDataDictWordsItemSensesItem [DictlayerDataDictWordsItemSensesItemConjugationsItem]
dddwisiConjugations
= lens _dddwisiConjugations
(\ s a -> s{_dddwisiConjugations = a})
. _Default
. _Coerce
dddwisiPronunciation :: Lens' DictlayerDataDictWordsItemSensesItem (Maybe Text)
dddwisiPronunciation
= lens _dddwisiPronunciation
(\ s a -> s{_dddwisiPronunciation = a})
dddwisiSynonyms :: Lens' DictlayerDataDictWordsItemSensesItem [DictlayerDataDictWordsItemSensesItemSynonymsItem]
dddwisiSynonyms
= lens _dddwisiSynonyms
(\ s a -> s{_dddwisiSynonyms = a})
. _Default
. _Coerce
dddwisiSource :: Lens' DictlayerDataDictWordsItemSensesItem (Maybe DictlayerDataDictWordsItemSensesItemSource)
dddwisiSource
= lens _dddwisiSource
(\ s a -> s{_dddwisiSource = a})
dddwisiPartOfSpeech :: Lens' DictlayerDataDictWordsItemSensesItem (Maybe Text)
dddwisiPartOfSpeech
= lens _dddwisiPartOfSpeech
(\ s a -> s{_dddwisiPartOfSpeech = a})
dddwisiDefinitions :: Lens' DictlayerDataDictWordsItemSensesItem [DictlayerDataDictWordsItemSensesItemDefinitionsItem]
dddwisiDefinitions
= lens _dddwisiDefinitions
(\ s a -> s{_dddwisiDefinitions = a})
. _Default
. _Coerce
dddwisiSyllabification :: Lens' DictlayerDataDictWordsItemSensesItem (Maybe Text)
dddwisiSyllabification
= lens _dddwisiSyllabification
(\ s a -> s{_dddwisiSyllabification = a})
instance FromJSON
DictlayerDataDictWordsItemSensesItem where
parseJSON
= withObject "DictlayerDataDictWordsItemSensesItem"
(\ o ->
DictlayerDataDictWordsItemSensesItem' <$>
(o .:? "pronunciationUrl") <*>
(o .:? "conjugations" .!= mempty)
<*> (o .:? "pronunciation")
<*> (o .:? "synonyms" .!= mempty)
<*> (o .:? "source")
<*> (o .:? "partOfSpeech")
<*> (o .:? "definitions" .!= mempty)
<*> (o .:? "syllabification"))
instance ToJSON DictlayerDataDictWordsItemSensesItem
where
toJSON DictlayerDataDictWordsItemSensesItem'{..}
= object
(catMaybes
[("pronunciationUrl" .=) <$>
_dddwisiPronunciationURL,
("conjugations" .=) <$> _dddwisiConjugations,
("pronunciation" .=) <$> _dddwisiPronunciation,
("synonyms" .=) <$> _dddwisiSynonyms,
("source" .=) <$> _dddwisiSource,
("partOfSpeech" .=) <$> _dddwisiPartOfSpeech,
("definitions" .=) <$> _dddwisiDefinitions,
("syllabification" .=) <$> _dddwisiSyllabification])
newtype VolumeRecommendedInfo = VolumeRecommendedInfo'
{ _vriExplanation :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
volumeRecommendedInfo
:: VolumeRecommendedInfo
volumeRecommendedInfo =
VolumeRecommendedInfo'
{ _vriExplanation = Nothing
}
vriExplanation :: Lens' VolumeRecommendedInfo (Maybe Text)
vriExplanation
= lens _vriExplanation
(\ s a -> s{_vriExplanation = a})
instance FromJSON VolumeRecommendedInfo where
parseJSON
= withObject "VolumeRecommendedInfo"
(\ o ->
VolumeRecommendedInfo' <$> (o .:? "explanation"))
instance ToJSON VolumeRecommendedInfo where
toJSON VolumeRecommendedInfo'{..}
= object
(catMaybes [("explanation" .=) <$> _vriExplanation])
data Offers = Offers'
{ _oKind :: !Text
, _oItems :: !(Maybe [OffersItemsItem])
} deriving (Eq,Show,Data,Typeable,Generic)
offers
:: Offers
offers =
Offers'
{ _oKind = "promooffer#offers"
, _oItems = Nothing
}
oKind :: Lens' Offers Text
oKind = lens _oKind (\ s a -> s{_oKind = a})
oItems :: Lens' Offers [OffersItemsItem]
oItems
= lens _oItems (\ s a -> s{_oItems = a}) . _Default .
_Coerce
instance FromJSON Offers where
parseJSON
= withObject "Offers"
(\ o ->
Offers' <$>
(o .:? "kind" .!= "promooffer#offers") <*>
(o .:? "items" .!= mempty))
instance ToJSON Offers where
toJSON Offers'{..}
= object
(catMaybes
[Just ("kind" .= _oKind), ("items" .=) <$> _oItems])
data Discoveryclusters = Discoveryclusters'
{ _dKind :: !Text
, _dTotalClusters :: !(Maybe (Textual Int32))
, _dClusters :: !(Maybe [DiscoveryclustersClustersItem])
} deriving (Eq,Show,Data,Typeable,Generic)
discoveryclusters
:: Discoveryclusters
discoveryclusters =
Discoveryclusters'
{ _dKind = "books#discovery#clusters"
, _dTotalClusters = Nothing
, _dClusters = Nothing
}
dKind :: Lens' Discoveryclusters Text
dKind = lens _dKind (\ s a -> s{_dKind = a})
dTotalClusters :: Lens' Discoveryclusters (Maybe Int32)
dTotalClusters
= lens _dTotalClusters
(\ s a -> s{_dTotalClusters = a})
. mapping _Coerce
dClusters :: Lens' Discoveryclusters [DiscoveryclustersClustersItem]
dClusters
= lens _dClusters (\ s a -> s{_dClusters = a}) .
_Default
. _Coerce
instance FromJSON Discoveryclusters where
parseJSON
= withObject "Discoveryclusters"
(\ o ->
Discoveryclusters' <$>
(o .:? "kind" .!= "books#discovery#clusters") <*>
(o .:? "totalClusters")
<*> (o .:? "clusters" .!= mempty))
instance ToJSON Discoveryclusters where
toJSON Discoveryclusters'{..}
= object
(catMaybes
[Just ("kind" .= _dKind),
("totalClusters" .=) <$> _dTotalClusters,
("clusters" .=) <$> _dClusters])
data VolumeseriesInfoVolumeSeriesItem = VolumeseriesInfoVolumeSeriesItem'
{ _vivsiSeriesId :: !(Maybe Text)
, _vivsiSeriesBookType :: !(Maybe Text)
, _vivsiOrderNumber :: !(Maybe (Textual Int32))
, _vivsiIssue :: !(Maybe [VolumeseriesInfoVolumeSeriesItemIssueItem])
} deriving (Eq,Show,Data,Typeable,Generic)
volumeseriesInfoVolumeSeriesItem
:: VolumeseriesInfoVolumeSeriesItem
volumeseriesInfoVolumeSeriesItem =
VolumeseriesInfoVolumeSeriesItem'
{ _vivsiSeriesId = Nothing
, _vivsiSeriesBookType = Nothing
, _vivsiOrderNumber = Nothing
, _vivsiIssue = Nothing
}
vivsiSeriesId :: Lens' VolumeseriesInfoVolumeSeriesItem (Maybe Text)
vivsiSeriesId
= lens _vivsiSeriesId
(\ s a -> s{_vivsiSeriesId = a})
vivsiSeriesBookType :: Lens' VolumeseriesInfoVolumeSeriesItem (Maybe Text)
vivsiSeriesBookType
= lens _vivsiSeriesBookType
(\ s a -> s{_vivsiSeriesBookType = a})
vivsiOrderNumber :: Lens' VolumeseriesInfoVolumeSeriesItem (Maybe Int32)
vivsiOrderNumber
= lens _vivsiOrderNumber
(\ s a -> s{_vivsiOrderNumber = a})
. mapping _Coerce
vivsiIssue :: Lens' VolumeseriesInfoVolumeSeriesItem [VolumeseriesInfoVolumeSeriesItemIssueItem]
vivsiIssue
= lens _vivsiIssue (\ s a -> s{_vivsiIssue = a}) .
_Default
. _Coerce
instance FromJSON VolumeseriesInfoVolumeSeriesItem
where
parseJSON
= withObject "VolumeseriesInfoVolumeSeriesItem"
(\ o ->
VolumeseriesInfoVolumeSeriesItem' <$>
(o .:? "seriesId") <*> (o .:? "seriesBookType") <*>
(o .:? "orderNumber")
<*> (o .:? "issue" .!= mempty))
instance ToJSON VolumeseriesInfoVolumeSeriesItem
where
toJSON VolumeseriesInfoVolumeSeriesItem'{..}
= object
(catMaybes
[("seriesId" .=) <$> _vivsiSeriesId,
("seriesBookType" .=) <$> _vivsiSeriesBookType,
("orderNumber" .=) <$> _vivsiOrderNumber,
("issue" .=) <$> _vivsiIssue])
data UserSettingsNotesExport = UserSettingsNotesExport'
{ _usneFolderName :: !(Maybe Text)
, _usneIsEnabled :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
userSettingsNotesExport
:: UserSettingsNotesExport
userSettingsNotesExport =
UserSettingsNotesExport'
{ _usneFolderName = Nothing
, _usneIsEnabled = Nothing
}
usneFolderName :: Lens' UserSettingsNotesExport (Maybe Text)
usneFolderName
= lens _usneFolderName
(\ s a -> s{_usneFolderName = a})
usneIsEnabled :: Lens' UserSettingsNotesExport (Maybe Bool)
usneIsEnabled
= lens _usneIsEnabled
(\ s a -> s{_usneIsEnabled = a})
instance FromJSON UserSettingsNotesExport where
parseJSON
= withObject "UserSettingsNotesExport"
(\ o ->
UserSettingsNotesExport' <$>
(o .:? "folderName") <*> (o .:? "isEnabled"))
instance ToJSON UserSettingsNotesExport where
toJSON UserSettingsNotesExport'{..}
= object
(catMaybes
[("folderName" .=) <$> _usneFolderName,
("isEnabled" .=) <$> _usneIsEnabled])
data ConcurrentAccessRestriction = ConcurrentAccessRestriction'
{ _carMaxConcurrentDevices :: !(Maybe (Textual Int32))
, _carSignature :: !(Maybe Text)
, _carTimeWindowSeconds :: !(Maybe (Textual Int32))
, _carKind :: !Text
, _carReasonCode :: !(Maybe Text)
, _carVolumeId :: !(Maybe Text)
, _carRestricted :: !(Maybe Bool)
, _carSource :: !(Maybe Text)
, _carDeviceAllowed :: !(Maybe Bool)
, _carMessage :: !(Maybe Text)
, _carNonce :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
concurrentAccessRestriction
:: ConcurrentAccessRestriction
concurrentAccessRestriction =
ConcurrentAccessRestriction'
{ _carMaxConcurrentDevices = Nothing
, _carSignature = Nothing
, _carTimeWindowSeconds = Nothing
, _carKind = "books#concurrentAccessRestriction"
, _carReasonCode = Nothing
, _carVolumeId = Nothing
, _carRestricted = Nothing
, _carSource = Nothing
, _carDeviceAllowed = Nothing
, _carMessage = Nothing
, _carNonce = Nothing
}
carMaxConcurrentDevices :: Lens' ConcurrentAccessRestriction (Maybe Int32)
carMaxConcurrentDevices
= lens _carMaxConcurrentDevices
(\ s a -> s{_carMaxConcurrentDevices = a})
. mapping _Coerce
carSignature :: Lens' ConcurrentAccessRestriction (Maybe Text)
carSignature
= lens _carSignature (\ s a -> s{_carSignature = a})
carTimeWindowSeconds :: Lens' ConcurrentAccessRestriction (Maybe Int32)
carTimeWindowSeconds
= lens _carTimeWindowSeconds
(\ s a -> s{_carTimeWindowSeconds = a})
. mapping _Coerce
carKind :: Lens' ConcurrentAccessRestriction Text
carKind = lens _carKind (\ s a -> s{_carKind = a})
carReasonCode :: Lens' ConcurrentAccessRestriction (Maybe Text)
carReasonCode
= lens _carReasonCode
(\ s a -> s{_carReasonCode = a})
carVolumeId :: Lens' ConcurrentAccessRestriction (Maybe Text)
carVolumeId
= lens _carVolumeId (\ s a -> s{_carVolumeId = a})
carRestricted :: Lens' ConcurrentAccessRestriction (Maybe Bool)
carRestricted
= lens _carRestricted
(\ s a -> s{_carRestricted = a})
carSource :: Lens' ConcurrentAccessRestriction (Maybe Text)
carSource
= lens _carSource (\ s a -> s{_carSource = a})
carDeviceAllowed :: Lens' ConcurrentAccessRestriction (Maybe Bool)
carDeviceAllowed
= lens _carDeviceAllowed
(\ s a -> s{_carDeviceAllowed = a})
carMessage :: Lens' ConcurrentAccessRestriction (Maybe Text)
carMessage
= lens _carMessage (\ s a -> s{_carMessage = a})
carNonce :: Lens' ConcurrentAccessRestriction (Maybe Text)
carNonce = lens _carNonce (\ s a -> s{_carNonce = a})
instance FromJSON ConcurrentAccessRestriction where
parseJSON
= withObject "ConcurrentAccessRestriction"
(\ o ->
ConcurrentAccessRestriction' <$>
(o .:? "maxConcurrentDevices") <*>
(o .:? "signature")
<*> (o .:? "timeWindowSeconds")
<*>
(o .:? "kind" .!=
"books#concurrentAccessRestriction")
<*> (o .:? "reasonCode")
<*> (o .:? "volumeId")
<*> (o .:? "restricted")
<*> (o .:? "source")
<*> (o .:? "deviceAllowed")
<*> (o .:? "message")
<*> (o .:? "nonce"))
instance ToJSON ConcurrentAccessRestriction where
toJSON ConcurrentAccessRestriction'{..}
= object
(catMaybes
[("maxConcurrentDevices" .=) <$>
_carMaxConcurrentDevices,
("signature" .=) <$> _carSignature,
("timeWindowSeconds" .=) <$> _carTimeWindowSeconds,
Just ("kind" .= _carKind),
("reasonCode" .=) <$> _carReasonCode,
("volumeId" .=) <$> _carVolumeId,
("restricted" .=) <$> _carRestricted,
("source" .=) <$> _carSource,
("deviceAllowed" .=) <$> _carDeviceAllowed,
("message" .=) <$> _carMessage,
("nonce" .=) <$> _carNonce])
data Volumes = Volumes'
{ _v1TotalItems :: !(Maybe (Textual Int32))
, _v1Kind :: !Text
, _v1Items :: !(Maybe [Volume])
} deriving (Eq,Show,Data,Typeable,Generic)
volumes
:: Volumes
volumes =
Volumes'
{ _v1TotalItems = Nothing
, _v1Kind = "books#volumes"
, _v1Items = Nothing
}
v1TotalItems :: Lens' Volumes (Maybe Int32)
v1TotalItems
= lens _v1TotalItems (\ s a -> s{_v1TotalItems = a})
. mapping _Coerce
v1Kind :: Lens' Volumes Text
v1Kind = lens _v1Kind (\ s a -> s{_v1Kind = a})
v1Items :: Lens' Volumes [Volume]
v1Items
= lens _v1Items (\ s a -> s{_v1Items = a}) . _Default
. _Coerce
instance FromJSON Volumes where
parseJSON
= withObject "Volumes"
(\ o ->
Volumes' <$>
(o .:? "totalItems") <*>
(o .:? "kind" .!= "books#volumes")
<*> (o .:? "items" .!= mempty))
instance ToJSON Volumes where
toJSON Volumes'{..}
= object
(catMaybes
[("totalItems" .=) <$> _v1TotalItems,
Just ("kind" .= _v1Kind), ("items" .=) <$> _v1Items])
newtype UserSettingsNotificationMatchMyInterests = UserSettingsNotificationMatchMyInterests'
{ _usnmmiOptedState :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
userSettingsNotificationMatchMyInterests
:: UserSettingsNotificationMatchMyInterests
userSettingsNotificationMatchMyInterests =
UserSettingsNotificationMatchMyInterests'
{ _usnmmiOptedState = Nothing
}
usnmmiOptedState :: Lens' UserSettingsNotificationMatchMyInterests (Maybe Text)
usnmmiOptedState
= lens _usnmmiOptedState
(\ s a -> s{_usnmmiOptedState = a})
instance FromJSON
UserSettingsNotificationMatchMyInterests where
parseJSON
= withObject
"UserSettingsNotificationMatchMyInterests"
(\ o ->
UserSettingsNotificationMatchMyInterests' <$>
(o .:? "opted_state"))
instance ToJSON
UserSettingsNotificationMatchMyInterests where
toJSON UserSettingsNotificationMatchMyInterests'{..}
= object
(catMaybes
[("opted_state" .=) <$> _usnmmiOptedState])
data Bookshelves = Bookshelves'
{ _booKind :: !Text
, _booItems :: !(Maybe [Bookshelf])
} deriving (Eq,Show,Data,Typeable,Generic)
bookshelves
:: Bookshelves
bookshelves =
Bookshelves'
{ _booKind = "books#bookshelves"
, _booItems = Nothing
}
booKind :: Lens' Bookshelves Text
booKind = lens _booKind (\ s a -> s{_booKind = a})
booItems :: Lens' Bookshelves [Bookshelf]
booItems
= lens _booItems (\ s a -> s{_booItems = a}) .
_Default
. _Coerce
instance FromJSON Bookshelves where
parseJSON
= withObject "Bookshelves"
(\ o ->
Bookshelves' <$>
(o .:? "kind" .!= "books#bookshelves") <*>
(o .:? "items" .!= mempty))
instance ToJSON Bookshelves where
toJSON Bookshelves'{..}
= object
(catMaybes
[Just ("kind" .= _booKind),
("items" .=) <$> _booItems])
data DictlayerDataDictSource = DictlayerDataDictSource'
{ _dddsURL :: !(Maybe Text)
, _dddsAttribution :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataDictSource
:: DictlayerDataDictSource
dictlayerDataDictSource =
DictlayerDataDictSource'
{ _dddsURL = Nothing
, _dddsAttribution = Nothing
}
dddsURL :: Lens' DictlayerDataDictSource (Maybe Text)
dddsURL = lens _dddsURL (\ s a -> s{_dddsURL = a})
dddsAttribution :: Lens' DictlayerDataDictSource (Maybe Text)
dddsAttribution
= lens _dddsAttribution
(\ s a -> s{_dddsAttribution = a})
instance FromJSON DictlayerDataDictSource where
parseJSON
= withObject "DictlayerDataDictSource"
(\ o ->
DictlayerDataDictSource' <$>
(o .:? "url") <*> (o .:? "attribution"))
instance ToJSON DictlayerDataDictSource where
toJSON DictlayerDataDictSource'{..}
= object
(catMaybes
[("url" .=) <$> _dddsURL,
("attribution" .=) <$> _dddsAttribution])
data DownloadAccesses = DownloadAccesses'
{ _daKind :: !Text
, _daDownloadAccessList :: !(Maybe [DownloadAccessRestriction])
} deriving (Eq,Show,Data,Typeable,Generic)
downloadAccesses
:: DownloadAccesses
downloadAccesses =
DownloadAccesses'
{ _daKind = "books#downloadAccesses"
, _daDownloadAccessList = Nothing
}
daKind :: Lens' DownloadAccesses Text
daKind = lens _daKind (\ s a -> s{_daKind = a})
daDownloadAccessList :: Lens' DownloadAccesses [DownloadAccessRestriction]
daDownloadAccessList
= lens _daDownloadAccessList
(\ s a -> s{_daDownloadAccessList = a})
. _Default
. _Coerce
instance FromJSON DownloadAccesses where
parseJSON
= withObject "DownloadAccesses"
(\ o ->
DownloadAccesses' <$>
(o .:? "kind" .!= "books#downloadAccesses") <*>
(o .:? "downloadAccessList" .!= mempty))
instance ToJSON DownloadAccesses where
toJSON DownloadAccesses'{..}
= object
(catMaybes
[Just ("kind" .= _daKind),
("downloadAccessList" .=) <$> _daDownloadAccessList])
data GeolayerDataGeoViewportHi = GeolayerDataGeoViewportHi'
{ _gdgvhLatitude :: !(Maybe (Textual Double))
, _gdgvhLongitude :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
geolayerDataGeoViewportHi
:: GeolayerDataGeoViewportHi
geolayerDataGeoViewportHi =
GeolayerDataGeoViewportHi'
{ _gdgvhLatitude = Nothing
, _gdgvhLongitude = Nothing
}
gdgvhLatitude :: Lens' GeolayerDataGeoViewportHi (Maybe Double)
gdgvhLatitude
= lens _gdgvhLatitude
(\ s a -> s{_gdgvhLatitude = a})
. mapping _Coerce
gdgvhLongitude :: Lens' GeolayerDataGeoViewportHi (Maybe Double)
gdgvhLongitude
= lens _gdgvhLongitude
(\ s a -> s{_gdgvhLongitude = a})
. mapping _Coerce
instance FromJSON GeolayerDataGeoViewportHi where
parseJSON
= withObject "GeolayerDataGeoViewportHi"
(\ o ->
GeolayerDataGeoViewportHi' <$>
(o .:? "latitude") <*> (o .:? "longitude"))
instance ToJSON GeolayerDataGeoViewportHi where
toJSON GeolayerDataGeoViewportHi'{..}
= object
(catMaybes
[("latitude" .=) <$> _gdgvhLatitude,
("longitude" .=) <$> _gdgvhLongitude])
data VolumeVolumeInfo = VolumeVolumeInfo'
{ _vviImageLinks :: !(Maybe VolumeVolumeInfoImageLinks)
, _vviPanelizationSummary :: !(Maybe VolumeVolumeInfoPanelizationSummary)
, _vviAverageRating :: !(Maybe (Textual Double))
, _vviRatingsCount :: !(Maybe (Textual Int32))
, _vviCanonicalVolumeLink :: !(Maybe Text)
, _vviReadingModes :: !(Maybe JSONValue)
, _vviIndustryIdentifiers :: !(Maybe [VolumeVolumeInfoIndustryIdentifiersItem])
, _vviSeriesInfo :: !(Maybe VolumeseriesInfo)
, _vviPrintedPageCount :: !(Maybe (Textual Int32))
, _vviMainCategory :: !(Maybe Text)
, _vviContentVersion :: !(Maybe Text)
, _vviSamplePageCount :: !(Maybe (Textual Int32))
, _vviCategories :: !(Maybe [Text])
, _vviAuthors :: !(Maybe [Text])
, _vviComicsContent :: !(Maybe Bool)
, _vviAllowAnonLogging :: !(Maybe Bool)
, _vviSubtitle :: !(Maybe Text)
, _vviPublishedDate :: !(Maybe Text)
, _vviMaturityRating :: !(Maybe Text)
, _vviPreviewLink :: !(Maybe Text)
, _vviLanguage :: !(Maybe Text)
, _vviTitle :: !(Maybe Text)
, _vviPageCount :: !(Maybe (Textual Int32))
, _vviDimensions :: !(Maybe VolumeVolumeInfoDimensions)
, _vviInfoLink :: !(Maybe Text)
, _vviPublisher :: !(Maybe Text)
, _vviDescription :: !(Maybe Text)
, _vviPrintType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeVolumeInfo
:: VolumeVolumeInfo
volumeVolumeInfo =
VolumeVolumeInfo'
{ _vviImageLinks = Nothing
, _vviPanelizationSummary = Nothing
, _vviAverageRating = Nothing
, _vviRatingsCount = Nothing
, _vviCanonicalVolumeLink = Nothing
, _vviReadingModes = Nothing
, _vviIndustryIdentifiers = Nothing
, _vviSeriesInfo = Nothing
, _vviPrintedPageCount = Nothing
, _vviMainCategory = Nothing
, _vviContentVersion = Nothing
, _vviSamplePageCount = Nothing
, _vviCategories = Nothing
, _vviAuthors = Nothing
, _vviComicsContent = Nothing
, _vviAllowAnonLogging = Nothing
, _vviSubtitle = Nothing
, _vviPublishedDate = Nothing
, _vviMaturityRating = Nothing
, _vviPreviewLink = Nothing
, _vviLanguage = Nothing
, _vviTitle = Nothing
, _vviPageCount = Nothing
, _vviDimensions = Nothing
, _vviInfoLink = Nothing
, _vviPublisher = Nothing
, _vviDescription = Nothing
, _vviPrintType = Nothing
}
vviImageLinks :: Lens' VolumeVolumeInfo (Maybe VolumeVolumeInfoImageLinks)
vviImageLinks
= lens _vviImageLinks
(\ s a -> s{_vviImageLinks = a})
vviPanelizationSummary :: Lens' VolumeVolumeInfo (Maybe VolumeVolumeInfoPanelizationSummary)
vviPanelizationSummary
= lens _vviPanelizationSummary
(\ s a -> s{_vviPanelizationSummary = a})
vviAverageRating :: Lens' VolumeVolumeInfo (Maybe Double)
vviAverageRating
= lens _vviAverageRating
(\ s a -> s{_vviAverageRating = a})
. mapping _Coerce
vviRatingsCount :: Lens' VolumeVolumeInfo (Maybe Int32)
vviRatingsCount
= lens _vviRatingsCount
(\ s a -> s{_vviRatingsCount = a})
. mapping _Coerce
vviCanonicalVolumeLink :: Lens' VolumeVolumeInfo (Maybe Text)
vviCanonicalVolumeLink
= lens _vviCanonicalVolumeLink
(\ s a -> s{_vviCanonicalVolumeLink = a})
vviReadingModes :: Lens' VolumeVolumeInfo (Maybe JSONValue)
vviReadingModes
= lens _vviReadingModes
(\ s a -> s{_vviReadingModes = a})
vviIndustryIdentifiers :: Lens' VolumeVolumeInfo [VolumeVolumeInfoIndustryIdentifiersItem]
vviIndustryIdentifiers
= lens _vviIndustryIdentifiers
(\ s a -> s{_vviIndustryIdentifiers = a})
. _Default
. _Coerce
vviSeriesInfo :: Lens' VolumeVolumeInfo (Maybe VolumeseriesInfo)
vviSeriesInfo
= lens _vviSeriesInfo
(\ s a -> s{_vviSeriesInfo = a})
vviPrintedPageCount :: Lens' VolumeVolumeInfo (Maybe Int32)
vviPrintedPageCount
= lens _vviPrintedPageCount
(\ s a -> s{_vviPrintedPageCount = a})
. mapping _Coerce
vviMainCategory :: Lens' VolumeVolumeInfo (Maybe Text)
vviMainCategory
= lens _vviMainCategory
(\ s a -> s{_vviMainCategory = a})
vviContentVersion :: Lens' VolumeVolumeInfo (Maybe Text)
vviContentVersion
= lens _vviContentVersion
(\ s a -> s{_vviContentVersion = a})
vviSamplePageCount :: Lens' VolumeVolumeInfo (Maybe Int32)
vviSamplePageCount
= lens _vviSamplePageCount
(\ s a -> s{_vviSamplePageCount = a})
. mapping _Coerce
vviCategories :: Lens' VolumeVolumeInfo [Text]
vviCategories
= lens _vviCategories
(\ s a -> s{_vviCategories = a})
. _Default
. _Coerce
vviAuthors :: Lens' VolumeVolumeInfo [Text]
vviAuthors
= lens _vviAuthors (\ s a -> s{_vviAuthors = a}) .
_Default
. _Coerce
vviComicsContent :: Lens' VolumeVolumeInfo (Maybe Bool)
vviComicsContent
= lens _vviComicsContent
(\ s a -> s{_vviComicsContent = a})
vviAllowAnonLogging :: Lens' VolumeVolumeInfo (Maybe Bool)
vviAllowAnonLogging
= lens _vviAllowAnonLogging
(\ s a -> s{_vviAllowAnonLogging = a})
vviSubtitle :: Lens' VolumeVolumeInfo (Maybe Text)
vviSubtitle
= lens _vviSubtitle (\ s a -> s{_vviSubtitle = a})
vviPublishedDate :: Lens' VolumeVolumeInfo (Maybe Text)
vviPublishedDate
= lens _vviPublishedDate
(\ s a -> s{_vviPublishedDate = a})
vviMaturityRating :: Lens' VolumeVolumeInfo (Maybe Text)
vviMaturityRating
= lens _vviMaturityRating
(\ s a -> s{_vviMaturityRating = a})
vviPreviewLink :: Lens' VolumeVolumeInfo (Maybe Text)
vviPreviewLink
= lens _vviPreviewLink
(\ s a -> s{_vviPreviewLink = a})
vviLanguage :: Lens' VolumeVolumeInfo (Maybe Text)
vviLanguage
= lens _vviLanguage (\ s a -> s{_vviLanguage = a})
vviTitle :: Lens' VolumeVolumeInfo (Maybe Text)
vviTitle = lens _vviTitle (\ s a -> s{_vviTitle = a})
vviPageCount :: Lens' VolumeVolumeInfo (Maybe Int32)
vviPageCount
= lens _vviPageCount (\ s a -> s{_vviPageCount = a})
. mapping _Coerce
vviDimensions :: Lens' VolumeVolumeInfo (Maybe VolumeVolumeInfoDimensions)
vviDimensions
= lens _vviDimensions
(\ s a -> s{_vviDimensions = a})
vviInfoLink :: Lens' VolumeVolumeInfo (Maybe Text)
vviInfoLink
= lens _vviInfoLink (\ s a -> s{_vviInfoLink = a})
vviPublisher :: Lens' VolumeVolumeInfo (Maybe Text)
vviPublisher
= lens _vviPublisher (\ s a -> s{_vviPublisher = a})
vviDescription :: Lens' VolumeVolumeInfo (Maybe Text)
vviDescription
= lens _vviDescription
(\ s a -> s{_vviDescription = a})
vviPrintType :: Lens' VolumeVolumeInfo (Maybe Text)
vviPrintType
= lens _vviPrintType (\ s a -> s{_vviPrintType = a})
instance FromJSON VolumeVolumeInfo where
parseJSON
= withObject "VolumeVolumeInfo"
(\ o ->
VolumeVolumeInfo' <$>
(o .:? "imageLinks") <*>
(o .:? "panelizationSummary")
<*> (o .:? "averageRating")
<*> (o .:? "ratingsCount")
<*> (o .:? "canonicalVolumeLink")
<*> (o .:? "readingModes")
<*> (o .:? "industryIdentifiers" .!= mempty)
<*> (o .:? "seriesInfo")
<*> (o .:? "printedPageCount")
<*> (o .:? "mainCategory")
<*> (o .:? "contentVersion")
<*> (o .:? "samplePageCount")
<*> (o .:? "categories" .!= mempty)
<*> (o .:? "authors" .!= mempty)
<*> (o .:? "comicsContent")
<*> (o .:? "allowAnonLogging")
<*> (o .:? "subtitle")
<*> (o .:? "publishedDate")
<*> (o .:? "maturityRating")
<*> (o .:? "previewLink")
<*> (o .:? "language")
<*> (o .:? "title")
<*> (o .:? "pageCount")
<*> (o .:? "dimensions")
<*> (o .:? "infoLink")
<*> (o .:? "publisher")
<*> (o .:? "description")
<*> (o .:? "printType"))
instance ToJSON VolumeVolumeInfo where
toJSON VolumeVolumeInfo'{..}
= object
(catMaybes
[("imageLinks" .=) <$> _vviImageLinks,
("panelizationSummary" .=) <$>
_vviPanelizationSummary,
("averageRating" .=) <$> _vviAverageRating,
("ratingsCount" .=) <$> _vviRatingsCount,
("canonicalVolumeLink" .=) <$>
_vviCanonicalVolumeLink,
("readingModes" .=) <$> _vviReadingModes,
("industryIdentifiers" .=) <$>
_vviIndustryIdentifiers,
("seriesInfo" .=) <$> _vviSeriesInfo,
("printedPageCount" .=) <$> _vviPrintedPageCount,
("mainCategory" .=) <$> _vviMainCategory,
("contentVersion" .=) <$> _vviContentVersion,
("samplePageCount" .=) <$> _vviSamplePageCount,
("categories" .=) <$> _vviCategories,
("authors" .=) <$> _vviAuthors,
("comicsContent" .=) <$> _vviComicsContent,
("allowAnonLogging" .=) <$> _vviAllowAnonLogging,
("subtitle" .=) <$> _vviSubtitle,
("publishedDate" .=) <$> _vviPublishedDate,
("maturityRating" .=) <$> _vviMaturityRating,
("previewLink" .=) <$> _vviPreviewLink,
("language" .=) <$> _vviLanguage,
("title" .=) <$> _vviTitle,
("pageCount" .=) <$> _vviPageCount,
("dimensions" .=) <$> _vviDimensions,
("infoLink" .=) <$> _vviInfoLink,
("publisher" .=) <$> _vviPublisher,
("description" .=) <$> _vviDescription,
("printType" .=) <$> _vviPrintType])
data MetadataItemsItem = MetadataItemsItem'
{ _miiSize :: !(Maybe (Textual Int64))
, _miiVersion :: !(Maybe (Textual Int64))
, _miiLanguage :: !(Maybe Text)
, _miiDownloadURL :: !(Maybe Text)
, _miiEncryptedKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
metadataItemsItem
:: MetadataItemsItem
metadataItemsItem =
MetadataItemsItem'
{ _miiSize = Nothing
, _miiVersion = Nothing
, _miiLanguage = Nothing
, _miiDownloadURL = Nothing
, _miiEncryptedKey = Nothing
}
miiSize :: Lens' MetadataItemsItem (Maybe Int64)
miiSize
= lens _miiSize (\ s a -> s{_miiSize = a}) .
mapping _Coerce
miiVersion :: Lens' MetadataItemsItem (Maybe Int64)
miiVersion
= lens _miiVersion (\ s a -> s{_miiVersion = a}) .
mapping _Coerce
miiLanguage :: Lens' MetadataItemsItem (Maybe Text)
miiLanguage
= lens _miiLanguage (\ s a -> s{_miiLanguage = a})
miiDownloadURL :: Lens' MetadataItemsItem (Maybe Text)
miiDownloadURL
= lens _miiDownloadURL
(\ s a -> s{_miiDownloadURL = a})
miiEncryptedKey :: Lens' MetadataItemsItem (Maybe Text)
miiEncryptedKey
= lens _miiEncryptedKey
(\ s a -> s{_miiEncryptedKey = a})
instance FromJSON MetadataItemsItem where
parseJSON
= withObject "MetadataItemsItem"
(\ o ->
MetadataItemsItem' <$>
(o .:? "size") <*> (o .:? "version") <*>
(o .:? "language")
<*> (o .:? "download_url")
<*> (o .:? "encrypted_key"))
instance ToJSON MetadataItemsItem where
toJSON MetadataItemsItem'{..}
= object
(catMaybes
[("size" .=) <$> _miiSize,
("version" .=) <$> _miiVersion,
("language" .=) <$> _miiLanguage,
("download_url" .=) <$> _miiDownloadURL,
("encrypted_key" .=) <$> _miiEncryptedKey])
data DictlayerDataDictWordsItemSensesItemSource = DictlayerDataDictWordsItemSensesItemSource'
{ _dddwisisURL :: !(Maybe Text)
, _dddwisisAttribution :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dictlayerDataDictWordsItemSensesItemSource
:: DictlayerDataDictWordsItemSensesItemSource
dictlayerDataDictWordsItemSensesItemSource =
DictlayerDataDictWordsItemSensesItemSource'
{ _dddwisisURL = Nothing
, _dddwisisAttribution = Nothing
}
dddwisisURL :: Lens' DictlayerDataDictWordsItemSensesItemSource (Maybe Text)
dddwisisURL
= lens _dddwisisURL (\ s a -> s{_dddwisisURL = a})
dddwisisAttribution :: Lens' DictlayerDataDictWordsItemSensesItemSource (Maybe Text)
dddwisisAttribution
= lens _dddwisisAttribution
(\ s a -> s{_dddwisisAttribution = a})
instance FromJSON
DictlayerDataDictWordsItemSensesItemSource where
parseJSON
= withObject
"DictlayerDataDictWordsItemSensesItemSource"
(\ o ->
DictlayerDataDictWordsItemSensesItemSource' <$>
(o .:? "url") <*> (o .:? "attribution"))
instance ToJSON
DictlayerDataDictWordsItemSensesItemSource where
toJSON
DictlayerDataDictWordsItemSensesItemSource'{..}
= object
(catMaybes
[("url" .=) <$> _dddwisisURL,
("attribution" .=) <$> _dddwisisAttribution])
data VolumeSaleInfoOffersItemRetailPrice = VolumeSaleInfoOffersItemRetailPrice'
{ _vsioirpCurrencyCode :: !(Maybe Text)
, _vsioirpAmountInMicros :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
volumeSaleInfoOffersItemRetailPrice
:: VolumeSaleInfoOffersItemRetailPrice
volumeSaleInfoOffersItemRetailPrice =
VolumeSaleInfoOffersItemRetailPrice'
{ _vsioirpCurrencyCode = Nothing
, _vsioirpAmountInMicros = Nothing
}
vsioirpCurrencyCode :: Lens' VolumeSaleInfoOffersItemRetailPrice (Maybe Text)
vsioirpCurrencyCode
= lens _vsioirpCurrencyCode
(\ s a -> s{_vsioirpCurrencyCode = a})
vsioirpAmountInMicros :: Lens' VolumeSaleInfoOffersItemRetailPrice (Maybe Double)
vsioirpAmountInMicros
= lens _vsioirpAmountInMicros
(\ s a -> s{_vsioirpAmountInMicros = a})
. mapping _Coerce
instance FromJSON VolumeSaleInfoOffersItemRetailPrice
where
parseJSON
= withObject "VolumeSaleInfoOffersItemRetailPrice"
(\ o ->
VolumeSaleInfoOffersItemRetailPrice' <$>
(o .:? "currencyCode") <*> (o .:? "amountInMicros"))
instance ToJSON VolumeSaleInfoOffersItemRetailPrice
where
toJSON VolumeSaleInfoOffersItemRetailPrice'{..}
= object
(catMaybes
[("currencyCode" .=) <$> _vsioirpCurrencyCode,
("amountInMicros" .=) <$> _vsioirpAmountInMicros])
data VolumeUserInfoFamilySharing = VolumeUserInfoFamilySharing'
{ _vuifsFamilyRole :: !(Maybe Text)
, _vuifsIsSharingAllowed :: !(Maybe Bool)
, _vuifsIsSharingDisabledByFop :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeUserInfoFamilySharing
:: VolumeUserInfoFamilySharing
volumeUserInfoFamilySharing =
VolumeUserInfoFamilySharing'
{ _vuifsFamilyRole = Nothing
, _vuifsIsSharingAllowed = Nothing
, _vuifsIsSharingDisabledByFop = Nothing
}
vuifsFamilyRole :: Lens' VolumeUserInfoFamilySharing (Maybe Text)
vuifsFamilyRole
= lens _vuifsFamilyRole
(\ s a -> s{_vuifsFamilyRole = a})
vuifsIsSharingAllowed :: Lens' VolumeUserInfoFamilySharing (Maybe Bool)
vuifsIsSharingAllowed
= lens _vuifsIsSharingAllowed
(\ s a -> s{_vuifsIsSharingAllowed = a})
vuifsIsSharingDisabledByFop :: Lens' VolumeUserInfoFamilySharing (Maybe Bool)
vuifsIsSharingDisabledByFop
= lens _vuifsIsSharingDisabledByFop
(\ s a -> s{_vuifsIsSharingDisabledByFop = a})
instance FromJSON VolumeUserInfoFamilySharing where
parseJSON
= withObject "VolumeUserInfoFamilySharing"
(\ o ->
VolumeUserInfoFamilySharing' <$>
(o .:? "familyRole") <*> (o .:? "isSharingAllowed")
<*> (o .:? "isSharingDisabledByFop"))
instance ToJSON VolumeUserInfoFamilySharing where
toJSON VolumeUserInfoFamilySharing'{..}
= object
(catMaybes
[("familyRole" .=) <$> _vuifsFamilyRole,
("isSharingAllowed" .=) <$> _vuifsIsSharingAllowed,
("isSharingDisabledByFop" .=) <$>
_vuifsIsSharingDisabledByFop])
newtype UserSettingsNotificationMoreFromSeries = UserSettingsNotificationMoreFromSeries'
{ _usnmfsOptedState :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
userSettingsNotificationMoreFromSeries
:: UserSettingsNotificationMoreFromSeries
userSettingsNotificationMoreFromSeries =
UserSettingsNotificationMoreFromSeries'
{ _usnmfsOptedState = Nothing
}
usnmfsOptedState :: Lens' UserSettingsNotificationMoreFromSeries (Maybe Text)
usnmfsOptedState
= lens _usnmfsOptedState
(\ s a -> s{_usnmfsOptedState = a})
instance FromJSON
UserSettingsNotificationMoreFromSeries where
parseJSON
= withObject "UserSettingsNotificationMoreFromSeries"
(\ o ->
UserSettingsNotificationMoreFromSeries' <$>
(o .:? "opted_state"))
instance ToJSON
UserSettingsNotificationMoreFromSeries where
toJSON UserSettingsNotificationMoreFromSeries'{..}
= object
(catMaybes
[("opted_state" .=) <$> _usnmfsOptedState])
data VolumeVolumeInfoIndustryIdentifiersItem = VolumeVolumeInfoIndustryIdentifiersItem'
{ _vviiiiIdentifier :: !(Maybe Text)
, _vviiiiType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
volumeVolumeInfoIndustryIdentifiersItem
:: VolumeVolumeInfoIndustryIdentifiersItem
volumeVolumeInfoIndustryIdentifiersItem =
VolumeVolumeInfoIndustryIdentifiersItem'
{ _vviiiiIdentifier = Nothing
, _vviiiiType = Nothing
}
vviiiiIdentifier :: Lens' VolumeVolumeInfoIndustryIdentifiersItem (Maybe Text)
vviiiiIdentifier
= lens _vviiiiIdentifier
(\ s a -> s{_vviiiiIdentifier = a})
vviiiiType :: Lens' VolumeVolumeInfoIndustryIdentifiersItem (Maybe Text)
vviiiiType
= lens _vviiiiType (\ s a -> s{_vviiiiType = a})
instance FromJSON
VolumeVolumeInfoIndustryIdentifiersItem where
parseJSON
= withObject
"VolumeVolumeInfoIndustryIdentifiersItem"
(\ o ->
VolumeVolumeInfoIndustryIdentifiersItem' <$>
(o .:? "identifier") <*> (o .:? "type"))
instance ToJSON
VolumeVolumeInfoIndustryIdentifiersItem where
toJSON VolumeVolumeInfoIndustryIdentifiersItem'{..}
= object
(catMaybes
[("identifier" .=) <$> _vviiiiIdentifier,
("type" .=) <$> _vviiiiType])
data BooksAnnotationsRange = BooksAnnotationsRange'
{ _barStartOffSet :: !(Maybe Text)
, _barEndOffSet :: !(Maybe Text)
, _barEndPosition :: !(Maybe Text)
, _barStartPosition :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
booksAnnotationsRange
:: BooksAnnotationsRange
booksAnnotationsRange =
BooksAnnotationsRange'
{ _barStartOffSet = Nothing
, _barEndOffSet = Nothing
, _barEndPosition = Nothing
, _barStartPosition = Nothing
}
barStartOffSet :: Lens' BooksAnnotationsRange (Maybe Text)
barStartOffSet
= lens _barStartOffSet
(\ s a -> s{_barStartOffSet = a})
barEndOffSet :: Lens' BooksAnnotationsRange (Maybe Text)
barEndOffSet
= lens _barEndOffSet (\ s a -> s{_barEndOffSet = a})
barEndPosition :: Lens' BooksAnnotationsRange (Maybe Text)
barEndPosition
= lens _barEndPosition
(\ s a -> s{_barEndPosition = a})
barStartPosition :: Lens' BooksAnnotationsRange (Maybe Text)
barStartPosition
= lens _barStartPosition
(\ s a -> s{_barStartPosition = a})
instance FromJSON BooksAnnotationsRange where
parseJSON
= withObject "BooksAnnotationsRange"
(\ o ->
BooksAnnotationsRange' <$>
(o .:? "startOffset") <*> (o .:? "endOffset") <*>
(o .:? "endPosition")
<*> (o .:? "startPosition"))
instance ToJSON BooksAnnotationsRange where
toJSON BooksAnnotationsRange'{..}
= object
(catMaybes
[("startOffset" .=) <$> _barStartOffSet,
("endOffset" .=) <$> _barEndOffSet,
("endPosition" .=) <$> _barEndPosition,
("startPosition" .=) <$> _barStartPosition])
data Layersummaries = Layersummaries'
{ _layTotalItems :: !(Maybe (Textual Int32))
, _layKind :: !Text
, _layItems :: !(Maybe [Layersummary])
} deriving (Eq,Show,Data,Typeable,Generic)
layersummaries
:: Layersummaries
layersummaries =
Layersummaries'
{ _layTotalItems = Nothing
, _layKind = "books#layersummaries"
, _layItems = Nothing
}
layTotalItems :: Lens' Layersummaries (Maybe Int32)
layTotalItems
= lens _layTotalItems
(\ s a -> s{_layTotalItems = a})
. mapping _Coerce
layKind :: Lens' Layersummaries Text
layKind = lens _layKind (\ s a -> s{_layKind = a})
layItems :: Lens' Layersummaries [Layersummary]
layItems
= lens _layItems (\ s a -> s{_layItems = a}) .
_Default
. _Coerce
instance FromJSON Layersummaries where
parseJSON
= withObject "Layersummaries"
(\ o ->
Layersummaries' <$>
(o .:? "totalItems") <*>
(o .:? "kind" .!= "books#layersummaries")
<*> (o .:? "items" .!= mempty))
instance ToJSON Layersummaries where
toJSON Layersummaries'{..}
= object
(catMaybes
[("totalItems" .=) <$> _layTotalItems,
Just ("kind" .= _layKind),
("items" .=) <$> _layItems])