{-# 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.PlayMoviesPartner.Types.Product where
import Network.Google.PlayMoviesPartner.Types.Sum
import Network.Google.Prelude
data Avail = Avail'
{ _aAltId :: !(Maybe Text)
, _aPphNames :: !(Maybe [Text])
, _aCaptionExemption :: !(Maybe Text)
, _aRatingSystem :: !(Maybe Text)
, _aSuppressionLiftDate :: !(Maybe Text)
, _aEpisodeNumber :: !(Maybe Text)
, _aPriceType :: !(Maybe Text)
, _aStoreLanguage :: !(Maybe Text)
, _aEpisodeAltId :: !(Maybe Text)
, _aStart :: !(Maybe Text)
, _aTerritory :: !(Maybe Text)
, _aEpisodeTitleInternalAlias :: !(Maybe Text)
, _aLicenseType :: !(Maybe AvailLicenseType)
, _aAvailId :: !(Maybe Text)
, _aSeasonNumber :: !(Maybe Text)
, _aWorkType :: !(Maybe AvailWorkType)
, _aRatingValue :: !(Maybe Text)
, _aSeasonTitleInternalAlias :: !(Maybe Text)
, _aContentId :: !(Maybe Text)
, _aVideoId :: !(Maybe Text)
, _aSeriesAltId :: !(Maybe Text)
, _aEnd :: !(Maybe Text)
, _aSeriesTitleInternalAlias :: !(Maybe Text)
, _aDisplayName :: !(Maybe Text)
, _aReleaseDate :: !(Maybe Text)
, _aFormatProFile :: !(Maybe AvailFormatProFile)
, _aRatingReason :: !(Maybe Text)
, _aEncodeId :: !(Maybe Text)
, _aPriceValue :: !(Maybe Text)
, _aCaptionIncluded :: !(Maybe Bool)
, _aProductId :: !(Maybe Text)
, _aSeasonAltId :: !(Maybe Text)
, _aTitleInternalAlias :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
avail
:: Avail
avail =
Avail'
{ _aAltId = Nothing
, _aPphNames = Nothing
, _aCaptionExemption = Nothing
, _aRatingSystem = Nothing
, _aSuppressionLiftDate = Nothing
, _aEpisodeNumber = Nothing
, _aPriceType = Nothing
, _aStoreLanguage = Nothing
, _aEpisodeAltId = Nothing
, _aStart = Nothing
, _aTerritory = Nothing
, _aEpisodeTitleInternalAlias = Nothing
, _aLicenseType = Nothing
, _aAvailId = Nothing
, _aSeasonNumber = Nothing
, _aWorkType = Nothing
, _aRatingValue = Nothing
, _aSeasonTitleInternalAlias = Nothing
, _aContentId = Nothing
, _aVideoId = Nothing
, _aSeriesAltId = Nothing
, _aEnd = Nothing
, _aSeriesTitleInternalAlias = Nothing
, _aDisplayName = Nothing
, _aReleaseDate = Nothing
, _aFormatProFile = Nothing
, _aRatingReason = Nothing
, _aEncodeId = Nothing
, _aPriceValue = Nothing
, _aCaptionIncluded = Nothing
, _aProductId = Nothing
, _aSeasonAltId = Nothing
, _aTitleInternalAlias = Nothing
}
aAltId :: Lens' Avail (Maybe Text)
aAltId = lens _aAltId (\ s a -> s{_aAltId = a})
aPphNames :: Lens' Avail [Text]
aPphNames
= lens _aPphNames (\ s a -> s{_aPphNames = a}) .
_Default
. _Coerce
aCaptionExemption :: Lens' Avail (Maybe Text)
aCaptionExemption
= lens _aCaptionExemption
(\ s a -> s{_aCaptionExemption = a})
aRatingSystem :: Lens' Avail (Maybe Text)
aRatingSystem
= lens _aRatingSystem
(\ s a -> s{_aRatingSystem = a})
aSuppressionLiftDate :: Lens' Avail (Maybe Text)
aSuppressionLiftDate
= lens _aSuppressionLiftDate
(\ s a -> s{_aSuppressionLiftDate = a})
aEpisodeNumber :: Lens' Avail (Maybe Text)
aEpisodeNumber
= lens _aEpisodeNumber
(\ s a -> s{_aEpisodeNumber = a})
aPriceType :: Lens' Avail (Maybe Text)
aPriceType
= lens _aPriceType (\ s a -> s{_aPriceType = a})
aStoreLanguage :: Lens' Avail (Maybe Text)
aStoreLanguage
= lens _aStoreLanguage
(\ s a -> s{_aStoreLanguage = a})
aEpisodeAltId :: Lens' Avail (Maybe Text)
aEpisodeAltId
= lens _aEpisodeAltId
(\ s a -> s{_aEpisodeAltId = a})
aStart :: Lens' Avail (Maybe Text)
aStart = lens _aStart (\ s a -> s{_aStart = a})
aTerritory :: Lens' Avail (Maybe Text)
aTerritory
= lens _aTerritory (\ s a -> s{_aTerritory = a})
aEpisodeTitleInternalAlias :: Lens' Avail (Maybe Text)
aEpisodeTitleInternalAlias
= lens _aEpisodeTitleInternalAlias
(\ s a -> s{_aEpisodeTitleInternalAlias = a})
aLicenseType :: Lens' Avail (Maybe AvailLicenseType)
aLicenseType
= lens _aLicenseType (\ s a -> s{_aLicenseType = a})
aAvailId :: Lens' Avail (Maybe Text)
aAvailId = lens _aAvailId (\ s a -> s{_aAvailId = a})
aSeasonNumber :: Lens' Avail (Maybe Text)
aSeasonNumber
= lens _aSeasonNumber
(\ s a -> s{_aSeasonNumber = a})
aWorkType :: Lens' Avail (Maybe AvailWorkType)
aWorkType
= lens _aWorkType (\ s a -> s{_aWorkType = a})
aRatingValue :: Lens' Avail (Maybe Text)
aRatingValue
= lens _aRatingValue (\ s a -> s{_aRatingValue = a})
aSeasonTitleInternalAlias :: Lens' Avail (Maybe Text)
aSeasonTitleInternalAlias
= lens _aSeasonTitleInternalAlias
(\ s a -> s{_aSeasonTitleInternalAlias = a})
aContentId :: Lens' Avail (Maybe Text)
aContentId
= lens _aContentId (\ s a -> s{_aContentId = a})
aVideoId :: Lens' Avail (Maybe Text)
aVideoId = lens _aVideoId (\ s a -> s{_aVideoId = a})
aSeriesAltId :: Lens' Avail (Maybe Text)
aSeriesAltId
= lens _aSeriesAltId (\ s a -> s{_aSeriesAltId = a})
aEnd :: Lens' Avail (Maybe Text)
aEnd = lens _aEnd (\ s a -> s{_aEnd = a})
aSeriesTitleInternalAlias :: Lens' Avail (Maybe Text)
aSeriesTitleInternalAlias
= lens _aSeriesTitleInternalAlias
(\ s a -> s{_aSeriesTitleInternalAlias = a})
aDisplayName :: Lens' Avail (Maybe Text)
aDisplayName
= lens _aDisplayName (\ s a -> s{_aDisplayName = a})
aReleaseDate :: Lens' Avail (Maybe Text)
aReleaseDate
= lens _aReleaseDate (\ s a -> s{_aReleaseDate = a})
aFormatProFile :: Lens' Avail (Maybe AvailFormatProFile)
aFormatProFile
= lens _aFormatProFile
(\ s a -> s{_aFormatProFile = a})
aRatingReason :: Lens' Avail (Maybe Text)
aRatingReason
= lens _aRatingReason
(\ s a -> s{_aRatingReason = a})
aEncodeId :: Lens' Avail (Maybe Text)
aEncodeId
= lens _aEncodeId (\ s a -> s{_aEncodeId = a})
aPriceValue :: Lens' Avail (Maybe Text)
aPriceValue
= lens _aPriceValue (\ s a -> s{_aPriceValue = a})
aCaptionIncluded :: Lens' Avail (Maybe Bool)
aCaptionIncluded
= lens _aCaptionIncluded
(\ s a -> s{_aCaptionIncluded = a})
aProductId :: Lens' Avail (Maybe Text)
aProductId
= lens _aProductId (\ s a -> s{_aProductId = a})
aSeasonAltId :: Lens' Avail (Maybe Text)
aSeasonAltId
= lens _aSeasonAltId (\ s a -> s{_aSeasonAltId = a})
aTitleInternalAlias :: Lens' Avail (Maybe Text)
aTitleInternalAlias
= lens _aTitleInternalAlias
(\ s a -> s{_aTitleInternalAlias = a})
instance FromJSON Avail where
parseJSON
= withObject "Avail"
(\ o ->
Avail' <$>
(o .:? "altId") <*> (o .:? "pphNames" .!= mempty) <*>
(o .:? "captionExemption")
<*> (o .:? "ratingSystem")
<*> (o .:? "suppressionLiftDate")
<*> (o .:? "episodeNumber")
<*> (o .:? "priceType")
<*> (o .:? "storeLanguage")
<*> (o .:? "episodeAltId")
<*> (o .:? "start")
<*> (o .:? "territory")
<*> (o .:? "episodeTitleInternalAlias")
<*> (o .:? "licenseType")
<*> (o .:? "availId")
<*> (o .:? "seasonNumber")
<*> (o .:? "workType")
<*> (o .:? "ratingValue")
<*> (o .:? "seasonTitleInternalAlias")
<*> (o .:? "contentId")
<*> (o .:? "videoId")
<*> (o .:? "seriesAltId")
<*> (o .:? "end")
<*> (o .:? "seriesTitleInternalAlias")
<*> (o .:? "displayName")
<*> (o .:? "releaseDate")
<*> (o .:? "formatProfile")
<*> (o .:? "ratingReason")
<*> (o .:? "encodeId")
<*> (o .:? "priceValue")
<*> (o .:? "captionIncluded")
<*> (o .:? "productId")
<*> (o .:? "seasonAltId")
<*> (o .:? "titleInternalAlias"))
instance ToJSON Avail where
toJSON Avail'{..}
= object
(catMaybes
[("altId" .=) <$> _aAltId,
("pphNames" .=) <$> _aPphNames,
("captionExemption" .=) <$> _aCaptionExemption,
("ratingSystem" .=) <$> _aRatingSystem,
("suppressionLiftDate" .=) <$> _aSuppressionLiftDate,
("episodeNumber" .=) <$> _aEpisodeNumber,
("priceType" .=) <$> _aPriceType,
("storeLanguage" .=) <$> _aStoreLanguage,
("episodeAltId" .=) <$> _aEpisodeAltId,
("start" .=) <$> _aStart,
("territory" .=) <$> _aTerritory,
("episodeTitleInternalAlias" .=) <$>
_aEpisodeTitleInternalAlias,
("licenseType" .=) <$> _aLicenseType,
("availId" .=) <$> _aAvailId,
("seasonNumber" .=) <$> _aSeasonNumber,
("workType" .=) <$> _aWorkType,
("ratingValue" .=) <$> _aRatingValue,
("seasonTitleInternalAlias" .=) <$>
_aSeasonTitleInternalAlias,
("contentId" .=) <$> _aContentId,
("videoId" .=) <$> _aVideoId,
("seriesAltId" .=) <$> _aSeriesAltId,
("end" .=) <$> _aEnd,
("seriesTitleInternalAlias" .=) <$>
_aSeriesTitleInternalAlias,
("displayName" .=) <$> _aDisplayName,
("releaseDate" .=) <$> _aReleaseDate,
("formatProfile" .=) <$> _aFormatProFile,
("ratingReason" .=) <$> _aRatingReason,
("encodeId" .=) <$> _aEncodeId,
("priceValue" .=) <$> _aPriceValue,
("captionIncluded" .=) <$> _aCaptionIncluded,
("productId" .=) <$> _aProductId,
("seasonAltId" .=) <$> _aSeasonAltId,
("titleInternalAlias" .=) <$> _aTitleInternalAlias])
data ListAvailsResponse = ListAvailsResponse'
{ _larNextPageToken :: !(Maybe Text)
, _larAvails :: !(Maybe [Avail])
, _larTotalSize :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
listAvailsResponse
:: ListAvailsResponse
listAvailsResponse =
ListAvailsResponse'
{ _larNextPageToken = Nothing
, _larAvails = Nothing
, _larTotalSize = Nothing
}
larNextPageToken :: Lens' ListAvailsResponse (Maybe Text)
larNextPageToken
= lens _larNextPageToken
(\ s a -> s{_larNextPageToken = a})
larAvails :: Lens' ListAvailsResponse [Avail]
larAvails
= lens _larAvails (\ s a -> s{_larAvails = a}) .
_Default
. _Coerce
larTotalSize :: Lens' ListAvailsResponse (Maybe Int32)
larTotalSize
= lens _larTotalSize (\ s a -> s{_larTotalSize = a})
. mapping _Coerce
instance FromJSON ListAvailsResponse where
parseJSON
= withObject "ListAvailsResponse"
(\ o ->
ListAvailsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "avails" .!= mempty)
<*> (o .:? "totalSize"))
instance ToJSON ListAvailsResponse where
toJSON ListAvailsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _larNextPageToken,
("avails" .=) <$> _larAvails,
("totalSize" .=) <$> _larTotalSize])
data ListOrdersResponse = ListOrdersResponse'
{ _lorNextPageToken :: !(Maybe Text)
, _lorTotalSize :: !(Maybe (Textual Int32))
, _lorOrders :: !(Maybe [Order])
} deriving (Eq,Show,Data,Typeable,Generic)
listOrdersResponse
:: ListOrdersResponse
listOrdersResponse =
ListOrdersResponse'
{ _lorNextPageToken = Nothing
, _lorTotalSize = Nothing
, _lorOrders = Nothing
}
lorNextPageToken :: Lens' ListOrdersResponse (Maybe Text)
lorNextPageToken
= lens _lorNextPageToken
(\ s a -> s{_lorNextPageToken = a})
lorTotalSize :: Lens' ListOrdersResponse (Maybe Int32)
lorTotalSize
= lens _lorTotalSize (\ s a -> s{_lorTotalSize = a})
. mapping _Coerce
lorOrders :: Lens' ListOrdersResponse [Order]
lorOrders
= lens _lorOrders (\ s a -> s{_lorOrders = a}) .
_Default
. _Coerce
instance FromJSON ListOrdersResponse where
parseJSON
= withObject "ListOrdersResponse"
(\ o ->
ListOrdersResponse' <$>
(o .:? "nextPageToken") <*> (o .:? "totalSize") <*>
(o .:? "orders" .!= mempty))
instance ToJSON ListOrdersResponse where
toJSON ListOrdersResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lorNextPageToken,
("totalSize" .=) <$> _lorTotalSize,
("orders" .=) <$> _lorOrders])
data ListStoreInfosResponse = ListStoreInfosResponse'
{ _lsirNextPageToken :: !(Maybe Text)
, _lsirTotalSize :: !(Maybe (Textual Int32))
, _lsirStoreInfos :: !(Maybe [StoreInfo])
} deriving (Eq,Show,Data,Typeable,Generic)
listStoreInfosResponse
:: ListStoreInfosResponse
listStoreInfosResponse =
ListStoreInfosResponse'
{ _lsirNextPageToken = Nothing
, _lsirTotalSize = Nothing
, _lsirStoreInfos = Nothing
}
lsirNextPageToken :: Lens' ListStoreInfosResponse (Maybe Text)
lsirNextPageToken
= lens _lsirNextPageToken
(\ s a -> s{_lsirNextPageToken = a})
lsirTotalSize :: Lens' ListStoreInfosResponse (Maybe Int32)
lsirTotalSize
= lens _lsirTotalSize
(\ s a -> s{_lsirTotalSize = a})
. mapping _Coerce
lsirStoreInfos :: Lens' ListStoreInfosResponse [StoreInfo]
lsirStoreInfos
= lens _lsirStoreInfos
(\ s a -> s{_lsirStoreInfos = a})
. _Default
. _Coerce
instance FromJSON ListStoreInfosResponse where
parseJSON
= withObject "ListStoreInfosResponse"
(\ o ->
ListStoreInfosResponse' <$>
(o .:? "nextPageToken") <*> (o .:? "totalSize") <*>
(o .:? "storeInfos" .!= mempty))
instance ToJSON ListStoreInfosResponse where
toJSON ListStoreInfosResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lsirNextPageToken,
("totalSize" .=) <$> _lsirTotalSize,
("storeInfos" .=) <$> _lsirStoreInfos])
data Order = Order'
{ _oStatus :: !(Maybe OrderStatus)
, _oShowName :: !(Maybe Text)
, _oPphName :: !(Maybe Text)
, _oEarliestAvailStartTime :: !(Maybe DateTime')
, _oStudioName :: !(Maybe Text)
, _oReceivedTime :: !(Maybe DateTime')
, _oPriority :: !(Maybe (Textual Double))
, _oChannelId :: !(Maybe Text)
, _oCustomId :: !(Maybe Text)
, _oApprovedTime :: !(Maybe DateTime')
, _oCountries :: !(Maybe [Text])
, _oChannelName :: !(Maybe Text)
, _oVideoId :: !(Maybe Text)
, _oLegacyPriority :: !(Maybe Text)
, _oName :: !(Maybe Text)
, _oRejectionNote :: !(Maybe Text)
, _oOrderedTime :: !(Maybe DateTime')
, _oSeasonName :: !(Maybe Text)
, _oStatusDetail :: !(Maybe OrderStatusDetail)
, _oType :: !(Maybe OrderType)
, _oNormalizedPriority :: !(Maybe OrderNormalizedPriority)
, _oOrderId :: !(Maybe Text)
, _oEpisodeName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
order
:: Order
order =
Order'
{ _oStatus = Nothing
, _oShowName = Nothing
, _oPphName = Nothing
, _oEarliestAvailStartTime = Nothing
, _oStudioName = Nothing
, _oReceivedTime = Nothing
, _oPriority = Nothing
, _oChannelId = Nothing
, _oCustomId = Nothing
, _oApprovedTime = Nothing
, _oCountries = Nothing
, _oChannelName = Nothing
, _oVideoId = Nothing
, _oLegacyPriority = Nothing
, _oName = Nothing
, _oRejectionNote = Nothing
, _oOrderedTime = Nothing
, _oSeasonName = Nothing
, _oStatusDetail = Nothing
, _oType = Nothing
, _oNormalizedPriority = Nothing
, _oOrderId = Nothing
, _oEpisodeName = Nothing
}
oStatus :: Lens' Order (Maybe OrderStatus)
oStatus = lens _oStatus (\ s a -> s{_oStatus = a})
oShowName :: Lens' Order (Maybe Text)
oShowName
= lens _oShowName (\ s a -> s{_oShowName = a})
oPphName :: Lens' Order (Maybe Text)
oPphName = lens _oPphName (\ s a -> s{_oPphName = a})
oEarliestAvailStartTime :: Lens' Order (Maybe UTCTime)
oEarliestAvailStartTime
= lens _oEarliestAvailStartTime
(\ s a -> s{_oEarliestAvailStartTime = a})
. mapping _DateTime
oStudioName :: Lens' Order (Maybe Text)
oStudioName
= lens _oStudioName (\ s a -> s{_oStudioName = a})
oReceivedTime :: Lens' Order (Maybe UTCTime)
oReceivedTime
= lens _oReceivedTime
(\ s a -> s{_oReceivedTime = a})
. mapping _DateTime
oPriority :: Lens' Order (Maybe Double)
oPriority
= lens _oPriority (\ s a -> s{_oPriority = a}) .
mapping _Coerce
oChannelId :: Lens' Order (Maybe Text)
oChannelId
= lens _oChannelId (\ s a -> s{_oChannelId = a})
oCustomId :: Lens' Order (Maybe Text)
oCustomId
= lens _oCustomId (\ s a -> s{_oCustomId = a})
oApprovedTime :: Lens' Order (Maybe UTCTime)
oApprovedTime
= lens _oApprovedTime
(\ s a -> s{_oApprovedTime = a})
. mapping _DateTime
oCountries :: Lens' Order [Text]
oCountries
= lens _oCountries (\ s a -> s{_oCountries = a}) .
_Default
. _Coerce
oChannelName :: Lens' Order (Maybe Text)
oChannelName
= lens _oChannelName (\ s a -> s{_oChannelName = a})
oVideoId :: Lens' Order (Maybe Text)
oVideoId = lens _oVideoId (\ s a -> s{_oVideoId = a})
oLegacyPriority :: Lens' Order (Maybe Text)
oLegacyPriority
= lens _oLegacyPriority
(\ s a -> s{_oLegacyPriority = a})
oName :: Lens' Order (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
oRejectionNote :: Lens' Order (Maybe Text)
oRejectionNote
= lens _oRejectionNote
(\ s a -> s{_oRejectionNote = a})
oOrderedTime :: Lens' Order (Maybe UTCTime)
oOrderedTime
= lens _oOrderedTime (\ s a -> s{_oOrderedTime = a})
. mapping _DateTime
oSeasonName :: Lens' Order (Maybe Text)
oSeasonName
= lens _oSeasonName (\ s a -> s{_oSeasonName = a})
oStatusDetail :: Lens' Order (Maybe OrderStatusDetail)
oStatusDetail
= lens _oStatusDetail
(\ s a -> s{_oStatusDetail = a})
oType :: Lens' Order (Maybe OrderType)
oType = lens _oType (\ s a -> s{_oType = a})
oNormalizedPriority :: Lens' Order (Maybe OrderNormalizedPriority)
oNormalizedPriority
= lens _oNormalizedPriority
(\ s a -> s{_oNormalizedPriority = a})
oOrderId :: Lens' Order (Maybe Text)
oOrderId = lens _oOrderId (\ s a -> s{_oOrderId = a})
oEpisodeName :: Lens' Order (Maybe Text)
oEpisodeName
= lens _oEpisodeName (\ s a -> s{_oEpisodeName = a})
instance FromJSON Order where
parseJSON
= withObject "Order"
(\ o ->
Order' <$>
(o .:? "status") <*> (o .:? "showName") <*>
(o .:? "pphName")
<*> (o .:? "earliestAvailStartTime")
<*> (o .:? "studioName")
<*> (o .:? "receivedTime")
<*> (o .:? "priority")
<*> (o .:? "channelId")
<*> (o .:? "customId")
<*> (o .:? "approvedTime")
<*> (o .:? "countries" .!= mempty)
<*> (o .:? "channelName")
<*> (o .:? "videoId")
<*> (o .:? "legacyPriority")
<*> (o .:? "name")
<*> (o .:? "rejectionNote")
<*> (o .:? "orderedTime")
<*> (o .:? "seasonName")
<*> (o .:? "statusDetail")
<*> (o .:? "type")
<*> (o .:? "normalizedPriority")
<*> (o .:? "orderId")
<*> (o .:? "episodeName"))
instance ToJSON Order where
toJSON Order'{..}
= object
(catMaybes
[("status" .=) <$> _oStatus,
("showName" .=) <$> _oShowName,
("pphName" .=) <$> _oPphName,
("earliestAvailStartTime" .=) <$>
_oEarliestAvailStartTime,
("studioName" .=) <$> _oStudioName,
("receivedTime" .=) <$> _oReceivedTime,
("priority" .=) <$> _oPriority,
("channelId" .=) <$> _oChannelId,
("customId" .=) <$> _oCustomId,
("approvedTime" .=) <$> _oApprovedTime,
("countries" .=) <$> _oCountries,
("channelName" .=) <$> _oChannelName,
("videoId" .=) <$> _oVideoId,
("legacyPriority" .=) <$> _oLegacyPriority,
("name" .=) <$> _oName,
("rejectionNote" .=) <$> _oRejectionNote,
("orderedTime" .=) <$> _oOrderedTime,
("seasonName" .=) <$> _oSeasonName,
("statusDetail" .=) <$> _oStatusDetail,
("type" .=) <$> _oType,
("normalizedPriority" .=) <$> _oNormalizedPriority,
("orderId" .=) <$> _oOrderId,
("episodeName" .=) <$> _oEpisodeName])
data StoreInfo = StoreInfo'
{ _siTitleLevelEidr :: !(Maybe Text)
, _siPphNames :: !(Maybe [Text])
, _siShowName :: !(Maybe Text)
, _siSubtitles :: !(Maybe [Text])
, _siStudioName :: !(Maybe Text)
, _siAudioTracks :: !(Maybe [Text])
, _siEpisodeNumber :: !(Maybe Text)
, _siCountry :: !(Maybe Text)
, _siTrailerId :: !(Maybe Text)
, _siHasInfoCards :: !(Maybe Bool)
, _siLiveTime :: !(Maybe DateTime')
, _siSeasonNumber :: !(Maybe Text)
, _siHasHdOffer :: !(Maybe Bool)
, _siVideoId :: !(Maybe Text)
, _siName :: !(Maybe Text)
, _siHasVodOffer :: !(Maybe Bool)
, _siSeasonName :: !(Maybe Text)
, _siHasSdOffer :: !(Maybe Bool)
, _siMid :: !(Maybe Text)
, _siEditLevelEidr :: !(Maybe Text)
, _siType :: !(Maybe StoreInfoType)
, _siHasEstOffer :: !(Maybe Bool)
, _siHasAudio51 :: !(Maybe Bool)
, _siSeasonId :: !(Maybe Text)
, _siShowId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
storeInfo
:: StoreInfo
storeInfo =
StoreInfo'
{ _siTitleLevelEidr = Nothing
, _siPphNames = Nothing
, _siShowName = Nothing
, _siSubtitles = Nothing
, _siStudioName = Nothing
, _siAudioTracks = Nothing
, _siEpisodeNumber = Nothing
, _siCountry = Nothing
, _siTrailerId = Nothing
, _siHasInfoCards = Nothing
, _siLiveTime = Nothing
, _siSeasonNumber = Nothing
, _siHasHdOffer = Nothing
, _siVideoId = Nothing
, _siName = Nothing
, _siHasVodOffer = Nothing
, _siSeasonName = Nothing
, _siHasSdOffer = Nothing
, _siMid = Nothing
, _siEditLevelEidr = Nothing
, _siType = Nothing
, _siHasEstOffer = Nothing
, _siHasAudio51 = Nothing
, _siSeasonId = Nothing
, _siShowId = Nothing
}
siTitleLevelEidr :: Lens' StoreInfo (Maybe Text)
siTitleLevelEidr
= lens _siTitleLevelEidr
(\ s a -> s{_siTitleLevelEidr = a})
siPphNames :: Lens' StoreInfo [Text]
siPphNames
= lens _siPphNames (\ s a -> s{_siPphNames = a}) .
_Default
. _Coerce
siShowName :: Lens' StoreInfo (Maybe Text)
siShowName
= lens _siShowName (\ s a -> s{_siShowName = a})
siSubtitles :: Lens' StoreInfo [Text]
siSubtitles
= lens _siSubtitles (\ s a -> s{_siSubtitles = a}) .
_Default
. _Coerce
siStudioName :: Lens' StoreInfo (Maybe Text)
siStudioName
= lens _siStudioName (\ s a -> s{_siStudioName = a})
siAudioTracks :: Lens' StoreInfo [Text]
siAudioTracks
= lens _siAudioTracks
(\ s a -> s{_siAudioTracks = a})
. _Default
. _Coerce
siEpisodeNumber :: Lens' StoreInfo (Maybe Text)
siEpisodeNumber
= lens _siEpisodeNumber
(\ s a -> s{_siEpisodeNumber = a})
siCountry :: Lens' StoreInfo (Maybe Text)
siCountry
= lens _siCountry (\ s a -> s{_siCountry = a})
siTrailerId :: Lens' StoreInfo (Maybe Text)
siTrailerId
= lens _siTrailerId (\ s a -> s{_siTrailerId = a})
siHasInfoCards :: Lens' StoreInfo (Maybe Bool)
siHasInfoCards
= lens _siHasInfoCards
(\ s a -> s{_siHasInfoCards = a})
siLiveTime :: Lens' StoreInfo (Maybe UTCTime)
siLiveTime
= lens _siLiveTime (\ s a -> s{_siLiveTime = a}) .
mapping _DateTime
siSeasonNumber :: Lens' StoreInfo (Maybe Text)
siSeasonNumber
= lens _siSeasonNumber
(\ s a -> s{_siSeasonNumber = a})
siHasHdOffer :: Lens' StoreInfo (Maybe Bool)
siHasHdOffer
= lens _siHasHdOffer (\ s a -> s{_siHasHdOffer = a})
siVideoId :: Lens' StoreInfo (Maybe Text)
siVideoId
= lens _siVideoId (\ s a -> s{_siVideoId = a})
siName :: Lens' StoreInfo (Maybe Text)
siName = lens _siName (\ s a -> s{_siName = a})
siHasVodOffer :: Lens' StoreInfo (Maybe Bool)
siHasVodOffer
= lens _siHasVodOffer
(\ s a -> s{_siHasVodOffer = a})
siSeasonName :: Lens' StoreInfo (Maybe Text)
siSeasonName
= lens _siSeasonName (\ s a -> s{_siSeasonName = a})
siHasSdOffer :: Lens' StoreInfo (Maybe Bool)
siHasSdOffer
= lens _siHasSdOffer (\ s a -> s{_siHasSdOffer = a})
siMid :: Lens' StoreInfo (Maybe Text)
siMid = lens _siMid (\ s a -> s{_siMid = a})
siEditLevelEidr :: Lens' StoreInfo (Maybe Text)
siEditLevelEidr
= lens _siEditLevelEidr
(\ s a -> s{_siEditLevelEidr = a})
siType :: Lens' StoreInfo (Maybe StoreInfoType)
siType = lens _siType (\ s a -> s{_siType = a})
siHasEstOffer :: Lens' StoreInfo (Maybe Bool)
siHasEstOffer
= lens _siHasEstOffer
(\ s a -> s{_siHasEstOffer = a})
siHasAudio51 :: Lens' StoreInfo (Maybe Bool)
siHasAudio51
= lens _siHasAudio51 (\ s a -> s{_siHasAudio51 = a})
siSeasonId :: Lens' StoreInfo (Maybe Text)
siSeasonId
= lens _siSeasonId (\ s a -> s{_siSeasonId = a})
siShowId :: Lens' StoreInfo (Maybe Text)
siShowId = lens _siShowId (\ s a -> s{_siShowId = a})
instance FromJSON StoreInfo where
parseJSON
= withObject "StoreInfo"
(\ o ->
StoreInfo' <$>
(o .:? "titleLevelEidr") <*>
(o .:? "pphNames" .!= mempty)
<*> (o .:? "showName")
<*> (o .:? "subtitles" .!= mempty)
<*> (o .:? "studioName")
<*> (o .:? "audioTracks" .!= mempty)
<*> (o .:? "episodeNumber")
<*> (o .:? "country")
<*> (o .:? "trailerId")
<*> (o .:? "hasInfoCards")
<*> (o .:? "liveTime")
<*> (o .:? "seasonNumber")
<*> (o .:? "hasHdOffer")
<*> (o .:? "videoId")
<*> (o .:? "name")
<*> (o .:? "hasVodOffer")
<*> (o .:? "seasonName")
<*> (o .:? "hasSdOffer")
<*> (o .:? "mid")
<*> (o .:? "editLevelEidr")
<*> (o .:? "type")
<*> (o .:? "hasEstOffer")
<*> (o .:? "hasAudio51")
<*> (o .:? "seasonId")
<*> (o .:? "showId"))
instance ToJSON StoreInfo where
toJSON StoreInfo'{..}
= object
(catMaybes
[("titleLevelEidr" .=) <$> _siTitleLevelEidr,
("pphNames" .=) <$> _siPphNames,
("showName" .=) <$> _siShowName,
("subtitles" .=) <$> _siSubtitles,
("studioName" .=) <$> _siStudioName,
("audioTracks" .=) <$> _siAudioTracks,
("episodeNumber" .=) <$> _siEpisodeNumber,
("country" .=) <$> _siCountry,
("trailerId" .=) <$> _siTrailerId,
("hasInfoCards" .=) <$> _siHasInfoCards,
("liveTime" .=) <$> _siLiveTime,
("seasonNumber" .=) <$> _siSeasonNumber,
("hasHdOffer" .=) <$> _siHasHdOffer,
("videoId" .=) <$> _siVideoId,
("name" .=) <$> _siName,
("hasVodOffer" .=) <$> _siHasVodOffer,
("seasonName" .=) <$> _siSeasonName,
("hasSdOffer" .=) <$> _siHasSdOffer,
("mid" .=) <$> _siMid,
("editLevelEidr" .=) <$> _siEditLevelEidr,
("type" .=) <$> _siType,
("hasEstOffer" .=) <$> _siHasEstOffer,
("hasAudio51" .=) <$> _siHasAudio51,
("seasonId" .=) <$> _siSeasonId,
("showId" .=) <$> _siShowId])