{-# 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.AndroidPublisher.Types.Product where
import Network.Google.AndroidPublisher.Types.Sum
import Network.Google.Prelude
newtype InAppProductListings =
InAppProductListings'
{ _iaplAddtional :: HashMap Text InAppProductListing
}
deriving (Eq, Show, Data, Typeable, Generic)
inAppProductListings
:: HashMap Text InAppProductListing
-> InAppProductListings
inAppProductListings pIaplAddtional_ =
InAppProductListings' {_iaplAddtional = _Coerce # pIaplAddtional_}
iaplAddtional :: Lens' InAppProductListings (HashMap Text InAppProductListing)
iaplAddtional
= lens _iaplAddtional
(\ s a -> s{_iaplAddtional = a})
. _Coerce
instance FromJSON InAppProductListings where
parseJSON
= withObject "InAppProductListings"
(\ o ->
InAppProductListings' <$> (parseJSONObject o))
instance ToJSON InAppProductListings where
toJSON = toJSON . _iaplAddtional
data MonthDay =
MonthDay'
{ _mdDay :: !(Maybe (Textual Word32))
, _mdMonth :: !(Maybe (Textual Word32))
}
deriving (Eq, Show, Data, Typeable, Generic)
monthDay
:: MonthDay
monthDay = MonthDay' {_mdDay = Nothing, _mdMonth = Nothing}
mdDay :: Lens' MonthDay (Maybe Word32)
mdDay
= lens _mdDay (\ s a -> s{_mdDay = a}) .
mapping _Coerce
mdMonth :: Lens' MonthDay (Maybe Word32)
mdMonth
= lens _mdMonth (\ s a -> s{_mdMonth = a}) .
mapping _Coerce
instance FromJSON MonthDay where
parseJSON
= withObject "MonthDay"
(\ o ->
MonthDay' <$> (o .:? "day") <*> (o .:? "month"))
instance ToJSON MonthDay where
toJSON MonthDay'{..}
= object
(catMaybes
[("day" .=) <$> _mdDay, ("month" .=) <$> _mdMonth])
data Track =
Track'
{ _tTrack :: !(Maybe Text)
, _tReleases :: !(Maybe [TrackRelease])
}
deriving (Eq, Show, Data, Typeable, Generic)
track
:: Track
track = Track' {_tTrack = Nothing, _tReleases = Nothing}
tTrack :: Lens' Track (Maybe Text)
tTrack = lens _tTrack (\ s a -> s{_tTrack = a})
tReleases :: Lens' Track [TrackRelease]
tReleases
= lens _tReleases (\ s a -> s{_tReleases = a}) .
_Default
. _Coerce
instance FromJSON Track where
parseJSON
= withObject "Track"
(\ o ->
Track' <$>
(o .:? "track") <*> (o .:? "releases" .!= mempty))
instance ToJSON Track where
toJSON Track'{..}
= object
(catMaybes
[("track" .=) <$> _tTrack,
("releases" .=) <$> _tReleases])
data Image =
Image'
{ _iURL :: !(Maybe Text)
, _iSha1 :: !(Maybe Text)
, _iId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
image
:: Image
image = Image' {_iURL = Nothing, _iSha1 = Nothing, _iId = Nothing}
iURL :: Lens' Image (Maybe Text)
iURL = lens _iURL (\ s a -> s{_iURL = a})
iSha1 :: Lens' Image (Maybe Text)
iSha1 = lens _iSha1 (\ s a -> s{_iSha1 = a})
iId :: Lens' Image (Maybe Text)
iId = lens _iId (\ s a -> s{_iId = a})
instance FromJSON Image where
parseJSON
= withObject "Image"
(\ o ->
Image' <$>
(o .:? "url") <*> (o .:? "sha1") <*> (o .:? "id"))
instance ToJSON Image where
toJSON Image'{..}
= object
(catMaybes
[("url" .=) <$> _iURL, ("sha1" .=) <$> _iSha1,
("id" .=) <$> _iId])
data InAppProductListing =
InAppProductListing'
{ _iaplTitle :: !(Maybe Text)
, _iaplDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
inAppProductListing
:: InAppProductListing
inAppProductListing =
InAppProductListing' {_iaplTitle = Nothing, _iaplDescription = Nothing}
iaplTitle :: Lens' InAppProductListing (Maybe Text)
iaplTitle
= lens _iaplTitle (\ s a -> s{_iaplTitle = a})
iaplDescription :: Lens' InAppProductListing (Maybe Text)
iaplDescription
= lens _iaplDescription
(\ s a -> s{_iaplDescription = a})
instance FromJSON InAppProductListing where
parseJSON
= withObject "InAppProductListing"
(\ o ->
InAppProductListing' <$>
(o .:? "title") <*> (o .:? "description"))
instance ToJSON InAppProductListing where
toJSON InAppProductListing'{..}
= object
(catMaybes
[("title" .=) <$> _iaplTitle,
("description" .=) <$> _iaplDescription])
newtype ImagesDeleteAllResponse =
ImagesDeleteAllResponse'
{ _idarDeleted :: Maybe [Image]
}
deriving (Eq, Show, Data, Typeable, Generic)
imagesDeleteAllResponse
:: ImagesDeleteAllResponse
imagesDeleteAllResponse = ImagesDeleteAllResponse' {_idarDeleted = Nothing}
idarDeleted :: Lens' ImagesDeleteAllResponse [Image]
idarDeleted
= lens _idarDeleted (\ s a -> s{_idarDeleted = a}) .
_Default
. _Coerce
instance FromJSON ImagesDeleteAllResponse where
parseJSON
= withObject "ImagesDeleteAllResponse"
(\ o ->
ImagesDeleteAllResponse' <$>
(o .:? "deleted" .!= mempty))
instance ToJSON ImagesDeleteAllResponse where
toJSON ImagesDeleteAllResponse'{..}
= object
(catMaybes [("deleted" .=) <$> _idarDeleted])
data TokenPagination =
TokenPagination'
{ _tpNextPageToken :: !(Maybe Text)
, _tpPreviousPageToken :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
tokenPagination
:: TokenPagination
tokenPagination =
TokenPagination' {_tpNextPageToken = Nothing, _tpPreviousPageToken = Nothing}
tpNextPageToken :: Lens' TokenPagination (Maybe Text)
tpNextPageToken
= lens _tpNextPageToken
(\ s a -> s{_tpNextPageToken = a})
tpPreviousPageToken :: Lens' TokenPagination (Maybe Text)
tpPreviousPageToken
= lens _tpPreviousPageToken
(\ s a -> s{_tpPreviousPageToken = a})
instance FromJSON TokenPagination where
parseJSON
= withObject "TokenPagination"
(\ o ->
TokenPagination' <$>
(o .:? "nextPageToken") <*>
(o .:? "previousPageToken"))
instance ToJSON TokenPagination where
toJSON TokenPagination'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _tpNextPageToken,
("previousPageToken" .=) <$> _tpPreviousPageToken])
data ExpansionFile =
ExpansionFile'
{ _efFileSize :: !(Maybe (Textual Int64))
, _efReferencesVersion :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
expansionFile
:: ExpansionFile
expansionFile =
ExpansionFile' {_efFileSize = Nothing, _efReferencesVersion = Nothing}
efFileSize :: Lens' ExpansionFile (Maybe Int64)
efFileSize
= lens _efFileSize (\ s a -> s{_efFileSize = a}) .
mapping _Coerce
efReferencesVersion :: Lens' ExpansionFile (Maybe Int32)
efReferencesVersion
= lens _efReferencesVersion
(\ s a -> s{_efReferencesVersion = a})
. mapping _Coerce
instance FromJSON ExpansionFile where
parseJSON
= withObject "ExpansionFile"
(\ o ->
ExpansionFile' <$>
(o .:? "fileSize") <*> (o .:? "referencesVersion"))
instance ToJSON ExpansionFile where
toJSON ExpansionFile'{..}
= object
(catMaybes
[("fileSize" .=) <$> _efFileSize,
("referencesVersion" .=) <$> _efReferencesVersion])
data UserComment =
UserComment'
{ _ucAndroidOSVersion :: !(Maybe (Textual Int32))
, _ucText :: !(Maybe Text)
, _ucDevice :: !(Maybe Text)
, _ucThumbsUpCount :: !(Maybe (Textual Int32))
, _ucAppVersionCode :: !(Maybe (Textual Int32))
, _ucThumbsDownCount :: !(Maybe (Textual Int32))
, _ucOriginalText :: !(Maybe Text)
, _ucAppVersionName :: !(Maybe Text)
, _ucReviewerLanguage :: !(Maybe Text)
, _ucDeviceMetadata :: !(Maybe DeviceMetadata)
, _ucStarRating :: !(Maybe (Textual Int32))
, _ucLastModified :: !(Maybe Timestamp)
}
deriving (Eq, Show, Data, Typeable, Generic)
userComment
:: UserComment
userComment =
UserComment'
{ _ucAndroidOSVersion = Nothing
, _ucText = Nothing
, _ucDevice = Nothing
, _ucThumbsUpCount = Nothing
, _ucAppVersionCode = Nothing
, _ucThumbsDownCount = Nothing
, _ucOriginalText = Nothing
, _ucAppVersionName = Nothing
, _ucReviewerLanguage = Nothing
, _ucDeviceMetadata = Nothing
, _ucStarRating = Nothing
, _ucLastModified = Nothing
}
ucAndroidOSVersion :: Lens' UserComment (Maybe Int32)
ucAndroidOSVersion
= lens _ucAndroidOSVersion
(\ s a -> s{_ucAndroidOSVersion = a})
. mapping _Coerce
ucText :: Lens' UserComment (Maybe Text)
ucText = lens _ucText (\ s a -> s{_ucText = a})
ucDevice :: Lens' UserComment (Maybe Text)
ucDevice = lens _ucDevice (\ s a -> s{_ucDevice = a})
ucThumbsUpCount :: Lens' UserComment (Maybe Int32)
ucThumbsUpCount
= lens _ucThumbsUpCount
(\ s a -> s{_ucThumbsUpCount = a})
. mapping _Coerce
ucAppVersionCode :: Lens' UserComment (Maybe Int32)
ucAppVersionCode
= lens _ucAppVersionCode
(\ s a -> s{_ucAppVersionCode = a})
. mapping _Coerce
ucThumbsDownCount :: Lens' UserComment (Maybe Int32)
ucThumbsDownCount
= lens _ucThumbsDownCount
(\ s a -> s{_ucThumbsDownCount = a})
. mapping _Coerce
ucOriginalText :: Lens' UserComment (Maybe Text)
ucOriginalText
= lens _ucOriginalText
(\ s a -> s{_ucOriginalText = a})
ucAppVersionName :: Lens' UserComment (Maybe Text)
ucAppVersionName
= lens _ucAppVersionName
(\ s a -> s{_ucAppVersionName = a})
ucReviewerLanguage :: Lens' UserComment (Maybe Text)
ucReviewerLanguage
= lens _ucReviewerLanguage
(\ s a -> s{_ucReviewerLanguage = a})
ucDeviceMetadata :: Lens' UserComment (Maybe DeviceMetadata)
ucDeviceMetadata
= lens _ucDeviceMetadata
(\ s a -> s{_ucDeviceMetadata = a})
ucStarRating :: Lens' UserComment (Maybe Int32)
ucStarRating
= lens _ucStarRating (\ s a -> s{_ucStarRating = a})
. mapping _Coerce
ucLastModified :: Lens' UserComment (Maybe Timestamp)
ucLastModified
= lens _ucLastModified
(\ s a -> s{_ucLastModified = a})
instance FromJSON UserComment where
parseJSON
= withObject "UserComment"
(\ o ->
UserComment' <$>
(o .:? "androidOsVersion") <*> (o .:? "text") <*>
(o .:? "device")
<*> (o .:? "thumbsUpCount")
<*> (o .:? "appVersionCode")
<*> (o .:? "thumbsDownCount")
<*> (o .:? "originalText")
<*> (o .:? "appVersionName")
<*> (o .:? "reviewerLanguage")
<*> (o .:? "deviceMetadata")
<*> (o .:? "starRating")
<*> (o .:? "lastModified"))
instance ToJSON UserComment where
toJSON UserComment'{..}
= object
(catMaybes
[("androidOsVersion" .=) <$> _ucAndroidOSVersion,
("text" .=) <$> _ucText, ("device" .=) <$> _ucDevice,
("thumbsUpCount" .=) <$> _ucThumbsUpCount,
("appVersionCode" .=) <$> _ucAppVersionCode,
("thumbsDownCount" .=) <$> _ucThumbsDownCount,
("originalText" .=) <$> _ucOriginalText,
("appVersionName" .=) <$> _ucAppVersionName,
("reviewerLanguage" .=) <$> _ucReviewerLanguage,
("deviceMetadata" .=) <$> _ucDeviceMetadata,
("starRating" .=) <$> _ucStarRating,
("lastModified" .=) <$> _ucLastModified])
data Testers =
Testers'
{ _tGooglePlusCommUnities :: !(Maybe [Text])
, _tGoogleGroups :: !(Maybe [Text])
}
deriving (Eq, Show, Data, Typeable, Generic)
testers
:: Testers
testers = Testers' {_tGooglePlusCommUnities = Nothing, _tGoogleGroups = Nothing}
tGooglePlusCommUnities :: Lens' Testers [Text]
tGooglePlusCommUnities
= lens _tGooglePlusCommUnities
(\ s a -> s{_tGooglePlusCommUnities = a})
. _Default
. _Coerce
tGoogleGroups :: Lens' Testers [Text]
tGoogleGroups
= lens _tGoogleGroups
(\ s a -> s{_tGoogleGroups = a})
. _Default
. _Coerce
instance FromJSON Testers where
parseJSON
= withObject "Testers"
(\ o ->
Testers' <$>
(o .:? "googlePlusCommunities" .!= mempty) <*>
(o .:? "googleGroups" .!= mempty))
instance ToJSON Testers where
toJSON Testers'{..}
= object
(catMaybes
[("googlePlusCommunities" .=) <$>
_tGooglePlusCommUnities,
("googleGroups" .=) <$> _tGoogleGroups])
data SubscriptionCancelSurveyResult =
SubscriptionCancelSurveyResult'
{ _scsrCancelSurveyReason :: !(Maybe (Textual Int32))
, _scsrUserInputCancelReason :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
subscriptionCancelSurveyResult
:: SubscriptionCancelSurveyResult
subscriptionCancelSurveyResult =
SubscriptionCancelSurveyResult'
{_scsrCancelSurveyReason = Nothing, _scsrUserInputCancelReason = Nothing}
scsrCancelSurveyReason :: Lens' SubscriptionCancelSurveyResult (Maybe Int32)
scsrCancelSurveyReason
= lens _scsrCancelSurveyReason
(\ s a -> s{_scsrCancelSurveyReason = a})
. mapping _Coerce
scsrUserInputCancelReason :: Lens' SubscriptionCancelSurveyResult (Maybe Text)
scsrUserInputCancelReason
= lens _scsrUserInputCancelReason
(\ s a -> s{_scsrUserInputCancelReason = a})
instance FromJSON SubscriptionCancelSurveyResult
where
parseJSON
= withObject "SubscriptionCancelSurveyResult"
(\ o ->
SubscriptionCancelSurveyResult' <$>
(o .:? "cancelSurveyReason") <*>
(o .:? "userInputCancelReason"))
instance ToJSON SubscriptionCancelSurveyResult where
toJSON SubscriptionCancelSurveyResult'{..}
= object
(catMaybes
[("cancelSurveyReason" .=) <$>
_scsrCancelSurveyReason,
("userInputCancelReason" .=) <$>
_scsrUserInputCancelReason])
data Listing =
Listing'
{ _lFullDescription :: !(Maybe Text)
, _lVideo :: !(Maybe Text)
, _lShortDescription :: !(Maybe Text)
, _lLanguage :: !(Maybe Text)
, _lTitle :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
listing
:: Listing
listing =
Listing'
{ _lFullDescription = Nothing
, _lVideo = Nothing
, _lShortDescription = Nothing
, _lLanguage = Nothing
, _lTitle = Nothing
}
lFullDescription :: Lens' Listing (Maybe Text)
lFullDescription
= lens _lFullDescription
(\ s a -> s{_lFullDescription = a})
lVideo :: Lens' Listing (Maybe Text)
lVideo = lens _lVideo (\ s a -> s{_lVideo = a})
lShortDescription :: Lens' Listing (Maybe Text)
lShortDescription
= lens _lShortDescription
(\ s a -> s{_lShortDescription = a})
lLanguage :: Lens' Listing (Maybe Text)
lLanguage
= lens _lLanguage (\ s a -> s{_lLanguage = a})
lTitle :: Lens' Listing (Maybe Text)
lTitle = lens _lTitle (\ s a -> s{_lTitle = a})
instance FromJSON Listing where
parseJSON
= withObject "Listing"
(\ o ->
Listing' <$>
(o .:? "fullDescription") <*> (o .:? "video") <*>
(o .:? "shortDescription")
<*> (o .:? "language")
<*> (o .:? "title"))
instance ToJSON Listing where
toJSON Listing'{..}
= object
(catMaybes
[("fullDescription" .=) <$> _lFullDescription,
("video" .=) <$> _lVideo,
("shortDescription" .=) <$> _lShortDescription,
("language" .=) <$> _lLanguage,
("title" .=) <$> _lTitle])
data APK =
APK'
{ _aVersionCode :: !(Maybe (Textual Int32))
, _aBinary :: !(Maybe APKBinary)
}
deriving (Eq, Show, Data, Typeable, Generic)
aPK
:: APK
aPK = APK' {_aVersionCode = Nothing, _aBinary = Nothing}
aVersionCode :: Lens' APK (Maybe Int32)
aVersionCode
= lens _aVersionCode (\ s a -> s{_aVersionCode = a})
. mapping _Coerce
aBinary :: Lens' APK (Maybe APKBinary)
aBinary = lens _aBinary (\ s a -> s{_aBinary = a})
instance FromJSON APK where
parseJSON
= withObject "APK"
(\ o ->
APK' <$> (o .:? "versionCode") <*> (o .:? "binary"))
instance ToJSON APK where
toJSON APK'{..}
= object
(catMaybes
[("versionCode" .=) <$> _aVersionCode,
("binary" .=) <$> _aBinary])
newtype SubscriptionPurchasesDeferRequest =
SubscriptionPurchasesDeferRequest'
{ _spdrDeferralInfo :: Maybe SubscriptionDeferralInfo
}
deriving (Eq, Show, Data, Typeable, Generic)
subscriptionPurchasesDeferRequest
:: SubscriptionPurchasesDeferRequest
subscriptionPurchasesDeferRequest =
SubscriptionPurchasesDeferRequest' {_spdrDeferralInfo = Nothing}
spdrDeferralInfo :: Lens' SubscriptionPurchasesDeferRequest (Maybe SubscriptionDeferralInfo)
spdrDeferralInfo
= lens _spdrDeferralInfo
(\ s a -> s{_spdrDeferralInfo = a})
instance FromJSON SubscriptionPurchasesDeferRequest
where
parseJSON
= withObject "SubscriptionPurchasesDeferRequest"
(\ o ->
SubscriptionPurchasesDeferRequest' <$>
(o .:? "deferralInfo"))
instance ToJSON SubscriptionPurchasesDeferRequest
where
toJSON SubscriptionPurchasesDeferRequest'{..}
= object
(catMaybes
[("deferralInfo" .=) <$> _spdrDeferralInfo])
data TracksListResponse =
TracksListResponse'
{ _tlrTracks :: !(Maybe [Track])
, _tlrKind :: !Text
}
deriving (Eq, Show, Data, Typeable, Generic)
tracksListResponse
:: TracksListResponse
tracksListResponse =
TracksListResponse'
{_tlrTracks = Nothing, _tlrKind = "androidpublisher#tracksListResponse"}
tlrTracks :: Lens' TracksListResponse [Track]
tlrTracks
= lens _tlrTracks (\ s a -> s{_tlrTracks = a}) .
_Default
. _Coerce
tlrKind :: Lens' TracksListResponse Text
tlrKind = lens _tlrKind (\ s a -> s{_tlrKind = a})
instance FromJSON TracksListResponse where
parseJSON
= withObject "TracksListResponse"
(\ o ->
TracksListResponse' <$>
(o .:? "tracks" .!= mempty) <*>
(o .:? "kind" .!=
"androidpublisher#tracksListResponse"))
instance ToJSON TracksListResponse where
toJSON TracksListResponse'{..}
= object
(catMaybes
[("tracks" .=) <$> _tlrTracks,
Just ("kind" .= _tlrKind)])
data Season =
Season'
{ _sStart :: !(Maybe MonthDay)
, _sEnd :: !(Maybe MonthDay)
, _sProrations :: !(Maybe [Prorate])
}
deriving (Eq, Show, Data, Typeable, Generic)
season
:: Season
season = Season' {_sStart = Nothing, _sEnd = Nothing, _sProrations = Nothing}
sStart :: Lens' Season (Maybe MonthDay)
sStart = lens _sStart (\ s a -> s{_sStart = a})
sEnd :: Lens' Season (Maybe MonthDay)
sEnd = lens _sEnd (\ s a -> s{_sEnd = a})
sProrations :: Lens' Season [Prorate]
sProrations
= lens _sProrations (\ s a -> s{_sProrations = a}) .
_Default
. _Coerce
instance FromJSON Season where
parseJSON
= withObject "Season"
(\ o ->
Season' <$>
(o .:? "start") <*> (o .:? "end") <*>
(o .:? "prorations" .!= mempty))
instance ToJSON Season where
toJSON Season'{..}
= object
(catMaybes
[("start" .=) <$> _sStart, ("end" .=) <$> _sEnd,
("prorations" .=) <$> _sProrations])
data PageInfo =
PageInfo'
{ _piResultPerPage :: !(Maybe (Textual Int32))
, _piTotalResults :: !(Maybe (Textual Int32))
, _piStartIndex :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
pageInfo
:: PageInfo
pageInfo =
PageInfo'
{ _piResultPerPage = Nothing
, _piTotalResults = Nothing
, _piStartIndex = Nothing
}
piResultPerPage :: Lens' PageInfo (Maybe Int32)
piResultPerPage
= lens _piResultPerPage
(\ s a -> s{_piResultPerPage = a})
. mapping _Coerce
piTotalResults :: Lens' PageInfo (Maybe Int32)
piTotalResults
= lens _piTotalResults
(\ s a -> s{_piTotalResults = a})
. mapping _Coerce
piStartIndex :: Lens' PageInfo (Maybe Int32)
piStartIndex
= lens _piStartIndex (\ s a -> s{_piStartIndex = a})
. mapping _Coerce
instance FromJSON PageInfo where
parseJSON
= withObject "PageInfo"
(\ o ->
PageInfo' <$>
(o .:? "resultPerPage") <*> (o .:? "totalResults")
<*> (o .:? "startIndex"))
instance ToJSON PageInfo where
toJSON PageInfo'{..}
= object
(catMaybes
[("resultPerPage" .=) <$> _piResultPerPage,
("totalResults" .=) <$> _piTotalResults,
("startIndex" .=) <$> _piStartIndex])
newtype ImagesListResponse =
ImagesListResponse'
{ _ilrImages :: Maybe [Image]
}
deriving (Eq, Show, Data, Typeable, Generic)
imagesListResponse
:: ImagesListResponse
imagesListResponse = ImagesListResponse' {_ilrImages = Nothing}
ilrImages :: Lens' ImagesListResponse [Image]
ilrImages
= lens _ilrImages (\ s a -> s{_ilrImages = a}) .
_Default
. _Coerce
instance FromJSON ImagesListResponse where
parseJSON
= withObject "ImagesListResponse"
(\ o ->
ImagesListResponse' <$> (o .:? "images" .!= mempty))
instance ToJSON ImagesListResponse where
toJSON ImagesListResponse'{..}
= object (catMaybes [("images" .=) <$> _ilrImages])
data AppEdit =
AppEdit'
{ _aeId :: !(Maybe Text)
, _aeExpiryTimeSeconds :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
appEdit
:: AppEdit
appEdit = AppEdit' {_aeId = Nothing, _aeExpiryTimeSeconds = Nothing}
aeId :: Lens' AppEdit (Maybe Text)
aeId = lens _aeId (\ s a -> s{_aeId = a})
aeExpiryTimeSeconds :: Lens' AppEdit (Maybe Text)
aeExpiryTimeSeconds
= lens _aeExpiryTimeSeconds
(\ s a -> s{_aeExpiryTimeSeconds = a})
instance FromJSON AppEdit where
parseJSON
= withObject "AppEdit"
(\ o ->
AppEdit' <$>
(o .:? "id") <*> (o .:? "expiryTimeSeconds"))
instance ToJSON AppEdit where
toJSON AppEdit'{..}
= object
(catMaybes
[("id" .=) <$> _aeId,
("expiryTimeSeconds" .=) <$> _aeExpiryTimeSeconds])
data ProductPurchase =
ProductPurchase'
{ _ppPurchaseState :: !(Maybe (Textual Int32))
, _ppConsumptionState :: !(Maybe (Textual Int32))
, _ppKind :: !Text
, _ppPurchaseTimeMillis :: !(Maybe (Textual Int64))
, _ppPurchaseType :: !(Maybe (Textual Int32))
, _ppDeveloperPayload :: !(Maybe Text)
, _ppOrderId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
productPurchase
:: ProductPurchase
productPurchase =
ProductPurchase'
{ _ppPurchaseState = Nothing
, _ppConsumptionState = Nothing
, _ppKind = "androidpublisher#productPurchase"
, _ppPurchaseTimeMillis = Nothing
, _ppPurchaseType = Nothing
, _ppDeveloperPayload = Nothing
, _ppOrderId = Nothing
}
ppPurchaseState :: Lens' ProductPurchase (Maybe Int32)
ppPurchaseState
= lens _ppPurchaseState
(\ s a -> s{_ppPurchaseState = a})
. mapping _Coerce
ppConsumptionState :: Lens' ProductPurchase (Maybe Int32)
ppConsumptionState
= lens _ppConsumptionState
(\ s a -> s{_ppConsumptionState = a})
. mapping _Coerce
ppKind :: Lens' ProductPurchase Text
ppKind = lens _ppKind (\ s a -> s{_ppKind = a})
ppPurchaseTimeMillis :: Lens' ProductPurchase (Maybe Int64)
ppPurchaseTimeMillis
= lens _ppPurchaseTimeMillis
(\ s a -> s{_ppPurchaseTimeMillis = a})
. mapping _Coerce
ppPurchaseType :: Lens' ProductPurchase (Maybe Int32)
ppPurchaseType
= lens _ppPurchaseType
(\ s a -> s{_ppPurchaseType = a})
. mapping _Coerce
ppDeveloperPayload :: Lens' ProductPurchase (Maybe Text)
ppDeveloperPayload
= lens _ppDeveloperPayload
(\ s a -> s{_ppDeveloperPayload = a})
ppOrderId :: Lens' ProductPurchase (Maybe Text)
ppOrderId
= lens _ppOrderId (\ s a -> s{_ppOrderId = a})
instance FromJSON ProductPurchase where
parseJSON
= withObject "ProductPurchase"
(\ o ->
ProductPurchase' <$>
(o .:? "purchaseState") <*>
(o .:? "consumptionState")
<*>
(o .:? "kind" .!= "androidpublisher#productPurchase")
<*> (o .:? "purchaseTimeMillis")
<*> (o .:? "purchaseType")
<*> (o .:? "developerPayload")
<*> (o .:? "orderId"))
instance ToJSON ProductPurchase where
toJSON ProductPurchase'{..}
= object
(catMaybes
[("purchaseState" .=) <$> _ppPurchaseState,
("consumptionState" .=) <$> _ppConsumptionState,
Just ("kind" .= _ppKind),
("purchaseTimeMillis" .=) <$> _ppPurchaseTimeMillis,
("purchaseType" .=) <$> _ppPurchaseType,
("developerPayload" .=) <$> _ppDeveloperPayload,
("orderId" .=) <$> _ppOrderId])
data ReviewsListResponse =
ReviewsListResponse'
{ _rlrTokenPagination :: !(Maybe TokenPagination)
, _rlrPageInfo :: !(Maybe PageInfo)
, _rlrReviews :: !(Maybe [Review])
}
deriving (Eq, Show, Data, Typeable, Generic)
reviewsListResponse
:: ReviewsListResponse
reviewsListResponse =
ReviewsListResponse'
{ _rlrTokenPagination = Nothing
, _rlrPageInfo = Nothing
, _rlrReviews = Nothing
}
rlrTokenPagination :: Lens' ReviewsListResponse (Maybe TokenPagination)
rlrTokenPagination
= lens _rlrTokenPagination
(\ s a -> s{_rlrTokenPagination = a})
rlrPageInfo :: Lens' ReviewsListResponse (Maybe PageInfo)
rlrPageInfo
= lens _rlrPageInfo (\ s a -> s{_rlrPageInfo = a})
rlrReviews :: Lens' ReviewsListResponse [Review]
rlrReviews
= lens _rlrReviews (\ s a -> s{_rlrReviews = a}) .
_Default
. _Coerce
instance FromJSON ReviewsListResponse where
parseJSON
= withObject "ReviewsListResponse"
(\ o ->
ReviewsListResponse' <$>
(o .:? "tokenPagination") <*> (o .:? "pageInfo") <*>
(o .:? "reviews" .!= mempty))
instance ToJSON ReviewsListResponse where
toJSON ReviewsListResponse'{..}
= object
(catMaybes
[("tokenPagination" .=) <$> _rlrTokenPagination,
("pageInfo" .=) <$> _rlrPageInfo,
("reviews" .=) <$> _rlrReviews])
newtype SubscriptionPurchasesDeferResponse =
SubscriptionPurchasesDeferResponse'
{ _spdrNewExpiryTimeMillis :: Maybe (Textual Int64)
}
deriving (Eq, Show, Data, Typeable, Generic)
subscriptionPurchasesDeferResponse
:: SubscriptionPurchasesDeferResponse
subscriptionPurchasesDeferResponse =
SubscriptionPurchasesDeferResponse' {_spdrNewExpiryTimeMillis = Nothing}
spdrNewExpiryTimeMillis :: Lens' SubscriptionPurchasesDeferResponse (Maybe Int64)
spdrNewExpiryTimeMillis
= lens _spdrNewExpiryTimeMillis
(\ s a -> s{_spdrNewExpiryTimeMillis = a})
. mapping _Coerce
instance FromJSON SubscriptionPurchasesDeferResponse
where
parseJSON
= withObject "SubscriptionPurchasesDeferResponse"
(\ o ->
SubscriptionPurchasesDeferResponse' <$>
(o .:? "newExpiryTimeMillis"))
instance ToJSON SubscriptionPurchasesDeferResponse
where
toJSON SubscriptionPurchasesDeferResponse'{..}
= object
(catMaybes
[("newExpiryTimeMillis" .=) <$>
_spdrNewExpiryTimeMillis])
data SubscriptionPurchase =
SubscriptionPurchase'
{ _spGivenName :: !(Maybe Text)
, _spAutoResumeTimeMillis :: !(Maybe (Textual Int64))
, _spUserCancellationTimeMillis :: !(Maybe (Textual Int64))
, _spPaymentState :: !(Maybe (Textual Int32))
, _spKind :: !Text
, _spPurchaseType :: !(Maybe (Textual Int32))
, _spPriceChange :: !(Maybe SubscriptionPriceChange)
, _spProFileId :: !(Maybe Text)
, _spLinkedPurchaseToken :: !(Maybe Text)
, _spFamilyName :: !(Maybe Text)
, _spProFileName :: !(Maybe Text)
, _spExpiryTimeMillis :: !(Maybe (Textual Int64))
, _spAutoRenewing :: !(Maybe Bool)
, _spPriceCurrencyCode :: !(Maybe Text)
, _spEmailAddress :: !(Maybe Text)
, _spCancelReason :: !(Maybe (Textual Int32))
, _spCountryCode :: !(Maybe Text)
, _spDeveloperPayload :: !(Maybe Text)
, _spPriceAmountMicros :: !(Maybe (Textual Int64))
, _spStartTimeMillis :: !(Maybe (Textual Int64))
, _spOrderId :: !(Maybe Text)
, _spCancelSurveyResult :: !(Maybe SubscriptionCancelSurveyResult)
}
deriving (Eq, Show, Data, Typeable, Generic)
subscriptionPurchase
:: SubscriptionPurchase
subscriptionPurchase =
SubscriptionPurchase'
{ _spGivenName = Nothing
, _spAutoResumeTimeMillis = Nothing
, _spUserCancellationTimeMillis = Nothing
, _spPaymentState = Nothing
, _spKind = "androidpublisher#subscriptionPurchase"
, _spPurchaseType = Nothing
, _spPriceChange = Nothing
, _spProFileId = Nothing
, _spLinkedPurchaseToken = Nothing
, _spFamilyName = Nothing
, _spProFileName = Nothing
, _spExpiryTimeMillis = Nothing
, _spAutoRenewing = Nothing
, _spPriceCurrencyCode = Nothing
, _spEmailAddress = Nothing
, _spCancelReason = Nothing
, _spCountryCode = Nothing
, _spDeveloperPayload = Nothing
, _spPriceAmountMicros = Nothing
, _spStartTimeMillis = Nothing
, _spOrderId = Nothing
, _spCancelSurveyResult = Nothing
}
spGivenName :: Lens' SubscriptionPurchase (Maybe Text)
spGivenName
= lens _spGivenName (\ s a -> s{_spGivenName = a})
spAutoResumeTimeMillis :: Lens' SubscriptionPurchase (Maybe Int64)
spAutoResumeTimeMillis
= lens _spAutoResumeTimeMillis
(\ s a -> s{_spAutoResumeTimeMillis = a})
. mapping _Coerce
spUserCancellationTimeMillis :: Lens' SubscriptionPurchase (Maybe Int64)
spUserCancellationTimeMillis
= lens _spUserCancellationTimeMillis
(\ s a -> s{_spUserCancellationTimeMillis = a})
. mapping _Coerce
spPaymentState :: Lens' SubscriptionPurchase (Maybe Int32)
spPaymentState
= lens _spPaymentState
(\ s a -> s{_spPaymentState = a})
. mapping _Coerce
spKind :: Lens' SubscriptionPurchase Text
spKind = lens _spKind (\ s a -> s{_spKind = a})
spPurchaseType :: Lens' SubscriptionPurchase (Maybe Int32)
spPurchaseType
= lens _spPurchaseType
(\ s a -> s{_spPurchaseType = a})
. mapping _Coerce
spPriceChange :: Lens' SubscriptionPurchase (Maybe SubscriptionPriceChange)
spPriceChange
= lens _spPriceChange
(\ s a -> s{_spPriceChange = a})
spProFileId :: Lens' SubscriptionPurchase (Maybe Text)
spProFileId
= lens _spProFileId (\ s a -> s{_spProFileId = a})
spLinkedPurchaseToken :: Lens' SubscriptionPurchase (Maybe Text)
spLinkedPurchaseToken
= lens _spLinkedPurchaseToken
(\ s a -> s{_spLinkedPurchaseToken = a})
spFamilyName :: Lens' SubscriptionPurchase (Maybe Text)
spFamilyName
= lens _spFamilyName (\ s a -> s{_spFamilyName = a})
spProFileName :: Lens' SubscriptionPurchase (Maybe Text)
spProFileName
= lens _spProFileName
(\ s a -> s{_spProFileName = a})
spExpiryTimeMillis :: Lens' SubscriptionPurchase (Maybe Int64)
spExpiryTimeMillis
= lens _spExpiryTimeMillis
(\ s a -> s{_spExpiryTimeMillis = a})
. mapping _Coerce
spAutoRenewing :: Lens' SubscriptionPurchase (Maybe Bool)
spAutoRenewing
= lens _spAutoRenewing
(\ s a -> s{_spAutoRenewing = a})
spPriceCurrencyCode :: Lens' SubscriptionPurchase (Maybe Text)
spPriceCurrencyCode
= lens _spPriceCurrencyCode
(\ s a -> s{_spPriceCurrencyCode = a})
spEmailAddress :: Lens' SubscriptionPurchase (Maybe Text)
spEmailAddress
= lens _spEmailAddress
(\ s a -> s{_spEmailAddress = a})
spCancelReason :: Lens' SubscriptionPurchase (Maybe Int32)
spCancelReason
= lens _spCancelReason
(\ s a -> s{_spCancelReason = a})
. mapping _Coerce
spCountryCode :: Lens' SubscriptionPurchase (Maybe Text)
spCountryCode
= lens _spCountryCode
(\ s a -> s{_spCountryCode = a})
spDeveloperPayload :: Lens' SubscriptionPurchase (Maybe Text)
spDeveloperPayload
= lens _spDeveloperPayload
(\ s a -> s{_spDeveloperPayload = a})
spPriceAmountMicros :: Lens' SubscriptionPurchase (Maybe Int64)
spPriceAmountMicros
= lens _spPriceAmountMicros
(\ s a -> s{_spPriceAmountMicros = a})
. mapping _Coerce
spStartTimeMillis :: Lens' SubscriptionPurchase (Maybe Int64)
spStartTimeMillis
= lens _spStartTimeMillis
(\ s a -> s{_spStartTimeMillis = a})
. mapping _Coerce
spOrderId :: Lens' SubscriptionPurchase (Maybe Text)
spOrderId
= lens _spOrderId (\ s a -> s{_spOrderId = a})
spCancelSurveyResult :: Lens' SubscriptionPurchase (Maybe SubscriptionCancelSurveyResult)
spCancelSurveyResult
= lens _spCancelSurveyResult
(\ s a -> s{_spCancelSurveyResult = a})
instance FromJSON SubscriptionPurchase where
parseJSON
= withObject "SubscriptionPurchase"
(\ o ->
SubscriptionPurchase' <$>
(o .:? "givenName") <*>
(o .:? "autoResumeTimeMillis")
<*> (o .:? "userCancellationTimeMillis")
<*> (o .:? "paymentState")
<*>
(o .:? "kind" .!=
"androidpublisher#subscriptionPurchase")
<*> (o .:? "purchaseType")
<*> (o .:? "priceChange")
<*> (o .:? "profileId")
<*> (o .:? "linkedPurchaseToken")
<*> (o .:? "familyName")
<*> (o .:? "profileName")
<*> (o .:? "expiryTimeMillis")
<*> (o .:? "autoRenewing")
<*> (o .:? "priceCurrencyCode")
<*> (o .:? "emailAddress")
<*> (o .:? "cancelReason")
<*> (o .:? "countryCode")
<*> (o .:? "developerPayload")
<*> (o .:? "priceAmountMicros")
<*> (o .:? "startTimeMillis")
<*> (o .:? "orderId")
<*> (o .:? "cancelSurveyResult"))
instance ToJSON SubscriptionPurchase where
toJSON SubscriptionPurchase'{..}
= object
(catMaybes
[("givenName" .=) <$> _spGivenName,
("autoResumeTimeMillis" .=) <$>
_spAutoResumeTimeMillis,
("userCancellationTimeMillis" .=) <$>
_spUserCancellationTimeMillis,
("paymentState" .=) <$> _spPaymentState,
Just ("kind" .= _spKind),
("purchaseType" .=) <$> _spPurchaseType,
("priceChange" .=) <$> _spPriceChange,
("profileId" .=) <$> _spProFileId,
("linkedPurchaseToken" .=) <$>
_spLinkedPurchaseToken,
("familyName" .=) <$> _spFamilyName,
("profileName" .=) <$> _spProFileName,
("expiryTimeMillis" .=) <$> _spExpiryTimeMillis,
("autoRenewing" .=) <$> _spAutoRenewing,
("priceCurrencyCode" .=) <$> _spPriceCurrencyCode,
("emailAddress" .=) <$> _spEmailAddress,
("cancelReason" .=) <$> _spCancelReason,
("countryCode" .=) <$> _spCountryCode,
("developerPayload" .=) <$> _spDeveloperPayload,
("priceAmountMicros" .=) <$> _spPriceAmountMicros,
("startTimeMillis" .=) <$> _spStartTimeMillis,
("orderId" .=) <$> _spOrderId,
("cancelSurveyResult" .=) <$> _spCancelSurveyResult])
data SubscriptionPriceChange =
SubscriptionPriceChange'
{ _spcState :: !(Maybe (Textual Int32))
, _spcNewPrice :: !(Maybe Price)
}
deriving (Eq, Show, Data, Typeable, Generic)
subscriptionPriceChange
:: SubscriptionPriceChange
subscriptionPriceChange =
SubscriptionPriceChange' {_spcState = Nothing, _spcNewPrice = Nothing}
spcState :: Lens' SubscriptionPriceChange (Maybe Int32)
spcState
= lens _spcState (\ s a -> s{_spcState = a}) .
mapping _Coerce
spcNewPrice :: Lens' SubscriptionPriceChange (Maybe Price)
spcNewPrice
= lens _spcNewPrice (\ s a -> s{_spcNewPrice = a})
instance FromJSON SubscriptionPriceChange where
parseJSON
= withObject "SubscriptionPriceChange"
(\ o ->
SubscriptionPriceChange' <$>
(o .:? "state") <*> (o .:? "newPrice"))
instance ToJSON SubscriptionPriceChange where
toJSON SubscriptionPriceChange'{..}
= object
(catMaybes
[("state" .=) <$> _spcState,
("newPrice" .=) <$> _spcNewPrice])
data AppDetails =
AppDetails'
{ _adContactPhone :: !(Maybe Text)
, _adContactEmail :: !(Maybe Text)
, _adContactWebsite :: !(Maybe Text)
, _adDefaultLanguage :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
appDetails
:: AppDetails
appDetails =
AppDetails'
{ _adContactPhone = Nothing
, _adContactEmail = Nothing
, _adContactWebsite = Nothing
, _adDefaultLanguage = Nothing
}
adContactPhone :: Lens' AppDetails (Maybe Text)
adContactPhone
= lens _adContactPhone
(\ s a -> s{_adContactPhone = a})
adContactEmail :: Lens' AppDetails (Maybe Text)
adContactEmail
= lens _adContactEmail
(\ s a -> s{_adContactEmail = a})
adContactWebsite :: Lens' AppDetails (Maybe Text)
adContactWebsite
= lens _adContactWebsite
(\ s a -> s{_adContactWebsite = a})
adDefaultLanguage :: Lens' AppDetails (Maybe Text)
adDefaultLanguage
= lens _adDefaultLanguage
(\ s a -> s{_adDefaultLanguage = a})
instance FromJSON AppDetails where
parseJSON
= withObject "AppDetails"
(\ o ->
AppDetails' <$>
(o .:? "contactPhone") <*> (o .:? "contactEmail") <*>
(o .:? "contactWebsite")
<*> (o .:? "defaultLanguage"))
instance ToJSON AppDetails where
toJSON AppDetails'{..}
= object
(catMaybes
[("contactPhone" .=) <$> _adContactPhone,
("contactEmail" .=) <$> _adContactEmail,
("contactWebsite" .=) <$> _adContactWebsite,
("defaultLanguage" .=) <$> _adDefaultLanguage])
newtype InAppProductPrices =
InAppProductPrices'
{ _iAppAddtional :: HashMap Text Price
}
deriving (Eq, Show, Data, Typeable, Generic)
inAppProductPrices
:: HashMap Text Price
-> InAppProductPrices
inAppProductPrices pIAppAddtional_ =
InAppProductPrices' {_iAppAddtional = _Coerce # pIAppAddtional_}
iAppAddtional :: Lens' InAppProductPrices (HashMap Text Price)
iAppAddtional
= lens _iAppAddtional
(\ s a -> s{_iAppAddtional = a})
. _Coerce
instance FromJSON InAppProductPrices where
parseJSON
= withObject "InAppProductPrices"
(\ o -> InAppProductPrices' <$> (parseJSONObject o))
instance ToJSON InAppProductPrices where
toJSON = toJSON . _iAppAddtional
data ExternallyHostedAPK =
ExternallyHostedAPK'
{ _ehapkApplicationLabel :: !(Maybe Text)
, _ehapkMaximumSdk :: !(Maybe (Textual Int32))
, _ehapkNATiveCodes :: !(Maybe [Text])
, _ehapkVersionCode :: !(Maybe (Textual Int32))
, _ehapkFileSha256Base64 :: !(Maybe Text)
, _ehapkExternallyHostedURL :: !(Maybe Text)
, _ehapkVersionName :: !(Maybe Text)
, _ehapkPackageName :: !(Maybe Text)
, _ehapkFileSize :: !(Maybe (Textual Int64))
, _ehapkIconBase64 :: !(Maybe Text)
, _ehapkUsesFeatures :: !(Maybe [Text])
, _ehapkMinimumSdk :: !(Maybe (Textual Int32))
, _ehapkFileSha1Base64 :: !(Maybe Text)
, _ehapkUsesPermissions :: !(Maybe [ExternallyHostedAPKUsesPermission])
, _ehapkCertificateBase64s :: !(Maybe [Text])
}
deriving (Eq, Show, Data, Typeable, Generic)
externallyHostedAPK
:: ExternallyHostedAPK
externallyHostedAPK =
ExternallyHostedAPK'
{ _ehapkApplicationLabel = Nothing
, _ehapkMaximumSdk = Nothing
, _ehapkNATiveCodes = Nothing
, _ehapkVersionCode = Nothing
, _ehapkFileSha256Base64 = Nothing
, _ehapkExternallyHostedURL = Nothing
, _ehapkVersionName = Nothing
, _ehapkPackageName = Nothing
, _ehapkFileSize = Nothing
, _ehapkIconBase64 = Nothing
, _ehapkUsesFeatures = Nothing
, _ehapkMinimumSdk = Nothing
, _ehapkFileSha1Base64 = Nothing
, _ehapkUsesPermissions = Nothing
, _ehapkCertificateBase64s = Nothing
}
ehapkApplicationLabel :: Lens' ExternallyHostedAPK (Maybe Text)
ehapkApplicationLabel
= lens _ehapkApplicationLabel
(\ s a -> s{_ehapkApplicationLabel = a})
ehapkMaximumSdk :: Lens' ExternallyHostedAPK (Maybe Int32)
ehapkMaximumSdk
= lens _ehapkMaximumSdk
(\ s a -> s{_ehapkMaximumSdk = a})
. mapping _Coerce
ehapkNATiveCodes :: Lens' ExternallyHostedAPK [Text]
ehapkNATiveCodes
= lens _ehapkNATiveCodes
(\ s a -> s{_ehapkNATiveCodes = a})
. _Default
. _Coerce
ehapkVersionCode :: Lens' ExternallyHostedAPK (Maybe Int32)
ehapkVersionCode
= lens _ehapkVersionCode
(\ s a -> s{_ehapkVersionCode = a})
. mapping _Coerce
ehapkFileSha256Base64 :: Lens' ExternallyHostedAPK (Maybe Text)
ehapkFileSha256Base64
= lens _ehapkFileSha256Base64
(\ s a -> s{_ehapkFileSha256Base64 = a})
ehapkExternallyHostedURL :: Lens' ExternallyHostedAPK (Maybe Text)
ehapkExternallyHostedURL
= lens _ehapkExternallyHostedURL
(\ s a -> s{_ehapkExternallyHostedURL = a})
ehapkVersionName :: Lens' ExternallyHostedAPK (Maybe Text)
ehapkVersionName
= lens _ehapkVersionName
(\ s a -> s{_ehapkVersionName = a})
ehapkPackageName :: Lens' ExternallyHostedAPK (Maybe Text)
ehapkPackageName
= lens _ehapkPackageName
(\ s a -> s{_ehapkPackageName = a})
ehapkFileSize :: Lens' ExternallyHostedAPK (Maybe Int64)
ehapkFileSize
= lens _ehapkFileSize
(\ s a -> s{_ehapkFileSize = a})
. mapping _Coerce
ehapkIconBase64 :: Lens' ExternallyHostedAPK (Maybe Text)
ehapkIconBase64
= lens _ehapkIconBase64
(\ s a -> s{_ehapkIconBase64 = a})
ehapkUsesFeatures :: Lens' ExternallyHostedAPK [Text]
ehapkUsesFeatures
= lens _ehapkUsesFeatures
(\ s a -> s{_ehapkUsesFeatures = a})
. _Default
. _Coerce
ehapkMinimumSdk :: Lens' ExternallyHostedAPK (Maybe Int32)
ehapkMinimumSdk
= lens _ehapkMinimumSdk
(\ s a -> s{_ehapkMinimumSdk = a})
. mapping _Coerce
ehapkFileSha1Base64 :: Lens' ExternallyHostedAPK (Maybe Text)
ehapkFileSha1Base64
= lens _ehapkFileSha1Base64
(\ s a -> s{_ehapkFileSha1Base64 = a})
ehapkUsesPermissions :: Lens' ExternallyHostedAPK [ExternallyHostedAPKUsesPermission]
ehapkUsesPermissions
= lens _ehapkUsesPermissions
(\ s a -> s{_ehapkUsesPermissions = a})
. _Default
. _Coerce
ehapkCertificateBase64s :: Lens' ExternallyHostedAPK [Text]
ehapkCertificateBase64s
= lens _ehapkCertificateBase64s
(\ s a -> s{_ehapkCertificateBase64s = a})
. _Default
. _Coerce
instance FromJSON ExternallyHostedAPK where
parseJSON
= withObject "ExternallyHostedAPK"
(\ o ->
ExternallyHostedAPK' <$>
(o .:? "applicationLabel") <*> (o .:? "maximumSdk")
<*> (o .:? "nativeCodes" .!= mempty)
<*> (o .:? "versionCode")
<*> (o .:? "fileSha256Base64")
<*> (o .:? "externallyHostedUrl")
<*> (o .:? "versionName")
<*> (o .:? "packageName")
<*> (o .:? "fileSize")
<*> (o .:? "iconBase64")
<*> (o .:? "usesFeatures" .!= mempty)
<*> (o .:? "minimumSdk")
<*> (o .:? "fileSha1Base64")
<*> (o .:? "usesPermissions" .!= mempty)
<*> (o .:? "certificateBase64s" .!= mempty))
instance ToJSON ExternallyHostedAPK where
toJSON ExternallyHostedAPK'{..}
= object
(catMaybes
[("applicationLabel" .=) <$> _ehapkApplicationLabel,
("maximumSdk" .=) <$> _ehapkMaximumSdk,
("nativeCodes" .=) <$> _ehapkNATiveCodes,
("versionCode" .=) <$> _ehapkVersionCode,
("fileSha256Base64" .=) <$> _ehapkFileSha256Base64,
("externallyHostedUrl" .=) <$>
_ehapkExternallyHostedURL,
("versionName" .=) <$> _ehapkVersionName,
("packageName" .=) <$> _ehapkPackageName,
("fileSize" .=) <$> _ehapkFileSize,
("iconBase64" .=) <$> _ehapkIconBase64,
("usesFeatures" .=) <$> _ehapkUsesFeatures,
("minimumSdk" .=) <$> _ehapkMinimumSdk,
("fileSha1Base64" .=) <$> _ehapkFileSha1Base64,
("usesPermissions" .=) <$> _ehapkUsesPermissions,
("certificateBase64s" .=) <$>
_ehapkCertificateBase64s])
data TrackRelease =
TrackRelease'
{ _trVersionCodes :: !(Maybe [Textual Int64])
, _trStatus :: !(Maybe Text)
, _trReleaseNotes :: !(Maybe [LocalizedText])
, _trUserFraction :: !(Maybe (Textual Double))
, _trCountryTargeting :: !(Maybe CountryTargeting)
, _trName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
trackRelease
:: TrackRelease
trackRelease =
TrackRelease'
{ _trVersionCodes = Nothing
, _trStatus = Nothing
, _trReleaseNotes = Nothing
, _trUserFraction = Nothing
, _trCountryTargeting = Nothing
, _trName = Nothing
}
trVersionCodes :: Lens' TrackRelease [Int64]
trVersionCodes
= lens _trVersionCodes
(\ s a -> s{_trVersionCodes = a})
. _Default
. _Coerce
trStatus :: Lens' TrackRelease (Maybe Text)
trStatus = lens _trStatus (\ s a -> s{_trStatus = a})
trReleaseNotes :: Lens' TrackRelease [LocalizedText]
trReleaseNotes
= lens _trReleaseNotes
(\ s a -> s{_trReleaseNotes = a})
. _Default
. _Coerce
trUserFraction :: Lens' TrackRelease (Maybe Double)
trUserFraction
= lens _trUserFraction
(\ s a -> s{_trUserFraction = a})
. mapping _Coerce
trCountryTargeting :: Lens' TrackRelease (Maybe CountryTargeting)
trCountryTargeting
= lens _trCountryTargeting
(\ s a -> s{_trCountryTargeting = a})
trName :: Lens' TrackRelease (Maybe Text)
trName = lens _trName (\ s a -> s{_trName = a})
instance FromJSON TrackRelease where
parseJSON
= withObject "TrackRelease"
(\ o ->
TrackRelease' <$>
(o .:? "versionCodes" .!= mempty) <*>
(o .:? "status")
<*> (o .:? "releaseNotes" .!= mempty)
<*> (o .:? "userFraction")
<*> (o .:? "countryTargeting")
<*> (o .:? "name"))
instance ToJSON TrackRelease where
toJSON TrackRelease'{..}
= object
(catMaybes
[("versionCodes" .=) <$> _trVersionCodes,
("status" .=) <$> _trStatus,
("releaseNotes" .=) <$> _trReleaseNotes,
("userFraction" .=) <$> _trUserFraction,
("countryTargeting" .=) <$> _trCountryTargeting,
("name" .=) <$> _trName])
data CountryTargeting =
CountryTargeting'
{ _ctIncludeRestOfWorld :: !(Maybe Bool)
, _ctCountries :: !(Maybe [Text])
}
deriving (Eq, Show, Data, Typeable, Generic)
countryTargeting
:: CountryTargeting
countryTargeting =
CountryTargeting' {_ctIncludeRestOfWorld = Nothing, _ctCountries = Nothing}
ctIncludeRestOfWorld :: Lens' CountryTargeting (Maybe Bool)
ctIncludeRestOfWorld
= lens _ctIncludeRestOfWorld
(\ s a -> s{_ctIncludeRestOfWorld = a})
ctCountries :: Lens' CountryTargeting [Text]
ctCountries
= lens _ctCountries (\ s a -> s{_ctCountries = a}) .
_Default
. _Coerce
instance FromJSON CountryTargeting where
parseJSON
= withObject "CountryTargeting"
(\ o ->
CountryTargeting' <$>
(o .:? "includeRestOfWorld") <*>
(o .:? "countries" .!= mempty))
instance ToJSON CountryTargeting where
toJSON CountryTargeting'{..}
= object
(catMaybes
[("includeRestOfWorld" .=) <$> _ctIncludeRestOfWorld,
("countries" .=) <$> _ctCountries])
data Bundle =
Bundle'
{ _bVersionCode :: !(Maybe (Textual Int32))
, _bSha1 :: !(Maybe Text)
, _bSha256 :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
bundle
:: Bundle
bundle = Bundle' {_bVersionCode = Nothing, _bSha1 = Nothing, _bSha256 = Nothing}
bVersionCode :: Lens' Bundle (Maybe Int32)
bVersionCode
= lens _bVersionCode (\ s a -> s{_bVersionCode = a})
. mapping _Coerce
bSha1 :: Lens' Bundle (Maybe Text)
bSha1 = lens _bSha1 (\ s a -> s{_bSha1 = a})
bSha256 :: Lens' Bundle (Maybe Text)
bSha256 = lens _bSha256 (\ s a -> s{_bSha256 = a})
instance FromJSON Bundle where
parseJSON
= withObject "Bundle"
(\ o ->
Bundle' <$>
(o .:? "versionCode") <*> (o .:? "sha1") <*>
(o .:? "sha256"))
instance ToJSON Bundle where
toJSON Bundle'{..}
= object
(catMaybes
[("versionCode" .=) <$> _bVersionCode,
("sha1" .=) <$> _bSha1, ("sha256" .=) <$> _bSha256])
newtype DeobfuscationFile =
DeobfuscationFile'
{ _dfSymbolType :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
deobfuscationFile
:: DeobfuscationFile
deobfuscationFile = DeobfuscationFile' {_dfSymbolType = Nothing}
dfSymbolType :: Lens' DeobfuscationFile (Maybe Text)
dfSymbolType
= lens _dfSymbolType (\ s a -> s{_dfSymbolType = a})
instance FromJSON DeobfuscationFile where
parseJSON
= withObject "DeobfuscationFile"
(\ o -> DeobfuscationFile' <$> (o .:? "symbolType"))
instance ToJSON DeobfuscationFile where
toJSON DeobfuscationFile'{..}
= object
(catMaybes [("symbolType" .=) <$> _dfSymbolType])
data VoidedPurchasesListResponse =
VoidedPurchasesListResponse'
{ _vplrTokenPagination :: !(Maybe TokenPagination)
, _vplrPageInfo :: !(Maybe PageInfo)
, _vplrVoidedPurchases :: !(Maybe [VoidedPurchase])
}
deriving (Eq, Show, Data, Typeable, Generic)
voidedPurchasesListResponse
:: VoidedPurchasesListResponse
voidedPurchasesListResponse =
VoidedPurchasesListResponse'
{ _vplrTokenPagination = Nothing
, _vplrPageInfo = Nothing
, _vplrVoidedPurchases = Nothing
}
vplrTokenPagination :: Lens' VoidedPurchasesListResponse (Maybe TokenPagination)
vplrTokenPagination
= lens _vplrTokenPagination
(\ s a -> s{_vplrTokenPagination = a})
vplrPageInfo :: Lens' VoidedPurchasesListResponse (Maybe PageInfo)
vplrPageInfo
= lens _vplrPageInfo (\ s a -> s{_vplrPageInfo = a})
vplrVoidedPurchases :: Lens' VoidedPurchasesListResponse [VoidedPurchase]
vplrVoidedPurchases
= lens _vplrVoidedPurchases
(\ s a -> s{_vplrVoidedPurchases = a})
. _Default
. _Coerce
instance FromJSON VoidedPurchasesListResponse where
parseJSON
= withObject "VoidedPurchasesListResponse"
(\ o ->
VoidedPurchasesListResponse' <$>
(o .:? "tokenPagination") <*> (o .:? "pageInfo") <*>
(o .:? "voidedPurchases" .!= mempty))
instance ToJSON VoidedPurchasesListResponse where
toJSON VoidedPurchasesListResponse'{..}
= object
(catMaybes
[("tokenPagination" .=) <$> _vplrTokenPagination,
("pageInfo" .=) <$> _vplrPageInfo,
("voidedPurchases" .=) <$> _vplrVoidedPurchases])
newtype ExpansionFilesUploadResponse =
ExpansionFilesUploadResponse'
{ _efurExpansionFile :: Maybe ExpansionFile
}
deriving (Eq, Show, Data, Typeable, Generic)
expansionFilesUploadResponse
:: ExpansionFilesUploadResponse
expansionFilesUploadResponse =
ExpansionFilesUploadResponse' {_efurExpansionFile = Nothing}
efurExpansionFile :: Lens' ExpansionFilesUploadResponse (Maybe ExpansionFile)
efurExpansionFile
= lens _efurExpansionFile
(\ s a -> s{_efurExpansionFile = a})
instance FromJSON ExpansionFilesUploadResponse where
parseJSON
= withObject "ExpansionFilesUploadResponse"
(\ o ->
ExpansionFilesUploadResponse' <$>
(o .:? "expansionFile"))
instance ToJSON ExpansionFilesUploadResponse where
toJSON ExpansionFilesUploadResponse'{..}
= object
(catMaybes
[("expansionFile" .=) <$> _efurExpansionFile])
newtype ImagesUploadResponse =
ImagesUploadResponse'
{ _iurImage :: Maybe Image
}
deriving (Eq, Show, Data, Typeable, Generic)
imagesUploadResponse
:: ImagesUploadResponse
imagesUploadResponse = ImagesUploadResponse' {_iurImage = Nothing}
iurImage :: Lens' ImagesUploadResponse (Maybe Image)
iurImage = lens _iurImage (\ s a -> s{_iurImage = a})
instance FromJSON ImagesUploadResponse where
parseJSON
= withObject "ImagesUploadResponse"
(\ o -> ImagesUploadResponse' <$> (o .:? "image"))
instance ToJSON ImagesUploadResponse where
toJSON ImagesUploadResponse'{..}
= object (catMaybes [("image" .=) <$> _iurImage])
data Prorate =
Prorate'
{ _pStart :: !(Maybe MonthDay)
, _pDefaultPrice :: !(Maybe Price)
}
deriving (Eq, Show, Data, Typeable, Generic)
prorate
:: Prorate
prorate = Prorate' {_pStart = Nothing, _pDefaultPrice = Nothing}
pStart :: Lens' Prorate (Maybe MonthDay)
pStart = lens _pStart (\ s a -> s{_pStart = a})
pDefaultPrice :: Lens' Prorate (Maybe Price)
pDefaultPrice
= lens _pDefaultPrice
(\ s a -> s{_pDefaultPrice = a})
instance FromJSON Prorate where
parseJSON
= withObject "Prorate"
(\ o ->
Prorate' <$>
(o .:? "start") <*> (o .:? "defaultPrice"))
instance ToJSON Prorate where
toJSON Prorate'{..}
= object
(catMaybes
[("start" .=) <$> _pStart,
("defaultPrice" .=) <$> _pDefaultPrice])
newtype DeobfuscationFilesUploadResponse =
DeobfuscationFilesUploadResponse'
{ _dfurDeobfuscationFile :: Maybe DeobfuscationFile
}
deriving (Eq, Show, Data, Typeable, Generic)
deobfuscationFilesUploadResponse
:: DeobfuscationFilesUploadResponse
deobfuscationFilesUploadResponse =
DeobfuscationFilesUploadResponse' {_dfurDeobfuscationFile = Nothing}
dfurDeobfuscationFile :: Lens' DeobfuscationFilesUploadResponse (Maybe DeobfuscationFile)
dfurDeobfuscationFile
= lens _dfurDeobfuscationFile
(\ s a -> s{_dfurDeobfuscationFile = a})
instance FromJSON DeobfuscationFilesUploadResponse
where
parseJSON
= withObject "DeobfuscationFilesUploadResponse"
(\ o ->
DeobfuscationFilesUploadResponse' <$>
(o .:? "deobfuscationFile"))
instance ToJSON DeobfuscationFilesUploadResponse
where
toJSON DeobfuscationFilesUploadResponse'{..}
= object
(catMaybes
[("deobfuscationFile" .=) <$>
_dfurDeobfuscationFile])
data InAppProductsListResponse =
InAppProductsListResponse'
{ _iaplrTokenPagination :: !(Maybe TokenPagination)
, _iaplrPageInfo :: !(Maybe PageInfo)
, _iaplrKind :: !Text
, _iaplrInAppProduct :: !(Maybe [InAppProduct])
}
deriving (Eq, Show, Data, Typeable, Generic)
inAppProductsListResponse
:: InAppProductsListResponse
inAppProductsListResponse =
InAppProductsListResponse'
{ _iaplrTokenPagination = Nothing
, _iaplrPageInfo = Nothing
, _iaplrKind = "androidpublisher#inappproductsListResponse"
, _iaplrInAppProduct = Nothing
}
iaplrTokenPagination :: Lens' InAppProductsListResponse (Maybe TokenPagination)
iaplrTokenPagination
= lens _iaplrTokenPagination
(\ s a -> s{_iaplrTokenPagination = a})
iaplrPageInfo :: Lens' InAppProductsListResponse (Maybe PageInfo)
iaplrPageInfo
= lens _iaplrPageInfo
(\ s a -> s{_iaplrPageInfo = a})
iaplrKind :: Lens' InAppProductsListResponse Text
iaplrKind
= lens _iaplrKind (\ s a -> s{_iaplrKind = a})
iaplrInAppProduct :: Lens' InAppProductsListResponse [InAppProduct]
iaplrInAppProduct
= lens _iaplrInAppProduct
(\ s a -> s{_iaplrInAppProduct = a})
. _Default
. _Coerce
instance FromJSON InAppProductsListResponse where
parseJSON
= withObject "InAppProductsListResponse"
(\ o ->
InAppProductsListResponse' <$>
(o .:? "tokenPagination") <*> (o .:? "pageInfo") <*>
(o .:? "kind" .!=
"androidpublisher#inappproductsListResponse")
<*> (o .:? "inappproduct" .!= mempty))
instance ToJSON InAppProductsListResponse where
toJSON InAppProductsListResponse'{..}
= object
(catMaybes
[("tokenPagination" .=) <$> _iaplrTokenPagination,
("pageInfo" .=) <$> _iaplrPageInfo,
Just ("kind" .= _iaplrKind),
("inappproduct" .=) <$> _iaplrInAppProduct])
data LocalizedText =
LocalizedText'
{ _ltText :: !(Maybe Text)
, _ltLanguage :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
localizedText
:: LocalizedText
localizedText = LocalizedText' {_ltText = Nothing, _ltLanguage = Nothing}
ltText :: Lens' LocalizedText (Maybe Text)
ltText = lens _ltText (\ s a -> s{_ltText = a})
ltLanguage :: Lens' LocalizedText (Maybe Text)
ltLanguage
= lens _ltLanguage (\ s a -> s{_ltLanguage = a})
instance FromJSON LocalizedText where
parseJSON
= withObject "LocalizedText"
(\ o ->
LocalizedText' <$>
(o .:? "text") <*> (o .:? "language"))
instance ToJSON LocalizedText where
toJSON LocalizedText'{..}
= object
(catMaybes
[("text" .=) <$> _ltText,
("language" .=) <$> _ltLanguage])
data Review =
Review'
{ _rReviewId :: !(Maybe Text)
, _rAuthorName :: !(Maybe Text)
, _rComments :: !(Maybe [Comment])
}
deriving (Eq, Show, Data, Typeable, Generic)
review
:: Review
review =
Review' {_rReviewId = Nothing, _rAuthorName = Nothing, _rComments = Nothing}
rReviewId :: Lens' Review (Maybe Text)
rReviewId
= lens _rReviewId (\ s a -> s{_rReviewId = a})
rAuthorName :: Lens' Review (Maybe Text)
rAuthorName
= lens _rAuthorName (\ s a -> s{_rAuthorName = a})
rComments :: Lens' Review [Comment]
rComments
= lens _rComments (\ s a -> s{_rComments = a}) .
_Default
. _Coerce
instance FromJSON Review where
parseJSON
= withObject "Review"
(\ o ->
Review' <$>
(o .:? "reviewId") <*> (o .:? "authorName") <*>
(o .:? "comments" .!= mempty))
instance ToJSON Review where
toJSON Review'{..}
= object
(catMaybes
[("reviewId" .=) <$> _rReviewId,
("authorName" .=) <$> _rAuthorName,
("comments" .=) <$> _rComments])
newtype APKsAddExternallyHostedResponse =
APKsAddExternallyHostedResponse'
{ _apkaehrExternallyHostedAPK :: Maybe ExternallyHostedAPK
}
deriving (Eq, Show, Data, Typeable, Generic)
aPKsAddExternallyHostedResponse
:: APKsAddExternallyHostedResponse
aPKsAddExternallyHostedResponse =
APKsAddExternallyHostedResponse' {_apkaehrExternallyHostedAPK = Nothing}
apkaehrExternallyHostedAPK :: Lens' APKsAddExternallyHostedResponse (Maybe ExternallyHostedAPK)
apkaehrExternallyHostedAPK
= lens _apkaehrExternallyHostedAPK
(\ s a -> s{_apkaehrExternallyHostedAPK = a})
instance FromJSON APKsAddExternallyHostedResponse
where
parseJSON
= withObject "APKsAddExternallyHostedResponse"
(\ o ->
APKsAddExternallyHostedResponse' <$>
(o .:? "externallyHostedApk"))
instance ToJSON APKsAddExternallyHostedResponse where
toJSON APKsAddExternallyHostedResponse'{..}
= object
(catMaybes
[("externallyHostedApk" .=) <$>
_apkaehrExternallyHostedAPK])
data SubscriptionDeferralInfo =
SubscriptionDeferralInfo'
{ _sdiDesiredExpiryTimeMillis :: !(Maybe (Textual Int64))
, _sdiExpectedExpiryTimeMillis :: !(Maybe (Textual Int64))
}
deriving (Eq, Show, Data, Typeable, Generic)
subscriptionDeferralInfo
:: SubscriptionDeferralInfo
subscriptionDeferralInfo =
SubscriptionDeferralInfo'
{ _sdiDesiredExpiryTimeMillis = Nothing
, _sdiExpectedExpiryTimeMillis = Nothing
}
sdiDesiredExpiryTimeMillis :: Lens' SubscriptionDeferralInfo (Maybe Int64)
sdiDesiredExpiryTimeMillis
= lens _sdiDesiredExpiryTimeMillis
(\ s a -> s{_sdiDesiredExpiryTimeMillis = a})
. mapping _Coerce
sdiExpectedExpiryTimeMillis :: Lens' SubscriptionDeferralInfo (Maybe Int64)
sdiExpectedExpiryTimeMillis
= lens _sdiExpectedExpiryTimeMillis
(\ s a -> s{_sdiExpectedExpiryTimeMillis = a})
. mapping _Coerce
instance FromJSON SubscriptionDeferralInfo where
parseJSON
= withObject "SubscriptionDeferralInfo"
(\ o ->
SubscriptionDeferralInfo' <$>
(o .:? "desiredExpiryTimeMillis") <*>
(o .:? "expectedExpiryTimeMillis"))
instance ToJSON SubscriptionDeferralInfo where
toJSON SubscriptionDeferralInfo'{..}
= object
(catMaybes
[("desiredExpiryTimeMillis" .=) <$>
_sdiDesiredExpiryTimeMillis,
("expectedExpiryTimeMillis" .=) <$>
_sdiExpectedExpiryTimeMillis])
newtype ReviewsReplyRequest =
ReviewsReplyRequest'
{ _rrrReplyText :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
reviewsReplyRequest
:: ReviewsReplyRequest
reviewsReplyRequest = ReviewsReplyRequest' {_rrrReplyText = Nothing}
rrrReplyText :: Lens' ReviewsReplyRequest (Maybe Text)
rrrReplyText
= lens _rrrReplyText (\ s a -> s{_rrrReplyText = a})
instance FromJSON ReviewsReplyRequest where
parseJSON
= withObject "ReviewsReplyRequest"
(\ o -> ReviewsReplyRequest' <$> (o .:? "replyText"))
instance ToJSON ReviewsReplyRequest where
toJSON ReviewsReplyRequest'{..}
= object
(catMaybes [("replyText" .=) <$> _rrrReplyText])
data DeviceMetadata =
DeviceMetadata'
{ _dmProductName :: !(Maybe Text)
, _dmGlEsVersion :: !(Maybe (Textual Int32))
, _dmManufacturer :: !(Maybe Text)
, _dmScreenWidthPx :: !(Maybe (Textual Int32))
, _dmRamMb :: !(Maybe (Textual Int32))
, _dmCPUMake :: !(Maybe Text)
, _dmScreenHeightPx :: !(Maybe (Textual Int32))
, _dmNATivePlatform :: !(Maybe Text)
, _dmDeviceClass :: !(Maybe Text)
, _dmCPUModel :: !(Maybe Text)
, _dmScreenDensityDpi :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
deviceMetadata
:: DeviceMetadata
deviceMetadata =
DeviceMetadata'
{ _dmProductName = Nothing
, _dmGlEsVersion = Nothing
, _dmManufacturer = Nothing
, _dmScreenWidthPx = Nothing
, _dmRamMb = Nothing
, _dmCPUMake = Nothing
, _dmScreenHeightPx = Nothing
, _dmNATivePlatform = Nothing
, _dmDeviceClass = Nothing
, _dmCPUModel = Nothing
, _dmScreenDensityDpi = Nothing
}
dmProductName :: Lens' DeviceMetadata (Maybe Text)
dmProductName
= lens _dmProductName
(\ s a -> s{_dmProductName = a})
dmGlEsVersion :: Lens' DeviceMetadata (Maybe Int32)
dmGlEsVersion
= lens _dmGlEsVersion
(\ s a -> s{_dmGlEsVersion = a})
. mapping _Coerce
dmManufacturer :: Lens' DeviceMetadata (Maybe Text)
dmManufacturer
= lens _dmManufacturer
(\ s a -> s{_dmManufacturer = a})
dmScreenWidthPx :: Lens' DeviceMetadata (Maybe Int32)
dmScreenWidthPx
= lens _dmScreenWidthPx
(\ s a -> s{_dmScreenWidthPx = a})
. mapping _Coerce
dmRamMb :: Lens' DeviceMetadata (Maybe Int32)
dmRamMb
= lens _dmRamMb (\ s a -> s{_dmRamMb = a}) .
mapping _Coerce
dmCPUMake :: Lens' DeviceMetadata (Maybe Text)
dmCPUMake
= lens _dmCPUMake (\ s a -> s{_dmCPUMake = a})
dmScreenHeightPx :: Lens' DeviceMetadata (Maybe Int32)
dmScreenHeightPx
= lens _dmScreenHeightPx
(\ s a -> s{_dmScreenHeightPx = a})
. mapping _Coerce
dmNATivePlatform :: Lens' DeviceMetadata (Maybe Text)
dmNATivePlatform
= lens _dmNATivePlatform
(\ s a -> s{_dmNATivePlatform = a})
dmDeviceClass :: Lens' DeviceMetadata (Maybe Text)
dmDeviceClass
= lens _dmDeviceClass
(\ s a -> s{_dmDeviceClass = a})
dmCPUModel :: Lens' DeviceMetadata (Maybe Text)
dmCPUModel
= lens _dmCPUModel (\ s a -> s{_dmCPUModel = a})
dmScreenDensityDpi :: Lens' DeviceMetadata (Maybe Int32)
dmScreenDensityDpi
= lens _dmScreenDensityDpi
(\ s a -> s{_dmScreenDensityDpi = a})
. mapping _Coerce
instance FromJSON DeviceMetadata where
parseJSON
= withObject "DeviceMetadata"
(\ o ->
DeviceMetadata' <$>
(o .:? "productName") <*> (o .:? "glEsVersion") <*>
(o .:? "manufacturer")
<*> (o .:? "screenWidthPx")
<*> (o .:? "ramMb")
<*> (o .:? "cpuMake")
<*> (o .:? "screenHeightPx")
<*> (o .:? "nativePlatform")
<*> (o .:? "deviceClass")
<*> (o .:? "cpuModel")
<*> (o .:? "screenDensityDpi"))
instance ToJSON DeviceMetadata where
toJSON DeviceMetadata'{..}
= object
(catMaybes
[("productName" .=) <$> _dmProductName,
("glEsVersion" .=) <$> _dmGlEsVersion,
("manufacturer" .=) <$> _dmManufacturer,
("screenWidthPx" .=) <$> _dmScreenWidthPx,
("ramMb" .=) <$> _dmRamMb,
("cpuMake" .=) <$> _dmCPUMake,
("screenHeightPx" .=) <$> _dmScreenHeightPx,
("nativePlatform" .=) <$> _dmNATivePlatform,
("deviceClass" .=) <$> _dmDeviceClass,
("cpuModel" .=) <$> _dmCPUModel,
("screenDensityDpi" .=) <$> _dmScreenDensityDpi])
data DeveloperComment =
DeveloperComment'
{ _dcText :: !(Maybe Text)
, _dcLastModified :: !(Maybe Timestamp)
}
deriving (Eq, Show, Data, Typeable, Generic)
developerComment
:: DeveloperComment
developerComment =
DeveloperComment' {_dcText = Nothing, _dcLastModified = Nothing}
dcText :: Lens' DeveloperComment (Maybe Text)
dcText = lens _dcText (\ s a -> s{_dcText = a})
dcLastModified :: Lens' DeveloperComment (Maybe Timestamp)
dcLastModified
= lens _dcLastModified
(\ s a -> s{_dcLastModified = a})
instance FromJSON DeveloperComment where
parseJSON
= withObject "DeveloperComment"
(\ o ->
DeveloperComment' <$>
(o .:? "text") <*> (o .:? "lastModified"))
instance ToJSON DeveloperComment where
toJSON DeveloperComment'{..}
= object
(catMaybes
[("text" .=) <$> _dcText,
("lastModified" .=) <$> _dcLastModified])
data InAppProduct =
InAppProduct'
{ _iapStatus :: !(Maybe Text)
, _iapGracePeriod :: !(Maybe Text)
, _iapTrialPeriod :: !(Maybe Text)
, _iapPackageName :: !(Maybe Text)
, _iapSeason :: !(Maybe Season)
, _iapPurchaseType :: !(Maybe Text)
, _iapSubscriptionPeriod :: !(Maybe Text)
, _iapPrices :: !(Maybe InAppProductPrices)
, _iapSKU :: !(Maybe Text)
, _iapDefaultPrice :: !(Maybe Price)
, _iapListings :: !(Maybe InAppProductListings)
, _iapDefaultLanguage :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
inAppProduct
:: InAppProduct
inAppProduct =
InAppProduct'
{ _iapStatus = Nothing
, _iapGracePeriod = Nothing
, _iapTrialPeriod = Nothing
, _iapPackageName = Nothing
, _iapSeason = Nothing
, _iapPurchaseType = Nothing
, _iapSubscriptionPeriod = Nothing
, _iapPrices = Nothing
, _iapSKU = Nothing
, _iapDefaultPrice = Nothing
, _iapListings = Nothing
, _iapDefaultLanguage = Nothing
}
iapStatus :: Lens' InAppProduct (Maybe Text)
iapStatus
= lens _iapStatus (\ s a -> s{_iapStatus = a})
iapGracePeriod :: Lens' InAppProduct (Maybe Text)
iapGracePeriod
= lens _iapGracePeriod
(\ s a -> s{_iapGracePeriod = a})
iapTrialPeriod :: Lens' InAppProduct (Maybe Text)
iapTrialPeriod
= lens _iapTrialPeriod
(\ s a -> s{_iapTrialPeriod = a})
iapPackageName :: Lens' InAppProduct (Maybe Text)
iapPackageName
= lens _iapPackageName
(\ s a -> s{_iapPackageName = a})
iapSeason :: Lens' InAppProduct (Maybe Season)
iapSeason
= lens _iapSeason (\ s a -> s{_iapSeason = a})
iapPurchaseType :: Lens' InAppProduct (Maybe Text)
iapPurchaseType
= lens _iapPurchaseType
(\ s a -> s{_iapPurchaseType = a})
iapSubscriptionPeriod :: Lens' InAppProduct (Maybe Text)
iapSubscriptionPeriod
= lens _iapSubscriptionPeriod
(\ s a -> s{_iapSubscriptionPeriod = a})
iapPrices :: Lens' InAppProduct (Maybe InAppProductPrices)
iapPrices
= lens _iapPrices (\ s a -> s{_iapPrices = a})
iapSKU :: Lens' InAppProduct (Maybe Text)
iapSKU = lens _iapSKU (\ s a -> s{_iapSKU = a})
iapDefaultPrice :: Lens' InAppProduct (Maybe Price)
iapDefaultPrice
= lens _iapDefaultPrice
(\ s a -> s{_iapDefaultPrice = a})
iapListings :: Lens' InAppProduct (Maybe InAppProductListings)
iapListings
= lens _iapListings (\ s a -> s{_iapListings = a})
iapDefaultLanguage :: Lens' InAppProduct (Maybe Text)
iapDefaultLanguage
= lens _iapDefaultLanguage
(\ s a -> s{_iapDefaultLanguage = a})
instance FromJSON InAppProduct where
parseJSON
= withObject "InAppProduct"
(\ o ->
InAppProduct' <$>
(o .:? "status") <*> (o .:? "gracePeriod") <*>
(o .:? "trialPeriod")
<*> (o .:? "packageName")
<*> (o .:? "season")
<*> (o .:? "purchaseType")
<*> (o .:? "subscriptionPeriod")
<*> (o .:? "prices")
<*> (o .:? "sku")
<*> (o .:? "defaultPrice")
<*> (o .:? "listings")
<*> (o .:? "defaultLanguage"))
instance ToJSON InAppProduct where
toJSON InAppProduct'{..}
= object
(catMaybes
[("status" .=) <$> _iapStatus,
("gracePeriod" .=) <$> _iapGracePeriod,
("trialPeriod" .=) <$> _iapTrialPeriod,
("packageName" .=) <$> _iapPackageName,
("season" .=) <$> _iapSeason,
("purchaseType" .=) <$> _iapPurchaseType,
("subscriptionPeriod" .=) <$> _iapSubscriptionPeriod,
("prices" .=) <$> _iapPrices, ("sku" .=) <$> _iapSKU,
("defaultPrice" .=) <$> _iapDefaultPrice,
("listings" .=) <$> _iapListings,
("defaultLanguage" .=) <$> _iapDefaultLanguage])
data Price =
Price'
{ _pPriceMicros :: !(Maybe Text)
, _pCurrency :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
price
:: Price
price = Price' {_pPriceMicros = Nothing, _pCurrency = Nothing}
pPriceMicros :: Lens' Price (Maybe Text)
pPriceMicros
= lens _pPriceMicros (\ s a -> s{_pPriceMicros = a})
pCurrency :: Lens' Price (Maybe Text)
pCurrency
= lens _pCurrency (\ s a -> s{_pCurrency = a})
instance FromJSON Price where
parseJSON
= withObject "Price"
(\ o ->
Price' <$>
(o .:? "priceMicros") <*> (o .:? "currency"))
instance ToJSON Price where
toJSON Price'{..}
= object
(catMaybes
[("priceMicros" .=) <$> _pPriceMicros,
("currency" .=) <$> _pCurrency])
data APKBinary =
APKBinary'
{ _apkbSha1 :: !(Maybe Text)
, _apkbSha256 :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
aPKBinary
:: APKBinary
aPKBinary = APKBinary' {_apkbSha1 = Nothing, _apkbSha256 = Nothing}
apkbSha1 :: Lens' APKBinary (Maybe Text)
apkbSha1 = lens _apkbSha1 (\ s a -> s{_apkbSha1 = a})
apkbSha256 :: Lens' APKBinary (Maybe Text)
apkbSha256
= lens _apkbSha256 (\ s a -> s{_apkbSha256 = a})
instance FromJSON APKBinary where
parseJSON
= withObject "APKBinary"
(\ o ->
APKBinary' <$> (o .:? "sha1") <*> (o .:? "sha256"))
instance ToJSON APKBinary where
toJSON APKBinary'{..}
= object
(catMaybes
[("sha1" .=) <$> _apkbSha1,
("sha256" .=) <$> _apkbSha256])
data APKsListResponse =
APKsListResponse'
{ _apklrKind :: !Text
, _apklrAPKs :: !(Maybe [APK])
}
deriving (Eq, Show, Data, Typeable, Generic)
aPKsListResponse
:: APKsListResponse
aPKsListResponse =
APKsListResponse'
{_apklrKind = "androidpublisher#apksListResponse", _apklrAPKs = Nothing}
apklrKind :: Lens' APKsListResponse Text
apklrKind
= lens _apklrKind (\ s a -> s{_apklrKind = a})
apklrAPKs :: Lens' APKsListResponse [APK]
apklrAPKs
= lens _apklrAPKs (\ s a -> s{_apklrAPKs = a}) .
_Default
. _Coerce
instance FromJSON APKsListResponse where
parseJSON
= withObject "APKsListResponse"
(\ o ->
APKsListResponse' <$>
(o .:? "kind" .!=
"androidpublisher#apksListResponse")
<*> (o .:? "apks" .!= mempty))
instance ToJSON APKsListResponse where
toJSON APKsListResponse'{..}
= object
(catMaybes
[Just ("kind" .= _apklrKind),
("apks" .=) <$> _apklrAPKs])
newtype ReviewsReplyResponse =
ReviewsReplyResponse'
{ _rrrResult :: Maybe ReviewReplyResult
}
deriving (Eq, Show, Data, Typeable, Generic)
reviewsReplyResponse
:: ReviewsReplyResponse
reviewsReplyResponse = ReviewsReplyResponse' {_rrrResult = Nothing}
rrrResult :: Lens' ReviewsReplyResponse (Maybe ReviewReplyResult)
rrrResult
= lens _rrrResult (\ s a -> s{_rrrResult = a})
instance FromJSON ReviewsReplyResponse where
parseJSON
= withObject "ReviewsReplyResponse"
(\ o -> ReviewsReplyResponse' <$> (o .:? "result"))
instance ToJSON ReviewsReplyResponse where
toJSON ReviewsReplyResponse'{..}
= object (catMaybes [("result" .=) <$> _rrrResult])
data ExternallyHostedAPKUsesPermission =
ExternallyHostedAPKUsesPermission'
{ _ehapkupName :: !(Maybe Text)
, _ehapkupMaxSdkVersion :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
externallyHostedAPKUsesPermission
:: ExternallyHostedAPKUsesPermission
externallyHostedAPKUsesPermission =
ExternallyHostedAPKUsesPermission'
{_ehapkupName = Nothing, _ehapkupMaxSdkVersion = Nothing}
ehapkupName :: Lens' ExternallyHostedAPKUsesPermission (Maybe Text)
ehapkupName
= lens _ehapkupName (\ s a -> s{_ehapkupName = a})
ehapkupMaxSdkVersion :: Lens' ExternallyHostedAPKUsesPermission (Maybe Int32)
ehapkupMaxSdkVersion
= lens _ehapkupMaxSdkVersion
(\ s a -> s{_ehapkupMaxSdkVersion = a})
. mapping _Coerce
instance FromJSON ExternallyHostedAPKUsesPermission
where
parseJSON
= withObject "ExternallyHostedAPKUsesPermission"
(\ o ->
ExternallyHostedAPKUsesPermission' <$>
(o .:? "name") <*> (o .:? "maxSdkVersion"))
instance ToJSON ExternallyHostedAPKUsesPermission
where
toJSON ExternallyHostedAPKUsesPermission'{..}
= object
(catMaybes
[("name" .=) <$> _ehapkupName,
("maxSdkVersion" .=) <$> _ehapkupMaxSdkVersion])
data ListingsListResponse =
ListingsListResponse'
{ _llrKind :: !Text
, _llrListings :: !(Maybe [Listing])
}
deriving (Eq, Show, Data, Typeable, Generic)
listingsListResponse
:: ListingsListResponse
listingsListResponse =
ListingsListResponse'
{_llrKind = "androidpublisher#listingsListResponse", _llrListings = Nothing}
llrKind :: Lens' ListingsListResponse Text
llrKind = lens _llrKind (\ s a -> s{_llrKind = a})
llrListings :: Lens' ListingsListResponse [Listing]
llrListings
= lens _llrListings (\ s a -> s{_llrListings = a}) .
_Default
. _Coerce
instance FromJSON ListingsListResponse where
parseJSON
= withObject "ListingsListResponse"
(\ o ->
ListingsListResponse' <$>
(o .:? "kind" .!=
"androidpublisher#listingsListResponse")
<*> (o .:? "listings" .!= mempty))
instance ToJSON ListingsListResponse where
toJSON ListingsListResponse'{..}
= object
(catMaybes
[Just ("kind" .= _llrKind),
("listings" .=) <$> _llrListings])
newtype APKsAddExternallyHostedRequest =
APKsAddExternallyHostedRequest'
{ _aExternallyHostedAPK :: Maybe ExternallyHostedAPK
}
deriving (Eq, Show, Data, Typeable, Generic)
aPKsAddExternallyHostedRequest
:: APKsAddExternallyHostedRequest
aPKsAddExternallyHostedRequest =
APKsAddExternallyHostedRequest' {_aExternallyHostedAPK = Nothing}
aExternallyHostedAPK :: Lens' APKsAddExternallyHostedRequest (Maybe ExternallyHostedAPK)
aExternallyHostedAPK
= lens _aExternallyHostedAPK
(\ s a -> s{_aExternallyHostedAPK = a})
instance FromJSON APKsAddExternallyHostedRequest
where
parseJSON
= withObject "APKsAddExternallyHostedRequest"
(\ o ->
APKsAddExternallyHostedRequest' <$>
(o .:? "externallyHostedApk"))
instance ToJSON APKsAddExternallyHostedRequest where
toJSON APKsAddExternallyHostedRequest'{..}
= object
(catMaybes
[("externallyHostedApk" .=) <$>
_aExternallyHostedAPK])
data Comment =
Comment'
{ _cUserComment :: !(Maybe UserComment)
, _cDeveloperComment :: !(Maybe DeveloperComment)
}
deriving (Eq, Show, Data, Typeable, Generic)
comment
:: Comment
comment = Comment' {_cUserComment = Nothing, _cDeveloperComment = Nothing}
cUserComment :: Lens' Comment (Maybe UserComment)
cUserComment
= lens _cUserComment (\ s a -> s{_cUserComment = a})
cDeveloperComment :: Lens' Comment (Maybe DeveloperComment)
cDeveloperComment
= lens _cDeveloperComment
(\ s a -> s{_cDeveloperComment = a})
instance FromJSON Comment where
parseJSON
= withObject "Comment"
(\ o ->
Comment' <$>
(o .:? "userComment") <*> (o .:? "developerComment"))
instance ToJSON Comment where
toJSON Comment'{..}
= object
(catMaybes
[("userComment" .=) <$> _cUserComment,
("developerComment" .=) <$> _cDeveloperComment])
data Timestamp =
Timestamp'
{ _tNanos :: !(Maybe (Textual Int32))
, _tSeconds :: !(Maybe (Textual Int64))
}
deriving (Eq, Show, Data, Typeable, Generic)
timestamp
:: Timestamp
timestamp = Timestamp' {_tNanos = Nothing, _tSeconds = Nothing}
tNanos :: Lens' Timestamp (Maybe Int32)
tNanos
= lens _tNanos (\ s a -> s{_tNanos = a}) .
mapping _Coerce
tSeconds :: Lens' Timestamp (Maybe Int64)
tSeconds
= lens _tSeconds (\ s a -> s{_tSeconds = a}) .
mapping _Coerce
instance FromJSON Timestamp where
parseJSON
= withObject "Timestamp"
(\ o ->
Timestamp' <$> (o .:? "nanos") <*> (o .:? "seconds"))
instance ToJSON Timestamp where
toJSON Timestamp'{..}
= object
(catMaybes
[("nanos" .=) <$> _tNanos,
("seconds" .=) <$> _tSeconds])
data VoidedPurchase =
VoidedPurchase'
{ _vpKind :: !Text
, _vpPurchaseTimeMillis :: !(Maybe (Textual Int64))
, _vpPurchaseToken :: !(Maybe Text)
, _vpVoidedTimeMillis :: !(Maybe (Textual Int64))
}
deriving (Eq, Show, Data, Typeable, Generic)
voidedPurchase
:: VoidedPurchase
voidedPurchase =
VoidedPurchase'
{ _vpKind = "androidpublisher#voidedPurchase"
, _vpPurchaseTimeMillis = Nothing
, _vpPurchaseToken = Nothing
, _vpVoidedTimeMillis = Nothing
}
vpKind :: Lens' VoidedPurchase Text
vpKind = lens _vpKind (\ s a -> s{_vpKind = a})
vpPurchaseTimeMillis :: Lens' VoidedPurchase (Maybe Int64)
vpPurchaseTimeMillis
= lens _vpPurchaseTimeMillis
(\ s a -> s{_vpPurchaseTimeMillis = a})
. mapping _Coerce
vpPurchaseToken :: Lens' VoidedPurchase (Maybe Text)
vpPurchaseToken
= lens _vpPurchaseToken
(\ s a -> s{_vpPurchaseToken = a})
vpVoidedTimeMillis :: Lens' VoidedPurchase (Maybe Int64)
vpVoidedTimeMillis
= lens _vpVoidedTimeMillis
(\ s a -> s{_vpVoidedTimeMillis = a})
. mapping _Coerce
instance FromJSON VoidedPurchase where
parseJSON
= withObject "VoidedPurchase"
(\ o ->
VoidedPurchase' <$>
(o .:? "kind" .!= "androidpublisher#voidedPurchase")
<*> (o .:? "purchaseTimeMillis")
<*> (o .:? "purchaseToken")
<*> (o .:? "voidedTimeMillis"))
instance ToJSON VoidedPurchase where
toJSON VoidedPurchase'{..}
= object
(catMaybes
[Just ("kind" .= _vpKind),
("purchaseTimeMillis" .=) <$> _vpPurchaseTimeMillis,
("purchaseToken" .=) <$> _vpPurchaseToken,
("voidedTimeMillis" .=) <$> _vpVoidedTimeMillis])
data BundlesListResponse =
BundlesListResponse'
{ _blrBundles :: !(Maybe [Bundle])
, _blrKind :: !Text
}
deriving (Eq, Show, Data, Typeable, Generic)
bundlesListResponse
:: BundlesListResponse
bundlesListResponse =
BundlesListResponse'
{_blrBundles = Nothing, _blrKind = "androidpublisher#bundlesListResponse"}
blrBundles :: Lens' BundlesListResponse [Bundle]
blrBundles
= lens _blrBundles (\ s a -> s{_blrBundles = a}) .
_Default
. _Coerce
blrKind :: Lens' BundlesListResponse Text
blrKind = lens _blrKind (\ s a -> s{_blrKind = a})
instance FromJSON BundlesListResponse where
parseJSON
= withObject "BundlesListResponse"
(\ o ->
BundlesListResponse' <$>
(o .:? "bundles" .!= mempty) <*>
(o .:? "kind" .!=
"androidpublisher#bundlesListResponse"))
instance ToJSON BundlesListResponse where
toJSON BundlesListResponse'{..}
= object
(catMaybes
[("bundles" .=) <$> _blrBundles,
Just ("kind" .= _blrKind)])
data ReviewReplyResult =
ReviewReplyResult'
{ _rReplyText :: !(Maybe Text)
, _rLastEdited :: !(Maybe Timestamp)
}
deriving (Eq, Show, Data, Typeable, Generic)
reviewReplyResult
:: ReviewReplyResult
reviewReplyResult =
ReviewReplyResult' {_rReplyText = Nothing, _rLastEdited = Nothing}
rReplyText :: Lens' ReviewReplyResult (Maybe Text)
rReplyText
= lens _rReplyText (\ s a -> s{_rReplyText = a})
rLastEdited :: Lens' ReviewReplyResult (Maybe Timestamp)
rLastEdited
= lens _rLastEdited (\ s a -> s{_rLastEdited = a})
instance FromJSON ReviewReplyResult where
parseJSON
= withObject "ReviewReplyResult"
(\ o ->
ReviewReplyResult' <$>
(o .:? "replyText") <*> (o .:? "lastEdited"))
instance ToJSON ReviewReplyResult where
toJSON ReviewReplyResult'{..}
= object
(catMaybes
[("replyText" .=) <$> _rReplyText,
("lastEdited" .=) <$> _rLastEdited])