module Network.Google.PlayMoviesPartner.Types.Product where
import Network.Google.PlayMoviesPartner.Types.Sum
import Network.Google.Prelude
data Component = Component'
{ _cStatus :: !(Maybe Text)
, _cPphName :: !(Maybe Text)
, _cStudioName :: !(Maybe Text)
, _cElIds :: !(Maybe [Text])
, _cReceivedTime :: !(Maybe Text)
, _cPriority :: !(Maybe (Textual Double))
, _cCustomIds :: !(Maybe [Text])
, _cAltCutIds :: !(Maybe [Text])
, _cProcessingErrors :: !(Maybe [Text])
, _cPlayableUnitType :: !(Maybe Text)
, _cEditLevelEidrs :: !(Maybe [Text])
, _cApprovedTime :: !(Maybe Text)
, _cName :: !(Maybe Text)
, _cTitleLevelEidrs :: !(Maybe [Text])
, _cRejectionNote :: !(Maybe Text)
, _cComponentId :: !(Maybe Text)
, _cLanguage :: !(Maybe Text)
, _cStatusDetail :: !(Maybe Text)
, _cType :: !(Maybe Text)
, _cNormalizedPriority :: !(Maybe Text)
, _cComponentDetailType :: !(Maybe Text)
, _cFilename :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
component
:: Component
component =
Component'
{ _cStatus = Nothing
, _cPphName = Nothing
, _cStudioName = Nothing
, _cElIds = Nothing
, _cReceivedTime = Nothing
, _cPriority = Nothing
, _cCustomIds = Nothing
, _cAltCutIds = Nothing
, _cProcessingErrors = Nothing
, _cPlayableUnitType = Nothing
, _cEditLevelEidrs = Nothing
, _cApprovedTime = Nothing
, _cName = Nothing
, _cTitleLevelEidrs = Nothing
, _cRejectionNote = Nothing
, _cComponentId = Nothing
, _cLanguage = Nothing
, _cStatusDetail = Nothing
, _cType = Nothing
, _cNormalizedPriority = Nothing
, _cComponentDetailType = Nothing
, _cFilename = Nothing
}
cStatus :: Lens' Component (Maybe Text)
cStatus = lens _cStatus (\ s a -> s{_cStatus = a})
cPphName :: Lens' Component (Maybe Text)
cPphName = lens _cPphName (\ s a -> s{_cPphName = a})
cStudioName :: Lens' Component (Maybe Text)
cStudioName
= lens _cStudioName (\ s a -> s{_cStudioName = a})
cElIds :: Lens' Component [Text]
cElIds
= lens _cElIds (\ s a -> s{_cElIds = a}) . _Default .
_Coerce
cReceivedTime :: Lens' Component (Maybe Text)
cReceivedTime
= lens _cReceivedTime
(\ s a -> s{_cReceivedTime = a})
cPriority :: Lens' Component (Maybe Double)
cPriority
= lens _cPriority (\ s a -> s{_cPriority = a}) .
mapping _Coerce
cCustomIds :: Lens' Component [Text]
cCustomIds
= lens _cCustomIds (\ s a -> s{_cCustomIds = a}) .
_Default
. _Coerce
cAltCutIds :: Lens' Component [Text]
cAltCutIds
= lens _cAltCutIds (\ s a -> s{_cAltCutIds = a}) .
_Default
. _Coerce
cProcessingErrors :: Lens' Component [Text]
cProcessingErrors
= lens _cProcessingErrors
(\ s a -> s{_cProcessingErrors = a})
. _Default
. _Coerce
cPlayableUnitType :: Lens' Component (Maybe Text)
cPlayableUnitType
= lens _cPlayableUnitType
(\ s a -> s{_cPlayableUnitType = a})
cEditLevelEidrs :: Lens' Component [Text]
cEditLevelEidrs
= lens _cEditLevelEidrs
(\ s a -> s{_cEditLevelEidrs = a})
. _Default
. _Coerce
cApprovedTime :: Lens' Component (Maybe Text)
cApprovedTime
= lens _cApprovedTime
(\ s a -> s{_cApprovedTime = a})
cName :: Lens' Component (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a})
cTitleLevelEidrs :: Lens' Component [Text]
cTitleLevelEidrs
= lens _cTitleLevelEidrs
(\ s a -> s{_cTitleLevelEidrs = a})
. _Default
. _Coerce
cRejectionNote :: Lens' Component (Maybe Text)
cRejectionNote
= lens _cRejectionNote
(\ s a -> s{_cRejectionNote = a})
cComponentId :: Lens' Component (Maybe Text)
cComponentId
= lens _cComponentId (\ s a -> s{_cComponentId = a})
cLanguage :: Lens' Component (Maybe Text)
cLanguage
= lens _cLanguage (\ s a -> s{_cLanguage = a})
cStatusDetail :: Lens' Component (Maybe Text)
cStatusDetail
= lens _cStatusDetail
(\ s a -> s{_cStatusDetail = a})
cType :: Lens' Component (Maybe Text)
cType = lens _cType (\ s a -> s{_cType = a})
cNormalizedPriority :: Lens' Component (Maybe Text)
cNormalizedPriority
= lens _cNormalizedPriority
(\ s a -> s{_cNormalizedPriority = a})
cComponentDetailType :: Lens' Component (Maybe Text)
cComponentDetailType
= lens _cComponentDetailType
(\ s a -> s{_cComponentDetailType = a})
cFilename :: Lens' Component (Maybe Text)
cFilename
= lens _cFilename (\ s a -> s{_cFilename = a})
instance FromJSON Component where
parseJSON
= withObject "Component"
(\ o ->
Component' <$>
(o .:? "status") <*> (o .:? "pphName") <*>
(o .:? "studioName")
<*> (o .:? "elIds" .!= mempty)
<*> (o .:? "receivedTime")
<*> (o .:? "priority")
<*> (o .:? "customIds" .!= mempty)
<*> (o .:? "altCutIds" .!= mempty)
<*> (o .:? "processingErrors" .!= mempty)
<*> (o .:? "playableUnitType")
<*> (o .:? "editLevelEidrs" .!= mempty)
<*> (o .:? "approvedTime")
<*> (o .:? "name")
<*> (o .:? "titleLevelEidrs" .!= mempty)
<*> (o .:? "rejectionNote")
<*> (o .:? "componentId")
<*> (o .:? "language")
<*> (o .:? "statusDetail")
<*> (o .:? "type")
<*> (o .:? "normalizedPriority")
<*> (o .:? "componentDetailType")
<*> (o .:? "filename"))
instance ToJSON Component where
toJSON Component'{..}
= object
(catMaybes
[("status" .=) <$> _cStatus,
("pphName" .=) <$> _cPphName,
("studioName" .=) <$> _cStudioName,
("elIds" .=) <$> _cElIds,
("receivedTime" .=) <$> _cReceivedTime,
("priority" .=) <$> _cPriority,
("customIds" .=) <$> _cCustomIds,
("altCutIds" .=) <$> _cAltCutIds,
("processingErrors" .=) <$> _cProcessingErrors,
("playableUnitType" .=) <$> _cPlayableUnitType,
("editLevelEidrs" .=) <$> _cEditLevelEidrs,
("approvedTime" .=) <$> _cApprovedTime,
("name" .=) <$> _cName,
("titleLevelEidrs" .=) <$> _cTitleLevelEidrs,
("rejectionNote" .=) <$> _cRejectionNote,
("componentId" .=) <$> _cComponentId,
("language" .=) <$> _cLanguage,
("statusDetail" .=) <$> _cStatusDetail,
("type" .=) <$> _cType,
("normalizedPriority" .=) <$> _cNormalizedPriority,
("componentDetailType" .=) <$> _cComponentDetailType,
("filename" .=) <$> _cFilename])
data ListComponentsResponse = ListComponentsResponse'
{ _lcrComponents :: !(Maybe [Component])
, _lcrNextPageToken :: !(Maybe Text)
, _lcrTotalSize :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
listComponentsResponse
:: ListComponentsResponse
listComponentsResponse =
ListComponentsResponse'
{ _lcrComponents = Nothing
, _lcrNextPageToken = Nothing
, _lcrTotalSize = Nothing
}
lcrComponents :: Lens' ListComponentsResponse [Component]
lcrComponents
= lens _lcrComponents
(\ s a -> s{_lcrComponents = a})
. _Default
. _Coerce
lcrNextPageToken :: Lens' ListComponentsResponse (Maybe Text)
lcrNextPageToken
= lens _lcrNextPageToken
(\ s a -> s{_lcrNextPageToken = a})
lcrTotalSize :: Lens' ListComponentsResponse (Maybe Int32)
lcrTotalSize
= lens _lcrTotalSize (\ s a -> s{_lcrTotalSize = a})
. mapping _Coerce
instance FromJSON ListComponentsResponse where
parseJSON
= withObject "ListComponentsResponse"
(\ o ->
ListComponentsResponse' <$>
(o .:? "components" .!= mempty) <*>
(o .:? "nextPageToken")
<*> (o .:? "totalSize"))
instance ToJSON ListComponentsResponse where
toJSON ListComponentsResponse'{..}
= object
(catMaybes
[("components" .=) <$> _lcrComponents,
("nextPageToken" .=) <$> _lcrNextPageToken,
("totalSize" .=) <$> _lcrTotalSize])
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 Text)
, _aAvailId :: !(Maybe Text)
, _aSeasonNumber :: !(Maybe Text)
, _aWorkType :: !(Maybe Text)
, _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 Text)
, _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 Text)
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 Text)
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 Text)
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 ListExperienceLocalesResponse = ListExperienceLocalesResponse'
{ _lelrNextPageToken :: !(Maybe Text)
, _lelrTotalSize :: !(Maybe (Textual Int32))
, _lelrExperienceLocales :: !(Maybe [ExperienceLocale])
} deriving (Eq,Show,Data,Typeable,Generic)
listExperienceLocalesResponse
:: ListExperienceLocalesResponse
listExperienceLocalesResponse =
ListExperienceLocalesResponse'
{ _lelrNextPageToken = Nothing
, _lelrTotalSize = Nothing
, _lelrExperienceLocales = Nothing
}
lelrNextPageToken :: Lens' ListExperienceLocalesResponse (Maybe Text)
lelrNextPageToken
= lens _lelrNextPageToken
(\ s a -> s{_lelrNextPageToken = a})
lelrTotalSize :: Lens' ListExperienceLocalesResponse (Maybe Int32)
lelrTotalSize
= lens _lelrTotalSize
(\ s a -> s{_lelrTotalSize = a})
. mapping _Coerce
lelrExperienceLocales :: Lens' ListExperienceLocalesResponse [ExperienceLocale]
lelrExperienceLocales
= lens _lelrExperienceLocales
(\ s a -> s{_lelrExperienceLocales = a})
. _Default
. _Coerce
instance FromJSON ListExperienceLocalesResponse where
parseJSON
= withObject "ListExperienceLocalesResponse"
(\ o ->
ListExperienceLocalesResponse' <$>
(o .:? "nextPageToken") <*> (o .:? "totalSize") <*>
(o .:? "experienceLocales" .!= mempty))
instance ToJSON ListExperienceLocalesResponse where
toJSON ListExperienceLocalesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lelrNextPageToken,
("totalSize" .=) <$> _lelrTotalSize,
("experienceLocales" .=) <$> _lelrExperienceLocales])
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 Text)
, _oShowName :: !(Maybe Text)
, _oPphName :: !(Maybe Text)
, _oEarliestAvailStartTime :: !(Maybe Text)
, _oStudioName :: !(Maybe Text)
, _oReceivedTime :: !(Maybe Text)
, _oPriority :: !(Maybe (Textual Double))
, _oChannelId :: !(Maybe Text)
, _oCustomId :: !(Maybe Text)
, _oApprovedTime :: !(Maybe Text)
, _oCountries :: !(Maybe [Text])
, _oChannelName :: !(Maybe Text)
, _oVideoId :: !(Maybe Text)
, _oLegacyPriority :: !(Maybe Text)
, _oName :: !(Maybe Text)
, _oRejectionNote :: !(Maybe Text)
, _oOrderedTime :: !(Maybe Text)
, _oSeasonName :: !(Maybe Text)
, _oStatusDetail :: !(Maybe Text)
, _oType :: !(Maybe Text)
, _oNormalizedPriority :: !(Maybe Text)
, _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 Text)
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 Text)
oEarliestAvailStartTime
= lens _oEarliestAvailStartTime
(\ s a -> s{_oEarliestAvailStartTime = a})
oStudioName :: Lens' Order (Maybe Text)
oStudioName
= lens _oStudioName (\ s a -> s{_oStudioName = a})
oReceivedTime :: Lens' Order (Maybe Text)
oReceivedTime
= lens _oReceivedTime
(\ s a -> s{_oReceivedTime = a})
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 Text)
oApprovedTime
= lens _oApprovedTime
(\ s a -> s{_oApprovedTime = a})
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 Text)
oOrderedTime
= lens _oOrderedTime (\ s a -> s{_oOrderedTime = a})
oSeasonName :: Lens' Order (Maybe Text)
oSeasonName
= lens _oSeasonName (\ s a -> s{_oSeasonName = a})
oStatusDetail :: Lens' Order (Maybe Text)
oStatusDetail
= lens _oStatusDetail
(\ s a -> s{_oStatusDetail = a})
oType :: Lens' Order (Maybe Text)
oType = lens _oType (\ s a -> s{_oType = a})
oNormalizedPriority :: Lens' Order (Maybe Text)
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 ExperienceLocale = ExperienceLocale'
{ _elTitleLevelEidr :: !(Maybe Text)
, _elStatus :: !(Maybe Text)
, _elPphNames :: !(Maybe [Text])
, _elInventoryId :: !(Maybe Text)
, _elEarliestAvailStartTime :: !(Maybe Text)
, _elStudioName :: !(Maybe Text)
, _elPriority :: !(Maybe (Textual Double))
, _elCustomIds :: !(Maybe [Text])
, _elCreatedTime :: !(Maybe Text)
, _elCountry :: !(Maybe Text)
, _elTrailerId :: !(Maybe Text)
, _elPresentationId :: !(Maybe Text)
, _elAltCutId :: !(Maybe Text)
, _elChannelId :: !(Maybe Text)
, _elApprovedTime :: !(Maybe Text)
, _elPlayableSequenceId :: !(Maybe Text)
, _elElId :: !(Maybe Text)
, _elVideoId :: !(Maybe Text)
, _elName :: !(Maybe Text)
, _elLanguage :: !(Maybe Text)
, _elEditLevelEidr :: !(Maybe Text)
, _elType :: !(Maybe Text)
, _elNormalizedPriority :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
experienceLocale
:: ExperienceLocale
experienceLocale =
ExperienceLocale'
{ _elTitleLevelEidr = Nothing
, _elStatus = Nothing
, _elPphNames = Nothing
, _elInventoryId = Nothing
, _elEarliestAvailStartTime = Nothing
, _elStudioName = Nothing
, _elPriority = Nothing
, _elCustomIds = Nothing
, _elCreatedTime = Nothing
, _elCountry = Nothing
, _elTrailerId = Nothing
, _elPresentationId = Nothing
, _elAltCutId = Nothing
, _elChannelId = Nothing
, _elApprovedTime = Nothing
, _elPlayableSequenceId = Nothing
, _elElId = Nothing
, _elVideoId = Nothing
, _elName = Nothing
, _elLanguage = Nothing
, _elEditLevelEidr = Nothing
, _elType = Nothing
, _elNormalizedPriority = Nothing
}
elTitleLevelEidr :: Lens' ExperienceLocale (Maybe Text)
elTitleLevelEidr
= lens _elTitleLevelEidr
(\ s a -> s{_elTitleLevelEidr = a})
elStatus :: Lens' ExperienceLocale (Maybe Text)
elStatus = lens _elStatus (\ s a -> s{_elStatus = a})
elPphNames :: Lens' ExperienceLocale [Text]
elPphNames
= lens _elPphNames (\ s a -> s{_elPphNames = a}) .
_Default
. _Coerce
elInventoryId :: Lens' ExperienceLocale (Maybe Text)
elInventoryId
= lens _elInventoryId
(\ s a -> s{_elInventoryId = a})
elEarliestAvailStartTime :: Lens' ExperienceLocale (Maybe Text)
elEarliestAvailStartTime
= lens _elEarliestAvailStartTime
(\ s a -> s{_elEarliestAvailStartTime = a})
elStudioName :: Lens' ExperienceLocale (Maybe Text)
elStudioName
= lens _elStudioName (\ s a -> s{_elStudioName = a})
elPriority :: Lens' ExperienceLocale (Maybe Double)
elPriority
= lens _elPriority (\ s a -> s{_elPriority = a}) .
mapping _Coerce
elCustomIds :: Lens' ExperienceLocale [Text]
elCustomIds
= lens _elCustomIds (\ s a -> s{_elCustomIds = a}) .
_Default
. _Coerce
elCreatedTime :: Lens' ExperienceLocale (Maybe Text)
elCreatedTime
= lens _elCreatedTime
(\ s a -> s{_elCreatedTime = a})
elCountry :: Lens' ExperienceLocale (Maybe Text)
elCountry
= lens _elCountry (\ s a -> s{_elCountry = a})
elTrailerId :: Lens' ExperienceLocale (Maybe Text)
elTrailerId
= lens _elTrailerId (\ s a -> s{_elTrailerId = a})
elPresentationId :: Lens' ExperienceLocale (Maybe Text)
elPresentationId
= lens _elPresentationId
(\ s a -> s{_elPresentationId = a})
elAltCutId :: Lens' ExperienceLocale (Maybe Text)
elAltCutId
= lens _elAltCutId (\ s a -> s{_elAltCutId = a})
elChannelId :: Lens' ExperienceLocale (Maybe Text)
elChannelId
= lens _elChannelId (\ s a -> s{_elChannelId = a})
elApprovedTime :: Lens' ExperienceLocale (Maybe Text)
elApprovedTime
= lens _elApprovedTime
(\ s a -> s{_elApprovedTime = a})
elPlayableSequenceId :: Lens' ExperienceLocale (Maybe Text)
elPlayableSequenceId
= lens _elPlayableSequenceId
(\ s a -> s{_elPlayableSequenceId = a})
elElId :: Lens' ExperienceLocale (Maybe Text)
elElId = lens _elElId (\ s a -> s{_elElId = a})
elVideoId :: Lens' ExperienceLocale (Maybe Text)
elVideoId
= lens _elVideoId (\ s a -> s{_elVideoId = a})
elName :: Lens' ExperienceLocale (Maybe Text)
elName = lens _elName (\ s a -> s{_elName = a})
elLanguage :: Lens' ExperienceLocale (Maybe Text)
elLanguage
= lens _elLanguage (\ s a -> s{_elLanguage = a})
elEditLevelEidr :: Lens' ExperienceLocale (Maybe Text)
elEditLevelEidr
= lens _elEditLevelEidr
(\ s a -> s{_elEditLevelEidr = a})
elType :: Lens' ExperienceLocale (Maybe Text)
elType = lens _elType (\ s a -> s{_elType = a})
elNormalizedPriority :: Lens' ExperienceLocale (Maybe Text)
elNormalizedPriority
= lens _elNormalizedPriority
(\ s a -> s{_elNormalizedPriority = a})
instance FromJSON ExperienceLocale where
parseJSON
= withObject "ExperienceLocale"
(\ o ->
ExperienceLocale' <$>
(o .:? "titleLevelEidr") <*> (o .:? "status") <*>
(o .:? "pphNames" .!= mempty)
<*> (o .:? "inventoryId")
<*> (o .:? "earliestAvailStartTime")
<*> (o .:? "studioName")
<*> (o .:? "priority")
<*> (o .:? "customIds" .!= mempty)
<*> (o .:? "createdTime")
<*> (o .:? "country")
<*> (o .:? "trailerId")
<*> (o .:? "presentationId")
<*> (o .:? "altCutId")
<*> (o .:? "channelId")
<*> (o .:? "approvedTime")
<*> (o .:? "playableSequenceId")
<*> (o .:? "elId")
<*> (o .:? "videoId")
<*> (o .:? "name")
<*> (o .:? "language")
<*> (o .:? "editLevelEidr")
<*> (o .:? "type")
<*> (o .:? "normalizedPriority"))
instance ToJSON ExperienceLocale where
toJSON ExperienceLocale'{..}
= object
(catMaybes
[("titleLevelEidr" .=) <$> _elTitleLevelEidr,
("status" .=) <$> _elStatus,
("pphNames" .=) <$> _elPphNames,
("inventoryId" .=) <$> _elInventoryId,
("earliestAvailStartTime" .=) <$>
_elEarliestAvailStartTime,
("studioName" .=) <$> _elStudioName,
("priority" .=) <$> _elPriority,
("customIds" .=) <$> _elCustomIds,
("createdTime" .=) <$> _elCreatedTime,
("country" .=) <$> _elCountry,
("trailerId" .=) <$> _elTrailerId,
("presentationId" .=) <$> _elPresentationId,
("altCutId" .=) <$> _elAltCutId,
("channelId" .=) <$> _elChannelId,
("approvedTime" .=) <$> _elApprovedTime,
("playableSequenceId" .=) <$> _elPlayableSequenceId,
("elId" .=) <$> _elElId,
("videoId" .=) <$> _elVideoId,
("name" .=) <$> _elName,
("language" .=) <$> _elLanguage,
("editLevelEidr" .=) <$> _elEditLevelEidr,
("type" .=) <$> _elType,
("normalizedPriority" .=) <$> _elNormalizedPriority])
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 Text)
, _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 Text)
, _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 Text)
siLiveTime
= lens _siLiveTime (\ s a -> s{_siLiveTime = a})
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 Text)
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])