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
newtype InAppProductsUpdateResponse = InAppProductsUpdateResponse
{ _iapurInAppProduct :: Maybe InAppProduct
} deriving (Eq,Show,Data,Typeable,Generic)
inAppProductsUpdateResponse
:: InAppProductsUpdateResponse
inAppProductsUpdateResponse =
InAppProductsUpdateResponse
{ _iapurInAppProduct = Nothing
}
iapurInAppProduct :: Lens' InAppProductsUpdateResponse (Maybe InAppProduct)
iapurInAppProduct
= lens _iapurInAppProduct
(\ s a -> s{_iapurInAppProduct = a})
instance FromJSON InAppProductsUpdateResponse where
parseJSON
= withObject "InAppProductsUpdateResponse"
(\ o ->
InAppProductsUpdateResponse <$>
(o .:? "inappproduct"))
instance ToJSON InAppProductsUpdateResponse where
toJSON InAppProductsUpdateResponse{..}
= object
(catMaybes
[("inappproduct" .=) <$> _iapurInAppProduct])
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
{ _tVersionCodes :: !(Maybe [Textual Int32])
, _tTrack :: !(Maybe Text)
, _tUserFraction :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
track
:: Track
track =
Track
{ _tVersionCodes = Nothing
, _tTrack = Nothing
, _tUserFraction = Nothing
}
tVersionCodes :: Lens' Track [Int32]
tVersionCodes
= lens _tVersionCodes
(\ s a -> s{_tVersionCodes = a})
. _Default
. _Coerce
tTrack :: Lens' Track (Maybe Text)
tTrack = lens _tTrack (\ s a -> s{_tTrack = a})
tUserFraction :: Lens' Track (Maybe Double)
tUserFraction
= lens _tUserFraction
(\ s a -> s{_tUserFraction = a})
. mapping _Coerce
instance FromJSON Track where
parseJSON
= withObject "Track"
(\ o ->
Track <$>
(o .:? "versionCodes" .!= mempty) <*> (o .:? "track")
<*> (o .:? "userFraction"))
instance ToJSON Track where
toJSON Track{..}
= object
(catMaybes
[("versionCodes" .=) <$> _tVersionCodes,
("track" .=) <$> _tTrack,
("userFraction" .=) <$> _tUserFraction])
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 InAppProductsBatchRequestEntry = InAppProductsBatchRequestEntry
{ _iapbreMethodName :: !(Maybe Text)
, _iapbreInAppProductsinsertrequest :: !(Maybe InAppProductsInsertRequest)
, _iapbreInAppProductsupdaterequest :: !(Maybe InAppProductsUpdateRequest)
, _iapbreBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
inAppProductsBatchRequestEntry
:: InAppProductsBatchRequestEntry
inAppProductsBatchRequestEntry =
InAppProductsBatchRequestEntry
{ _iapbreMethodName = Nothing
, _iapbreInAppProductsinsertrequest = Nothing
, _iapbreInAppProductsupdaterequest = Nothing
, _iapbreBatchId = Nothing
}
iapbreMethodName :: Lens' InAppProductsBatchRequestEntry (Maybe Text)
iapbreMethodName
= lens _iapbreMethodName
(\ s a -> s{_iapbreMethodName = a})
iapbreInAppProductsinsertrequest :: Lens' InAppProductsBatchRequestEntry (Maybe InAppProductsInsertRequest)
iapbreInAppProductsinsertrequest
= lens _iapbreInAppProductsinsertrequest
(\ s a -> s{_iapbreInAppProductsinsertrequest = a})
iapbreInAppProductsupdaterequest :: Lens' InAppProductsBatchRequestEntry (Maybe InAppProductsUpdateRequest)
iapbreInAppProductsupdaterequest
= lens _iapbreInAppProductsupdaterequest
(\ s a -> s{_iapbreInAppProductsupdaterequest = a})
iapbreBatchId :: Lens' InAppProductsBatchRequestEntry (Maybe Word32)
iapbreBatchId
= lens _iapbreBatchId
(\ s a -> s{_iapbreBatchId = a})
. mapping _Coerce
instance FromJSON InAppProductsBatchRequestEntry
where
parseJSON
= withObject "InAppProductsBatchRequestEntry"
(\ o ->
InAppProductsBatchRequestEntry <$>
(o .:? "methodName") <*>
(o .:? "inappproductsinsertrequest")
<*> (o .:? "inappproductsupdaterequest")
<*> (o .:? "batchId"))
instance ToJSON InAppProductsBatchRequestEntry where
toJSON InAppProductsBatchRequestEntry{..}
= object
(catMaybes
[("methodName" .=) <$> _iapbreMethodName,
("inappproductsinsertrequest" .=) <$>
_iapbreInAppProductsinsertrequest,
("inappproductsupdaterequest" .=) <$>
_iapbreInAppProductsupdaterequest,
("batchId" .=) <$> _iapbreBatchId])
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 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 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)
} deriving (Eq,Show,Data,Typeable,Generic)
season
:: Season
season =
Season
{ _sStart = Nothing
, _sEnd = 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})
instance FromJSON Season where
parseJSON
= withObject "Season"
(\ o -> Season <$> (o .:? "start") <*> (o .:? "end"))
instance ToJSON Season where
toJSON Season{..}
= object
(catMaybes
[("start" .=) <$> _sStart, ("end" .=) <$> _sEnd])
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))
, _ppDeveloperPayload :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productPurchase
:: ProductPurchase
productPurchase =
ProductPurchase
{ _ppPurchaseState = Nothing
, _ppConsumptionState = Nothing
, _ppKind = "androidpublisher#productPurchase"
, _ppPurchaseTimeMillis = Nothing
, _ppDeveloperPayload = 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
ppDeveloperPayload :: Lens' ProductPurchase (Maybe Text)
ppDeveloperPayload
= lens _ppDeveloperPayload
(\ s a -> s{_ppDeveloperPayload = a})
instance FromJSON ProductPurchase where
parseJSON
= withObject "ProductPurchase"
(\ o ->
ProductPurchase <$>
(o .:? "purchaseState") <*>
(o .:? "consumptionState")
<*>
(o .:? "kind" .!= "androidpublisher#productPurchase")
<*> (o .:? "purchaseTimeMillis")
<*> (o .:? "developerPayload"))
instance ToJSON ProductPurchase where
toJSON ProductPurchase{..}
= object
(catMaybes
[("purchaseState" .=) <$> _ppPurchaseState,
("consumptionState" .=) <$> _ppConsumptionState,
Just ("kind" .= _ppKind),
("purchaseTimeMillis" .=) <$> _ppPurchaseTimeMillis,
("developerPayload" .=) <$> _ppDeveloperPayload])
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 APKListing = APKListing
{ _apklLanguage :: !(Maybe Text)
, _apklRecentChanges :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
aPKListing
:: APKListing
aPKListing =
APKListing
{ _apklLanguage = Nothing
, _apklRecentChanges = Nothing
}
apklLanguage :: Lens' APKListing (Maybe Text)
apklLanguage
= lens _apklLanguage (\ s a -> s{_apklLanguage = a})
apklRecentChanges :: Lens' APKListing (Maybe Text)
apklRecentChanges
= lens _apklRecentChanges
(\ s a -> s{_apklRecentChanges = a})
instance FromJSON APKListing where
parseJSON
= withObject "APKListing"
(\ o ->
APKListing <$>
(o .:? "language") <*> (o .:? "recentChanges"))
instance ToJSON APKListing where
toJSON APKListing{..}
= object
(catMaybes
[("language" .=) <$> _apklLanguage,
("recentChanges" .=) <$> _apklRecentChanges])
data SubscriptionPurchase = SubscriptionPurchase
{ _spKind :: !Text
, _spExpiryTimeMillis :: !(Maybe (Textual Int64))
, _spAutoRenewing :: !(Maybe Bool)
, _spStartTimeMillis :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
subscriptionPurchase
:: SubscriptionPurchase
subscriptionPurchase =
SubscriptionPurchase
{ _spKind = "androidpublisher#subscriptionPurchase"
, _spExpiryTimeMillis = Nothing
, _spAutoRenewing = Nothing
, _spStartTimeMillis = Nothing
}
spKind :: Lens' SubscriptionPurchase Text
spKind = lens _spKind (\ s a -> s{_spKind = 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})
spStartTimeMillis :: Lens' SubscriptionPurchase (Maybe Int64)
spStartTimeMillis
= lens _spStartTimeMillis
(\ s a -> s{_spStartTimeMillis = a})
. mapping _Coerce
instance FromJSON SubscriptionPurchase where
parseJSON
= withObject "SubscriptionPurchase"
(\ o ->
SubscriptionPurchase <$>
(o .:? "kind" .!=
"androidpublisher#subscriptionPurchase")
<*> (o .:? "expiryTimeMillis")
<*> (o .:? "autoRenewing")
<*> (o .:? "startTimeMillis"))
instance ToJSON SubscriptionPurchase where
toJSON SubscriptionPurchase{..}
= object
(catMaybes
[Just ("kind" .= _spKind),
("expiryTimeMillis" .=) <$> _spExpiryTimeMillis,
("autoRenewing" .=) <$> _spAutoRenewing,
("startTimeMillis" .=) <$> _spStartTimeMillis])
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
newtype InAppProductsBatchRequest = InAppProductsBatchRequest
{ _iapbrEntrys :: Maybe [InAppProductsBatchRequestEntry]
} deriving (Eq,Show,Data,Typeable,Generic)
inAppProductsBatchRequest
:: InAppProductsBatchRequest
inAppProductsBatchRequest =
InAppProductsBatchRequest
{ _iapbrEntrys = Nothing
}
iapbrEntrys :: Lens' InAppProductsBatchRequest [InAppProductsBatchRequestEntry]
iapbrEntrys
= lens _iapbrEntrys (\ s a -> s{_iapbrEntrys = a}) .
_Default
. _Coerce
instance FromJSON InAppProductsBatchRequest where
parseJSON
= withObject "InAppProductsBatchRequest"
(\ o ->
InAppProductsBatchRequest <$>
(o .:? "entrys" .!= mempty))
instance ToJSON InAppProductsBatchRequest where
toJSON InAppProductsBatchRequest{..}
= object (catMaybes [("entrys" .=) <$> _iapbrEntrys])
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])
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 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 APKListingsListResponse = APKListingsListResponse
{ _apkllrKind :: !Text
, _apkllrListings :: !(Maybe [APKListing])
} deriving (Eq,Show,Data,Typeable,Generic)
aPKListingsListResponse
:: APKListingsListResponse
aPKListingsListResponse =
APKListingsListResponse
{ _apkllrKind = "androidpublisher#apkListingsListResponse"
, _apkllrListings = Nothing
}
apkllrKind :: Lens' APKListingsListResponse Text
apkllrKind
= lens _apkllrKind (\ s a -> s{_apkllrKind = a})
apkllrListings :: Lens' APKListingsListResponse [APKListing]
apkllrListings
= lens _apkllrListings
(\ s a -> s{_apkllrListings = a})
. _Default
. _Coerce
instance FromJSON APKListingsListResponse where
parseJSON
= withObject "APKListingsListResponse"
(\ o ->
APKListingsListResponse <$>
(o .:? "kind" .!=
"androidpublisher#apkListingsListResponse")
<*> (o .:? "listings" .!= mempty))
instance ToJSON APKListingsListResponse where
toJSON APKListingsListResponse{..}
= object
(catMaybes
[Just ("kind" .= _apkllrKind),
("listings" .=) <$> _apkllrListings])
newtype InAppProductsInsertResponse = InAppProductsInsertResponse
{ _iapirInAppProduct :: Maybe InAppProduct
} deriving (Eq,Show,Data,Typeable,Generic)
inAppProductsInsertResponse
:: InAppProductsInsertResponse
inAppProductsInsertResponse =
InAppProductsInsertResponse
{ _iapirInAppProduct = Nothing
}
iapirInAppProduct :: Lens' InAppProductsInsertResponse (Maybe InAppProduct)
iapirInAppProduct
= lens _iapirInAppProduct
(\ s a -> s{_iapirInAppProduct = a})
instance FromJSON InAppProductsInsertResponse where
parseJSON
= withObject "InAppProductsInsertResponse"
(\ o ->
InAppProductsInsertResponse <$>
(o .:? "inappproduct"))
instance ToJSON InAppProductsInsertResponse where
toJSON InAppProductsInsertResponse{..}
= object
(catMaybes
[("inappproduct" .=) <$> _iapirInAppProduct])
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])
data InAppProduct = InAppProduct
{ _iapStatus :: !(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
, _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})
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 .:? "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,
("trialPeriod" .=) <$> _iapTrialPeriod,
("packageName" .=) <$> _iapPackageName,
("season" .=) <$> _iapSeason,
("purchaseType" .=) <$> _iapPurchaseType,
("subscriptionPeriod" .=) <$> _iapSubscriptionPeriod,
("prices" .=) <$> _iapPrices, ("sku" .=) <$> _iapSKU,
("defaultPrice" .=) <$> _iapDefaultPrice,
("listings" .=) <$> _iapListings,
("defaultLanguage" .=) <$> _iapDefaultLanguage])
data InAppProductsBatchResponseEntry = InAppProductsBatchResponseEntry
{ _iInAppProductsupdateresponse :: !(Maybe InAppProductsUpdateResponse)
, _iInAppProductsinsertresponse :: !(Maybe InAppProductsInsertResponse)
, _iBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
inAppProductsBatchResponseEntry
:: InAppProductsBatchResponseEntry
inAppProductsBatchResponseEntry =
InAppProductsBatchResponseEntry
{ _iInAppProductsupdateresponse = Nothing
, _iInAppProductsinsertresponse = Nothing
, _iBatchId = Nothing
}
iInAppProductsupdateresponse :: Lens' InAppProductsBatchResponseEntry (Maybe InAppProductsUpdateResponse)
iInAppProductsupdateresponse
= lens _iInAppProductsupdateresponse
(\ s a -> s{_iInAppProductsupdateresponse = a})
iInAppProductsinsertresponse :: Lens' InAppProductsBatchResponseEntry (Maybe InAppProductsInsertResponse)
iInAppProductsinsertresponse
= lens _iInAppProductsinsertresponse
(\ s a -> s{_iInAppProductsinsertresponse = a})
iBatchId :: Lens' InAppProductsBatchResponseEntry (Maybe Word32)
iBatchId
= lens _iBatchId (\ s a -> s{_iBatchId = a}) .
mapping _Coerce
instance FromJSON InAppProductsBatchResponseEntry
where
parseJSON
= withObject "InAppProductsBatchResponseEntry"
(\ o ->
InAppProductsBatchResponseEntry <$>
(o .:? "inappproductsupdateresponse") <*>
(o .:? "inappproductsinsertresponse")
<*> (o .:? "batchId"))
instance ToJSON InAppProductsBatchResponseEntry where
toJSON InAppProductsBatchResponseEntry{..}
= object
(catMaybes
[("inappproductsupdateresponse" .=) <$>
_iInAppProductsupdateresponse,
("inappproductsinsertresponse" .=) <$>
_iInAppProductsinsertresponse,
("batchId" .=) <$> _iBatchId])
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])
newtype APKBinary = APKBinary
{ _apkbSha1 :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
aPKBinary
:: APKBinary
aPKBinary =
APKBinary
{ _apkbSha1 = Nothing
}
apkbSha1 :: Lens' APKBinary (Maybe Text)
apkbSha1 = lens _apkbSha1 (\ s a -> s{_apkbSha1 = a})
instance FromJSON APKBinary where
parseJSON
= withObject "APKBinary"
(\ o -> APKBinary <$> (o .:? "sha1"))
instance ToJSON APKBinary where
toJSON APKBinary{..}
= object (catMaybes [("sha1" .=) <$> _apkbSha1])
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])
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])
newtype InAppProductsInsertRequest = InAppProductsInsertRequest
{ _iInAppProduct :: Maybe InAppProduct
} deriving (Eq,Show,Data,Typeable,Generic)
inAppProductsInsertRequest
:: InAppProductsInsertRequest
inAppProductsInsertRequest =
InAppProductsInsertRequest
{ _iInAppProduct = Nothing
}
iInAppProduct :: Lens' InAppProductsInsertRequest (Maybe InAppProduct)
iInAppProduct
= lens _iInAppProduct
(\ s a -> s{_iInAppProduct = a})
instance FromJSON InAppProductsInsertRequest where
parseJSON
= withObject "InAppProductsInsertRequest"
(\ o ->
InAppProductsInsertRequest <$>
(o .:? "inappproduct"))
instance ToJSON InAppProductsInsertRequest where
toJSON InAppProductsInsertRequest{..}
= object
(catMaybes [("inappproduct" .=) <$> _iInAppProduct])
data EntitlementsListResponse = EntitlementsListResponse
{ _elrTokenPagination :: !(Maybe TokenPagination)
, _elrPageInfo :: !(Maybe PageInfo)
, _elrResources :: !(Maybe [Entitlement])
} deriving (Eq,Show,Data,Typeable,Generic)
entitlementsListResponse
:: EntitlementsListResponse
entitlementsListResponse =
EntitlementsListResponse
{ _elrTokenPagination = Nothing
, _elrPageInfo = Nothing
, _elrResources = Nothing
}
elrTokenPagination :: Lens' EntitlementsListResponse (Maybe TokenPagination)
elrTokenPagination
= lens _elrTokenPagination
(\ s a -> s{_elrTokenPagination = a})
elrPageInfo :: Lens' EntitlementsListResponse (Maybe PageInfo)
elrPageInfo
= lens _elrPageInfo (\ s a -> s{_elrPageInfo = a})
elrResources :: Lens' EntitlementsListResponse [Entitlement]
elrResources
= lens _elrResources (\ s a -> s{_elrResources = a})
. _Default
. _Coerce
instance FromJSON EntitlementsListResponse where
parseJSON
= withObject "EntitlementsListResponse"
(\ o ->
EntitlementsListResponse <$>
(o .:? "tokenPagination") <*> (o .:? "pageInfo") <*>
(o .:? "resources" .!= mempty))
instance ToJSON EntitlementsListResponse where
toJSON EntitlementsListResponse{..}
= object
(catMaybes
[("tokenPagination" .=) <$> _elrTokenPagination,
("pageInfo" .=) <$> _elrPageInfo,
("resources" .=) <$> _elrResources])
newtype InAppProductsUpdateRequest = InAppProductsUpdateRequest
{ _inInAppProduct :: Maybe InAppProduct
} deriving (Eq,Show,Data,Typeable,Generic)
inAppProductsUpdateRequest
:: InAppProductsUpdateRequest
inAppProductsUpdateRequest =
InAppProductsUpdateRequest
{ _inInAppProduct = Nothing
}
inInAppProduct :: Lens' InAppProductsUpdateRequest (Maybe InAppProduct)
inInAppProduct
= lens _inInAppProduct
(\ s a -> s{_inInAppProduct = a})
instance FromJSON InAppProductsUpdateRequest where
parseJSON
= withObject "InAppProductsUpdateRequest"
(\ o ->
InAppProductsUpdateRequest <$>
(o .:? "inappproduct"))
instance ToJSON InAppProductsUpdateRequest where
toJSON InAppProductsUpdateRequest{..}
= object
(catMaybes [("inappproduct" .=) <$> _inInAppProduct])
data Entitlement = Entitlement
{ _eKind :: !Text
, _eProductType :: !(Maybe Text)
, _eToken :: !(Maybe Text)
, _eProductId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
entitlement
:: Entitlement
entitlement =
Entitlement
{ _eKind = "androidpublisher#entitlement"
, _eProductType = Nothing
, _eToken = Nothing
, _eProductId = Nothing
}
eKind :: Lens' Entitlement Text
eKind = lens _eKind (\ s a -> s{_eKind = a})
eProductType :: Lens' Entitlement (Maybe Text)
eProductType
= lens _eProductType (\ s a -> s{_eProductType = a})
eToken :: Lens' Entitlement (Maybe Text)
eToken = lens _eToken (\ s a -> s{_eToken = a})
eProductId :: Lens' Entitlement (Maybe Text)
eProductId
= lens _eProductId (\ s a -> s{_eProductId = a})
instance FromJSON Entitlement where
parseJSON
= withObject "Entitlement"
(\ o ->
Entitlement <$>
(o .:? "kind" .!= "androidpublisher#entitlement") <*>
(o .:? "productType")
<*> (o .:? "token")
<*> (o .:? "productId"))
instance ToJSON Entitlement where
toJSON Entitlement{..}
= object
(catMaybes
[Just ("kind" .= _eKind),
("productType" .=) <$> _eProductType,
("token" .=) <$> _eToken,
("productId" .=) <$> _eProductId])
data InAppProductsBatchResponse = InAppProductsBatchResponse
{ _iEntrys :: !(Maybe [InAppProductsBatchResponseEntry])
, _iKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
inAppProductsBatchResponse
:: InAppProductsBatchResponse
inAppProductsBatchResponse =
InAppProductsBatchResponse
{ _iEntrys = Nothing
, _iKind = "androidpublisher#inappproductsBatchResponse"
}
iEntrys :: Lens' InAppProductsBatchResponse [InAppProductsBatchResponseEntry]
iEntrys
= lens _iEntrys (\ s a -> s{_iEntrys = a}) . _Default
. _Coerce
iKind :: Lens' InAppProductsBatchResponse Text
iKind = lens _iKind (\ s a -> s{_iKind = a})
instance FromJSON InAppProductsBatchResponse where
parseJSON
= withObject "InAppProductsBatchResponse"
(\ o ->
InAppProductsBatchResponse <$>
(o .:? "entrys" .!= mempty) <*>
(o .:? "kind" .!=
"androidpublisher#inappproductsBatchResponse"))
instance ToJSON InAppProductsBatchResponse where
toJSON InAppProductsBatchResponse{..}
= object
(catMaybes
[("entrys" .=) <$> _iEntrys,
Just ("kind" .= _iKind)])